summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--devel/pth-syscall/DESCR9
-rw-r--r--devel/pth-syscall/Makefile40
-rw-r--r--devel/pth-syscall/PLIST33
-rw-r--r--devel/pth-syscall/buildlink.mk59
-rw-r--r--devel/pth-syscall/distinfo10
-rw-r--r--devel/pth-syscall/patches/patch-aa30
-rw-r--r--devel/pth-syscall/patches/patch-ab1436
-rw-r--r--devel/pth-syscall/patches/patch-ac58
-rw-r--r--devel/pth-syscall/patches/patch-ad42
-rw-r--r--devel/pth-syscall/patches/patch-ae37
-rw-r--r--devel/pth-syscall/patches/patch-af23
-rw-r--r--devel/pth/Makefile4
-rw-r--r--mk/pthread.buildlink.mk6
13 files changed, 1783 insertions, 4 deletions
diff --git a/devel/pth-syscall/DESCR b/devel/pth-syscall/DESCR
new file mode 100644
index 00000000000..04597abf1f5
--- /dev/null
+++ b/devel/pth-syscall/DESCR
@@ -0,0 +1,9 @@
+PTH is a very portable POSIX/ANSI-C based library for Unix platforms which
+provides non-preemptive scheduling for multiple threads of execution
+("multithreading") inside server applications. All threads run in the same
+address space of the server application, but each thread has its own
+individual program-counter, run-time stack, signal mask and errno variable.
+
+This version makes use of the --enable-syscall-hard option that provides
+replacement syscalls in libpthread. The function gives the appearance of
+some preemptiveness as it provides new syscall entry points.
diff --git a/devel/pth-syscall/Makefile b/devel/pth-syscall/Makefile
new file mode 100644
index 00000000000..1a5d17ddc24
--- /dev/null
+++ b/devel/pth-syscall/Makefile
@@ -0,0 +1,40 @@
+# $NetBSD: Makefile,v 1.1 2002/05/29 08:19:57 skrll Exp $
+#
+
+DISTNAME= pth-1.4.1
+PKGNAME= ${DISTNAME:C/pth/&-syscall/}
+CATEGORIES= devel
+MASTER_SITES= ${MASTER_SITE_GNU:=pth/}
+
+MAINTAINER= packages@netbsd.org
+HOMEPAGE= http://www.gnu.org/software/pth/pth.html
+COMMENT= GNU Portable Thread library
+
+CONFLICTS= pth-current-[0-9]* pth-[0-9]*
+
+USE_BUILDLINK_ONLY= YES
+USE_LIBTOOL= YES
+LTCONFIG_OVERRIDE= ${WRKSRC}/ltconfig
+GNU_CONFIGURE= YES
+CONFIGURE_ARGS+= --enable-pthread
+CONFIGURE_ARGS+= --enable-syscall-hard
+.if (${MACHINE_ARCH} == "i386" && ${CFLAGS:M-O2} == "-O2")
+CFLAGS:= ${CFLAGS:S/-O2/-O0/}
+.endif
+
+# for PLIST
+PTH_MAJOR= 14
+PTH_MINOR= 21
+PLIST_SUBST+= PTH_MAJOR=${PTH_MAJOR} PTH_MINOR=${PTH_MINOR}
+
+test: build
+ @cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} test | \
+ tee ${WRKSRC}/test.log
+
+post-install:
+ ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/pth/
+ cd ${WRKSRC} && ${INSTALL_DATA} ANNOUNCE AUTHORS COPYING HACKING \
+ NEWS README SUPPORT TESTS THANKS USERS pthread.ps rse-pmt.ps \
+ ${PREFIX}/share/doc/pth/
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/devel/pth-syscall/PLIST b/devel/pth-syscall/PLIST
new file mode 100644
index 00000000000..984826a4c3a
--- /dev/null
+++ b/devel/pth-syscall/PLIST
@@ -0,0 +1,33 @@
+@comment $NetBSD: PLIST,v 1.1 2002/05/29 08:19:58 skrll Exp $
+bin/pth-config
+bin/pthread-config
+include/pth.h
+include/pthread.h
+lib/libpth.a
+lib/libpth.la
+lib/libpth.so
+lib/libpth.so.${PTH_MAJOR}
+lib/libpth.so.${PTH_MAJOR}.${PTH_MINOR}
+lib/libpthread.a
+lib/libpthread.la
+lib/libpthread.so
+lib/libpthread.so.${PTH_MAJOR}
+lib/libpthread.so.${PTH_MAJOR}.${PTH_MINOR}
+man/man1/pth-config.1
+man/man1/pthread-config.1
+man/man3/pth.3
+man/man3/pthread.3
+share/aclocal/pth.m4
+share/doc/pth/ANNOUNCE
+share/doc/pth/AUTHORS
+share/doc/pth/COPYING
+share/doc/pth/HACKING
+share/doc/pth/NEWS
+share/doc/pth/README
+share/doc/pth/SUPPORT
+share/doc/pth/TESTS
+share/doc/pth/THANKS
+share/doc/pth/USERS
+share/doc/pth/pthread.ps
+share/doc/pth/rse-pmt.ps
+@dirrm share/doc/pth
diff --git a/devel/pth-syscall/buildlink.mk b/devel/pth-syscall/buildlink.mk
new file mode 100644
index 00000000000..fad1b6f9eb2
--- /dev/null
+++ b/devel/pth-syscall/buildlink.mk
@@ -0,0 +1,59 @@
+# $NetBSD: buildlink.mk,v 1.1 2002/05/29 08:19:58 skrll Exp $
+#
+# This Makefile fragment is included by packages that use pth-syscall.
+#
+# To use this Makefile fragment, simply:
+#
+# (1) Optionally define BUILDLINK_DEPENDS.pth-syscall to the dependency pattern
+# for the version of pth desired.
+# (2) Include this Makefile fragment in the package Makefile,
+# (3) Add ${BUILDLINK_DIR}/include to the front of the C preprocessor's header
+# search path, and
+# (4) Add ${BUILDLINK_DIR}/lib to the front of the linker's library search
+# path.
+
+.if !defined(PTH_SYSCALL_BUILDLINK_MK)
+PTH_SYSCALL_BUILDLINK_MK= # defined
+
+.include "../../mk/bsd.buildlink.mk"
+
+BUILDLINK_DEPENDS.pth-syscall?= pth-syscall>=1.4.1
+DEPENDS+= ${BUILDLINK_DEPENDS.pth-syscall}:../../devel/pth-syscall
+
+EVAL_PREFIX+= BUILDLINK_PREFIX.pth-syscall=pth-syscall
+BUILDLINK_PREFIX.pth-syscall_DEFAULT= ${LOCALBASE}
+BUILDLINK_FILES.pth-syscall= include/pth.h
+BUILDLINK_FILES.pth-syscall+= include/pthread.h
+BUILDLINK_FILES.pth-syscall+= lib/libpth.*
+BUILDLINK_FILES.pth-syscall+= lib/libpthread.*
+
+BUILDLINK_TARGETS.pth-syscall= pth-syscall-buildlink
+BUILDLINK_TARGETS.pth-syscall+= pth-syscall-buildlink-config-wrapper
+BUILDLINK_TARGETS.pth-syscall+= pth-syscall-pthread-buildlink-config-wrapper
+BUILDLINK_TARGETS+= ${BUILDLINK_TARGETS.pth-syscall}
+
+BUILDLINK_CONFIG.pth-syscall= ${BUILDLINK_PREFIX.pth-syscall}/bin/pth-config
+BUILDLINK_CONFIG_WRAPPER.pth-syscall= ${BUILDLINK_DIR}/bin/pth-config
+REPLACE_BUILDLINK_SED+= \
+ -e "s|${BUILDLINK_CONFIG_WRAPPER.pth-syscall}|${BUILDLINK_CONFIG.pth-syscall}|g"
+
+BUILDLINK_CONFIG.pth-syscall-pthread= ${BUILDLINK_PREFIX.pth-syscall}/bin/pthread-config
+BUILDLINK_CONFIG_WRAPPER.pth-syscall-pthread= ${BUILDLINK_DIR}/bin/pthread-config
+REPLACE_BUILDLINK_SED+= \
+ -e "s|${BUILDLINK_CONFIG_WRAPPER.pth-syscall-pthread}|${BUILDLINK_CONFIG.pth-syscall-pthread}|g"
+
+.if defined(USE_CONFIG_WRAPPER)
+PTH_CONFIG?= ${BUILDLINK_CONFIG_WRAPPER.pth-syscall}
+PTHREAD_CONFIG?= ${BUILDLINK_CONFIG_WRAPPER.pth-syscall-pthread}
+CONFIGURE_ENV+= PTH_CONFIG="${PTH_CONFIG}"
+CONFIGURE_ENV+= PTHREAD_CONFIG="${PTHREAD_CONFIG}"
+MAKE_ENV+= PTH_CONFIG="${PTH_CONFIG}"
+MAKE_ENV+= PTHREAD_CONFIG="${PTHREAD_CONFIG}"
+.endif
+
+pre-configure: ${BUILDLINK_TARGETS.pth-syscall}
+pth-syscall-buildlink: _BUILDLINK_USE
+pth-syscall-buildlink-config-wrapper: _BUILDLINK_CONFIG_WRAPPER_USE
+pth-syscall-pthread-buildlink-config-wrapper: _BUILDLINK_CONFIG_WRAPPER_USE
+
+.endif # PTH_SYSCALL_BUILDLINK_MK
diff --git a/devel/pth-syscall/distinfo b/devel/pth-syscall/distinfo
new file mode 100644
index 00000000000..757204a7197
--- /dev/null
+++ b/devel/pth-syscall/distinfo
@@ -0,0 +1,10 @@
+$NetBSD: distinfo,v 1.1 2002/05/29 08:19:58 skrll Exp $
+
+SHA1 (pth-1.4.1.tar.gz) = bc5b0847d57d2b78945a6c8d4ebab57e46213972
+Size (pth-1.4.1.tar.gz) = 446287 bytes
+SHA1 (patch-aa) = c2fafc8eba5f084468fe0d07b1763d801b9ead89
+SHA1 (patch-ab) = 57383d10067e8b8f02f17342c66a8715cfb88659
+SHA1 (patch-ac) = 77202a5f9f39e63b24288051273a3518e80c47ec
+SHA1 (patch-ad) = 0f1e18cff418b066d37333578f2e5874741f2008
+SHA1 (patch-ae) = fe0714f3d1c71f7f347ba217abf918cb7ea8f31b
+SHA1 (patch-af) = 95ab72c602d6b69e10de9e3218f4c455036f40ca
diff --git a/devel/pth-syscall/patches/patch-aa b/devel/pth-syscall/patches/patch-aa
new file mode 100644
index 00000000000..d59bb5f1d78
--- /dev/null
+++ b/devel/pth-syscall/patches/patch-aa
@@ -0,0 +1,30 @@
+$NetBSD: patch-aa,v 1.1 2002/05/29 08:19:59 skrll Exp $
+
+--- Makefile.in.orig Thu Apr 5 10:27:27 2001
++++ Makefile.in
+@@ -59,7 +59,7 @@
+ MKFLAGS = $(MFLAGS) DESTDIR=$(DESTDIR)
+ LIBS = @LIBS@
+ SHTOOL = $(srcdir)/shtool
+-LIBTOOL = $(C)libtool
++LIBTOOL = @LIBTOOL@
+ RM = rm -f
+ RMDIR = rmdir
+ TRUE = true
+@@ -232,14 +232,14 @@
+ $(SHTOOL) install -c -m 644 $(S)pth.m4 $(DESTDIR)$(datadir)/aclocal/pth.m4
+ $(SHTOOL) install -c -m 644 pth.h $(DESTDIR)$(includedir)/pth.h
+ @umask 022; $(LIBTOOL) --mode=install \
+- $(SHTOOL) install -c libpth.la $(DESTDIR)$(libdir)/libpth.la
++ install -c libpth.la $(DESTDIR)$(libdir)/libpth.la
+ install-pthread:
+ $(SHTOOL) install -c -m 755 pthread-config $(DESTDIR)$(bindir)/pthread-config
+ $(SHTOOL) install -c -m 644 $(S)pthread-config.1 $(DESTDIR)$(mandir)/man1/pthread-config.1
+ $(SHTOOL) install -c -m 644 pthread.h $(DESTDIR)$(includedir)/pthread.h
+ $(SHTOOL) install -c -m 644 $(S)pthread.3 $(DESTDIR)$(mandir)/man3/pthread.3
+ @umask 022; $(LIBTOOL) --mode=install \
+- $(SHTOOL) install -c libpthread.la $(DESTDIR)$(libdir)/libpthread.la
++ install -c libpthread.la $(DESTDIR)$(libdir)/libpthread.la
+
+ # uninstall the package
+ uninstall:
diff --git a/devel/pth-syscall/patches/patch-ab b/devel/pth-syscall/patches/patch-ab
new file mode 100644
index 00000000000..b90ca3c1b2e
--- /dev/null
+++ b/devel/pth-syscall/patches/patch-ab
@@ -0,0 +1,1436 @@
+$NetBSD: patch-ab,v 1.1 2002/05/29 08:19:59 skrll Exp $
+
+--- configure.orig Sun Jan 27 07:29:59 2002
++++ configure Sat Mar 23 16:08:21 2002
+@@ -178,5 +178,4 @@
+ silent=
+ site=
+-sitefile=
+ srcdir=
+ target=NONE
+@@ -293,5 +292,4 @@
+ --no-create do not create output files
+ --quiet, --silent do not print \`checking...' messages
+- --site-file=FILE use FILE as the site file
+ --version print the version of autoconf that created configure
+ Directory and file names:
+@@ -464,9 +462,4 @@
+ site="$ac_optarg" ;;
+
+- -site-file | --site-file | --site-fil | --site-fi | --site-f)
+- ac_prev=sitefile ;;
+- -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
+- sitefile="$ac_optarg" ;;
+-
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+@@ -634,14 +627,10 @@
+
+ # Prefer explicitly selected file to automatically selected ones.
+-if test -z "$sitefile"; then
+- if test -z "$CONFIG_SITE"; then
+- if test "x$prefix" != xNONE; then
+- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+- else
+- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+- fi
++if test -z "$CONFIG_SITE"; then
++ if test "x$prefix" != xNONE; then
++ CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
++ else
++ CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+ fi
+-else
+- CONFIG_SITE="$sitefile"
+ fi
+ for ac_site_file in $CONFIG_SITE; do
+@@ -746,5 +735,5 @@
+ set dummy gcc; ac_word=$2
+ echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+-echo "configure:749: checking for $ac_word" >&5
++echo "configure:738: checking for $ac_word" >&5
+ if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+@@ -776,5 +765,5 @@
+ set dummy cc; ac_word=$2
+ echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+-echo "configure:779: checking for $ac_word" >&5
++echo "configure:768: checking for $ac_word" >&5
+ if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+@@ -827,5 +816,5 @@
+ set dummy cl; ac_word=$2
+ echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+-echo "configure:830: checking for $ac_word" >&5
++echo "configure:819: checking for $ac_word" >&5
+ if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+@@ -859,5 +848,5 @@
+
+ echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
+-echo "configure:862: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
++echo "configure:851: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+
+ ac_ext=c
+@@ -870,10 +859,10 @@
+ cat > conftest.$ac_ext << EOF
+
+-#line 873 "configure"
++#line 862 "configure"
+ #include "confdefs.h"
+
+ main(){return(0);}
+ EOF
+-if { (eval echo configure:878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:867: \"$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.
+@@ -901,10 +890,10 @@
+ fi
+ echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
+-echo "configure:904: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
++echo "configure:893: 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:909: checking whether we are using GNU C" >&5
++echo "configure:898: 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
+@@ -915,5 +904,5 @@
+ #endif
+ EOF
+-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:918: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
++if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:907: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+ ac_cv_prog_gcc=yes
+ else
+@@ -934,5 +923,5 @@
+ CFLAGS=
+ echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
+-echo "configure:937: checking whether ${CC-cc} accepts -g" >&5
++echo "configure:926: 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
+@@ -966,5 +955,5 @@
+
+ echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
+-echo "configure:969: checking how to run the C preprocessor" >&5
++echo "configure:958: checking how to run the C preprocessor" >&5
+ # On Suns, sometimes $CPP names a directory.
+ if test -n "$CPP" && test -d "$CPP"; then
+@@ -981,5 +970,5 @@
+ # not just through cpp.
+ cat > conftest.$ac_ext <<EOF
+-#line 984 "configure"
++#line 973 "configure"
+ #include "confdefs.h"
+ #include <assert.h>
+@@ -987,5 +976,5 @@
+ EOF
+ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+-{ (eval echo configure:990: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++{ (eval echo configure:979: \"$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
+@@ -998,5 +987,5 @@
+ CPP="${CC-cc} -E -traditional-cpp"
+ cat > conftest.$ac_ext <<EOF
+-#line 1001 "configure"
++#line 990 "configure"
+ #include "confdefs.h"
+ #include <assert.h>
+@@ -1004,5 +993,5 @@
+ EOF
+ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+-{ (eval echo configure:1007: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++{ (eval echo configure:996: \"$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
+@@ -1015,5 +1004,5 @@
+ CPP="${CC-cc} -nologo -E"
+ cat > conftest.$ac_ext <<EOF
+-#line 1018 "configure"
++#line 1007 "configure"
+ #include "confdefs.h"
+ #include <assert.h>
+@@ -1021,5 +1010,5 @@
+ EOF
+ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+-{ (eval echo configure:1024: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++{ (eval echo configure:1013: \"$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
+@@ -1046,5 +1035,5 @@
+
+ echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
+-echo "configure:1049: checking whether ${MAKE-make} sets \${MAKE}" >&5
++echo "configure:1038: checking whether ${MAKE-make} sets \${MAKE}" >&5
+ set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
+ if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
+@@ -1087,5 +1076,5 @@
+ *-pipe* ) ;;
+ * ) echo $ac_n "checking for compiler option -pipe""... $ac_c" 1>&6
+-echo "configure:1090: checking for compiler option -pipe" >&5
++echo "configure:1079: checking for compiler option -pipe" >&5
+ if eval "test \"`echo '$''{'ac_cv_compiler_option_pipe'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+@@ -1113,5 +1102,5 @@
+ esac
+ echo $ac_n "checking for compiler option -ggdb3""... $ac_c" 1>&6
+-echo "configure:1116: checking for compiler option -ggdb3" >&5
++echo "configure:1105: checking for compiler option -ggdb3" >&5
+ if eval "test \"`echo '$''{'ac_cv_compiler_option_ggdb3'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+@@ -1144,5 +1133,5 @@
+ WMORE="$WMORE -Wmissing-prototypes -Wmissing-declarations -Wnested-externs"
+ echo $ac_n "checking for compiler option -W<xxx>""... $ac_c" 1>&6
+-echo "configure:1147: checking for compiler option -W<xxx>" >&5
++echo "configure:1136: checking for compiler option -W<xxx>" >&5
+ if eval "test \"`echo '$''{'ac_cv_compiler_option_wmore'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+@@ -1169,5 +1158,5 @@
+
+ echo $ac_n "checking for compiler option -Wno-long-long""... $ac_c" 1>&6
+-echo "configure:1172: checking for compiler option -Wno-long-long" >&5
++echo "configure:1161: checking for compiler option -Wno-long-long" >&5
+ if eval "test \"`echo '$''{'ac_cv_compiler_option_wnolonglong'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+@@ -1211,5 +1200,5 @@
+ *-pipe* ) ;;
+ * ) echo $ac_n "checking for compiler option -pipe""... $ac_c" 1>&6
+-echo "configure:1214: checking for compiler option -pipe" >&5
++echo "configure:1203: checking for compiler option -pipe" >&5
+ if eval "test \"`echo '$''{'ac_cv_compiler_option_pipe'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+@@ -1249,5 +1238,5 @@
+ fi
+ echo $ac_n "checking for compilation debug mode""... $ac_c" 1>&6
+-echo "configure:1252: checking for compilation debug mode" >&5
++echo "configure:1241: checking for compilation debug mode" >&5
+ echo "$ac_t""$msg" 1>&6
+ if test ".$msg" = .enabled; then
+@@ -1256,5 +1245,5 @@
+
+ echo $ac_n "checking for compilation profile mode""... $ac_c" 1>&6
+-echo "configure:1259: checking for compilation profile mode" >&5
++echo "configure:1248: checking for compilation profile mode" >&5
+ # Check whether --enable-profile or --disable-profile was given.
+ if test "${enable_profile+set}" = set; then
+@@ -1290,5 +1279,5 @@
+ *-pipe* ) ;;
+ * ) echo $ac_n "checking for compiler option -pipe""... $ac_c" 1>&6
+-echo "configure:1293: checking for compiler option -pipe" >&5
++echo "configure:1282: checking for compiler option -pipe" >&5
+ if eval "test \"`echo '$''{'ac_cv_compiler_option_pipe'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+@@ -1317,5 +1306,5 @@
+ OPT_CFLAGS='-funroll-loops -fstrength-reduce -fomit-frame-pointer -ffast-math'
+ echo $ac_n "checking for compiler option -f<xxx> for optimizations""... $ac_c" 1>&6
+-echo "configure:1320: checking for compiler option -f<xxx> for optimizations" >&5
++echo "configure:1309: checking for compiler option -f<xxx> for optimizations" >&5
+ if eval "test \"`echo '$''{'ac_cv_compiler_option_optimize_std'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+@@ -1345,5 +1334,5 @@
+ OPT_CFLAGS='-malign-functions=4 -malign-jumps=4 -malign-loops=4'
+ echo $ac_n "checking for compiler option -f<xxx> for Intel x86 CPU""... $ac_c" 1>&6
+-echo "configure:1348: checking for compiler option -f<xxx> for Intel x86 CPU" >&5
++echo "configure:1337: checking for compiler option -f<xxx> for Intel x86 CPU" >&5
+ if eval "test \"`echo '$''{'ac_cv_compiler_option_optimize_x86'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+@@ -1380,5 +1369,5 @@
+ *-*-solaris* )
+ echo $ac_n "checking for compiler option -fast""... $ac_c" 1>&6
+-echo "configure:1383: checking for compiler option -fast" >&5
++echo "configure:1372: checking for compiler option -fast" >&5
+ if eval "test \"`echo '$''{'ac_cv_compiler_option_fast'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+@@ -1415,5 +1404,5 @@
+ fi
+ echo $ac_n "checking for compilation optimization mode""... $ac_c" 1>&6
+-echo "configure:1418: checking for compilation optimization mode" >&5
++echo "configure:1407: checking for compilation optimization mode" >&5
+ echo "$ac_t""$msg" 1>&6
+
+@@ -1459,5 +1448,5 @@
+ set dummy ar; ac_word=$2
+ echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+-echo "configure:1462: checking for $ac_word" >&5
++echo "configure:1451: checking for $ac_word" >&5
+ if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+@@ -1488,5 +1477,5 @@
+ set dummy ranlib; ac_word=$2
+ echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+-echo "configure:1491: checking for $ac_word" >&5
++echo "configure:1480: checking for $ac_word" >&5
+ if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+@@ -1571,10 +1560,10 @@
+
+ echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
+-echo "configure:1574: checking for ANSI C header files" >&5
++echo "configure:1563: 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 1579 "configure"
++#line 1568 "configure"
+ #include "confdefs.h"
+ #include <stdlib.h>
+@@ -1584,5 +1573,5 @@
+ EOF
+ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+-{ (eval echo configure:1587: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++{ (eval echo configure:1576: \"$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
+@@ -1601,5 +1590,5 @@
+ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+ cat > conftest.$ac_ext <<EOF
+-#line 1604 "configure"
++#line 1593 "configure"
+ #include "confdefs.h"
+ #include <string.h>
+@@ -1619,5 +1608,5 @@
+ # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+ cat > conftest.$ac_ext <<EOF
+-#line 1622 "configure"
++#line 1611 "configure"
+ #include "confdefs.h"
+ #include <stdlib.h>
+@@ -1640,5 +1629,5 @@
+ else
+ cat > conftest.$ac_ext <<EOF
+-#line 1643 "configure"
++#line 1632 "configure"
+ #include "confdefs.h"
+ #include <ctype.h>
+@@ -1651,5 +1640,5 @@
+
+ EOF
+-if { (eval echo configure:1654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
++if { (eval echo configure:1643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+ then
+ :
+@@ -1678,15 +1667,15 @@
+ ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+ echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+-echo "configure:1681: checking for $ac_hdr" >&5
++echo "configure:1670: 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 1686 "configure"
++#line 1675 "configure"
+ #include "confdefs.h"
+ #include <$ac_hdr>
+ EOF
+ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+-{ (eval echo configure:1691: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++{ (eval echo configure:1680: \"$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
+@@ -1716,10 +1705,10 @@
+ for ac_func in gettimeofday select sigaction sigprocmask sigpending sigsuspend; do
+ echo $ac_n "checking for function $ac_func""... $ac_c" 1>&6
+-echo "configure:1719: checking for function $ac_func" >&5
++echo "configure:1708: checking for function $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 1724 "configure"
++#line 1713 "configure"
+ #include "confdefs.h"
+
+@@ -1748,5 +1737,5 @@
+ ; return 0; }
+ EOF
+-if { (eval echo configure:1751: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:1740: \"$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"
+@@ -1834,5 +1823,5 @@
+
+ echo $ac_n "checking for number of signals""... $ac_c" 1>&6
+-echo "configure:1837: checking for number of signals" >&5
++echo "configure:1826: checking for number of signals" >&5
+ cross_compile=no
+ if test "$cross_compiling" = yes; then
+@@ -1841,5 +1830,5 @@
+ else
+ cat > conftest.$ac_ext <<EOF
+-#line 1844 "configure"
++#line 1833 "configure"
+ #include "confdefs.h"
+
+@@ -1871,5 +1860,5 @@
+
+ EOF
+-if { (eval echo configure:1874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
++if { (eval echo configure:1863: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+ then
+ nsig=`cat conftestval`
+@@ -1891,10 +1880,10 @@
+ for ac_func in poll; do
+ echo $ac_n "checking for function $ac_func""... $ac_c" 1>&6
+-echo "configure:1894: checking for function $ac_func" >&5
++echo "configure:1883: checking for function $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 1899 "configure"
++#line 1888 "configure"
+ #include "confdefs.h"
+
+@@ -1923,5 +1912,5 @@
+ ; return 0; }
+ EOF
+-if { (eval echo configure:1926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:1915: \"$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"
+@@ -1948,10 +1937,10 @@
+
+ echo $ac_n "checking for define POLLIN in poll.h""... $ac_c" 1>&6
+-echo "configure:1951: checking for define POLLIN in poll.h" >&5
++echo "configure:1940: checking for define POLLIN in poll.h" >&5
+ if eval "test \"`echo '$''{'ac_cv_define_POLLIN'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+ else
+ cat > conftest.$ac_ext <<EOF
+-#line 1956 "configure"
++#line 1945 "configure"
+ #include "confdefs.h"
+
+@@ -1982,5 +1971,5 @@
+
+ echo $ac_n "checking whether poll(2) facility has to be faked""... $ac_c" 1>&6
+-echo "configure:1985: checking whether poll(2) facility has to be faked" >&5
++echo "configure:1974: checking whether poll(2) facility has to be faked" >&5
+ ac_rc=yes
+ for ac_spec in func:poll define:POLLIN; do
+@@ -2028,15 +2017,15 @@
+ ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+ echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+-echo "configure:2031: checking for $ac_hdr" >&5
++echo "configure:2020: 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 2036 "configure"
++#line 2025 "configure"
+ #include "confdefs.h"
+ #include <$ac_hdr>
+ EOF
+ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+-{ (eval echo configure:2041: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++{ (eval echo configure:2030: \"$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
+@@ -2066,10 +2055,10 @@
+ for ac_func in readv writev; do
+ echo $ac_n "checking for function $ac_func""... $ac_c" 1>&6
+-echo "configure:2069: checking for function $ac_func" >&5
++echo "configure:2058: checking for function $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 2074 "configure"
++#line 2063 "configure"
+ #include "confdefs.h"
+
+@@ -2098,5 +2087,5 @@
+ ; return 0; }
+ EOF
+-if { (eval echo configure:2101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:2090: \"$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"
+@@ -2123,5 +2112,5 @@
+
+ echo $ac_n "checking whether readv(2)/writev(2) facility has to be faked""... $ac_c" 1>&6
+-echo "configure:2126: checking whether readv(2)/writev(2) facility has to be faked" >&5
++echo "configure:2115: checking whether readv(2)/writev(2) facility has to be faked" >&5
+ ac_rc=yes
+ for ac_spec in func:readv func:writev header:sys/uio.h; do
+@@ -2167,10 +2156,10 @@
+ for ac_func in usleep strerror; do
+ echo $ac_n "checking for function $ac_func""... $ac_c" 1>&6
+-echo "configure:2170: checking for function $ac_func" >&5
++echo "configure:2159: checking for function $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 2175 "configure"
++#line 2164 "configure"
+ #include "confdefs.h"
+
+@@ -2199,5 +2188,5 @@
+ ; return 0; }
+ EOF
+-if { (eval echo configure:2202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:2191: \"$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"
+@@ -2224,19 +2213,19 @@
+
+
+-for ac_hdr in sys/resource.h net/errno.h paths.h
++for ac_hdr in net/errno.h paths.h
+ do
+ ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+ echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+-echo "configure:2231: checking for $ac_hdr" >&5
++echo "configure:2220: 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 2236 "configure"
++#line 2225 "configure"
+ #include "confdefs.h"
+ #include <$ac_hdr>
+ EOF
+ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+-{ (eval echo configure:2241: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++{ (eval echo configure:2230: \"$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
+@@ -2266,5 +2255,5 @@
+
+ echo $ac_n "checking for gethostname in -lnsl""... $ac_c" 1>&6
+-echo "configure:2269: checking for gethostname in -lnsl" >&5
++echo "configure:2258: checking for gethostname in -lnsl" >&5
+ ac_lib_var=`echo nsl'_'gethostname | sed 'y%./+-%__p_%'`
+ if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+@@ -2274,5 +2263,5 @@
+ LIBS="-lnsl $LIBS"
+ cat > conftest.$ac_ext <<EOF
+-#line 2277 "configure"
++#line 2266 "configure"
+ #include "confdefs.h"
+ /* Override any gcc2 internal prototype to avoid an error. */
+@@ -2285,5 +2274,5 @@
+ ; return 0; }
+ EOF
+-if { (eval echo configure:2288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:2277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+@@ -2314,5 +2303,5 @@
+ if test ".`echo $LIBS | grep nsl`" = . ;then
+ echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
+-echo "configure:2317: checking for gethostbyname in -lnsl" >&5
++echo "configure:2306: checking for gethostbyname in -lnsl" >&5
+ ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
+ if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+@@ -2322,5 +2311,5 @@
+ LIBS="-lnsl $LIBS"
+ cat > conftest.$ac_ext <<EOF
+-#line 2325 "configure"
++#line 2314 "configure"
+ #include "confdefs.h"
+ /* Override any gcc2 internal prototype to avoid an error. */
+@@ -2333,5 +2322,5 @@
+ ; return 0; }
+ EOF
+-if { (eval echo configure:2336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:2325: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+@@ -2362,5 +2351,5 @@
+ fi
+ echo $ac_n "checking for accept in -lsocket""... $ac_c" 1>&6
+-echo "configure:2365: checking for accept in -lsocket" >&5
++echo "configure:2354: checking for accept in -lsocket" >&5
+ ac_lib_var=`echo socket'_'accept | sed 'y%./+-%__p_%'`
+ if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+@@ -2370,5 +2359,5 @@
+ LIBS="-lsocket $LIBS"
+ cat > conftest.$ac_ext <<EOF
+-#line 2373 "configure"
++#line 2362 "configure"
+ #include "confdefs.h"
+ /* Override any gcc2 internal prototype to avoid an error. */
+@@ -2381,5 +2370,5 @@
+ ; return 0; }
+ EOF
+-if { (eval echo configure:2384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:2373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+@@ -2413,15 +2402,15 @@
+ ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+ echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+-echo "configure:2416: checking for $ac_hdr" >&5
++echo "configure:2405: 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 2421 "configure"
++#line 2410 "configure"
+ #include "confdefs.h"
+ #include <$ac_hdr>
+ EOF
+ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+-{ (eval echo configure:2426: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++{ (eval echo configure:2415: \"$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
+@@ -2455,11 +2444,57 @@
+
+
++for ac_hdr in sys/resource.h
++do
++ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
++echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
++echo "configure:2451: 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 2456 "configure"
++#include "confdefs.h"
++#include <$ac_hdr>
++EOF
++ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
++{ (eval echo configure:2461: \"$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
++rm -f conftest*
++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
++
++else
++ echo "$ac_t""no" 1>&6
++fi
++done
++
++EXTRA_INCLUDE_SYS_RESOURCE_H="#include <sys/resource.h>"
++if test ".$ac_cv_header_sys_resource_h" != .yes; then
++ EXTRA_INCLUDE_SYS_RESOURCE_H="/* $EXTRA_INCLUDE_SYS_RESOURCE_H */"
++fi
++
++
+ echo $ac_n "checking for typedef sig_atomic_t""... $ac_c" 1>&6
+-echo "configure:2459: checking for typedef sig_atomic_t" >&5
++echo "configure:2494: checking for typedef sig_atomic_t" >&5
+ if eval "test \"`echo '$''{'ac_cv_typedef_sig_atomic_t'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+ else
+ cat > conftest.$ac_ext <<EOF
+-#line 2464 "configure"
++#line 2499 "configure"
+ #include "confdefs.h"
+
+@@ -2493,10 +2528,10 @@
+
+ echo $ac_n "checking for typedef pid_t""... $ac_c" 1>&6
+-echo "configure:2496: checking for typedef pid_t" >&5
++echo "configure:2531: checking for typedef pid_t" >&5
+ if eval "test \"`echo '$''{'ac_cv_typedef_pid_t'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+ else
+ cat > conftest.$ac_ext <<EOF
+-#line 2501 "configure"
++#line 2536 "configure"
+ #include "confdefs.h"
+
+@@ -2530,10 +2565,10 @@
+
+ echo $ac_n "checking for typedef size_t""... $ac_c" 1>&6
+-echo "configure:2533: checking for typedef size_t" >&5
++echo "configure:2568: checking for typedef size_t" >&5
+ if eval "test \"`echo '$''{'ac_cv_typedef_size_t'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+ else
+ cat > conftest.$ac_ext <<EOF
+-#line 2538 "configure"
++#line 2573 "configure"
+ #include "confdefs.h"
+
+@@ -2567,10 +2602,10 @@
+
+ echo $ac_n "checking for typedef ssize_t""... $ac_c" 1>&6
+-echo "configure:2570: checking for typedef ssize_t" >&5
++echo "configure:2605: checking for typedef ssize_t" >&5
+ if eval "test \"`echo '$''{'ac_cv_typedef_ssize_t'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+ else
+ cat > conftest.$ac_ext <<EOF
+-#line 2575 "configure"
++#line 2610 "configure"
+ #include "confdefs.h"
+
+@@ -2604,10 +2639,10 @@
+
+ echo $ac_n "checking for typedef off_t""... $ac_c" 1>&6
+-echo "configure:2607: checking for typedef off_t" >&5
++echo "configure:2642: checking for typedef off_t" >&5
+ if eval "test \"`echo '$''{'ac_cv_typedef_off_t'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+ else
+ cat > conftest.$ac_ext <<EOF
+-#line 2612 "configure"
++#line 2647 "configure"
+ #include "confdefs.h"
+
+@@ -2641,10 +2676,10 @@
+
+ echo $ac_n "checking for typedef stack_t""... $ac_c" 1>&6
+-echo "configure:2644: checking for typedef stack_t" >&5
++echo "configure:2679: checking for typedef stack_t" >&5
+ if eval "test \"`echo '$''{'ac_cv_typedef_stack_t'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+ else
+ cat > conftest.$ac_ext <<EOF
+-#line 2649 "configure"
++#line 2684 "configure"
+ #include "confdefs.h"
+
+@@ -2673,5 +2708,5 @@
+
+ echo $ac_n "checking for attribute ss_base in struct sigaltstack from sys/signal.h""... $ac_c" 1>&6
+-echo "configure:2676: checking for attribute ss_base in struct sigaltstack from sys/signal.h" >&5
++echo "configure:2711: checking for attribute ss_base in struct sigaltstack from sys/signal.h" >&5
+ if eval "test \"`echo '$''{'ac_cv_structattr_ss_base'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+@@ -2679,5 +2714,5 @@
+
+ cat > conftest.$ac_ext <<EOF
+-#line 2682 "configure"
++#line 2717 "configure"
+ #include "confdefs.h"
+
+@@ -2693,5 +2728,5 @@
+ ; return 0; }
+ EOF
+-if { (eval echo configure:2696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:2731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ ac_cv_structattr_ss_base=yes
+@@ -2713,5 +2748,5 @@
+
+ echo $ac_n "checking for attribute ss_sp in struct sigaltstack from sys/signal.h""... $ac_c" 1>&6
+-echo "configure:2716: checking for attribute ss_sp in struct sigaltstack from sys/signal.h" >&5
++echo "configure:2751: checking for attribute ss_sp in struct sigaltstack from sys/signal.h" >&5
+ if eval "test \"`echo '$''{'ac_cv_structattr_ss_sp'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+@@ -2719,5 +2754,5 @@
+
+ cat > conftest.$ac_ext <<EOF
+-#line 2722 "configure"
++#line 2757 "configure"
+ #include "confdefs.h"
+
+@@ -2733,5 +2768,5 @@
+ ; return 0; }
+ EOF
+-if { (eval echo configure:2736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:2771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ ac_cv_structattr_ss_sp=yes
+@@ -2754,8 +2789,8 @@
+
+ echo $ac_n "checking for a single-argument based gettimeofday""... $ac_c" 1>&6
+-echo "configure:2757: checking for a single-argument based gettimeofday" >&5
++echo "configure:2792: checking for a single-argument based gettimeofday" >&5
+ cross_compile=no
+ cat > conftest.$ac_ext <<EOF
+-#line 2760 "configure"
++#line 2795 "configure"
+ #include "confdefs.h"
+
+@@ -2771,5 +2806,5 @@
+ ; return 0; }
+ EOF
+-if { (eval echo configure:2774: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:2809: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ msg="yes"
+@@ -2796,8 +2831,8 @@
+
+ echo $ac_n "checking for struct timespec""... $ac_c" 1>&6
+-echo "configure:2799: checking for struct timespec" >&5
++echo "configure:2834: checking for struct timespec" >&5
+ cross_compile=no
+ cat > conftest.$ac_ext <<EOF
+-#line 2802 "configure"
++#line 2837 "configure"
+ #include "confdefs.h"
+
+@@ -2811,5 +2846,5 @@
+ ; return 0; }
+ EOF
+-if { (eval echo configure:2814: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:2849: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ msg="yes"
+@@ -2832,10 +2867,10 @@
+
+ echo $ac_n "checking for typedef socklen_t""... $ac_c" 1>&6
+-echo "configure:2835: checking for typedef socklen_t" >&5
++echo "configure:2870: checking for typedef socklen_t" >&5
+ if eval "test \"`echo '$''{'ac_cv_typedef_socklen_t'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+ else
+ cat > conftest.$ac_ext <<EOF
+-#line 2840 "configure"
++#line 2875 "configure"
+ #include "confdefs.h"
+
+@@ -2863,5 +2898,5 @@
+
+ echo $ac_n "checking for type of argument 3 for accept()""... $ac_c" 1>&6
+-echo "configure:2866: checking for type of argument 3 for accept()" >&5
++echo "configure:2901: checking for type of argument 3 for accept()" >&5
+ if eval "test \"`echo '$''{'ac_cv_argtype_accept3'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+@@ -2869,5 +2904,5 @@
+
+ cat >conftest.$ac_ext <<EOF
+-#line 2872 "configure"
++#line 2907 "configure"
+ #include "confdefs.h"
+ EOF
+@@ -2927,5 +2962,5 @@
+
+ echo $ac_n "checking for fallback socklen_t""... $ac_c" 1>&6
+-echo "configure:2930: checking for fallback socklen_t" >&5
++echo "configure:2965: checking for fallback socklen_t" >&5
+ if eval "test \"`echo '$''{'ac_cv_check_socklentype'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+@@ -2954,10 +2989,10 @@
+
+ echo $ac_n "checking for typedef nfds_t""... $ac_c" 1>&6
+-echo "configure:2957: checking for typedef nfds_t" >&5
++echo "configure:2992: checking for typedef nfds_t" >&5
+ if eval "test \"`echo '$''{'ac_cv_typedef_nfds_t'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+ else
+ cat > conftest.$ac_ext <<EOF
+-#line 2962 "configure"
++#line 2997 "configure"
+ #include "confdefs.h"
+
+@@ -2985,5 +3020,5 @@
+
+ echo $ac_n "checking for type of argument 2 for poll()""... $ac_c" 1>&6
+-echo "configure:2988: checking for type of argument 2 for poll()" >&5
++echo "configure:3023: checking for type of argument 2 for poll()" >&5
+ if eval "test \"`echo '$''{'ac_cv_argtype_poll2'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+@@ -2991,5 +3026,5 @@
+
+ cat >conftest.$ac_ext <<EOF
+-#line 2994 "configure"
++#line 3029 "configure"
+ #include "confdefs.h"
+ EOF
+@@ -3049,5 +3084,5 @@
+
+ echo $ac_n "checking for fallback nfds_t""... $ac_c" 1>&6
+-echo "configure:3052: checking for fallback nfds_t" >&5
++echo "configure:3087: checking for fallback nfds_t" >&5
+ if eval "test \"`echo '$''{'ac_cv_check_nfdstype'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+@@ -3076,5 +3111,5 @@
+
+ echo $ac_n "checking for built-in type long long""... $ac_c" 1>&6
+-echo "configure:3079: checking for built-in type long long" >&5
++echo "configure:3114: checking for built-in type long long" >&5
+ if eval "test \"`echo '$''{'ac_cv_type_longlong'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+@@ -3082,5 +3117,5 @@
+
+ cat > conftest.$ac_ext <<EOF
+-#line 3085 "configure"
++#line 3120 "configure"
+ #include "confdefs.h"
+
+@@ -3094,5 +3129,5 @@
+ ; return 0; }
+ EOF
+-if { (eval echo configure:3097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:3132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ cat >> confdefs.h <<\EOF
+@@ -3113,5 +3148,5 @@
+
+ echo $ac_n "checking for built-in type long double""... $ac_c" 1>&6
+-echo "configure:3116: checking for built-in type long double" >&5
++echo "configure:3151: checking for built-in type long double" >&5
+ if eval "test \"`echo '$''{'ac_cv_type_longdouble'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+@@ -3119,5 +3154,5 @@
+
+ cat > conftest.$ac_ext <<EOF
+-#line 3122 "configure"
++#line 3157 "configure"
+ #include "confdefs.h"
+
+@@ -3131,5 +3166,5 @@
+ ; return 0; }
+ EOF
+-if { (eval echo configure:3134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:3169: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ cat >> confdefs.h <<\EOF
+@@ -3162,15 +3197,15 @@
+ ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+ echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+-echo "configure:3165: checking for $ac_hdr" >&5
++echo "configure:3200: 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 3170 "configure"
++#line 3205 "configure"
+ #include "confdefs.h"
+ #include <$ac_hdr>
+ EOF
+ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+-{ (eval echo configure:3175: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++{ (eval echo configure:3210: \"$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
+@@ -3200,10 +3235,10 @@
+ for ac_func in makecontext swapcontext getcontext setcontext; do
+ echo $ac_n "checking for function $ac_func""... $ac_c" 1>&6
+-echo "configure:3203: checking for function $ac_func" >&5
++echo "configure:3238: checking for function $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 3208 "configure"
++#line 3243 "configure"
+ #include "confdefs.h"
+
+@@ -3232,5 +3267,5 @@
+ ; return 0; }
+ EOF
+-if { (eval echo configure:3235: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:3270: \"$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"
+@@ -3258,5 +3293,5 @@
+
+ echo $ac_n "checking for usable SVR4/SUSv2 makecontext(2)/swapcontext(2)""... $ac_c" 1>&6
+-echo "configure:3261: checking for usable SVR4/SUSv2 makecontext(2)/swapcontext(2)" >&5
++echo "configure:3296: checking for usable SVR4/SUSv2 makecontext(2)/swapcontext(2)" >&5
+ if eval "test \"`echo '$''{'ac_cv_check_mcsc'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+@@ -3268,5 +3303,5 @@
+ else
+ cat > conftest.$ac_ext <<EOF
+-#line 3271 "configure"
++#line 3306 "configure"
+ #include "confdefs.h"
+
+@@ -3324,5 +3359,5 @@
+
+ EOF
+-if { (eval echo configure:3327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
++if { (eval echo configure:3362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+ then
+ ac_cv_check_mcsc=`cat conftestval`
+@@ -3349,15 +3384,15 @@
+ ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+ echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+-echo "configure:3352: checking for $ac_hdr" >&5
++echo "configure:3387: 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 3357 "configure"
++#line 3392 "configure"
+ #include "confdefs.h"
+ #include <$ac_hdr>
+ EOF
+ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+-{ (eval echo configure:3362: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++{ (eval echo configure:3397: \"$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
+@@ -3387,10 +3422,10 @@
+ for ac_func in sigsetjmp siglongjmp setjmp longjmp _setjmp _longjmp; do
+ echo $ac_n "checking for function $ac_func""... $ac_c" 1>&6
+-echo "configure:3390: checking for function $ac_func" >&5
++echo "configure:3425: checking for function $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 3395 "configure"
++#line 3430 "configure"
+ #include "confdefs.h"
+
+@@ -3419,5 +3454,5 @@
+ ; return 0; }
+ EOF
+-if { (eval echo configure:3422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:3457: \"$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"
+@@ -3445,10 +3480,10 @@
+ for ac_func in sigaltstack sigstack; do
+ echo $ac_n "checking for function $ac_func""... $ac_c" 1>&6
+-echo "configure:3448: checking for function $ac_func" >&5
++echo "configure:3483: checking for function $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 3453 "configure"
++#line 3488 "configure"
+ #include "confdefs.h"
+
+@@ -3477,5 +3512,5 @@
+ ; return 0; }
+ EOF
+-if { (eval echo configure:3480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:3515: \"$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"
+@@ -3502,5 +3537,5 @@
+
+ echo $ac_n "checking for signal-mask aware setjmp(3)/longjmp(3)""... $ac_c" 1>&6
+-echo "configure:3505: checking for signal-mask aware setjmp(3)/longjmp(3)" >&5
++echo "configure:3540: checking for signal-mask aware setjmp(3)/longjmp(3)" >&5
+ if eval "test \"`echo '$''{'ac_cv_check_sjlj'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+@@ -3549,5 +3584,5 @@
+ else
+ cat > conftest.$ac_ext <<EOF
+-#line 3552 "configure"
++#line 3587 "configure"
+ #include "confdefs.h"
+
+@@ -3649,5 +3684,5 @@
+
+ EOF
+-if { (eval echo configure:3652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
++if { (eval echo configure:3687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+ then
+ rc=`cat conftestval`
+@@ -3824,10 +3859,10 @@
+
+ echo $ac_n "checking for typedef stack_t""... $ac_c" 1>&6
+-echo "configure:3827: checking for typedef stack_t" >&5
++echo "configure:3862: checking for typedef stack_t" >&5
+ if eval "test \"`echo '$''{'ac_cv_typedef_stack_t'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+ else
+ cat > conftest.$ac_ext <<EOF
+-#line 3832 "configure"
++#line 3867 "configure"
+ #include "confdefs.h"
+
+@@ -3856,5 +3891,5 @@
+
+ echo $ac_n "checking for direction of stack growth""... $ac_c" 1>&6
+-echo "configure:3859: checking for direction of stack growth" >&5
++echo "configure:3894: checking for direction of stack growth" >&5
+ if eval "test \"`echo '$''{'ac_cv_check_stackgrowth'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+@@ -3867,5 +3902,5 @@
+ else
+ cat > conftest.$ac_ext <<EOF
+-#line 3870 "configure"
++#line 3905 "configure"
+ #include "confdefs.h"
+
+@@ -3896,5 +3931,5 @@
+
+ EOF
+-if { (eval echo configure:3899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
++if { (eval echo configure:3934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+ then
+ ac_cv_check_stackgrowth=`cat conftestval`
+@@ -3932,10 +3967,10 @@
+ for ac_func in makecontext; do
+ echo $ac_n "checking for function $ac_func""... $ac_c" 1>&6
+-echo "configure:3935: checking for function $ac_func" >&5
++echo "configure:3970: checking for function $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 3940 "configure"
++#line 3975 "configure"
+ #include "confdefs.h"
+
+@@ -3964,5 +3999,5 @@
+ ; return 0; }
+ EOF
+-if { (eval echo configure:3967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:4002: \"$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"
+@@ -3990,5 +4025,5 @@
+
+ echo $ac_n "checking for stack setup via makecontext""... $ac_c" 1>&6
+-echo "configure:3993: checking for stack setup via makecontext" >&5
++echo "configure:4028: checking for stack setup via makecontext" >&5
+ if eval "test \"`echo '$''{'ac_cv_stacksetup_makecontext'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+@@ -4007,5 +4042,5 @@
+ else
+ cat > conftest.$ac_ext <<EOF
+-#line 4010 "configure"
++#line 4045 "configure"
+ #include "confdefs.h"
+
+@@ -4142,5 +4177,5 @@
+
+ EOF
+-if { (eval echo configure:4145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
++if { (eval echo configure:4180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+ then
+
+@@ -4181,10 +4216,10 @@
+ for ac_func in sigaltstack; do
+ echo $ac_n "checking for function $ac_func""... $ac_c" 1>&6
+-echo "configure:4184: checking for function $ac_func" >&5
++echo "configure:4219: checking for function $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 4189 "configure"
++#line 4224 "configure"
+ #include "confdefs.h"
+
+@@ -4213,5 +4248,5 @@
+ ; return 0; }
+ EOF
+-if { (eval echo configure:4216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:4251: \"$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"
+@@ -4243,10 +4278,10 @@
+
+ echo $ac_n "checking for typedef stack_t""... $ac_c" 1>&6
+-echo "configure:4246: checking for typedef stack_t" >&5
++echo "configure:4281: checking for typedef stack_t" >&5
+ if eval "test \"`echo '$''{'ac_cv_typedef_stack_t'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+ else
+ cat > conftest.$ac_ext <<EOF
+-#line 4251 "configure"
++#line 4286 "configure"
+ #include "confdefs.h"
+
+@@ -4277,5 +4312,5 @@
+
+ echo $ac_n "checking for stack setup via sigaltstack""... $ac_c" 1>&6
+-echo "configure:4280: checking for stack setup via sigaltstack" >&5
++echo "configure:4315: checking for stack setup via sigaltstack" >&5
+ if eval "test \"`echo '$''{'ac_cv_stacksetup_sigaltstack'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+@@ -4294,5 +4329,5 @@
+ else
+ cat > conftest.$ac_ext <<EOF
+-#line 4297 "configure"
++#line 4332 "configure"
+ #include "confdefs.h"
+
+@@ -4429,5 +4464,5 @@
+
+ EOF
+-if { (eval echo configure:4432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
++if { (eval echo configure:4467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+ then
+
+@@ -4467,10 +4502,10 @@
+ for ac_func in sigstack; do
+ echo $ac_n "checking for function $ac_func""... $ac_c" 1>&6
+-echo "configure:4470: checking for function $ac_func" >&5
++echo "configure:4505: checking for function $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 4475 "configure"
++#line 4510 "configure"
+ #include "confdefs.h"
+
+@@ -4499,5 +4534,5 @@
+ ; return 0; }
+ EOF
+-if { (eval echo configure:4502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:4537: \"$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"
+@@ -4525,5 +4560,5 @@
+
+ echo $ac_n "checking for stack setup via sigstack""... $ac_c" 1>&6
+-echo "configure:4528: checking for stack setup via sigstack" >&5
++echo "configure:4563: checking for stack setup via sigstack" >&5
+ if eval "test \"`echo '$''{'ac_cv_stacksetup_sigstack'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+@@ -4542,5 +4577,5 @@
+ else
+ cat > conftest.$ac_ext <<EOF
+-#line 4545 "configure"
++#line 4580 "configure"
+ #include "confdefs.h"
+
+@@ -4677,5 +4712,5 @@
+
+ EOF
+-if { (eval echo configure:4680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
++if { (eval echo configure:4715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+ then
+
+@@ -4788,10 +4823,10 @@
+ for ac_func in syscall; do
+ echo $ac_n "checking for function $ac_func""... $ac_c" 1>&6
+-echo "configure:4791: checking for function $ac_func" >&5
++echo "configure:4826: checking for function $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 4796 "configure"
++#line 4831 "configure"
+ #include "confdefs.h"
+
+@@ -4820,5 +4855,5 @@
+ ; return 0; }
+ EOF
+-if { (eval echo configure:4823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:4858: \"$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"
+@@ -4848,15 +4883,15 @@
+ ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+ echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+-echo "configure:4851: checking for $ac_hdr" >&5
++echo "configure:4886: 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 4856 "configure"
++#line 4891 "configure"
+ #include "confdefs.h"
+ #include <$ac_hdr>
+ EOF
+ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+-{ (eval echo configure:4861: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++{ (eval echo configure:4896: \"$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
+@@ -4885,10 +4920,10 @@
+
+ echo $ac_n "checking for define SYS_read in sys/syscall.h""... $ac_c" 1>&6
+-echo "configure:4888: checking for define SYS_read in sys/syscall.h" >&5
++echo "configure:4923: checking for define SYS_read in sys/syscall.h" >&5
+ if eval "test \"`echo '$''{'ac_cv_define_SYS_read'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+ else
+ cat > conftest.$ac_ext <<EOF
+-#line 4893 "configure"
++#line 4928 "configure"
+ #include "confdefs.h"
+
+@@ -4920,5 +4955,5 @@
+
+ echo $ac_n "checking whether soft system call mapping is used""... $ac_c" 1>&6
+-echo "configure:4923: checking whether soft system call mapping is used" >&5
++echo "configure:4958: checking whether soft system call mapping is used" >&5
+ # Check whether --enable-syscall-soft or --disable-syscall-soft was given.
+ if test "${enable_syscall_soft+set}" = set; then
+@@ -4942,5 +4977,5 @@
+
+ echo $ac_n "checking whether hard system call mapping is used""... $ac_c" 1>&6
+-echo "configure:4945: checking whether hard system call mapping is used" >&5
++echo "configure:4980: checking whether hard system call mapping is used" >&5
+ # Check whether --enable-syscall-hard or --disable-syscall-hard was given.
+ if test "${enable_syscall_hard+set}" = set; then
+@@ -5013,5 +5048,5 @@
+
+ echo $ac_n "checking whether to activate batch build mode""... $ac_c" 1>&6
+-echo "configure:5016: checking whether to activate batch build mode" >&5
++echo "configure:5051: checking whether to activate batch build mode" >&5
+ # Check whether --enable-batch or --disable-batch was given.
+ if test "${enable_batch+set}" = set; then
+@@ -5030,5 +5065,5 @@
+ TARGET_ALL='$(TARGET_PREQ) $(TARGET_LIBS)'
+ echo $ac_n "checking whether to activate maintainer build targets""... $ac_c" 1>&6
+-echo "configure:5033: checking whether to activate maintainer build targets" >&5
++echo "configure:5068: checking whether to activate maintainer build targets" >&5
+ # Check whether --enable-maintainer or --disable-maintainer was given.
+ if test "${enable_maintainer+set}" = set; then
+@@ -5044,5 +5079,5 @@
+ fi
+ echo $ac_n "checking whether to activate test build targets""... $ac_c" 1>&6
+-echo "configure:5047: checking whether to activate test build targets" >&5
++echo "configure:5082: checking whether to activate test build targets" >&5
+ # Check whether --enable-tests or --disable-tests was given.
+ if test "${enable_tests+set}" = set; then
+@@ -5061,5 +5096,5 @@
+
+ echo $ac_n "checking whether to build Pthread library""... $ac_c" 1>&6
+-echo "configure:5064: checking whether to build Pthread library" >&5
++echo "configure:5099: checking whether to build Pthread library" >&5
+ # Check whether --enable-pthread or --disable-pthread was given.
+ if test "${enable_pthread+set}" = set; then
+@@ -5085,15 +5120,15 @@
+ ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+ echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+-echo "configure:5088: checking for $ac_hdr" >&5
++echo "configure:5123: 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 5093 "configure"
++#line 5128 "configure"
+ #include "confdefs.h"
+ #include <$ac_hdr>
+ EOF
+ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+-{ (eval echo configure:5098: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++{ (eval echo configure:5133: \"$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
+@@ -5154,4 +5189,5 @@
+
+
++
+ PTH_EXT_SFIO=0
+ # Check whether --with-sfio or --without-sfio was given.
+@@ -5220,15 +5256,15 @@
+ ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+ echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+-echo "configure:5223: checking for $ac_hdr" >&5
++echo "configure:5259: 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 5228 "configure"
++#line 5264 "configure"
+ #include "confdefs.h"
+ #include <$ac_hdr>
+ EOF
+ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+-{ (eval echo configure:5233: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++{ (eval echo configure:5269: \"$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
+@@ -5257,5 +5293,5 @@
+
+ echo $ac_n "checking for sfdisc in -lsfio""... $ac_c" 1>&6
+-echo "configure:5260: checking for sfdisc in -lsfio" >&5
++echo "configure:5296: checking for sfdisc in -lsfio" >&5
+ ac_lib_var=`echo sfio'_'sfdisc | sed 'y%./+-%__p_%'`
+ if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+@@ -5265,5 +5301,5 @@
+ LIBS="-lsfio $LIBS"
+ cat > conftest.$ac_ext <<EOF
+-#line 5268 "configure"
++#line 5304 "configure"
+ #include "confdefs.h"
+ /* Override any gcc2 internal prototype to avoid an error. */
+@@ -5276,5 +5312,5 @@
+ ; return 0; }
+ EOF
+-if { (eval echo configure:5279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:5315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+@@ -5347,5 +5383,5 @@
+ fi
+ echo $ac_n "checking whether to build against Sfio library""... $ac_c" 1>&6
+-echo "configure:5350: checking whether to build against Sfio library" >&5
++echo "configure:5386: checking whether to build against Sfio library" >&5
+ if test ".$with_sfio" = .yes; then
+ PTH_EXT_SFIO=1
+@@ -5422,15 +5458,15 @@
+ ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+ echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+-echo "configure:5425: checking for $ac_hdr" >&5
++echo "configure:5461: 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 5430 "configure"
++#line 5466 "configure"
+ #include "confdefs.h"
+ #include <$ac_hdr>
+ EOF
+ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+-{ (eval echo configure:5435: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++{ (eval echo configure:5471: \"$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
+@@ -5459,5 +5495,5 @@
+
+ echo $ac_n "checking for dmalloc_debug in -ldmalloc""... $ac_c" 1>&6
+-echo "configure:5462: checking for dmalloc_debug in -ldmalloc" >&5
++echo "configure:5498: checking for dmalloc_debug in -ldmalloc" >&5
+ ac_lib_var=`echo dmalloc'_'dmalloc_debug | sed 'y%./+-%__p_%'`
+ if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+@@ -5467,5 +5503,5 @@
+ LIBS="-ldmalloc $LIBS"
+ cat > conftest.$ac_ext <<EOF
+-#line 5470 "configure"
++#line 5506 "configure"
+ #include "confdefs.h"
+ /* Override any gcc2 internal prototype to avoid an error. */
+@@ -5478,5 +5514,5 @@
+ ; return 0; }
+ EOF
+-if { (eval echo configure:5481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:5517: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+@@ -5549,5 +5585,5 @@
+ fi
+ echo $ac_n "checking whether to build against Dmalloc library""... $ac_c" 1>&6
+-echo "configure:5552: checking whether to build against Dmalloc library" >&5
++echo "configure:5588: checking whether to build against Dmalloc library" >&5
+ if test ".$with_dmalloc" = .yes; then
+ cat >> confdefs.h <<\EOF
+@@ -5712,4 +5748,5 @@
+ s%@PTH_FAKE_RWV@%$PTH_FAKE_RWV%g
+ s%@EXTRA_INCLUDE_SYS_SELECT_H@%$EXTRA_INCLUDE_SYS_SELECT_H%g
++s%@EXTRA_INCLUDE_SYS_RESOURCE_H@%$EXTRA_INCLUDE_SYS_RESOURCE_H%g
+ s%@FALLBACK_SIG_ATOMIC_T@%$FALLBACK_SIG_ATOMIC_T%g
+ s%@FALLBACK_PID_T@%$FALLBACK_PID_T%g
+@@ -5737,4 +5774,5 @@
+ s%@LIBPTHREAD_A@%$LIBPTHREAD_A%g
+ s%@LIBPTHREAD_LA@%$LIBPTHREAD_LA%g
++s%@LIBTOOL@%$LIBTOOL%g
+ s%@PTHREAD_CONFIG_1@%$PTHREAD_CONFIG_1%g
+ s%@PTHREAD_3@%$PTHREAD_3%g
diff --git a/devel/pth-syscall/patches/patch-ac b/devel/pth-syscall/patches/patch-ac
new file mode 100644
index 00000000000..b60727f01c3
--- /dev/null
+++ b/devel/pth-syscall/patches/patch-ac
@@ -0,0 +1,58 @@
+$NetBSD: patch-ac,v 1.1 2002/05/29 08:20:00 skrll Exp $
+
+--- pth_high.c.orig Sat Mar 24 14:49:58 2001
++++ pth_high.c
+@@ -141,8 +141,43 @@
+ return 0;
+ }
+
++#ifdef HAVE_SYS_RESOURCE_H
++/* Pth variant of wait4(2) */
++pid_t pth_wait4(pid_t wpid, int *status, int options, struct rusage *rusage)
++{
++ pth_event_t ev;
++ static pth_key_t ev_key = PTH_KEY_INIT;
++ pid_t pid;
++
++ pth_debug2("pth_wait4: called from thread \"%s\"", pth_current->name);
++
++ for (;;) {
++ /* do a non-blocking poll for the pid */
++ while ( (pid = pth_sc(wait4)(wpid, status, options|WNOHANG, rusage)) < 0
++ && errno == EINTR) ;
++
++ /* if pid was found or caller requested a polling return immediately */
++ if (pid == -1 || pid > 0 || (pid == 0 && (options & WNOHANG)))
++ break;
++
++ /* else wait a little bit */
++ ev = pth_event(PTH_EVENT_TIME|PTH_MODE_STATIC, &ev_key, pth_timeout(0,250000));
++ pth_wait(ev);
++ }
++
++ pth_debug2("pth_wait4: leave to thread \"%s\"", pth_current->name);
++ return pid;
++}
++
+ /* Pth variant of waitpid(2) */
+-pid_t pth_waitpid(pid_t wpid, int *status, int options)
++pid_t pth_waitpid(pid_t wpid, int *status, int options)
++{
++ return pth_wait4(wpid, status, options, 0);
++}
++
++#else
++/* Pth variant of wait4(2) */
++pid_t pth_waitpid(pid_t wpid, int *status, int options)
+ {
+ pth_event_t ev;
+ static pth_key_t ev_key = PTH_KEY_INIT;
+@@ -167,6 +202,8 @@
+ pth_debug2("pth_waitpid: leave to thread \"%s\"", pth_current->name);
+ return pid;
+ }
++#endif
++
+
+ /* Pth variant of system(3) */
+ int pth_system(const char *cmd)
diff --git a/devel/pth-syscall/patches/patch-ad b/devel/pth-syscall/patches/patch-ad
new file mode 100644
index 00000000000..0e8c40d6caf
--- /dev/null
+++ b/devel/pth-syscall/patches/patch-ad
@@ -0,0 +1,42 @@
+$NetBSD: patch-ad,v 1.1 2002/05/29 08:20:00 skrll Exp $
+
+--- pth_syscall.c.orig Sat Mar 24 14:50:03 2001
++++ pth_syscall.c
+@@ -85,11 +85,13 @@
+ #if cpp
+ #if defined(SYS_sigprocmask)
+ #define PTH_SC_sigprocmask(a1,a2,a3) ((int)syscall(SYS_sigprocmask,(a1),(a2),(a3)))
++#elif defined(SYS___sigprocmask14)
++#define PTH_SC_sigprocmask(a1,a2,a3) ((int)syscall(SYS___sigprocmask14,(a1),(a2),(a3)))
+ #else
+ #define PTH_SC_sigprocmask sigprocmask
+ #endif
+ #endif /* cpp */
+-#if PTH_SYSCALL_HARD && defined(SYS_sigprocmask)
++#if PTH_SYSCALL_HARD && (defined(SYS_sigprocmask) || defined(SYS___sigprocmask14))
+ int sigprocmask(int how, const sigset_t *set, sigset_t *oset)
+ {
+ pth_implicit_init();
+@@ -119,6 +121,22 @@
+ {
+ pth_implicit_init();
+ return pth_waitpid(wpid, status, options);
++}
++#endif
++
++/* Pth hard wrapper for syscall wait4(2) */
++#if cpp
++#if defined(SYS_wait4)
++#define PTH_SC_wait4(a1,a2,a3,a4) ((int)syscall(SYS_wait4,(a1),(a2),(a3),(a4)))
++#else
++#define PTH_SC_wait4 wait4
++#endif
++#endif /* cpp */
++#if PTH_SYSCALL_HARD && defined(SYS_wait4)
++pid_t wait4(pid_t wpid, int *status, int options, struct rusage *rusage)
++{
++ pth_implicit_init();
++ return pth_wait4(wpid, status, options, rusage);
+ }
+ #endif
+
diff --git a/devel/pth-syscall/patches/patch-ae b/devel/pth-syscall/patches/patch-ae
new file mode 100644
index 00000000000..f52fc9d0247
--- /dev/null
+++ b/devel/pth-syscall/patches/patch-ae
@@ -0,0 +1,37 @@
+$NetBSD: patch-ae,v 1.1 2002/05/29 08:20:01 skrll Exp $
+
+--- configure.in.orig Sat Mar 24 14:49:45 2001
++++ configure.in
+@@ -178,7 +178,7 @@
+ AC_CHECK_FUNCTIONS(usleep strerror)
+
+ dnl # check for various other headers which we might need
+-AC_HAVE_HEADERS(sys/resource.h net/errno.h paths.h)
++AC_HAVE_HEADERS(net/errno.h paths.h)
+
+ dnl # at least the test programs need some socket stuff
+ AC_CHECK_LIB(nsl, gethostname)
+@@ -196,6 +196,15 @@
+ fi
+ AC_SUBST(EXTRA_INCLUDE_SYS_SELECT_H)
+
++dnl # check whether we've to use a non-standard #include <sys/resource.h> to get
++dnl # the definition for struct rusage on platforms that support it.
++AC_HAVE_HEADERS(sys/resource.h)
++EXTRA_INCLUDE_SYS_RESOURCE_H="#include <sys/resource.h>"
++if test ".$ac_cv_header_sys_resource_h" != .yes; then
++ EXTRA_INCLUDE_SYS_RESOURCE_H="/* $EXTRA_INCLUDE_SYS_RESOURCE_H */"
++fi
++AC_SUBST(EXTRA_INCLUDE_SYS_RESOURCE_H)
++
+ dnl # check whether we've to define sig_atomic_t
+ AC_CHECK_TYPEDEF(sig_atomic_t, signal.h)
+ FALLBACK_SIG_ATOMIC_T="typedef int sig_atomic_t;"
+@@ -563,6 +572,7 @@
+ AC_SUBST(PTHREAD_O)
+ AC_SUBST(LIBPTHREAD_A)
+ AC_SUBST(LIBPTHREAD_LA)
++AC_SUBST(LIBTOOL)
+ AC_SUBST(PTHREAD_CONFIG_1)
+ AC_SUBST(PTHREAD_3)
+ AC_SUBST(INSTALL_PTHREAD)
diff --git a/devel/pth-syscall/patches/patch-af b/devel/pth-syscall/patches/patch-af
new file mode 100644
index 00000000000..e04d74e777b
--- /dev/null
+++ b/devel/pth-syscall/patches/patch-af
@@ -0,0 +1,23 @@
+$NetBSD: patch-af,v 1.1 2002/05/29 08:20:01 skrll Exp $
+
+--- pth.h.in.orig Sat Mar 24 14:49:49 2001
++++ pth.h.in
+@@ -44,6 +44,7 @@
+ #include <sys/socket.h> /* for sockaddr */
+ #include <sys/signal.h> /* for sigset_t */
+ @EXTRA_INCLUDE_SYS_SELECT_H@
++@EXTRA_INCLUDE_SYS_RESOURCE_H@
+
+ /* fallbacks for essential typedefs */
+ #ifndef _PTHREAD_PRIVATE
+@@ -499,7 +500,10 @@
+ extern ssize_t pth_pread(int, void *, size_t, off_t);
+ extern ssize_t pth_pwrite(int, const void *, size_t, off_t);
+
++ /* additional replacement functions */
++extern pid_t pth_wait4(pid_t, int *, int, struct rusage *);
+ END_DECLARATION
++
+
+ /* soft system call mapping support */
+ #if PTH_SYSCALL_SOFT && !defined(_PTH_PRIVATE)
diff --git a/devel/pth/Makefile b/devel/pth/Makefile
index 18dac6575ad..672f989c3f5 100644
--- a/devel/pth/Makefile
+++ b/devel/pth/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.40 2002/03/24 18:47:38 dmcmahill Exp $
+# $NetBSD: Makefile,v 1.41 2002/05/29 08:19:56 skrll Exp $
#
DISTNAME= pth-1.4.1
@@ -9,7 +9,7 @@ MAINTAINER= packages@netbsd.org
HOMEPAGE= http://www.gnu.org/software/pth/pth.html
COMMENT= GNU Portable Thread library
-CONFLICTS= pth-current-[0-9]*
+CONFLICTS= pth-current-[0-9]* pth-syscall-[0-9]*
USE_BUILDLINK_ONLY= YES
USE_LIBTOOL= YES
diff --git a/mk/pthread.buildlink.mk b/mk/pthread.buildlink.mk
index e756837012a..b9c7f36e60d 100644
--- a/mk/pthread.buildlink.mk
+++ b/mk/pthread.buildlink.mk
@@ -1,4 +1,4 @@
-# $NetBSD: pthread.buildlink.mk,v 1.4 2002/03/23 01:24:44 dmcmahill Exp $
+# $NetBSD: pthread.buildlink.mk,v 1.5 2002/05/29 08:19:55 skrll Exp $
#
# This Makefile fragment is included by packages that use pthreads.
# This Makefile fragment is also included directly by bsd.prefs.mk.
@@ -34,7 +34,7 @@
# pthread.buildlink.mk
#
.if defined(USE_PTHREAD)
-_PKG_PTHREADS?= pth ptl2 mit-pthreads unproven-pthreads
+_PKG_PTHREADS?= pth pth-syscall ptl2 mit-pthreads unproven-pthreads
.for __valid_pthread__ in ${USE_PTHREAD}
. if !empty(_PKG_PTHREADS:M${__valid_pthread__})
@@ -85,6 +85,8 @@ pthread-buildlink: _BUILDLINK_USE
.elif ${PTHREAD_TYPE} == "pth"
. include "../../devel/pth/buildlink.mk"
+.elif ${PTHREAD_TYPE} == "pth-syscall"
+. include "../../devel/pth-syscall/buildlink.mk"
#
# XXX The remaining pthread packages here need to have sensible buildlink.mk
# XXX created that may all be used more-or-less interchangeably. This is