Subject: pkg/9525: MIT-pthreads for PowerPC
To: None <gnats-bugs@gnats.netbsd.org>
From: None <andy_finnell@bellsouth.net>
List: netbsd-bugs
Date: 03/02/2000 18:31:08
>Number:         9525
>Category:       pkg
>Synopsis:       Patch for MIT-pthread package for PowerPC
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager (NetBSD software packages system bug manager)
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Thu Mar  2 21:06:00 2000
>Last-Modified:
>Originator:     Andy Finnell
>Organization:
	none
>Release:        NetBSD 1.4.2_ALPHA
>Environment:
	PowerCenter Pro 180, NetBSD/macppc
System: NetBSD tiger.etsu.edu 1.4.2_ALPHA NetBSD 1.4.2_ALPHA (GENERIC) #0: Sat Feb 12 23:05:42 JST 2000 tsubai@mint.iri.co.jp:/usr/src/sys/arch/macppc/compile/GENERIC macppc


>Description:
	The MIT-pthreads package does not currently support powerpc machines
	such as macppc, powerpc, and bebox.  I've provided a patch to add
	support to the pthread package.  

>How-To-Repeat:
	
>Fix:
diff -rcN pthreads-old/config/config.guess pthreads-1_60_beta6/config/config.guess
*** pthreads-old/config/config.guess	Thu Mar  2 19:34:50 2000
--- pthreads-1_60_beta6/config/config.guess	Thu Mar  2 00:53:34 2000
***************
*** 273,278 ****
--- 273,281 ----
      mac68k:NetBSD:*:*)
  	echo m68k-apple-netbsd${UNAME_RELEASE}
  	exit 0 ;;
+     macppc:NetBSD:*:*)
+ 	echo powerpc-apple-netbsd${UNAME_RELEASE}
+ 	exit 0 ;;
      mvme68k:NetBSD:*:*)
  	echo m68k-motorola-netbsd${UNAME_RELEASE}
  	exit 0 ;;
diff -rcN pthreads-old/config/configure pthreads-1_60_beta6/config/configure
*** pthreads-old/config/configure	Thu Mar  2 19:34:50 2000
--- pthreads-1_60_beta6/config/configure	Thu Mar  2 15:08:24 2000
***************
*** 1,7 ****
  #! /bin/sh
  
  # Guess values for system-dependent variables and create Makefiles.
! # Generated automatically using autoconf version 2.10 
  # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
  #
  # This configure script is free software; the Free Software Foundation
--- 1,7 ----
  #! /bin/sh
  
  # Guess values for system-dependent variables and create Makefiles.
! # Generated automatically using autoconf version 2.13 
  # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
  #
  # This configure script is free software; the Free Software Foundation
***************
*** 52,57 ****
--- 52,60 ----
  # Initialize some other variables.
  subdirs=
  MFLAGS= MAKEFLAGS=
+ SHELL=${CONFIG_SHELL-/bin/sh}
+ # Maximum number of lines to put in a shell here document.
+ ac_max_here_lines=12
  
  ac_prev=
  for ac_option
***************
*** 333,339 ****
      verbose=yes ;;
  
    -version | --version | --versio | --versi | --vers)
!     echo "configure generated by autoconf version 2.10"
      exit 0 ;;
  
    -with-* | --with-*)
--- 336,342 ----
      verbose=yes ;;
  
    -version | --version | --versio | --versi | --vers)
!     echo "configure generated by autoconf version 2.13"
      exit 0 ;;
  
    -with-* | --with-*)
***************
*** 435,445 ****
  done
  
  # NLS nuisances.
! # Only set LANG and LC_ALL to C if already set.
! # These must not be set unconditionally because not all systems understand
! # e.g. LANG=C (notably SCO).
! if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
  if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
  
  # confdefs.h avoids OS command line length limits that DEFS can exceed.
  rm -rf conftest* confdefs.h
--- 438,451 ----
  done
  
  # NLS nuisances.
! # Only set these to C if already set.  These must not be set unconditionally
! # because not all systems understand e.g. LANG=C (notably SCO).
! # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
! # Non-C LC_CTYPE values break the ctype check.
  if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
+ if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
+ if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
+ if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
  
  # confdefs.h avoids OS command line length limits that DEFS can exceed.
  rm -rf conftest* confdefs.h
***************
*** 500,507 ****
  # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  ac_cpp='$CPP $CPPFLAGS'
  ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
! ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  
  if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
    # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
    if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
--- 506,516 ----
  # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  ac_cpp='$CPP $CPPFLAGS'
  ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
! ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
! cross_compiling=$ac_cv_prog_cc_cross
  
+ ac_exeext=
+ ac_objext=o
  if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
    # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
    if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
***************
*** 529,542 ****
  # Extract the first word of "gcc", so it can be a program name with args.
  set dummy gcc; ac_word=$2
  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    if test -n "$CC"; then
    ac_cv_prog_CC="$CC" # Let the user override the test.
  else
!   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
!   for ac_dir in $PATH; do
      test -z "$ac_dir" && ac_dir=.
      if test -f $ac_dir/$ac_word; then
        ac_cv_prog_CC="gcc"
--- 538,553 ----
  # Extract the first word of "gcc", so it can be a program name with args.
  set dummy gcc; ac_word=$2
  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+ echo "configure:542: checking for $ac_word" >&5
  if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    if test -n "$CC"; then
    ac_cv_prog_CC="$CC" # Let the user override the test.
  else
!   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
!   ac_dummy="$PATH"
!   for ac_dir in $ac_dummy; do
      test -z "$ac_dir" && ac_dir=.
      if test -f $ac_dir/$ac_word; then
        ac_cv_prog_CC="gcc"
***************
*** 557,571 ****
    # Extract the first word of "cc", so it can be a program name with args.
  set dummy cc; ac_word=$2
  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    if test -n "$CC"; then
    ac_cv_prog_CC="$CC" # Let the user override the test.
  else
!   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
    ac_prog_rejected=no
!   for ac_dir in $PATH; do
      test -z "$ac_dir" && ac_dir=.
      if test -f $ac_dir/$ac_word; then
        if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
--- 568,584 ----
    # Extract the first word of "cc", so it can be a program name with args.
  set dummy cc; ac_word=$2
  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+ echo "configure:572: checking for $ac_word" >&5
  if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    if test -n "$CC"; then
    ac_cv_prog_CC="$CC" # Let the user override the test.
  else
!   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
    ac_prog_rejected=no
!   ac_dummy="$PATH"
!   for ac_dir in $ac_dummy; do
      test -z "$ac_dir" && ac_dir=.
      if test -f $ac_dir/$ac_word; then
        if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
***************
*** 600,609 ****
--- 613,704 ----
    echo "$ac_t""no" 1>&6
  fi
  
+   if test -z "$CC"; then
+     case "`uname -s`" in
+     *win32* | *WIN32*)
+       # Extract the first word of "cl", so it can be a program name with args.
+ set dummy cl; ac_word=$2
+ echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+ echo "configure:623: checking for $ac_word" >&5
+ if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   if test -n "$CC"; then
+   ac_cv_prog_CC="$CC" # Let the user override the test.
+ else
+   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
+   ac_dummy="$PATH"
+   for ac_dir in $ac_dummy; do
+     test -z "$ac_dir" && ac_dir=.
+     if test -f $ac_dir/$ac_word; then
+       ac_cv_prog_CC="cl"
+       break
+     fi
+   done
+   IFS="$ac_save_ifs"
+ fi
+ fi
+ CC="$ac_cv_prog_CC"
+ if test -n "$CC"; then
+   echo "$ac_t""$CC" 1>&6
+ else
+   echo "$ac_t""no" 1>&6
+ fi
+  ;;
+     esac
+   fi
    test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
  fi
  
+ echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
+ echo "configure:655: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+ 
+ ac_ext=c
+ # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ ac_cpp='$CPP $CPPFLAGS'
+ ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+ cross_compiling=$ac_cv_prog_cc_cross
+ 
+ cat > conftest.$ac_ext << EOF
+ 
+ #line 666 "configure"
+ #include "confdefs.h"
+ 
+ main(){return(0);}
+ EOF
+ if { (eval echo configure:671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+   ac_cv_prog_cc_works=yes
+   # If we can't run a trivial program, we are probably using a cross compiler.
+   if (./conftest; exit) 2>/dev/null; then
+     ac_cv_prog_cc_cross=no
+   else
+     ac_cv_prog_cc_cross=yes
+   fi
+ else
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
+   ac_cv_prog_cc_works=no
+ fi
+ rm -fr conftest*
+ ac_ext=c
+ # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ ac_cpp='$CPP $CPPFLAGS'
+ ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+ cross_compiling=$ac_cv_prog_cc_cross
+ 
+ echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
+ if test $ac_cv_prog_cc_works = no; then
+   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
+ fi
+ echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
+ echo "configure:697: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+ echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
+ cross_compiling=$ac_cv_prog_cc_cross
+ 
  echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
+ echo "configure:702: checking whether we are using GNU C" >&5
  if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
***************
*** 612,618 ****
    yes;
  #endif
  EOF
! if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:616: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
    ac_cv_prog_gcc=yes
  else
    ac_cv_prog_gcc=no
--- 707,713 ----
    yes;
  #endif
  EOF
! if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:711: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
    ac_cv_prog_gcc=yes
  else
    ac_cv_prog_gcc=no
***************
*** 620,667 ****
  fi
  
  echo "$ac_t""$ac_cv_prog_gcc" 1>&6
  if test $ac_cv_prog_gcc = yes; then
    GCC=yes
!   if test "${CFLAGS+set}" != set; then
!     echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
! if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    echo 'void f(){}' > conftest.c
  if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
!   ac_cv_prog_gcc_g=yes
  else
!   ac_cv_prog_gcc_g=no
  fi
  rm -f conftest*
  
  fi
  
! echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6
!     if test $ac_cv_prog_gcc_g = yes; then
!       CFLAGS="-g -O"
!     else
!       CFLAGS="-O"
!     fi
    fi
  else
!   GCC=
!   test "${CFLAGS+set}" = set || CFLAGS="-g"
  fi
  
! for ac_prog in $CCC c++ g++ gcc CC cxx
  do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
  set dummy $ac_prog; ac_word=$2
  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    if test -n "$CXX"; then
    ac_cv_prog_CXX="$CXX" # Let the user override the test.
  else
!   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
!   for ac_dir in $PATH; do
      test -z "$ac_dir" && ac_dir=.
      if test -f $ac_dir/$ac_word; then
        ac_cv_prog_CXX="$ac_prog"
--- 715,777 ----
  fi
  
  echo "$ac_t""$ac_cv_prog_gcc" 1>&6
+ 
  if test $ac_cv_prog_gcc = yes; then
    GCC=yes
! else
!   GCC=
! fi
! 
! ac_test_CFLAGS="${CFLAGS+set}"
! ac_save_CFLAGS="$CFLAGS"
! CFLAGS=
! echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
! echo "configure:730: checking whether ${CC-cc} accepts -g" >&5
! if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    echo 'void f(){}' > conftest.c
  if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
!   ac_cv_prog_cc_g=yes
  else
!   ac_cv_prog_cc_g=no
  fi
  rm -f conftest*
  
  fi
  
! echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
! if test "$ac_test_CFLAGS" = set; then
!   CFLAGS="$ac_save_CFLAGS"
! elif test $ac_cv_prog_cc_g = yes; then
!   if test "$GCC" = yes; then
!     CFLAGS="-g -O2"
!   else
!     CFLAGS="-g"
    fi
  else
!   if test "$GCC" = yes; then
!     CFLAGS="-O2"
!   else
!     CFLAGS=
!   fi
  fi
  
! for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
  do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
  set dummy $ac_prog; ac_word=$2
  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+ echo "configure:766: checking for $ac_word" >&5
  if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    if test -n "$CXX"; then
    ac_cv_prog_CXX="$CXX" # Let the user override the test.
  else
!   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
!   ac_dummy="$PATH"
!   for ac_dir in $ac_dummy; do
      test -z "$ac_dir" && ac_dir=.
      if test -f $ac_dir/$ac_word; then
        ac_cv_prog_CXX="$ac_prog"
***************
*** 683,689 ****
--- 793,847 ----
  test -n "$CXX" || CXX="gcc"
  
  
+ echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
+ echo "configure:798: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
+ 
+ ac_ext=C
+ # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ ac_cpp='$CXXCPP $CPPFLAGS'
+ ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+ cross_compiling=$ac_cv_prog_cxx_cross
+ 
+ cat > conftest.$ac_ext << EOF
+ 
+ #line 809 "configure"
+ #include "confdefs.h"
+ 
+ int main(){return(0);}
+ EOF
+ if { (eval echo configure:814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+   ac_cv_prog_cxx_works=yes
+   # If we can't run a trivial program, we are probably using a cross compiler.
+   if (./conftest; exit) 2>/dev/null; then
+     ac_cv_prog_cxx_cross=no
+   else
+     ac_cv_prog_cxx_cross=yes
+   fi
+ else
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
+   ac_cv_prog_cxx_works=no
+ fi
+ rm -fr conftest*
+ ac_ext=c
+ # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ ac_cpp='$CPP $CPPFLAGS'
+ ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+ cross_compiling=$ac_cv_prog_cc_cross
+ 
+ echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
+ if test $ac_cv_prog_cxx_works = no; then
+   { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
+ fi
+ echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
+ echo "configure:840: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
+ echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
+ cross_compiling=$ac_cv_prog_cxx_cross
+ 
  echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
+ echo "configure:845: checking whether we are using GNU C++" >&5
  if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
***************
*** 692,698 ****
    yes;
  #endif
  EOF
! if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:696: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
    ac_cv_prog_gxx=yes
  else
    ac_cv_prog_gxx=no
--- 850,856 ----
    yes;
  #endif
  EOF
! if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:854: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
    ac_cv_prog_gxx=yes
  else
    ac_cv_prog_gxx=no
***************
*** 700,778 ****
  fi
  
  echo "$ac_t""$ac_cv_prog_gxx" 1>&6
  if test $ac_cv_prog_gxx = yes; then
    GXX=yes
!   if test "${CXXFLAGS+set}" != set; then
!     echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
! if eval "test \"`echo '$''{'ac_cv_prog_gxx_g'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    echo 'void f(){}' > conftest.cc
  if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
!   ac_cv_prog_gxx_g=yes
  else
!   ac_cv_prog_gxx_g=no
  fi
  rm -f conftest*
  
  fi
  
! echo "$ac_t""$ac_cv_prog_gxx_g" 1>&6
!     if test $ac_cv_prog_gxx_g = yes; then
!       CXXFLAGS="-g -O"
!     else
!       CXXFLAGS="-O"
!     fi
    fi
  else
!   GXX=
!   test "${CXXFLAGS+set}" = set || CXXFLAGS="-g"
  fi
  
  echo $ac_n "checking compiler availability and simple error detection""... $ac_c" 1>&6
  cat > conftest.$ac_ext <<EOF
! #line 735 "configure"
  #include "confdefs.h"
  
! int main() { return 0; }
! int t() {
   exit(0); 
  ; return 0; }
  EOF
! if { (eval echo configure:743: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    
      cat > conftest.$ac_ext <<EOF
! #line 747 "configure"
  #include "confdefs.h"
  
! int main() { return 0; }
! int t() {
   syntax errors galore! 
  ; return 0; }
  EOF
! if { (eval echo configure:755: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
        { echo "configure: error: Can't detect syntax errors!  Is CC set right?" 1>&2; exit 1; }
  else
    rm -rf conftest*
        true
  fi
  rm -f conftest*
- 
  else
    rm -rf conftest*
      { echo "configure: error: Can't compile test program!  Is CC set right?" 1>&2; exit 1; }
  fi
  rm -f conftest*
  
- 
  cat > conftest.$ac_ext <<EOF
! #line 772 "configure"
  #include "confdefs.h"
  
! int main() { return 0; }
! int t() {
  
    typedef int Integer;
    extern int i;
--- 858,949 ----
  fi
  
  echo "$ac_t""$ac_cv_prog_gxx" 1>&6
+ 
  if test $ac_cv_prog_gxx = yes; then
    GXX=yes
! else
!   GXX=
! fi
! 
! ac_test_CXXFLAGS="${CXXFLAGS+set}"
! ac_save_CXXFLAGS="$CXXFLAGS"
! CXXFLAGS=
! echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
! echo "configure:873: checking whether ${CXX-g++} accepts -g" >&5
! if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    echo 'void f(){}' > conftest.cc
  if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
!   ac_cv_prog_cxx_g=yes
  else
!   ac_cv_prog_cxx_g=no
  fi
  rm -f conftest*
  
  fi
  
! echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
! if test "$ac_test_CXXFLAGS" = set; then
!   CXXFLAGS="$ac_save_CXXFLAGS"
! elif test $ac_cv_prog_cxx_g = yes; then
!   if test "$GXX" = yes; then
!     CXXFLAGS="-g -O2"
!   else
!     CXXFLAGS="-g"
    fi
  else
!   if test "$GXX" = yes; then
!     CXXFLAGS="-O2"
!   else
!     CXXFLAGS=
!   fi
  fi
  
  echo $ac_n "checking compiler availability and simple error detection""... $ac_c" 1>&6
+ echo "configure:905: checking compiler availability and simple error detection" >&5
  cat > conftest.$ac_ext <<EOF
! #line 907 "configure"
  #include "confdefs.h"
  
! int main() {
   exit(0); 
  ; return 0; }
  EOF
! if { (eval echo configure:914: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    
      cat > conftest.$ac_ext <<EOF
! #line 918 "configure"
  #include "confdefs.h"
  
! int main() {
   syntax errors galore! 
  ; return 0; }
  EOF
! if { (eval echo configure:925: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
        { echo "configure: error: Can't detect syntax errors!  Is CC set right?" 1>&2; exit 1; }
  else
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
    rm -rf conftest*
        true
  fi
  rm -f conftest*
  else
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
    rm -rf conftest*
      { echo "configure: error: Can't compile test program!  Is CC set right?" 1>&2; exit 1; }
  fi
  rm -f conftest*
  
  cat > conftest.$ac_ext <<EOF
! #line 944 "configure"
  #include "confdefs.h"
  
! int main() {
  
    typedef int Integer;
    extern int i;
***************
*** 780,799 ****
  
  ; return 0; }
  EOF
! if { (eval echo configure:784: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    :
  else
    rm -rf conftest*
    { echo "configure: error: Can't redeclare variables with this compiler??" 1>&2; exit 1; }
  fi
  rm -f conftest*
- 
  cat > conftest.$ac_ext <<EOF
! #line 793 "configure"
  #include "confdefs.h"
  
! int main() { return 0; }
! int t() {
  
    typedef long Long;
    extern int i;
--- 951,970 ----
  
  ; return 0; }
  EOF
! if { (eval echo configure:955: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    :
  else
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
    rm -rf conftest*
    { echo "configure: error: Can't redeclare variables with this compiler??" 1>&2; exit 1; }
  fi
  rm -f conftest*
  cat > conftest.$ac_ext <<EOF
! #line 965 "configure"
  #include "confdefs.h"
  
! int main() {
  
    typedef long Long;
    extern int i;
***************
*** 801,812 ****
  
  ; return 0; }
  EOF
! if { (eval echo configure:805: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    { echo "configure: error: Compiler doesn't detect conflicting declarations." 1>&2; exit 1; }
  fi
  rm -f conftest*
- 
  echo "$ac_t""ok" 1>&6
  
  if test $ac_cv_prog_gcc = yes ; then
--- 972,985 ----
  
  ; return 0; }
  EOF
! if { (eval echo configure:976: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    { echo "configure: error: Compiler doesn't detect conflicting declarations." 1>&2; exit 1; }
+ else
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
  fi
  rm -f conftest*
  echo "$ac_t""ok" 1>&6
  
  if test $ac_cv_prog_gcc = yes ; then
***************
*** 814,819 ****
--- 987,993 ----
  fi
  
  echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
+ echo "configure:991: checking how to run the C preprocessor" >&5
  # On Suns, sometimes $CPP names a directory.
  if test -n "$CPP" && test -d "$CPP"; then
    CPP=
***************
*** 828,866 ****
    # On the NeXT, cc -E runs the code through the compiler's parser,
    # not just through cpp.
    cat > conftest.$ac_ext <<EOF
! #line 832 "configure"
  #include "confdefs.h"
  #include <assert.h>
  Syntax Error
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:838: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
! ac_err=`grep -v '^ *+' conftest.out`
  if test -z "$ac_err"; then
    :
  else
    echo "$ac_err" >&5
    rm -rf conftest*
    CPP="${CC-cc} -E -traditional-cpp"
    cat > conftest.$ac_ext <<EOF
! #line 847 "configure"
  #include "confdefs.h"
  #include <assert.h>
  Syntax Error
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:853: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
! ac_err=`grep -v '^ *+' conftest.out`
  if test -z "$ac_err"; then
    :
  else
    echo "$ac_err" >&5
    rm -rf conftest*
    CPP=/lib/cpp
  fi
  rm -f conftest*
  fi
  rm -f conftest*
    ac_cv_prog_CPP="$CPP"
  fi
    CPP="$ac_cv_prog_CPP"
--- 1002,1063 ----
    # On the NeXT, cc -E runs the code through the compiler's parser,
    # not just through cpp.
    cat > conftest.$ac_ext <<EOF
! #line 1006 "configure"
  #include "confdefs.h"
  #include <assert.h>
  Syntax Error
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1012: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
! ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  if test -z "$ac_err"; then
    :
  else
    echo "$ac_err" >&5
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
    rm -rf conftest*
    CPP="${CC-cc} -E -traditional-cpp"
    cat > conftest.$ac_ext <<EOF
! #line 1023 "configure"
  #include "confdefs.h"
  #include <assert.h>
  Syntax Error
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1029: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
! ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  if test -z "$ac_err"; then
    :
  else
    echo "$ac_err" >&5
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
+   rm -rf conftest*
+   CPP="${CC-cc} -nologo -E"
+   cat > conftest.$ac_ext <<EOF
+ #line 1040 "configure"
+ #include "confdefs.h"
+ #include <assert.h>
+ Syntax Error
+ EOF
+ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+ { (eval echo configure:1046: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+ if test -z "$ac_err"; then
+   :
+ else
+   echo "$ac_err" >&5
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
    rm -rf conftest*
    CPP=/lib/cpp
  fi
  rm -f conftest*
  fi
  rm -f conftest*
+ fi
+ rm -f conftest*
    ac_cv_prog_CPP="$CPP"
  fi
    CPP="$ac_cv_prog_CPP"
***************
*** 873,886 ****
  # Extract the first word of "ranlib", so it can be a program name with args.
  set dummy ranlib; ac_word=$2
  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    if test -n "$RANLIB"; then
    ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
  else
!   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
!   for ac_dir in $PATH; do
      test -z "$ac_dir" && ac_dir=.
      if test -f $ac_dir/$ac_word; then
        ac_cv_prog_RANLIB="ranlib"
--- 1070,1085 ----
  # Extract the first word of "ranlib", so it can be a program name with args.
  set dummy ranlib; ac_word=$2
  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+ echo "configure:1074: checking for $ac_word" >&5
  if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    if test -n "$RANLIB"; then
    ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
  else
!   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
!   ac_dummy="$PATH"
!   for ac_dir in $ac_dummy; do
      test -z "$ac_dir" && ac_dir=.
      if test -f $ac_dir/$ac_word; then
        ac_cv_prog_RANLIB="ranlib"
***************
*** 943,973 ****
  
  
  # Make sure we can run config.sub.
! if $ac_config_sub sun4 >/dev/null 2>&1; then :
  else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
  fi
  
  echo $ac_n "checking host system type""... $ac_c" 1>&6
  
  host_alias=$host
  case "$host_alias" in
  NONE)
    case $nonopt in
    NONE)
!     if host_alias=`$ac_config_guess`; then :
      else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
      fi ;;
    *) host_alias=$nonopt ;;
    esac ;;
  esac
  
! host=`$ac_config_sub $host_alias`
! host_cpu=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
! host_vendor=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
! host_os=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
  echo "$ac_t""$host" 1>&6
  
  echo $ac_n "checking target system type""... $ac_c" 1>&6
  
  target_alias=$target
  case "$target_alias" in
--- 1142,1174 ----
  
  
  # Make sure we can run config.sub.
! if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
  else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
  fi
  
  echo $ac_n "checking host system type""... $ac_c" 1>&6
+ echo "configure:1151: checking host system type" >&5
  
  host_alias=$host
  case "$host_alias" in
  NONE)
    case $nonopt in
    NONE)
!     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
      else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
      fi ;;
    *) host_alias=$nonopt ;;
    esac ;;
  esac
  
! host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
! host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
! host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
! host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
  echo "$ac_t""$host" 1>&6
  
  echo $ac_n "checking target system type""... $ac_c" 1>&6
+ echo "configure:1172: checking target system type" >&5
  
  target_alias=$target
  case "$target_alias" in
***************
*** 978,990 ****
    esac ;;
  esac
  
! target=`$ac_config_sub $target_alias`
! target_cpu=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
! target_vendor=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
! target_os=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
  echo "$ac_t""$target" 1>&6
  
  echo $ac_n "checking build system type""... $ac_c" 1>&6
  
  build_alias=$build
  case "$build_alias" in
--- 1179,1192 ----
    esac ;;
  esac
  
! target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
! target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
! target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
! target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
  echo "$ac_t""$target" 1>&6
  
  echo $ac_n "checking build system type""... $ac_c" 1>&6
+ echo "configure:1190: checking build system type" >&5
  
  build_alias=$build
  case "$build_alias" in
***************
*** 995,1004 ****
    esac ;;
  esac
  
! build=`$ac_config_sub $build_alias`
! build_cpu=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
! build_vendor=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
! build_os=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
  echo "$ac_t""$build" 1>&6
  
  test "$host_alias" != "$target_alias" &&
--- 1197,1206 ----
    esac ;;
  esac
  
! build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
! build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
! build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
! build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
  echo "$ac_t""$build" 1>&6
  
  test "$host_alias" != "$target_alias" &&
***************
*** 1149,1155 ****
  	name=i386-netbsd-1.3
  	sysincludes=netbsd-1.1
  	except="fork lseek ftruncate pipe fstat"
! 	available_syscalls="sigsuspend sigprocmask sigaction"
  		;;
      i386-*-netbsd1.3*)
          name=i386-netbsd-1.3
--- 1351,1357 ----
  	name=i386-netbsd-1.3
  	sysincludes=netbsd-1.1
  	except="fork lseek ftruncate pipe fstat"
! 	available_syscalls="sigsuspend sigaction sigprocmask"
  		;;
      i386-*-netbsd1.3*)
          name=i386-netbsd-1.3
***************
*** 1177,1182 ****
--- 1379,1390 ----
  	except="lseek ftruncate pipe fstat"
  	available_syscalls="sigsuspend sigprocmask"
  	;;
+     powerpc-*-netbsd*)
+ 	name=powerpc-netbsd
+ 	sysincludes=netbsd-1.1
+ 	except="lseek ftruncate pipe fstat fork"
+ 	available_syscalls="sigsuspend sigprocmask"
+ 	;;
      m68*-*-netbsd1.3*)
  	name=m68000-netbsd
  	sysincludes=netbsd-1.1
***************
*** 1216,1239 ****
  
  for ac_hdr in sys/termio.h termios.h termio.h
  do
! ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1174 "configure"
  #include "confdefs.h"
  #include <$ac_hdr>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1179: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
! ac_err=`grep -v '^ *+' conftest.out`
  if test -z "$ac_err"; then
    rm -rf conftest*
    eval "ac_cv_header_$ac_safe=yes"
  else
    echo "$ac_err" >&5
    rm -rf conftest*
    eval "ac_cv_header_$ac_safe=no"
  fi
--- 1424,1450 ----
  
  for ac_hdr in sys/termio.h termios.h termio.h
  do
! ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+ echo "configure:1430: checking for $ac_hdr" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1435 "configure"
  #include "confdefs.h"
  #include <$ac_hdr>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1440: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
! ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  if test -z "$ac_err"; then
    rm -rf conftest*
    eval "ac_cv_header_$ac_safe=yes"
  else
    echo "$ac_err" >&5
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
    rm -rf conftest*
    eval "ac_cv_header_$ac_safe=no"
  fi
***************
*** 1241,1247 ****
  fi
  if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
    echo "$ac_t""yes" 1>&6
!     ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
    cat >> confdefs.h <<EOF
  #define $ac_tr_hdr 1
  EOF
--- 1452,1458 ----
  fi
  if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
    echo "$ac_t""yes" 1>&6
!     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
    cat >> confdefs.h <<EOF
  #define $ac_tr_hdr 1
  EOF
***************
*** 1252,1275 ****
  done
  
  
! ac_safe=`echo "va_list.h" | tr './\055' '___'`
  echo $ac_n "checking for va_list.h""... $ac_c" 1>&6
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1210 "configure"
  #include "confdefs.h"
  #include <va_list.h>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1215: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
! ac_err=`grep -v '^ *+' conftest.out`
  if test -z "$ac_err"; then
    rm -rf conftest*
    eval "ac_cv_header_$ac_safe=yes"
  else
    echo "$ac_err" >&5
    rm -rf conftest*
    eval "ac_cv_header_$ac_safe=no"
  fi
--- 1463,1489 ----
  done
  
  
! ac_safe=`echo "va_list.h" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for va_list.h""... $ac_c" 1>&6
+ echo "configure:1469: checking for va_list.h" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1474 "configure"
  #include "confdefs.h"
  #include <va_list.h>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1479: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
! ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  if test -z "$ac_err"; then
    rm -rf conftest*
    eval "ac_cv_header_$ac_safe=yes"
  else
    echo "$ac_err" >&5
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
    rm -rf conftest*
    eval "ac_cv_header_$ac_safe=no"
  fi
***************
*** 1288,1311 ****
  
  for ac_hdr in syscall.h sys/syscall.h
  do
! ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1246 "configure"
  #include "confdefs.h"
  #include <$ac_hdr>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1251: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
! ac_err=`grep -v '^ *+' conftest.out`
  if test -z "$ac_err"; then
    rm -rf conftest*
    eval "ac_cv_header_$ac_safe=yes"
  else
    echo "$ac_err" >&5
    rm -rf conftest*
    eval "ac_cv_header_$ac_safe=no"
  fi
--- 1502,1528 ----
  
  for ac_hdr in syscall.h sys/syscall.h
  do
! ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+ echo "configure:1508: checking for $ac_hdr" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1513 "configure"
  #include "confdefs.h"
  #include <$ac_hdr>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1518: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
! ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  if test -z "$ac_err"; then
    rm -rf conftest*
    eval "ac_cv_header_$ac_safe=yes"
  else
    echo "$ac_err" >&5
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
    rm -rf conftest*
    eval "ac_cv_header_$ac_safe=no"
  fi
***************
*** 1313,1319 ****
  fi
  if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
    echo "$ac_t""yes" 1>&6
!     ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
    cat >> confdefs.h <<EOF
  #define $ac_tr_hdr 1
  EOF
--- 1530,1536 ----
  fi
  if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
    echo "$ac_t""yes" 1>&6
!     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
    cat >> confdefs.h <<EOF
  #define $ac_tr_hdr 1
  EOF
***************
*** 1343,1353 ****
  	getpgrp fork"
  for pthreads_syscallname in $pthreads_syscall_list ; do
    echo $ac_n "checking for syscall $pthreads_syscallname""... $ac_c" 1>&6
  if eval "test \"`echo '$''{'pthreads_cv_syscall_$pthreads_syscallname'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1299 "configure"
  #include "confdefs.h"
  
  /* FIXME: This list should be generated from info in configure.in.  */
--- 1560,1571 ----
  	getpgrp fork"
  for pthreads_syscallname in $pthreads_syscall_list ; do
    echo $ac_n "checking for syscall $pthreads_syscallname""... $ac_c" 1>&6
+ echo "configure:1564: checking for syscall $pthreads_syscallname" >&5
  if eval "test \"`echo '$''{'pthreads_cv_syscall_$pthreads_syscallname'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1569 "configure"
  #include "confdefs.h"
  
  /* FIXME: This list should be generated from info in configure.in.  */
***************
*** 1361,1383 ****
  #endif
  #endif
  
! int main() { return 0; }
! int t() {
  
  int x;
  x = SYS_$pthreads_syscallname ;
  
  ; return 0; }
  EOF
! if { (eval echo configure:1321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
    rm -rf conftest*
    eval pthreads_cv_syscall_$pthreads_syscallname=yes
  else
    rm -rf conftest*
    eval pthreads_cv_syscall_$pthreads_syscallname=no
  fi
  rm -f conftest*
- 
  fi
  
  if eval test \$pthreads_cv_syscall_$pthreads_syscallname = yes ; then
--- 1579,1601 ----
  #endif
  #endif
  
! int main() {
  
  int x;
  x = SYS_$pthreads_syscallname ;
  
  ; return 0; }
  EOF
! if { (eval echo configure:1590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval pthreads_cv_syscall_$pthreads_syscallname=yes
  else
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
    rm -rf conftest*
    eval pthreads_cv_syscall_$pthreads_syscallname=no
  fi
  rm -f conftest*
  fi
  
  if eval test \$pthreads_cv_syscall_$pthreads_syscallname = yes ; then
***************
*** 1402,1439 ****
  
  
  ## Determine some typedef values from the system header files.
- # If we cannot run a trivial program, we must be cross compiling.
- echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6
- if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then
-   echo $ac_n "(cached) $ac_c" 1>&6
- else
-   if test "$cross_compiling" = yes; then
-   ac_cv_c_cross=yes
- else
- cat > conftest.$ac_ext <<EOF
- #line 1363 "configure"
- #include "confdefs.h"
- main(){return(0);}
- EOF
- { (eval echo configure:1367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
- if test -s conftest && (./conftest; exit) 2>/dev/null; then
-   ac_cv_c_cross=no
- else
-   ac_cv_c_cross=yes
- fi
- fi
- rm -fr conftest*
- fi
- 
- echo "$ac_t""$ac_cv_c_cross" 1>&6
- cross_compiling=$ac_cv_c_cross
- 
  echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
  if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1385 "configure"
  #include "confdefs.h"
  #include <stdlib.h>
  #include <stdarg.h>
--- 1620,1632 ----
  
  
  ## Determine some typedef values from the system header files.
  echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
+ echo "configure:1625: checking for ANSI C header files" >&5
  if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1630 "configure"
  #include "confdefs.h"
  #include <stdlib.h>
  #include <stdarg.h>
***************
*** 1441,1453 ****
  #include <float.h>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1393: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
! ac_err=`grep -v '^ *+' conftest.out`
  if test -z "$ac_err"; then
    rm -rf conftest*
    ac_cv_header_stdc=yes
  else
    echo "$ac_err" >&5
    rm -rf conftest*
    ac_cv_header_stdc=no
  fi
--- 1634,1648 ----
  #include <float.h>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1638: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
! ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  if test -z "$ac_err"; then
    rm -rf conftest*
    ac_cv_header_stdc=yes
  else
    echo "$ac_err" >&5
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
    rm -rf conftest*
    ac_cv_header_stdc=no
  fi
***************
*** 1456,1462 ****
  if test $ac_cv_header_stdc = yes; then
    # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  cat > conftest.$ac_ext <<EOF
! #line 1408 "configure"
  #include "confdefs.h"
  #include <string.h>
  EOF
--- 1651,1657 ----
  if test $ac_cv_header_stdc = yes; then
    # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  cat > conftest.$ac_ext <<EOF
! #line 1655 "configure"
  #include "confdefs.h"
  #include <string.h>
  EOF
***************
*** 1474,1480 ****
  if test $ac_cv_header_stdc = yes; then
    # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
  cat > conftest.$ac_ext <<EOF
! #line 1426 "configure"
  #include "confdefs.h"
  #include <stdlib.h>
  EOF
--- 1669,1675 ----
  if test $ac_cv_header_stdc = yes; then
    # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
  cat > conftest.$ac_ext <<EOF
! #line 1673 "configure"
  #include "confdefs.h"
  #include <stdlib.h>
  EOF
***************
*** 1494,1501 ****
  if test "$cross_compiling" = yes; then
    :
  else
! cat > conftest.$ac_ext <<EOF
! #line 1447 "configure"
  #include "confdefs.h"
  #include <ctype.h>
  #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
--- 1689,1696 ----
  if test "$cross_compiling" = yes; then
    :
  else
!   cat > conftest.$ac_ext <<EOF
! #line 1694 "configure"
  #include "confdefs.h"
  #include <ctype.h>
  #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
***************
*** 1506,1520 ****
  exit (0); }
  
  EOF
! { (eval echo configure:1458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
! if test -s conftest && (./conftest; exit) 2>/dev/null; then
    :
  else
    ac_cv_header_stdc=no
  fi
- fi
  rm -fr conftest*
  fi
  fi
  
  echo "$ac_t""$ac_cv_header_stdc" 1>&6
--- 1701,1719 ----
  exit (0); }
  
  EOF
! if { (eval echo configure:1705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
! then
    :
  else
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
+   rm -fr conftest*
    ac_cv_header_stdc=no
  fi
  rm -fr conftest*
  fi
+ 
+ fi
  fi
  
  echo "$ac_t""$ac_cv_header_stdc" 1>&6
***************
*** 1526,1544 ****
  fi
  
  echo $ac_n "checking for off_t""... $ac_c" 1>&6
  if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1482 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #if STDC_HEADERS
  #include <stdlib.h>
  #endif
  EOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
!   egrep "off_t" >/dev/null 2>&1; then
    rm -rf conftest*
    ac_cv_type_off_t=yes
  else
--- 1725,1745 ----
  fi
  
  echo $ac_n "checking for off_t""... $ac_c" 1>&6
+ echo "configure:1729: checking for off_t" >&5
  if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1734 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #if STDC_HEADERS
  #include <stdlib.h>
+ #include <stddef.h>
  #endif
  EOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
!   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
    rm -rf conftest*
    ac_cv_type_off_t=yes
  else
***************
*** 1557,1575 ****
  fi
  
  echo $ac_n "checking for size_t""... $ac_c" 1>&6
  if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1513 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #if STDC_HEADERS
  #include <stdlib.h>
  #endif
  EOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
!   egrep "size_t" >/dev/null 2>&1; then
    rm -rf conftest*
    ac_cv_type_size_t=yes
  else
--- 1758,1778 ----
  fi
  
  echo $ac_n "checking for size_t""... $ac_c" 1>&6
+ echo "configure:1762: checking for size_t" >&5
  if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1767 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #if STDC_HEADERS
  #include <stdlib.h>
+ #include <stddef.h>
  #endif
  EOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
!   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
    rm -rf conftest*
    ac_cv_type_size_t=yes
  else
***************
*** 1588,1606 ****
  fi
  
  echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
  if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1544 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #if STDC_HEADERS
  #include <stdlib.h>
  #endif
  EOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
!   egrep "ssize_t" >/dev/null 2>&1; then
    rm -rf conftest*
    ac_cv_type_ssize_t=yes
  else
--- 1791,1811 ----
  fi
  
  echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
+ echo "configure:1795: checking for ssize_t" >&5
  if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1800 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #if STDC_HEADERS
  #include <stdlib.h>
+ #include <stddef.h>
  #endif
  EOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
!   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
    rm -rf conftest*
    ac_cv_type_ssize_t=yes
  else
***************
*** 1619,1637 ****
  fi
  
  echo $ac_n "checking for time_t""... $ac_c" 1>&6
  if eval "test \"`echo '$''{'ac_cv_type_time_t'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1575 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #if STDC_HEADERS
  #include <stdlib.h>
  #endif
  EOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
!   egrep "time_t" >/dev/null 2>&1; then
    rm -rf conftest*
    ac_cv_type_time_t=yes
  else
--- 1824,1844 ----
  fi
  
  echo $ac_n "checking for time_t""... $ac_c" 1>&6
+ echo "configure:1828: checking for time_t" >&5
  if eval "test \"`echo '$''{'ac_cv_type_time_t'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1833 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #if STDC_HEADERS
  #include <stdlib.h>
+ #include <stddef.h>
  #endif
  EOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
!   egrep "(^|[^a-zA-Z_0-9])time_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
    rm -rf conftest*
    ac_cv_type_time_t=yes
  else
***************
*** 1651,1674 ****
  
  for ac_hdr in sys/time.h
  do
! ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1609 "configure"
  #include "confdefs.h"
  #include <$ac_hdr>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1614: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
! ac_err=`grep -v '^ *+' conftest.out`
  if test -z "$ac_err"; then
    rm -rf conftest*
    eval "ac_cv_header_$ac_safe=yes"
  else
    echo "$ac_err" >&5
    rm -rf conftest*
    eval "ac_cv_header_$ac_safe=no"
  fi
--- 1858,1884 ----
  
  for ac_hdr in sys/time.h
  do
! ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+ echo "configure:1864: checking for $ac_hdr" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1869 "configure"
  #include "confdefs.h"
  #include <$ac_hdr>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1874: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
! ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  if test -z "$ac_err"; then
    rm -rf conftest*
    eval "ac_cv_header_$ac_safe=yes"
  else
    echo "$ac_err" >&5
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
    rm -rf conftest*
    eval "ac_cv_header_$ac_safe=no"
  fi
***************
*** 1676,1682 ****
  fi
  if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
    echo "$ac_t""yes" 1>&6
!     ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
    cat >> confdefs.h <<EOF
  #define $ac_tr_hdr 1
  EOF
--- 1886,1892 ----
  fi
  if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
    echo "$ac_t""yes" 1>&6
!     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
    cat >> confdefs.h <<EOF
  #define $ac_tr_hdr 1
  EOF
***************
*** 1687,1715 ****
  done
  
  echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
  if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1643 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #include <sys/time.h>
  #include <time.h>
! int main() { return 0; }
! int t() {
  struct tm *tp;
  ; return 0; }
  EOF
! if { (eval echo configure:1653: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    ac_cv_header_time=yes
  else
    rm -rf conftest*
    ac_cv_header_time=no
  fi
  rm -f conftest*
- 
  fi
  
  echo "$ac_t""$ac_cv_header_time" 1>&6
--- 1897,1926 ----
  done
  
  echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
+ echo "configure:1901: checking whether time.h and sys/time.h may both be included" >&5
  if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1906 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #include <sys/time.h>
  #include <time.h>
! int main() {
  struct tm *tp;
  ; return 0; }
  EOF
! if { (eval echo configure:1915: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    ac_cv_header_time=yes
  else
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
    rm -rf conftest*
    ac_cv_header_time=no
  fi
  rm -f conftest*
  fi
  
  echo "$ac_t""$ac_cv_header_time" 1>&6
***************
*** 1722,1748 ****
  
  
  echo $ac_n "checking for struct timespec in sys/time.h""... $ac_c" 1>&6
  if eval "test \"`echo '$''{'pthreads_cv_timespec_in_time'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1678 "configure"
  #include "confdefs.h"
  #include <sys/time.h>
! int main() { return 0; }
! int t() {
  struct timespec foo;
  ; return 0; }
  EOF
! if { (eval echo configure:1686: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    pthreads_cv_timespec_in_time=yes
  else
    rm -rf conftest*
    pthreads_cv_timespec_in_time=no
  fi
  rm -f conftest*
- 
  fi
  
  echo "$ac_t""$pthreads_cv_timespec_in_time" 1>&6
--- 1933,1960 ----
  
  
  echo $ac_n "checking for struct timespec in sys/time.h""... $ac_c" 1>&6
+ echo "configure:1937: checking for struct timespec in sys/time.h" >&5
  if eval "test \"`echo '$''{'pthreads_cv_timespec_in_time'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1942 "configure"
  #include "confdefs.h"
  #include <sys/time.h>
! int main() {
  struct timespec foo;
  ; return 0; }
  EOF
! if { (eval echo configure:1949: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    pthreads_cv_timespec_in_time=yes
  else
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
    rm -rf conftest*
    pthreads_cv_timespec_in_time=no
  fi
  rm -f conftest*
  fi
  
  echo "$ac_t""$pthreads_cv_timespec_in_time" 1>&6
***************
*** 1753,1781 ****
  
  fi
  
- echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
  if eval "test \"`echo '$''{'pthreads_cv_socklen_t'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1678 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #include <sys/socket.h>
! int main() { return 0; }
! int t() {
  socklen_t foo;
  ; return 0; }
  EOF
! if { (eval echo configure:1686: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    pthreads_cv_socklen_t=yes
  else
    rm -rf conftest*
    pthreads_cv_socklen_t=no
  fi
  rm -f conftest*
- 
  fi
  
  echo "$ac_t""$pthreads_cv_socklen_t" 1>&6
--- 1965,1992 ----
  
  fi
  
  if eval "test \"`echo '$''{'pthreads_cv_socklen_t'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1973 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #include <sys/socket.h>
! int main() {
  socklen_t foo;
  ; return 0; }
  EOF
! if { (eval echo configure:1981: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    pthreads_cv_socklen_t=yes
  else
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
    rm -rf conftest*
    pthreads_cv_socklen_t=no
  fi
  rm -f conftest*
  fi
  
  echo "$ac_t""$pthreads_cv_socklen_t" 1>&6
***************
*** 1789,1799 ****
  
  
  echo $ac_n "checking type of size_t""... $ac_c" 1>&6
  if eval "test \"`echo '$''{'pthreads_cv_type_size_t'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1712 "configure"
  #include "confdefs.h"
  
  #include <stddef.h>
--- 2000,2011 ----
  
  
  echo $ac_n "checking type of size_t""... $ac_c" 1>&6
+ echo "configure:2004: checking type of size_t" >&5
  if eval "test \"`echo '$''{'pthreads_cv_type_size_t'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2009 "configure"
  #include "confdefs.h"
  
  #include <stddef.h>
***************
*** 1802,1817 ****
  #include <stdlib.h>
  #endif
  
! int main() { return 0; }
! int t() {
   extern size_t foo; 
  ; return 0; }
  EOF
! if { (eval echo configure:1726: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
      for try_type in "int" "unsigned int" "long" "unsigned long" "short" "unsigned short" "char" "unsigned char" "long long" "unsigned long long" ; do
    cat > conftest.$ac_ext <<EOF
! #line 1730 "configure"
  #include "confdefs.h"
  
  #include <stddef.h>
--- 2014,2028 ----
  #include <stdlib.h>
  #endif
  
! int main() {
   extern size_t foo; 
  ; return 0; }
  EOF
! if { (eval echo configure:2022: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
      for try_type in "int" "unsigned int" "long" "unsigned long" "short" "unsigned short" "char" "unsigned char" "long long" "unsigned long long" ; do
    cat > conftest.$ac_ext <<EOF
! #line 2026 "configure"
  #include "confdefs.h"
  
  #include <stddef.h>
***************
*** 1820,1843 ****
  #include <stdlib.h>
  #endif
  
! int main() { return 0; }
! int t() {
   extern size_t foo; extern $try_type foo; 
  ; return 0; }
  EOF
! if { (eval echo configure:1744: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
     pthreads_cv_type_size_t="$try_type" ; break 
  fi
  rm -f conftest*
- 
    done
  else
    rm -rf conftest*
    { echo "configure: error: Can't find system typedef for size_t." 1>&2; exit 1; }
  fi
  rm -f conftest*
- 
  fi
  
  if test -n "$pthreads_cv_type_size_t" ; then
--- 2031,2056 ----
  #include <stdlib.h>
  #endif
  
! int main() {
   extern size_t foo; extern $try_type foo; 
  ; return 0; }
  EOF
! if { (eval echo configure:2039: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
     pthreads_cv_type_size_t="$try_type" ; break 
+ else
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
  fi
  rm -f conftest*
    done
  else
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
    rm -rf conftest*
    { echo "configure: error: Can't find system typedef for size_t." 1>&2; exit 1; }
  fi
  rm -f conftest*
  fi
  
  if test -n "$pthreads_cv_type_size_t" ; then
***************
*** 1850,1900 ****
  echo "$ac_t""$pthreads_cv_type_size_t" 1>&6
  
  echo $ac_n "checking type of ssize_t""... $ac_c" 1>&6
  if eval "test \"`echo '$''{'pthreads_cv_type_ssize_t'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1773 "configure"
  #include "confdefs.h"
  
  #include <stddef.h>
  #include <stdlib.h>
  #include <unistd.h>
  
! int main() { return 0; }
! int t() {
   extern ssize_t foo; 
  ; return 0; }
  EOF
! if { (eval echo configure:1785: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
      for try_type in "int" "unsigned int" "long" "unsigned long" "short" "unsigned short" "char" "unsigned char" "long long" "unsigned long long" ; do
    cat > conftest.$ac_ext <<EOF
! #line 1789 "configure"
  #include "confdefs.h"
  
  #include <stddef.h>
  #include <stdlib.h>
  #include <unistd.h>
  
! int main() { return 0; }
! int t() {
   extern ssize_t foo; extern $try_type foo; 
  ; return 0; }
  EOF
! if { (eval echo configure:1801: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
     pthreads_cv_type_ssize_t="$try_type" ; break 
  fi
  rm -f conftest*
- 
    done
  else
    rm -rf conftest*
    { echo "configure: error: Can't find system typedef for ssize_t." 1>&2; exit 1; }
  fi
  rm -f conftest*
- 
  fi
  
  if test -n "$pthreads_cv_type_ssize_t" ; then
--- 2063,2115 ----
  echo "$ac_t""$pthreads_cv_type_size_t" 1>&6
  
  echo $ac_n "checking type of ssize_t""... $ac_c" 1>&6
+ echo "configure:2067: checking type of ssize_t" >&5
  if eval "test \"`echo '$''{'pthreads_cv_type_ssize_t'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2072 "configure"
  #include "confdefs.h"
  
  #include <stddef.h>
  #include <stdlib.h>
  #include <unistd.h>
  
! int main() {
   extern ssize_t foo; 
  ; return 0; }
  EOF
! if { (eval echo configure:2083: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
      for try_type in "int" "unsigned int" "long" "unsigned long" "short" "unsigned short" "char" "unsigned char" "long long" "unsigned long long" ; do
    cat > conftest.$ac_ext <<EOF
! #line 2087 "configure"
  #include "confdefs.h"
  
  #include <stddef.h>
  #include <stdlib.h>
  #include <unistd.h>
  
! int main() {
   extern ssize_t foo; extern $try_type foo; 
  ; return 0; }
  EOF
! if { (eval echo configure:2098: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
     pthreads_cv_type_ssize_t="$try_type" ; break 
+ else
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
  fi
  rm -f conftest*
    done
  else
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
    rm -rf conftest*
    { echo "configure: error: Can't find system typedef for ssize_t." 1>&2; exit 1; }
  fi
  rm -f conftest*
  fi
  
  if test -n "$pthreads_cv_type_ssize_t" ; then
***************
*** 1907,1917 ****
  echo "$ac_t""$pthreads_cv_type_ssize_t" 1>&6
  
  echo $ac_n "checking type of clock_t""... $ac_c" 1>&6
  if eval "test \"`echo '$''{'pthreads_cv_type_clock_t'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1830 "configure"
  #include "confdefs.h"
  
  #include <stddef.h>
--- 2122,2133 ----
  echo "$ac_t""$pthreads_cv_type_ssize_t" 1>&6
  
  echo $ac_n "checking type of clock_t""... $ac_c" 1>&6
+ echo "configure:2126: checking type of clock_t" >&5
  if eval "test \"`echo '$''{'pthreads_cv_type_clock_t'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2131 "configure"
  #include "confdefs.h"
  
  #include <stddef.h>
***************
*** 1926,1941 ****
  # endif
  #endif
  
! int main() { return 0; }
! int t() {
   extern clock_t foo; 
  ; return 0; }
  EOF
! if { (eval echo configure:1850: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
      for try_type in "int" "unsigned int" "long" "unsigned long" "short" "unsigned short" "char" "unsigned char" "long long" "unsigned long long" ; do
    cat > conftest.$ac_ext <<EOF
! #line 1854 "configure"
  #include "confdefs.h"
  
  #include <stddef.h>
--- 2142,2156 ----
  # endif
  #endif
  
! int main() {
   extern clock_t foo; 
  ; return 0; }
  EOF
! if { (eval echo configure:2150: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
      for try_type in "int" "unsigned int" "long" "unsigned long" "short" "unsigned short" "char" "unsigned char" "long long" "unsigned long long" ; do
    cat > conftest.$ac_ext <<EOF
! #line 2154 "configure"
  #include "confdefs.h"
  
  #include <stddef.h>
***************
*** 1950,1973 ****
  # endif
  #endif
  
! int main() { return 0; }
! int t() {
   extern clock_t foo; extern $try_type foo; 
  ; return 0; }
  EOF
! if { (eval echo configure:1874: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
     pthreads_cv_type_clock_t="$try_type" ; break 
  fi
  rm -f conftest*
- 
    done
  else
    rm -rf conftest*
    { echo "configure: error: Can't find system typedef for clock_t." 1>&2; exit 1; }
  fi
  rm -f conftest*
- 
  fi
  
  if test -n "$pthreads_cv_type_clock_t" ; then
--- 2165,2190 ----
  # endif
  #endif
  
! int main() {
   extern clock_t foo; extern $try_type foo; 
  ; return 0; }
  EOF
! if { (eval echo configure:2173: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
     pthreads_cv_type_clock_t="$try_type" ; break 
+ else
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
  fi
  rm -f conftest*
    done
  else
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
    rm -rf conftest*
    { echo "configure: error: Can't find system typedef for clock_t." 1>&2; exit 1; }
  fi
  rm -f conftest*
  fi
  
  if test -n "$pthreads_cv_type_clock_t" ; then
***************
*** 1980,1990 ****
  echo "$ac_t""$pthreads_cv_type_clock_t" 1>&6
  
  echo $ac_n "checking type of time_t""... $ac_c" 1>&6
  if eval "test \"`echo '$''{'pthreads_cv_type_time_t'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1903 "configure"
  #include "confdefs.h"
  
  #include <stddef.h>
--- 2197,2208 ----
  echo "$ac_t""$pthreads_cv_type_clock_t" 1>&6
  
  echo $ac_n "checking type of time_t""... $ac_c" 1>&6
+ echo "configure:2201: checking type of time_t" >&5
  if eval "test \"`echo '$''{'pthreads_cv_type_time_t'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2206 "configure"
  #include "confdefs.h"
  
  #include <stddef.h>
***************
*** 1999,2014 ****
  # endif
  #endif
  
! int main() { return 0; }
! int t() {
   extern time_t foo; 
  ; return 0; }
  EOF
! if { (eval echo configure:1923: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
      for try_type in "int" "unsigned int" "long" "unsigned long" "short" "unsigned short" "char" "unsigned char" "long long" "unsigned long long" ; do
    cat > conftest.$ac_ext <<EOF
! #line 1927 "configure"
  #include "confdefs.h"
  
  #include <stddef.h>
--- 2217,2231 ----
  # endif
  #endif
  
! int main() {
   extern time_t foo; 
  ; return 0; }
  EOF
! if { (eval echo configure:2225: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
      for try_type in "int" "unsigned int" "long" "unsigned long" "short" "unsigned short" "char" "unsigned char" "long long" "unsigned long long" ; do
    cat > conftest.$ac_ext <<EOF
! #line 2229 "configure"
  #include "confdefs.h"
  
  #include <stddef.h>
***************
*** 2023,2046 ****
  # endif
  #endif
  
! int main() { return 0; }
! int t() {
   extern time_t foo; extern $try_type foo; 
  ; return 0; }
  EOF
! if { (eval echo configure:1947: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
     pthreads_cv_type_time_t="$try_type" ; break 
  fi
  rm -f conftest*
- 
    done
  else
    rm -rf conftest*
    { echo "configure: error: Can't find system typedef for time_t." 1>&2; exit 1; }
  fi
  rm -f conftest*
- 
  fi
  
  if test -n "$pthreads_cv_type_time_t" ; then
--- 2240,2265 ----
  # endif
  #endif
  
! int main() {
   extern time_t foo; extern $try_type foo; 
  ; return 0; }
  EOF
! if { (eval echo configure:2248: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
     pthreads_cv_type_time_t="$try_type" ; break 
+ else
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
  fi
  rm -f conftest*
    done
  else
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
    rm -rf conftest*
    { echo "configure: error: Can't find system typedef for time_t." 1>&2; exit 1; }
  fi
  rm -f conftest*
  fi
  
  if test -n "$pthreads_cv_type_time_t" ; then
***************
*** 2052,2089 ****
  pthread_time_t=$pthreads_cv_type_time_t
  echo "$ac_t""$pthreads_cv_type_time_t" 1>&6
  echo $ac_n "checking for fpos_t in stdio.h""... $ac_c" 1>&6
  if eval "test \"`echo '$''{'pthreads_cv_fpos_t_in_stdio'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1975 "configure"
  #include "confdefs.h"
  #include <stdio.h>
! int main() { return 0; }
! int t() {
  fpos_t position;
  ; return 0; }
  EOF
! if { (eval echo configure:1983: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    pthreads_cv_fpos_t_in_stdio=yes
  else
    rm -rf conftest*
    pthreads_cv_fpos_t_in_stdio=no
  fi
  rm -f conftest*
- 
  fi
  
  echo "$ac_t""$pthreads_cv_fpos_t_in_stdio" 1>&6
  if test $pthreads_cv_fpos_t_in_stdio = yes ; then
    
  echo $ac_n "checking type of fpos_t""... $ac_c" 1>&6
  if eval "test \"`echo '$''{'pthreads_cv_type_fpos_t'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2002 "configure"
  #include "confdefs.h"
  
  #include <stdio.h>
--- 2271,2310 ----
  pthread_time_t=$pthreads_cv_type_time_t
  echo "$ac_t""$pthreads_cv_type_time_t" 1>&6
  echo $ac_n "checking for fpos_t in stdio.h""... $ac_c" 1>&6
+ echo "configure:2275: checking for fpos_t in stdio.h" >&5
  if eval "test \"`echo '$''{'pthreads_cv_fpos_t_in_stdio'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2280 "configure"
  #include "confdefs.h"
  #include <stdio.h>
! int main() {
  fpos_t position;
  ; return 0; }
  EOF
! if { (eval echo configure:2287: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    pthreads_cv_fpos_t_in_stdio=yes
  else
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
    rm -rf conftest*
    pthreads_cv_fpos_t_in_stdio=no
  fi
  rm -f conftest*
  fi
  
  echo "$ac_t""$pthreads_cv_fpos_t_in_stdio" 1>&6
  if test $pthreads_cv_fpos_t_in_stdio = yes ; then
    
  echo $ac_n "checking type of fpos_t""... $ac_c" 1>&6
+ echo "configure:2303: checking type of fpos_t" >&5
  if eval "test \"`echo '$''{'pthreads_cv_type_fpos_t'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2308 "configure"
  #include "confdefs.h"
  
  #include <stdio.h>
***************
*** 2092,2107 ****
  #include <stdlib.h>
  #endif
  
! int main() { return 0; }
! int t() {
   extern fpos_t foo; 
  ; return 0; }
  EOF
! if { (eval echo configure:2016: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
      for try_type in "int" "unsigned int" "long" "unsigned long" "short" "unsigned short" "char" "unsigned char" "long long" "unsigned long long" ; do
    cat > conftest.$ac_ext <<EOF
! #line 2020 "configure"
  #include "confdefs.h"
  
  #include <stdio.h>
--- 2313,2327 ----
  #include <stdlib.h>
  #endif
  
! int main() {
   extern fpos_t foo; 
  ; return 0; }
  EOF
! if { (eval echo configure:2321: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
      for try_type in "int" "unsigned int" "long" "unsigned long" "short" "unsigned short" "char" "unsigned char" "long long" "unsigned long long" ; do
    cat > conftest.$ac_ext <<EOF
! #line 2325 "configure"
  #include "confdefs.h"
  
  #include <stdio.h>
***************
*** 2110,2133 ****
  #include <stdlib.h>
  #endif
  
! int main() { return 0; }
! int t() {
   extern fpos_t foo; extern $try_type foo; 
  ; return 0; }
  EOF
! if { (eval echo configure:2034: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
     pthreads_cv_type_fpos_t="$try_type" ; break 
  fi
  rm -f conftest*
- 
    done
  else
    rm -rf conftest*
    { echo "configure: error: Can't find system typedef for fpos_t." 1>&2; exit 1; }
  fi
  rm -f conftest*
- 
  fi
  
  if test -n "$pthreads_cv_type_fpos_t" ; then
--- 2330,2355 ----
  #include <stdlib.h>
  #endif
  
! int main() {
   extern fpos_t foo; extern $try_type foo; 
  ; return 0; }
  EOF
! if { (eval echo configure:2338: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
     pthreads_cv_type_fpos_t="$try_type" ; break 
+ else
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
  fi
  rm -f conftest*
    done
  else
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
    rm -rf conftest*
    { echo "configure: error: Can't find system typedef for fpos_t." 1>&2; exit 1; }
  fi
  rm -f conftest*
  fi
  
  if test -n "$pthreads_cv_type_fpos_t" ; then
***************
*** 2150,2160 ****
  fi
  
  echo $ac_n "checking type of off_t""... $ac_c" 1>&6
  if eval "test \"`echo '$''{'pthreads_cv_type_off_t'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2073 "configure"
  #include "confdefs.h"
  
  #include <stdio.h>
--- 2372,2383 ----
  fi
  
  echo $ac_n "checking type of off_t""... $ac_c" 1>&6
+ echo "configure:2376: checking type of off_t" >&5
  if eval "test \"`echo '$''{'pthreads_cv_type_off_t'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2381 "configure"
  #include "confdefs.h"
  
  #include <stdio.h>
***************
*** 2163,2178 ****
  #include <stdlib.h>
  #endif
  
! int main() { return 0; }
! int t() {
   extern off_t foo; 
  ; return 0; }
  EOF
! if { (eval echo configure:2087: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
      for try_type in "int" "unsigned int" "long" "unsigned long" "short" "unsigned short" "char" "unsigned char" "long long" "unsigned long long" ; do
    cat > conftest.$ac_ext <<EOF
! #line 2091 "configure"
  #include "confdefs.h"
  
  #include <stdio.h>
--- 2386,2400 ----
  #include <stdlib.h>
  #endif
  
! int main() {
   extern off_t foo; 
  ; return 0; }
  EOF
! if { (eval echo configure:2394: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
      for try_type in "int" "unsigned int" "long" "unsigned long" "short" "unsigned short" "char" "unsigned char" "long long" "unsigned long long" ; do
    cat > conftest.$ac_ext <<EOF
! #line 2398 "configure"
  #include "confdefs.h"
  
  #include <stdio.h>
***************
*** 2181,2204 ****
  #include <stdlib.h>
  #endif
  
! int main() { return 0; }
! int t() {
   extern off_t foo; extern $try_type foo; 
  ; return 0; }
  EOF
! if { (eval echo configure:2105: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
     pthreads_cv_type_off_t="$try_type" ; break 
  fi
  rm -f conftest*
- 
    done
  else
    rm -rf conftest*
    { echo "configure: error: Can't find system typedef for off_t." 1>&2; exit 1; }
  fi
  rm -f conftest*
- 
  fi
  
  if test -n "$pthreads_cv_type_off_t" ; then
--- 2403,2428 ----
  #include <stdlib.h>
  #endif
  
! int main() {
   extern off_t foo; extern $try_type foo; 
  ; return 0; }
  EOF
! if { (eval echo configure:2411: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
     pthreads_cv_type_off_t="$try_type" ; break 
+ else
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
  fi
  rm -f conftest*
    done
  else
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
    rm -rf conftest*
    { echo "configure: error: Can't find system typedef for off_t." 1>&2; exit 1; }
  fi
  rm -f conftest*
  fi
  
  if test -n "$pthreads_cv_type_off_t" ; then
***************
*** 2210,2252 ****
  pthread_off_t=$pthreads_cv_type_off_t
  echo "$ac_t""$pthreads_cv_type_off_t" 1>&6
  echo $ac_n "checking type of va_list""... $ac_c" 1>&6
  if eval "test \"`echo '$''{'pthreads_cv_type_va_list'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2133 "configure"
  #include "confdefs.h"
  #include <stdarg.h>
! int main() { return 0; }
! int t() {
   extern va_list foo; 
  ; return 0; }
  EOF
! if { (eval echo configure:2141: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
      for try_type in "char *" "char **" "void *" "void **" "int *" "long *" ; do
    cat > conftest.$ac_ext <<EOF
! #line 2145 "configure"
  #include "confdefs.h"
  #include <stdarg.h>
! int main() { return 0; }
! int t() {
   extern va_list foo; extern $try_type foo; 
  ; return 0; }
  EOF
! if { (eval echo configure:2153: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
     pthreads_cv_type_va_list="$try_type" ; break 
  fi
  rm -f conftest*
- 
    done
  else
    rm -rf conftest*
    { echo "configure: error: Can't find system typedef for va_list." 1>&2; exit 1; }
  fi
  rm -f conftest*
- 
  fi
  
  if test -n "$pthreads_cv_type_va_list" ; then
--- 2434,2478 ----
  pthread_off_t=$pthreads_cv_type_off_t
  echo "$ac_t""$pthreads_cv_type_off_t" 1>&6
  echo $ac_n "checking type of va_list""... $ac_c" 1>&6
+ echo "configure:2438: checking type of va_list" >&5
  if eval "test \"`echo '$''{'pthreads_cv_type_va_list'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2443 "configure"
  #include "confdefs.h"
  #include <stdarg.h>
! int main() {
   extern va_list foo; 
  ; return 0; }
  EOF
! if { (eval echo configure:2450: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
      for try_type in "char *" "char **" "void *" "void **" "int *" "long *" ; do
    cat > conftest.$ac_ext <<EOF
! #line 2454 "configure"
  #include "confdefs.h"
  #include <stdarg.h>
! int main() {
   extern va_list foo; extern $try_type foo; 
  ; return 0; }
  EOF
! if { (eval echo configure:2461: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
     pthreads_cv_type_va_list="$try_type" ; break 
+ else
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
  fi
  rm -f conftest*
    done
  else
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
    rm -rf conftest*
    { echo "configure: error: Can't find system typedef for va_list." 1>&2; exit 1; }
  fi
  rm -f conftest*
  fi
  
  if test -n "$pthreads_cv_type_va_list" ; then
***************
*** 2262,2309 ****
  #include <arpa/nameser.h>"
  
  echo $ac_n "checking IP address type""... $ac_c" 1>&6
  if eval "test \"`echo '$''{'pthread_cv_type_ipaddr'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2185 "configure"
  #include "confdefs.h"
  $arpa_headers
! int main() { return 0; }
! int t() {
   &_getlong; 
  ; return 0; }
  EOF
! if { (eval echo configure:2193: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    
      for type in "unsigned long" "unsigned int" ; do
        cat > conftest.$ac_ext <<EOF
! #line 2198 "configure"
  #include "confdefs.h"
  $arpa_headers
! int main() { return 0; }
! int t() {
  extern $type _getlong ();
  ; return 0; }
  EOF
! if { (eval echo configure:2206: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    
          pthread_cv_type_ipaddr="$type"
          break
        
  fi
  rm -f conftest*
- 
      done
    
  else
    rm -rf conftest*
     echo "configure: warning: Can't compile _getlong reference." 1>&2 
  fi
  rm -f conftest*
- 
    if test "$pthread_cv_type_ipaddr" = "" ; then
  	echo "configure: warning: Can't determine _getlong return type." 1>&2
  	echo "configure: warning: Defaulting to unsigned long." 1>&2
--- 2488,2537 ----
  #include <arpa/nameser.h>"
  
  echo $ac_n "checking IP address type""... $ac_c" 1>&6
+ echo "configure:2492: checking IP address type" >&5
  if eval "test \"`echo '$''{'pthread_cv_type_ipaddr'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2497 "configure"
  #include "confdefs.h"
  $arpa_headers
! int main() {
   &_getlong; 
  ; return 0; }
  EOF
! if { (eval echo configure:2504: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    
      for type in "unsigned long" "unsigned int" ; do
        cat > conftest.$ac_ext <<EOF
! #line 2509 "configure"
  #include "confdefs.h"
  $arpa_headers
! int main() {
  extern $type _getlong ();
  ; return 0; }
  EOF
! if { (eval echo configure:2516: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    
          pthread_cv_type_ipaddr="$type"
          break
        
+ else
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
  fi
  rm -f conftest*
      done
    
  else
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
    rm -rf conftest*
     echo "configure: warning: Can't compile _getlong reference." 1>&2 
  fi
  rm -f conftest*
    if test "$pthread_cv_type_ipaddr" = "" ; then
  	echo "configure: warning: Can't determine _getlong return type." 1>&2
  	echo "configure: warning: Defaulting to unsigned long." 1>&2
***************
*** 2319,2366 ****
  
  
  echo $ac_n "checking IP port type""... $ac_c" 1>&6
  if eval "test \"`echo '$''{'pthread_cv_type_ipport'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2242 "configure"
  #include "confdefs.h"
  $arpa_headers
! int main() { return 0; }
! int t() {
   &_getshort; 
  ; return 0; }
  EOF
! if { (eval echo configure:2250: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    
      for type in "unsigned short" "unsigned int" ; do
        cat > conftest.$ac_ext <<EOF
! #line 2255 "configure"
  #include "confdefs.h"
  $arpa_headers
! int main() { return 0; }
! int t() {
  extern $type _getshort ();
  ; return 0; }
  EOF
! if { (eval echo configure:2263: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    
          pthread_cv_type_ipport="$type"
          break
        
  fi
  rm -f conftest*
- 
      done
    
  else
    rm -rf conftest*
     echo "configure: warning: Can't compile _getshort reference." 1>&2 
  fi
  rm -f conftest*
- 
    if test "$pthread_cv_type_ipport" = "" ; then
  	echo "configure: warning: Can't determine _getshort return type." 1>&2
  	echo "configure: warning: Defaulting to unsigned short." 1>&2 
--- 2547,2596 ----
  
  
  echo $ac_n "checking IP port type""... $ac_c" 1>&6
+ echo "configure:2551: checking IP port type" >&5
  if eval "test \"`echo '$''{'pthread_cv_type_ipport'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2556 "configure"
  #include "confdefs.h"
  $arpa_headers
! int main() {
   &_getshort; 
  ; return 0; }
  EOF
! if { (eval echo configure:2563: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    
      for type in "unsigned short" "unsigned int" ; do
        cat > conftest.$ac_ext <<EOF
! #line 2568 "configure"
  #include "confdefs.h"
  $arpa_headers
! int main() {
  extern $type _getshort ();
  ; return 0; }
  EOF
! if { (eval echo configure:2575: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    
          pthread_cv_type_ipport="$type"
          break
        
+ else
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
  fi
  rm -f conftest*
      done
    
  else
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
    rm -rf conftest*
     echo "configure: warning: Can't compile _getshort reference." 1>&2 
  fi
  rm -f conftest*
    if test "$pthread_cv_type_ipport" = "" ; then
  	echo "configure: warning: Can't determine _getshort return type." 1>&2
  	echo "configure: warning: Defaulting to unsigned short." 1>&2 
***************
*** 2376,2381 ****
--- 2606,2612 ----
  
  
  echo $ac_n "checking pathname for terminal devices directory""... $ac_c" 1>&6
+ echo "configure:2610: checking pathname for terminal devices directory" >&5
  if eval "test \"`echo '$''{'pthread_cv_pty_path'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
***************
*** 2395,2400 ****
--- 2626,2632 ----
  echo "$ac_t""$pthread_cv_pty_path" 1>&6
  
  echo $ac_n "checking directory name for time zone info""... $ac_c" 1>&6
+ echo "configure:2630: checking directory name for time zone info" >&5
  tzdir=NONE
  for f in /usr/lib/zoneinfo /usr/share/zoneinfo /usr/share/lib/zoneinfo /etc/zoneinfo /usr/local/lib/zoneinfo
  do
***************
*** 2417,2422 ****
--- 2649,2655 ----
  echo "$ac_t""$tzdir" 1>&6
  
  echo $ac_n "checking filename for local time zone""... $ac_c" 1>&6
+ echo "configure:2653: checking filename for local time zone" >&5
  tzfile=NONE
  for f in $tzdir/localtime /etc/localtime
  do
***************
*** 2472,2482 ****
  for ac_func in vfork
  do
  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2395 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char $ac_func(); below.  */
--- 2705,2716 ----
  for ac_func in vfork
  do
  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+ echo "configure:2709: checking for $ac_func" >&5
  if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2714 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char $ac_func(); below.  */
***************
*** 2486,2493 ****
      builtin and then its argument prototype would still apply.  */
  char $ac_func();
  
! int main() { return 0; }
! int t() {
  
  /* The GNU C library defines this for functions which it implements
      to always fail with ENOSYS.  Some functions are actually named
--- 2720,2726 ----
      builtin and then its argument prototype would still apply.  */
  char $ac_func();
  
! int main() {
  
  /* The GNU C library defines this for functions which it implements
      to always fail with ENOSYS.  Some functions are actually named
***************
*** 2500,2515 ****
  
  ; return 0; }
  EOF
! if { (eval echo configure:2419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
    rm -rf conftest*
    eval "ac_cv_func_$ac_func=yes"
  else
    rm -rf conftest*
    eval "ac_cv_func_$ac_func=no"
  fi
  rm -f conftest*
- 
  fi
  if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
    echo "$ac_t""yes" 1>&6
      ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
--- 2733,2750 ----
  
  ; return 0; }
  EOF
! if { (eval echo configure:2737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_func_$ac_func=yes"
  else
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
    rm -rf conftest*
    eval "ac_cv_func_$ac_func=no"
  fi
  rm -f conftest*
  fi
+ 
  if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
    echo "$ac_t""yes" 1>&6
      ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
***************
*** 2611,2621 ****
  # --recheck option to rerun configure.
  #
  EOF
  # Ultrix sh set writes to stderr and can't be redirected directly,
  # and sets the high bit in the cache file unless we assign to the vars.
  (set) 2>&1 |
!   sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \
!   >> confcache
  if cmp -s $cache_file confcache; then
    :
  else
--- 2846,2870 ----
  # --recheck option to rerun configure.
  #
  EOF
+ # The following way of writing the cache mishandles newlines in values,
+ # but we know of no workaround that is simple, portable, and efficient.
+ # So, don't put newlines in cache variables' values.
  # Ultrix sh set writes to stderr and can't be redirected directly,
  # and sets the high bit in the cache file unless we assign to the vars.
  (set) 2>&1 |
!   case `(ac_space=' '; set | grep ac_space) 2>&1` in
!   *ac_space=\ *)
!     # `set' does not quote correctly, so add quotes (double-quote substitution
!     # turns \\\\ into \\, and sed turns \\ into \).
!     sed -n \
!       -e "s/'/'\\\\''/g" \
!       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
!     ;;
!   *)
!     # `set' quotes correctly as required by POSIX, so do not add quotes.
!     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
!     ;;
!   esac >> confcache
  if cmp -s $cache_file confcache; then
    :
  else
***************
*** 2670,2676 ****
      echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
      exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
    -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
!     echo "$CONFIG_STATUS generated by autoconf version 2.10"
      exit 0 ;;
    -help | --help | --hel | --he | --h)
      echo "\$ac_cs_usage"; exit 0 ;;
--- 2919,2925 ----
      echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
      exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
    -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
!     echo "$CONFIG_STATUS generated by autoconf version 2.13"
      exit 0 ;;
    -help | --help | --hel | --he | --h)
      echo "\$ac_cs_usage"; exit 0 ;;
***************
*** 2694,2702 ****
--- 2943,2953 ----
   s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
  $ac_vpsub
  $extrasub
+ s%@SHELL@%$SHELL%g
  s%@CFLAGS@%$CFLAGS%g
  s%@CPPFLAGS@%$CPPFLAGS%g
  s%@CXXFLAGS@%$CXXFLAGS%g
+ s%@FFLAGS@%$FFLAGS%g
  s%@DEFS@%$DEFS%g
  s%@LDFLAGS@%$LDFLAGS%g
  s%@LIBS@%$LIBS%g
***************
*** 2744,2749 ****
--- 2995,3036 ----
  
  CEOF
  EOF
+ 
+ cat >> $CONFIG_STATUS <<\EOF
+ 
+ # Split the substitutions into bite-sized pieces for seds with
+ # small command number limits, like on Digital OSF/1 and HP-UX.
+ ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
+ ac_file=1 # Number of current file.
+ ac_beg=1 # First line for current file.
+ ac_end=$ac_max_sed_cmds # Line after last line for current file.
+ ac_more_lines=:
+ ac_sed_cmds=""
+ while $ac_more_lines; do
+   if test $ac_beg -gt 1; then
+     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
+   else
+     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
+   fi
+   if test ! -s conftest.s$ac_file; then
+     ac_more_lines=false
+     rm -f conftest.s$ac_file
+   else
+     if test -z "$ac_sed_cmds"; then
+       ac_sed_cmds="sed -f conftest.s$ac_file"
+     else
+       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
+     fi
+     ac_file=`expr $ac_file + 1`
+     ac_beg=$ac_end
+     ac_end=`expr $ac_end + $ac_max_sed_cmds`
+   fi
+ done
+ if test -z "$ac_sed_cmds"; then
+   ac_sed_cmds=cat
+ fi
+ EOF
+ 
  cat >> $CONFIG_STATUS <<EOF
  
  CONFIG_FILES=\${CONFIG_FILES-"config.flags GNUmakefile Makefile \
***************
*** 2755,2768 ****
  EOF
  cat >> $CONFIG_STATUS <<\EOF
  for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
!   # Support "outfile[:infile]", defaulting infile="outfile.in".
    case "$ac_file" in
!   *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
         ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
    *) ac_file_in="${ac_file}.in" ;;
    esac
  
!   # Adjust relative srcdir, etc. for subdirectories.
  
    # Remove last slash and all that follows it.  Not all systems have dirname.
    ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
--- 3042,3055 ----
  EOF
  cat >> $CONFIG_STATUS <<\EOF
  for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
!   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
    case "$ac_file" in
!   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
         ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
    *) ac_file_in="${ac_file}.in" ;;
    esac
  
!   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
  
    # Remove last slash and all that follows it.  Not all systems have dirname.
    ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
***************
*** 2786,2791 ****
--- 3073,3079 ----
      top_srcdir="$ac_dots$ac_given_srcdir" ;;
    esac
  
+ 
    echo creating "$ac_file"
    rm -f "$ac_file"
    configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
***************
*** 2794,2806 ****
  # $configure_input" ;;
    *) ac_comsub= ;;
    esac
    sed -e "$ac_comsub
  s%@configure_input@%$configure_input%g
  s%@srcdir@%$srcdir%g
  s%@top_srcdir@%$top_srcdir%g
! " -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
  fi; done
! rm -f conftest.subs
  
  # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
  # NAME is the cpp macro being defined and VALUE is the value it is being given.
--- 3082,3096 ----
  # $configure_input" ;;
    *) ac_comsub= ;;
    esac
+ 
+   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
    sed -e "$ac_comsub
  s%@configure_input@%$configure_input%g
  s%@srcdir@%$srcdir%g
  s%@top_srcdir@%$top_srcdir%g
! " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
  fi; done
! rm -f conftest.s*
  
  # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
  # NAME is the cpp macro being defined and VALUE is the value it is being given.
***************
*** 2821,2831 ****
  ac_eC=' '
  ac_eD='%g'
  
! CONFIG_HEADERS=${CONFIG_HEADERS-"config.h"}
  for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
!   # Support "outfile[:infile]", defaulting infile="outfile.in".
    case "$ac_file" in
!   *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
         ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
    *) ac_file_in="${ac_file}.in" ;;
    esac
--- 3111,3127 ----
  ac_eC=' '
  ac_eD='%g'
  
! if test "${CONFIG_HEADERS+set}" != set; then
! EOF
! cat >> $CONFIG_STATUS <<EOF
!   CONFIG_HEADERS="config.h"
! EOF
! cat >> $CONFIG_STATUS <<\EOF
! fi
  for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
!   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
    case "$ac_file" in
!   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
         ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
    *) ac_file_in="${ac_file}.in" ;;
    esac
***************
*** 2833,2839 ****
    echo creating $ac_file
  
    rm -f conftest.frag conftest.in conftest.out
!   cp $ac_given_srcdir/$ac_file_in conftest.in
  
  EOF
  
--- 3129,3136 ----
    echo creating $ac_file
  
    rm -f conftest.frag conftest.in conftest.out
!   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
!   cat $ac_file_inputs > conftest.in
  
  EOF
  
***************
*** 2861,2868 ****
  
  # Break up conftest.vals because some shells have a limit on
  # the size of here documents, and old seds have small limits too.
- # Maximum number of lines to put in a single here document.
- ac_max_here_lines=12
  
  rm -f conftest.tail
  while :
--- 3158,3163 ----
***************
*** 2949,2955 ****
--- 3244,3254 ----
      { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
    fi
  done
+ EOF
+ cat >> $CONFIG_STATUS <<EOF
  
+ EOF
+ cat >> $CONFIG_STATUS <<\EOF
  
  exit 0
  EOF
diff -rcN pthreads-old/config/configure.in pthreads-1_60_beta6/config/configure.in
*** pthreads-old/config/configure.in	Thu Mar  2 19:34:50 2000
--- pthreads-1_60_beta6/config/configure.in	Thu Mar  2 14:56:57 2000
***************
*** 252,257 ****
--- 252,263 ----
  	except="lseek ftruncate pipe fstat"
  	available_syscalls="sigsuspend sigprocmask"
  	;;
+     powerpc-*-netbsd*)
+ 	name=powerpc-netbsd
+ 	sysincludes=netbsd-1.1
+ 	except="lseek ftruncate pipe fstat fork"
+ 	available_syscalls="sigsuspend sigprocmask"
+ 	;;
  changequote([,])dnl
      m68*-*-netbsd1.3*)
  	name=m68000-netbsd
diff -rcN pthreads-old/machdep/engine-powerpc-netbsd.c pthreads-1_60_beta6/machdep/engine-powerpc-netbsd.c
*** pthreads-old/machdep/engine-powerpc-netbsd.c	Wed Dec 31 19:00:00 1969
--- pthreads-1_60_beta6/machdep/engine-powerpc-netbsd.c	Thu Mar  2 19:05:10 2000
***************
*** 0 ****
--- 1,228 ----
+ /* ==== machdep.c ============================================================
+  * Copyright (c) 1993, 1994 Chris Provenzano, proven@athena.mit.edu
+  *
+  * Copyright (c) 1993 by Chris Provenzano, proven@mit.edu
+  * 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 acknowledgement:
+  *  This product includes software developed by Chris Provenzano.
+  * 4. The name of Chris Provenzano may not be used to endorse or promote
+  *      products derived from this software without specific prior written
+  *      permission.
+  *
+  * THIS SOFTWARE IS PROVIDED BY CHRIS PROVENZANO ``AS IS'' AND
+  * ANY EXPRESS 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 CHRIS PROVENZANO 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.
+  *
+  * PowerPC work by Andy Finnell <andy_finnell@bellsouth.net>
+  *
+  */
+ 
+ #ifndef lint
+ static const char rcsid[] = "$Id: patch-bm,v 1.2 1999/09/10 20:38:23 bad Exp $";
+ #endif
+ 
+ #include "pthread.h"
+ #include <sys/syscall.h>
+ #include <sys/stat.h>
+ 
+ /* ==========================================================================
+  * machdep_save_state()
+  */
+ int machdep_save_state(void)
+ {
+   return( __machdep_save_state( pthread_run->machdep_data.machdep_istate ) );
+ }
+ 
+ /* ==========================================================================
+  * machdep_restore_state()
+  */
+ void machdep_restore_state(void)
+ {
+   __machdep_restore_state( pthread_run->machdep_data.machdep_istate );
+ }
+ 
+ void machdep_save_float_state ( struct pthread* thread )
+ {
+   __machdep_save_fp_state(thread->machdep_data.machdep_fstate);
+ }
+ 
+ void machdep_restore_float_state (void)
+ {
+   __machdep_restore_fp_state(pthread_run->machdep_data.machdep_fstate);
+ }
+ 
+ /* ==========================================================================
+  * machdep_set_thread_timer()
+  */
+ void machdep_set_thread_timer(struct machdep_pthread *machdep_pthread)
+ {
+     if (setitimer(ITIMER_VIRTUAL, &(machdep_pthread->machdep_timer), NULL)) {
+         PANIC();
+     }
+ }
+ 
+ /* ==========================================================================
+  * machdep_unset_thread_timer()
+  */
+ void machdep_unset_thread_timer(struct machdep_pthread *machdep_pthread)
+ {
+     struct itimerval zeroval = { { 0, 0 }, { 0, 0 } };
+ 
+     if (setitimer(ITIMER_VIRTUAL, &zeroval, NULL)) {
+         PANIC();
+     }
+ }
+ 
+ /* ==========================================================================
+  * __machdep_stack_free()
+  */
+ void __machdep_stack_free(void * stack)
+ {       
+     free(stack);
+ }
+  
+ /* ==========================================================================
+  * __machdep_stack_alloc()
+  */ 
+ void * __machdep_stack_alloc(size_t size)
+ {   
+     void * stack;
+     
+     return((void*)malloc(size));
+ }     
+ 
+ /* ==========================================================================
+  * machdep_pthread_cleanup()
+  */
+ void *machdep_pthread_cleanup(struct machdep_pthread *machdep_pthread)
+ {
+     return(machdep_pthread->machdep_stack);
+ }
+ 
+ /* ==========================================================================
+  * machdep_pthread_start()
+  */
+ void machdep_pthread_start(void)
+ {
+         context_switch_done();
+ 	pthread_sched_resume();
+ 
+     /* Run current thread's start routine with argument */
+     pthread_exit(
+         pthread_run->machdep_data.start_routine(
+             pthread_run->machdep_data.start_argument
+         )
+     );
+ 
+     /* should never reach here */
+     PANIC();
+ }
+ 
+ /* ==========================================================================
+  * __machdep_pthread_create()
+  */
+ void __machdep_pthread_create(struct machdep_pthread *machdep_pthread,
+   void *(* start_routine)(), void *start_argument, 
+   long stack_size, long nsec, long flags)
+ {
+     machdep_pthread->start_routine = start_routine;
+     machdep_pthread->start_argument = start_argument;
+ 
+     machdep_pthread->machdep_timer.it_value.tv_sec = 0;
+     machdep_pthread->machdep_timer.it_interval.tv_sec = 0;
+     machdep_pthread->machdep_timer.it_interval.tv_usec = 0;
+     machdep_pthread->machdep_timer.it_value.tv_usec = nsec / 1000;
+ 
+     /*
+      * Set up new stack frame so that it looks like it
+      * returned from a longjmp() to the beginning of
+      * machdep_pthread_start().
+      *
+      */
+     /* store it in the link register */
+     machdep_pthread->machdep_istate[33] = (long)machdep_pthread_start;
+ 
+     /* Stack starts high and builds down. */
+     machdep_pthread->machdep_istate[1] =
+       (long)machdep_pthread->machdep_stack + stack_size;
+ }
+ 
+ /* ==========================================================================
+  * machdep_sys_wait3() 
+  */
+ machdep_sys_wait3(int * b, int c, int * d)
+ {
+         return(machdep_sys_wait4(0, b, c, d));
+ }
+  
+ /* ==========================================================================
+  * machdep_sys_waitpid()
+  */
+ machdep_sys_waitpid(int a, int * b, int c)
+ {
+         return(machdep_sys_wait4(a, b, c, NULL));
+ }  
+ 
+ /* ==========================================================================
+  * machdep_sys_getdtablesize()
+  */
+ machdep_sys_getdtablesize()
+ {
+         return(sysconf(_SC_OPEN_MAX));
+ }  
+ 
+ /* ==========================================================================
+  * machdep_sys_getdirentries()
+  */
+ machdep_sys_getdirentries(int fd, char * buf, int len, int * seek)
+ {
+         return(machdep_sys_getdents(fd, buf, len));
+ }  
+ 
+ extern off_t __syscall();
+ 
+ /* ==========================================================================
+  * machdep_sys_lseek()
+  */
+ off_t machdep_sys_lseek(int fd, off_t offset, int whence)
+ {
+ 	return(__syscall((quad_t)SYS_lseek, fd, 0, offset, whence));
+ }
+ 
+ int machdep_sys_ftruncate( int fd, off_t length)
+ {
+ 	quad_t q;
+ 	int rv;
+ 
+ 	q = __syscall((quad_t)SYS_ftruncate, fd,0, length);
+ 	if( /* LINTED constant */ sizeof( quad_t ) == sizeof( register_t ) ||
+ 	    /* LINTED constant */ BYTE_ORDER == LITTLE_ENDIAN )
+ 		rv = (int)q;
+ 	else
+ 		rv = (int)((u_quad_t)q >> 32);
+ 
+ 	return rv;
+ }
+ 
+ int machdep_sys_fstat( int f, struct stat* st )
+ {
+ 	return __fstat13(f,st);
+ }
diff -rcN pthreads-old/machdep/engine-powerpc-netbsd.h pthreads-1_60_beta6/machdep/engine-powerpc-netbsd.h
*** pthreads-old/machdep/engine-powerpc-netbsd.h	Wed Dec 31 19:00:00 1969
--- pthreads-1_60_beta6/machdep/engine-powerpc-netbsd.h	Thu Mar  2 19:44:53 2000
***************
*** 0 ****
--- 1,98 ----
+ /* ==== machdep.h ============================================================
+  * Copyright (c) 1993 Chris Provenzano, proven@athena.mit.edu
+  *
+  *
+  * PowerPC work by Andy Finnell <andy_finnell@bellsouth.net> 
+  *
+  */
+ 
+ #include <unistd.h>
+ #include <setjmp.h>
+ #include <sys/time.h>
+ 
+ /*
+  * The first machine dependent functions are the SEMAPHORES
+  * needing the test and set instruction.
+  */
+ #define SEMAPHORE_CLEAR 0
+ #define SEMAPHORE_SET   1;
+ 
+ #define SEMAPHORE_TEST_AND_SET(lock) (_machdep_test_and_set(lock,SEMAPHORE_SET))
+ 
+ #define SEMAPHORE_RESET(lock)           *lock = SEMAPHORE_CLEAR
+ 
+ /*
+  * New types
+  */
+ typedef int    semaphore;
+ 
+ /*
+  * sigset_t macros
+  */
+ #define	SIG_ANY(sig)		(sig)
+ #define SIGMAX				(_NSIG-1)
+ 
+ /*
+  * New Strutures
+  */
+ struct machdep_pthread {
+     void        		*(*start_routine)(void *);
+     void        		*start_argument;
+     void        		*machdep_stack;
+     struct itimerval	        machdep_timer;
+     long     		        machdep_istate[36]; /* 32 gpr, link, condition,
+ 						       exception, counter */
+     long			machdep_fstate[65]; /* 32 fpr, fp status reg */
+ };
+ 
+ /*
+  * Min pthread stacksize
+  */
+ #define PTHREAD_STACK_MIN	1024
+ 
+ /*
+  * Some fd flag defines that are necessary to distinguish between posix
+  * behavior and bsd4.3 behavior.
+  */
+ #define __FD_NONBLOCK 		O_NONBLOCK
+ 
+ /*
+  * Static machdep_pthread initialization values.
+  * For initial thread only.
+  */
+ #define MACHDEP_PTHREAD_INIT    \
+ { NULL, NULL, NULL, { { 0, 0 }, { 0, 100000 } }, 0 }
+ 
+ /*
+  * New functions
+  */
+ 
+ __BEGIN_DECLS
+ 
+ #if defined(PTHREAD_KERNEL)
+ 
+ 
+ #ifndef __machdep_stack_get
+ #define __machdep_stack_get(x)      (x)->machdep_stack
+ #endif
+ #ifndef __machdep_stack_set
+ #define __machdep_stack_set(x, y)   (x)->machdep_stack = y
+ #endif
+ #ifndef __machdep_stack_repl
+ #define __machdep_stack_repl(x, y)                          \
+ {                                                           \
+     if (stack = __machdep_stack_get(x)) {                   \
+         __machdep_stack_free(stack);                        \
+     }                                                       \
+     __machdep_stack_set(x, y);                              \
+ }
+ #endif
+ 
+ void *  __machdep_stack_alloc       __P_((size_t));
+ void    __machdep_stack_free        __P_((void *));
+     
+ int machdep_save_state      __P_((void));
+ 
+ #endif
+ 
+ __END_DECLS
diff -rcN pthreads-old/machdep/syscall-powerpc-netbsd.S pthreads-1_60_beta6/machdep/syscall-powerpc-netbsd.S
*** pthreads-old/machdep/syscall-powerpc-netbsd.S	Wed Dec 31 19:00:00 1969
--- pthreads-1_60_beta6/machdep/syscall-powerpc-netbsd.S	Thu Mar  2 18:09:27 2000
***************
*** 0 ****
--- 1,257 ----
+ /*
+ 	PowerPC work by Andy Finnell <andy_finnell@bellsouth.net>
+ */
+ 	
+ #ifndef lint
+     .text
+     .asciz "$Id: patch-bn,v 1.3 1999/09/10 20:38:23 bad Exp $";
+ #endif
+ 
+ #include <machine/asm.h>
+ #include <sys/syscall.h>
+ 
+ #ifdef __STDC__
+ #define SYSCALL(x)	.text	; \
+ 			.align 2 ; \
+ 			ENTRY(machdep_sys_ ## x) ; \
+ 			li 0, (SYS_ ## x) ; \
+ 			sc	;  \
+ 			bnslr	; \
+ 			b err
+ #else /* !__STDC__ */
+ #define SYSCALL(x)	.text	; \
+ 			.align 2 ; \
+ 			ENTRY(machdpe_sys_/**/x) ; \
+ 			li 0, (SYS_/**/x) ; \
+ 			sc	; \
+ 			bnslr	; \
+ 			b err
+ #endif /* !__STDC__ */
+ 
+ #ifdef SYS___sigsuspend14
+ #define SYS_sigsuspend SYS___sigsuspend14
+ #endif
+ #ifdef SYS___sigprocmask14
+ #define SYS_sigprocmask SYS___sigprocmask14
+ #endif
+ 	
+ /*
+  * Initial asm stuff for all functions.
+  */
+         .text
+         .align 2
+ 
+ 
+ /* ==========================================================================
+  * error code for all syscalls. The error value is returned as the negative
+  * of the errno value.
+  */
+ 
+ err:
+         neg            3,3
+         blr
+ 
+ /* ==========================================================================
+  * machdep_sys_pipe
+  */
+ 	.align 2
+ ENTRY(machdep_sys_pipe)
+ 	mr	5,3		# save pointer
+ 	li	0,SYS_pipe
+ 	sc			# assume, that r5 is kept
+ 	bso	err
+ 	stw	3,0(5)		# success, store fds
+ 	stw	4,4(5)
+ 	li	3,0
+ 	blr			# and return 0
+ 	
+ /* ==========================================================================
+  * machdep_sys_pipe
+  */
+ 	.align 2
+ ENTRY(machdep_sys_fork)
+ 	li	0,(SYS_fork)
+ 	sc
+ 	bso	err
+ 	addi	4,4,-1		# from 1 to 0 in child, 0 to -1 in parent
+ 	and	3,3,4		# return 0 in child, pid in parent
+ 	blr
+ 
+ 	.align 2
+ ENTRY(__machdep_save_fp_state)
+ 	stfd	0, 0x00(3)
+ 	stfd	1, 0x08(3)
+ 	stfd	2, 0x10(3)
+ 	stfd	3, 0x18(3)
+ 	stfd	4, 0x20(3)
+ 	stfd	5, 0x28(3)
+ 	stfd	6, 0x30(3)
+ 	stfd	7, 0x38(3)
+ 	stfd	8, 0x40(3)
+ 	stfd	9, 0x48(3)
+ 	stfd	10,0x50(3)
+ 	stfd	11,0x58(3)
+ 	stfd	12,0x60(3)
+ 	stfd	13,0x68(3)
+ 	stfd	14,0x70(3)
+ 	stfd	15,0x78(3)
+ 	stfd	16,0x80(3)
+ 	stfd	17,0x88(3)
+ 	stfd	18,0x90(3)
+ 	stfd	19,0x98(3)
+ 	stfd	20,0xa0(3)
+ 	stfd	21,0xa8(3)
+ 	stfd	22,0xb0(3)
+ 	stfd	23,0xb8(3)
+ 	stfd	24,0xc0(3)
+ 	stfd	25,0xc8(3)
+ 	stfd	26,0xd0(3)
+ 	stfd	27,0xd8(3)
+ 	stfd	28,0xe0(3)
+ 	stfd	29,0xe8(3)
+ 	stfd	30,0xf0(3)
+ 	stfd	31,0xf8(3)
+ 	# store fpsr
+ 	blr
+ 	
+ 	.align 2
+ ENTRY(__machdep_restore_fp_state)
+ 	lfd	0, 0x00(3)
+ 	lfd	1, 0x08(3)
+ 	lfd	2, 0x10(3)
+ 	lfd	3, 0x18(3)
+ 	lfd	4, 0x20(3)
+ 	lfd	5, 0x28(3)
+ 	lfd	6, 0x30(3)
+ 	lfd	7, 0x38(3)
+ 	lfd	8, 0x40(3)
+ 	lfd	9, 0x48(3)
+ 	lfd	10,0x50(3)
+ 	lfd	11,0x58(3)
+ 	lfd	12,0x60(3)
+ 	lfd	13,0x68(3)
+ 	lfd	14,0x70(3)
+ 	lfd	15,0x78(3)
+ 	lfd	16,0x80(3)
+ 	lfd	17,0x88(3)
+ 	lfd	18,0x90(3)
+ 	lfd	19,0x98(3)
+ 	lfd	20,0xa0(3)
+ 	lfd	21,0xa8(3)
+ 	lfd	22,0xb0(3)
+ 	lfd	23,0xb8(3)
+ 	lfd	24,0xc0(3)
+ 	lfd	25,0xc8(3)
+ 	lfd	26,0xd0(3)
+ 	lfd	27,0xd8(3)
+ 	lfd	28,0xe0(3)
+ 	lfd	29,0xe8(3)
+ 	lfd	30,0xf0(3)
+ 	lfd	31,0xf8(3)
+ 	# load fpsr
+ 	blr
+ 
+ 	.align 2
+ ENTRY(__machdep_save_state)
+ 	stw	0, 0x00(3)
+ 	stw	1, 0x04(3)	# Stack pointer
+ 	stw	2, 0x08(3)
+ 	stw	3, 0x0c(3)
+ 	stw	4, 0x10(3)
+ 	stw	5, 0x14(3)
+ 	stw	6, 0x18(3)
+ 	stw	7, 0x1c(3)
+ 	stw	8, 0x20(3)
+ 	stw	9, 0x24(3)
+ 	stw	10,0x28(3)
+ 	stw	11,0x2c(3)
+ 	stw	12,0x30(3)
+ 	stw	13,0x34(3)	
+ 	stw	14,0x38(3)
+ 	stw	15,0x3c(3)
+ 	stw	16,0x40(3)
+ 	stw	17,0x44(3)
+ 	stw	18,0x48(3)
+ 	stw	19,0x4c(3)
+ 	stw	20,0x50(3)
+ 	stw	21,0x54(3)
+ 	stw	22,0x58(3)
+ 	stw	23,0x5c(3)
+ 	stw	24,0x60(3)
+ 	stw	25,0x64(3)
+ 	stw	26,0x68(3)
+ 	stw	27,0x6c(3)
+ 	stw	28,0x70(3)
+ 	stw	29,0x74(3)
+ 	stw	30,0x78(3)
+ 	stw	31,0x7c(3)
+ 	# cr, lr, ctr, xer
+ 	mfcr	0
+ 	stw	0,0x80(3)
+ 	mflr	0
+ 	stw	0,0x84(3)
+ 	mfctr	0
+ 	stw	0,0x88(3)
+ 	mfxer	0
+ 	stw	0,0x8c(3)
+ 	li	3, 0		# return 0
+ 	blr
+ 
+ 	.align 2
+ ENTRY(__machdep_restore_state)
+ 	/* r1, r14-r30 */
+ 	lwz	1, 0x04(3)
+ 	lwz	2, 0x08(3)
+ 	lwz	4, 0x10(3)
+ 	lwz	5, 0x14(3)
+ 	lwz	6, 0x18(3)
+ 	lwz	7, 0x1c(3)
+ 	lwz	8, 0x20(3)
+ 	lwz	9, 0x24(3)
+ 	lwz	10,0x28(3)
+ 	lwz	11,0x2c(3)
+ 	lwz	12,0x30(3)
+ 	lwz	13,0x34(3)
+ 	lwz	14,0x38(3)
+ 	lwz	15,0x3c(3)
+ 	lwz	16,0x40(3)
+ 	lwz	17,0x44(3)
+ 	lwz	18,0x48(3)
+ 	lwz	19,0x4c(3)
+ 	lwz	20,0x50(3)
+ 	lwz	21,0x54(3)
+ 	lwz	22,0x58(3)
+ 	lwz	23,0x5c(3)
+ 	lwz	24,0x60(3)
+ 	lwz	25,0x64(3)
+ 	lwz	26,0x68(3)
+ 	lwz	27,0x6c(3)
+ 	lwz	28,0x70(3)
+ 	lwz	29,0x74(3)
+ 	lwz	30,0x78(3)
+ 	lwz	31,0x7c(3)
+ 	# cr, lr, ctr, xer
+ 	lwz	0, 0x80(3)
+ 	mtcr	0
+ 	lwz	0, 0x84(3)
+ 	mtlr	0
+ 	lwz	0, 0x88(3)
+ 	mtctr	0
+ 	lwz	0, 0x8c(3)
+ 	mtxer	0
+ 	lwz	0, 0x00(3)
+ 	lwz	3, 0x0c(3)
+ 	blr
+ 
+ 
+ 	.align 2
+ ENTRY(_machdep_test_and_set)
+ top:	
+ 	lwarx	5,0,3	# get old value and reserve
+ 	cmpi	0,5,0	# Old value zero?
+ 	bne-	done	# Branch if no
+ 	stwcx.	4,0,3	# Replace zero with NewVal
+ 	bne-	top
+ done:
+ 	mr	3,5
+ 	blr
diff -rcN pthreads-old/machdep/syscall-template-powerpc-netbsd.S pthreads-1_60_beta6/machdep/syscall-template-powerpc-netbsd.S
*** pthreads-old/machdep/syscall-template-powerpc-netbsd.S	Wed Dec 31 19:00:00 1969
--- pthreads-1_60_beta6/machdep/syscall-template-powerpc-netbsd.S	Thu Mar  2 15:20:54 2000
***************
*** 0 ****
--- 1,48 ----
+ #include <machine/asm.h>
+ #include <sys/syscall.h>
+ 
+ #ifdef __STDC__
+ #define SYSCALL(x)	.text	; \
+ 			.align 2 ; \
+ 			ENTRY(machdep_sys_ ## x) ; \
+ 			li 0, (SYS_ ## x) ; \
+ 			sc	;  \
+ 			bnslr	; \
+ 			b err
+ #else /* !__STDC__ */
+ #define SYSCALL(x)	.text	; \
+ 			.align 2 ; \
+ 			ENTRY(machdpe_sys_/**/x) ; \
+ 			li 0, (SYS_/**/x) ; \
+ 			sc	; \
+ 			bnslr	; \
+ 			b err
+ #endif /* !__STDC__ */
+ 
+ 	
+ #ifdef SYS___sigsuspend14
+ #define SYS_sigsuspend SYS___sigsuspend14
+ #endif
+ #ifdef SYS___sigprocmask14
+ #define SYS_sigprocmask SYS___sigprocmask14
+ #endif
+ 	
+ /*
+  * Initial asm stuff for all functions.
+  */
+         .text
+         .align 2
+ 
+ 
+ /* ==========================================================================
+  * error code for all syscalls. The error value is returned as the negative
+  * of the errno value.
+  */
+ 
+ err:
+         neg            3, 3
+         blr
+ 
+ #define XSYSCALL(NAME)	SYSCALL(NAME)
+ 
+ XSYSCALL(SYSCALL_NAME)
>Audit-Trail:
>Unformatted: