Imported Upstream version 4.10.6 upstream/4.10.6
authorJohn <john.l.whiteman@intel.com>
Wed, 30 Jul 2014 21:13:21 +0000 (14:13 -0700)
committerJohn <john.l.whiteman@intel.com>
Wed, 30 Jul 2014 21:13:21 +0000 (14:13 -0700)
656 files changed:
.cvsignore [moved from nspr/.cvsignore with 100% similarity]
.hg_archival.txt [new file with mode: 0644]
.hgignore [moved from nspr/.hgignore with 100% similarity]
LICENSE [moved from nspr/LICENSE with 100% similarity]
Makefile.in [moved from nspr/Makefile.in with 100% similarity]
admin/explode.pl [moved from nspr/admin/explode.pl with 100% similarity]
admin/makeTargetDirs.sh [moved from nspr/admin/makeTargetDirs.sh with 100% similarity]
admin/symlinks.sh [moved from nspr/admin/symlinks.sh with 100% similarity]
build/autoconf/README [new file with mode: 0644]
build/autoconf/config.guess [moved from nspr/build/autoconf/config.guess with 72% similarity]
build/autoconf/config.sub [moved from nspr/build/autoconf/config.sub with 86% similarity]
build/autoconf/install-sh [moved from nspr/build/autoconf/install-sh with 100% similarity]
build/autoconf/patches/config.sub.patch [new file with mode: 0644]
build/cygwin-wrapper [moved from nspr/build/cygwin-wrapper with 100% similarity]
build/win32/pgomerge.py [moved from nspr/build/win32/pgomerge.py with 100% similarity]
config/.cvsignore [moved from nspr/config/.cvsignore with 100% similarity]
config/Makefile.in [moved from nspr/config/Makefile.in with 100% similarity]
config/autoconf.mk.in [moved from nspr/config/autoconf.mk.in with 98% similarity]
config/config.mk [moved from nspr/config/config.mk with 100% similarity]
config/gcc_hidden.h [moved from nspr/config/gcc_hidden.h with 100% similarity]
config/libc_r.h [moved from nspr/config/libc_r.h with 100% similarity]
config/make-system-wrappers.pl [moved from nspr/config/make-system-wrappers.pl with 100% similarity]
config/nfspwd.pl [moved from nspr/config/nfspwd.pl with 100% similarity]
config/now.c [new file with mode: 0644]
config/nsinstall.c [moved from nspr/config/nsinstall.c with 99% similarity]
config/nspr-config.in [moved from nspr/config/nspr-config.in with 100% similarity]
config/nspr.m4 [moved from nspr/config/nspr.m4 with 100% similarity]
config/nspr.pc.in [moved from nspr/config/nspr.pc.in with 100% similarity]
config/nsprincl.mk.in [moved from nspr/config/nsprincl.mk.in with 100% similarity]
config/nsprincl.sh.in [moved from nspr/config/nsprincl.sh.in with 100% similarity]
config/pathsub.h [moved from nspr/config/pathsub.h with 100% similarity]
config/prdepend.h [moved from nspr/config/prdepend.h with 100% similarity]
config/rules.mk [moved from nspr/config/rules.mk with 100% similarity]
config/system-headers [moved from nspr/config/system-headers with 100% similarity]
configure [new file with mode: 0755]
configure.in [moved from nspr/configure.in with 96% similarity]
lib/.cvsignore [moved from nspr/tools/.cvsignore with 100% similarity]
lib/Makefile.in [moved from nspr/lib/Makefile.in with 100% similarity]
lib/ds/.cvsignore [moved from nspr/lib/libc/src/.cvsignore with 100% similarity]
lib/ds/Makefile.in [moved from nspr/lib/ds/Makefile.in with 100% similarity]
lib/ds/plarena.c [moved from nspr/lib/ds/plarena.c with 100% similarity]
lib/ds/plarena.h [moved from nspr/lib/ds/plarena.h with 100% similarity]
lib/ds/plarenas.h [moved from nspr/lib/ds/plarenas.h with 100% similarity]
lib/ds/plds.def [moved from nspr/lib/ds/plds.def with 100% similarity]
lib/ds/plds.rc [moved from nspr/lib/ds/plds.rc with 100% similarity]
lib/ds/plhash.c [moved from nspr/lib/ds/plhash.c with 100% similarity]
lib/ds/plhash.h [moved from nspr/lib/ds/plhash.h with 100% similarity]
lib/ds/plvrsion.c [moved from nspr/lib/ds/plvrsion.c with 100% similarity]
lib/libc/.cvsignore [moved from nspr/pr/tests/dll/.cvsignore with 100% similarity]
lib/libc/Makefile.in [moved from nspr/lib/libc/Makefile.in with 100% similarity]
lib/libc/README [moved from nspr/lib/libc/src/README with 100% similarity]
lib/libc/include/.cvsignore [moved from nspr/pr/tests/.cvsignore with 100% similarity]
lib/libc/include/Makefile.in [moved from nspr/lib/libc/include/Makefile.in with 100% similarity]
lib/libc/include/README [moved from nspr/lib/libc/include/README with 100% similarity]
lib/libc/include/plbase64.h [moved from nspr/lib/libc/include/plbase64.h with 100% similarity]
lib/libc/include/plerror.h [moved from nspr/lib/libc/include/plerror.h with 100% similarity]
lib/libc/include/plgetopt.h [moved from nspr/lib/libc/include/plgetopt.h with 100% similarity]
lib/libc/include/plstr.h [moved from nspr/lib/libc/include/plstr.h with 100% similarity]
lib/libc/src/.cvsignore [moved from nspr/lib/ds/.cvsignore with 100% similarity]
lib/libc/src/Makefile.in [moved from nspr/lib/libc/src/Makefile.in with 100% similarity]
lib/libc/src/README [moved from nspr/lib/libc/README with 100% similarity]
lib/libc/src/base64.c [moved from nspr/lib/libc/src/base64.c with 100% similarity]
lib/libc/src/plc.def [moved from nspr/lib/libc/src/plc.def with 100% similarity]
lib/libc/src/plc.rc [moved from nspr/lib/libc/src/plc.rc with 100% similarity]
lib/libc/src/plerror.c [moved from nspr/lib/libc/src/plerror.c with 100% similarity]
lib/libc/src/plgetopt.c [moved from nspr/lib/libc/src/plgetopt.c with 100% similarity]
lib/libc/src/plvrsion.c [moved from nspr/lib/libc/src/plvrsion.c with 100% similarity]
lib/libc/src/strcase.c [moved from nspr/lib/libc/src/strcase.c with 100% similarity]
lib/libc/src/strcat.c [moved from nspr/lib/libc/src/strcat.c with 100% similarity]
lib/libc/src/strchr.c [moved from nspr/lib/libc/src/strchr.c with 100% similarity]
lib/libc/src/strcmp.c [moved from nspr/lib/libc/src/strcmp.c with 100% similarity]
lib/libc/src/strcpy.c [moved from nspr/lib/libc/src/strcpy.c with 100% similarity]
lib/libc/src/strdup.c [moved from nspr/lib/libc/src/strdup.c with 100% similarity]
lib/libc/src/strlen.c [moved from nspr/lib/libc/src/strlen.c with 100% similarity]
lib/libc/src/strpbrk.c [moved from nspr/lib/libc/src/strpbrk.c with 100% similarity]
lib/libc/src/strstr.c [moved from nspr/lib/libc/src/strstr.c with 100% similarity]
lib/libc/src/strtok.c [moved from nspr/lib/libc/src/strtok.c with 100% similarity]
lib/prstreams/.cvsignore [moved from nspr/pr/src/threads/combined/.cvsignore with 100% similarity]
lib/prstreams/Makefile.in [moved from nspr/lib/prstreams/Makefile.in with 100% similarity]
lib/prstreams/plvrsion.c [moved from nspr/lib/prstreams/plvrsion.c with 100% similarity]
lib/prstreams/prstrms.cpp [moved from nspr/lib/prstreams/prstrms.cpp with 100% similarity]
lib/prstreams/prstrms.h [moved from nspr/lib/prstreams/prstrms.h with 100% similarity]
lib/prstreams/prstrms.rc [moved from nspr/lib/prstreams/prstrms.rc with 100% similarity]
lib/prstreams/tests/testprstrm/.cvsignore [moved from nspr/pr/src/threads/.cvsignore with 100% similarity]
lib/prstreams/tests/testprstrm/Makefile.in [moved from nspr/lib/prstreams/tests/testprstrm/Makefile.in with 98% similarity]
lib/prstreams/tests/testprstrm/testprstrm.cpp [moved from nspr/lib/prstreams/tests/testprstrm/testprstrm.cpp with 100% similarity]
lib/tests/.cvsignore [moved from nspr/pr/src/pthreads/.cvsignore with 100% similarity]
lib/tests/Makefile.in [moved from nspr/lib/tests/Makefile.in with 98% similarity]
lib/tests/arena.c [moved from nspr/lib/tests/arena.c with 100% similarity]
lib/tests/base64t.c [moved from nspr/lib/tests/base64t.c with 100% similarity]
lib/tests/getopt.c [moved from nspr/lib/tests/getopt.c with 100% similarity]
lib/tests/string.c [moved from nspr/lib/tests/string.c with 100% similarity]
nspr/.hg_archival.txt [deleted file]
nspr/aclocal.m4 [deleted file]
nspr/build/autoconf/acwinpaths.m4 [deleted file]
nspr/config/now.c [deleted file]
nspr/configure [deleted file]
nspr/pr/src/threads/prmon.c [deleted file]
pkg/Makefile.in [moved from nspr/pkg/Makefile.in with 100% similarity]
pkg/linux/Makefile.in [moved from nspr/pkg/linux/Makefile.in with 100% similarity]
pkg/linux/sun-nspr.spec [moved from nspr/pkg/linux/sun-nspr.spec with 100% similarity]
pkg/solaris/Makefile-devl.com [moved from nspr/pkg/solaris/Makefile-devl.com with 100% similarity]
pkg/solaris/Makefile-devl.targ [moved from nspr/pkg/solaris/Makefile-devl.targ with 100% similarity]
pkg/solaris/Makefile.com [moved from nspr/pkg/solaris/Makefile.com with 100% similarity]
pkg/solaris/Makefile.in [moved from nspr/pkg/solaris/Makefile.in with 100% similarity]
pkg/solaris/Makefile.targ [moved from nspr/pkg/solaris/Makefile.targ with 100% similarity]
pkg/solaris/SUNWpr/Makefile.in [moved from nspr/pkg/solaris/SUNWpr/Makefile.in with 100% similarity]
pkg/solaris/SUNWpr/depend [moved from nspr/pkg/solaris/SUNWpr/depend with 100% similarity]
pkg/solaris/SUNWpr/pkginfo.tmpl [moved from nspr/pkg/solaris/SUNWpr/pkginfo.tmpl with 100% similarity]
pkg/solaris/SUNWpr/prototype_com [moved from nspr/pkg/solaris/SUNWpr/prototype_com with 100% similarity]
pkg/solaris/SUNWpr/prototype_i386 [moved from nspr/pkg/solaris/SUNWpr/prototype_i386 with 100% similarity]
pkg/solaris/SUNWpr/prototype_sparc [moved from nspr/pkg/solaris/SUNWpr/prototype_sparc with 100% similarity]
pkg/solaris/SUNWprd/Makefile.in [moved from nspr/pkg/solaris/SUNWprd/Makefile.in with 100% similarity]
pkg/solaris/SUNWprd/depend [moved from nspr/pkg/solaris/SUNWprd/depend with 100% similarity]
pkg/solaris/SUNWprd/pkginfo.tmpl [moved from nspr/pkg/solaris/SUNWprd/pkginfo.tmpl with 100% similarity]
pkg/solaris/SUNWprd/prototype [moved from nspr/pkg/solaris/SUNWprd/prototype with 100% similarity]
pkg/solaris/bld_awk_pkginfo.ksh [moved from nspr/pkg/solaris/bld_awk_pkginfo.ksh with 100% similarity]
pkg/solaris/common_files/copyright [moved from nspr/pkg/solaris/common_files/copyright with 100% similarity]
pkg/solaris/proto64.mk [moved from nspr/pkg/solaris/proto64.mk with 100% similarity]
pr/.cvsignore [moved from nspr/pr/src/misc/.cvsignore with 100% similarity]
pr/Makefile.in [moved from nspr/pr/Makefile.in with 100% similarity]
pr/include/.cvsignore [moved from nspr/pr/src/memory/.cvsignore with 100% similarity]
pr/include/Makefile.in [moved from nspr/pr/include/Makefile.in with 100% similarity]
pr/include/gencfg.c [moved from nspr/pr/include/gencfg.c with 100% similarity]
pr/include/md/.cvsignore [moved from nspr/pr/src/md/windows/.cvsignore with 100% similarity]
pr/include/md/Makefile.in [moved from nspr/pr/include/md/Makefile.in with 100% similarity]
pr/include/md/_aix.h [moved from nspr/pr/include/md/_aix.h with 100% similarity]
pr/include/md/_aix32.cfg [moved from nspr/pr/include/md/_aix32.cfg with 100% similarity]
pr/include/md/_aix64.cfg [moved from nspr/pr/include/md/_aix64.cfg with 100% similarity]
pr/include/md/_beos.cfg [moved from nspr/pr/include/md/_beos.cfg with 100% similarity]
pr/include/md/_beos.h [moved from nspr/pr/include/md/_beos.h with 100% similarity]
pr/include/md/_bsdi.cfg [moved from nspr/pr/include/md/_bsdi.cfg with 100% similarity]
pr/include/md/_bsdi.h [moved from nspr/pr/include/md/_bsdi.h with 100% similarity]
pr/include/md/_darwin.cfg [moved from nspr/pr/include/md/_darwin.cfg with 99% similarity]
pr/include/md/_darwin.h [moved from nspr/pr/include/md/_darwin.h with 98% similarity]
pr/include/md/_dgux.cfg [moved from nspr/pr/include/md/_dgux.cfg with 100% similarity]
pr/include/md/_dgux.h [moved from nspr/pr/include/md/_dgux.h with 100% similarity]
pr/include/md/_freebsd.cfg [moved from nspr/pr/include/md/_freebsd.cfg with 100% similarity]
pr/include/md/_freebsd.h [moved from nspr/pr/include/md/_freebsd.h with 100% similarity]
pr/include/md/_hpux.h [moved from nspr/pr/include/md/_hpux.h with 100% similarity]
pr/include/md/_hpux32.cfg [moved from nspr/pr/include/md/_hpux32.cfg with 100% similarity]
pr/include/md/_hpux64.cfg [moved from nspr/pr/include/md/_hpux64.cfg with 100% similarity]
pr/include/md/_irix.h [moved from nspr/pr/include/md/_irix.h with 100% similarity]
pr/include/md/_irix32.cfg [moved from nspr/pr/include/md/_irix32.cfg with 100% similarity]
pr/include/md/_irix64.cfg [moved from nspr/pr/include/md/_irix64.cfg with 100% similarity]
pr/include/md/_linux.cfg [moved from nspr/pr/include/md/_linux.cfg with 99% similarity]
pr/include/md/_linux.h [moved from nspr/pr/include/md/_linux.h with 97% similarity]
pr/include/md/_netbsd.cfg [moved from nspr/pr/include/md/_netbsd.cfg with 100% similarity]
pr/include/md/_netbsd.h [moved from nspr/pr/include/md/_netbsd.h with 100% similarity]
pr/include/md/_nspr_pthread.h [moved from nspr/pr/include/md/_nspr_pthread.h with 100% similarity]
pr/include/md/_nto.cfg [moved from nspr/pr/include/md/_nto.cfg with 100% similarity]
pr/include/md/_nto.h [moved from nspr/pr/include/md/_nto.h with 100% similarity]
pr/include/md/_openbsd.cfg [moved from nspr/pr/include/md/_openbsd.cfg with 100% similarity]
pr/include/md/_openbsd.h [moved from nspr/pr/include/md/_openbsd.h with 100% similarity]
pr/include/md/_os2.cfg [moved from nspr/pr/include/md/_os2.cfg with 100% similarity]
pr/include/md/_os2.h [moved from nspr/pr/include/md/_os2.h with 100% similarity]
pr/include/md/_os2_errors.h [moved from nspr/pr/include/md/_os2_errors.h with 100% similarity]
pr/include/md/_osf1.cfg [moved from nspr/pr/include/md/_osf1.cfg with 100% similarity]
pr/include/md/_osf1.h [moved from nspr/pr/include/md/_osf1.h with 100% similarity]
pr/include/md/_pcos.h [moved from nspr/pr/include/md/_pcos.h with 100% similarity]
pr/include/md/_pth.h [moved from nspr/pr/include/md/_pth.h with 100% similarity]
pr/include/md/_qnx.cfg [moved from nspr/pr/include/md/_qnx.cfg with 100% similarity]
pr/include/md/_qnx.h [moved from nspr/pr/include/md/_qnx.h with 100% similarity]
pr/include/md/_riscos.cfg [moved from nspr/pr/include/md/_riscos.cfg with 100% similarity]
pr/include/md/_riscos.h [moved from nspr/pr/include/md/_riscos.h with 100% similarity]
pr/include/md/_scoos.cfg [moved from nspr/pr/include/md/_scoos.cfg with 100% similarity]
pr/include/md/_scoos.h [moved from nspr/pr/include/md/_scoos.h with 100% similarity]
pr/include/md/_solaris.cfg [moved from nspr/pr/include/md/_solaris.cfg with 100% similarity]
pr/include/md/_solaris.h [moved from nspr/pr/include/md/_solaris.h with 100% similarity]
pr/include/md/_symbian.cfg [moved from nspr/pr/include/md/_symbian.cfg with 100% similarity]
pr/include/md/_symbian.h [moved from nspr/pr/include/md/_symbian.h with 100% similarity]
pr/include/md/_unix_errors.h [moved from nspr/pr/include/md/_unix_errors.h with 100% similarity]
pr/include/md/_unixos.h [moved from nspr/pr/include/md/_unixos.h with 99% similarity]
pr/include/md/_unixware.cfg [moved from nspr/pr/include/md/_unixware.cfg with 100% similarity]
pr/include/md/_unixware.h [moved from nspr/pr/include/md/_unixware.h with 100% similarity]
pr/include/md/_unixware7.cfg [moved from nspr/pr/include/md/_unixware7.cfg with 100% similarity]
pr/include/md/_win32_errors.h [moved from nspr/pr/include/md/_win32_errors.h with 100% similarity]
pr/include/md/_win95.cfg [moved from nspr/pr/include/md/_win95.cfg with 100% similarity]
pr/include/md/_win95.h [moved from nspr/pr/include/md/_win95.h with 99% similarity]
pr/include/md/_winnt.cfg [moved from nspr/pr/include/md/_winnt.cfg with 100% similarity]
pr/include/md/_winnt.h [moved from nspr/pr/include/md/_winnt.h with 99% similarity]
pr/include/md/prosdep.h [moved from nspr/pr/include/md/prosdep.h with 100% similarity]
pr/include/nspr.h [moved from nspr/pr/include/nspr.h with 100% similarity]
pr/include/obsolete/.cvsignore [moved from nspr/pr/src/md/unix/.cvsignore with 100% similarity]
pr/include/obsolete/Makefile.in [moved from nspr/pr/include/obsolete/Makefile.in with 100% similarity]
pr/include/obsolete/pralarm.h [moved from nspr/pr/include/obsolete/pralarm.h with 100% similarity]
pr/include/obsolete/probslet.h [moved from nspr/pr/include/obsolete/probslet.h with 100% similarity]
pr/include/obsolete/protypes.h [moved from nspr/pr/include/obsolete/protypes.h with 100% similarity]
pr/include/obsolete/prsem.h [moved from nspr/pr/include/obsolete/prsem.h with 100% similarity]
pr/include/pratom.h [moved from nspr/pr/include/pratom.h with 98% similarity]
pr/include/prbit.h [moved from nspr/pr/include/prbit.h with 100% similarity]
pr/include/prclist.h [moved from nspr/pr/include/prclist.h with 100% similarity]
pr/include/prcmon.h [moved from nspr/pr/include/prcmon.h with 100% similarity]
pr/include/prcountr.h [moved from nspr/pr/include/prcountr.h with 100% similarity]
pr/include/prcvar.h [moved from nspr/pr/include/prcvar.h with 100% similarity]
pr/include/prdtoa.h [moved from nspr/pr/include/prdtoa.h with 100% similarity]
pr/include/prenv.h [moved from nspr/pr/include/prenv.h with 100% similarity]
pr/include/prerr.h [moved from nspr/pr/include/prerr.h with 100% similarity]
pr/include/prerror.h [moved from nspr/pr/include/prerror.h with 100% similarity]
pr/include/prinet.h [moved from nspr/pr/include/prinet.h with 100% similarity]
pr/include/prinit.h [moved from nspr/pr/include/prinit.h with 99% similarity]
pr/include/prinrval.h [moved from nspr/pr/include/prinrval.h with 100% similarity]
pr/include/prio.h [moved from nspr/pr/include/prio.h with 99% similarity]
pr/include/pripcsem.h [moved from nspr/pr/include/pripcsem.h with 100% similarity]
pr/include/private/.cvsignore [moved from nspr/pr/src/md/os2/.cvsignore with 100% similarity]
pr/include/private/Makefile.in [moved from nspr/pr/include/private/Makefile.in with 100% similarity]
pr/include/private/pprio.h [moved from nspr/pr/include/private/pprio.h with 100% similarity]
pr/include/private/pprmwait.h [moved from nspr/pr/include/private/pprmwait.h with 100% similarity]
pr/include/private/pprthred.h [moved from nspr/pr/include/private/pprthred.h with 100% similarity]
pr/include/private/primpl.h [moved from nspr/pr/include/private/primpl.h with 96% similarity]
pr/include/private/prpriv.h [moved from nspr/pr/include/private/prpriv.h with 100% similarity]
pr/include/prlink.h [moved from nspr/pr/include/prlink.h with 100% similarity]
pr/include/prlock.h [moved from nspr/pr/include/prlock.h with 100% similarity]
pr/include/prlog.h [moved from nspr/pr/include/prlog.h with 100% similarity]
pr/include/prlong.h [moved from nspr/pr/include/prlong.h with 100% similarity]
pr/include/prmem.h [moved from nspr/pr/include/prmem.h with 100% similarity]
pr/include/prmon.h [moved from nspr/pr/include/prmon.h with 100% similarity]
pr/include/prmwait.h [moved from nspr/pr/include/prmwait.h with 100% similarity]
pr/include/prnetdb.h [moved from nspr/pr/include/prnetdb.h with 100% similarity]
pr/include/prolock.h [moved from nspr/pr/include/prolock.h with 100% similarity]
pr/include/prpdce.h [moved from nspr/pr/include/prpdce.h with 100% similarity]
pr/include/prprf.h [moved from nspr/pr/include/prprf.h with 100% similarity]
pr/include/prproces.h [moved from nspr/pr/include/prproces.h with 100% similarity]
pr/include/prrng.h [moved from nspr/pr/include/prrng.h with 100% similarity]
pr/include/prrwlock.h [moved from nspr/pr/include/prrwlock.h with 100% similarity]
pr/include/prshm.h [moved from nspr/pr/include/prshm.h with 100% similarity]
pr/include/prshma.h [moved from nspr/pr/include/prshma.h with 100% similarity]
pr/include/prsystem.h [moved from nspr/pr/include/prsystem.h with 100% similarity]
pr/include/prthread.h [moved from nspr/pr/include/prthread.h with 100% similarity]
pr/include/prtime.h [moved from nspr/pr/include/prtime.h with 100% similarity]
pr/include/prtpool.h [moved from nspr/pr/include/prtpool.h with 100% similarity]
pr/include/prtrace.h [moved from nspr/pr/include/prtrace.h with 100% similarity]
pr/include/prtypes.h [moved from nspr/pr/include/prtypes.h with 100% similarity]
pr/include/prvrsion.h [moved from nspr/pr/include/prvrsion.h with 100% similarity]
pr/include/prwin16.h [moved from nspr/pr/include/prwin16.h with 100% similarity]
pr/src/.cvsignore [moved from nspr/pr/src/.cvsignore with 100% similarity]
pr/src/Makefile.in [moved from nspr/pr/src/Makefile.in with 99% similarity]
pr/src/bthreads/.cvsignore [moved from nspr/pr/src/md/beos/.cvsignore with 100% similarity]
pr/src/bthreads/Makefile.in [moved from nspr/pr/src/bthreads/Makefile.in with 100% similarity]
pr/src/bthreads/bsrcs.mk [moved from nspr/pr/src/bthreads/bsrcs.mk with 100% similarity]
pr/src/bthreads/btcvar.c [moved from nspr/pr/src/bthreads/btcvar.c with 100% similarity]
pr/src/bthreads/btlocks.c [moved from nspr/pr/src/bthreads/btlocks.c with 100% similarity]
pr/src/bthreads/btmisc.c [moved from nspr/pr/src/bthreads/btmisc.c with 100% similarity]
pr/src/bthreads/btmon.c [moved from nspr/pr/src/bthreads/btmon.c with 100% similarity]
pr/src/bthreads/btsem.c [moved from nspr/pr/src/bthreads/btsem.c with 100% similarity]
pr/src/bthreads/btthread.c [moved from nspr/pr/src/bthreads/btthread.c with 100% similarity]
pr/src/bthreads/objs.mk [moved from nspr/pr/src/bthreads/objs.mk with 100% similarity]
pr/src/cplus/.cvsignore [moved from nspr/pr/src/md/.cvsignore with 100% similarity]
pr/src/cplus/Makefile.in [moved from nspr/pr/src/cplus/Makefile.in with 100% similarity]
pr/src/cplus/rcascii.h [moved from nspr/pr/src/cplus/rcascii.h with 100% similarity]
pr/src/cplus/rcbase.cpp [moved from nspr/pr/src/cplus/rcbase.cpp with 100% similarity]
pr/src/cplus/rcbase.h [moved from nspr/pr/src/cplus/rcbase.h with 100% similarity]
pr/src/cplus/rccv.cpp [moved from nspr/pr/src/cplus/rccv.cpp with 100% similarity]
pr/src/cplus/rccv.h [moved from nspr/pr/src/cplus/rccv.h with 100% similarity]
pr/src/cplus/rcfileio.cpp [moved from nspr/pr/src/cplus/rcfileio.cpp with 100% similarity]
pr/src/cplus/rcfileio.h [moved from nspr/pr/src/cplus/rcfileio.h with 100% similarity]
pr/src/cplus/rcinrval.cpp [moved from nspr/pr/src/cplus/rcinrval.cpp with 100% similarity]
pr/src/cplus/rcinrval.h [moved from nspr/pr/src/cplus/rcinrval.h with 100% similarity]
pr/src/cplus/rcio.cpp [moved from nspr/pr/src/cplus/rcio.cpp with 100% similarity]
pr/src/cplus/rcio.h [moved from nspr/pr/src/cplus/rcio.h with 100% similarity]
pr/src/cplus/rclock.cpp [moved from nspr/pr/src/cplus/rclock.cpp with 100% similarity]
pr/src/cplus/rclock.h [moved from nspr/pr/src/cplus/rclock.h with 100% similarity]
pr/src/cplus/rcmon.h [moved from nspr/pr/src/cplus/rcmon.h with 100% similarity]
pr/src/cplus/rcnetdb.cpp [moved from nspr/pr/src/cplus/rcnetdb.cpp with 100% similarity]
pr/src/cplus/rcnetdb.h [moved from nspr/pr/src/cplus/rcnetdb.h with 100% similarity]
pr/src/cplus/rcnetio.cpp [moved from nspr/pr/src/cplus/rcnetio.cpp with 100% similarity]
pr/src/cplus/rcnetio.h [moved from nspr/pr/src/cplus/rcnetio.h with 100% similarity]
pr/src/cplus/rcthread.cpp [moved from nspr/pr/src/cplus/rcthread.cpp with 100% similarity]
pr/src/cplus/rcthread.h [moved from nspr/pr/src/cplus/rcthread.h with 100% similarity]
pr/src/cplus/rctime.cpp [moved from nspr/pr/src/cplus/rctime.cpp with 100% similarity]
pr/src/cplus/rctime.h [moved from nspr/pr/src/cplus/rctime.h with 100% similarity]
pr/src/cplus/tests/.cvsignore [moved from nspr/pr/src/malloc/.cvsignore with 100% similarity]
pr/src/cplus/tests/Makefile.in [moved from nspr/pr/src/cplus/tests/Makefile.in with 98% similarity]
pr/src/cplus/tests/fileio.cpp [moved from nspr/pr/src/cplus/tests/fileio.cpp with 100% similarity]
pr/src/cplus/tests/interval.cpp [moved from nspr/pr/src/cplus/tests/interval.cpp with 100% similarity]
pr/src/cplus/tests/ranfile.cpp [moved from nspr/pr/src/cplus/tests/ranfile.cpp with 100% similarity]
pr/src/cplus/tests/switch.cpp [moved from nspr/pr/src/cplus/tests/switch.cpp with 100% similarity]
pr/src/cplus/tests/thread.cpp [moved from nspr/pr/src/cplus/tests/thread.cpp with 100% similarity]
pr/src/cplus/tests/time.cpp [moved from nspr/pr/src/cplus/tests/time.cpp with 100% similarity]
pr/src/cplus/tests/tpd.cpp [moved from nspr/pr/src/cplus/tests/tpd.cpp with 100% similarity]
pr/src/io/.cvsignore [moved from nspr/pr/src/linking/.cvsignore with 100% similarity]
pr/src/io/Makefile.in [moved from nspr/pr/src/io/Makefile.in with 100% similarity]
pr/src/io/prdir.c [moved from nspr/pr/src/io/prdir.c with 100% similarity]
pr/src/io/prfdcach.c [moved from nspr/pr/src/io/prfdcach.c with 100% similarity]
pr/src/io/prfile.c [moved from nspr/pr/src/io/prfile.c with 100% similarity]
pr/src/io/prio.c [moved from nspr/pr/src/io/prio.c with 100% similarity]
pr/src/io/priometh.c [moved from nspr/pr/src/io/priometh.c with 100% similarity]
pr/src/io/pripv6.c [moved from nspr/pr/src/io/pripv6.c with 100% similarity]
pr/src/io/prlayer.c [moved from nspr/pr/src/io/prlayer.c with 100% similarity]
pr/src/io/prlog.c [moved from nspr/pr/src/io/prlog.c with 100% similarity]
pr/src/io/prmapopt.c [moved from nspr/pr/src/io/prmapopt.c with 97% similarity]
pr/src/io/prmmap.c [moved from nspr/pr/src/io/prmmap.c with 91% similarity]
pr/src/io/prmwait.c [moved from nspr/pr/src/io/prmwait.c with 100% similarity]
pr/src/io/prpolevt.c [moved from nspr/pr/src/io/prpolevt.c with 100% similarity]
pr/src/io/prprf.c [moved from nspr/pr/src/io/prprf.c with 97% similarity]
pr/src/io/prscanf.c [moved from nspr/pr/src/io/prscanf.c with 100% similarity]
pr/src/io/prsocket.c [moved from nspr/pr/src/io/prsocket.c with 100% similarity]
pr/src/io/prstdio.c [moved from nspr/pr/src/io/prstdio.c with 100% similarity]
pr/src/linking/.cvsignore [moved from nspr/pr/src/io/.cvsignore with 100% similarity]
pr/src/linking/Makefile.in [moved from nspr/pr/src/linking/Makefile.in with 100% similarity]
pr/src/linking/prlink.c [moved from nspr/pr/src/linking/prlink.c with 100% similarity]
pr/src/malloc/.cvsignore [moved from nspr/pr/src/cplus/tests/.cvsignore with 100% similarity]
pr/src/malloc/Makefile.in [moved from nspr/pr/src/malloc/Makefile.in with 100% similarity]
pr/src/malloc/prmalloc.c [moved from nspr/pr/src/malloc/prmalloc.c with 100% similarity]
pr/src/malloc/prmem.c [moved from nspr/pr/src/malloc/prmem.c with 100% similarity]
pr/src/md/.cvsignore [moved from nspr/pr/src/cplus/.cvsignore with 100% similarity]
pr/src/md/Makefile.in [moved from nspr/pr/src/md/Makefile.in with 100% similarity]
pr/src/md/beos/.cvsignore [moved from nspr/pr/src/bthreads/.cvsignore with 100% similarity]
pr/src/md/beos/Makefile.in [moved from nspr/pr/src/md/beos/Makefile.in with 100% similarity]
pr/src/md/beos/bcpu.c [moved from nspr/pr/src/md/beos/bcpu.c with 100% similarity]
pr/src/md/beos/beos.c [moved from nspr/pr/src/md/beos/beos.c with 100% similarity]
pr/src/md/beos/beos_errors.c [moved from nspr/pr/src/md/beos/beos_errors.c with 100% similarity]
pr/src/md/beos/bfile.c [moved from nspr/pr/src/md/beos/bfile.c with 100% similarity]
pr/src/md/beos/bmemory.c [moved from nspr/pr/src/md/beos/bmemory.c with 100% similarity]
pr/src/md/beos/bmisc.c [moved from nspr/pr/src/md/beos/bmisc.c with 100% similarity]
pr/src/md/beos/bmmap.c [moved from nspr/pr/src/md/beos/bmmap.c with 100% similarity]
pr/src/md/beos/bnet.c [moved from nspr/pr/src/md/beos/bnet.c with 100% similarity]
pr/src/md/beos/bproc.c [moved from nspr/pr/src/md/beos/bproc.c with 100% similarity]
pr/src/md/beos/brng.c [moved from nspr/pr/src/md/beos/brng.c with 100% similarity]
pr/src/md/beos/bseg.c [moved from nspr/pr/src/md/beos/bseg.c with 100% similarity]
pr/src/md/beos/bsrcs.mk [moved from nspr/pr/src/md/beos/bsrcs.mk with 100% similarity]
pr/src/md/beos/btime.c [moved from nspr/pr/src/md/beos/btime.c with 100% similarity]
pr/src/md/beos/objs.mk [moved from nspr/pr/src/md/beos/objs.mk with 100% similarity]
pr/src/md/os2/.cvsignore [moved from nspr/pr/include/private/.cvsignore with 100% similarity]
pr/src/md/os2/Makefile.in [moved from nspr/pr/src/md/os2/Makefile.in with 100% similarity]
pr/src/md/os2/objs.mk [moved from nspr/pr/src/md/os2/objs.mk with 100% similarity]
pr/src/md/os2/os2_errors.c [moved from nspr/pr/src/md/os2/os2_errors.c with 100% similarity]
pr/src/md/os2/os2cv.c [moved from nspr/pr/src/md/os2/os2cv.c with 100% similarity]
pr/src/md/os2/os2emx.s [moved from nspr/pr/src/md/os2/os2emx.s with 100% similarity]
pr/src/md/os2/os2gc.c [moved from nspr/pr/src/md/os2/os2gc.c with 100% similarity]
pr/src/md/os2/os2inrval.c [moved from nspr/pr/src/md/os2/os2inrval.c with 100% similarity]
pr/src/md/os2/os2io.c [moved from nspr/pr/src/md/os2/os2io.c with 100% similarity]
pr/src/md/os2/os2misc.c [moved from nspr/pr/src/md/os2/os2misc.c with 100% similarity]
pr/src/md/os2/os2poll.c [moved from nspr/pr/src/md/os2/os2poll.c with 100% similarity]
pr/src/md/os2/os2rng.c [moved from nspr/pr/src/md/os2/os2rng.c with 100% similarity]
pr/src/md/os2/os2sem.c [moved from nspr/pr/src/md/os2/os2sem.c with 100% similarity]
pr/src/md/os2/os2sock.c [moved from nspr/pr/src/md/os2/os2sock.c with 100% similarity]
pr/src/md/os2/os2thred.c [moved from nspr/pr/src/md/os2/os2thred.c with 100% similarity]
pr/src/md/os2/os2vaclegacy.s [moved from nspr/pr/src/md/os2/os2vaclegacy.s with 100% similarity]
pr/src/md/prosdep.c [moved from nspr/pr/src/md/prosdep.c with 100% similarity]
pr/src/md/unix/.cvsignore [moved from nspr/pr/include/obsolete/.cvsignore with 100% similarity]
pr/src/md/unix/Makefile.in [moved from nspr/pr/src/md/unix/Makefile.in with 100% similarity]
pr/src/md/unix/aix.c [moved from nspr/pr/src/md/unix/aix.c with 100% similarity]
pr/src/md/unix/aixwrap.c [moved from nspr/pr/src/md/unix/aixwrap.c with 100% similarity]
pr/src/md/unix/bsdi.c [moved from nspr/pr/src/md/unix/bsdi.c with 100% similarity]
pr/src/md/unix/darwin.c [moved from nspr/pr/src/md/unix/darwin.c with 100% similarity]
pr/src/md/unix/dgux.c [moved from nspr/pr/src/md/unix/dgux.c with 100% similarity]
pr/src/md/unix/freebsd.c [moved from nspr/pr/src/md/unix/freebsd.c with 100% similarity]
pr/src/md/unix/hpux.c [moved from nspr/pr/src/md/unix/hpux.c with 100% similarity]
pr/src/md/unix/irix.c [moved from nspr/pr/src/md/unix/irix.c with 100% similarity]
pr/src/md/unix/linux.c [moved from nspr/pr/src/md/unix/linux.c with 100% similarity]
pr/src/md/unix/netbsd.c [moved from nspr/pr/src/md/unix/netbsd.c with 100% similarity]
pr/src/md/unix/nto.c [moved from nspr/pr/src/md/unix/nto.c with 100% similarity]
pr/src/md/unix/objs.mk [moved from nspr/pr/src/md/unix/objs.mk with 100% similarity]
pr/src/md/unix/openbsd.c [moved from nspr/pr/src/md/unix/openbsd.c with 100% similarity]
pr/src/md/unix/os_AIX.s [moved from nspr/pr/src/md/unix/os_AIX.s with 100% similarity]
pr/src/md/unix/os_BSD_386_2.s [moved from nspr/pr/src/md/unix/os_BSD_386_2.s with 100% similarity]
pr/src/md/unix/os_Darwin.s [moved from nspr/pr/src/md/unix/os_Darwin.s with 100% similarity]
pr/src/md/unix/os_Darwin_ppc.s [moved from nspr/pr/src/md/unix/os_Darwin_ppc.s with 100% similarity]
pr/src/md/unix/os_Darwin_x86.s [moved from nspr/pr/src/md/unix/os_Darwin_x86.s with 100% similarity]
pr/src/md/unix/os_Darwin_x86_64.s [moved from nspr/pr/src/md/unix/os_Darwin_x86_64.s with 100% similarity]
pr/src/md/unix/os_HPUX.s [moved from nspr/pr/src/md/unix/os_HPUX.s with 100% similarity]
pr/src/md/unix/os_HPUX_ia64.s [moved from nspr/pr/src/md/unix/os_HPUX_ia64.s with 100% similarity]
pr/src/md/unix/os_Irix.s [moved from nspr/pr/src/md/unix/os_Irix.s with 100% similarity]
pr/src/md/unix/os_Linux_ia64.s [moved from nspr/pr/src/md/unix/os_Linux_ia64.s with 100% similarity]
pr/src/md/unix/os_Linux_ppc.s [moved from nspr/pr/src/md/unix/os_Linux_ppc.s with 100% similarity]
pr/src/md/unix/os_Linux_x86.s [moved from nspr/pr/src/md/unix/os_Linux_x86.s with 100% similarity]
pr/src/md/unix/os_Linux_x86_64.s [moved from nspr/pr/src/md/unix/os_Linux_x86_64.s with 100% similarity]
pr/src/md/unix/os_SunOS_sparcv9.s [moved from nspr/pr/src/md/unix/os_SunOS_sparcv9.s with 100% similarity]
pr/src/md/unix/os_SunOS_ultrasparc.s [moved from nspr/pr/src/md/unix/os_SunOS_ultrasparc.s with 100% similarity]
pr/src/md/unix/os_SunOS_x86.s [moved from nspr/pr/src/md/unix/os_SunOS_x86.s with 100% similarity]
pr/src/md/unix/os_SunOS_x86_64.s [moved from nspr/pr/src/md/unix/os_SunOS_x86_64.s with 100% similarity]
pr/src/md/unix/osf1.c [moved from nspr/pr/src/md/unix/osf1.c with 100% similarity]
pr/src/md/unix/pthreads_user.c [moved from nspr/pr/src/md/unix/pthreads_user.c with 100% similarity]
pr/src/md/unix/qnx.c [moved from nspr/pr/src/md/unix/qnx.c with 100% similarity]
pr/src/md/unix/riscos.c [moved from nspr/pr/src/md/unix/riscos.c with 100% similarity]
pr/src/md/unix/scoos.c [moved from nspr/pr/src/md/unix/scoos.c with 100% similarity]
pr/src/md/unix/solaris.c [moved from nspr/pr/src/md/unix/solaris.c with 100% similarity]
pr/src/md/unix/symbian.c [moved from nspr/pr/src/md/unix/symbian.c with 100% similarity]
pr/src/md/unix/unix.c [moved from nspr/pr/src/md/unix/unix.c with 99% similarity]
pr/src/md/unix/unix_errors.c [moved from nspr/pr/src/md/unix/unix_errors.c with 100% similarity]
pr/src/md/unix/unixware.c [moved from nspr/pr/src/md/unix/unixware.c with 100% similarity]
pr/src/md/unix/uxpoll.c [moved from nspr/pr/src/md/unix/uxpoll.c with 100% similarity]
pr/src/md/unix/uxproces.c [moved from nspr/pr/src/md/unix/uxproces.c with 100% similarity]
pr/src/md/unix/uxrng.c [moved from nspr/pr/src/md/unix/uxrng.c with 100% similarity]
pr/src/md/unix/uxshm.c [moved from nspr/pr/src/md/unix/uxshm.c with 100% similarity]
pr/src/md/unix/uxwrap.c [moved from nspr/pr/src/md/unix/uxwrap.c with 100% similarity]
pr/src/md/windows/.cvsignore [moved from nspr/pr/include/md/.cvsignore with 100% similarity]
pr/src/md/windows/Makefile.in [moved from nspr/pr/src/md/windows/Makefile.in with 100% similarity]
pr/src/md/windows/ntdllmn.c [moved from nspr/pr/src/md/windows/ntdllmn.c with 100% similarity]
pr/src/md/windows/ntgc.c [moved from nspr/pr/src/md/windows/ntgc.c with 100% similarity]
pr/src/md/windows/ntinrval.c [moved from nspr/pr/src/md/windows/ntinrval.c with 100% similarity]
pr/src/md/windows/ntio.c [moved from nspr/pr/src/md/windows/ntio.c with 100% similarity]
pr/src/md/windows/ntmisc.c [moved from nspr/pr/src/md/windows/ntmisc.c with 98% similarity]
pr/src/md/windows/ntsec.c [moved from nspr/pr/src/md/windows/ntsec.c with 100% similarity]
pr/src/md/windows/ntsem.c [moved from nspr/pr/src/md/windows/ntsem.c with 100% similarity]
pr/src/md/windows/ntthread.c [moved from nspr/pr/src/md/windows/ntthread.c with 99% similarity]
pr/src/md/windows/objs.mk [moved from nspr/pr/src/md/windows/objs.mk with 100% similarity]
pr/src/md/windows/w32ipcsem.c [moved from nspr/pr/src/md/windows/w32ipcsem.c with 100% similarity]
pr/src/md/windows/w32poll.c [moved from nspr/pr/src/md/windows/w32poll.c with 100% similarity]
pr/src/md/windows/w32rng.c [moved from nspr/pr/src/md/windows/w32rng.c with 100% similarity]
pr/src/md/windows/w32shm.c [moved from nspr/pr/src/md/windows/w32shm.c with 100% similarity]
pr/src/md/windows/w95cv.c [moved from nspr/pr/src/md/windows/w95cv.c with 100% similarity]
pr/src/md/windows/w95dllmain.c [moved from nspr/pr/src/md/windows/w95dllmain.c with 100% similarity]
pr/src/md/windows/w95io.c [moved from nspr/pr/src/md/windows/w95io.c with 99% similarity]
pr/src/md/windows/w95sock.c [moved from nspr/pr/src/md/windows/w95sock.c with 100% similarity]
pr/src/md/windows/w95thred.c [moved from nspr/pr/src/md/windows/w95thred.c with 99% similarity]
pr/src/md/windows/win32_errors.c [moved from nspr/pr/src/md/windows/win32_errors.c with 100% similarity]
pr/src/memory/.cvsignore [moved from nspr/pr/include/.cvsignore with 100% similarity]
pr/src/memory/Makefile.in [moved from nspr/pr/src/memory/Makefile.in with 100% similarity]
pr/src/memory/prseg.c [moved from nspr/pr/src/memory/prseg.c with 100% similarity]
pr/src/memory/prshm.c [moved from nspr/pr/src/memory/prshm.c with 100% similarity]
pr/src/memory/prshma.c [moved from nspr/pr/src/memory/prshma.c with 100% similarity]
pr/src/misc/.cvsignore [moved from nspr/pr/.cvsignore with 100% similarity]
pr/src/misc/Makefile.in [moved from nspr/pr/src/misc/Makefile.in with 100% similarity]
pr/src/misc/compile-et.pl [moved from nspr/pr/src/misc/compile-et.pl with 100% similarity]
pr/src/misc/dtoa.c [moved from nspr/pr/src/misc/dtoa.c with 100% similarity]
pr/src/misc/pralarm.c [moved from nspr/pr/src/misc/pralarm.c with 100% similarity]
pr/src/misc/pratom.c [moved from nspr/pr/src/misc/pratom.c with 100% similarity]
pr/src/misc/praton.c [moved from nspr/pr/src/misc/praton.c with 100% similarity]
pr/src/misc/prcountr.c [moved from nspr/pr/src/misc/prcountr.c with 98% similarity]
pr/src/misc/prdtoa.c [moved from nspr/pr/src/misc/prdtoa.c with 100% similarity]
pr/src/misc/prenv.c [moved from nspr/pr/src/misc/prenv.c with 100% similarity]
pr/src/misc/prerr.c [moved from nspr/pr/src/misc/prerr.c with 100% similarity]
pr/src/misc/prerr.et [moved from nspr/pr/src/misc/prerr.et with 100% similarity]
pr/src/misc/prerr.properties [moved from nspr/pr/src/misc/prerr.properties with 100% similarity]
pr/src/misc/prerror.c [moved from nspr/pr/src/misc/prerror.c with 100% similarity]
pr/src/misc/prerrortable.c [moved from nspr/pr/src/misc/prerrortable.c with 100% similarity]
pr/src/misc/prinit.c [moved from nspr/pr/src/misc/prinit.c with 100% similarity]
pr/src/misc/prinrval.c [moved from nspr/pr/src/misc/prinrval.c with 100% similarity]
pr/src/misc/pripc.c [moved from nspr/pr/src/misc/pripc.c with 100% similarity]
pr/src/misc/pripcsem.c [moved from nspr/pr/src/misc/pripcsem.c with 100% similarity]
pr/src/misc/prlog2.c [moved from nspr/pr/src/misc/prlog2.c with 100% similarity]
pr/src/misc/prlong.c [moved from nspr/pr/src/misc/prlong.c with 100% similarity]
pr/src/misc/prnetdb.c [moved from nspr/pr/src/misc/prnetdb.c with 99% similarity]
pr/src/misc/prolock.c [moved from nspr/pr/src/misc/prolock.c with 100% similarity]
pr/src/misc/prrng.c [moved from nspr/pr/src/misc/prrng.c with 100% similarity]
pr/src/misc/prsystem.c [moved from nspr/pr/src/misc/prsystem.c with 98% similarity]
pr/src/misc/prthinfo.c [moved from nspr/pr/src/misc/prthinfo.c with 100% similarity]
pr/src/misc/prtime.c [moved from nspr/pr/src/misc/prtime.c with 100% similarity]
pr/src/misc/prtpool.c [moved from nspr/pr/src/misc/prtpool.c with 100% similarity]
pr/src/misc/prtrace.c [moved from nspr/pr/src/misc/prtrace.c with 99% similarity]
pr/src/nspr.def [moved from nspr/pr/src/nspr.def with 99% similarity]
pr/src/nspr.rc [moved from nspr/pr/src/nspr.rc with 100% similarity]
pr/src/os2extra.def [moved from nspr/pr/src/os2extra.def with 100% similarity]
pr/src/prvrsion.c [moved from nspr/pr/src/prvrsion.c with 100% similarity]
pr/src/pthreads/.cvsignore [moved from nspr/lib/tests/.cvsignore with 100% similarity]
pr/src/pthreads/Makefile.in [moved from nspr/pr/src/pthreads/Makefile.in with 100% similarity]
pr/src/pthreads/ptio.c [moved from nspr/pr/src/pthreads/ptio.c with 99% similarity]
pr/src/pthreads/ptmisc.c [moved from nspr/pr/src/pthreads/ptmisc.c with 100% similarity]
pr/src/pthreads/ptsynch.c [moved from nspr/pr/src/pthreads/ptsynch.c with 82% similarity]
pr/src/pthreads/ptthread.c [moved from nspr/pr/src/pthreads/ptthread.c with 97% similarity]
pr/src/threads/.cvsignore [moved from nspr/lib/prstreams/tests/testprstrm/.cvsignore with 100% similarity]
pr/src/threads/Makefile.in [moved from nspr/pr/src/threads/Makefile.in with 100% similarity]
pr/src/threads/combined/.cvsignore [moved from nspr/lib/prstreams/.cvsignore with 100% similarity]
pr/src/threads/combined/Makefile.in [moved from nspr/pr/src/threads/combined/Makefile.in with 100% similarity]
pr/src/threads/combined/README [moved from nspr/pr/src/threads/combined/README with 100% similarity]
pr/src/threads/combined/prucpu.c [moved from nspr/pr/src/threads/combined/prucpu.c with 100% similarity]
pr/src/threads/combined/prucv.c [moved from nspr/pr/src/threads/combined/prucv.c with 96% similarity]
pr/src/threads/combined/prulock.c [moved from nspr/pr/src/threads/combined/prulock.c with 95% similarity]
pr/src/threads/combined/prustack.c [moved from nspr/pr/src/threads/combined/prustack.c with 100% similarity]
pr/src/threads/combined/pruthr.c [moved from nspr/pr/src/threads/combined/pruthr.c with 100% similarity]
pr/src/threads/prcmon.c [moved from nspr/pr/src/threads/prcmon.c with 100% similarity]
pr/src/threads/prcthr.c [moved from nspr/pr/src/threads/prcthr.c with 100% similarity]
pr/src/threads/prdump.c [moved from nspr/pr/src/threads/prdump.c with 100% similarity]
pr/src/threads/prmon.c [new file with mode: 0644]
pr/src/threads/prrwlock.c [moved from nspr/pr/src/threads/prrwlock.c with 95% similarity]
pr/src/threads/prsem.c [moved from nspr/pr/src/threads/prsem.c with 100% similarity]
pr/src/threads/prtpd.c [moved from nspr/pr/src/threads/prtpd.c with 100% similarity]
pr/tests/.cvsignore [moved from nspr/lib/libc/include/.cvsignore with 100% similarity]
pr/tests/Makefile.in [moved from nspr/pr/tests/Makefile.in with 99% similarity]
pr/tests/README.TXT [moved from nspr/pr/tests/README.TXT with 100% similarity]
pr/tests/accept.c [moved from nspr/pr/tests/accept.c with 100% similarity]
pr/tests/acceptread.c [moved from nspr/pr/tests/acceptread.c with 100% similarity]
pr/tests/acceptreademu.c [moved from nspr/pr/tests/acceptreademu.c with 100% similarity]
pr/tests/addrstr.c [moved from nspr/pr/tests/addrstr.c with 100% similarity]
pr/tests/affinity.c [moved from nspr/pr/tests/affinity.c with 100% similarity]
pr/tests/alarm.c [moved from nspr/pr/tests/alarm.c with 100% similarity]
pr/tests/anonfm.c [moved from nspr/pr/tests/anonfm.c with 100% similarity]
pr/tests/append.c [moved from nspr/pr/tests/append.c with 100% similarity]
pr/tests/atomic.c [moved from nspr/pr/tests/atomic.c with 100% similarity]
pr/tests/attach.c [moved from nspr/pr/tests/attach.c with 99% similarity]
pr/tests/bigfile.c [moved from nspr/pr/tests/bigfile.c with 100% similarity]
pr/tests/bigfile2.c [moved from nspr/pr/tests/bigfile2.c with 100% similarity]
pr/tests/bigfile3.c [moved from nspr/pr/tests/bigfile3.c with 100% similarity]
pr/tests/bug1test.c [moved from nspr/pr/tests/bug1test.c with 100% similarity]
pr/tests/cleanup.c [moved from nspr/pr/tests/cleanup.c with 100% similarity]
pr/tests/cltsrv.c [moved from nspr/pr/tests/cltsrv.c with 100% similarity]
pr/tests/concur.c [moved from nspr/pr/tests/concur.c with 100% similarity]
pr/tests/cvar.c [moved from nspr/pr/tests/cvar.c with 100% similarity]
pr/tests/cvar2.c [moved from nspr/pr/tests/cvar2.c with 100% similarity]
pr/tests/dbmalloc.c [moved from nspr/pr/tests/dbmalloc.c with 100% similarity]
pr/tests/dbmalloc1.c [moved from nspr/pr/tests/dbmalloc1.c with 100% similarity]
pr/tests/dceemu.c [moved from nspr/pr/tests/dceemu.c with 100% similarity]
pr/tests/depend.c [moved from nspr/pr/tests/depend.c with 100% similarity]
pr/tests/dll/.cvsignore [moved from nspr/lib/libc/.cvsignore with 100% similarity]
pr/tests/dll/Makefile.in [moved from nspr/pr/tests/dll/Makefile.in with 100% similarity]
pr/tests/dll/my.def [moved from nspr/pr/tests/dll/my.def with 100% similarity]
pr/tests/dll/mygetval.c [moved from nspr/pr/tests/dll/mygetval.c with 100% similarity]
pr/tests/dll/mysetval.c [moved from nspr/pr/tests/dll/mysetval.c with 100% similarity]
pr/tests/dlltest.c [moved from nspr/pr/tests/dlltest.c with 100% similarity]
pr/tests/dtoa.c [moved from nspr/pr/tests/dtoa.c with 100% similarity]
pr/tests/env.c [moved from nspr/pr/tests/env.c with 100% similarity]
pr/tests/errcodes.c [moved from nspr/pr/tests/errcodes.c with 100% similarity]
pr/tests/errset.c [moved from nspr/pr/tests/errset.c with 100% similarity]
pr/tests/exit.c [moved from nspr/pr/tests/exit.c with 100% similarity]
pr/tests/fdcach.c [moved from nspr/pr/tests/fdcach.c with 100% similarity]
pr/tests/fileio.c [moved from nspr/pr/tests/fileio.c with 100% similarity]
pr/tests/foreign.c [moved from nspr/pr/tests/foreign.c with 99% similarity]
pr/tests/forktest.c [moved from nspr/pr/tests/forktest.c with 100% similarity]
pr/tests/formattm.c [moved from nspr/pr/tests/formattm.c with 100% similarity]
pr/tests/freeif.c [moved from nspr/pr/tests/freeif.c with 100% similarity]
pr/tests/fsync.c [moved from nspr/pr/tests/fsync.c with 100% similarity]
pr/tests/getai.c [moved from nspr/pr/tests/getai.c with 100% similarity]
pr/tests/gethost.c [moved from nspr/pr/tests/gethost.c with 100% similarity]
pr/tests/getproto.c [moved from nspr/pr/tests/getproto.c with 100% similarity]
pr/tests/i2l.c [moved from nspr/pr/tests/i2l.c with 100% similarity]
pr/tests/initclk.c [moved from nspr/pr/tests/initclk.c with 100% similarity]
pr/tests/inrval.c [moved from nspr/pr/tests/inrval.c with 100% similarity]
pr/tests/instrumt.c [moved from nspr/pr/tests/instrumt.c with 99% similarity]
pr/tests/intrio.c [moved from nspr/pr/tests/intrio.c with 100% similarity]
pr/tests/intrupt.c [moved from nspr/pr/tests/intrupt.c with 100% similarity]
pr/tests/io_timeout.c [moved from nspr/pr/tests/io_timeout.c with 100% similarity]
pr/tests/io_timeoutk.c [moved from nspr/pr/tests/io_timeoutk.c with 100% similarity]
pr/tests/io_timeoutu.c [moved from nspr/pr/tests/io_timeoutu.c with 100% similarity]
pr/tests/ioconthr.c [moved from nspr/pr/tests/ioconthr.c with 100% similarity]
pr/tests/ipv6.c [moved from nspr/pr/tests/ipv6.c with 100% similarity]
pr/tests/join.c [moved from nspr/pr/tests/join.c with 100% similarity]
pr/tests/joinkk.c [moved from nspr/pr/tests/joinkk.c with 100% similarity]
pr/tests/joinku.c [moved from nspr/pr/tests/joinku.c with 100% similarity]
pr/tests/joinuk.c [moved from nspr/pr/tests/joinuk.c with 100% similarity]
pr/tests/joinuu.c [moved from nspr/pr/tests/joinuu.c with 100% similarity]
pr/tests/layer.c [moved from nspr/pr/tests/layer.c with 100% similarity]
pr/tests/lazyinit.c [moved from nspr/pr/tests/lazyinit.c with 100% similarity]
pr/tests/libfilename.c [moved from nspr/pr/tests/libfilename.c with 100% similarity]
pr/tests/lltest.c [moved from nspr/pr/tests/lltest.c with 100% similarity]
pr/tests/lock.c [moved from nspr/pr/tests/lock.c with 100% similarity]
pr/tests/lockfile.c [moved from nspr/pr/tests/lockfile.c with 100% similarity]
pr/tests/logfile.c [moved from nspr/pr/tests/logfile.c with 100% similarity]
pr/tests/logger.c [moved from nspr/pr/tests/logger.c with 100% similarity]
pr/tests/makedir.c [moved from nspr/pr/tests/makedir.c with 100% similarity]
pr/tests/many_cv.c [moved from nspr/pr/tests/many_cv.c with 100% similarity]
pr/tests/mbcs.c [moved from nspr/pr/tests/mbcs.c with 100% similarity]
pr/tests/monref.c [new file with mode: 0644]
pr/tests/multiacc.c [moved from nspr/pr/tests/multiacc.c with 100% similarity]
pr/tests/multiwait.c [moved from nspr/pr/tests/multiwait.c with 100% similarity]
pr/tests/nameshm1.c [moved from nspr/pr/tests/nameshm1.c with 100% similarity]
pr/tests/nbconn.c [moved from nspr/pr/tests/nbconn.c with 100% similarity]
pr/tests/nblayer.c [moved from nspr/pr/tests/nblayer.c with 100% similarity]
pr/tests/nonblock.c [moved from nspr/pr/tests/nonblock.c with 100% similarity]
pr/tests/ntioto.c [moved from nspr/pr/tests/ntioto.c with 100% similarity]
pr/tests/ntoh.c [moved from nspr/pr/tests/ntoh.c with 100% similarity]
pr/tests/obsints.c [moved from nspr/pr/tests/obsints.c with 100% similarity]
pr/tests/op_2long.c [moved from nspr/pr/tests/op_2long.c with 100% similarity]
pr/tests/op_excl.c [moved from nspr/pr/tests/op_excl.c with 100% similarity]
pr/tests/op_filnf.c [moved from nspr/pr/tests/op_filnf.c with 100% similarity]
pr/tests/op_filok.c [moved from nspr/pr/tests/op_filok.c with 100% similarity]
pr/tests/op_noacc.c [moved from nspr/pr/tests/op_noacc.c with 100% similarity]
pr/tests/op_nofil.c [moved from nspr/pr/tests/op_nofil.c with 100% similarity]
pr/tests/openfile.c [moved from nspr/pr/tests/openfile.c with 100% similarity]
pr/tests/parent.c [moved from nspr/pr/tests/parent.c with 100% similarity]
pr/tests/parsetm.c [moved from nspr/pr/tests/parsetm.c with 100% similarity]
pr/tests/peek.c [moved from nspr/pr/tests/peek.c with 100% similarity]
pr/tests/perf.c [moved from nspr/pr/tests/perf.c with 100% similarity]
pr/tests/pipeping.c [moved from nspr/pr/tests/pipeping.c with 100% similarity]
pr/tests/pipeping2.c [moved from nspr/pr/tests/pipeping2.c with 100% similarity]
pr/tests/pipepong.c [moved from nspr/pr/tests/pipepong.c with 100% similarity]
pr/tests/pipepong2.c [moved from nspr/pr/tests/pipepong2.c with 100% similarity]
pr/tests/pipeself.c [moved from nspr/pr/tests/pipeself.c with 100% similarity]
pr/tests/poll_er.c [moved from nspr/pr/tests/poll_er.c with 100% similarity]
pr/tests/poll_nm.c [moved from nspr/pr/tests/poll_nm.c with 100% similarity]
pr/tests/poll_to.c [moved from nspr/pr/tests/poll_to.c with 100% similarity]
pr/tests/pollable.c [moved from nspr/pr/tests/pollable.c with 100% similarity]
pr/tests/prfdbl.c [new file with mode: 0644]
pr/tests/prftest.c [moved from nspr/pr/tests/prftest.c with 100% similarity]
pr/tests/prftest1.c [moved from nspr/pr/tests/prftest1.c with 100% similarity]
pr/tests/prftest2.c [moved from nspr/pr/tests/prftest2.c with 100% similarity]
pr/tests/primblok.c [moved from nspr/pr/tests/primblok.c with 100% similarity]
pr/tests/priotest.c [moved from nspr/pr/tests/priotest.c with 100% similarity]
pr/tests/provider.c [moved from nspr/pr/tests/provider.c with 99% similarity]
pr/tests/prpoll.c [moved from nspr/pr/tests/prpoll.c with 100% similarity]
pr/tests/prpollml.c [moved from nspr/pr/tests/prpollml.c with 100% similarity]
pr/tests/prselect.c [moved from nspr/pr/tests/prselect.c with 100% similarity]
pr/tests/prttools.h [moved from nspr/pr/tests/prttools.h with 100% similarity]
pr/tests/pushtop.c [moved from nspr/pr/tests/pushtop.c with 100% similarity]
pr/tests/randseed.c [moved from nspr/pr/tests/randseed.c with 100% similarity]
pr/tests/ranfile.c [moved from nspr/pr/tests/ranfile.c with 100% similarity]
pr/tests/reinit.c [moved from nspr/pr/tests/reinit.c with 100% similarity]
pr/tests/rmdir.c [moved from nspr/pr/tests/rmdir.c with 100% similarity]
pr/tests/runtests.pl [moved from nspr/pr/tests/runtests.pl with 100% similarity]
pr/tests/runtests.sh [moved from nspr/pr/tests/runtests.sh with 100% similarity]
pr/tests/runy2ktests.ksh [moved from nspr/pr/tests/runy2ktests.ksh with 100% similarity]
pr/tests/rwlockrank.c [new file with mode: 0644]
pr/tests/rwlocktest.c [moved from nspr/pr/tests/rwlocktest.c with 98% similarity]
pr/tests/sel_spd.c [moved from nspr/pr/tests/sel_spd.c with 100% similarity]
pr/tests/selct_er.c [moved from nspr/pr/tests/selct_er.c with 100% similarity]
pr/tests/selct_nm.c [moved from nspr/pr/tests/selct_nm.c with 100% similarity]
pr/tests/selct_to.c [moved from nspr/pr/tests/selct_to.c with 100% similarity]
pr/tests/select2.c [moved from nspr/pr/tests/select2.c with 100% similarity]
pr/tests/selintr.c [moved from nspr/pr/tests/selintr.c with 100% similarity]
pr/tests/sem.c [moved from nspr/pr/tests/sem.c with 100% similarity]
pr/tests/sema.c [moved from nspr/pr/tests/sema.c with 100% similarity]
pr/tests/semaerr.c [moved from nspr/pr/tests/semaerr.c with 100% similarity]
pr/tests/semaerr1.c [moved from nspr/pr/tests/semaerr1.c with 100% similarity]
pr/tests/semaping.c [moved from nspr/pr/tests/semaping.c with 100% similarity]
pr/tests/semapong.c [moved from nspr/pr/tests/semapong.c with 100% similarity]
pr/tests/sendzlf.c [moved from nspr/pr/tests/sendzlf.c with 100% similarity]
pr/tests/server_test.c [moved from nspr/pr/tests/server_test.c with 100% similarity]
pr/tests/servr_kk.c [moved from nspr/pr/tests/servr_kk.c with 100% similarity]
pr/tests/servr_ku.c [moved from nspr/pr/tests/servr_ku.c with 100% similarity]
pr/tests/servr_uk.c [moved from nspr/pr/tests/servr_uk.c with 100% similarity]
pr/tests/servr_uu.c [moved from nspr/pr/tests/servr_uu.c with 100% similarity]
pr/tests/short_thread.c [moved from nspr/pr/tests/short_thread.c with 100% similarity]
pr/tests/sigpipe.c [moved from nspr/pr/tests/sigpipe.c with 100% similarity]
pr/tests/sleep.c [moved from nspr/pr/tests/sleep.c with 100% similarity]
pr/tests/socket.c [moved from nspr/pr/tests/socket.c with 99% similarity]
pr/tests/sockopt.c [moved from nspr/pr/tests/sockopt.c with 94% similarity]
pr/tests/sockping.c [moved from nspr/pr/tests/sockping.c with 100% similarity]
pr/tests/sockpong.c [moved from nspr/pr/tests/sockpong.c with 100% similarity]
pr/tests/sprintf.c [moved from nspr/pr/tests/sprintf.c with 100% similarity]
pr/tests/sproc_ch.c [moved from nspr/pr/tests/sproc_ch.c with 100% similarity]
pr/tests/sproc_p.c [moved from nspr/pr/tests/sproc_p.c with 100% similarity]
pr/tests/stack.c [moved from nspr/pr/tests/stack.c with 100% similarity]
pr/tests/stat.c [moved from nspr/pr/tests/stat.c with 100% similarity]
pr/tests/stdio.c [moved from nspr/pr/tests/stdio.c with 100% similarity]
pr/tests/str2addr.c [moved from nspr/pr/tests/str2addr.c with 100% similarity]
pr/tests/strod.c [moved from nspr/pr/tests/strod.c with 100% similarity]
pr/tests/suspend.c [moved from nspr/pr/tests/suspend.c with 100% similarity]
pr/tests/switch.c [moved from nspr/pr/tests/switch.c with 100% similarity]
pr/tests/system.c [moved from nspr/pr/tests/system.c with 100% similarity]
pr/tests/testbit.c [moved from nspr/pr/tests/testbit.c with 100% similarity]
pr/tests/testfile.c [moved from nspr/pr/tests/testfile.c with 99% similarity]
pr/tests/threads.c [moved from nspr/pr/tests/threads.c with 100% similarity]
pr/tests/thrpool_client.c [moved from nspr/pr/tests/thrpool_client.c with 100% similarity]
pr/tests/thrpool_server.c [moved from nspr/pr/tests/thrpool_server.c with 100% similarity]
pr/tests/thruput.c [moved from nspr/pr/tests/thruput.c with 100% similarity]
pr/tests/time.c [moved from nspr/pr/tests/time.c with 100% similarity]
pr/tests/timemac.c [moved from nspr/pr/tests/timemac.c with 100% similarity]
pr/tests/timetest.c [moved from nspr/pr/tests/timetest.c with 100% similarity]
pr/tests/tmoacc.c [moved from nspr/pr/tests/tmoacc.c with 100% similarity]
pr/tests/tmocon.c [moved from nspr/pr/tests/tmocon.c with 100% similarity]
pr/tests/tpd.c [moved from nspr/pr/tests/tpd.c with 100% similarity]
pr/tests/udpsrv.c [moved from nspr/pr/tests/udpsrv.c with 100% similarity]
pr/tests/ut_ttools.h [moved from nspr/pr/tests/ut_ttools.h with 100% similarity]
pr/tests/vercheck.c [moved from nspr/pr/tests/vercheck.c with 92% similarity]
pr/tests/version.c [moved from nspr/pr/tests/version.c with 100% similarity]
pr/tests/writev.c [moved from nspr/pr/tests/writev.c with 100% similarity]
pr/tests/xnotify.c [moved from nspr/pr/tests/xnotify.c with 100% similarity]
pr/tests/y2k.c [moved from nspr/pr/tests/y2k.c with 100% similarity]
pr/tests/y2ktmo.c [moved from nspr/pr/tests/y2ktmo.c with 100% similarity]
pr/tests/yield.c [moved from nspr/pr/tests/yield.c with 100% similarity]
pr/tests/zerolen.c [moved from nspr/pr/tests/zerolen.c with 100% similarity]
tools/.cvsignore [moved from nspr/lib/.cvsignore with 100% similarity]
tools/Makefile.in [moved from nspr/tools/Makefile.in with 98% similarity]
tools/httpget.c [moved from nspr/tools/httpget.c with 100% similarity]
tools/tail.c [moved from nspr/tools/tail.c with 100% similarity]

similarity index 100%
rename from nspr/.cvsignore
rename to .cvsignore
diff --git a/.hg_archival.txt b/.hg_archival.txt
new file mode 100644 (file)
index 0000000..0d35c03
--- /dev/null
@@ -0,0 +1,4 @@
+repo: a4b34919bf34db2ee22acbbc305693c8980b6dc6
+node: 476850821307d584874d040340f577dcde2aec38
+branch: default
+tag: NSPR_4_10_6_RTM
similarity index 100%
rename from nspr/.hgignore
rename to .hgignore
similarity index 100%
rename from nspr/LICENSE
rename to LICENSE
similarity index 100%
rename from nspr/Makefile.in
rename to Makefile.in
similarity index 100%
rename from nspr/admin/explode.pl
rename to admin/explode.pl
similarity index 100%
rename from nspr/admin/symlinks.sh
rename to admin/symlinks.sh
diff --git a/build/autoconf/README b/build/autoconf/README
new file mode 100644 (file)
index 0000000..62c1f0c
--- /dev/null
@@ -0,0 +1,5 @@
+The config.guess and config.sub scripts were downloaded from
+http://git.savannah.gnu.org/cgit/config.git/tree/config.guess?id=6947a35648e577c2e3a12d5c88d488c6ea94e1c0
+http://git.savannah.gnu.org/cgit/config.git/tree/config.sub?id=6947a35648e577c2e3a12d5c88d488c6ea94e1c0
+
+Our private patches are in the patches/ directory.
similarity index 72%
rename from nspr/build/autoconf/config.guess
rename to build/autoconf/config.guess
index dfe628c..72625d4 100755 (executable)
@@ -1,13 +1,12 @@
 #! /bin/sh
 # Attempt to guess a canonical system name.
-#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+#   Copyright 1992-2014 Free Software Foundation, Inc.
 
-timestamp='2005-10-13'
+timestamp='2014-02-12'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
+# the Free Software Foundation; either version 3 of the License, or
 # (at your option) any later version.
 #
 # This program is distributed in the hope that it will be useful, but
@@ -16,26 +15,22 @@ timestamp='2005-10-13'
 # General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
-# 02110-1301, USA.
+# along with this program; if not, see <http://www.gnu.org/licenses/>.
 #
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
 # configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-
-# Originally written by Per Bothner <per@bothner.com>.
-# Please send patches to <config-patches@gnu.org>.  Submit a context
-# diff and a properly formatted ChangeLog entry.
+# the same distribution terms that you use for the rest of that
+# program.  This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
 #
-# This script attempts to guess a canonical system name similar to
-# config.sub.  If it succeeds, it prints the system name on stdout, and
-# exits with 0.  Otherwise, it exits with 1.
+# Originally written by Per Bothner.
 #
-# The plan is that this can be called by configure scripts if you
-# don't specify an explicit build system type.
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+#
+# Please send patches with a ChangeLog entry to config-patches@gnu.org.
+
 
 me=`echo "$0" | sed -e 's,.*/,,'`
 
@@ -55,8 +50,7 @@ version="\
 GNU config.guess ($timestamp)
 
 Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
-Free Software Foundation, Inc.
+Copyright 1992-2014 Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -106,7 +100,7 @@ set_cc_for_build='
 trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
 trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
 : ${TMPDIR=/tmp} ;
- { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
  { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
  { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
  { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
@@ -138,12 +132,33 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
 UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
 
+case "${UNAME_SYSTEM}" in
+Linux|GNU|GNU/*)
+       # If the system lacks a compiler, then just pick glibc.
+       # We could probably try harder.
+       LIBC=gnu
+
+       eval $set_cc_for_build
+       cat <<-EOF > $dummy.c
+       #include <features.h>
+       #if defined(__UCLIBC__)
+       LIBC=uclibc
+       #elif defined(__dietlibc__)
+       LIBC=dietlibc
+       #else
+       LIBC=gnu
+       #endif
+       EOF
+       eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
+       ;;
+esac
+
 # Note: order is significant - the case branches are not exclusive.
 
 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
     *:NetBSD:*:*)
        # NetBSD (nbsd) targets should (where applicable) match one or
-       # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
+       # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
        # *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
        # switched to ELF, *-*-netbsd* would select the old
        # object file format.  This provides both forward
@@ -160,6 +175,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
            arm*) machine=arm-unknown ;;
            sh3el) machine=shl-unknown ;;
            sh3eb) machine=sh-unknown ;;
+           sh5el) machine=sh5le-unknown ;;
            *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
        esac
        # The Operating System including object format, if it has switched
@@ -168,7 +184,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
            arm*|i386|m68k|ns32k|sh3*|sparc|vax)
                eval $set_cc_for_build
                if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
-                       | grep __ELF__ >/dev/null
+                       | grep -q __ELF__
                then
                    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
                    # Return netbsd for either.  FIX?
@@ -178,7 +194,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
                fi
                ;;
            *)
-               os=netbsd
+               os=netbsd
                ;;
        esac
        # The OS release
@@ -199,6 +215,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
        # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
        echo "${machine}-${os}${release}"
        exit ;;
+    *:Bitrig:*:*)
+       UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
+       echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
+       exit ;;
     *:OpenBSD:*:*)
        UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
        echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
@@ -206,8 +226,11 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
     *:ekkoBSD:*:*)
        echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
        exit ;;
+    *:SolidBSD:*:*)
+       echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
+       exit ;;
     macppc:MirBSD:*:*)
-       echo powerppc-unknown-mirbsd${UNAME_RELEASE}
+       echo powerpc-unknown-mirbsd${UNAME_RELEASE}
        exit ;;
     *:MirBSD:*:*)
        echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
@@ -218,7 +241,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
                UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
                ;;
        *5.*)
-               UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+               UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
                ;;
        esac
        # According to Compaq, /usr/sbin/psrinfo has been available on
@@ -264,7 +287,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
        # A Xn.n version is an unreleased experimental baselevel.
        # 1.2 uses "1.2" for uname -r.
        echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-       exit ;;
+       # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
+       exitcode=$?
+       trap '' 0
+       exit $exitcode ;;
     Alpha\ *:Windows_NT*:*)
        # How do we know it's Interix rather than the generic POSIX subsystem?
        # Should we change UNAME_MACHINE based on the output of uname instead
@@ -290,12 +316,12 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
        echo s390-ibm-zvmoe
        exit ;;
     *:OS400:*:*)
-        echo powerpc-ibm-os400
+       echo powerpc-ibm-os400
        exit ;;
     arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
        echo arm-acorn-riscix${UNAME_RELEASE}
        exit ;;
-    arm:riscos:*:*|arm:RISCOS:*:*)
+    arm*:riscos:*:*|arm*:RISCOS:*:*)
        echo arm-unknown-riscos
        exit ;;
     SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
@@ -319,14 +345,33 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
        case `/usr/bin/uname -p` in
            sparc) echo sparc-icl-nx7; exit ;;
        esac ;;
+    s390x:SunOS:*:*)
+       echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+       exit ;;
     sun4H:SunOS:5.*:*)
        echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
        exit ;;
     sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
        echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
        exit ;;
-    i86pc:SunOS:5.*:*)
-       echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+    i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
+       echo i386-pc-auroraux${UNAME_RELEASE}
+       exit ;;
+    i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
+       eval $set_cc_for_build
+       SUN_ARCH="i386"
+       # If there is a compiler, see if it is configured for 64-bit objects.
+       # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
+       # This test works for both compilers.
+       if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+           if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
+               (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+               grep IS_64BIT_ARCH >/dev/null
+           then
+               SUN_ARCH="x86_64"
+           fi
+       fi
+       echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
        exit ;;
     sun4*:SunOS:6*:*)
        # According to config.sub, this is the proper way to canonicalize
@@ -370,23 +415,23 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
     # MiNT.  But MiNT is downward compatible to TOS, so this should
     # be no problem.
     atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
-        echo m68k-atari-mint${UNAME_RELEASE}
+       echo m68k-atari-mint${UNAME_RELEASE}
        exit ;;
     atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
        echo m68k-atari-mint${UNAME_RELEASE}
-        exit ;;
+       exit ;;
     *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
-        echo m68k-atari-mint${UNAME_RELEASE}
+       echo m68k-atari-mint${UNAME_RELEASE}
        exit ;;
     milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
-        echo m68k-milan-mint${UNAME_RELEASE}
-        exit ;;
+       echo m68k-milan-mint${UNAME_RELEASE}
+       exit ;;
     hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
-        echo m68k-hades-mint${UNAME_RELEASE}
-        exit ;;
+       echo m68k-hades-mint${UNAME_RELEASE}
+       exit ;;
     *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
-        echo m68k-unknown-mint${UNAME_RELEASE}
-        exit ;;
+       echo m68k-unknown-mint${UNAME_RELEASE}
+       exit ;;
     m68k:machten:*:*)
        echo m68k-apple-machten${UNAME_RELEASE}
        exit ;;
@@ -456,8 +501,8 @@ EOF
        echo m88k-motorola-sysv3
        exit ;;
     AViiON:dgux:*:*)
-        # DG/UX returns AViiON for all architectures
-        UNAME_PROCESSOR=`/usr/bin/uname -p`
+       # DG/UX returns AViiON for all architectures
+       UNAME_PROCESSOR=`/usr/bin/uname -p`
        if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
        then
            if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
@@ -470,7 +515,7 @@ EOF
        else
            echo i586-dg-dgux${UNAME_RELEASE}
        fi
-       exit ;;
+       exit ;;
     M88*:DolphinOS:*:*)        # DolphinOS (SVR3)
        echo m88k-dolphin-sysv3
        exit ;;
@@ -527,7 +572,7 @@ EOF
                echo rs6000-ibm-aix3.2
        fi
        exit ;;
-    *:AIX:*:[45])
+    *:AIX:*:[4567])
        IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
        if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
                IBM_ARCH=rs6000
@@ -570,52 +615,52 @@ EOF
            9000/[678][0-9][0-9])
                if [ -x /usr/bin/getconf ]; then
                    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
-                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
-                    case "${sc_cpu_version}" in
-                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
-                      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
-                      532)                      # CPU_PA_RISC2_0
-                        case "${sc_kernel_bits}" in
-                          32) HP_ARCH="hppa2.0n" ;;
-                          64) HP_ARCH="hppa2.0w" ;;
+                   sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+                   case "${sc_cpu_version}" in
+                     523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+                     528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+                     532)                      # CPU_PA_RISC2_0
+                       case "${sc_kernel_bits}" in
+                         32) HP_ARCH="hppa2.0n" ;;
+                         64) HP_ARCH="hppa2.0w" ;;
                          '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
-                        esac ;;
-                    esac
+                       esac ;;
+                   esac
                fi
                if [ "${HP_ARCH}" = "" ]; then
                    eval $set_cc_for_build
-                   sed 's/^              //' << EOF >$dummy.c
+                   sed 's/^            //' << EOF >$dummy.c
 
-              #define _HPUX_SOURCE
-              #include <stdlib.h>
-              #include <unistd.h>
+               #define _HPUX_SOURCE
+               #include <stdlib.h>
+               #include <unistd.h>
 
-              int main ()
-              {
-              #if defined(_SC_KERNEL_BITS)
-                  long bits = sysconf(_SC_KERNEL_BITS);
-              #endif
-                  long cpu  = sysconf (_SC_CPU_VERSION);
+               int main ()
+               {
+               #if defined(_SC_KERNEL_BITS)
+                   long bits = sysconf(_SC_KERNEL_BITS);
+               #endif
+                   long cpu  = sysconf (_SC_CPU_VERSION);
 
-                  switch (cpu)
-               {
-               case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
-               case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
-               case CPU_PA_RISC2_0:
-              #if defined(_SC_KERNEL_BITS)
-                   switch (bits)
-                       {
-                       case 64: puts ("hppa2.0w"); break;
-                       case 32: puts ("hppa2.0n"); break;
-                       default: puts ("hppa2.0"); break;
-                       } break;
-              #else  /* !defined(_SC_KERNEL_BITS) */
-                   puts ("hppa2.0"); break;
-              #endif
-               default: puts ("hppa1.0"); break;
-               }
-                  exit (0);
-              }
+                   switch (cpu)
+                       {
+                       case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+                       case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+                       case CPU_PA_RISC2_0:
+               #if defined(_SC_KERNEL_BITS)
+                           switch (bits)
+                               {
+                               case 64: puts ("hppa2.0w"); break;
+                               case 32: puts ("hppa2.0n"); break;
+                               default: puts ("hppa2.0"); break;
+                               } break;
+               #else  /* !defined(_SC_KERNEL_BITS) */
+                           puts ("hppa2.0"); break;
+               #endif
+                       default: puts ("hppa1.0"); break;
+                       }
+                   exit (0);
+               }
 EOF
                    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
                    test -z "$HP_ARCH" && HP_ARCH=hppa
@@ -635,7 +680,7 @@ EOF
            # => hppa64-hp-hpux11.23
 
            if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
-               grep __LP64__ >/dev/null
+               grep -q __LP64__
            then
                HP_ARCH="hppa2.0w"
            else
@@ -706,22 +751,22 @@ EOF
        exit ;;
     C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
        echo c1-convex-bsd
-        exit ;;
+       exit ;;
     C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
        if getsysinfo -f scalar_acc
        then echo c32-convex-bsd
        else echo c2-convex-bsd
        fi
-        exit ;;
+       exit ;;
     C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
        echo c34-convex-bsd
-        exit ;;
+       exit ;;
     C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
        echo c38-convex-bsd
-        exit ;;
+       exit ;;
     C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
        echo c4-convex-bsd
-        exit ;;
+       exit ;;
     CRAY*Y-MP:*:*:*)
        echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
        exit ;;
@@ -745,14 +790,14 @@ EOF
        exit ;;
     F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
        FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
-        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
-        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
-        exit ;;
+       FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+       FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+       echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+       exit ;;
     5000:UNIX_System_V:4.*:*)
-        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
-        FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
-        echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+       FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+       FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+       echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
        exit ;;
     i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
        echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
@@ -764,33 +809,51 @@ EOF
        echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
        exit ;;
     *:FreeBSD:*:*)
-       echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+       UNAME_PROCESSOR=`/usr/bin/uname -p`
+       case ${UNAME_PROCESSOR} in
+           amd64)
+               echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+           *)
+               echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+       esac
        exit ;;
     i*:CYGWIN*:*)
        echo ${UNAME_MACHINE}-pc-cygwin
        exit ;;
-    i*:MINGW*:*)
+    *:MINGW64*:*)
+       echo ${UNAME_MACHINE}-pc-mingw64
+       exit ;;
+    *:MINGW*:*)
        echo ${UNAME_MACHINE}-pc-mingw32
        exit ;;
-#### MozillaHack 
-# Netscape's hacked uname
-    xx:WINNT:* | xx:WIN95:*)
-       echo i586-pc-msvc
+    i*:MSYS*:*)
+       echo ${UNAME_MACHINE}-pc-msys
        exit ;;
-###  End MozillaHack
     i*:windows32*:*)
-       # uname -m includes "-pc" on this system.
-       echo ${UNAME_MACHINE}-mingw32
+       # uname -m includes "-pc" on this system.
+       echo ${UNAME_MACHINE}-mingw32
        exit ;;
     i*:PW*:*)
        echo ${UNAME_MACHINE}-pc-pw32
        exit ;;
-    x86:Interix*:[34]*)
-       echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
-       exit ;;
+    *:Interix*:*)
+       case ${UNAME_MACHINE} in
+           x86)
+               echo i586-pc-interix${UNAME_RELEASE}
+               exit ;;
+           authenticamd | genuineintel | EM64T)
+               echo x86_64-unknown-interix${UNAME_RELEASE}
+               exit ;;
+           IA64)
+               echo ia64-unknown-interix${UNAME_RELEASE}
+               exit ;;
+       esac ;;
     [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
        echo i${UNAME_MACHINE}-pc-mks
        exit ;;
+    8664:Windows_NT:*)
+       echo x86_64-pc-mks
+       exit ;;
     i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
        # How do we know it's Interix rather than the generic POSIX subsystem?
        # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
@@ -811,182 +874,157 @@ EOF
        exit ;;
     *:GNU:*:*)
        # the GNU system
-       echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+       echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
        exit ;;
     *:GNU/*:*:*)
        # other systems with GNU libc and userland
-       echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
+       echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
        exit ;;
     i*86:Minix:*:*)
        echo ${UNAME_MACHINE}-pc-minix
        exit ;;
+    aarch64:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+       exit ;;
+    aarch64_be:Linux:*:*)
+       UNAME_MACHINE=aarch64_be
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+       exit ;;
+    alpha:Linux:*:*)
+       case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+         EV5)   UNAME_MACHINE=alphaev5 ;;
+         EV56)  UNAME_MACHINE=alphaev56 ;;
+         PCA56) UNAME_MACHINE=alphapca56 ;;
+         PCA57) UNAME_MACHINE=alphapca56 ;;
+         EV6)   UNAME_MACHINE=alphaev6 ;;
+         EV67)  UNAME_MACHINE=alphaev67 ;;
+         EV68*) UNAME_MACHINE=alphaev68 ;;
+       esac
+       objdump --private-headers /bin/sh | grep -q ld.so.1
+       if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+       exit ;;
+    arc:Linux:*:* | arceb:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+       exit ;;
     arm*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       eval $set_cc_for_build
+       if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
+           | grep -q __ARM_EABI__
+       then
+           echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+       else
+           if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
+               | grep -q __ARM_PCS_VFP
+           then
+               echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
+           else
+               echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
+           fi
+       fi
+       exit ;;
+    avr32*:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
     cris:Linux:*:*)
-       echo cris-axis-linux-gnu
+       echo ${UNAME_MACHINE}-axis-linux-${LIBC}
        exit ;;
     crisv32:Linux:*:*)
-       echo crisv32-axis-linux-gnu
+       echo ${UNAME_MACHINE}-axis-linux-${LIBC}
        exit ;;
     frv:Linux:*:*)
-       echo frv-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+       exit ;;
+    hexagon:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+       exit ;;
+    i*86:Linux:*:*)
+       echo ${UNAME_MACHINE}-pc-linux-${LIBC}
        exit ;;
     ia64:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
     m32r*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
     m68*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
-    mips:Linux:*:*)
+    mips:Linux:*:* | mips64:Linux:*:*)
        eval $set_cc_for_build
        sed 's/^        //' << EOF >$dummy.c
        #undef CPU
-       #undef mips
-       #undef mipsel
+       #undef ${UNAME_MACHINE}
+       #undef ${UNAME_MACHINE}el
        #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
-       CPU=mipsel
+       CPU=${UNAME_MACHINE}el
        #else
        #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
-       CPU=mips
+       CPU=${UNAME_MACHINE}
        #else
        CPU=
        #endif
        #endif
 EOF
-       eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
-       test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+       eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
+       test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
        ;;
-    mips64:Linux:*:*)
-       eval $set_cc_for_build
-       sed 's/^        //' << EOF >$dummy.c
-       #undef CPU
-       #undef mips64
-       #undef mips64el
-       #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
-       CPU=mips64el
-       #else
-       #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
-       CPU=mips64
-       #else
-       CPU=
-       #endif
-       #endif
-EOF
-       eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
-       test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
-       ;;
-    or32:Linux:*:*)
-       echo or32-unknown-linux-gnu
+    or1k:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
-    ppc:Linux:*:*)
-       echo powerpc-unknown-linux-gnu
+    or32:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
-    ppc64:Linux:*:*)
-       echo powerpc64-unknown-linux-gnu
+    padre:Linux:*:*)
+       echo sparc-unknown-linux-${LIBC}
        exit ;;
-    alpha:Linux:*:*)
-       case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
-         EV5)   UNAME_MACHINE=alphaev5 ;;
-         EV56)  UNAME_MACHINE=alphaev56 ;;
-         PCA56) UNAME_MACHINE=alphapca56 ;;
-         PCA57) UNAME_MACHINE=alphapca56 ;;
-         EV6)   UNAME_MACHINE=alphaev6 ;;
-         EV67)  UNAME_MACHINE=alphaev67 ;;
-         EV68*) UNAME_MACHINE=alphaev68 ;;
-        esac
-       objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
-       if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
-       echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+    parisc64:Linux:*:* | hppa64:Linux:*:*)
+       echo hppa64-unknown-linux-${LIBC}
        exit ;;
     parisc:Linux:*:* | hppa:Linux:*:*)
        # Look for CPU level
        case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
-         PA7*) echo hppa1.1-unknown-linux-gnu ;;
-         PA8*) echo hppa2.0-unknown-linux-gnu ;;
-         *)    echo hppa-unknown-linux-gnu ;;
+         PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
+         PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
+         *)    echo hppa-unknown-linux-${LIBC} ;;
        esac
        exit ;;
-    parisc64:Linux:*:* | hppa64:Linux:*:*)
-       echo hppa64-unknown-linux-gnu
+    ppc64:Linux:*:*)
+       echo powerpc64-unknown-linux-${LIBC}
+       exit ;;
+    ppc:Linux:*:*)
+       echo powerpc-unknown-linux-${LIBC}
+       exit ;;
+    ppc64le:Linux:*:*)
+       echo powerpc64le-unknown-linux-${LIBC}
+       exit ;;
+    ppcle:Linux:*:*)
+       echo powerpcle-unknown-linux-${LIBC}
        exit ;;
     s390:Linux:*:* | s390x:Linux:*:*)
-       echo ${UNAME_MACHINE}-ibm-linux
+       echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
        exit ;;
     sh64*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
     sh*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
     sparc:Linux:*:* | sparc64:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+       exit ;;
+    tile*:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+       exit ;;
+    vax:Linux:*:*)
+       echo ${UNAME_MACHINE}-dec-linux-${LIBC}
        exit ;;
     x86_64:Linux:*:*)
-       echo x86_64-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+       exit ;;
+    xtensa*:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
-    i*86:Linux:*:*)
-       # The BFD linker knows what the default object file format is, so
-       # first see if it will tell us. cd to the root directory to prevent
-       # problems with other programs or directories called `ld' in the path.
-       # Set LC_ALL=C to ensure ld outputs messages in English.
-       ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
-                        | sed -ne '/supported targets:/!d
-                                   s/[         ][      ]*/ /g
-                                   s/.*supported targets: *//
-                                   s/ .*//
-                                   p'`
-        case "$ld_supported_targets" in
-         elf32-i386)
-               TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
-               ;;
-         a.out-i386-linux)
-               echo "${UNAME_MACHINE}-pc-linux-gnuaout"
-               exit ;;
-         coff-i386)
-               echo "${UNAME_MACHINE}-pc-linux-gnucoff"
-               exit ;;
-         "")
-               # Either a pre-BFD a.out linker (linux-gnuoldld) or
-               # one that does not give us useful --help.
-               echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
-               exit ;;
-       esac
-       # Determine whether the default compiler is a.out or elf
-       eval $set_cc_for_build
-       sed 's/^        //' << EOF >$dummy.c
-       #include <features.h>
-       #ifdef __ELF__
-       # ifdef __GLIBC__
-       #  if __GLIBC__ >= 2
-       LIBC=gnu
-       #  else
-       LIBC=gnulibc1
-       #  endif
-       # else
-       LIBC=gnulibc1
-       # endif
-       #else
-       #ifdef __INTEL_COMPILER
-       LIBC=gnu
-       #else
-       LIBC=gnuaout
-       #endif
-       #endif
-       #ifdef __dietlibc__
-       LIBC=dietlibc
-       #endif
-EOF
-       eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
-       test x"${LIBC}" != x && {
-               echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
-               exit
-       }
-       test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
-       ;;
     i*86:DYNIX/ptx:4*:*)
        # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
        # earlier versions are messed up and put the nodename in both
@@ -994,11 +1032,11 @@ EOF
        echo i386-sequent-sysv4
        exit ;;
     i*86:UNIX_SV:4.2MP:2.*)
-        # Unixware is an offshoot of SVR4, but it has its own version
-        # number series starting with 2...
-        # I am not positive that other SVR4 systems won't match this,
+       # Unixware is an offshoot of SVR4, but it has its own version
+       # number series starting with 2...
+       # I am not positive that other SVR4 systems won't match this,
        # I just have to hope.  -- rms.
-        # Use sysv4.2uw... so that sysv4* matches it.
+       # Use sysv4.2uw... so that sysv4* matches it.
        echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
        exit ;;
     i*86:OS/2:*:*)
@@ -1015,7 +1053,7 @@ EOF
     i*86:syllable:*:*)
        echo ${UNAME_MACHINE}-pc-syllable
        exit ;;
-    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
+    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
        echo i386-unknown-lynxos${UNAME_RELEASE}
        exit ;;
     i*86:*DOS:*:*)
@@ -1030,7 +1068,7 @@ EOF
        fi
        exit ;;
     i*86:*:5:[678]*)
-       # UnixWare 7.x, OpenUNIX and OpenServer 6.
+       # UnixWare 7.x, OpenUNIX and OpenServer 6.
        case `/bin/uname -X | grep "^Machine"` in
            *486*)           UNAME_MACHINE=i486 ;;
            *Pentium)        UNAME_MACHINE=i586 ;;
@@ -1058,10 +1096,13 @@ EOF
        exit ;;
     pc:*:*:*)
        # Left here for compatibility:
-        # uname -m prints for DJGPP always 'pc', but it prints nothing about
-        # the processor, so we play safe by assuming i386.
-       echo i386-pc-msdosdjgpp
-        exit ;;
+       # uname -m prints for DJGPP always 'pc', but it prints nothing about
+       # the processor, so we play safe by assuming i586.
+       # Note: whatever this is, it MUST be the same as what config.sub
+       # prints for the "djgpp" host, or else GDB configury will decide that
+       # this is a cross-build.
+       echo i586-pc-msdosdjgpp
+       exit ;;
     Intel:Mach:3*:*)
        echo i386-pc-mach3
        exit ;;
@@ -1096,8 +1137,18 @@ EOF
        /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
          && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
     3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
-        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
-          && { echo i486-ncr-sysv4; exit; } ;;
+       /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+         && { echo i486-ncr-sysv4; exit; } ;;
+    NCR*:*:4.2:* | MPRAS*:*:4.2:*)
+       OS_REL='.3'
+       test -r /etc/.relid \
+           && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+       /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+           && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+       /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+           && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
+       /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
+           && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
     m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
        echo m68k-unknown-lynxos${UNAME_RELEASE}
        exit ;;
@@ -1110,7 +1161,7 @@ EOF
     rs6000:LynxOS:2.*:*)
        echo rs6000-unknown-lynxos${UNAME_RELEASE}
        exit ;;
-    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
+    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
        echo powerpc-unknown-lynxos${UNAME_RELEASE}
        exit ;;
     SM[BE]S:UNIX_SV:*:*)
@@ -1130,10 +1181,10 @@ EOF
                echo ns32k-sni-sysv
        fi
        exit ;;
-    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
-                      # says <Richard.M.Bartel@ccMail.Census.GOV>
-        echo i586-unisys-sysv4
-        exit ;;
+    PENTIUM:*:4.0*:*)  # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+                       # says <Richard.M.Bartel@ccMail.Census.GOV>
+       echo i586-unisys-sysv4
+       exit ;;
     *:UNIX_System_V:4*:FTX*)
        # From Gerald Hewes <hewes@openmarket.com>.
        # How about differentiating between stratus architectures? -djm
@@ -1159,11 +1210,11 @@ EOF
        exit ;;
     R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
        if [ -d /usr/nec ]; then
-               echo mips-nec-sysv${UNAME_RELEASE}
+               echo mips-nec-sysv${UNAME_RELEASE}
        else
-               echo mips-unknown-sysv${UNAME_RELEASE}
+               echo mips-unknown-sysv${UNAME_RELEASE}
        fi
-        exit ;;
+       exit ;;
     BeBox:BeOS:*:*)    # BeOS running on hardware made by Be, PPC only.
        echo powerpc-be-beos
        exit ;;
@@ -1173,6 +1224,12 @@ EOF
     BePC:BeOS:*:*)     # BeOS running on Intel PC compatible.
        echo i586-pc-beos
        exit ;;
+    BePC:Haiku:*:*)    # Haiku running on Intel PC compatible.
+       echo i586-pc-haiku
+       exit ;;
+    x86_64:Haiku:*:*)
+       echo x86_64-unknown-haiku
+       exit ;;
     SX-4:SUPER-UX:*:*)
        echo sx4-nec-superux${UNAME_RELEASE}
        exit ;;
@@ -1182,6 +1239,15 @@ EOF
     SX-6:SUPER-UX:*:*)
        echo sx6-nec-superux${UNAME_RELEASE}
        exit ;;
+    SX-7:SUPER-UX:*:*)
+       echo sx7-nec-superux${UNAME_RELEASE}
+       exit ;;
+    SX-8:SUPER-UX:*:*)
+       echo sx8-nec-superux${UNAME_RELEASE}
+       exit ;;
+    SX-8R:SUPER-UX:*:*)
+       echo sx8r-nec-superux${UNAME_RELEASE}
+       exit ;;
     Power*:Rhapsody:*:*)
        echo powerpc-apple-rhapsody${UNAME_RELEASE}
        exit ;;
@@ -1190,9 +1256,31 @@ EOF
        exit ;;
     *:Darwin:*:*)
        UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
-       case $UNAME_PROCESSOR in
-           unknown) UNAME_PROCESSOR=powerpc ;;
-       esac
+       eval $set_cc_for_build
+       if test "$UNAME_PROCESSOR" = unknown ; then
+           UNAME_PROCESSOR=powerpc
+       fi
+       if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
+           if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+               if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+                   (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+                   grep IS_64BIT_ARCH >/dev/null
+               then
+                   case $UNAME_PROCESSOR in
+                       i386) UNAME_PROCESSOR=x86_64 ;;
+                       powerpc) UNAME_PROCESSOR=powerpc64 ;;
+                   esac
+               fi
+           fi
+       elif test "$UNAME_PROCESSOR" = i386 ; then
+           # Avoid executing cc on OS X 10.9, as it ships with a stub
+           # that puts up a graphical alert prompting to install
+           # developer tools.  Any system running Mac OS X 10.7 or
+           # later (Darwin 11 and later) is required to have a 64-bit
+           # processor. This is not true of the ARM version of Darwin
+           # that Apple uses in portable devices.
+           UNAME_PROCESSOR=x86_64
+       fi
        echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
        exit ;;
     *:procnto*:*:* | *:QNX:[0123456789]*:*)
@@ -1206,7 +1294,10 @@ EOF
     *:QNX:*:4*)
        echo i386-pc-qnx
        exit ;;
-    NSE-?:NONSTOP_KERNEL:*:*)
+    NEO-?:NONSTOP_KERNEL:*:*)
+       echo neo-tandem-nsk${UNAME_RELEASE}
+       exit ;;
+    NSE-*:NONSTOP_KERNEL:*:*)
        echo nse-tandem-nsk${UNAME_RELEASE}
        exit ;;
     NSR-?:NONSTOP_KERNEL:*:*)
@@ -1251,13 +1342,13 @@ EOF
        echo pdp10-unknown-its
        exit ;;
     SEI:*:*:SEIUX)
-        echo mips-sei-seiux${UNAME_RELEASE}
+       echo mips-sei-seiux${UNAME_RELEASE}
        exit ;;
     *:DragonFly:*:*)
        echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
        exit ;;
     *:*VMS:*:*)
-       UNAME_MACHINE=`(uname -p) 2>/dev/null`
+       UNAME_MACHINE=`(uname -p) 2>/dev/null`
        case "${UNAME_MACHINE}" in
            A*) echo alpha-dec-vms ; exit ;;
            I*) echo ia64-dec-vms ; exit ;;
@@ -1269,158 +1360,16 @@ EOF
     i*86:skyos:*:*)
        echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
        exit ;;
-esac
-
-#echo '(No uname command or uname output not recognized.)' 1>&2
-#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
-
-eval $set_cc_for_build
-cat >$dummy.c <<EOF
-#ifdef _SEQUENT_
-# include <sys/types.h>
-# include <sys/utsname.h>
-#endif
-main ()
-{
-#if defined (sony)
-#if defined (MIPSEB)
-  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
-     I don't know....  */
-  printf ("mips-sony-bsd\n"); exit (0);
-#else
-#include <sys/param.h>
-  printf ("m68k-sony-newsos%s\n",
-#ifdef NEWSOS4
-          "4"
-#else
-         ""
-#endif
-         ); exit (0);
-#endif
-#endif
-
-#if defined (__arm) && defined (__acorn) && defined (__unix)
-  printf ("arm-acorn-riscix\n"); exit (0);
-#endif
-
-#if defined (hp300) && !defined (hpux)
-  printf ("m68k-hp-bsd\n"); exit (0);
-#endif
-
-#if defined (NeXT)
-#if !defined (__ARCHITECTURE__)
-#define __ARCHITECTURE__ "m68k"
-#endif
-  int version;
-  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
-  if (version < 4)
-    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
-  else
-    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
-  exit (0);
-#endif
-
-#if defined (MULTIMAX) || defined (n16)
-#if defined (UMAXV)
-  printf ("ns32k-encore-sysv\n"); exit (0);
-#else
-#if defined (CMU)
-  printf ("ns32k-encore-mach\n"); exit (0);
-#else
-  printf ("ns32k-encore-bsd\n"); exit (0);
-#endif
-#endif
-#endif
-
-#if defined (__386BSD__)
-  printf ("i386-pc-bsd\n"); exit (0);
-#endif
-
-#if defined (sequent)
-#if defined (i386)
-  printf ("i386-sequent-dynix\n"); exit (0);
-#endif
-#if defined (ns32000)
-  printf ("ns32k-sequent-dynix\n"); exit (0);
-#endif
-#endif
-
-#if defined (_SEQUENT_)
-    struct utsname un;
-
-    uname(&un);
-
-    if (strncmp(un.version, "V2", 2) == 0) {
-       printf ("i386-sequent-ptx2\n"); exit (0);
-    }
-    if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
-       printf ("i386-sequent-ptx1\n"); exit (0);
-    }
-    printf ("i386-sequent-ptx\n"); exit (0);
-
-#endif
-
-#if defined (vax)
-# if !defined (ultrix)
-#  include <sys/param.h>
-#  if defined (BSD)
-#   if BSD == 43
-      printf ("vax-dec-bsd4.3\n"); exit (0);
-#   else
-#    if BSD == 199006
-      printf ("vax-dec-bsd4.3reno\n"); exit (0);
-#    else
-      printf ("vax-dec-bsd\n"); exit (0);
-#    endif
-#   endif
-#  else
-    printf ("vax-dec-bsd\n"); exit (0);
-#  endif
-# else
-    printf ("vax-dec-ultrix\n"); exit (0);
-# endif
-#endif
-
-#if defined (alliant) && defined (i860)
-  printf ("i860-alliant-bsd\n"); exit (0);
-#endif
-
-  exit (1);
-}
-EOF
-
-$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
-       { echo "$SYSTEM_NAME"; exit; }
-
-# Apollos put the system type in the environment.
-
-test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
-
-# Convex versions that predate uname can use getsysinfo(1)
-
-if [ -x /usr/convex/getsysinfo ]
-then
-    case `getsysinfo -f cpu_type` in
-    c1*)
-       echo c1-convex-bsd
-       exit ;;
-    c2*)
-       if getsysinfo -f scalar_acc
-       then echo c32-convex-bsd
-       else echo c2-convex-bsd
-       fi
+    i*86:rdos:*:*)
+       echo ${UNAME_MACHINE}-pc-rdos
        exit ;;
-    c34*)
-       echo c34-convex-bsd
-       exit ;;
-    c38*)
-       echo c38-convex-bsd
+    i*86:AROS:*:*)
+       echo ${UNAME_MACHINE}-pc-aros
        exit ;;
-    c4*)
-       echo c4-convex-bsd
+    x86_64:VMkernel:*:*)
+       echo ${UNAME_MACHINE}-unknown-esx
        exit ;;
-    esac
-fi
+esac
 
 cat >&2 <<EOF
 $0: unable to guess system type
@@ -1429,9 +1378,9 @@ This script, last modified $timestamp, has failed to recognize
 the operating system you are using. It is advised that you
 download the most up to date version of the config scripts from
 
-  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
+  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
 and
-  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
+  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
 
 If the version you run ($0) is already up to date, please
 send the following data and any information you think might be
similarity index 86%
rename from nspr/build/autoconf/config.sub
rename to build/autoconf/config.sub
index cebf96c..4c119ba 100755 (executable)
@@ -1,38 +1,31 @@
 #! /bin/sh
 # Configuration validation subroutine script.
-#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
-#   Free Software Foundation, Inc.
+#   Copyright 1992-2014 Free Software Foundation, Inc.
 
-timestamp='2011-01-03'
+timestamp='2014-01-01'
 
-# This file is (in principle) common to ALL GNU software.
-# The presence of a machine in this file suggests that SOME GNU software
-# can handle that machine.  It does not imply ALL GNU software can.
-#
-# This file is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
 # (at your option) any later version.
 #
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
-# 02110-1301, USA.
+# along with this program; if not, see <http://www.gnu.org/licenses/>.
 #
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
 # configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
+# the same distribution terms that you use for the rest of that
+# program.  This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
 
 
-# Please send patches to <config-patches@gnu.org>.  Submit a context
-# diff and a properly formatted GNU ChangeLog entry.
+# Please send patches with a ChangeLog entry to config-patches@gnu.org.
 #
 # Configuration subroutine to validate and canonicalize a configuration type.
 # Supply the specified configuration type as an argument.
@@ -75,8 +68,7 @@ Report bugs and patches to <config-patches@gnu.org>."
 version="\
 GNU config.sub ($timestamp)
 
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+Copyright 1992-2014 Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -123,10 +115,11 @@ esac
 # Here we must recognize all the valid KERNEL-OS combinations.
 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
 case $maybe_os in
-  nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
-  uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
+  nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | \
+  linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
+  knetbsd*-gnu* | netbsd*-gnu* | \
   kopensolaris*-gnu* | \
-  storm-chaos* | os2-emx* | rtmk-nova* | wince-winmo*)
+  storm-chaos* | os2-emx* | rtmk-nova*)
     os=-$maybe_os
     basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
     ;;
@@ -152,12 +145,12 @@ case $os in
        -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
        -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
        -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
-       -apple | -axis | -knuth | -cray | -microblaze)
+       -apple | -axis | -knuth | -cray | -microblaze*)
                os=
                basic_machine=$1
                ;;
-        -bluegene*)
-               os=-cnk
+       -bluegene*)
+               os=-cnk
                ;;
        -sim | -cisco | -oki | -wec | -winbond)
                os=
@@ -173,10 +166,10 @@ case $os in
                os=-chorusos
                basic_machine=$1
                ;;
-       -chorusrdb)
-               os=-chorusrdb
+       -chorusrdb)
+               os=-chorusrdb
                basic_machine=$1
-               ;;
+               ;;
        -hiux*)
                os=-hiuxwe2
                ;;
@@ -221,6 +214,12 @@ case $os in
        -isc*)
                basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
                ;;
+       -lynx*178)
+               os=-lynxos178
+               ;;
+       -lynx*5)
+               os=-lynxos5
+               ;;
        -lynx*)
                os=-lynxos
                ;;
@@ -245,20 +244,28 @@ case $basic_machine in
        # Some are omitted here because they have special meanings below.
        1750a | 580 \
        | a29k \
+       | aarch64 | aarch64_be \
        | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
        | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
        | am33_2.0 \
-       | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
+       | arc | arceb \
+       | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
+       | avr | avr32 \
+       | be32 | be64 \
        | bfin \
-       | c4x | clipper \
+       | c4x | c8051 | clipper \
        | d10v | d30v | dlx | dsp16xx \
+       | epiphany \
        | fido | fr30 | frv \
        | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+       | hexagon \
        | i370 | i860 | i960 | ia64 \
        | ip2k | iq2000 \
+       | k1om \
+       | le32 | le64 \
        | lm32 \
        | m32c | m32r | m32rle | m68000 | m68k | m88k \
-       | maxq | mb | microblaze | mcore | mep | metag \
+       | maxq | mb | microblaze | microblazeel | mcore | mep | metag \
        | mips | mipsbe | mipseb | mipsel | mipsle \
        | mips16 \
        | mips64 | mips64el \
@@ -276,32 +283,45 @@ case $basic_machine in
        | mipsisa64r2 | mipsisa64r2el \
        | mipsisa64sb1 | mipsisa64sb1el \
        | mipsisa64sr71k | mipsisa64sr71kel \
+       | mipsr5900 | mipsr5900el \
        | mipstx39 | mipstx39el \
        | mn10200 | mn10300 \
        | moxie \
        | mt \
        | msp430 \
-       | nios | nios2 \
+       | nds32 | nds32le | nds32be \
+       | nios | nios2 | nios2eb | nios2el \
        | ns16k | ns32k \
-       | or32 \
+       | open8 \
+       | or1k | or32 \
        | pdp10 | pdp11 | pj | pjl \
-       | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
+       | powerpc | powerpc64 | powerpc64le | powerpcle \
        | pyramid \
+       | rl78 | rx \
        | score \
        | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
        | sh64 | sh64le \
        | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
        | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
-       | spu | strongarm \
-       | tahoe | thumb | tic4x | tic80 | tron \
-       | v850 | v850e \
+       | spu \
+       | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
+       | ubicom32 \
+       | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
        | we32k \
-       | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
+       | x86 | xc16x | xstormy16 | xtensa \
        | z8k | z80)
                basic_machine=$basic_machine-unknown
                ;;
-       m6811 | m68hc11 | m6812 | m68hc12)
-               # Motorola 68HC11/12.
+       c54x)
+               basic_machine=tic54x-unknown
+               ;;
+       c55x)
+               basic_machine=tic55x-unknown
+               ;;
+       c6x)
+               basic_machine=tic6x-unknown
+               ;;
+       m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
                basic_machine=$basic_machine-unknown
                os=-none
                ;;
@@ -311,6 +331,21 @@ case $basic_machine in
                basic_machine=mt-unknown
                ;;
 
+       strongarm | thumb | xscale)
+               basic_machine=arm-unknown
+               ;;
+       xgate)
+               basic_machine=$basic_machine-unknown
+               os=-none
+               ;;
+       xscaleeb)
+               basic_machine=armeb-unknown
+               ;;
+
+       xscaleel)
+               basic_machine=armel-unknown
+               ;;
+
        # We use `pc' rather than `unknown'
        # because (1) that's what they normally are, and
        # (2) the word "unknown" tends to confuse beginning users.
@@ -325,25 +360,31 @@ case $basic_machine in
        # Recognize the basic CPU types with company name.
        580-* \
        | a29k-* \
+       | aarch64-* | aarch64_be-* \
        | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
        | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
-       | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+       | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
        | arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
        | avr-* | avr32-* \
+       | be32-* | be64-* \
        | bfin-* | bs2000-* \
-       | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
-       | clipper-* | craynv-* | cydra-* \
+       | c[123]* | c30-* | [cjt]90-* | c4x-* \
+       | c8051-* | clipper-* | craynv-* | cydra-* \
        | d10v-* | d30v-* | dlx-* \
        | elxsi-* \
        | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
        | h8300-* | h8500-* \
        | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+       | hexagon-* \
        | i*86-* | i860-* | i960-* | ia64-* \
        | ip2k-* | iq2000-* \
+       | k1om-* \
+       | le32-* | le64-* \
        | lm32-* \
        | m32c-* | m32r-* | m32rle-* \
        | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
-       | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
+       | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
+       | microblaze-* | microblazeel-* \
        | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
        | mips16-* \
        | mips64-* | mips64el-* \
@@ -361,28 +402,34 @@ case $basic_machine in
        | mipsisa64r2-* | mipsisa64r2el-* \
        | mipsisa64sb1-* | mipsisa64sb1el-* \
        | mipsisa64sr71k-* | mipsisa64sr71kel-* \
+       | mipsr5900-* | mipsr5900el-* \
        | mipstx39-* | mipstx39el-* \
        | mmix-* \
        | mt-* \
        | msp430-* \
-       | nios-* | nios2-* \
+       | nds32-* | nds32le-* | nds32be-* \
+       | nios-* | nios2-* | nios2eb-* | nios2el-* \
        | none-* | np1-* | ns16k-* | ns32k-* \
+       | open8-* \
        | orion-* \
        | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
-       | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
+       | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
        | pyramid-* \
-       | romp-* | rs6000-* \
+       | rl78-* | romp-* | rs6000-* | rx-* \
        | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
        | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
        | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
        | sparclite-* \
-       | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
-       | tahoe-* | thumb-* \
-       | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
+       | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
+       | tahoe-* \
+       | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+       | tile*-* \
        | tron-* \
-       | v850-* | v850e-* | vax-* \
+       | ubicom32-* \
+       | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
+       | vax-* \
        | we32k-* \
-       | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
+       | x86-* | x86_64-* | xc16x-* | xps100-* \
        | xstormy16-* | xtensa*-* \
        | ymp-* \
        | z8k-* | z80-*)
@@ -407,7 +454,7 @@ case $basic_machine in
                basic_machine=a29k-amd
                os=-udi
                ;;
-       abacus)
+       abacus)
                basic_machine=abacus-unknown
                ;;
        adobe68k)
@@ -477,11 +524,20 @@ case $basic_machine in
                basic_machine=powerpc-ibm
                os=-cnk
                ;;
+       c54x-*)
+               basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       c55x-*)
+               basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       c6x-*)
+               basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
        c90)
                basic_machine=c90-cray
                os=-unicos
                ;;
-        cegcc)
+       cegcc)
                basic_machine=arm-unknown
                os=-cegcc
                ;;
@@ -513,7 +569,7 @@ case $basic_machine in
                basic_machine=craynv-cray
                os=-unicosmp
                ;;
-       cr16)
+       cr16 | cr16-*)
                basic_machine=cr16-unknown
                os=-elf
                ;;
@@ -671,7 +727,6 @@ case $basic_machine in
        i370-ibm* | ibm*)
                basic_machine=i370-ibm
                ;;
-# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
        i*86v32)
                basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
                os=-sysv32
@@ -729,11 +784,15 @@ case $basic_machine in
                basic_machine=ns32k-utek
                os=-sysv
                ;;
-        microblaze)
+       microblaze*)
                basic_machine=microblaze-xilinx
                ;;
+       mingw64)
+               basic_machine=x86_64-pc
+               os=-mingw64
+               ;;
        mingw32)
-               basic_machine=i386-pc
+               basic_machine=i686-pc
                os=-mingw32
                ;;
        mingw32ce)
@@ -768,10 +827,18 @@ case $basic_machine in
        ms1-*)
                basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
                ;;
+       msys)
+               basic_machine=i686-pc
+               os=-msys
+               ;;
        mvs)
                basic_machine=i370-ibm
                os=-mvs
                ;;
+       nacl)
+               basic_machine=le32-unknown
+               os=-nacl
+               ;;
        ncr3000)
                basic_machine=i486-ncr
                os=-sysv4
@@ -836,6 +903,12 @@ case $basic_machine in
        np1)
                basic_machine=np1-gould
                ;;
+       neo-tandem)
+               basic_machine=neo-tandem
+               ;;
+       nse-tandem)
+               basic_machine=nse-tandem
+               ;;
        nsr-tandem)
                basic_machine=nsr-tandem
                ;;
@@ -918,9 +991,10 @@ case $basic_machine in
                ;;
        power)  basic_machine=power-ibm
                ;;
-       ppc)    basic_machine=powerpc-unknown
+       ppc | ppcbe)    basic_machine=powerpc-unknown
                ;;
-       ppc-*)  basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+       ppc-* | ppcbe-*)
+               basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
                ;;
        ppcle | powerpclittle | ppc-le | powerpc-little)
                basic_machine=powerpcle-unknown
@@ -945,7 +1019,11 @@ case $basic_machine in
                basic_machine=i586-unknown
                os=-pw32
                ;;
-       rdos)
+       rdos | rdos64)
+               basic_machine=x86_64-pc
+               os=-rdos
+               ;;
+       rdos32)
                basic_machine=i386-pc
                os=-rdos
                ;;
@@ -1014,6 +1092,9 @@ case $basic_machine in
                basic_machine=i860-stratus
                os=-sysv4
                ;;
+       strongarm-* | thumb-*)
+               basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
        sun2)
                basic_machine=m68000-sun
                ;;
@@ -1070,20 +1151,8 @@ case $basic_machine in
                basic_machine=t90-cray
                os=-unicos
                ;;
-       tic54x | c54x*)
-               basic_machine=tic54x-unknown
-               os=-coff
-               ;;
-       tic55x | c55x*)
-               basic_machine=tic55x-unknown
-               os=-coff
-               ;;
-       tic6x | c6x*)
-               basic_machine=tic6x-unknown
-               os=-coff
-               ;;
        tile*)
-               basic_machine=tile-unknown
+               basic_machine=$basic_machine-unknown
                os=-linux-gnu
                ;;
        tx39)
@@ -1153,6 +1222,9 @@ case $basic_machine in
        xps | xps100)
                basic_machine=xps100-honeywell
                ;;
+       xscale-* | xscalee[bl]-*)
+               basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
+               ;;
        ymp)
                basic_machine=ymp-cray
                os=-unicos
@@ -1250,9 +1322,12 @@ esac
 if [ x"$os" != x"" ]
 then
 case $os in
-        # First match some system type aliases
-        # that might get confused with valid system types.
+       # First match some system type aliases
+       # that might get confused with valid system types.
        # -solaris* is a basic system type, with this one exception.
+       -auroraux)
+               os=-auroraux
+               ;;
        -solaris1 | -solaris1.*)
                os=`echo $os | sed -e 's|solaris1|sunos4|'`
                ;;
@@ -1274,21 +1349,22 @@ case $os in
        # -sysv* is not here because it comes later, after sysvr4.
        -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
              | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
-             | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
-             | -kopensolaris* \
+             | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
+             | -sym* | -kopensolaris* | -plan9* \
              | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
              | -aos* | -aros* \
              | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
              | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
              | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
-             | -openbsd* | -solidbsd* \
+             | -bitrig* | -openbsd* | -solidbsd* \
              | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
              | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
              | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
              | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
              | -chorusos* | -chorusrdb* | -cegcc* \
-             | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
-             | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
+             | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+             | -mingw32* | -mingw64* | -linux-gnu* \
+             | -linux-newlib* | -linux-musl* | -linux-uclibc* \
              | -uxpv* | -beos* | -mpeix* | -udk* \
              | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
              | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
@@ -1296,7 +1372,7 @@ case $os in
              | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
              | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
              | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
-             | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -winmo*)
+             | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
        # Remember, each alternative MUST END IN *, to match a version number.
                ;;
        -qnx*)
@@ -1335,12 +1411,9 @@ case $os in
        -opened*)
                os=-openedition
                ;;
-        -os400*)
+       -os400*)
                os=-os400
                ;;
-       -wince-winmo*)
-               os=-wince-winmo
-               ;;
        -wince*)
                os=-wince
                ;;
@@ -1387,7 +1460,7 @@ case $os in
        -sinix*)
                os=-sysv4
                ;;
-        -tpf*)
+       -tpf*)
                os=-tpf
                ;;
        -triton*)
@@ -1423,15 +1496,14 @@ case $os in
        -aros*)
                os=-aros
                ;;
-       -kaos*)
-               os=-kaos
-               ;;
        -zvmoe)
                os=-zvmoe
                ;;
        -dicos*)
                os=-dicos
                ;;
+       -nacl*)
+               ;;
        -android*)
                os=-android
                ;;
@@ -1457,10 +1529,10 @@ else
 # system, and we'll never get to this point.
 
 case $basic_machine in
-        score-*)
+       score-*)
                os=-elf
                ;;
-        spu-*)
+       spu-*)
                os=-elf
                ;;
        *-acorn)
@@ -1472,8 +1544,23 @@ case $basic_machine in
        arm*-semi)
                os=-aout
                ;;
-        c4x-* | tic4x-*)
-               os=-coff
+       c4x-* | tic4x-*)
+               os=-coff
+               ;;
+       c8051-*)
+               os=-elf
+               ;;
+       hexagon-*)
+               os=-elf
+               ;;
+       tic54x-*)
+               os=-coff
+               ;;
+       tic55x-*)
+               os=-coff
+               ;;
+       tic6x-*)
+               os=-coff
                ;;
        # This must come before the *-dec entry.
        pdp10-*)
@@ -1493,14 +1580,11 @@ case $basic_machine in
                ;;
        m68000-sun)
                os=-sunos3
-               # This also exists in the configure program, but was not the
-               # default.
-               # os=-sunos4
                ;;
        m68*-cisco)
                os=-aout
                ;;
-        mep-*)
+       mep-*)
                os=-elf
                ;;
        mips*-cisco)
@@ -1509,6 +1593,9 @@ case $basic_machine in
        mips*-*)
                os=-elf
                ;;
+       or1k-*)
+               os=-elf
+               ;;
        or32-*)
                os=-coff
                ;;
@@ -1527,7 +1614,7 @@ case $basic_machine in
        *-ibm)
                os=-aix
                ;;
-       *-knuth)
+       *-knuth)
                os=-mmixware
                ;;
        *-wec)
diff --git a/build/autoconf/patches/config.sub.patch b/build/autoconf/patches/config.sub.patch
new file mode 100644 (file)
index 0000000..f3afca2
--- /dev/null
@@ -0,0 +1,51 @@
+--- config.sub.orig    2014-03-09 18:34:03 -0700
++++ config.sub 2014-03-14 19:49:48 -0700
+@@ -115,7 +115,7 @@
+ # Here we must recognize all the valid KERNEL-OS combinations.
+ maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+ case $maybe_os in
+-  nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
++  nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | \
+   linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
+   knetbsd*-gnu* | netbsd*-gnu* | \
+   kopensolaris*-gnu* | \
+@@ -123,10 +123,6 @@
+     os=-$maybe_os
+     basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+     ;;
+-  android-linux)
+-    os=-linux-android
+-    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
+-    ;;
+   *)
+     basic_machine=`echo $1 | sed 's/-[^-]*$//'`
+     if [ $basic_machine != $1 ]
+@@ -1367,7 +1363,7 @@
+             | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+             | -chorusos* | -chorusrdb* | -cegcc* \
+             | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+-            | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
++            | -mingw32* | -mingw64* | -linux-gnu* \
+             | -linux-newlib* | -linux-musl* | -linux-uclibc* \
+             | -uxpv* | -beos* | -mpeix* | -udk* \
+             | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
+@@ -1508,6 +1504,9 @@
+               ;;
+       -nacl*)
+               ;;
++      -android*)
++              os=-android
++              ;;
+       -none)
+               ;;
+       *)
+@@ -1777,6 +1776,9 @@
+                       -vos*)
+                               vendor=stratus
+                               ;;
++                      *-android*|*-linuxandroid*)
++                              vendor=linux-
++                              ;;
+               esac
+               basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
+               ;;
similarity index 100%
rename from nspr/config/.cvsignore
rename to config/.cvsignore
similarity index 100%
rename from nspr/config/Makefile.in
rename to config/Makefile.in
similarity index 98%
rename from nspr/config/autoconf.mk.in
rename to config/autoconf.mk.in
index 5f093c4..8c9a43a 100644 (file)
@@ -14,6 +14,7 @@ exec_prefix   = @exec_prefix@
 bindir         = @bindir@
 includedir     = @includedir@
 libdir         = @libdir@
+datarootdir    = @datarootdir@
 datadir                = @datadir@
 
 dist_prefix    = @dist_prefix@
@@ -50,6 +51,7 @@ MOZ_DEBUG_SYMBOLS = @MOZ_DEBUG_SYMBOLS@
 USE_CPLUS      = @USE_CPLUS@
 USE_IPV6       = @USE_IPV6@
 USE_N32                = @USE_N32@
+USE_X32                = @USE_X32@
 USE_64         = @USE_64@
 ENABLE_STRIP   = @ENABLE_STRIP@
 
similarity index 100%
rename from nspr/config/config.mk
rename to config/config.mk
similarity index 100%
rename from nspr/config/gcc_hidden.h
rename to config/gcc_hidden.h
similarity index 100%
rename from nspr/config/libc_r.h
rename to config/libc_r.h
similarity index 100%
rename from nspr/config/nfspwd.pl
rename to config/nfspwd.pl
diff --git a/config/now.c b/config/now.c
new file mode 100644 (file)
index 0000000..2893c5b
--- /dev/null
@@ -0,0 +1,41 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#include <stdio.h>
+#include <time.h>
+
+int main(int argc, char **argv)
+{
+#if defined(OMIT_LIB_BUILD_TIME)
+    /*
+     * Some platforms don't have any 64-bit integer type
+     * such as 'long long'.  Because we can't use NSPR's
+     * PR_snprintf in this program, it is difficult to
+     * print a static initializer for PRInt64 (a struct).
+     * So we print nothing.  The makefiles that build the
+     * shared libraries will detect the empty output string
+     * of this program and omit the library build time
+     * in PRVersionDescription.
+     */
+#elif defined(_MSC_VER)
+    __int64 now;
+    time_t sec;
+
+    sec = time(NULL);
+    now = (1000000i64) * sec;
+    fprintf(stdout, "%I64d", now);
+#else
+    long long now;
+    time_t sec;
+
+    sec = time(NULL);
+    now = (1000000LL) * sec;
+    fprintf(stdout, "%lld", now);
+#endif
+
+    return 0;
+}  /* main */
+
+/* now.c */
similarity index 99%
rename from nspr/config/nsinstall.c
rename to config/nsinstall.c
index 3396dcb..f1d2cff 100644 (file)
@@ -208,7 +208,6 @@ main(int argc, char **argv)
     todir = malloc(PATH_MAX + 1);
     todir = getcwd(todir, PATH_MAX);
 #endif
-    tdlen = strlen(todir);
     xchdir(cwd);
     tdlen = strlen(todir);
 
similarity index 100%
rename from nspr/config/nspr.m4
rename to config/nspr.m4
similarity index 100%
rename from nspr/config/nspr.pc.in
rename to config/nspr.pc.in
similarity index 100%
rename from nspr/config/pathsub.h
rename to config/pathsub.h
similarity index 100%
rename from nspr/config/prdepend.h
rename to config/prdepend.h
similarity index 100%
rename from nspr/config/rules.mk
rename to config/rules.mk
diff --git a/configure b/configure
new file mode 100755 (executable)
index 0000000..11f37c1
--- /dev/null
+++ b/configure
@@ -0,0 +1,9890 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.69.
+#
+#
+# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
+#
+#
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+  emulate sh
+  NULLCMD=:
+  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in #(
+  *posix*) :
+    set -o posix ;; #(
+  *) :
+     ;;
+esac
+fi
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='print -r --'
+  as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='printf %s\n'
+  as_echo_n='printf %s'
+else
+  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+    as_echo_n='/usr/ucb/echo -n'
+  else
+    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+    as_echo_n_body='eval
+      arg=$1;
+      case $arg in #(
+      *"$as_nl"*)
+       expr "X$arg" : "X\\(.*\\)$as_nl";
+       arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+      esac;
+      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+    '
+    export as_echo_n_body
+    as_echo_n='sh -c $as_echo_n_body as_echo'
+  fi
+  export as_echo_body
+  as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  PATH_SEPARATOR=:
+  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+      PATH_SEPARATOR=';'
+  }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.  Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" ""       $as_nl"
+
+# Find who we are.  Look in the path if we contain no directory separator.
+as_myself=
+case $0 in #((
+  *[\\/]* ) as_myself=$0 ;;
+  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+  done
+IFS=$as_save_IFS
+
+     ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+  as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+  exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there.  '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+# Use a proper internal environment variable to ensure we don't fall
+  # into an infinite loop, continuously re-executing ourselves.
+  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
+    _as_can_reexec=no; export _as_can_reexec;
+    # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+  *v*x* | *x*v* ) as_opts=-vx ;;
+  *v* ) as_opts=-v ;;
+  *x* ) as_opts=-x ;;
+  * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+as_fn_exit 255
+  fi
+  # We don't want this to propagate to other subprocesses.
+          { _as_can_reexec=; unset _as_can_reexec;}
+if test "x$CONFIG_SHELL" = x; then
+  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
+  emulate sh
+  NULLCMD=:
+  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '\${1+\"\$@\"}'='\"\$@\"'
+  setopt NO_GLOB_SUBST
+else
+  case \`(set -o) 2>/dev/null\` in #(
+  *posix*) :
+    set -o posix ;; #(
+  *) :
+     ;;
+esac
+fi
+"
+  as_required="as_fn_return () { (exit \$1); }
+as_fn_success () { as_fn_return 0; }
+as_fn_failure () { as_fn_return 1; }
+as_fn_ret_success () { return 0; }
+as_fn_ret_failure () { return 1; }
+
+exitcode=0
+as_fn_success || { exitcode=1; echo as_fn_success failed.; }
+as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
+as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
+as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
+if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
+
+else
+  exitcode=1; echo positional parameters were not saved.
+fi
+test x\$exitcode = x0 || exit 1
+test -x / || exit 1"
+  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
+  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
+  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
+  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
+test \$(( 1 + 1 )) = 2 || exit 1"
+  if (eval "$as_required") 2>/dev/null; then :
+  as_have_required=yes
+else
+  as_have_required=no
+fi
+  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
+
+else
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_found=false
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  as_found=:
+  case $as_dir in #(
+        /*)
+          for as_base in sh bash ksh sh5; do
+            # Try only shells that exist, to save several forks.
+            as_shell=$as_dir/$as_base
+            if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+                   { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
+  CONFIG_SHELL=$as_shell as_have_required=yes
+                  if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
+  break 2
+fi
+fi
+          done;;
+       esac
+  as_found=false
+done
+$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
+             { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
+  CONFIG_SHELL=$SHELL as_have_required=yes
+fi; }
+IFS=$as_save_IFS
+
+
+      if test "x$CONFIG_SHELL" != x; then :
+  export CONFIG_SHELL
+             # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+  *v*x* | *x*v* ) as_opts=-vx ;;
+  *v* ) as_opts=-v ;;
+  *x* ) as_opts=-x ;;
+  * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+exit 255
+fi
+
+    if test x$as_have_required = xno; then :
+  $as_echo "$0: This script requires a shell more modern than all"
+  $as_echo "$0: the shells that I found on your system."
+  if test x${ZSH_VERSION+set} = xset ; then
+    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
+    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
+  else
+    $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
+$0: including any error possibly output before this
+$0: message. Then install a modern shell, or manually run
+$0: the script under such a shell if you do have one."
+  fi
+  exit 1
+fi
+fi
+fi
+SHELL=${CONFIG_SHELL-/bin/sh}
+export SHELL
+# Unset more variables known to interfere with behavior of common tools.
+CLICOLOR_FORCE= GREP_OPTIONS=
+unset CLICOLOR_FORCE GREP_OPTIONS
+
+## --------------------- ##
+## M4sh Shell Functions. ##
+## --------------------- ##
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+  { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+  return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+  set +e
+  as_fn_set_status $1
+  exit $1
+} # as_fn_exit
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+  case $as_dir in #(
+  -*) as_dir=./$as_dir;;
+  esac
+  test -d "$as_dir" || eval $as_mkdir_p || {
+    as_dirs=
+    while :; do
+      case $as_dir in #(
+      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+      *) as_qdir=$as_dir;;
+      esac
+      as_dirs="'$as_qdir' $as_dirs"
+      as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+        X"$as_dir" : 'X\(//\)[^/]' \| \
+        X"$as_dir" : 'X\(//\)$' \| \
+        X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)[^/].*/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\).*/{
+           s//\1/
+           q
+         }
+         s/.*/./; q'`
+      test -d "$as_dir" && break
+    done
+    test -z "$as_dirs" || eval "mkdir $as_dirs"
+  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+  test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+  eval 'as_fn_append ()
+  {
+    eval $1+=\$2
+  }'
+else
+  as_fn_append ()
+  {
+    eval $1=\$$1\$2
+  }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+  eval 'as_fn_arith ()
+  {
+    as_val=$(( $* ))
+  }'
+else
+  as_fn_arith ()
+  {
+    as_val=`expr "$@" || test $? -eq 1`
+  }
+fi # as_fn_arith
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+  as_status=$1; test $as_status -eq 0 && as_status=1
+  if test "$4"; then
+    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+  fi
+  $as_echo "$as_me: error: $2" >&2
+  as_fn_exit $as_status
+} # as_fn_error
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+  as_dirname=dirname
+else
+  as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+        X"$0" : 'X\(//\)$' \| \
+        X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{
+           s//\1/
+           q
+         }
+         /^X\/\(\/\/\)$/{
+           s//\1/
+           q
+         }
+         /^X\/\(\/\).*/{
+           s//\1/
+           q
+         }
+         s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+
+  as_lineno_1=$LINENO as_lineno_1a=$LINENO
+  as_lineno_2=$LINENO as_lineno_2a=$LINENO
+  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
+  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
+  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
+  sed -n '
+    p
+    /[$]LINENO/=
+  ' <$as_myself |
+    sed '
+      s/[$]LINENO.*/&-/
+      t lineno
+      b
+      :lineno
+      N
+      :loop
+      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+      t loop
+      s/-\n.*//
+    ' >$as_me.lineno &&
+  chmod +x "$as_me.lineno" ||
+    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+
+  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
+  # already done that, so ensure we don't try to do so again and fall
+  # in an infinite loop.  This has already happened in practice.
+  _as_can_reexec=no; export _as_can_reexec
+  # Don't try to exec as it changes $[0], causing all sort of problems
+  # (the dirname of $[0] is not the place where we might find the
+  # original and so on.  Autoconf is especially sensitive to this).
+  . "./$as_me.lineno"
+  # Exit status is that of the last command.
+  exit
+}
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+  case `echo 'xy\c'` in
+  *c*) ECHO_T='        ';;     # ECHO_T is single tab character.
+  xy)  ECHO_C='\c';;
+  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
+       ECHO_T='        ';;
+  esac;;
+*)
+  ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+  rm -f conf$$.dir/conf$$.file
+else
+  rm -f conf$$.dir
+  mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+  if ln -s conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s='ln -s'
+    # ... but there are two gotchas:
+    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+    # In both cases, we have to default to `cp -pR'.
+    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+      as_ln_s='cp -pR'
+  elif ln conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s=ln
+  else
+    as_ln_s='cp -pR'
+  fi
+else
+  as_ln_s='cp -pR'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p='mkdir -p "$as_dir"'
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+test -n "$DJDIR" || exec 7<&0 </dev/null
+exec 6>&1
+
+# Name of the host.
+# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_clean_files=
+ac_config_libobj_dir=.
+LIBOBJS=
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+
+# Identity of this package.
+PACKAGE_NAME=
+PACKAGE_TARNAME=
+PACKAGE_VERSION=
+PACKAGE_STRING=
+PACKAGE_BUGREPORT=
+PACKAGE_URL=
+
+ac_unique_file="pr/include/nspr.h"
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# ifdef HAVE_STDLIB_H
+#  include <stdlib.h>
+# endif
+#endif
+#ifdef HAVE_STRING_H
+# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
+#  include <memory.h>
+# endif
+# include <string.h>
+#endif
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#ifdef HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
+
+ac_subst_vars='LTLIBOBJS
+LIBOBJS
+MT
+NEXT_ROOT
+SYMBIAN_SDK_DIR
+MACOS_SDK_DIR
+WRAP_SYSTEM_INCLUDES
+VISIBILITY_FLAGS
+CYGWIN_WRAPPER
+OS_DLLFLAGS
+EXEFLAGS
+DLLFLAGS
+RCFLAGS
+RC
+OPTIMIZER
+NSINSTALL
+RELEASE_OBJDIR_NAME
+OBJDIR_NAME
+OBJDIR
+ULTRASPARC_LIBRARY
+MOZ_OBJFORMAT
+NOSUCHFILE
+AIX_LINK_OPTS
+RESOLVE_LINK_SYMBOLS
+OS_LIBS
+PROFILE_USE_LDFLAGS
+PROFILE_USE_CFLAGS
+PROFILE_GEN_LDFLAGS
+PROFILE_GEN_CFLAGS
+IMPLIB
+FILTER
+ASFLAGS
+AR_FLAGS
+DEFINES
+MACOSX_DEPLOYMENT_TARGET
+OS_TEST
+OS_RELEASE
+OS_ARCH
+OS_TARGET
+DSO_LDOPTS
+DSO_CFLAGS
+MKSHLIB
+WRAP_LDFLAGS
+ASM_SUFFIX
+DLL_SUFFIX
+LIB_SUFFIX
+OBJ_SUFFIX
+CPU_ARCH
+PR_MD_ARCH_DIR
+PR_MD_ASFILES
+PR_MD_CSRCS
+MDCPUCFG_H
+NSPR_MODNAME
+MOD_PATCH_VERSION
+MOD_MINOR_VERSION
+MOD_MAJOR_VERSION
+LIBPLC
+LIBNSPR
+USE_NSPR_THREADS
+USE_USER_PTHREADS
+USE_BTHREADS
+USE_PTHREADS
+ENABLE_STRIP
+OBJECT_MODE
+USE_64
+USE_X32
+USE_N32
+USE_IPV6
+USE_CPLUS
+MOZ_DEBUG_SYMBOLS
+MOZ_DEBUG
+MOZ_OPTIMIZE
+CROSS_COMPILE
+MSC_VER
+GCC_USE_GNU_LD
+GNU_CC
+HOST_LDFLAGS
+HOST_CFLAGS
+MOZILLA_CLIENT
+SHELL_OVERRIDE
+CCACHE
+EGREP
+GREP
+PERL
+CPP
+HOST_CC
+WINDRES
+STRIP
+LD
+AS
+AR
+RANLIB
+ac_ct_CXX
+CXXFLAGS
+CXX
+OBJEXT
+EXEEXT
+ac_ct_CC
+CPPFLAGS
+LDFLAGS
+CFLAGS
+WHOAMI
+dist_libdir
+dist_includedir
+dist_bindir
+dist_prefix
+CC
+target_os
+target_vendor
+target_cpu
+target
+host_os
+host_vendor
+host_cpu
+host
+build_os
+build_vendor
+build_cpu
+build
+target_alias
+host_alias
+build_alias
+LIBS
+ECHO_T
+ECHO_N
+ECHO_C
+DEFS
+mandir
+localedir
+libdir
+psdir
+pdfdir
+dvidir
+htmldir
+infodir
+docdir
+oldincludedir
+includedir
+localstatedir
+sharedstatedir
+sysconfdir
+datadir
+datarootdir
+libexecdir
+sbindir
+bindir
+program_transform_name
+prefix
+exec_prefix
+PACKAGE_URL
+PACKAGE_BUGREPORT
+PACKAGE_STRING
+PACKAGE_VERSION
+PACKAGE_TARNAME
+PACKAGE_NAME
+PATH_SEPARATOR
+SHELL'
+ac_subst_files=''
+ac_user_opts='
+enable_option_checking
+with_android_ndk
+with_android_toolchain
+with_android_version
+with_android_platform
+with_gonk
+with_dist_prefix
+with_dist_bindir
+with_dist_includedir
+with_dist_libdir
+with_mozilla
+enable_optimize
+enable_debug
+enable_debug_symbols
+enable_win32_target
+enable_symbian_target
+enable_debug_rtl
+enable_n32
+enable_x32
+enable_64bit
+enable_mdupdate
+enable_cplus
+with_arm_kuser
+with_macos_sdk
+enable_macos_target
+enable_os2_high_mem
+enable_thumb2
+with_thumb
+with_thumb_interwork
+with_arch
+with_fpu
+with_float_abi
+with_soft_float
+with_symbian_sdk
+with_ccache
+enable_strip
+with_pthreads
+enable_user_pthreads
+enable_nspr_threads
+with_bthreads
+enable_ipv6
+enable_wrap_malloc
+with_wrap_malloc
+'
+      ac_precious_vars='build_alias
+host_alias
+target_alias
+CC
+CFLAGS
+LDFLAGS
+LIBS
+CPPFLAGS
+CXX
+CXXFLAGS
+CCC
+CPP'
+
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+ac_unrecognized_opts=
+ac_unrecognized_sep=
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+# (The list follows the same order as the GNU Coding Standards.)
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+docdir='${datarootdir}/doc/${PACKAGE}'
+infodir='${datarootdir}/info'
+htmldir='${docdir}'
+dvidir='${docdir}'
+pdfdir='${docdir}'
+psdir='${docdir}'
+libdir='${exec_prefix}/lib'
+localedir='${datarootdir}/locale'
+mandir='${datarootdir}/man'
+
+ac_prev=
+ac_dashdash=
+for ac_option
+do
+  # If the previous option needs an argument, assign it.
+  if test -n "$ac_prev"; then
+    eval $ac_prev=\$ac_option
+    ac_prev=
+    continue
+  fi
+
+  case $ac_option in
+  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+  *=)   ac_optarg= ;;
+  *)    ac_optarg=yes ;;
+  esac
+
+  # Accept the important Cygnus configure options, so we can diagnose typos.
+
+  case $ac_dashdash$ac_option in
+  --)
+    ac_dashdash=yes ;;
+
+  -bindir | --bindir | --bindi | --bind | --bin | --bi)
+    ac_prev=bindir ;;
+  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+    bindir=$ac_optarg ;;
+
+  -build | --build | --buil | --bui | --bu)
+    ac_prev=build_alias ;;
+  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+    build_alias=$ac_optarg ;;
+
+  -cache-file | --cache-file | --cache-fil | --cache-fi \
+  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+    ac_prev=cache_file ;;
+  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+    cache_file=$ac_optarg ;;
+
+  --config-cache | -C)
+    cache_file=config.cache ;;
+
+  -datadir | --datadir | --datadi | --datad)
+    ac_prev=datadir ;;
+  -datadir=* | --datadir=* | --datadi=* | --datad=*)
+    datadir=$ac_optarg ;;
+
+  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+  | --dataroo | --dataro | --datar)
+    ac_prev=datarootdir ;;
+  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+    datarootdir=$ac_optarg ;;
+
+  -disable-* | --disable-*)
+    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      as_fn_error $? "invalid feature name: $ac_useropt"
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"enable_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
+        ac_unrecognized_sep=', ';;
+    esac
+    eval enable_$ac_useropt=no ;;
+
+  -docdir | --docdir | --docdi | --doc | --do)
+    ac_prev=docdir ;;
+  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
+    docdir=$ac_optarg ;;
+
+  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
+    ac_prev=dvidir ;;
+  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
+    dvidir=$ac_optarg ;;
+
+  -enable-* | --enable-*)
+    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      as_fn_error $? "invalid feature name: $ac_useropt"
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"enable_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
+        ac_unrecognized_sep=', ';;
+    esac
+    eval enable_$ac_useropt=\$ac_optarg ;;
+
+  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+  | --exec | --exe | --ex)
+    ac_prev=exec_prefix ;;
+  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+  | --exec=* | --exe=* | --ex=*)
+    exec_prefix=$ac_optarg ;;
+
+  -gas | --gas | --ga | --g)
+    # Obsolete; use --with-gas.
+    with_gas=yes ;;
+
+  -help | --help | --hel | --he | -h)
+    ac_init_help=long ;;
+  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+    ac_init_help=recursive ;;
+  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+    ac_init_help=short ;;
+
+  -host | --host | --hos | --ho)
+    ac_prev=host_alias ;;
+  -host=* | --host=* | --hos=* | --ho=*)
+    host_alias=$ac_optarg ;;
+
+  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
+    ac_prev=htmldir ;;
+  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
+  | --ht=*)
+    htmldir=$ac_optarg ;;
+
+  -includedir | --includedir | --includedi | --included | --include \
+  | --includ | --inclu | --incl | --inc)
+    ac_prev=includedir ;;
+  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+  | --includ=* | --inclu=* | --incl=* | --inc=*)
+    includedir=$ac_optarg ;;
+
+  -infodir | --infodir | --infodi | --infod | --info | --inf)
+    ac_prev=infodir ;;
+  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+    infodir=$ac_optarg ;;
+
+  -libdir | --libdir | --libdi | --libd)
+    ac_prev=libdir ;;
+  -libdir=* | --libdir=* | --libdi=* | --libd=*)
+    libdir=$ac_optarg ;;
+
+  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+  | --libexe | --libex | --libe)
+    ac_prev=libexecdir ;;
+  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+  | --libexe=* | --libex=* | --libe=*)
+    libexecdir=$ac_optarg ;;
+
+  -localedir | --localedir | --localedi | --localed | --locale)
+    ac_prev=localedir ;;
+  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
+    localedir=$ac_optarg ;;
+
+  -localstatedir | --localstatedir | --localstatedi | --localstated \
+  | --localstate | --localstat | --localsta | --localst | --locals)
+    ac_prev=localstatedir ;;
+  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
+    localstatedir=$ac_optarg ;;
+
+  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+    ac_prev=mandir ;;
+  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+    mandir=$ac_optarg ;;
+
+  -nfp | --nfp | --nf)
+    # Obsolete; use --without-fp.
+    with_fp=no ;;
+
+  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+  | --no-cr | --no-c | -n)
+    no_create=yes ;;
+
+  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+    no_recursion=yes ;;
+
+  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+  | --oldin | --oldi | --old | --ol | --o)
+    ac_prev=oldincludedir ;;
+  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+    oldincludedir=$ac_optarg ;;
+
+  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+    ac_prev=prefix ;;
+  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+    prefix=$ac_optarg ;;
+
+  -program-prefix | --program-prefix | --program-prefi | --program-pref \
+  | --program-pre | --program-pr | --program-p)
+    ac_prev=program_prefix ;;
+  -program-prefix=* | --program-prefix=* | --program-prefi=* \
+  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+    program_prefix=$ac_optarg ;;
+
+  -program-suffix | --program-suffix | --program-suffi | --program-suff \
+  | --program-suf | --program-su | --program-s)
+    ac_prev=program_suffix ;;
+  -program-suffix=* | --program-suffix=* | --program-suffi=* \
+  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+    program_suffix=$ac_optarg ;;
+
+  -program-transform-name | --program-transform-name \
+  | --program-transform-nam | --program-transform-na \
+  | --program-transform-n | --program-transform- \
+  | --program-transform | --program-transfor \
+  | --program-transfo | --program-transf \
+  | --program-trans | --program-tran \
+  | --progr-tra | --program-tr | --program-t)
+    ac_prev=program_transform_name ;;
+  -program-transform-name=* | --program-transform-name=* \
+  | --program-transform-nam=* | --program-transform-na=* \
+  | --program-transform-n=* | --program-transform-=* \
+  | --program-transform=* | --program-transfor=* \
+  | --program-transfo=* | --program-transf=* \
+  | --program-trans=* | --program-tran=* \
+  | --progr-tra=* | --program-tr=* | --program-t=*)
+    program_transform_name=$ac_optarg ;;
+
+  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
+    ac_prev=pdfdir ;;
+  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
+    pdfdir=$ac_optarg ;;
+
+  -psdir | --psdir | --psdi | --psd | --ps)
+    ac_prev=psdir ;;
+  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
+    psdir=$ac_optarg ;;
+
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil)
+    silent=yes ;;
+
+  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+    ac_prev=sbindir ;;
+  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+  | --sbi=* | --sb=*)
+    sbindir=$ac_optarg ;;
+
+  -sharedstatedir | --sharedstatedir | --sharedstatedi \
+  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+  | --sharedst | --shareds | --shared | --share | --shar \
+  | --sha | --sh)
+    ac_prev=sharedstatedir ;;
+  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+  | --sha=* | --sh=*)
+    sharedstatedir=$ac_optarg ;;
+
+  -site | --site | --sit)
+    ac_prev=site ;;
+  -site=* | --site=* | --sit=*)
+    site=$ac_optarg ;;
+
+  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+    ac_prev=srcdir ;;
+  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+    srcdir=$ac_optarg ;;
+
+  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+  | --syscon | --sysco | --sysc | --sys | --sy)
+    ac_prev=sysconfdir ;;
+  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+    sysconfdir=$ac_optarg ;;
+
+  -target | --target | --targe | --targ | --tar | --ta | --t)
+    ac_prev=target_alias ;;
+  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+    target_alias=$ac_optarg ;;
+
+  -v | -verbose | --verbose | --verbos | --verbo | --verb)
+    verbose=yes ;;
+
+  -version | --version | --versio | --versi | --vers | -V)
+    ac_init_version=: ;;
+
+  -with-* | --with-*)
+    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      as_fn_error $? "invalid package name: $ac_useropt"
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"with_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
+        ac_unrecognized_sep=', ';;
+    esac
+    eval with_$ac_useropt=\$ac_optarg ;;
+
+  -without-* | --without-*)
+    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      as_fn_error $? "invalid package name: $ac_useropt"
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"with_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
+        ac_unrecognized_sep=', ';;
+    esac
+    eval with_$ac_useropt=no ;;
+
+  --x)
+    # Obsolete; use --with-x.
+    with_x=yes ;;
+
+  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+  | --x-incl | --x-inc | --x-in | --x-i)
+    ac_prev=x_includes ;;
+  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+    x_includes=$ac_optarg ;;
+
+  -x-libraries | --x-libraries | --x-librarie | --x-librari \
+  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+    ac_prev=x_libraries ;;
+  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+    x_libraries=$ac_optarg ;;
+
+  -*) as_fn_error $? "unrecognized option: \`$ac_option'
+Try \`$0 --help' for more information"
+    ;;
+
+  *=*)
+    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+    # Reject names that are not valid shell variable names.
+    case $ac_envvar in #(
+      '' | [0-9]* | *[!_$as_cr_alnum]* )
+      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
+    esac
+    eval $ac_envvar=\$ac_optarg
+    export $ac_envvar ;;
+
+  *)
+    # FIXME: should be removed in autoconf 3.0.
+    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
+    ;;
+
+  esac
+done
+
+if test -n "$ac_prev"; then
+  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+  as_fn_error $? "missing argument to $ac_option"
+fi
+
+if test -n "$ac_unrecognized_opts"; then
+  case $enable_option_checking in
+    no) ;;
+    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
+    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
+  esac
+fi
+
+# Check all directory arguments for consistency.
+for ac_var in  exec_prefix prefix bindir sbindir libexecdir datarootdir \
+               datadir sysconfdir sharedstatedir localstatedir includedir \
+               oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
+               libdir localedir mandir
+do
+  eval ac_val=\$$ac_var
+  # Remove trailing slashes.
+  case $ac_val in
+    */ )
+      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
+      eval $ac_var=\$ac_val;;
+  esac
+  # Be sure to have absolute directory names.
+  case $ac_val in
+    [\\/$]* | ?:[\\/]* )  continue;;
+    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
+  esac
+  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+  if test "x$build_alias" = x; then
+    cross_compiling=maybe
+  elif test "x$build_alias" != "x$host_alias"; then
+    cross_compiling=yes
+  fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ac_ls_di=`ls -di .` &&
+ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
+  as_fn_error $? "working directory cannot be determined"
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+  as_fn_error $? "pwd does not report name of working directory"
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+  ac_srcdir_defaulted=yes
+  # Try the directory containing this script, then the parent directory.
+  ac_confdir=`$as_dirname -- "$as_myself" ||
+$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+        X"$as_myself" : 'X\(//\)[^/]' \| \
+        X"$as_myself" : 'X\(//\)$' \| \
+        X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_myself" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)[^/].*/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\).*/{
+           s//\1/
+           q
+         }
+         s/.*/./; q'`
+  srcdir=$ac_confdir
+  if test ! -r "$srcdir/$ac_unique_file"; then
+    srcdir=..
+  fi
+else
+  ac_srcdir_defaulted=no
+fi
+if test ! -r "$srcdir/$ac_unique_file"; then
+  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
+fi
+ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_abs_confdir=`(
+       cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
+       pwd)`
+# When building in place, set srcdir=.
+if test "$ac_abs_confdir" = "$ac_pwd"; then
+  srcdir=.
+fi
+# Remove unnecessary trailing slashes from srcdir.
+# Double slashes in file names in object file debugging info
+# mess up M-x gdb in Emacs.
+case $srcdir in
+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
+esac
+for ac_var in $ac_precious_vars; do
+  eval ac_env_${ac_var}_set=\${${ac_var}+set}
+  eval ac_env_${ac_var}_value=\$${ac_var}
+  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
+  eval ac_cv_env_${ac_var}_value=\$${ac_var}
+done
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+  # Omit some internal or obsolete options to make the list less imposing.
+  # This message is too long to be a string in the A/UX 3.1 sh.
+  cat <<_ACEOF
+\`configure' configures this package to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE.  See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+  -h, --help              display this help and exit
+      --help=short        display options specific to this package
+      --help=recursive    display the short help of all the included packages
+  -V, --version           display version information and exit
+  -q, --quiet, --silent   do not print \`checking ...' messages
+      --cache-file=FILE   cache test results in FILE [disabled]
+  -C, --config-cache      alias for \`--cache-file=config.cache'
+  -n, --no-create         do not create output files
+      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
+
+Installation directories:
+  --prefix=PREFIX         install architecture-independent files in PREFIX
+                          [$ac_default_prefix]
+  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
+                          [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+  --bindir=DIR            user executables [EPREFIX/bin]
+  --sbindir=DIR           system admin executables [EPREFIX/sbin]
+  --libexecdir=DIR        program executables [EPREFIX/libexec]
+  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
+  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
+  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
+  --libdir=DIR            object code libraries [EPREFIX/lib]
+  --includedir=DIR        C header files [PREFIX/include]
+  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
+  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
+  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
+  --infodir=DIR           info documentation [DATAROOTDIR/info]
+  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
+  --mandir=DIR            man documentation [DATAROOTDIR/man]
+  --docdir=DIR            documentation root [DATAROOTDIR/doc/PACKAGE]
+  --htmldir=DIR           html documentation [DOCDIR]
+  --dvidir=DIR            dvi documentation [DOCDIR]
+  --pdfdir=DIR            pdf documentation [DOCDIR]
+  --psdir=DIR             ps documentation [DOCDIR]
+_ACEOF
+
+  cat <<\_ACEOF
+
+System types:
+  --build=BUILD     configure for building on BUILD [guessed]
+  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
+  --target=TARGET   configure for building compilers for TARGET [HOST]
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+
+  cat <<\_ACEOF
+
+Optional Features:
+  --disable-option-checking  ignore unrecognized --enable/--with options
+  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
+  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
+  --enable-optimize=OPT Enable code optimizations (ie. -O2)
+  --enable-debug=DBG    Enable debugging (using compiler flags DBG)
+  --enable-debug-symbols=DBG    Enable debugging symbols
+                                       (using compiler flags DBG)
+  --enable-win32-target=\$t
+                          Specify win32 flavor. (WIN95 or WINNT)
+  --enable-symbian-target=\$t
+                          Specify symbian flavor. (WINSCW or GCCE)
+  --enable-debug-rtl      Use the MSVC debug runtime library
+  --enable-n32            Enable n32 ABI support (IRIX only)
+  --enable-x32            Enable x32 ABI support (x86_64 only)
+  --enable-64bit          Enable 64-bit support (on certain platforms)
+  --enable-mdupdate       Enable use of certain compilers' mdupdate feature
+  --enable-cplus          Enable some c++ api routines
+  --enable-macos-target=VER
+                          Set the minimum MacOS version needed at runtime
+                          10.2 for ppc, 10.4 for x86
+  --disable-os2-high-mem  Disable high-memory support on OS/2
+
+  --enable-strip          Enable stripping of shared libs and programs
+  --enable-user-pthreads  Build using userland pthreads
+  --enable-nspr-threads   Build using classic nspr threads
+  --enable-ipv6           Compile ipv6 support
+  --enable-wrap-malloc    Wrap malloc calls (gnu linker only)
+
+Optional Packages:
+  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
+  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
+  --with-android-ndk=DIR
+                          location where the Android NDK can be found
+  --with-android-toolchain=DIR
+                          location of the Android toolchain
+  --with-android-version=VER
+                          Android platform version, default 5 for arm, 9 for x86/mips
+  --with-android-platform=DIR
+                          location of platform dir
+  --with-gonk=DIR         location of gonk dir
+  --with-dist-prefix=DIST_PREFIX
+                          place build files in DIST_PREFIX dist
+  --with-dist-bindir=DIR  build execuatables in DIR DIST_PREFIX/bin
+  --with-dist-includedir=DIR
+                          build include files in DIR DIST_PREFIX/include/nspr
+  --with-dist-libdir=DIR  build library files in DIR DIST_PREFIX/lib
+  --with-mozilla          Compile NSPR with Mozilla support
+  --with-arm-kuser        Use kuser helpers (Linux/ARM only)
+                          (Requires kernel 2.6.13 or later)
+  --with-macos-sdk=dir    Location of platform SDK to use (Mac OS X only)
+  --with-thumb[=yes|no|toolchain-default]
+                          Use Thumb instruction set (-mthumb)
+  --with-thumb-interwork[=yes|no|toolchain-default]
+                           Use Thumb/ARM instuctions interwork (-mthumb-interwork)
+  --with-arch=[type|toolchain-default]
+                           Use specific CPU features (-march=type)
+  --with-fpu=[type|toolchain-default]
+                           Use specific FPU type (-mfpu=type)
+  --with-float-abi=[type|toolchain-default]
+                           Use specific arm float ABI (-mfloat-abi=type)
+  --with-soft-float[=yes|no|toolchain-default]
+                           Use soft float library (-msoft-float)
+  --with-symbian-sdk=SYMBIAN_SDK_DIR
+                          The path to the Symbian SDK
+  --with-ccache=path/to/ccache
+                          Enable compiling with ccache
+  --with-pthreads         Use system pthreads library as thread subsystem
+  --with-bthreads         Use system bthreads library as thread subsystem
+                          (BeOS only)
+  --with-wrap-malloc=SHAREDLIB  Location of malloc wrapper library
+
+Some influential environment variables:
+  CC          C compiler command
+  CFLAGS      C compiler flags
+  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
+              nonstandard directory <lib dir>
+  LIBS        libraries to pass to the linker, e.g. -l<library>
+  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
+              you have headers in a nonstandard directory <include dir>
+  CXX         C++ compiler command
+  CXXFLAGS    C++ compiler flags
+  CPP         C preprocessor
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+Report bugs to the package provider.
+_ACEOF
+ac_status=$?
+fi
+
+if test "$ac_init_help" = "recursive"; then
+  # If there are subdirs, report their specific --help.
+  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+    test -d "$ac_dir" ||
+      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
+      continue
+    ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+  # A ".." for each directory in $ac_dir_suffix.
+  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+  case $ac_top_builddir_sub in
+  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+  esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+  .)  # We are building in place.
+    ac_srcdir=.
+    ac_top_srcdir=$ac_top_builddir_sub
+    ac_abs_top_srcdir=$ac_pwd ;;
+  [\\/]* | ?:[\\/]* )  # Absolute name.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir
+    ac_abs_top_srcdir=$srcdir ;;
+  *) # Relative name.
+    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_build_prefix$srcdir
+    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+    cd "$ac_dir" || { ac_status=$?; continue; }
+    # Check for guested configure.
+    if test -f "$ac_srcdir/configure.gnu"; then
+      echo &&
+      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
+    elif test -f "$ac_srcdir/configure"; then
+      echo &&
+      $SHELL "$ac_srcdir/configure" --help=recursive
+    else
+      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+    fi || ac_status=$?
+    cd "$ac_pwd" || { ac_status=$?; break; }
+  done
+fi
+
+test -n "$ac_init_help" && exit $ac_status
+if $ac_init_version; then
+  cat <<\_ACEOF
+configure
+generated by GNU Autoconf 2.69
+
+Copyright (C) 2012 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+  exit
+fi
+
+## ------------------------ ##
+## Autoconf initialization. ##
+## ------------------------ ##
+
+# ac_fn_c_try_compile LINENO
+# --------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_compile ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  rm -f conftest.$ac_objext
+  if { { ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compile") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    grep -v '^ *+' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    mv -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_retval=1
+fi
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_compile
+
+# ac_fn_cxx_try_compile LINENO
+# ----------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_cxx_try_compile ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  rm -f conftest.$ac_objext
+  if { { ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compile") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    grep -v '^ *+' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    mv -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && {
+        test -z "$ac_cxx_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_retval=1
+fi
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
+
+} # ac_fn_cxx_try_compile
+
+# ac_fn_c_try_cpp LINENO
+# ----------------------
+# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_cpp ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  if { { ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    grep -v '^ *+' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    mv -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } > conftest.i && {
+        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       }; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+    ac_retval=1
+fi
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_cpp
+
+# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists, giving a warning if it cannot be compiled using
+# the include files in INCLUDES and setting the cache variable VAR
+# accordingly.
+ac_fn_c_check_header_mongrel ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  if eval \${$3+:} false; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+  $as_echo_n "(cached) " >&6
+fi
+eval ac_res=\$$3
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+else
+  # Is the header compilable?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
+$as_echo_n "checking $2 usability... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_header_compiler=yes
+else
+  ac_header_compiler=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
+$as_echo_n "checking $2 presence... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <$2>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+  ac_header_preproc=yes
+else
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
+  yes:no: )
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+    ;;
+  no:yes:* )
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+    ;;
+esac
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  eval "$3=\$ac_header_compiler"
+fi
+eval ac_res=\$$3
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+fi
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_header_mongrel
+
+# ac_fn_c_try_run LINENO
+# ----------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
+# that executables *can* be run.
+ac_fn_c_try_run ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  if { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
+  { { case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: program exited with status $ac_status" >&5
+       $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_retval=$ac_status
+fi
+  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_run
+
+# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists and can be compiled using the include files in
+# INCLUDES, setting the cache variable VAR accordingly.
+ac_fn_c_check_header_compile ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  eval "$3=yes"
+else
+  eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_header_compile
+
+# ac_fn_c_try_link LINENO
+# -----------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_link ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  rm -f conftest.$ac_objext conftest$ac_exeext
+  if { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    grep -v '^ *+' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    mv -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        test -x conftest$ac_exeext
+       }; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_retval=1
+fi
+  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
+  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
+  # interfere with the next link command; also delete a directory that is
+  # left behind by Apple's compiler.  We do this before executing the actions.
+  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_link
+
+# ac_fn_c_check_func LINENO FUNC VAR
+# ----------------------------------
+# Tests whether FUNC exists, setting the cache variable VAR accordingly
+ac_fn_c_check_func ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $2 innocuous_$2
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $2 (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $2
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $2 ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined __stub_$2 || defined __stub___$2
+choke me
+#endif
+
+int
+main ()
+{
+return $2 ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  eval "$3=yes"
+else
+  eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_func
+cat >config.log <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by $as_me, which was
+generated by GNU Autoconf 2.69.  Invocation command line was
+
+  $ $0 $@
+
+_ACEOF
+exec 5>>config.log
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
+
+/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
+/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
+/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    $as_echo "PATH: $as_dir"
+  done
+IFS=$as_save_IFS
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+  for ac_arg
+  do
+    case $ac_arg in
+    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+    | -silent | --silent | --silen | --sile | --sil)
+      continue ;;
+    *\'*)
+      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    esac
+    case $ac_pass in
+    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
+    2)
+      as_fn_append ac_configure_args1 " '$ac_arg'"
+      if test $ac_must_keep_next = true; then
+       ac_must_keep_next=false # Got value, back to normal.
+      else
+       case $ac_arg in
+         *=* | --config-cache | -C | -disable-* | --disable-* \
+         | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+         | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+         | -with-* | --with-* | -without-* | --without-* | --x)
+           case "$ac_configure_args0 " in
+             "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+           esac
+           ;;
+         -* ) ac_must_keep_next=true ;;
+       esac
+      fi
+      as_fn_append ac_configure_args " '$ac_arg'"
+      ;;
+    esac
+  done
+done
+{ ac_configure_args0=; unset ac_configure_args0;}
+{ ac_configure_args1=; unset ac_configure_args1;}
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log.  We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Use '\'' to represent an apostrophe within the trap.
+# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
+trap 'exit_status=$?
+  # Save into config.log some information that might help in debugging.
+  {
+    echo
+
+    $as_echo "## ---------------- ##
+## Cache variables. ##
+## ---------------- ##"
+    echo
+    # The following way of writing the cache mishandles newlines in values,
+(
+  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
+    eval ac_val=\$$ac_var
+    case $ac_val in #(
+    *${as_nl}*)
+      case $ac_var in #(
+      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+      esac
+      case $ac_var in #(
+      _ | IFS | as_nl) ;; #(
+      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+      *) { eval $ac_var=; unset $ac_var;} ;;
+      esac ;;
+    esac
+  done
+  (set) 2>&1 |
+    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
+    *${as_nl}ac_space=\ *)
+      sed -n \
+       "s/'\''/'\''\\\\'\'''\''/g;
+         s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
+      ;; #(
+    *)
+      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+      ;;
+    esac |
+    sort
+)
+    echo
+
+    $as_echo "## ----------------- ##
+## Output variables. ##
+## ----------------- ##"
+    echo
+    for ac_var in $ac_subst_vars
+    do
+      eval ac_val=\$$ac_var
+      case $ac_val in
+      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+      esac
+      $as_echo "$ac_var='\''$ac_val'\''"
+    done | sort
+    echo
+
+    if test -n "$ac_subst_files"; then
+      $as_echo "## ------------------- ##
+## File substitutions. ##
+## ------------------- ##"
+      echo
+      for ac_var in $ac_subst_files
+      do
+       eval ac_val=\$$ac_var
+       case $ac_val in
+       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+       esac
+       $as_echo "$ac_var='\''$ac_val'\''"
+      done | sort
+      echo
+    fi
+
+    if test -s confdefs.h; then
+      $as_echo "## ----------- ##
+## confdefs.h. ##
+## ----------- ##"
+      echo
+      cat confdefs.h
+      echo
+    fi
+    test "$ac_signal" != 0 &&
+      $as_echo "$as_me: caught signal $ac_signal"
+    $as_echo "$as_me: exit $exit_status"
+  } >&5
+  rm -f core *.core core.conftest.* &&
+    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
+    exit $exit_status
+' 0
+for ac_signal in 1 2 13 15; do
+  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -f -r conftest* confdefs.h
+
+$as_echo "/* confdefs.h */" > confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_URL "$PACKAGE_URL"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer an explicitly selected file to automatically selected ones.
+ac_site_file1=NONE
+ac_site_file2=NONE
+if test -n "$CONFIG_SITE"; then
+  # We do not want a PATH search for config.site.
+  case $CONFIG_SITE in #((
+    -*)  ac_site_file1=./$CONFIG_SITE;;
+    */*) ac_site_file1=$CONFIG_SITE;;
+    *)   ac_site_file1=./$CONFIG_SITE;;
+  esac
+elif test "x$prefix" != xNONE; then
+  ac_site_file1=$prefix/share/config.site
+  ac_site_file2=$prefix/etc/config.site
+else
+  ac_site_file1=$ac_default_prefix/share/config.site
+  ac_site_file2=$ac_default_prefix/etc/config.site
+fi
+for ac_site_file in "$ac_site_file1" "$ac_site_file2"
+do
+  test "x$ac_site_file" = xNONE && continue
+  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
+$as_echo "$as_me: loading site script $ac_site_file" >&6;}
+    sed 's/^/| /' "$ac_site_file" >&5
+    . "$ac_site_file" \
+      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "failed to load site script $ac_site_file
+See \`config.log' for more details" "$LINENO" 5; }
+  fi
+done
+
+if test -r "$cache_file"; then
+  # Some versions of bash will fail to source /dev/null (special files
+  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
+  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
+$as_echo "$as_me: loading cache $cache_file" >&6;}
+    case $cache_file in
+      [\\/]* | ?:[\\/]* ) . "$cache_file";;
+      *)                      . "./$cache_file";;
+    esac
+  fi
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
+$as_echo "$as_me: creating cache $cache_file" >&6;}
+  >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in $ac_precious_vars; do
+  eval ac_old_set=\$ac_cv_env_${ac_var}_set
+  eval ac_new_set=\$ac_env_${ac_var}_set
+  eval ac_old_val=\$ac_cv_env_${ac_var}_value
+  eval ac_new_val=\$ac_env_${ac_var}_value
+  case $ac_old_set,$ac_new_set in
+    set,)
+      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,set)
+      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,);;
+    *)
+      if test "x$ac_old_val" != "x$ac_new_val"; then
+       # differences in whitespace do not lead to failure.
+       ac_old_val_w=`echo x $ac_old_val`
+       ac_new_val_w=`echo x $ac_new_val`
+       if test "$ac_old_val_w" != "$ac_new_val_w"; then
+         { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
+$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+         ac_cache_corrupted=:
+       else
+         { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
+$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
+         eval $ac_var=\$ac_old_val
+       fi
+       { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
+$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
+       { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
+$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
+      fi;;
+  esac
+  # Pass precious variables to config.status.
+  if test "$ac_new_set" = set; then
+    case $ac_new_val in
+    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+    *) ac_arg=$ac_var=$ac_new_val ;;
+    esac
+    case " $ac_configure_args " in
+      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
+      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
+    esac
+  fi
+done
+if $ac_cache_corrupted; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
+$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
+fi
+## -------------------- ##
+## Main body of script. ##
+## -------------------- ##
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
+ac_aux_dir=
+for ac_dir in ${srcdir}/build/autoconf "$srcdir"/${srcdir}/build/autoconf; do
+  if test -f "$ac_dir/install-sh"; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install-sh -c"
+    break
+  elif test -f "$ac_dir/install.sh"; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install.sh -c"
+    break
+  elif test -f "$ac_dir/shtool"; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/shtool install -c"
+    break
+  fi
+done
+if test -z "$ac_aux_dir"; then
+  as_fn_error $? "cannot find install-sh, install.sh, or shtool in ${srcdir}/build/autoconf \"$srcdir\"/${srcdir}/build/autoconf" "$LINENO" 5
+fi
+
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
+ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
+ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
+
+
+# Make sure we can run config.sub.
+$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
+  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
+$as_echo_n "checking build system type... " >&6; }
+if ${ac_cv_build+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_build_alias=$build_alias
+test "x$ac_build_alias" = x &&
+  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
+test "x$ac_build_alias" = x &&
+  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
+ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
+  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
+$as_echo "$ac_cv_build" >&6; }
+case $ac_cv_build in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
+esac
+build=$ac_cv_build
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_build
+shift
+build_cpu=$1
+build_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+build_os=$*
+IFS=$ac_save_IFS
+case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
+$as_echo_n "checking host system type... " >&6; }
+if ${ac_cv_host+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "x$host_alias" = x; then
+  ac_cv_host=$ac_cv_build
+else
+  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
+    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
+$as_echo "$ac_cv_host" >&6; }
+case $ac_cv_host in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
+esac
+host=$ac_cv_host
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_host
+shift
+host_cpu=$1
+host_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+host_os=$*
+IFS=$ac_save_IFS
+case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
+$as_echo_n "checking target system type... " >&6; }
+if ${ac_cv_target+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "x$target_alias" = x; then
+  ac_cv_target=$ac_cv_host
+else
+  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
+    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
+$as_echo "$ac_cv_target" >&6; }
+case $ac_cv_target in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
+esac
+target=$ac_cv_target
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_target
+shift
+target_cpu=$1
+target_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+target_os=$*
+IFS=$ac_save_IFS
+case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
+
+
+# The aliases save the names the user supplied, while $host etc.
+# will get canonicalized.
+test -n "$target_alias" &&
+  test "$program_prefix$program_suffix$program_transform_name" = \
+    NONENONEs,x,x, &&
+  program_prefix=${target_alias}-
+
+MOD_MAJOR_VERSION=4
+MOD_MINOR_VERSION=10
+MOD_PATCH_VERSION=6
+NSPR_MODNAME=nspr20
+_HAVE_PTHREADS=
+USE_PTHREADS=
+USE_USER_PTHREADS=
+USE_NSPR_THREADS=
+USE_N32=
+USE_X32=
+USE_64=
+USE_CPLUS=
+USE_IPV6=
+USE_MDUPDATE=
+_MACOSX_DEPLOYMENT_TARGET=
+_OPTIMIZE_FLAGS=-O
+_DEBUG_FLAGS=-g
+MOZ_DEBUG=1
+MOZ_OPTIMIZE=
+OBJDIR='$(OBJDIR_NAME)'
+OBJDIR_NAME=.
+OBJDIR_SUFFIX=OBJ
+NSINSTALL='$(MOD_DEPTH)/config/$(OBJDIR_NAME)/nsinstall'
+NOSUCHFILE=/no-such-file
+LIBNSPR='-L$(dist_libdir) -lnspr$(MOD_MAJOR_VERSION)'
+LIBPLC='-L$(dist_libdir) -lplc$(MOD_MAJOR_VERSION)'
+CYGWIN_WRAPPER=
+MACOS_SDK_DIR=
+NEXT_ROOT=
+MT=
+MOZ_OS2_HIGH_MEMORY=1
+PROFILE_GEN_CFLAGS=
+PROFILE_GEN_LDFLAGS=
+PROFILE_USE_CFLAGS=
+PROFILE_USE_LDFLAGS=
+
+RESOLVE_LINK_SYMBOLS=
+
+CFLAGS="${CFLAGS=}"
+CXXFLAGS="${CXXFLAGS=}"
+LDFLAGS="${LDFLAGS=}"
+DLLFLAGS="${DLLFLAGS=}"
+HOST_CFLAGS="${HOST_CFLAGS=}"
+HOST_LDFLAGS="${HOST_LDFLAGS=}"
+
+case "$target" in
+*-cygwin*|*-mingw*|*-msys*)
+    # Check to see if we are really running in a msvc environemnt
+    _WIN32_MSVC=
+    for ac_prog in 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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$CC" && break
+done
+
+    if test "$CC" = "cl"; then
+        echo 'main() { return 0; }' > dummy.c
+        ${CC} -o dummy dummy.c >/dev/null 2>&1
+        if test $? = 0; then
+            _WIN32_MSVC=1
+            CXX=$CC
+        else
+            { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $(CC) test failed.  Using normal feature tests" >&5
+$as_echo "$as_me: WARNING: $(CC) test failed.  Using normal feature tests" >&2;}
+        fi
+        rm -f dummy dummy.o dummy.obj dummy.exe dummy.c
+    fi
+    ;;
+*-mks*)
+    _WIN32_MSVC=1
+    ;;
+esac
+
+if test -n "$_WIN32_MSVC"; then
+    SKIP_PATH_CHECKS=1
+    SKIP_COMPILER_CHECKS=1
+    SKIP_LIBRARY_CHECKS=1
+fi
+
+
+
+# Check whether --with-android-ndk was given.
+if test "${with_android_ndk+set}" = set; then :
+  withval=$with_android_ndk; android_ndk=$withval
+fi
+
+
+
+# Check whether --with-android-toolchain was given.
+if test "${with_android_toolchain+set}" = set; then :
+  withval=$with_android_toolchain; android_toolchain=$withval
+fi
+
+
+case "$target_cpu" in
+arm)
+    android_version=5
+    ;;
+i?86|mipsel)
+    android_version=9
+    ;;
+esac
+
+
+# Check whether --with-android-version was given.
+if test "${with_android_version+set}" = set; then :
+  withval=$with_android_version; android_version=$withval
+fi
+
+
+
+# Check whether --with-android-platform was given.
+if test "${with_android_platform+set}" = set; then :
+  withval=$with_android_platform; android_platform=$withval
+fi
+
+
+case "$target" in
+arm-linux*-android*|*-linuxandroid*)
+    android_tool_prefix="arm-linux-androideabi"
+    ;;
+i?86-*android*)
+    android_tool_prefix="i686-linux-android"
+    ;;
+mipsel-*android*)
+    android_tool_prefix="mipsel-linux-android"
+    ;;
+*)
+    android_tool_prefix="$target_os"
+    ;;
+esac
+
+
+
+# Check whether --with-gonk was given.
+if test "${with_gonk+set}" = set; then :
+  withval=$with_gonk; gonkdir=$withval
+fi
+
+
+if test -n "$gonkdir" ; then
+
+        if test -z "$HOST_CPPFLAGS" ; then
+        HOST_CPPFLAGS=" "
+    fi
+    if test -z "$HOST_CFLAGS" ; then
+        HOST_CFLAGS=" "
+    fi
+    if test -z "$HOST_CXXFLAGS" ; then
+        HOST_CXXFLAGS=" "
+    fi
+    if test -z "$HOST_LDFLAGS" ; then
+        HOST_LDFLAGS=" "
+    fi
+
+    $as_echo "#define ANDROID 1" >>confdefs.h
+
+else
+case "$target" in
+*-android*|*-linuxandroid*)
+    if test -z "$android_ndk" ; then
+       as_fn_error $? "You must specify --with-android-ndk=/path/to/ndk when targeting Android." "$LINENO" 5
+    fi
+
+    if test -z "$android_toolchain" ; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for android toolchain directory" >&5
+$as_echo_n "checking for android toolchain directory... " >&6; }
+
+        kernel_name=`uname -s | tr "[:upper:]" "[:lower:]"`
+
+        case "$target_cpu" in
+        arm)
+            target_name=arm-linux-androideabi-4.4.3
+            ;;
+        i?86)
+            target_name=x86-4.4.3
+            ;;
+        mipsel)
+            target_name=mipsel-linux-android-4.4.3
+            ;;
+        esac
+        android_toolchain="$android_ndk"/toolchains/$target_name/prebuilt/$kernel_name-x86
+
+        if test -d "$android_toolchain" ; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $android_toolchain" >&5
+$as_echo "$android_toolchain" >&6; }
+        else
+            as_fn_error $? "not found. You have to specify --with-android-toolchain=/path/to/ndk/toolchain." "$LINENO" 5
+        fi
+    fi
+
+    if test -z "$android_platform" ; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for android platform directory" >&5
+$as_echo_n "checking for android platform directory... " >&6; }
+
+        case "$target_cpu" in
+        arm)
+            target_name=arm
+            ;;
+        i?86)
+            target_name=x86
+            ;;
+        mipsel)
+            target_name=mips
+            ;;
+        esac
+
+        android_platform="$android_ndk"/platforms/android-"$android_version"/arch-"$target_name"
+
+        if test -d "$android_platform" ; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $android_platform" >&5
+$as_echo "$android_platform" >&6; }
+        else
+            as_fn_error $? "not found. You have to specify --with-android-platform=/path/to/ndk/platform." "$LINENO" 5
+        fi
+    fi
+
+            case "$target_cpu" in
+    i?86)
+        if ! test -e "$android_toolchain"/bin/"$android_tool_prefix"-gcc; then
+                        android_tool_prefix="i686-android-linux"
+        fi
+        ;;
+    esac
+
+        AS="$android_toolchain"/bin/"$android_tool_prefix"-as
+    CC="$android_toolchain"/bin/"$android_tool_prefix"-gcc
+    CXX="$android_toolchain"/bin/"$android_tool_prefix"-g++
+    CPP="$android_toolchain"/bin/"$android_tool_prefix"-cpp
+    LD="$android_toolchain"/bin/"$android_tool_prefix"-ld
+    AR="$android_toolchain"/bin/"$android_tool_prefix"-ar
+    RANLIB="$android_toolchain"/bin/"$android_tool_prefix"-ranlib
+    STRIP="$android_toolchain"/bin/"$android_tool_prefix"-strip
+
+    CPPFLAGS="-I$android_platform/usr/include $CPPFLAGS"
+    CFLAGS="-mandroid -I$android_platform/usr/include -fno-short-enums -fno-exceptions $CFLAGS"
+    CXXFLAGS="-mandroid -I$android_platform/usr/include -fpic -fno-short-enums -fno-exceptions $CXXFLAGS"
+    LDFLAGS="-mandroid -L$android_platform/usr/lib -Wl,-rpath-link=$android_platform/usr/lib --sysroot=$android_platform $LDFLAGS"
+
+        if test -z "$HOST_CPPFLAGS" ; then
+        HOST_CPPFLAGS=" "
+    fi
+    if test -z "$HOST_CFLAGS" ; then
+        HOST_CFLAGS=" "
+    fi
+    if test -z "$HOST_CXXFLAGS" ; then
+        HOST_CXXFLAGS=" "
+    fi
+    if test -z "$HOST_LDFLAGS" ; then
+        HOST_LDFLAGS=" "
+    fi
+
+    $as_echo "#define ANDROID 1" >>confdefs.h
+
+    ;;
+esac
+fi
+
+dist_prefix='${MOD_DEPTH}/dist'
+dist_bindir='${dist_prefix}/bin'
+dist_includedir='${dist_prefix}/include/nspr'
+dist_libdir='${dist_prefix}/lib'
+if test "${includedir}" = '${prefix}/include'; then
+    includedir='${prefix}/include/nspr'
+fi
+
+
+# Check whether --with-dist-prefix was given.
+if test "${with_dist_prefix+set}" = set; then :
+  withval=$with_dist_prefix; dist_prefix=$withval
+fi
+
+
+
+# Check whether --with-dist-bindir was given.
+if test "${with_dist_bindir+set}" = set; then :
+  withval=$with_dist_bindir; dist_bindir=$withval
+fi
+
+
+
+# Check whether --with-dist-includedir was given.
+if test "${with_dist_includedir+set}" = set; then :
+  withval=$with_dist_includedir; dist_includedir=$withval
+fi
+
+
+
+# Check whether --with-dist-libdir was given.
+if test "${with_dist_libdir+set}" = set; then :
+  withval=$with_dist_libdir; dist_libdir=$withval
+fi
+
+
+
+
+
+
+
+
+# Check whether --with-mozilla was given.
+if test "${with_mozilla+set}" = set; then :
+  withval=$with_mozilla;    if test "$withval" = "yes"; then
+            $as_echo "#define MOZILLA_CLIENT 1" >>confdefs.h
+
+            MOZILLA_CLIENT=1
+           else
+               MOZILLA_CLIENT=
+           fi
+else
+       if test -n "$MOZILLA_CLIENT"; then
+               $as_echo "#define MOZILLA_CLIENT 1" >>confdefs.h
+
+           fi
+fi
+
+
+# Check whether --enable-optimize was given.
+if test "${enable_optimize+set}" = set; then :
+  enableval=$enable_optimize;  if test "$enableval" != "no"; then
+          MOZ_OPTIMIZE=1
+          if test -n "$enableval" -a "$enableval" != "yes"; then
+            _OPTIMIZE_FLAGS=`echo $enableval | sed -e 's|\\\ | |g'`
+            _SAVE_OPTIMIZE_FLAGS=$_OPTIMIZE_FLAGS
+          fi
+      else
+          MOZ_OPTIMIZE=
+      fi
+fi
+
+
+# Check whether --enable-debug was given.
+if test "${enable_debug+set}" = set; then :
+  enableval=$enable_debug;  if test "$enableval" != "no"; then
+          MOZ_DEBUG=1
+          MOZ_DEBUG_SYMBOLS=1
+          if test -n "$enableval" -a "$enableval" != "yes"; then
+              _DEBUG_FLAGS=`echo $enableval | sed -e 's|\\\ | |g'`
+              _SAVE_DEBUG_FLAGS=$_DEBUG_FLAGS
+          fi
+      else
+          MOZ_DEBUG=
+      fi
+else
+  MOZ_DEBUG_SYMBOLS=1
+fi
+
+
+# Check whether --enable-debug-symbols was given.
+if test "${enable_debug_symbols+set}" = set; then :
+  enableval=$enable_debug_symbols;  if test "$enableval" != "no"; then
+          MOZ_DEBUG_SYMBOLS=1
+          if test -n "$enableval" -a "$enableval" != "yes"; then
+              if test -z "$_SAVE_DEBUG_FLAGS"; then
+                  _DEBUG_FLAGS=`echo $enableval | sed -e 's|\\\ | |g'`
+                  _SAVE_DEBUG_FLAGS=$_DEBUG_FLAGS
+              else
+                  as_fn_error $? "--enable-debug-symbols flags cannot be used with --enable-debug flags" "$LINENO" 5
+              fi
+          fi
+      else
+          MOZ_DEBUG_SYMBOLS=
+      fi
+fi
+
+
+# Check whether --enable-win32-target was given.
+if test "${enable_win32_target+set}" = set; then :
+  enableval=$enable_win32_target; OS_TARGET=`echo $enableval | tr a-z A-Z`
+fi
+
+
+# Check whether --enable-symbian-target was given.
+if test "${enable_symbian_target+set}" = set; then :
+  enableval=$enable_symbian_target; OS_TARGET=`echo $enableval | tr a-z A-Z`
+fi
+
+
+# Check whether --enable-debug-rtl was given.
+if test "${enable_debug_rtl+set}" = set; then :
+  enableval=$enable_debug_rtl;  if test "$enableval" = "yes"; then
+           USE_DEBUG_RTL=1
+      else
+           USE_DEBUG_RTL=0
+      fi
+fi
+
+
+# Check whether --enable-n32 was given.
+if test "${enable_n32+set}" = set; then :
+  enableval=$enable_n32;  if test "$enableval" = "yes"; then
+       USE_N32=1
+      else if test "$enableval" = "no"; then
+       USE_N32=
+      fi
+    fi
+fi
+
+
+# Check whether --enable-x32 was given.
+if test "${enable_x32+set}" = set; then :
+  enableval=$enable_x32;  if test "$enableval" = "yes"; then
+        USE_X32=1
+      else if test "$enableval" = "no"; then
+        USE_X32=
+      fi
+    fi
+fi
+
+
+# Check whether --enable-64bit was given.
+if test "${enable_64bit+set}" = set; then :
+  enableval=$enable_64bit;  if test "$enableval" = "yes"; then
+           USE_64=1
+      fi
+fi
+
+
+# Check whether --enable-mdupdate was given.
+if test "${enable_mdupdate+set}" = set; then :
+  enableval=$enable_mdupdate;  if test "$enableval" = "yes"; then
+           USE_MDUPDATE=1
+      fi
+fi
+
+
+# Check whether --enable-cplus was given.
+if test "${enable_cplus+set}" = set; then :
+  enableval=$enable_cplus;  if test "$enableval" = "yes"; then
+           USE_CPLUS=1
+      fi
+fi
+
+
+
+# Check whether --with-arm-kuser was given.
+if test "${with_arm_kuser+set}" = set; then :
+  withval=$with_arm_kuser;  if test "$withval" = "yes"; then
+           $as_echo "#define _PR_ARM_KUSER 1" >>confdefs.h
+
+      fi
+fi
+
+
+
+# Check whether --with-macos-sdk was given.
+if test "${with_macos_sdk+set}" = set; then :
+  withval=$with_macos_sdk; MACOS_SDK_DIR=$withval
+fi
+
+
+# Check whether --enable-macos-target was given.
+if test "${enable_macos_target+set}" = set; then :
+  enableval=$enable_macos_target; _MACOSX_DEPLOYMENT_TARGET=$enableval
+fi
+
+
+case "$target" in
+
+*-aix*)
+    case "${target_os}" in
+    aix3.2*)
+        USE_NSPR_THREADS=1
+        ;;
+    *)
+        USE_PTHREADS=1
+        ;;
+    esac
+    ;;
+
+esac
+
+if test -z "$CC"; then
+    case "$target" in
+
+    *-aix*)
+        if test -z "$USE_NSPR_THREADS"; then
+            CC=xlc_r
+        else
+            CC=xlc
+        fi
+    ;;
+
+    *-hpux*)
+        CC=cc
+    ;;
+
+    *-irix*)
+        CC=cc
+    ;;
+
+    *-osf*)
+        CC=cc
+    ;;
+
+    *-solaris*)
+        CC=cc
+    ;;
+
+    esac
+fi
+
+if test -z "$CXX"; then
+    case "$target" in
+
+    *-aix*)
+        if test -z "$USE_NSPR_THREADS"; then
+            CXX=xlC_r
+        else
+            CXX=xlC
+        fi
+    ;;
+
+    *-hpux*)
+        case "${target_os}" in
+        hpux10.30)
+            CXX=aCC
+            ;;
+        hpux11.*)
+            CXX=aCC
+            ;;
+        *)
+            CXX=CC
+            ;;
+        esac
+    ;;
+
+    *-irix*)
+        CXX=CC
+    ;;
+
+    *-osf*)
+        CXX=cxx
+    ;;
+
+    *-solaris*)
+        CXX=CC
+    ;;
+
+    esac
+fi
+
+if test -z "$SKIP_PATH_CHECKS"; then
+    # Extract the first word of "$WHOAMI whoami", so it can be a program name with args.
+set dummy $WHOAMI whoami; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_WHOAMI+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $WHOAMI in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_WHOAMI="$WHOAMI" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_WHOAMI="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  test -z "$ac_cv_path_WHOAMI" && ac_cv_path_WHOAMI="echo not_whoami"
+  ;;
+esac
+fi
+WHOAMI=$ac_cv_path_WHOAMI
+if test -n "$WHOAMI"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHOAMI" >&5
+$as_echo "$WHOAMI" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+
+if test -n "$MOZ_DEBUG"; then
+    $as_echo "#define DEBUG 1" >>confdefs.h
+
+    DEFINES="$DEFINES -UNDEBUG"
+
+    case "${target_os}" in
+    beos*)
+        DEFINES="$DEFINES -DDEBUG_${USER}"
+        ;;
+    mks*|cygwin*|mingw*|msys*|os2*)
+        DEFINES="$DEFINES -DDEBUG_`echo ${USERNAME} | sed -e 's| |_|g'`"
+        ;;
+    *)
+        DEFINES="$DEFINES -DDEBUG_`$WHOAMI`"
+        ;;
+    esac
+else
+    $as_echo "#define NDEBUG 1" >>confdefs.h
+
+    DEFINES="$DEFINES -UDEBUG"
+fi
+
+if test -z "$SKIP_COMPILER_CHECKS"; then
+if test "$target" != "$host"; then
+    echo "cross compiling from $host to $target"
+    cross_compiling=yes
+
+    case "$build:$target" in
+      powerpc-apple-darwin8*:i?86-apple-darwin*)
+                                                _SAVE_CFLAGS=$CFLAGS
+        _SAVE_CXXFLAGS=$CXXFLAGS
+        CFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk $CFLAGS"
+        CXXFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk $CXXFLAGS"
+        ;;
+      *:arm*-apple-darwin*)
+                                _SAVE_CFLAGS=$CFLAGS
+        _SAVE_CXXFLAGS=$CXXFLAGS
+        CFLAGS="-isysroot $MACOS_SDK_DIR $CFLAGS"
+        CXXFLAGS="-isysroot $MACOS_SDK_DIR $CXXFLAGS"
+        ;;
+    esac
+
+    for ac_prog in $CC "${target_alias}-gcc" "${target}-gcc"
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$CC" && break
+done
+test -n "$CC" || CC="echo"
+
+    unset ac_cv_prog_CC
+    fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="${ac_tool_prefix}gcc"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+  ac_ct_CC=$CC
+  # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CC="gcc"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_CC" = x; then
+    CC=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    CC=$ac_ct_CC
+  fi
+else
+  CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+          if test -n "$ac_tool_prefix"; then
+    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="${ac_tool_prefix}cc"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  fi
+fi
+if test -z "$CC"; then
+  # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+  ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+       ac_prog_rejected=yes
+       continue
+     fi
+    ac_cv_prog_CC="cc"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+if test $ac_prog_rejected = yes; then
+  # We found a bogon in the path, so make sure we never use it.
+  set dummy $ac_cv_prog_CC
+  shift
+  if test $# != 0; then
+    # We chose a different compiler from the bogus one.
+    # However, it has the same basename, so the bogon will be chosen
+    # first if we set CC to just the basename; use the full file name.
+    shift
+    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+  fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$CC"; then
+  if test -n "$ac_tool_prefix"; then
+  for ac_prog in cl.exe
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+    test -n "$CC" && break
+  done
+fi
+if test -z "$CC"; then
+  ac_ct_CC=$CC
+  for ac_prog in cl.exe
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CC="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$ac_ct_CC" && break
+done
+
+  if test "x$ac_ct_CC" = x; then
+    CC=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    CC=$ac_ct_CC
+  fi
+fi
+
+fi
+
+
+test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "no acceptable C compiler found in \$PATH
+See \`config.log' for more details" "$LINENO" 5; }
+
+# Provide some information about the compiler.
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+  { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    sed '10a\
+... rest of stderr output deleted ...
+         10q' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+  fi
+  rm -f conftest.er1 conftest.err
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+done
+
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
+# Try to create an executable without -o first, disregard a.out.
+# It will help us diagnose broken compilers, and finding out an intuition
+# of exeext.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
+$as_echo_n "checking whether the C compiler works... " >&6; }
+ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+
+# The possible output files:
+ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
+
+ac_rmfiles=
+for ac_file in $ac_files
+do
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
+  esac
+done
+rm -f $ac_rmfiles
+
+if { { ac_try="$ac_link_default"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link_default") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then :
+  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
+# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
+# in a Makefile.  We should not override ac_cv_exeext if it was cached,
+# so that the user can short-circuit this test for compilers unknown to
+# Autoconf.
+for ac_file in $ac_files ''
+do
+  test -f "$ac_file" || continue
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
+       ;;
+    [ab].out )
+       # We found the default executable, but exeext='' is most
+       # certainly right.
+       break;;
+    *.* )
+       if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
+       then :; else
+          ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+       fi
+       # We set ac_cv_exeext here because the later test for it is not
+       # safe: cross compilers may not add the suffix if given an `-o'
+       # argument, so we may need to know it at that point already.
+       # Even if this section looks crufty: it has the advantage of
+       # actually working.
+       break;;
+    * )
+       break;;
+  esac
+done
+test "$ac_cv_exeext" = no && ac_cv_exeext=
+
+else
+  ac_file=''
+fi
+if test -z "$ac_file"; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "C compiler cannot create executables
+See \`config.log' for more details" "$LINENO" 5; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
+$as_echo_n "checking for C compiler default output file name... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
+$as_echo "$ac_file" >&6; }
+ac_exeext=$ac_cv_exeext
+
+rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
+ac_clean_files=$ac_clean_files_save
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
+$as_echo_n "checking for suffix of executables... " >&6; }
+if { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then :
+  # If both `conftest.exe' and `conftest' are `present' (well, observable)
+# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
+# work properly (i.e., refer to `conftest.exe'), while it won't with
+# `rm'.
+for ac_file in conftest.exe conftest conftest.*; do
+  test -f "$ac_file" || continue
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+         break;;
+    * ) break;;
+  esac
+done
+else
+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+rm -f conftest conftest$ac_cv_exeext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
+$as_echo "$ac_cv_exeext" >&6; }
+
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdio.h>
+int
+main ()
+{
+FILE *f = fopen ("conftest.out", "w");
+ return ferror (f) || fclose (f) != 0;
+
+  ;
+  return 0;
+}
+_ACEOF
+ac_clean_files="$ac_clean_files conftest.out"
+# Check that the compiler produces executables we can run.  If not, either
+# the compiler is broken, or we cross compile.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
+$as_echo_n "checking whether we are cross compiling... " >&6; }
+if test "$cross_compiling" != yes; then
+  { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+  if { ac_try='./conftest$ac_cv_exeext'
+  { { case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then
+    cross_compiling=no
+  else
+    if test "$cross_compiling" = maybe; then
+       cross_compiling=yes
+    else
+       { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details" "$LINENO" 5; }
+    fi
+  fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
+$as_echo "$cross_compiling" >&6; }
+
+rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
+ac_clean_files=$ac_clean_files_save
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
+$as_echo_n "checking for suffix of object files... " >&6; }
+if ${ac_cv_objext+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { { ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compile") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then :
+  for ac_file in conftest.o conftest.obj conftest.*; do
+  test -f "$ac_file" || continue;
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
+    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+       break;;
+  esac
+done
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot compute suffix of object files: cannot compile
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
+$as_echo "$ac_cv_objext" >&6; }
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
+$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
+if ${ac_cv_c_compiler_gnu+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_compiler_gnu=yes
+else
+  ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
+$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+  GCC=yes
+else
+  GCC=
+fi
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
+$as_echo_n "checking whether $CC accepts -g... " >&6; }
+if ${ac_cv_prog_cc_g+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_save_c_werror_flag=$ac_c_werror_flag
+   ac_c_werror_flag=yes
+   ac_cv_prog_cc_g=no
+   CFLAGS="-g"
+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_prog_cc_g=yes
+else
+  CFLAGS=""
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+  ac_c_werror_flag=$ac_save_c_werror_flag
+        CFLAGS="-g"
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_prog_cc_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+   ac_c_werror_flag=$ac_save_c_werror_flag
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+$as_echo "$ac_cv_prog_cc_g" >&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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
+$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
+if ${ac_cv_prog_cc_c89+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdarg.h>
+#include <stdio.h>
+struct stat;
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+     char **p;
+     int i;
+{
+  return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+  char *s;
+  va_list v;
+  va_start (v,p);
+  s = g (p, va_arg (v,int));
+  va_end (v);
+  return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
+   function prototypes and stuff, but not '\xHH' hex character constants.
+   These don't provoke an error unfortunately, instead are silently treated
+   as 'x'.  The following induces an error, until -std is added to get
+   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
+   array size at least.  It's necessary to write '\x00'==0 to get something
+   that's true only with -std.  */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+   inside strings and character constants.  */
+#define FOO(x) 'x'
+int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
+  ;
+  return 0;
+}
+_ACEOF
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
+       -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+  CC="$ac_save_CC $ac_arg"
+  if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_prog_cc_c89=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext
+  test "x$ac_cv_prog_cc_c89" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c89" in
+  x)
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+$as_echo "none needed" >&6; } ;;
+  xno)
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;;
+  *)
+    CC="$CC $ac_cv_prog_cc_c89"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
+$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
+esac
+if test "x$ac_cv_prog_cc_c89" != xno; then :
+
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+if test "$target" != "$host"; then
+    if test -n "$USE_CPLUS"; then
+        for ac_prog in $CXX "${target_alias}-g++" "${target}-g++"
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CXX+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CXX"; then
+  ac_cv_prog_CXX="$CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CXX="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+CXX=$ac_cv_prog_CXX
+if test -n "$CXX"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
+$as_echo "$CXX" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$CXX" && break
+done
+test -n "$CXX" || CXX="echo"
+
+        unset ac_cv_prog_CXX
+        ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+if test -z "$CXX"; then
+  if test -n "$CCC"; then
+    CXX=$CCC
+  else
+    if test -n "$ac_tool_prefix"; then
+  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CXX+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CXX"; then
+  ac_cv_prog_CXX="$CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+CXX=$ac_cv_prog_CXX
+if test -n "$CXX"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
+$as_echo "$CXX" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+    test -n "$CXX" && break
+  done
+fi
+if test -z "$CXX"; then
+  ac_ct_CXX=$CXX
+  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_CXX+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_CXX"; then
+  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CXX="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
+if test -n "$ac_ct_CXX"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
+$as_echo "$ac_ct_CXX" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$ac_ct_CXX" && break
+done
+
+  if test "x$ac_ct_CXX" = x; then
+    CXX="g++"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    CXX=$ac_ct_CXX
+  fi
+fi
+
+  fi
+fi
+# Provide some information about the compiler.
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+  { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    sed '10a\
+... rest of stderr output deleted ...
+         10q' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+  fi
+  rm -f conftest.er1 conftest.err
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
+$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
+if ${ac_cv_cxx_compiler_gnu+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  ac_compiler_gnu=yes
+else
+  ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
+$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+  GXX=yes
+else
+  GXX=
+fi
+ac_test_CXXFLAGS=${CXXFLAGS+set}
+ac_save_CXXFLAGS=$CXXFLAGS
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
+$as_echo_n "checking whether $CXX accepts -g... " >&6; }
+if ${ac_cv_prog_cxx_g+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
+   ac_cxx_werror_flag=yes
+   ac_cv_prog_cxx_g=no
+   CXXFLAGS="-g"
+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  ac_cv_prog_cxx_g=yes
+else
+  CXXFLAGS=""
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+
+else
+  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+        CXXFLAGS="-g"
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  ac_cv_prog_cxx_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
+$as_echo "$ac_cv_prog_cxx_g" >&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
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+    fi
+
+    case "$build:$target" in
+      powerpc-apple-darwin8*:i?86-apple-darwin*|*:arm*-apple-darwin*)
+                                CFLAGS=$_SAVE_CFLAGS
+        CXXFLAGS=$_SAVE_CXXFLAGS
+        ;;
+    esac
+
+    for ac_prog in $RANLIB "${target_alias}-ranlib" "${target}-ranlib"
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_RANLIB+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$RANLIB"; then
+  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_RANLIB="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
+$as_echo "$RANLIB" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$RANLIB" && break
+done
+test -n "$RANLIB" || RANLIB="echo"
+
+    for ac_prog in $AR "${target_alias}-ar" "${target}-ar"
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AR+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$AR"; then
+  ac_cv_prog_AR="$AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_AR="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
+$as_echo "$AR" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$AR" && break
+done
+test -n "$AR" || AR="echo"
+
+    for ac_prog in $AS "${target_alias}-as" "${target}-as"
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AS+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$AS"; then
+  ac_cv_prog_AS="$AS" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_AS="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+AS=$ac_cv_prog_AS
+if test -n "$AS"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
+$as_echo "$AS" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$AS" && break
+done
+test -n "$AS" || AS="echo"
+
+    for ac_prog in $LD "${target_alias}-ld" "${target}-ld"
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_LD+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$LD"; then
+  ac_cv_prog_LD="$LD" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_LD="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+LD=$ac_cv_prog_LD
+if test -n "$LD"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
+$as_echo "$LD" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$LD" && break
+done
+test -n "$LD" || LD="echo"
+
+    for ac_prog in $STRIP "${target_alias}-strip" "${target}-strip"
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_STRIP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$STRIP"; then
+  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_STRIP="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+$as_echo "$STRIP" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$STRIP" && break
+done
+test -n "$STRIP" || STRIP="echo"
+
+    for ac_prog in $WINDRES "${target_alias}-windres" "${target}-windres"
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_WINDRES+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$WINDRES"; then
+  ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_WINDRES="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+WINDRES=$ac_cv_prog_WINDRES
+if test -n "$WINDRES"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
+$as_echo "$WINDRES" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$WINDRES" && break
+done
+test -n "$WINDRES" || WINDRES="echo"
+
+
+    _SAVE_CC="$CC"
+    _SAVE_CFLAGS="$CFLAGS"
+    _SAVE_LDFLAGS="$LDFLAGS"
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $host compiler" >&5
+$as_echo_n "checking for $host compiler... " >&6; }
+    for ac_prog in $HOST_CC gcc cc /usr/ucb/cc
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_HOST_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$HOST_CC"; then
+  ac_cv_prog_HOST_CC="$HOST_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_HOST_CC="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+HOST_CC=$ac_cv_prog_HOST_CC
+if test -n "$HOST_CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HOST_CC" >&5
+$as_echo "$HOST_CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$HOST_CC" && break
+done
+test -n "$HOST_CC" || HOST_CC=""""
+
+    if test -z "$HOST_CC"; then
+        as_fn_error $? "no acceptable cc found in \$PATH" "$LINENO" 5
+    fi
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HOST_CC" >&5
+$as_echo "$HOST_CC" >&6; }
+    if test -z "$HOST_CFLAGS"; then
+        HOST_CFLAGS="$CFLAGS"
+    fi
+    if test -z "$HOST_LDFLAGS"; then
+        HOST_LDFLAGS="$LDFLAGS"
+    fi
+
+    CC="$HOST_CC"
+    CFLAGS="$HOST_CFLAGS"
+    LDFLAGS="$HOST_LDFLAGS"
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works" >&5
+$as_echo_n "checking whether the $host compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works... " >&6; }
+
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+return 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+  as_fn_error $? "installation or configuration problem: $host compiler $HOST_CC cannot create executables." "$LINENO" 5
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+    CC=$_SAVE_CC
+    CFLAGS=$_SAVE_CFLAGS
+    LDFLAGS=$_SAVE_LDFLAGS
+else
+    if test -n "$USE_CPLUS"; then
+        if test "$CC" = "cl" -a -z "$CXX"; then
+            CXX=$CC
+        else
+            ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+if test -z "$CXX"; then
+  if test -n "$CCC"; then
+    CXX=$CCC
+  else
+    if test -n "$ac_tool_prefix"; then
+  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CXX+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CXX"; then
+  ac_cv_prog_CXX="$CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+CXX=$ac_cv_prog_CXX
+if test -n "$CXX"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
+$as_echo "$CXX" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+    test -n "$CXX" && break
+  done
+fi
+if test -z "$CXX"; then
+  ac_ct_CXX=$CXX
+  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_CXX+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_CXX"; then
+  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CXX="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
+if test -n "$ac_ct_CXX"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
+$as_echo "$ac_ct_CXX" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$ac_ct_CXX" && break
+done
+
+  if test "x$ac_ct_CXX" = x; then
+    CXX="g++"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    CXX=$ac_ct_CXX
+  fi
+fi
+
+  fi
+fi
+# Provide some information about the compiler.
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+  { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    sed '10a\
+... rest of stderr output deleted ...
+         10q' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+  fi
+  rm -f conftest.er1 conftest.err
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
+$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
+if ${ac_cv_cxx_compiler_gnu+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  ac_compiler_gnu=yes
+else
+  ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
+$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+  GXX=yes
+else
+  GXX=
+fi
+ac_test_CXXFLAGS=${CXXFLAGS+set}
+ac_save_CXXFLAGS=$CXXFLAGS
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
+$as_echo_n "checking whether $CXX accepts -g... " >&6; }
+if ${ac_cv_prog_cxx_g+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
+   ac_cxx_werror_flag=yes
+   ac_cv_prog_cxx_g=no
+   CXXFLAGS="-g"
+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  ac_cv_prog_cxx_g=yes
+else
+  CXXFLAGS=""
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+
+else
+  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+        CXXFLAGS="-g"
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  ac_cv_prog_cxx_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
+$as_echo "$ac_cv_prog_cxx_g" >&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
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+        fi
+    fi
+    if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_RANLIB+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$RANLIB"; then
+  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
+$as_echo "$RANLIB" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+  ac_ct_RANLIB=$RANLIB
+  # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_RANLIB"; then
+  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_RANLIB="ranlib"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
+$as_echo "$ac_ct_RANLIB" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_RANLIB" = x; then
+    RANLIB=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    RANLIB=$ac_ct_RANLIB
+  fi
+else
+  RANLIB="$ac_cv_prog_RANLIB"
+fi
+
+    for ac_prog in as
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_AS+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $AS in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_AS="$AS" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+AS=$ac_cv_path_AS
+if test -n "$AS"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
+$as_echo "$AS" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$AS" && break
+done
+test -n "$AS" || AS="$CC"
+
+    for ac_prog in ar
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_AR+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $AR in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_AR="$AR" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+AR=$ac_cv_path_AR
+if test -n "$AR"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
+$as_echo "$AR" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$AR" && break
+done
+test -n "$AR" || AR="echo not_ar"
+
+    for ac_prog in ld link
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_LD+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $LD in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_LD="$LD" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_LD="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+LD=$ac_cv_path_LD
+if test -n "$LD"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
+$as_echo "$LD" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$LD" && break
+done
+test -n "$LD" || LD="echo not_ld"
+
+    for ac_prog in strip
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_STRIP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $STRIP in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+STRIP=$ac_cv_path_STRIP
+if test -n "$STRIP"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+$as_echo "$STRIP" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$STRIP" && break
+done
+test -n "$STRIP" || STRIP="echo not_strip"
+
+    for ac_prog in windres
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_WINDRES+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $WINDRES in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_WINDRES="$WINDRES" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_WINDRES="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+WINDRES=$ac_cv_path_WINDRES
+if test -n "$WINDRES"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
+$as_echo "$WINDRES" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$WINDRES" && break
+done
+test -n "$WINDRES" || WINDRES="echo not_windres"
+
+    if test -z "$HOST_CC"; then
+        HOST_CC="$CC"
+    fi
+    if test -z "$HOST_CFLAGS"; then
+        HOST_CFLAGS="$CFLAGS"
+    fi
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
+$as_echo_n "checking how to run the C preprocessor... " >&6; }
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+  CPP=
+fi
+if test -z "$CPP"; then
+  if ${ac_cv_prog_CPP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+      # Double quotes because CPP needs to be expanded
+    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+    do
+      ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+                    Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+else
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether nonexistent headers
+  # can be detected and how.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+  # Broken: success on invalid input.
+continue
+else
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+  break
+fi
+
+    done
+    ac_cv_prog_CPP=$CPP
+
+fi
+  CPP=$ac_cv_prog_CPP
+else
+  ac_cv_prog_CPP=$CPP
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
+$as_echo "$CPP" >&6; }
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+                    Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+else
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether nonexistent headers
+  # can be detected and how.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+  # Broken: success on invalid input.
+continue
+else
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+
+else
+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+if test "$GCC" = "yes"; then
+    GNU_CC=1
+fi
+if test "$GXX" = "yes"; then
+    GNU_CXX=1
+fi
+if test "`echo | $AS -v 2>&1 | grep -c GNU`" != "0"; then
+    GNU_AS=1
+fi
+rm -f a.out
+
+case "$build:$target" in
+    i?86-apple-darwin*:powerpc-apple-darwin*)
+                                cross_compiling=yes
+        ;;
+esac
+
+if test "$cross_compiling"  = "yes"; then
+    CROSS_COMPILE=1
+else
+    CROSS_COMPILE=
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc -pipe support" >&5
+$as_echo_n "checking for gcc -pipe support... " >&6; }
+if test -n "$GNU_CC" && test -n "$GNU_CXX" && test -n "$GNU_AS"; then
+    echo '#include <stdio.h>' > dummy-hello.c
+    echo 'int main() { printf("Hello World\n"); return 0; }' >> dummy-hello.c
+    ${CC} -S dummy-hello.c -o dummy-hello.s 2>&5
+    cat dummy-hello.s | ${AS} -o dummy-hello.S - 2>&5
+    if test $? = 0; then
+        _res_as_stdin="yes"
+    else
+        _res_as_stdin="no"
+    fi
+    if test "$_res_as_stdin" = "yes"; then
+        _SAVE_CFLAGS=$CFLAGS
+        CFLAGS="$CFLAGS -pipe"
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+ #include <stdio.h>
+int
+main ()
+{
+printf("Hello World\n");
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  _res_gcc_pipe="yes"
+else
+  _res_gcc_pipe="no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+        CFLAGS=$_SAVE_CFLAGS
+    fi
+    if test "$_res_as_stdin" = "yes" && test "$_res_gcc_pipe" = "yes"; then
+        _res="yes";
+        CFLAGS="$CFLAGS -pipe"
+        CXXFLAGS="$CXXFLAGS -pipe"
+    else
+        _res="no"
+    fi
+    rm -f dummy-hello.c dummy-hello.s dummy-hello.S dummy-hello a.out
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_res" >&5
+$as_echo "$_res" >&6; }
+else
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+_SAVE_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS -fprofile-generate -fprofile-correction"
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler supports -fprofile-generate" >&5
+$as_echo_n "checking whether C compiler supports -fprofile-generate... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+return 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+   PROFILE_GEN_CFLAGS="-fprofile-generate"
+                 result="yes"
+else
+  result="no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $result" >&5
+$as_echo "$result" >&6; }
+
+if test $result = "yes"; then
+   PROFILE_GEN_LDFLAGS="-fprofile-generate"
+   PROFILE_USE_CFLAGS="-fprofile-use -fprofile-correction -Wcoverage-mismatch"
+   PROFILE_USE_LDFLAGS="-fprofile-use"
+fi
+
+CFLAGS="$_SAVE_CFLAGS"
+
+if test "$GNU_CC"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for visibility(hidden) attribute" >&5
+$as_echo_n "checking for visibility(hidden) attribute... " >&6; }
+if ${ac_cv_visibility_hidden+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat > conftest.c <<EOF
+        int foo __attribute__ ((visibility ("hidden"))) = 1;
+EOF
+        ac_cv_visibility_hidden=no
+        if ${CC-cc} -Werror -S conftest.c -o conftest.s >/dev/null 2>&1; then
+            if grep '\.hidden.*foo' conftest.s >/dev/null; then
+                ac_cv_visibility_hidden=yes
+            fi
+        fi
+        rm -f conftest.cs
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_visibility_hidden" >&5
+$as_echo "$ac_cv_visibility_hidden" >&6; }
+    if test "$ac_cv_visibility_hidden" = "yes"; then
+        $as_echo "#define HAVE_VISIBILITY_HIDDEN_ATTRIBUTE 1" >>confdefs.h
+
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for visibility pragma support" >&5
+$as_echo_n "checking for visibility pragma support... " >&6; }
+if ${ac_cv_visibility_pragma+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat > conftest.c <<EOF
+#pragma GCC visibility push(hidden)
+            int foo_hidden = 1;
+#pragma GCC visibility push(default)
+            int foo_default = 1;
+EOF
+            ac_cv_visibility_pragma=no
+            if ${CC-cc} -Werror -S conftest.c -o conftest.s >/dev/null 2>&1; then
+                if grep '\.hidden.*foo_hidden' conftest.s >/dev/null; then
+                    if ! grep '\.hidden.*foo_default' conftest.s > /dev/null; then
+                        ac_cv_visibility_pragma=yes
+                    fi
+                fi
+            fi
+            rm -f conftest.cs
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_visibility_pragma" >&5
+$as_echo "$ac_cv_visibility_pragma" >&6; }
+        if test "$ac_cv_visibility_pragma" = "yes"; then
+            $as_echo "#define HAVE_VISIBILITY_PRAGMA 1" >>confdefs.h
+
+            # To work around a build problem on Linux x86-64 (Bugzilla bug
+            # 293438), we use the -fvisibility=hidden flag.  This flag is less
+            # optimal than #pragma GCC visibility push(hidden) because the flag
+            # assumes that symbols defined outside the current source file have
+            # the default visibility.  This has the advantage that we don't need
+            # to wrap system header files, but has the disadvantage that calls
+            # to hidden symbols defined in other source files cannot be
+            # optimized by the compiler.  The -fvisibility=hidden flag does
+            # hide and export symbols correctly.
+            #VISIBILITY_FLAGS='-I$(dist_includedir)/system_wrappers -include $(topsrcdir)/config/gcc_hidden.h'
+            #WRAP_SYSTEM_INCLUDES=1
+            VISIBILITY_FLAGS="-fvisibility=hidden"
+            WRAP_SYSTEM_INCLUDES=
+        fi
+    fi
+fi # GNU_CC
+
+fi # SKIP_COMPILER_CHECKS
+
+if test -z "$SKIP_PATH_CHECKS"; then
+    for ac_prog in perl5 perl
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_PERL+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $PERL in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+PERL=$ac_cv_path_PERL
+if test -n "$PERL"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
+$as_echo "$PERL" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$PERL" && break
+done
+test -n "$PERL" || PERL="echo not_perl"
+
+elif test -z "$PERL"; then
+    PERL=perl
+fi
+
+OBJ_SUFFIX=o
+LIB_SUFFIX=a
+DLL_SUFFIX=so
+ASM_SUFFIX=s
+MKSHLIB='$(LD) $(DSO_LDOPTS) -o $@'
+PR_MD_ASFILES=
+PR_MD_CSRCS=
+PR_MD_ARCH_DIR=unix
+AR_FLAGS='cr $@'
+AS='$(CC)'
+ASFLAGS='$(CFLAGS)'
+
+if test -n "$CROSS_COMPILE"; then
+    OS_ARCH=`echo $target_os | sed -e 's|/|_|g'`
+    OS_RELEASE=
+    OS_TEST="${target_cpu}"
+    case "${target_os}" in
+        linux*)       OS_ARCH=Linux ;;
+        solaris*)     OS_ARCH=SunOS OS_RELEASE=5 ;;
+        mingw*)       OS_ARCH=WINNT CPU_ARCH=x86 ;;
+        darwin*)      OS_ARCH=Darwin ;;
+        riscos*)      OS_ARCH=RISCOS ;;
+    esac
+else
+    OS_ARCH=`uname -s | sed -e 's|/|_|g'`
+    OS_RELEASE=`uname -r`
+    OS_TEST=`uname -m`
+fi
+
+if test "$OS_ARCH" = "IRIX64"; then
+    OS_ARCH=IRIX
+fi
+
+if test "$OS_ARCH" = "AIX"; then
+    OS_RELEASE=`uname -v`.`uname -r`
+fi
+
+if test "$OS_ARCH" = "FreeBSD"; then
+    OS_RELEASE=`echo $OS_RELEASE | sed 's/-.*//'`
+fi
+
+if test "$OS_ARCH" = "Linux"; then
+    OS_RELEASE=`echo $OS_RELEASE | sed 's/-.*//'`
+    OS_RELEASE=`echo $OS_RELEASE | awk -F\. '{ print $1 "." $2 }'`
+fi
+
+#######################################################################
+# Master "Core Components" macros for getting the OS target           #
+#######################################################################
+
+#
+# Note: OS_TARGET should be specified on the command line for gmake.
+# When OS_TARGET=WIN95 is specified, then a Windows 95 target is built.
+# The difference between the Win95 target and the WinNT target is that
+# the WinNT target uses Windows NT specific features not available
+# in Windows 95. The Win95 target will run on Windows NT, but (supposedly)
+# at lesser performance (the Win95 target uses threads; the WinNT target
+# uses fibers).
+#
+# If OS_TARGET is not specified, it defaults to $(OS_ARCH), i.e., no
+# cross-compilation.
+#
+
+#
+# The following hack allows one to build on a WIN95 machine (as if
+# s/he were cross-compiling on a WINNT host for a WIN95 target).
+# It also accomodates for MKS's uname.exe.  If you never intend
+# to do development on a WIN95 machine, you don't need this hack.
+#
+case "$OS_ARCH" in
+Windows_95)
+    OS_ARCH=Windows_NT
+    OS_TARGET=WIN95
+    ;;
+Windows_98)
+    OS_ARCH=Windows_NT
+    OS_TARGET=WIN95
+    ;;
+CYGWIN_9*|CYGWIN_ME*)
+    OS_ARCH='CYGWIN_NT-4.0'
+    OS_TARGET=WIN95
+    ;;
+OS_2)
+    OS_ARCH=OS2
+    OS_TARGET=OS2
+    ;;
+esac
+
+#
+# On WIN32, we also define the variable CPU_ARCH.
+#
+
+case "$OS_ARCH" in
+Windows_NT)
+#
+# If uname -s returns "Windows_NT", we assume that we are using
+# the uname.exe in MKS toolkit.
+#
+# The -r option of MKS uname only returns the major version number.
+# So we need to use its -v option to get the minor version number.
+# Moreover, it doesn't have the -p option, so we need to use uname -m.
+#
+    OS_ARCH=WINNT
+    OS_MINOR_RELEASE=`uname -v`
+    if test "$OS_MINOR_RELEASE" = "00"; then
+        OS_MINOR_RELEASE=0
+    fi
+    OS_RELEASE="${OS_RELEASE}.${OS_MINOR_RELEASE}"
+    CPU_ARCH=`uname -m`
+    #
+    # MKS's uname -m returns "586" on a Pentium machine.
+    #
+    if echo "$CPU_ARCH" | grep -c 86 >/dev/null; then
+        CPU_ARCH=x86
+    fi
+    ;;
+CYGWIN_NT*|MINGW*_NT*|MSYS_NT*)
+#
+# If uname -s returns "CYGWIN_NT-4.0", we assume that we are using
+# the uname.exe in the Cygwin tools.
+# If uname -s returns "MINGW32_NT-5.1", we assume that we are using
+# the uname.exe in the MSYS tools.
+# If uname -s returns "MSYS_NT-6.3", we assume that we are using
+# the uname.exe in the MSYS2 tools.
+#
+    OS_RELEASE=`expr $OS_ARCH : '.*NT-\(.*\)'`
+    OS_ARCH=WINNT
+    CPU_ARCH=`uname -m`
+    #
+    # Cygwin's uname -m returns "i686" on a Pentium Pro machine.
+    #
+    if echo "$CPU_ARCH" | grep -c 86 >/dev/null; then
+        CPU_ARCH=x86
+    fi
+    ;;
+esac
+
+if test -n "$MOZILLA_CLIENT" && test "$OS_ARCH" = "WINNT"; then
+    OS_TARGET=WIN95
+    if test -n "$MOZ_DEBUG" -a -z "$USE_DEBUG_RTL"; then
+        USE_DEBUG_RTL=1
+    fi
+fi
+if test -z "$OS_TARGET"; then
+    OS_TARGET=$OS_ARCH
+fi
+if test "$OS_TARGET" = "WIN95"; then
+    OS_RELEASE="4.0"
+fi
+OS_CONFIG="${OS_TARGET}${OS_RELEASE}"
+
+# Check whether --enable-os2-high-mem was given.
+if test "${enable_os2_high_mem+set}" = set; then :
+  enableval=$enable_os2_high_mem;  if test "$enableval" = "no"; then
+        MOZ_OS2_HIGH_MEMORY=
+      else
+        MOZ_OS2_HIGH_MEMORY=1
+      fi
+fi
+
+
+
+MOZ_ALIGN=toolchain-default
+
+case "$target" in
+arm*-android*|arm*-linuxandroid*)
+    MOZ_THUMB=yes
+    MOZ_ARCH=armv7-a
+    MOZ_FPU=vfp
+    MOZ_FLOAT_ABI=softfp
+    MOZ_SOFT_FLOAT=yes
+    MOZ_ALIGN=no
+    ;;
+arm*-*)
+    if test -n "$MOZ_PLATFORM_MAEMO"; then
+        MOZ_THUMB=no
+        MOZ_ARCH=armv7-a
+        MOZ_FLOAT_ABI=softfp
+    fi
+    if test "$MOZ_PLATFORM_MAEMO" = 6; then
+        MOZ_THUMB=yes
+    fi
+    ;;
+esac
+
+# Check whether --enable-thumb2 was given.
+if test "${enable_thumb2+set}" = set; then :
+  enableval=$enable_thumb2; MOZ_THUMB=$enableval
+fi
+
+
+
+# Check whether --with-thumb was given.
+if test "${with_thumb+set}" = set; then :
+  withval=$with_thumb; if test -z "$GNU_CC"; then
+        as_fn_error $? "--with-thumb is not supported on non-GNU toolchain-defaults" "$LINENO" 5
+    fi
+    MOZ_THUMB=$withval
+fi
+
+
+
+# Check whether --with-thumb-interwork was given.
+if test "${with_thumb_interwork+set}" = set; then :
+  withval=$with_thumb_interwork; if test -z "$GNU_CC"; then
+        as_fn_error $? "--with-thumb-interwork is not supported on non-GNU toolchain-defaults" "$LINENO" 5
+    fi
+    MOZ_THUMB_INTERWORK=$withval
+fi
+
+
+
+# Check whether --with-arch was given.
+if test "${with_arch+set}" = set; then :
+  withval=$with_arch; if test -z "$GNU_CC"; then
+        as_fn_error $? "--with-arch is not supported on non-GNU toolchain-defaults" "$LINENO" 5
+    fi
+    MOZ_ARCH=$withval
+fi
+
+
+
+# Check whether --with-fpu was given.
+if test "${with_fpu+set}" = set; then :
+  withval=$with_fpu; if test -z "$GNU_CC"; then
+        as_fn_error $? "--with-fpu is not supported on non-GNU toolchain-defaults" "$LINENO" 5
+    fi
+    MOZ_FPU=$withval
+fi
+
+
+
+# Check whether --with-float-abi was given.
+if test "${with_float_abi+set}" = set; then :
+  withval=$with_float_abi; if test -z "$GNU_CC"; then
+        as_fn_error $? "--with-float-abi is not supported on non-GNU toolchain-defaults" "$LINENO" 5
+    fi
+    MOZ_FLOAT_ABI=$withval
+fi
+
+
+
+# Check whether --with-soft-float was given.
+if test "${with_soft_float+set}" = set; then :
+  withval=$with_soft_float; if test -z "$GNU_CC"; then
+        as_fn_error $? "--with-soft-float is not supported on non-GNU toolchain-defaults" "$LINENO" 5
+    fi
+    MOZ_SOFT_FLOAT=$withval
+fi
+
+
+case "$MOZ_ARCH" in
+toolchain-default|"")
+    arch_flag=""
+    ;;
+*)
+    arch_flag="-march=$MOZ_ARCH"
+    ;;
+esac
+
+case "$MOZ_THUMB" in
+yes)
+    MOZ_THUMB2=1
+    thumb_flag="-mthumb"
+    ;;
+no)
+    MOZ_THUMB2=
+    thumb_flag="-marm"
+    ;;
+*)
+    _SAVE_CFLAGS="$CFLAGS"
+    CFLAGS="$arch_flag"
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+return sizeof(__thumb2__);
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  MOZ_THUMB2=1
+else
+  MOZ_THUMB2=
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+    CFLAGS="$_SAVE_CFLAGS"
+    thumb_flag=""
+    ;;
+esac
+
+case "$MOZ_THUMB_INTERWORK" in
+yes)
+    thumb_interwork_flag="-mthumb-interwork"
+    ;;
+no)
+    thumb_interwork_flag="-mno-thumb-interwork"
+    ;;
+*) # toolchain-default
+    thumb_interwork_flag=""
+    ;;
+esac
+
+case "$MOZ_FPU" in
+toolchain-default|"")
+    fpu_flag=""
+    ;;
+*)
+    fpu_flag="-mfpu=$MOZ_FPU"
+    ;;
+esac
+
+case "$MOZ_FLOAT_ABI" in
+toolchain-default|"")
+    float_abi_flag=""
+    ;;
+*)
+    float_abi_flag="-mfloat-abi=$MOZ_FLOAT_ABI"
+    ;;
+esac
+
+case "$MOZ_SOFT_FLOAT" in
+yes)
+    soft_float_flag="-msoft-float"
+    ;;
+no)
+    soft_float_flag="-mno-soft-float"
+    ;;
+*) # toolchain-default
+    soft_float_flag=""
+    ;;
+esac
+
+case "$MOZ_ALIGN" in
+toolchain-default|"")
+    align_flag=""
+    ;;
+no)
+    align_flag="-mno-unaligned-access"
+    ;;
+yes)
+    align_flag="-munaligned-access"
+    ;;
+*)
+    align_flag=""
+    ;;
+esac
+
+if test -n "$align_flag"; then
+  _SAVE_CFLAGS="$CFLAGS"
+  CFLAGS="$CFLAGS $align_flag"
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether alignment flag ($align_flag) is supported" >&5
+$as_echo_n "checking whether alignment flag ($align_flag) is supported... " >&6; }
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+  align_flag=""
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  CFLAGS="$_SAVE_CFLAGS"
+fi
+
+all_flags=`echo $arch_flag $thumb_flag $thumb_interwork_flag $fpu_flag $float_abi_flag $soft_float_flag $align_flag`
+if test -n "$all_flags"; then
+    _SAVE_CFLAGS="$CFLAGS"
+    CFLAGS="$all_flags"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the chosen combination of compiler flags ($all_flags) works" >&5
+$as_echo_n "checking whether the chosen combination of compiler flags ($all_flags) works... " >&6; }
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+return 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+  as_fn_error $? "no" "$LINENO" 5
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+    CFLAGS="$_SAVE_CFLAGS $all_flags"
+    CXXFLAGS="$CXXFLAGS $all_flags"
+    ASFLAGS="$ASFLAGS $all_flags"
+    if test -n "$thumb_flag"; then
+        LDFLAGS="$LDFLAGS $thumb_flag"
+    fi
+fi
+
+case "$host" in
+*-mingw*|*-msys*)
+    NSINSTALL=nsinstall
+    ;;
+*-cygwin*|*-mks*)
+    NSINSTALL='$(CYGWIN_WRAPPER) nsinstall'
+    if test `echo "${PATH}" | grep -c \;` = 0; then
+        CYGWIN_WRAPPER='sh $(topsrcdir)/build/cygwin-wrapper'
+    fi
+    ;;
+*-beos*)
+    HOST_CFLAGS="$HOST_CFLAGS -DXP_BEOS -DBeOS -DBEOS -D_POSIX_SOURCE"
+    ;;
+*os2*)
+    ;;
+*)
+    HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX"
+    ;;
+esac
+
+case "$target" in
+
+*-aix*)
+    $as_echo "#define XP_UNIX 1" >>confdefs.h
+
+    $as_echo "#define AIX 1" >>confdefs.h
+
+    $as_echo "#define SYSV 1" >>confdefs.h
+
+    DSO_LDOPTS='-brtl -bnortllib -bM:SRE -bnoentry -bexpall -blibpath:/usr/lib:/lib'
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
+$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
+if ${ac_cv_path_GREP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -z "$GREP"; then
+  ac_path_GREP_found=false
+  # Loop through the user's path and test for each of PROGNAME-LIST
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_prog in grep ggrep; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
+      as_fn_executable_p "$ac_path_GREP" || continue
+# Check for GNU ac_path_GREP and select it if it is found.
+  # Check for GNU $ac_path_GREP
+case `"$ac_path_GREP" --version 2>&1` in
+*GNU*)
+  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
+*)
+  ac_count=0
+  $as_echo_n 0123456789 >"conftest.in"
+  while :
+  do
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    $as_echo 'GREP' >> "conftest.nl"
+    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+    as_fn_arith $ac_count + 1 && ac_count=$as_val
+    if test $ac_count -gt ${ac_path_GREP_max-0}; then
+      # Best one so far, save it but keep looking for a better one
+      ac_cv_path_GREP="$ac_path_GREP"
+      ac_path_GREP_max=$ac_count
+    fi
+    # 10*(2^10) chars as input seems more than enough
+    test $ac_count -gt 10 && break
+  done
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+      $ac_path_GREP_found && break 3
+    done
+  done
+  done
+IFS=$as_save_IFS
+  if test -z "$ac_cv_path_GREP"; then
+    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+  fi
+else
+  ac_cv_path_GREP=$GREP
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
+$as_echo "$ac_cv_path_GREP" >&6; }
+ GREP="$ac_cv_path_GREP"
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
+$as_echo_n "checking for egrep... " >&6; }
+if ${ac_cv_path_EGREP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
+   then ac_cv_path_EGREP="$GREP -E"
+   else
+     if test -z "$EGREP"; then
+  ac_path_EGREP_found=false
+  # Loop through the user's path and test for each of PROGNAME-LIST
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_prog in egrep; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
+      as_fn_executable_p "$ac_path_EGREP" || continue
+# Check for GNU ac_path_EGREP and select it if it is found.
+  # Check for GNU $ac_path_EGREP
+case `"$ac_path_EGREP" --version 2>&1` in
+*GNU*)
+  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
+*)
+  ac_count=0
+  $as_echo_n 0123456789 >"conftest.in"
+  while :
+  do
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    $as_echo 'EGREP' >> "conftest.nl"
+    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+    as_fn_arith $ac_count + 1 && ac_count=$as_val
+    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
+      # Best one so far, save it but keep looking for a better one
+      ac_cv_path_EGREP="$ac_path_EGREP"
+      ac_path_EGREP_max=$ac_count
+    fi
+    # 10*(2^10) chars as input seems more than enough
+    test $ac_count -gt 10 && break
+  done
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+      $ac_path_EGREP_found && break 3
+    done
+  done
+  done
+IFS=$as_save_IFS
+  if test -z "$ac_cv_path_EGREP"; then
+    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+  fi
+else
+  ac_cv_path_EGREP=$EGREP
+fi
+
+   fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
+$as_echo "$ac_cv_path_EGREP" >&6; }
+ EGREP="$ac_cv_path_EGREP"
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
+$as_echo_n "checking for ANSI C header files... " >&6; }
+if ${ac_cv_header_stdc+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_header_stdc=yes
+else
+  ac_cv_header_stdc=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "memchr" >/dev/null 2>&1; then :
+
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "free" >/dev/null 2>&1; then :
+
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+  if test "$cross_compiling" = yes; then :
+  :
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <ctype.h>
+#include <stdlib.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+                  (('a' <= (c) && (c) <= 'i') \
+                    || ('j' <= (c) && (c) <= 'r') \
+                    || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+  int i;
+  for (i = 0; i < 256; i++)
+    if (XOR (islower (i), ISLOWER (i))
+       || toupper (i) != TOUPPER (i))
+      return 2;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+
+else
+  ac_cv_header_stdc=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
+$as_echo "$ac_cv_header_stdc" >&6; }
+if test $ac_cv_header_stdc = yes; then
+
+$as_echo "#define STDC_HEADERS 1" >>confdefs.h
+
+fi
+
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+                 inttypes.h stdint.h unistd.h
+do :
+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
+"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+ac_fn_c_check_header_mongrel "$LINENO" "sys/atomic_op.h" "ac_cv_header_sys_atomic_op_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_atomic_op_h" = xyes; then :
+  $as_echo "#define AIX_HAVE_ATOMIC_OP_H 1" >>confdefs.h
+
+fi
+
+
+    case "${target_os}" in
+    aix3.2*)
+        $as_echo "#define AIX_RENAME_SELECT 1" >>confdefs.h
+
+        $as_echo "#define _PR_NO_LARGE_FILES 1" >>confdefs.h
+
+        AIX_LINK_OPTS='-bnso -berok'
+        PR_MD_ASFILES=os_AIX.s
+        ;;
+    aix4.1*)
+        $as_echo "#define AIX_TIMERS 1" >>confdefs.h
+
+        $as_echo "#define _PR_NO_LARGE_FILES 1" >>confdefs.h
+
+        $as_echo "#define AIX4_1 1" >>confdefs.h
+
+        MKSHLIB=
+        DSO_LDOPTS=
+        AIX_LINK_OPTS='-bnso -berok'
+        LIBNSPR='-L$(dist_libdir) -lnspr$(MOD_MAJOR_VERSION)_shr'
+        LIBPLC='-L$(dist_libdir) -lplc$(MOD_MAJOR_VERSION)_shr'
+        ;;
+    aix4.2*)
+        $as_echo "#define AIX_TIMERS 1" >>confdefs.h
+
+        $as_echo "#define _PR_HAVE_OFF64_T 1" >>confdefs.h
+
+        AIX_LINK_OPTS='-brtl -bnso -berok'
+        ;;
+    aix4.3*)
+        $as_echo "#define AIX_TIMERS 1" >>confdefs.h
+
+        $as_echo "#define _PR_HAVE_OFF64_T 1" >>confdefs.h
+
+        $as_echo "#define AIX4_3_PLUS 1" >>confdefs.h
+
+        $as_echo "#define HAVE_SOCKLEN_T 1" >>confdefs.h
+
+        $as_echo "#define HAVE_FCNTL_FILE_LOCKING 1" >>confdefs.h
+
+        USE_IPV6=1
+        AIX_LINK_OPTS='-brtl -bnso -berok'
+        ;;
+    *)
+        $as_echo "#define AIX_TIMERS 1" >>confdefs.h
+
+        $as_echo "#define _PR_HAVE_OFF64_T 1" >>confdefs.h
+
+        $as_echo "#define AIX4_3_PLUS 1" >>confdefs.h
+
+        $as_echo "#define HAVE_SOCKLEN_T 1" >>confdefs.h
+
+        $as_echo "#define HAVE_FCNTL_FILE_LOCKING 1" >>confdefs.h
+
+        USE_IPV6=1
+        AIX_LINK_OPTS='-brtl -bnso -berok'
+        ;;
+    esac
+    CFLAGS="$CFLAGS -qro -qroconst"
+    AIX_WRAP='$(DIST)/lib/aixwrap.o'
+    AIX_TMP='./_aix_tmp.o'
+    if test -n "$USE_64"; then
+        MDCPUCFG_H=_aix64.cfg
+        OBJECT_MODE=64
+    else
+        MDCPUCFG_H=_aix32.cfg
+    fi
+    PR_MD_CSRCS=aix.c
+    RESOLVE_LINK_SYMBOLS=1
+    ;;
+
+*-beos*)
+    $as_echo "#define XP_BEOS 1" >>confdefs.h
+
+    $as_echo "#define BeOS 1" >>confdefs.h
+
+    $as_echo "#define BEOS 1" >>confdefs.h
+
+    $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
+
+    DSO_LDOPTS=-nostart
+    MDCPUCFG_H=_beos.cfg
+    USE_BTHREADS=1
+    PR_MD_ARCH_DIR=beos
+    RESOLVE_LINK_SYMBOLS=1
+    case "${target_cpu}" in
+    i*86)
+        _OPTIMIZE_FLAGS=-O2
+        _DEBUG_FLAGS='-gdwarf-2 -O0'
+        MKSHLIB='$(CCC) $(DSO_LDOPTS) -o $@'
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyaddr in -lbind" >&5
+$as_echo_n "checking for gethostbyaddr in -lbind... " >&6; }
+if ${ac_cv_lib_bind_gethostbyaddr+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lbind  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char gethostbyaddr ();
+int
+main ()
+{
+return gethostbyaddr ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_bind_gethostbyaddr=yes
+else
+  ac_cv_lib_bind_gethostbyaddr=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bind_gethostbyaddr" >&5
+$as_echo "$ac_cv_lib_bind_gethostbyaddr" >&6; }
+if test "x$ac_cv_lib_bind_gethostbyaddr" = xyes; then :
+  OS_LIBS="$OS_LIBS -lbind -lsocket"
+fi
+
+        ;;
+    powerpc)
+        CC=mwcc
+        CCC=mwcc
+        LD=mwld
+        DSO_LDOPTS='-xms -export pragma -init _init_routine_ -term _term_routine_ -lroot -lnet /boot/develop/lib/ppc/glue-noinit.a /boot/develop/lib/ppc/init_term_dyn.o /boot/develop/lib/ppc/start_dyn.o'
+        _OPTIMIZE_FLAGS=-O2
+        _DEBUG_FLAGS='-g -O0'
+        ;;
+    esac
+    ;;
+
+*-bsdi*)
+    $as_echo "#define XP_UNIX 1" >>confdefs.h
+
+    $as_echo "#define BSDI 1" >>confdefs.h
+
+    $as_echo "#define NEED_BSDREGEX 1" >>confdefs.h
+
+
+    CFLAGS="$CFLAGS -Wall -Wno-format"
+    CXXFLAGS="$CXXFLAGS -Wall -Wno-format"
+
+    if echo "$OS_TEST" | grep -c 86 >/dev/null; then
+        CPU_ARCH=x86
+    elif echo "$OS_TEST" | grep -c sparc >/dev/null; then
+        CPU_ARCH=sparc
+    fi
+
+    MDCPUCFG_H=_bsdi.cfg
+    PR_MD_CSRCS=bsdi.c
+
+    DSO_LDOPTS=-r
+
+    case "$target_os" in
+    bsdi1.1*)
+        $as_echo "#define _PR_BSDI_JMPBUF_IS_ARRAY 1" >>confdefs.h
+
+        $as_echo "#define _PR_STAT_HAS_ONLY_ST_ATIME 1" >>confdefs.h
+
+        $as_echo "#define _PR_NEED_H_ERRNO 1" >>confdefs.h
+
+        MKSHLIB=
+        DSO_CFLAGS=
+        DSO_LDOPTS=
+        ;;
+
+    bsdi2.1*)
+        $as_echo "#define _PR_TIMESPEC_HAS_TS_SEC 1" >>confdefs.h
+
+        $as_echo "#define _PR_BSDI_JMPBUF_IS_ARRAY 1" >>confdefs.h
+
+        $as_echo "#define HAVE_DLL 1" >>confdefs.h
+
+        $as_echo "#define USE_DLFCN 1" >>confdefs.h
+
+        $as_echo "#define _PR_STAT_HAS_ST_ATIMESPEC 1" >>confdefs.h
+
+        PR_MD_ASFILES=os_BSD_OS_386_2.s
+        ;;
+
+    bsdi4.* | bsdi5.*)
+        $as_echo "#define _PR_SELECT_CONST_TIMEVAL 1" >>confdefs.h
+
+        $as_echo "#define _PR_BSDI_JMPBUF_IS_STRUCT 1" >>confdefs.h
+
+        $as_echo "#define HAVE_DLL 1" >>confdefs.h
+
+        $as_echo "#define USE_DLFCN 1" >>confdefs.h
+
+        $as_echo "#define _PR_STAT_HAS_ST_ATIMESPEC 1" >>confdefs.h
+
+        MKSHLIB='$(CC) -o $@ $(DSO_LDOPTS)'
+        DSO_CFLAGS=-fPIC
+        DSO_LDOPTS='-shared -Wl,-soname,$(@:$(OBJDIR)/%.so=%.so)'
+        STRIP="$STRIP -d"
+        case "$target_os" in
+        bsdi4.2* | bsdi4.3* | bsdi5.*)
+            $as_echo "#define _PR_HAVE_GETPROTO_R 1" >>confdefs.h
+
+            $as_echo "#define _PR_HAVE_GETPROTO_R_POINTER 1" >>confdefs.h
+
+            ;;
+        esac
+        ;;
+    *)
+        $as_echo "#define _PR_SELECT_CONST_TIMEVAL 1" >>confdefs.h
+
+        $as_echo "#define _PR_BSDI_JMPBUF_IS_STRUCT 1" >>confdefs.h
+
+        $as_echo "#define HAVE_DLL 1" >>confdefs.h
+
+        $as_echo "#define USE_DLFCN 1" >>confdefs.h
+
+        $as_echo "#define _PR_STAT_HAS_ST_ATIMESPEC 1" >>confdefs.h
+
+        ;;
+    esac
+
+    ;;
+
+*-darwin*)
+    $as_echo "#define XP_UNIX 1" >>confdefs.h
+
+    $as_echo "#define DARWIN 1" >>confdefs.h
+
+    $as_echo "#define HAVE_BSD_FLOCK 1" >>confdefs.h
+
+    $as_echo "#define HAVE_SOCKLEN_T 1" >>confdefs.h
+
+    AS='$(CC) -x assembler-with-cpp'
+    CFLAGS="$CFLAGS -Wall -fno-common"
+    case "${target_cpu}" in
+        arm*)
+            CPU_ARCH=arm
+            ;;
+        i*86*|x86_64)
+            if test -n "$USE_64"; then
+                CPU_ARCH=x86_64
+            else
+                CPU_ARCH=i386
+            fi
+            ;;
+        *)
+            CPU_ARCH=ppc
+            ;;
+    esac
+    if test "`echo $CC | grep -c '\-arch '`" = "0"; then
+        CC="$CC -arch $CPU_ARCH"
+    fi
+    ac_fn_c_check_header_mongrel "$LINENO" "crt_externs.h" "ac_cv_header_crt_externs_h" "$ac_includes_default"
+if test "x$ac_cv_header_crt_externs_h" = xyes; then :
+
+fi
+
+
+    DSO_CFLAGS=-fPIC
+    DSO_LDOPTS='-dynamiclib -compatibility_version 1 -current_version 1 -all_load -install_name @executable_path/$@ -headerpad_max_install_names'
+    _OPTIMIZE_FLAGS=-O2
+    MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
+    STRIP="$STRIP -x -S"
+    DLL_SUFFIX=dylib
+    USE_PTHREADS=1
+    MDCPUCFG_H=_darwin.cfg
+    PR_MD_CSRCS=darwin.c
+    PR_MD_ASFILES=os_Darwin.s
+
+    # Add Mac OS X support for loading CFM & CFBundle plugins
+    if test -f "${MACOS_SDK_DIR}/System/Library/Frameworks/Carbon.framework/Carbon"; then
+        $as_echo "#define XP_MACOSX 1" >>confdefs.h
+
+        OS_TARGET=MacOSX
+
+        if test -n "$_MACOSX_DEPLOYMENT_TARGET" ; then
+                        export MACOSX_DEPLOYMENT_TARGET=$_MACOSX_DEPLOYMENT_TARGET
+        elif test -z "$MACOSX_DEPLOYMENT_TARGET" ; then
+                                                case "${target_cpu}" in
+                powerpc*)
+                                        export MACOSX_DEPLOYMENT_TARGET=10.2
+                    ;;
+                i*86*)
+                                        export MACOSX_DEPLOYMENT_TARGET=10.4
+                    ;;
+            esac
+        fi
+
+
+        if test "$MACOS_SDK_DIR"; then
+
+            if test ! -d "$MACOS_SDK_DIR"; then
+                as_fn_error $? "SDK not found.  When using --with-macos-sdk, you must
+specify a valid SDK.  SDKs are installed when the optional cross-development
+tools are selected during the Xcode/Developer Tools installation." "$LINENO" 5
+            fi
+
+
+            CC_VERSION=`$CC -v 2>&1 | grep 'gcc version'`
+            GCC_VERSION_FULL=`echo $CC_VERSION | $PERL -pe 's/^.*gcc version ([^ ]*).*/$1/'`
+            GCC_VERSION=`echo $GCC_VERSION_FULL | $PERL -pe '(split(/\./))[0]>=4&&s/(^\d*\.\d*).*/$1/;'`
+
+            GCC_VERSION_MAJOR=`echo $GCC_VERSION_FULL | $PERL -pe 's/(^\d*).*/$1/;'`
+            if test "$GCC_VERSION_MAJOR" -lt "4" ; then
+                SDK_C_FRAMEWORK="-F${MACOS_SDK_DIR}/System/Library/Frameworks"
+                if test -d "${MACOS_SDK_DIR}/Library/Frameworks" ; then
+                    SDK_C_FRAMEWORK="$SDK_C_FRAMEWORK -F${MACOS_SDK_DIR}/Library/Frameworks"
+                fi
+
+                SDK_C_INCLUDE="-isystem ${MACOS_SDK_DIR}/usr/include/gcc/darwin/${GCC_VERSION} -isystem ${MACOS_SDK_DIR}/usr/include ${SDK_C_FRAMEWORK}"
+
+                CFLAGS="$CFLAGS -nostdinc ${SDK_C_INCLUDE}"
+
+                                CPP="$CPP -nostdinc ${SDK_C_INCLUDE}"
+
+
+                HOST_DARWIN_MAJOR=`echo "$build_os" | sed -E -e 's/^darwin([0-9]+).*$/\1/'`
+
+                if test "$HOST_DARWIN_MAJOR" -lt 9 ; then
+                                                                                                                        MACOS_SDK_LIBS="-L${MACOS_SDK_DIR}/usr/lib/gcc/darwin -L${MACOS_SDK_DIR}/usr/lib/gcc/darwin/${GCC_VERSION_FULL} -L${MACOS_SDK_DIR}/usr/lib ${SDK_C_FRAMEWORK}"
+                else
+                                                                                                                                                                                                        MACOS_SDK_LIBS="-Wl,-syslibroot,${MACOS_SDK_DIR}"
+                fi
+
+                LDFLAGS="${MACOS_SDK_LIBS} $LDFLAGS"
+                export NEXT_ROOT=$MACOS_SDK_DIR
+
+                if test -n "$CROSS_COMPILE" ; then
+                                                                                HOST_CC="NEXT_ROOT= $HOST_CC"
+                    HOST_CXX="NEXT_ROOT= $HOST_CXX"
+                fi
+            else
+                                                CFLAGS="$CFLAGS -isysroot ${MACOS_SDK_DIR}"
+
+                                CPP="$CPP -isysroot ${MACOS_SDK_DIR}"
+
+                                                                                if test "$GCC_VERSION_FULL" != "4.0.0" ; then
+                                                            LDFLAGS="$LDFLAGS -isysroot ${MACOS_SDK_DIR}"
+                else
+                                                            LDFLAGS="$LDFLAGS -Wl,-syslibroot,${MACOS_SDK_DIR}"
+                fi
+            fi
+        fi
+    fi
+    ;;
+
+*-dgux*)
+    $as_echo "#define XP_UNIX 1" >>confdefs.h
+
+    $as_echo "#define _PR_LOCAL_THREADS_ONLY 1" >>confdefs.h
+
+    $as_echo "#define SVR4 1" >>confdefs.h
+
+    $as_echo "#define SYSV 1" >>confdefs.h
+
+    $as_echo "#define DGUX 1" >>confdefs.h
+
+    $as_echo "#define _DGUX_SOURCE 1" >>confdefs.h
+
+    $as_echo "#define _POSIX4A_DRAFT6_SOURCE 1" >>confdefs.h
+
+    DSO_LDOPTS=-G
+    _OPTIMIZE_FLAGS=-O2
+    _DEBUG_FLAGS=
+    MDCPUCFG_H=_dgux.cfg
+    PR_MD_CSRCS=dgux.c
+    ;;
+
+*-freebsd*)
+    if test -z "$USE_NSPR_THREADS"; then
+        USE_PTHREADS=1
+    fi
+    $as_echo "#define XP_UNIX 1" >>confdefs.h
+
+    $as_echo "#define FREEBSD 1" >>confdefs.h
+
+    $as_echo "#define HAVE_BSD_FLOCK 1" >>confdefs.h
+
+    $as_echo "#define HAVE_SOCKLEN_T 1" >>confdefs.h
+
+    CFLAGS="$CFLAGS $(DSO_CFLAGS) -ansi -Wall"
+    MOZ_OBJFORMAT=`test -x /usr/bin/objformat && /usr/bin/objformat || echo elf`
+    if test "$MOZ_OBJFORMAT" = "elf"; then
+        DLL_SUFFIX=so
+    else
+        DLL_SUFFIX=so.1.0
+    fi
+    MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
+    DSO_CFLAGS=-fPIC
+    DSO_LDOPTS='-shared -Wl,-soname -Wl,$(notdir $@)'
+    MDCPUCFG_H=_freebsd.cfg
+    PR_MD_CSRCS=freebsd.c
+    ;;
+
+*-hpux*)
+    $as_echo "#define XP_UNIX 1" >>confdefs.h
+
+    $as_echo "#define HPUX 1" >>confdefs.h
+
+    $as_echo "#define _HPUX_SOURCE 1" >>confdefs.h
+
+    # OSF1 and HPUX report the POLLHUP event for a socket when the
+    # shutdown(SHUT_WR) operation is called for the remote end, even though
+    # the socket is still writeable. Use select(), instead of poll(), to
+    # workaround this problem.
+    $as_echo "#define _PR_POLL_WITH_SELECT 1" >>confdefs.h
+
+    $as_echo "#define _USE_BIG_FDS 1" >>confdefs.h
+
+    DSO_LDOPTS='-b +h $(notdir $@)'
+    PR_MD_CSRCS=hpux.c
+    if test "$OS_TEST" = "ia64"; then
+        DLL_SUFFIX=so
+        DSO_LDOPTS="$DSO_LDOPTS +b '\$\$ORIGIN'"
+        CPU_ARCH_TAG=_$OS_TEST
+        if test -z "$USE_64"; then
+            COMPILER_TAG=_32
+        fi
+        PR_MD_ASFILES=os_HPUX_ia64.s
+    else
+        $as_echo "#define hppa 1" >>confdefs.h
+
+        DLL_SUFFIX=sl
+        PR_MD_ASFILES=os_HPUX.s
+    fi
+    if test -n "$USE_64"; then
+        MDCPUCFG_H=_hpux64.cfg
+    else
+        MDCPUCFG_H=_hpux32.cfg
+    fi
+    if test -z "$GNU_CC"; then
+        CC="$CC -Ae"
+        CXX="$CXX -ext"
+        DSO_CFLAGS=+Z
+    else
+        DSO_CFLAGS=-fPIC
+        ASFLAGS="$ASFLAGS -x assembler-with-cpp"
+    fi
+
+    if test -n "$MOZILLA_CLIENT"; then
+        DEFAULT_IMPL_STRATEGY=_EMU
+    fi
+
+    if echo "$OS_RELEASE" | grep ^A.09 >/dev/null; then
+        $as_echo "#define _PR_NEED_H_ERRNO 1" >>confdefs.h
+
+        $as_echo "#define HPUX9 1" >>confdefs.h
+
+        DEFAULT_IMPL_STRATEGY=_EMU
+       USE_NSPR_THREADS=1
+    fi
+
+    if echo "$OS_RELEASE" | egrep '^(A.09|B.10)' >/dev/null; then
+        $as_echo "#define _PR_NO_LARGE_FILES 1" >>confdefs.h
+
+    fi
+
+    if echo "$OS_RELEASE" | egrep '^(B.10.10|B.10.20)' >/dev/null; then
+        $as_echo "#define _PR_NEED_H_ERRNO 1" >>confdefs.h
+
+    fi
+
+    if echo "$OS_RELEASE" | egrep '^(B.10.10|B.10.20)' >/dev/null; then
+        $as_echo "#define HAVE_INT_LOCALTIME_R 1" >>confdefs.h
+
+    fi
+
+    if echo "$OS_RELEASE" | egrep '^(B.10.30|B.11)' >/dev/null; then
+        $as_echo "#define HAVE_POINTER_LOCALTIME_R 1" >>confdefs.h
+
+    fi
+
+    # HP-UX 11i v2 (B.11.23) or higher
+
+    case "$OS_RELEASE" in
+    [C-Z]*|B.[2-9]*|B.1[2-9]*|B.11.[3-9]*|B.11.2[3-9]*)
+        USE_IPV6=1
+        ;;
+    esac
+
+
+    if test "$OS_RELEASE" = "B.10.01"; then
+        $as_echo "#define HPUX10 1" >>confdefs.h
+
+        DEFAULT_IMPL_STRATEGY=_EMU
+    fi
+
+    if test "$OS_RELEASE" = "B.10.10"; then
+        $as_echo "#define HPUX10 1" >>confdefs.h
+
+        $as_echo "#define HPUX10_10 1" >>confdefs.h
+
+        DEFAULT_IMPL_STRATEGY=_PTH
+    fi
+
+    if test "$OS_RELEASE" = "B.10.20"; then
+        $as_echo "#define HPUX10 1" >>confdefs.h
+
+        $as_echo "#define HPUX10_20 1" >>confdefs.h
+
+        if test -z "$GNU_CC"; then
+            CFLAGS="$CFLAGS +DAportable +DS1.1"
+            CXXFLAGS="$CXXFLAGS +DAportable +DS1.1"
+        fi
+        DEFAULT_IMPL_STRATEGY=_PTH
+    fi
+
+    if test "$OS_RELEASE" = "B.10.30"; then
+        $as_echo "#define HPUX10 1" >>confdefs.h
+
+        $as_echo "#define HPUX10_30 1" >>confdefs.h
+
+        if test -z "$GNU_CC"; then
+            CFLAGS="$CFLAGS +DAportable +DS1.1"
+            CXXFLAGS="$CXXFLAGS +DAportable +DS1.1"
+        fi
+        DEFAULT_IMPL_STRATEGY=_PTH
+    fi
+
+    if echo "$OS_RELEASE" | grep ^B.11 >/dev/null; then
+        $as_echo "#define HPUX10 1" >>confdefs.h
+
+        $as_echo "#define HPUX11 1" >>confdefs.h
+
+        $as_echo "#define _LARGEFILE64_SOURCE 1" >>confdefs.h
+
+        $as_echo "#define _PR_HAVE_OFF64_T 1" >>confdefs.h
+
+        $as_echo "#define HAVE_FCNTL_FILE_LOCKING 1" >>confdefs.h
+
+        if test -z "$GNU_CC"; then
+            if test -z "$USE_64"; then
+                if test "$OS_TEST" = "ia64"; then
+                    CFLAGS="$CFLAGS +DD32"
+                    CXXFLAGS="$CXXFLAGS +DD32"
+                else
+                    CFLAGS="$CFLAGS +DAportable +DS2.0"
+                    CXXFLAGS="$CXXFLAGS +DAportable +DS2.0"
+                fi
+            else
+                if test "$OS_TEST" = "ia64"; then
+                    CFLAGS="$CFLAGS +DD64"
+                    CXXFLAGS="$CXXFLAGS +DD64"
+                else
+                    CFLAGS="$CFLAGS +DA2.0W +DS2.0"
+                    CXXFLAGS="$CXXFLAGS +DA2.0W +DS2.0"
+                fi
+            fi
+        fi
+        DEFAULT_IMPL_STRATEGY=_PTH
+    fi
+
+    if test "$DEFAULT_IMPL_STRATEGY" = "_EMU"; then
+        USE_NSPR_THREADS=1
+        USE_PTHREADS=
+        USE_USER_PTHREADS=
+    elif test "$DEFAULT_IMPL_STRATEGY" = "_PTH"; then
+        USE_PTHREADS=1
+        if test "$USE_NSPR_THREADS"; then
+            USE_PTHREADS=
+        fi
+        if test "$USE_USER_PTHREADS"; then
+            USE_PTHREADS=
+        fi
+    fi
+    ;;
+
+*-irix*)
+    $as_echo "#define XP_UNIX 1" >>confdefs.h
+
+    $as_echo "#define IRIX 1" >>confdefs.h
+
+    $as_echo "#define SVR4 1" >>confdefs.h
+
+    $as_echo "#define _SGI_MP_SOURCE 1" >>confdefs.h
+
+    $as_echo "#define HAVE_FCNTL_FILE_LOCKING 1" >>confdefs.h
+
+    PR_MD_CSRCS=irix.c
+    PR_MD_ASFILES=os_Irix.s
+    MKSHLIB='$(LD) $(DSO_LDOPTS) -rdata_shared -shared -soname $(notdir $@) -o $@'
+    STRIP="$STRIP -f"
+    RESOLVE_LINK_SYMBOLS=1
+    if test -n "$USE_64"; then
+        MDCPUCFG_H=_irix64.cfg
+    else
+        MDCPUCFG_H=_irix32.cfg
+    fi
+    case "${target_os}" in
+    irix6*)
+        $as_echo "#define IRIX6 1" >>confdefs.h
+
+        USE_PTHREADS=1
+        USE_N32=1
+        COMPILER_TAG=_n32
+        IMPL_STRATEGY=_PTH
+        ;;
+    irix5*)
+        $as_echo "#define IRIX5 1" >>confdefs.h
+
+        USE_NSPR_THREADS=1
+        ;;
+    *)
+        USE_PTHREADS=1
+        USE_N32=1
+        ;;
+    esac
+    if test "$GNU_CC"; then
+                                                                   AS='$(CC) -Wp,-P -x assembler-with-cpp -D_ASM -mips2 $(INCLUDES)'
+           CFLAGS="$CFLAGS -Wall -Wno-format"
+           _OPTIMIZE_FLAGS="-O6"
+    else
+           if test -n "$USE_N32"; then
+               AS='as -D_ASM $(INCLUDES) -n32'
+           else
+               AS='as -D_ASM $(INCLUDES)'
+           fi
+           CFLAGS="$CFLAGS -fullwarn -xansi"
+           if test "$USE_N32"; then
+               _OPTIMIZE_FLAGS="-O -OPT:Olimit=4000"
+           else
+               _OPTIMIZE_FLAGS="-O -Olimit 4000"
+           fi
+           if test "$USE_MDUPDATE"; then
+                CFLAGS="$CFLAGS -MDupdate \$(DEPENDENCIES)"
+           fi
+           case "${target}" in
+           *-irix6.*)
+               CFLAGS="$CFLAGS -multigot"
+               DSO_LDOPTS="-no_unresolved"
+               if test "$USE_N32"; then
+                       CFLAGS="$CFLAGS -n32 -woff 1209"
+                       DSO_LDOPTS="$DSO_LDOPTS -n32"
+               else
+                       if test "$USE_64"; then
+                           CFLAGS="$CFLAGS -64"
+                       else
+                           CFLAGS="$CFLAGS -32"
+                       fi
+               fi
+               ;;
+           *)
+               CFLAGS="$CFLAGS -xgot"
+               ;;
+           esac
+    fi
+    if test "${target_os}" = "irix5.3"; then
+           $as_echo "#define IRIX5_3 1" >>confdefs.h
+
+    fi
+    case "${target_os}" in
+       irix6.5)
+           if test -z "$GNU_CC"; then
+                   CFLAGS="$CFLAGS -mips3"
+           fi
+           $as_echo "#define _PR_HAVE_GETPROTO_R 1" >>confdefs.h
+
+           $as_echo "#define _PR_HAVE_GETPROTO_R_POINTER 1" >>confdefs.h
+
+           $as_echo "#define _PR_HAVE_SGI_PRDA_PROCMASK 1" >>confdefs.h
+
+           ;;
+       irix5*)
+           ;;
+       *)
+           $as_echo "#define _PR_HAVE_SGI_PRDA_PROCMASK 1" >>confdefs.h
+
+           ;;
+       esac
+    ;;
+
+*-linux*|*-gnu*|*-k*bsd*-gnu|*-android*|*-linuxandroid*)
+    if test -z "$USE_NSPR_THREADS"; then
+        USE_PTHREADS=1
+        IMPL_STRATEGY=_PTH
+    fi
+    $as_echo "#define XP_UNIX 1" >>confdefs.h
+
+    $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
+
+    $as_echo "#define HAVE_FCNTL_FILE_LOCKING 1" >>confdefs.h
+
+    case "${target}" in
+    *-android*|*-linuxandroid*)
+        OS_TARGET=Android
+        $as_echo "#define LINUX 1" >>confdefs.h
+
+        ;;
+    *-linux*)
+        $as_echo "#define LINUX 1" >>confdefs.h
+
+        ;;
+    esac
+    CFLAGS="$CFLAGS -Wall"
+    CXXFLAGS="$CXXFLAGS -Wall"
+    MDCPUCFG_H=_linux.cfg
+    PR_MD_CSRCS=linux.c
+    MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
+    DSO_CFLAGS=-fPIC
+    DSO_LDOPTS='-shared -Wl,-soname -Wl,$(notdir $@)'
+    _OPTIMIZE_FLAGS=-O2
+    _DEBUG_FLAGS="-g -fno-inline"  # most people on linux use gcc/gdb, and that
+                                   # combo is not yet good at debugging inlined
+                                   # functions (even when using DWARF2 as the
+                                   # debugging format)
+    COMPILER_TAG=_glibc
+    if echo "$OS_TEST" | grep -c 86 >/dev/null; then
+        CPU_ARCH=x86
+    else
+        CPU_ARCH=$OS_TEST
+    fi
+    CPU_ARCH_TAG=_${CPU_ARCH}
+    case "${target_cpu}" in
+    alpha)
+        $as_echo "#define _ALPHA_ 1" >>confdefs.h
+
+        $as_echo "#define __alpha 1" >>confdefs.h
+
+        CFLAGS="$CFLAGS -mieee"
+        CXXFLAGS="$CXXFLAGS -mieee"
+        ;;
+    i*86)
+        $as_echo "#define i386 1" >>confdefs.h
+
+        PR_MD_ASFILES=os_Linux_x86.s
+        ;;
+    ia64)
+        PR_MD_ASFILES=os_Linux_ia64.s
+        ;;
+    x86_64)
+        if test -n "$USE_64"; then
+            PR_MD_ASFILES=os_Linux_x86_64.s
+        elif test -n "$USE_X32"; then
+            PR_MD_ASFILES=os_Linux_x86_64.s
+            CC="$CC -mx32"
+            CXX="$CXX -mx32"
+        else
+            $as_echo "#define i386 1" >>confdefs.h
+
+            PR_MD_ASFILES=os_Linux_x86.s
+            CC="$CC -m32"
+            CXX="$CXX -m32"
+        fi
+        ;;
+    ppc|powerpc)
+        PR_MD_ASFILES=os_Linux_ppc.s
+        ;;
+    powerpc64)
+        if test -n "$USE_64"; then
+            CC="$CC -m64"
+            CXX="$CXX -m64"
+        else
+            PR_MD_ASFILES=os_Linux_ppc.s
+        fi
+        ;;
+    m68k)
+        CFLAGS="$CFLAGS -m68020-60"
+        CXXFLAGS="$CXXFLAGS -m68020-60"
+        ;;
+    esac
+    ;;
+
+*-mingw*|*-msys*|*-cygwin*|*-mks*)
+    $as_echo "#define XP_PC 1" >>confdefs.h
+
+    $as_echo "#define WIN32 1" >>confdefs.h
+
+    PR_MD_ARCH_DIR=windows
+    RESOLVE_LINK_SYMBOLS=1
+
+    if test -n "$GNU_CC"; then
+        CC="$CC -mwindows"
+        CXX="$CXX -mwindows"
+        DLL_SUFFIX=dll
+        MKSHLIB='$(CC) -shared -Wl,--export-all-symbols -Wl,--out-implib -Wl,$(IMPORT_LIBRARY) $(DLLBASE) -o $(subst $(OBJDIR)/,,$(SHARED_LIBRARY))'
+        RC=$WINDRES
+        # Use temp file for windres (bug 213281)
+        RCFLAGS='-O coff --use-temp-file'
+    else
+        CC=cl
+        CXX=cl
+        LD=link
+        AR='lib -NOLOGO -OUT:"$@"'
+        AR_FLAGS=
+        RANLIB='echo not_ranlib'
+        STRIP='echo not_strip'
+        RC=rc.exe
+        GARBAGE='$(OBJDIR)/vc20.pdb $(OBJDIR)/vc40.pdb'
+        OBJ_SUFFIX=obj
+        LIB_SUFFIX=lib
+        DLL_SUFFIX=dll
+
+        # Determine compiler version
+
+        _MSVC_VER_FILTER='s|.* \([0-9]\+\.[0-9]\+\.[0-9]\+\(\.[0-9]\+\)\?\).*|\1|p'
+
+        CC_VERSION=`"${CC}" -v 2>&1 | sed -ne "$_MSVC_VER_FILTER"`
+        _CC_MAJOR_VERSION=`echo ${CC_VERSION} | awk -F\. '{ print $1 }'`
+        _CC_MINOR_VERSION=`echo ${CC_VERSION} | awk -F\. '{ print $2 }'`
+        _CC_RELEASE=`echo ${CC_VERSION} | awk -F\. '{ print $3 }'`
+        _CC_BUILD=`echo ${CC_VERSION} | awk -F\. '{ print $4 }'`
+        MSC_VER=${_CC_MAJOR_VERSION}${_CC_MINOR_VERSION}
+
+        if test "$_CC_MAJOR_VERSION" -eq "14"; then
+                                            if test $_CC_RELEASE -gt 50727; then
+              _USE_DYNAMICBASE=1
+           elif test $_CC_BUILD -ge 762; then
+              _USE_DYNAMICBASE=1
+           fi
+           $as_echo "#define _CRT_SECURE_NO_DEPRECATE 1" >>confdefs.h
+
+           $as_echo "#define _CRT_NONSTDC_NO_DEPRECATE 1" >>confdefs.h
+
+        elif test $_CC_MAJOR_VERSION -ge 15; then
+           _USE_DYNAMICBASE=1
+           $as_echo "#define _CRT_SECURE_NO_WARNINGS 1" >>confdefs.h
+
+           $as_echo "#define _CRT_NONSTDC_NO_WARNINGS 1" >>confdefs.h
+
+        fi
+
+        if test -n "$_USE_DYNAMICBASE"; then
+           DLLFLAGS="$DLLFLAGS -DYNAMICBASE"
+        fi
+
+        # Ensure that mt is Microsoft (R) Manifest Tool and not magnetic
+        # tape manipulation utility (or something else)
+        if test "$MSC_VER" -ge "1400"; then
+
+            _MSMT_VER_FILTER='s|.* \([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*|\1|p'
+
+
+            MSMT_TOOL=`mt 2>&1|grep 'Microsoft (R) Manifest Tool'`
+            if test -n "$MSMT_TOOL"; then
+                MSMANIFEST_TOOL_VERSION=`echo ${MSMT_TOOL}|sed -ne "$_MSMT_VER_FILTER"`
+                if test -z "$MSMANIFEST_TOOL_VERSION"; then
+                    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unknown version of the Microsoft (R) Manifest Tool." >&5
+$as_echo "$as_me: WARNING: Unknown version of the Microsoft (R) Manifest Tool." >&2;}
+                fi
+                MT=mt
+                unset MSMT_TOOL
+            else
+                as_fn_error $? "Microsoft (R) Manifest Tool must be in your \$PATH." "$LINENO" 5
+            fi
+        fi
+
+        CFLAGS="$CFLAGS -W3 -nologo -GF -Gy"
+        DLLFLAGS="$DLLFLAGS -OUT:\"\$@\""
+        _DEBUG_FLAGS=-Zi
+        _OPTIMIZE_FLAGS=-O2
+
+        PROFILE_GEN_CFLAGS="-GL"
+        PROFILE_GEN_LDFLAGS="-LTCG:PGINSTRUMENT"
+        PROFILE_USE_CFLAGS="-GL -wd4624 -wd4952"
+        PROFILE_USE_LDFLAGS="-LTCG:PGUPDATE"
+
+        if test "$MSC_VER" -ge "1800"; then
+                                                CFLAGS="$CFLAGS -FS"
+                                    PROFILE_GEN_CFLAGS="$PROFILE_GEN_CFLAGS -Gw"
+            PROFILE_USE_CFLAGS="$PROFILE_USE_CFLAGS -Gw"
+        fi
+
+        if test -z "$MOZ_OPTIMIZE"; then
+            CFLAGS="$CFLAGS -Od"
+        fi
+
+        if test "$USE_DEBUG_RTL" = 1; then
+            CFLAGS="$CFLAGS -MDd"
+        else
+            CFLAGS="$CFLAGS -MD"
+        fi
+
+        if test -n "$MOZ_DEBUG"; then
+            $as_echo "#define _DEBUG 1" >>confdefs.h
+
+        else
+            DEFINES="$DEFINES -U_DEBUG"
+        fi
+
+        if test -n "$MOZ_DEBUG_SYMBOLS"; then
+            if test -n "$MOZ_OPTIMIZE"; then
+                DLLFLAGS="$DLLFLAGS -DEBUG -OPT:REF"
+                LDFLAGS="$LDFLAGS -DEBUG -OPT:REF"
+            else
+                DLLFLAGS="$DLLFLAGS -DEBUG"
+                LDFLAGS="$LDFLAGS -DEBUG"
+            fi
+        fi
+
+        OS_DLLFLAGS="-nologo -DLL -SUBSYSTEM:WINDOWS"
+        if test "$MSC_VER" -le "1200" -a -z "$MOZ_DEBUG_SYMBOLS"; then
+            OS_DLLFLAGS="$OS_DLLFLAGS -PDB:NONE"
+        fi
+
+        if test "$OS_TARGET" = "WINNT"; then
+            CFLAGS="$CFLAGS -GT"
+            LIBNSPR='$(dist_libdir)/libnspr$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
+            LIBPLC='$(dist_libdir)/libplc$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
+        else
+            LIBNSPR='$(dist_libdir)/nspr$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
+            LIBPLC='$(dist_libdir)/plc$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
+        fi
+    fi # GNU_CC
+
+    if test -n "$USE_STATIC_TLS"; then
+        $as_echo "#define _PR_USE_STATIC_TLS 1" >>confdefs.h
+
+    fi
+
+    if test "$OS_TARGET" = "WINNT"; then
+        $as_echo "#define WINNT 1" >>confdefs.h
+
+    else
+        $as_echo "#define WIN95 1" >>confdefs.h
+
+        # undefine WINNT as some versions of mingw gcc define it by default
+        DEFINES="$DEFINES -UWINNT"
+        $as_echo "#define _PR_GLOBAL_THREADS_ONLY 1" >>confdefs.h
+
+    fi
+
+    if test "$CPU_ARCH" = "x86"; then
+        CPU_ARCH_TAG=
+    else
+        CPU_ARCH_TAG=$CPU_ARCH
+    fi
+
+    if test "$USE_DEBUG_RTL" = 1; then
+        OBJDIR_SUFFIX=OBJD
+    fi
+
+    case "$OS_TARGET" in
+    WINNT)
+           MDCPUCFG_H=_winnt.cfg
+           ;;
+    WIN95)
+           MDCPUCFG_H=_win95.cfg
+           ;;
+    *)
+           as_fn_error $? "Missing OS_TARGET for ${target}.  Use --enable-win32-target to set." "$LINENO" 5
+       ;;
+    esac
+
+    case "$target_cpu" in
+    i*86)
+       if test -n "$USE_64"; then
+           $as_echo "#define _AMD64_ 1" >>confdefs.h
+
+       else
+           $as_echo "#define _X86_ 1" >>confdefs.h
+
+       fi
+        ;;
+    x86_64)
+           $as_echo "#define _AMD64_ 1" >>confdefs.h
+
+           USE_64=1
+           ;;
+    ia64)
+           $as_echo "#define _IA64_ 1" >>confdefs.h
+
+           USE_64=1
+           ;;
+    *)
+           $as_echo "#define _CPU_ARCH_NOT_DEFINED 1" >>confdefs.h
+
+           ;;
+    esac
+    ;;
+
+*-netbsd*)
+    $as_echo "#define XP_UNIX 1" >>confdefs.h
+
+    $as_echo "#define NETBSD 1" >>confdefs.h
+
+    $as_echo "#define HAVE_BSD_FLOCK 1" >>confdefs.h
+
+    if test -z "$USE_NSPR_THREADS"; then
+        USE_PTHREADS=1
+    fi
+    MDCPUCFG_H=_netbsd.cfg
+    PR_MD_CSRCS=netbsd.c
+
+    DSO_CFLAGS='-fPIC -DPIC'
+    CFLAGS="$CFLAGS -ansi -Wall"
+    CXXFLAGS="$CXXFLAGS -ansi -Wall"
+    MKSHLIB='$(CC) -o $@ $(DSO_LDOPTS)'
+
+    if test -z "$OBJECT_FMT"; then
+        if echo __ELF__ | ${CC-cc} -E - | grep -q __ELF__ 2>/dev/null; then
+            OBJECT_FMT=a.out
+            DLL_SUFFIX=so.1.0
+            DSO_LDOPTS='-shared'
+        else
+            OBJECT_FMT=ELF
+            DLL_SUFFIX=so
+            DSO_LDOPTS='-shared -Wl,-soname,$(notdir $@)'
+        fi
+    fi
+
+    if test "$LIBRUNPATH"; then
+        DSO_LDOPTS="$DSO_LDOPTS -Wl,-R$LIBRUNPATH"
+    fi
+    ;;
+
+*-nto*)
+    $as_echo "#define XP_UNIX 1" >>confdefs.h
+
+    $as_echo "#define NTO 1" >>confdefs.h
+
+    $as_echo "#define _QNX_SOURCE 1" >>confdefs.h
+
+    $as_echo "#define HAVE_POINTER_LOCALTIME_R 1" >>confdefs.h
+
+    MDCPUCFG_H=_nto.cfg
+    PR_MD_CSRCS=nto.c
+    MKSHLIB='$(CC) $(DSO_LDOPTS) -Wl,-soname -Wl,$(notdir $@) -o $@'
+    DSO_CFLAGS=-fPIC
+    DSO_LDOPTS=-shared
+    OS_LIBS="$OS_LIBS -lsocket"
+    _OPTIMIZE_FLAGS="-O1"
+    _DEBUG_FLAGS="-gstabs"
+       ;;
+
+*-openbsd*)
+    $as_echo "#define XP_UNIX 1" >>confdefs.h
+
+    $as_echo "#define OPENBSD 1" >>confdefs.h
+
+    $as_echo "#define HAVE_BSD_FLOCK 1" >>confdefs.h
+
+    $as_echo "#define HAVE_SOCKLEN_T 1" >>confdefs.h
+
+    CFLAGS="$CFLAGS -ansi -Wall"
+    CXXFLAGS="$CXXFLAGS -ansi -Wall"
+    DLL_SUFFIX=so.1.0
+    DSO_CFLAGS=-fPIC
+    MDCPUCFG_H=_openbsd.cfg
+    PR_MD_CSRCS=openbsd.c
+    OS_LIBS="-lc"
+    if test -z "$USE_NSPR_THREADS"; then
+        USE_PTHREADS=1
+    fi
+    DSO_LDOPTS='-shared -fPIC'
+    MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
+    ;;
+
+*-osf*)
+    SHELL_OVERRIDE="SHELL              = /usr/bin/ksh"
+    $as_echo "#define XP_UNIX 1" >>confdefs.h
+
+    $as_echo "#define OSF1 1" >>confdefs.h
+
+    $as_echo "#define _REENTRANT 1" >>confdefs.h
+
+    # OSF1 and HPUX report the POLLHUP event for a socket when the
+    # shutdown(SHUT_WR) operation is called for the remote end, even though
+    # the socket is still writeable. Use select(), instead of poll(), to
+    # workaround this problem.
+    $as_echo "#define _PR_POLL_WITH_SELECT 1" >>confdefs.h
+
+
+    if echo "$OS_RELEASE" | egrep -c '(V2.0|V3.2)' 2>/dev/null ; then
+        USE_NSPR_THREADS=1
+    fi
+
+    if test -z "$GNU_CC"; then
+        CC="$CC -std1 -ieee_with_inexact"
+        if test "$OS_RELEASE" != "V2.0"; then
+            CC="$CC -readonly_strings"
+        fi
+        _OPTIMIZE_FLAGS="$_OPTIMIZE_FLAGS -Olimit 4000"
+        ac_fn_c_check_header_mongrel "$LINENO" "machine/builtins.h" "ac_cv_header_machine_builtins_h" "$ac_includes_default"
+if test "x$ac_cv_header_machine_builtins_h" = xyes; then :
+  $as_echo "#define OSF1_HAVE_MACHINE_BUILTINS_H 1" >>confdefs.h
+
+fi
+
+
+    else
+        CFLAGS="$CFLAGS -mieee"
+        CXXFLAGS="$CXXFLAGS -mieee"
+    fi
+
+    if echo $OS_RELEASE | egrep -c '(V2.0|V3.2)' 2>/dev/null; then
+        $as_echo "#define HAVE_INT_LOCALTIME_R 1" >>confdefs.h
+
+    else
+        $as_echo "#define HAVE_FCNTL_FILE_LOCKING 1" >>confdefs.h
+
+        $as_echo "#define HAVE_POINTER_LOCALTIME_R 1" >>confdefs.h
+
+    fi
+    if echo $OS_RELEASE | grep -c V4.0 >/dev/null; then
+        $as_echo "#define OSF1V4_MAP_PRIVATE_BUG 1" >>confdefs.h
+
+    fi
+    DSO_LDOPTS='-shared -all -expect_unresolved "*" -soname $(notdir $@)'
+    MDCPUCFG_H=_osf1.cfg
+    PR_MD_CSRCS=osf1.c
+    ;;
+
+*-qnx*)
+    $as_echo "#define XP_UNIX 1" >>confdefs.h
+
+    $as_echo "#define QNX 1" >>confdefs.h
+
+    $as_echo "#define _PR_NEED_H_ERRNO 1" >>confdefs.h
+
+    USE_NSPR_THREADS=1
+    MDCPUCFG_H=_qnx.cfg
+    PR_MD_CSRCS=qnx.c
+    ;;
+
+*-riscos*)
+    $as_echo "#define XP_UNIX 1" >>confdefs.h
+
+    $as_echo "#define RISCOS 1" >>confdefs.h
+
+    $as_echo "#define _PR_NEED_H_ERRNO 1" >>confdefs.h
+
+    USE_PTHREADS=1
+    MDCPUCFG_H=_riscos.cfg
+    PR_MD_CSRCS=riscos.c
+    DSO_CFLAGS=-fPIC
+    DSO_LDOPTS='-shared -Wl,-soname -Wl,$(notdir $@)'
+    MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
+    ;;
+
+*-*-sco*)
+    $as_echo "#define XP_UNIX 1" >>confdefs.h
+
+    $as_echo "#define SCO 1" >>confdefs.h
+
+    $as_echo "#define sco 1" >>confdefs.h
+
+    $as_echo "#define SYSV 1" >>confdefs.h
+
+    $as_echo "#define _SVID3 1" >>confdefs.h
+
+    $as_echo "#define _PR_NEED_H_ERRNO 1" >>confdefs.h
+
+    CC='cc -b elf -KPIC'
+    CXX='$(NSDEPTH)/build/hcpp CC +.cpp +w'
+    USE_NSPR_THREADS=1
+    CPU_ARCH=x86
+    DSO_LDOPTS='-b elf -G'
+    MDCPUCFG_H=_scoos.cfg
+    PR_MD_SRCS=scoos.c
+    ;;
+
+*-solaris*)
+    if test -z "$USE_NSPR_THREADS"; then
+        USE_PTHREADS=1
+    fi
+    $as_echo "#define XP_UNIX 1" >>confdefs.h
+
+    $as_echo "#define SVR4 1" >>confdefs.h
+
+    $as_echo "#define SYSV 1" >>confdefs.h
+
+    $as_echo "#define __svr4 1" >>confdefs.h
+
+    $as_echo "#define __svr4__ 1" >>confdefs.h
+
+    $as_echo "#define SOLARIS 1" >>confdefs.h
+
+    $as_echo "#define HAVE_FCNTL_FILE_LOCKING 1" >>confdefs.h
+
+    CPU_ARCH=`uname -p`
+    MDCPUCFG_H=_solaris.cfg
+    PR_MD_CSRCS=solaris.c
+    LD=/usr/ccs/bin/ld
+    MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
+    RESOLVE_LINK_SYMBOLS=1
+    case "${OS_RELEASE}" in
+    5.8|5.9)
+        ;;
+    *)
+        # It is safe to use the -Bdirect linker flag on Solaris 10 or later.
+        USE_B_DIRECT=1
+        ;;
+    esac
+    if test -n "$GNU_CC"; then
+        DSO_CFLAGS=-fPIC
+        if `$CC -print-prog-name=ld` -v 2>&1 | grep -c GNU >/dev/null; then
+            GCC_USE_GNU_LD=1
+        fi
+        DSO_LDOPTS='-shared -Wl,-h,$(notdir $@),-z,combreloc,-z,defs,-z,ignore'
+        if test -n "$USE_B_DIRECT"; then
+            DSO_LDOPTS="$DSO_LDOPTS,-Bdirect"
+        fi
+    else
+        DSO_CFLAGS=-KPIC
+        DSO_LDOPTS='-G -h $(notdir $@) -z combreloc -z defs -z ignore'
+        if test -n "$USE_B_DIRECT"; then
+            DSO_LDOPTS="$DSO_LDOPTS -Bdirect"
+        fi
+    fi
+    if test -n "$GNU_CC"; then
+        CFLAGS="$CFLAGS -Wall"
+        CXXFLAGS="$CXXFLAGS -Wall"
+        if test -n "$USE_MDUPDATE"; then
+            CFLAGS="$CFLAGS -MDupdate \$(DEPENDENCIES)"
+            CXXFLAGS="$CXXFLAGS -MDupdate \$(DEPENDENCIES)"
+        fi
+        GCC_AS=`$CC -print-prog-name=as`
+        if test "`echo | $GCC_AS -v 2>&1 | grep -c GNU`" != "0"; then
+            GNU_AS=1
+        fi
+    else
+        CFLAGS="$CFLAGS -xstrconst"
+        CXXFLAGS="$CXXFLAGS -Qoption cg -xstrconst -features=tmplife"
+        if test -z "$MOZ_OPTIMIZE"; then
+            CFLAGS="$CFLAGS -xs"
+            CXXFLAGS="$CXXFLAGS -xs"
+        fi
+        _OPTIMIZE_FLAGS=-xO4
+    fi
+    if test -z "$GNU_AS"; then
+        ASFLAGS="$ASFLAGS -Wa,-P"
+    fi
+    if test -n "$USE_64"; then
+        if test -n "$GNU_CC"; then
+            CC="$CC -m64"
+            CXX="$CXX -m64"
+        else
+            if test "$OS_TEST" = "i86pc"; then
+                CC="$CC -xarch=amd64"
+                CXX="$CXX -xarch=amd64"
+            else
+                CC="$CC -xarch=v9"
+                CXX="$CXX -xarch=v9"
+            fi
+        fi
+    fi
+    if test "$OS_TEST" = "i86pc"; then
+        if test -z "$USE_64"; then
+            $as_echo "#define i386 1" >>confdefs.h
+
+        fi
+        CPU_ARCH_TAG=_$OS_TEST
+        # The default debug format, DWARF (-g), is not supported by gcc
+        # on i386-ANY-sysv4/solaris, but the stabs format is.  It is
+        # assumed that the Solaris assembler /usr/ccs/bin/as is used.
+        # If your gcc uses GNU as, you do not need the -Wa,-s option.
+        if test -n "$MOZ_DEBUG" && test -n "$GNU_CC"; then
+            _DEBUG_FLAGS=-gstabs
+            if test -z "$GNU_AS"; then
+                _DEBUG_FLAGS="$_DEBUG_FLAGS -Wa,-s"
+            fi
+        fi
+    fi
+    case "${target_os}" in
+    solaris2.3*)
+        $as_echo "#define _PR_NO_LARGE_FILES 1" >>confdefs.h
+
+        ;;
+    solaris2.4*)
+        $as_echo "#define _PR_NO_LARGE_FILES 1" >>confdefs.h
+
+        ;;
+    solaris2.5*)
+        $as_echo "#define SOLARIS2_5 1" >>confdefs.h
+
+        ;;
+    *)
+        $as_echo "#define _PR_HAVE_OFF64_T 1" >>confdefs.h
+
+        # The lfcompile64(5) man page on Solaris 2.6 says:
+        #     For applications that do not wish to conform to the POSIX or
+        #     X/Open  specifications,  the  64-bit transitional interfaces
+        #     are available by default.  No compile-time flags need to  be
+        #     set.
+        # But gcc 2.7.2.x fails to define _LARGEFILE64_SOURCE by default.
+        # The native compiler, gcc 2.8.x, and egcs don't have this problem.
+        if test -n "$GNU_CC"; then
+            $as_echo "#define _LARGEFILE64_SOURCE 1" >>confdefs.h
+
+        fi
+        ;;
+    esac
+    case "${target_os}" in
+    solaris2.3*)
+        ;;
+    solaris2.4*)
+        ;;
+    solaris2.5*)
+        ;;
+    solaris2.6*)
+        ;;
+    solaris2.7*)
+        ;;
+    *)
+        # Solaris 8 or higher has IPv6.
+        $as_echo "#define _PR_INET6 1" >>confdefs.h
+
+        ;;
+    esac
+    if test "$CPU_ARCH" = "sparc"; then
+        # 64-bit Solaris SPARC requires V9 architecture, so the following
+        # is not needed.
+        if test -z "$USE_64"; then
+            ULTRASPARC_LIBRARY=nspr_flt
+        fi
+    fi
+    # Purify requires that binaries linked against nspr also
+    # be linked against -lrt (or -lposix4) so add it to OS_LIBS
+    _rev=`uname -r`
+    _librt=`echo $_rev 5.6 | awk '{ if ($1 > $2) print "-lrt"; else print "-lposix4" }'`
+    OS_LIBS="$OS_LIBS $_librt"
+    ;;
+
+*-sco-sysv5*)
+    $as_echo "#define XP_UNIX 1" >>confdefs.h
+
+    $as_echo "#define UNIXWARE 1" >>confdefs.h
+
+    $as_echo "#define SVR4 1" >>confdefs.h
+
+    $as_echo "#define SYSV 1" >>confdefs.h
+
+    USE_NSPR_THREADS=1
+    if echo $OS_RELEASE | grep -c 2.1 2>/dev/null; then
+        $as_echo "#define _PR_NO_LARGE_FILES 1" >>confdefs.h
+
+        CC='$(NSDEPTH)/build/hcc cc'
+        CXX='$(NSDEPTH)/build/hcpp CC'
+        MDCPUCFG_H=_unixware.cfg
+    else
+        $as_echo "#define _LARGEFILE64_SOURCE 1" >>confdefs.h
+
+        $as_echo "#define _PR_HAVE_OFF64_T 1" >>confdefs.h
+
+        $as_echo "#define _PR_HAVE_SOCKADDR_LEN 1" >>confdefs.h
+
+        MDCPUCFG_H=_unixware7.cfg
+    fi
+    PR_MD_CSRCS=unixware.c
+    DSO_LDOPTS=-G
+    CPU_ARCH=x86
+    ;;
+
+*-symbian*)
+
+# Check whether --with-symbian-sdk was given.
+if test "${with_symbian_sdk+set}" = set; then :
+  withval=$with_symbian_sdk; SYMBIAN_SDK_DIR=$withval
+fi
+
+
+    echo -----------------------------------------------------------------------------
+    echo Building with Symbian SDK in: $SYMBIAN_SDK_DIR
+    echo -----------------------------------------------------------------------------
+
+    $as_echo "#define XP_UNIX 1" >>confdefs.h
+
+    $as_echo "#define SYMBIAN 1" >>confdefs.h
+
+    $as_echo "#define __arm__ 1" >>confdefs.h
+
+    $as_echo "#define __SYMBIAN32__ 1" >>confdefs.h
+
+    $as_echo "#define _UNICODE 1" >>confdefs.h
+
+    $as_echo "#define NDEBUG 1" >>confdefs.h
+
+    $as_echo "#define __SUPPORT_CPP_EXCEPTIONS__ 1" >>confdefs.h
+
+    $as_echo "#define MOZ_STDERR_TO_STDOUT 1" >>confdefs.h
+
+    $as_echo "#define HAVE_FCNTL_FILE_LOCKING 1" >>confdefs.h
+
+    $as_echo "#define HAVE_SOCKLEN_T 1" >>confdefs.h
+
+    USE_PTHREADS=1
+    LIB_SUFFIX=lib
+    DLL_SUFFIX=dll
+    MKSHLIB=
+    DSO_LDOPTS=
+    DSO_CFLAGS=
+    VISIBILITY_FLAGS=
+    MDCPUCFG_H=_symbian.cfg
+    PR_MD_CSRCS=symbian.c
+    NSINSTALL=nsinstall
+    RANLIB='echo no ranlib '
+    CPU_ARCH=ARM
+    OS_ARCH=SYMBIAN
+    OS_EXE_CFLAGS="$OS_EXE_CFLAGS -D__EXE__"
+    CFLAGS="$CFLAGS -MD -nostdinc"
+    SYMBIAN_SYS_INCLUDE="-I$SYMBIAN_SDK_DIR/Epoc32/include/variant -I$SYMBIAN_SDK_DIR/Epoc32/include -I$SYMBIAN_SDK_DIR/Epoc32/include/stdapis"
+    echo -------------------------------------------------------
+    echo SYMBIAN_SYS_INCLUDE is: $SYMBIAN_SYS_INCLUDE
+    echo -------------------------------------------------------
+    case "$OS_TARGET" in
+    WINSCW)
+        CC=mwccsym2.exe
+        CXX=mwccsym2.exe
+        LD=mwldsym2.exe
+        AR=mwldsym2.exe
+        WINSCW_LD_DIR="\$(SYMBIAN_SDK_DIR)/EPOC32/RELEASE/WINSCW/UDEB"
+        CFLAGS="$CFLAGS -O0 -inline off -wchar_t off -align 4 -warnings on -w nohidevirtual,nounusedexpr -msgstyle gcc -enum int -str pool -exc ms -trigraphs on -nostderr -gccdep -cwd source -i- -I\$(VPATH)"
+        SYMBIAN_SYS_INCLUDE="$SYMBIAN_SYS_INCLUDE -include Symbian_OS_v9.2.hrh"
+        AR_FLAGS="-library -msgstyle gcc -stdlib -subsystem windows -noimplib -o \$@"
+        $as_echo "#define _DEBUG 1" >>confdefs.h
+
+        $as_echo "#define __CW32__ 1" >>confdefs.h
+
+        $as_echo "#define __WINS__ 1" >>confdefs.h
+
+        $as_echo "#define __WINSCW__ 1" >>confdefs.h
+
+        DEFINES="$DEFINES -U_WIN32"
+           ;;
+    GCCE)
+        CFLAGS="$CFLAGS -Wall -Wno-unknown-pragmas -fexceptions -march=armv5t -mapcs -pipe -x c -msoft-float"
+        CXXFLAGS="$CXXFLAGS $CFLAGS -Wno-ctor-dtor-privacy"
+        SYMBIAN_SYS_INCLUDE="$SYMBIAN_SYS_INCLUDE -include $SYMBIAN_SDK_DIR/EPOC32/INCLUDE/GCCE/GCCE.h"
+        $as_echo "#define __GCCE__ 1" >>confdefs.h
+
+        $as_echo "#define __EABI__ 1" >>confdefs.h
+
+        DEFINES="$DEFINES -D__PRODUCT_INCLUDE__=$SYMBIAN_SDK_DIR/Epoc32/include/variant/Symbian_OS_v9.2.hrh"
+           ;;
+    *)
+           as_fn_error $? "Missing OS_TARGET for ${target}. Set --enable-symbian-target to with 'WINSCW' or 'GCCE'." "$LINENO" 5
+       ;;
+    esac
+    CFLAGS="$CFLAGS ${SYMBIAN_SYS_INCLUDE}"
+    ;;
+
+*-os2*)
+    $as_echo "#define XP_OS2 1" >>confdefs.h
+
+    $as_echo "#define XP_PC 1" >>confdefs.h
+
+    $as_echo "#define BSD_SELECT 1" >>confdefs.h
+
+    $as_echo "#define TCPV40HDRS 1" >>confdefs.h
+
+    LIB_SUFFIX=lib
+    DLL_SUFFIX=dll
+    RC=rc.exe
+    PR_MD_ARCH_DIR=os2
+    PROG_SUFFIX=.exe
+    NSINSTALL=nsinstall
+    MDCPUCFG_H=_os2.cfg
+    RESOLVE_LINK_SYMBOLS=1
+
+    $as_echo "#define OS2 1" >>confdefs.h
+
+    AR=emxomfar
+    AR_FLAGS='r $@'
+    CFLAGS="$CFLAGS -Wall -Zomf"
+    CXXFLAGS="$CFLAGS -Wall -Zomf"
+    MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
+    DSO_CFLAGS=
+    DSO_LDOPTS='-Zomf -Zdll'
+    LDFLAGS='-Zmap'
+    _OPTIMIZE_FLAGS="-O2 -s"
+    _DEBUG_FLAGS="-g -fno-inline"
+    if test -n "$MOZ_OPTIMIZE"; then
+      DSO_LDOPTS="$DSO_LDOPTS -Zlinker /EXEPACK:2 -Zlinker /PACKCODE -Zlinker /PACKDATA"
+    fi
+    IMPLIB='emximp -o'
+    FILTER='emxexp -o'
+    if test -n "$MOZ_OS2_HIGH_MEMORY"; then
+      LDFLAGS="$LDFLAGS -Zhigh-mem"
+      $as_echo "#define MOZ_OS2_HIGH_MEMORY 1" >>confdefs.h
+
+    fi
+
+    # GCC for OS/2 currently predefines these, but we don't want them
+    DEFINES="$DEFINES -Uunix -U__unix -U__unix__"
+    ;;
+
+*)
+    $as_echo "#define XP_UNIX 1" >>confdefs.h
+
+    ;;
+
+esac
+
+if test -z "$SKIP_LIBRARY_CHECKS"; then
+
+
+
+case $target in
+*-darwin*|*-beos*|*-os2*)
+    ;;
+*)
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
+$as_echo_n "checking for dlopen in -ldl... " >&6; }
+if ${ac_cv_lib_dl_dlopen+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_dl_dlopen=yes
+else
+  ac_cv_lib_dl_dlopen=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
+$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
+if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
+  ac_fn_c_check_header_mongrel "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default"
+if test "x$ac_cv_header_dlfcn_h" = xyes; then :
+  OS_LIBS="-ldl $OS_LIBS"
+fi
+
+
+fi
+
+    ;;
+esac
+
+
+
+
+if test $ac_cv_c_compiler_gnu = yes; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5
+$as_echo_n "checking whether $CC needs -traditional... " >&6; }
+if ${ac_cv_prog_gcc_traditional+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+    ac_pattern="Autoconf.*'x'"
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sgtty.h>
+Autoconf TIOCGETP
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "$ac_pattern" >/dev/null 2>&1; then :
+  ac_cv_prog_gcc_traditional=yes
+else
+  ac_cv_prog_gcc_traditional=no
+fi
+rm -f conftest*
+
+
+  if test $ac_cv_prog_gcc_traditional = no; then
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <termio.h>
+Autoconf TCGETA
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "$ac_pattern" >/dev/null 2>&1; then :
+  ac_cv_prog_gcc_traditional=yes
+fi
+rm -f conftest*
+
+  fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gcc_traditional" >&5
+$as_echo "$ac_cv_prog_gcc_traditional" >&6; }
+  if test $ac_cv_prog_gcc_traditional = yes; then
+    CC="$CC -traditional"
+  fi
+fi
+
+_SAVE_LIBS="$LIBS"
+LIBS="$LIBS $OS_LIBS"
+for ac_func in dladdr gettid lchown setpriority strerror syscall
+do :
+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+LIBS="$_SAVE_LIBS"
+
+
+
+# Check whether --with-ccache was given.
+if test "${with_ccache+set}" = set; then :
+  withval=$with_ccache; CCACHE=$withval
+else
+  CCACHE="no"
+fi
+
+
+if test "$CCACHE" != "no"; then
+    if test -n "$CCACHE"; then
+        if test "$CCACHE" = "yes"; then
+            CCACHE=
+        else
+            if test ! -e "$CCACHE"; then
+                as_fn_error $? "$CCACHE not found" "$LINENO" 5
+            fi
+        fi
+    fi
+    for ac_prog in $CCACHE ccache
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_CCACHE+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $CCACHE in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+CCACHE=$ac_cv_path_CCACHE
+if test -n "$CCACHE"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
+$as_echo "$CCACHE" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$CCACHE" && break
+done
+
+    if test -z "$CCACHE" -o "$CCACHE" = ":"; then
+        as_fn_error $? "ccache not found" "$LINENO" 5
+    elif test -x "$CCACHE"; then
+        CC="$CCACHE $CC"
+        CXX="$CCACHE $CXX"
+    else
+        as_fn_error $? "$CCACHE is not executable" "$LINENO" 5
+    fi
+fi
+
+# Check whether --enable-strip was given.
+if test "${enable_strip+set}" = set; then :
+  enableval=$enable_strip;  if test "$enableval" = "yes"; then
+           ENABLE_STRIP=1
+      fi
+fi
+
+
+case "${target_os}" in
+hpux*)
+if test -z "$GNU_CC"; then
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for +Olit support" >&5
+$as_echo_n "checking for +Olit support... " >&6; }
+if ${ac_cv_hpux_usable_olit_option+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+                  ac_cv_hpux_usable_olit_option=no
+        rm -f conftest*
+        echo 'int main() { return 0; }' | cat > conftest.c
+        ${CC-cc} ${CFLAGS} +Olit=all -o conftest conftest.c > conftest.out 2>&1
+        if test $? -eq 0; then
+            if test -z "`egrep -i '(unrecognize|unknown)' conftest.out`"; then
+                ac_cv_hpux_usable_olit_option=yes
+            fi
+        fi
+        rm -f conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_hpux_usable_olit_option" >&5
+$as_echo "$ac_cv_hpux_usable_olit_option" >&6; }
+
+    if test "$ac_cv_hpux_usable_olit_option" = "yes"; then
+        CFLAGS="$CFLAGS +Olit=all"
+        CXXFLAGS="$CXXFLAGS +Olit=all"
+    else
+        CFLAGS="$CFLAGS +ESlit"
+        CXXFLAGS="$CXXFLAGS +ESlit"
+    fi
+fi
+;;
+esac
+
+
+
+case "$target_os" in
+darwin*)
+    _HAVE_PTHREADS=1
+    ;;
+*)
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
+$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
+echo "
+    #include <pthread.h>
+    void *foo(void *v) { return v; }
+    int main() {
+        pthread_t t;
+        if (!pthread_create(&t, 0, &foo, 0)) {
+            pthread_join(t, 0);
+        }
+        return 0;
+    }" > dummy.c ;
+    echo "${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lpthreads $LDFLAGS $LIBS" 1>&5;
+    ${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lpthreads $LDFLAGS $LIBS 2>&5;
+    _res=$? ;
+    rm -f dummy.c dummy${ac_exeext} ;
+    if test "$_res" = "0"; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+        _HAVE_PTHREADS=1 _PTHREAD_LDFLAGS="-lpthreads"
+    else
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
+$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
+echo "
+    #include <pthread.h>
+    void *foo(void *v) { return v; }
+    int main() {
+        pthread_t t;
+        if (!pthread_create(&t, 0, &foo, 0)) {
+            pthread_join(t, 0);
+        }
+        return 0;
+    }" > dummy.c ;
+    echo "${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lpthread $LDFLAGS $LIBS" 1>&5;
+    ${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lpthread $LDFLAGS $LIBS 2>&5;
+    _res=$? ;
+    rm -f dummy.c dummy${ac_exeext} ;
+    if test "$_res" = "0"; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+        _HAVE_PTHREADS=1 _PTHREAD_LDFLAGS="-lpthread"
+    else
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
+$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
+echo "
+    #include <pthread.h>
+    void *foo(void *v) { return v; }
+    int main() {
+        pthread_t t;
+        if (!pthread_create(&t, 0, &foo, 0)) {
+            pthread_join(t, 0);
+        }
+        return 0;
+    }" > dummy.c ;
+    echo "${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lc_r $LDFLAGS $LIBS" 1>&5;
+    ${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lc_r $LDFLAGS $LIBS 2>&5;
+    _res=$? ;
+    rm -f dummy.c dummy${ac_exeext} ;
+    if test "$_res" = "0"; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+        _HAVE_PTHREADS=1 _PTHREAD_LDFLAGS="-lc_r"
+    else
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc" >&5
+$as_echo_n "checking for pthread_create in -lc... " >&6; }
+echo "
+    #include <pthread.h>
+    void *foo(void *v) { return v; }
+    int main() {
+        pthread_t t;
+        if (!pthread_create(&t, 0, &foo, 0)) {
+            pthread_join(t, 0);
+        }
+        return 0;
+    }" > dummy.c ;
+    echo "${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lc $LDFLAGS $LIBS" 1>&5;
+    ${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lc $LDFLAGS $LIBS 2>&5;
+    _res=$? ;
+    rm -f dummy.c dummy${ac_exeext} ;
+    if test "$_res" = "0"; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+        _HAVE_PTHREADS=1
+
+    else
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+    fi
+
+
+    fi
+
+
+    fi
+
+
+    fi
+
+    ;;
+esac
+
+
+# Check whether --with-pthreads was given.
+if test "${with_pthreads+set}" = set; then :
+  withval=$with_pthreads;  if test "$withval" = "yes"; then
+           if test -n "$_HAVE_PTHREADS"; then
+                   USE_PTHREADS=1
+                   USE_USER_PTHREADS=
+                   USE_NSPR_THREADS=
+           else
+                   as_fn_error $? " --with-pthreads specified for a system without pthread support " "$LINENO" 5;
+           fi
+         else
+           USE_PTHREADS=
+           _PTHREAD_LDFLAGS=
+         fi
+else
+   if test -n "$_HAVE_PTHREADS" && test -z "$USE_USER_PTHREADS" && test -z "$USE_NSPR_THREADS"; then
+           USE_PTHREADS=1
+           USE_USER_PTHREADS=
+           USE_NSPR_THREADS=
+         fi
+fi
+
+
+# Check whether --enable-user-pthreads was given.
+if test "${enable_user_pthreads+set}" = set; then :
+  enableval=$enable_user_pthreads;  if test "$enableval" = "yes"; then
+        if test -n "$_HAVE_PTHREADS"; then
+                   USE_PTHREADS=
+                   USE_USER_PTHREADS=1
+                   USE_NSPR_THREADS=
+           else
+                   as_fn_error $? " --enable-user-pthreads specified for a system without pthread support " "$LINENO" 5;
+           fi
+         fi
+fi
+
+
+# Check whether --enable-nspr-threads was given.
+if test "${enable_nspr_threads+set}" = set; then :
+  enableval=$enable_nspr_threads;  if test "$enableval" = "yes"; then
+           USE_PTHREADS=
+           USE_USER_PTHREADS=
+           USE_NSPR_THREADS=1
+         fi
+fi
+
+
+case "$target" in
+*-beos*)
+
+# Check whether --with-bthreads was given.
+if test "${with_bthreads+set}" = set; then :
+  withval=$with_bthreads;      if test "$withval" = "yes"; then
+           USE_BTHREADS=1
+               USE_USER_PTHREADS=
+               USE_PTHREADS=
+           fi
+fi
+
+    ;;
+esac
+
+fi # SKIP_LIBRARY_CHECKS
+
+# Check whether --enable-ipv6 was given.
+if test "${enable_ipv6+set}" = set; then :
+  enableval=$enable_ipv6;  if test "$enableval" = "yes"; then
+           USE_IPV6=1
+      else
+           USE_IPV6=
+      fi
+fi
+
+
+if test -n "$USE_PTHREADS"; then
+      rm -f conftest*
+   ac_cv_have_dash_pthread=no
+   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC-cc} accepts -pthread" >&5
+$as_echo_n "checking whether ${CC-cc} accepts -pthread... " >&6; }
+   echo 'int main() { return 0; }' | cat > conftest.c
+   ${CC-cc} -pthread -o conftest conftest.c > conftest.out 2>&1
+   if test $? -eq 0; then
+       if test -z "`egrep -i '(unrecognize|unknown)' conftest.out | grep pthread`" && test -z "`egrep -i '(error|incorrect)' conftest.out`" ; then
+           ac_cv_have_dash_pthread=yes
+               case "$target_os" in
+           freebsd*)
+# Freebsd doesn't use -pthread for compiles, it uses them for linking
+            ;;
+           *)
+            CFLAGS="$CFLAGS -pthread"
+            CXXFLAGS="$CXXFLAGS -pthread"
+            ;;
+        esac
+       fi
+    fi
+    rm -f conftest*
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_dash_pthread" >&5
+$as_echo "$ac_cv_have_dash_pthread" >&6; }
+
+                           ac_cv_have_dash_pthreads=no
+    if test "$ac_cv_have_dash_pthread" = "no"; then
+           { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC-cc} accepts -pthreads" >&5
+$as_echo_n "checking whether ${CC-cc} accepts -pthreads... " >&6; }
+       echo 'int main() { return 0; }' | cat > conftest.c
+           ${CC-cc} -pthreads -o conftest conftest.c > conftest.out 2>&1
+       if test $? -eq 0; then
+               if test -z "`egrep -i '(unrecognize|unknown)' conftest.out | grep pthreads`" && test -z "`egrep -i '(error|incorrect)' conftest.out`" ; then
+                           ac_cv_have_dash_pthreads=yes
+                           CFLAGS="$CFLAGS -pthreads"
+                           CXXFLAGS="$CXXFLAGS -pthreads"
+                   fi
+           fi
+           rm -f conftest*
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_dash_pthreads" >&5
+$as_echo "$ac_cv_have_dash_pthreads" >&6; }
+    fi
+
+    case "$target" in
+    *-solaris*)
+        if test "$ac_cv_have_dash_pthreads" = "yes"; then
+            _PTHREAD_LDFLAGS=
+        fi
+           ;;
+    *-freebsd*)
+           $as_echo "#define _REENTRANT 1" >>confdefs.h
+
+           $as_echo "#define _THREAD_SAFE 1" >>confdefs.h
+
+                   if test "$ac_cv_have_dash_pthread" = "yes"; then
+               _PTHREAD_LDFLAGS="-pthread"
+           else
+               _PTHREAD_LDFLAGS="-lc_r"
+           fi
+           ;;
+    *-netbsd*)
+           if test "$ac_cv_have_dash_pthread" = "yes"; then
+               _PTHREAD_LDFLAGS="-pthread"
+           fi
+           ;;
+    *-bsdi*)
+           $as_echo "#define _THREAD_SAFE 1" >>confdefs.h
+
+                   if test "$ac_cv_have_dash_pthread" = "yes"; then
+               _PTHREAD_LDFLAGS=
+           fi
+           ;;
+    *-openbsd*)
+        if test "$ac_cv_have_dash_pthread" = "yes"; then
+            _PTHREAD_LDFLAGS=-pthread
+        fi
+        ;;
+    *-linux*|*-gnu*|*-k*bsd*-gnu)
+        $as_echo "#define _REENTRANT 1" >>confdefs.h
+
+        ;;
+    esac
+
+else
+    if test -n "$USE_USER_PTHREADS"; then
+           USE_PTHREADS=
+           USE_NSPR_THREADS=
+    else
+        _PTHREAD_LDFLAGS=
+    fi
+fi
+
+case "$target" in
+*-aix*)
+    if test -n "$USE_NSPR_THREADS"; then
+        $as_echo "#define _PR_LOCAL_THREADS_ONLY 1" >>confdefs.h
+
+    fi
+    case "$target_os" in
+    aix4.1*)
+        if test -z "$USE_PTHREADS"; then
+            $as_echo "#define AIX_RENAME_SELECT 1" >>confdefs.h
+
+        fi
+        ;;
+    aix4.2*)
+        if test -z "$USE_NSPR_THREADS"; then
+            $as_echo "#define HAVE_POINTER_LOCALTIME_R 1" >>confdefs.h
+
+        fi
+        ;;
+    aix4.3*)
+        if test -z "$USE_NSPR_THREADS"; then
+            $as_echo "#define HAVE_POINTER_LOCALTIME_R 1" >>confdefs.h
+
+        fi
+        if test -n "$USE_PTHREADS"; then
+            $as_echo "#define _PR_HAVE_THREADSAFE_GETHOST 1" >>confdefs.h
+
+        fi
+        ;;
+    *)
+        if test -z "$USE_NSPR_THREADS"; then
+            $as_echo "#define HAVE_POINTER_LOCALTIME_R 1" >>confdefs.h
+
+        fi
+        if test -n "$USE_PTHREADS"; then
+            $as_echo "#define _PR_HAVE_THREADSAFE_GETHOST 1" >>confdefs.h
+
+        fi
+        ;;
+    esac
+    ;;
+*-bsdi*)
+    if test -n "$USE_PTHREADS"; then
+        $as_echo "#define _PR_NEED_PTHREAD_INIT 1" >>confdefs.h
+
+    fi
+    ;;
+*-freebsd*)
+    if test -n "$USE_NSPR_THREADS"; then
+        $as_echo "#define _PR_LOCAL_THREADS_ONLY 1" >>confdefs.h
+
+    fi
+    ;;
+*-hpux*)
+    if test -n "$USE_NSPR_THREADS"; then
+        $as_echo "#define _PR_LOCAL_THREADS_ONLY 1" >>confdefs.h
+
+    fi
+    if test "$USE_PTHREADS"; then
+        if echo "$OS_RELEASE" | egrep '^(B.10.10|B.10.20)' >/dev/null; then
+            $as_echo "#define _REENTRANT 1" >>confdefs.h
+
+            $as_echo "#define _PR_DCETHREADS 1" >>confdefs.h
+
+        else
+            cat >>confdefs.h <<_ACEOF
+#define _POSIX_C_SOURCE 199506L
+_ACEOF
+
+            $as_echo "#define _PR_HAVE_THREADSAFE_GETHOST 1" >>confdefs.h
+
+        fi
+    fi
+    if test "$USE_USER_PTHREADS"; then
+        cat >>confdefs.h <<_ACEOF
+#define _POSIX_C_SOURCE 199506L
+_ACEOF
+
+    fi
+    ;;
+*-irix*)
+    if test "${target_os}" = "irix6.5"; then
+        if test -n "$USE_PTHREADS"; then
+            $as_echo "#define _PR_HAVE_GETHOST_R 1" >>confdefs.h
+
+            $as_echo "#define _PR_HAVE_GETHOST_R_POINTER 1" >>confdefs.h
+
+        fi
+    fi
+    ;;
+*-linux*|*-gnu*|*-k*bsd*-gnu)
+    if test -n "$USE_NSPR_THREADS"; then
+        $as_echo "#define _PR_LOCAL_THREADS_ONLY 1" >>confdefs.h
+
+    fi
+    ;;
+*-mingw*|*-msys*|*-cygwin*|*-mks*|*-os2*|*-beos*)
+        USE_PTHREADS=
+    _PTHREAD_LDFLAGS=
+    USE_USER_PTHREADS=
+    ;;
+*-netbsd*|*-openbsd*)
+    if test -n "$USE_NSPR_THREADS"; then
+        $as_echo "#define _PR_LOCAL_THREADS_ONLY 1" >>confdefs.h
+
+    fi
+    ;;
+*-osf*)
+    if test -n "$USE_NSPR_THREADS"; then
+        $as_echo "#define _PR_LOCAL_THREADS_ONLY 1" >>confdefs.h
+
+    fi
+    if test -n "$USE_PTHREADS"; then
+        if echo $OS_RELEASE | egrep -c '(V2.0|V3.2)' 2>/dev/null; then
+            :
+        else
+            $as_echo "#define _PR_HAVE_THREADSAFE_GETHOST 1" >>confdefs.h
+
+        fi
+    fi
+    ;;
+*-solaris*)
+    if test -n "$USE_NSPR_THREADS"; then
+        $as_echo "#define _PR_LOCAL_THREADS_ONLY 1" >>confdefs.h
+
+    fi
+    if test -n "$USE_PTHREADS"; then
+        $as_echo "#define _REENTRANT 1" >>confdefs.h
+
+        $as_echo "#define HAVE_POINTER_LOCALTIME_R 1" >>confdefs.h
+
+        if test "$OS_TEST" = "i86pc"; then
+            if test -n "$USE_64"; then
+               PR_MD_ASFILES=os_SunOS_x86_64.s
+            else
+               PR_MD_ASFILES=os_SunOS_x86.s
+            fi
+        else
+            if test -n "$USE_64"; then
+                PR_MD_ASFILES=os_SunOS_sparcv9.s
+            fi
+        fi
+    fi
+    ;;
+*-nto*)
+    if test -n "$USE_PTHREADS"; then
+        $as_echo "#define _PR_HAVE_GETHOST_R 1" >>confdefs.h
+
+        $as_echo "#define _PR_HAVE_GETHOST_R_POINTER 1" >>confdefs.h
+
+    fi
+    ;;
+esac
+
+OS_LIBS="$_PTHREAD_LDFLAGS $OS_LIBS"
+
+if test -n "$_SAVE_OPTIMIZE_FLAGS"; then
+    _OPTIMIZE_FLAGS="$_SAVE_OPTIMIZE_FLAGS"
+fi
+
+if test -n "$_SAVE_DEBUG_FLAGS"; then
+    _DEBUG_FLAGS="$_SAVE_DEBUG_FLAGS"
+fi
+
+if test -n "$MOZ_OPTIMIZE"; then
+    CFLAGS="$CFLAGS $_OPTIMIZE_FLAGS"
+    CXXFLAGS="$CXXFLAGS $_OPTIMIZE_FLAGS"
+fi
+
+if test -n "$MOZ_DEBUG_SYMBOLS"; then
+    CFLAGS="$CFLAGS $_DEBUG_FLAGS"
+    CXXFLAGS="$CXXFLAGS $_DEBUG_FLAGS"
+fi
+
+if test -n "$MOZ_OPTIMIZE"; then
+    OBJDIR_TAG=_OPT
+else
+    OBJDIR_TAG=_DBG
+fi
+
+if test -n "$USE_64"; then
+    COMPILER_TAG=_64
+fi
+
+RELEASE_OBJDIR_NAME="${OS_CONFIG}${CPU_ARCH_TAG}${COMPILER_TAG}${IMPL_STRATEGY}${OBJDIR_TAG}.${OBJDIR_SUFFIX}"
+
+case "$target_os" in
+cygwin*|mks*)
+    CC="\$(CYGWIN_WRAPPER) $CC"
+    CXX="\$(CYGWIN_WRAPPER) $CXX"
+    RC="\$(CYGWIN_WRAPPER) $RC"
+    ;;
+esac
+
+# Check whether --enable-wrap-malloc was given.
+if test "${enable_wrap_malloc+set}" = set; then :
+  enableval=$enable_wrap_malloc;      if test "$enableval" = "yes"; then
+           _WRAP_MALLOC=1
+      fi
+fi
+
+
+if test -n "$_WRAP_MALLOC"; then
+    if test -n "$GNU_CC"; then
+        WRAP_LDFLAGS="${WRAP_LDFLAGS} -Wl,--wrap=malloc,--wrap=calloc,--wrap=valloc,--wrap=free,--wrap=realloc,--wrap=memalign"
+        WRAP_LDFLAGS="${WRAP_LDFLAGS} -Wl,--wrap=__builtin_new,--wrap=__builtin_vec_new,--wrap=__builtin_delete,--wrap=__builtin_vec_delete"
+        WRAP_LDFLAGS="${WRAP_LDFLAGS} -Wl,--wrap=strdup,--wrap=strndup"
+        WRAP_LDFLAGS="${WRAP_LDFLAGS} -Wl,--wrap=posix_memalign,--wrap=malloc_usable_size"
+    else
+        as_fn_error $? "--enable-wrap-malloc is not supported for non-GNU toolchains" "$LINENO" 5
+    fi
+fi
+
+
+# Check whether --with-wrap-malloc was given.
+if test "${with_wrap_malloc+set}" = set; then :
+  withval=$with_wrap_malloc; WRAP_LDFLAGS="${WRAP_LDFLAGS} $withval"
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+MAKEFILES="
+    Makefile
+    config/Makefile
+    config/autoconf.mk
+    config/nsprincl.mk
+    config/nsprincl.sh
+    config/nspr-config
+    config/nspr.pc
+    lib/Makefile
+    lib/ds/Makefile
+    lib/libc/Makefile
+    lib/libc/include/Makefile
+    lib/libc/src/Makefile
+    lib/tests/Makefile
+    pkg/Makefile
+    pr/Makefile
+    pr/include/Makefile
+    pr/include/md/Makefile
+    pr/include/obsolete/Makefile
+    pr/include/private/Makefile
+    pr/src/Makefile
+    pr/src/io/Makefile
+    pr/src/linking/Makefile
+    pr/src/malloc/Makefile
+    pr/src/md/Makefile
+    pr/src/md/${PR_MD_ARCH_DIR}/Makefile
+    pr/src/memory/Makefile
+    pr/src/misc/Makefile
+    pr/src/threads/Makefile
+    pr/tests/Makefile
+    pr/tests/dll/Makefile
+"
+
+if test "$OS_TARGET" = "Linux"; then
+    MAKEFILES="$MAKEFILES
+        pkg/linux/Makefile
+    "
+elif test "$OS_TARGET" = "SunOS"; then
+    MAKEFILES="$MAKEFILES
+        pkg/solaris/Makefile
+        pkg/solaris/SUNWpr/Makefile
+        pkg/solaris/SUNWprd/Makefile
+    "
+fi
+
+if test -z "$USE_PTHREADS" && test -z "$USE_BTHREADS"; then
+    MAKEFILES="$MAKEFILES
+        pr/src/threads/combined/Makefile
+    "
+elif test -n "$USE_PTHREADS"; then
+    MAKEFILES="$MAKEFILES
+        pr/src/pthreads/Makefile
+    "
+elif test -n "$USE_BTHREADS"; then
+    MAKEFILES="$MAKEFILES
+        pr/src/bthreads/Makefile
+    "
+fi
+
+if test -n "$USE_CPLUS"; then
+    MAKEFILES="$MAKEFILES
+        pr/src/cplus/Makefile
+        pr/src/cplus/tests/Makefile
+    "
+fi
+
+echo $MAKEFILES > unallmakefiles
+
+ac_config_files="$ac_config_files $MAKEFILES"
+
+ac_config_commands="$ac_config_commands default"
+
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems.  If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, we kill variables containing newlines.
+# 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.
+(
+  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+    eval ac_val=\$$ac_var
+    case $ac_val in #(
+    *${as_nl}*)
+      case $ac_var in #(
+      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+      esac
+      case $ac_var in #(
+      _ | IFS | as_nl) ;; #(
+      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+      *) { eval $ac_var=; unset $ac_var;} ;;
+      esac ;;
+    esac
+  done
+
+  (set) 2>&1 |
+    case $as_nl`(ac_space=' '; set) 2>&1` in #(
+    *${as_nl}ac_space=\ *)
+      # `set' does not quote correctly, so add quotes: double-quote
+      # substitution turns \\\\ into \\, and sed turns \\ into \.
+      sed -n \
+       "s/'/'\\\\''/g;
+         s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+      ;; #(
+    *)
+      # `set' quotes correctly as required by POSIX, so do not add quotes.
+      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+      ;;
+    esac |
+    sort
+) |
+  sed '
+     /^ac_cv_env_/b end
+     t clear
+     :clear
+     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+     t end
+     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+     :end' >>confcache
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+  if test -w "$cache_file"; then
+    if test "x$cache_file" != "x/dev/null"; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
+$as_echo "$as_me: updating cache $cache_file" >&6;}
+      if test ! -f "$cache_file" || test -h "$cache_file"; then
+       cat confcache >"$cache_file"
+      else
+        case $cache_file in #(
+        */* | ?:*)
+         mv -f confcache "$cache_file"$$ &&
+         mv -f "$cache_file"$$ "$cache_file" ;; #(
+        *)
+         mv -f confcache "$cache_file" ;;
+       esac
+      fi
+    fi
+  else
+    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
+$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+  fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# Transform confdefs.h into DEFS.
+# Protect against shell expansion while executing Makefile rules.
+# Protect against Makefile macro expansion.
+#
+# If the first sed substitution is executed (which looks for macros that
+# take arguments), then branch to the quote section.  Otherwise,
+# look for a macro that doesn't take arguments.
+ac_script='
+:mline
+/\\$/{
+ N
+ s,\\\n,,
+ b mline
+}
+t clear
+:clear
+s/^[    ]*#[    ]*define[       ][      ]*\([^  (][^    (]*([^)]*)\)[   ]*\(.*\)/-D\1=\2/g
+t quote
+s/^[    ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)/-D\1=\2/g
+t quote
+b any
+:quote
+s/[     `~#$^&*(){}\\|;'\''"<>?]/\\&/g
+s/\[/\\&/g
+s/\]/\\&/g
+s/\$/$$/g
+H
+:any
+${
+       g
+       s/^\n//
+       s/\n/ /g
+       p
+}
+'
+DEFS=`sed -n "$ac_script" confdefs.h`
+
+
+ac_libobjs=
+ac_ltlibobjs=
+U=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+  # 1. Remove the extension, and $U if already installed.
+  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
+  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
+  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
+  #    will be set to the directory where LIBOBJS objects are built.
+  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+
+: "${CONFIG_STATUS=./config.status}"
+ac_write_fail=0
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
+$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
+as_write_fail=0
+cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+
+SHELL=\${CONFIG_SHELL-$SHELL}
+export SHELL
+_ASEOF
+cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+  emulate sh
+  NULLCMD=:
+  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in #(
+  *posix*) :
+    set -o posix ;; #(
+  *) :
+     ;;
+esac
+fi
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='print -r --'
+  as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='printf %s\n'
+  as_echo_n='printf %s'
+else
+  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+    as_echo_n='/usr/ucb/echo -n'
+  else
+    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+    as_echo_n_body='eval
+      arg=$1;
+      case $arg in #(
+      *"$as_nl"*)
+       expr "X$arg" : "X\\(.*\\)$as_nl";
+       arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+      esac;
+      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+    '
+    export as_echo_n_body
+    as_echo_n='sh -c $as_echo_n_body as_echo'
+  fi
+  export as_echo_body
+  as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  PATH_SEPARATOR=:
+  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+      PATH_SEPARATOR=';'
+  }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.  Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" ""       $as_nl"
+
+# Find who we are.  Look in the path if we contain no directory separator.
+as_myself=
+case $0 in #((
+  *[\\/]* ) as_myself=$0 ;;
+  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+  done
+IFS=$as_save_IFS
+
+     ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+  as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+  exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there.  '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+  as_status=$1; test $as_status -eq 0 && as_status=1
+  if test "$4"; then
+    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+  fi
+  $as_echo "$as_me: error: $2" >&2
+  as_fn_exit $as_status
+} # as_fn_error
+
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+  return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+  set +e
+  as_fn_set_status $1
+  exit $1
+} # as_fn_exit
+
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+  { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+  eval 'as_fn_append ()
+  {
+    eval $1+=\$2
+  }'
+else
+  as_fn_append ()
+  {
+    eval $1=\$$1\$2
+  }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+  eval 'as_fn_arith ()
+  {
+    as_val=$(( $* ))
+  }'
+else
+  as_fn_arith ()
+  {
+    as_val=`expr "$@" || test $? -eq 1`
+  }
+fi # as_fn_arith
+
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+  as_dirname=dirname
+else
+  as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+        X"$0" : 'X\(//\)$' \| \
+        X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{
+           s//\1/
+           q
+         }
+         /^X\/\(\/\/\)$/{
+           s//\1/
+           q
+         }
+         /^X\/\(\/\).*/{
+           s//\1/
+           q
+         }
+         s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+  case `echo 'xy\c'` in
+  *c*) ECHO_T='        ';;     # ECHO_T is single tab character.
+  xy)  ECHO_C='\c';;
+  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
+       ECHO_T='        ';;
+  esac;;
+*)
+  ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+  rm -f conf$$.dir/conf$$.file
+else
+  rm -f conf$$.dir
+  mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+  if ln -s conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s='ln -s'
+    # ... but there are two gotchas:
+    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+    # In both cases, we have to default to `cp -pR'.
+    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+      as_ln_s='cp -pR'
+  elif ln conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s=ln
+  else
+    as_ln_s='cp -pR'
+  fi
+else
+  as_ln_s='cp -pR'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+  case $as_dir in #(
+  -*) as_dir=./$as_dir;;
+  esac
+  test -d "$as_dir" || eval $as_mkdir_p || {
+    as_dirs=
+    while :; do
+      case $as_dir in #(
+      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+      *) as_qdir=$as_dir;;
+      esac
+      as_dirs="'$as_qdir' $as_dirs"
+      as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+        X"$as_dir" : 'X\(//\)[^/]' \| \
+        X"$as_dir" : 'X\(//\)$' \| \
+        X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)[^/].*/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\).*/{
+           s//\1/
+           q
+         }
+         s/.*/./; q'`
+      test -d "$as_dir" && break
+    done
+    test -z "$as_dirs" || eval "mkdir $as_dirs"
+  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p='mkdir -p "$as_dir"'
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+  test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+exec 6>&1
+## ----------------------------------- ##
+## Main body of $CONFIG_STATUS script. ##
+## ----------------------------------- ##
+_ASEOF
+test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# Save the log message, to keep $0 and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.
+ac_log="
+This file was extended by $as_me, which was
+generated by GNU Autoconf 2.69.  Invocation command line was
+
+  CONFIG_FILES    = $CONFIG_FILES
+  CONFIG_HEADERS  = $CONFIG_HEADERS
+  CONFIG_LINKS    = $CONFIG_LINKS
+  CONFIG_COMMANDS = $CONFIG_COMMANDS
+  $ $0 $@
+
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+"
+
+_ACEOF
+
+case $ac_config_files in *"
+"*) set x $ac_config_files; shift; ac_config_files=$*;;
+esac
+
+
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+# Files that config.status was made for.
+config_files="$ac_config_files"
+config_commands="$ac_config_commands"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ac_cs_usage="\
+\`$as_me' instantiates files and other configuration actions
+from templates according to the current configuration.  Unless the files
+and actions are specified as TAGs, all are instantiated by default.
+
+Usage: $0 [OPTION]... [TAG]...
+
+  -h, --help       print this help, then exit
+  -V, --version    print version number and configuration settings, then exit
+      --config     print configuration, then exit
+  -q, --quiet, --silent
+                   do not print progress messages
+  -d, --debug      don't remove temporary files
+      --recheck    update $as_me by reconfiguring in the same conditions
+      --file=FILE[:TEMPLATE]
+                   instantiate the configuration file FILE
+
+Configuration files:
+$config_files
+
+Configuration commands:
+$config_commands
+
+Report bugs to the package provider."
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
+ac_cs_version="\\
+config.status
+configured by $0, generated by GNU Autoconf 2.69,
+  with options \\"\$ac_cs_config\\"
+
+Copyright (C) 2012 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+
+ac_pwd='$ac_pwd'
+srcdir='$srcdir'
+test -n "\$AWK" || AWK=awk
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# The default lists apply if the user does not specify any file.
+ac_need_defaults=:
+while test $# != 0
+do
+  case $1 in
+  --*=?*)
+    ac_option=`expr "X$1" : 'X\([^=]*\)='`
+    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
+    ac_shift=:
+    ;;
+  --*=)
+    ac_option=`expr "X$1" : 'X\([^=]*\)='`
+    ac_optarg=
+    ac_shift=:
+    ;;
+  *)
+    ac_option=$1
+    ac_optarg=$2
+    ac_shift=shift
+    ;;
+  esac
+
+  case $ac_option in
+  # Handling of the options.
+  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+    ac_cs_recheck=: ;;
+  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+    $as_echo "$ac_cs_version"; exit ;;
+  --config | --confi | --conf | --con | --co | --c )
+    $as_echo "$ac_cs_config"; exit ;;
+  --debug | --debu | --deb | --de | --d | -d )
+    debug=: ;;
+  --file | --fil | --fi | --f )
+    $ac_shift
+    case $ac_optarg in
+    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    '') as_fn_error $? "missing file argument" ;;
+    esac
+    as_fn_append CONFIG_FILES " '$ac_optarg'"
+    ac_need_defaults=false;;
+  --he | --h |  --help | --hel | -h )
+    $as_echo "$ac_cs_usage"; exit ;;
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil | --si | --s)
+    ac_cs_silent=: ;;
+
+  # This is an error.
+  -*) as_fn_error $? "unrecognized option: \`$1'
+Try \`$0 --help' for more information." ;;
+
+  *) as_fn_append ac_config_targets " $1"
+     ac_need_defaults=false ;;
+
+  esac
+  shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+  exec 6>/dev/null
+  ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+if \$ac_cs_recheck; then
+  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+  shift
+  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
+  CONFIG_SHELL='$SHELL'
+  export CONFIG_SHELL
+  exec "\$@"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+exec 5>>config.log
+{
+  echo
+  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+  $as_echo "$ac_log"
+} >&5
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+
+# Handling of arguments.
+for ac_config_target in $ac_config_targets
+do
+  case $ac_config_target in
+    "$MAKEFILES") CONFIG_FILES="$CONFIG_FILES $MAKEFILES" ;;
+    "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
+
+  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+  esac
+done
+
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used.  Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
+fi
+
+# Have a temporary directory for convenience.  Make it in the build tree
+# simply because there is no reason against having it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
+$debug ||
+{
+  tmp= ac_tmp=
+  trap 'exit_status=$?
+  : "${ac_tmp:=$tmp}"
+  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
+' 0
+  trap 'as_fn_exit 1' 1 2 13 15
+}
+# Create a (secure) tmp directory for tmp files.
+
+{
+  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
+  test -d "$tmp"
+}  ||
+{
+  tmp=./conf$$-$RANDOM
+  (umask 077 && mkdir "$tmp")
+} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
+ac_tmp=$tmp
+
+# Set up the scripts for CONFIG_FILES section.
+# No need to generate them if there are no CONFIG_FILES.
+# This happens for instance with `./config.status config.h'.
+if test -n "$CONFIG_FILES"; then
+
+
+ac_cr=`echo X | tr X '\015'`
+# On cygwin, bash can eat \r inside `` if the user requested igncr.
+# But we know of no other shell where ac_cr would be empty at this
+# point, so we can use a bashism as a fallback.
+if test "x$ac_cr" = x; then
+  eval ac_cr=\$\'\\r\'
+fi
+ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
+if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
+  ac_cs_awk_cr='\\r'
+else
+  ac_cs_awk_cr=$ac_cr
+fi
+
+echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
+_ACEOF
+
+
+{
+  echo "cat >conf$$subs.awk <<_ACEOF" &&
+  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
+  echo "_ACEOF"
+} >conf$$subs.sh ||
+  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+  . ./conf$$subs.sh ||
+    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+
+  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
+  if test $ac_delim_n = $ac_delim_num; then
+    break
+  elif $ac_last_try; then
+    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+  else
+    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+  fi
+done
+rm -f conf$$subs.sh
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
+_ACEOF
+sed -n '
+h
+s/^/S["/; s/!.*/"]=/
+p
+g
+s/^[^!]*!//
+:repl
+t repl
+s/'"$ac_delim"'$//
+t delim
+:nl
+h
+s/\(.\{148\}\)..*/\1/
+t more1
+s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
+p
+n
+b repl
+:more1
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t nl
+:delim
+h
+s/\(.\{148\}\)..*/\1/
+t more2
+s/["\\]/\\&/g; s/^/"/; s/$/"/
+p
+b
+:more2
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t delim
+' <conf$$subs.awk | sed '
+/^[^""]/{
+  N
+  s/\n//
+}
+' >>$CONFIG_STATUS || ac_write_fail=1
+rm -f conf$$subs.awk
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+_ACAWK
+cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
+  for (key in S) S_is_set[key] = 1
+  FS = "\a"
+
+}
+{
+  line = $ 0
+  nfields = split(line, field, "@")
+  substed = 0
+  len = length(field[1])
+  for (i = 2; i < nfields; i++) {
+    key = field[i]
+    keylen = length(key)
+    if (S_is_set[key]) {
+      value = S[key]
+      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
+      len += length(value) + length(field[++i])
+      substed = 1
+    } else
+      len += 1 + keylen
+  }
+
+  print line
+}
+
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
+  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
+else
+  cat
+fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
+  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
+_ACEOF
+
+# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
+# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+  ac_vpsub='/^[         ]*VPATH[        ]*=[    ]*/{
+h
+s///
+s/^/:/
+s/[     ]*$/:/
+s/:\$(srcdir):/:/g
+s/:\${srcdir}:/:/g
+s/:@srcdir@:/:/g
+s/^:*//
+s/:*$//
+x
+s/\(=[  ]*\).*/\1/
+G
+s/\n//
+s/^[^=]*=[      ]*$//
+}'
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+fi # test -n "$CONFIG_FILES"
+
+
+eval set X "  :F $CONFIG_FILES      :C $CONFIG_COMMANDS"
+shift
+for ac_tag
+do
+  case $ac_tag in
+  :[FHLC]) ac_mode=$ac_tag; continue;;
+  esac
+  case $ac_mode$ac_tag in
+  :[FHL]*:*);;
+  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
+  :[FH]-) ac_tag=-:-;;
+  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+  esac
+  ac_save_IFS=$IFS
+  IFS=:
+  set x $ac_tag
+  IFS=$ac_save_IFS
+  shift
+  ac_file=$1
+  shift
+
+  case $ac_mode in
+  :L) ac_source=$1;;
+  :[FH])
+    ac_file_inputs=
+    for ac_f
+    do
+      case $ac_f in
+      -) ac_f="$ac_tmp/stdin";;
+      *) # Look for the file first in the build tree, then in the source tree
+        # (if the path is not absolute).  The absolute path cannot be DOS-style,
+        # because $ac_f cannot contain `:'.
+        test -f "$ac_f" ||
+          case $ac_f in
+          [\\/$]*) false;;
+          *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+          esac ||
+          as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
+      esac
+      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+      as_fn_append ac_file_inputs " '$ac_f'"
+    done
+
+    # Let's still pretend it is `configure' which instantiates (i.e., don't
+    # use $as_me), people would be surprised to read:
+    #    /* config.h.  Generated by config.status.  */
+    configure_input='Generated from '`
+         $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
+       `' by configure.'
+    if test x"$ac_file" != x-; then
+      configure_input="$ac_file.  $configure_input"
+      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
+$as_echo "$as_me: creating $ac_file" >&6;}
+    fi
+    # Neutralize special characters interpreted by sed in replacement strings.
+    case $configure_input in #(
+    *\&* | *\|* | *\\* )
+       ac_sed_conf_input=`$as_echo "$configure_input" |
+       sed 's/[\\\\&|]/\\\\&/g'`;; #(
+    *) ac_sed_conf_input=$configure_input;;
+    esac
+
+    case $ac_tag in
+    *:-:* | *:-) cat >"$ac_tmp/stdin" \
+      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
+    esac
+    ;;
+  esac
+
+  ac_dir=`$as_dirname -- "$ac_file" ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+        X"$ac_file" : 'X\(//\)[^/]' \| \
+        X"$ac_file" : 'X\(//\)$' \| \
+        X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$ac_file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)[^/].*/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\).*/{
+           s//\1/
+           q
+         }
+         s/.*/./; q'`
+  as_dir="$ac_dir"; as_fn_mkdir_p
+  ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+  # A ".." for each directory in $ac_dir_suffix.
+  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+  case $ac_top_builddir_sub in
+  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+  esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+  .)  # We are building in place.
+    ac_srcdir=.
+    ac_top_srcdir=$ac_top_builddir_sub
+    ac_abs_top_srcdir=$ac_pwd ;;
+  [\\/]* | ?:[\\/]* )  # Absolute name.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir
+    ac_abs_top_srcdir=$srcdir ;;
+  *) # Relative name.
+    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_build_prefix$srcdir
+    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+
+  case $ac_mode in
+  :F)
+  #
+  # CONFIG_FILE
+  #
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# If the template does not know about datarootdir, expand it.
+# FIXME: This hack should be removed a few years after 2.60.
+ac_datarootdir_hack=; ac_datarootdir_seen=
+ac_sed_dataroot='
+/datarootdir/ {
+  p
+  q
+}
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/p
+/@mandir@/p'
+case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
+*datarootdir*) ac_datarootdir_seen=yes;;
+*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+  ac_datarootdir_hack='
+  s&@datadir@&$datadir&g
+  s&@docdir@&$docdir&g
+  s&@infodir@&$infodir&g
+  s&@localedir@&$localedir&g
+  s&@mandir@&$mandir&g
+  s&\\\${datarootdir}&$datarootdir&g' ;;
+esac
+_ACEOF
+
+# Neutralize VPATH when `$srcdir' = `.'.
+# Shell code in configure.ac might set extrasub.
+# FIXME: do we really want to maintain this feature?
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_sed_extra="$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s|@configure_input@|$ac_sed_conf_input|;t t
+s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@top_build_prefix@&$ac_top_build_prefix&;t t
+s&@srcdir@&$ac_srcdir&;t t
+s&@abs_srcdir@&$ac_abs_srcdir&;t t
+s&@top_srcdir@&$ac_top_srcdir&;t t
+s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
+s&@builddir@&$ac_builddir&;t t
+s&@abs_builddir@&$ac_abs_builddir&;t t
+s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+$ac_datarootdir_hack
+"
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
+  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+
+test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
+  { ac_out=`sed -n '/^[         ]*datarootdir[  ]*:*=/p' \
+      "$ac_tmp/out"`; test -z "$ac_out"; } &&
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined.  Please make sure it is defined" >&5
+$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined.  Please make sure it is defined" >&2;}
+
+  rm -f "$ac_tmp/stdin"
+  case $ac_file in
+  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
+  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
+  esac \
+  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ ;;
+
+
+  :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
+$as_echo "$as_me: executing $ac_file commands" >&6;}
+ ;;
+  esac
+
+
+  case $ac_file$ac_mode in
+    "default":C) chmod +x config/nspr-config ;;
+
+  esac
+done # for ac_tag
+
+
+as_fn_exit 0
+_ACEOF
+ac_clean_files=$ac_clean_files_save
+
+test $ac_write_fail = 0 ||
+  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded.  So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status.  When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+  ac_cs_success=:
+  ac_config_status_args=
+  test "$silent" = yes &&
+    ac_config_status_args="$ac_config_status_args --quiet"
+  exec 5>/dev/null
+  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+  exec 5>>config.log
+  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+  # would make configure fail if this is the last instruction.
+  $ac_cs_success || as_fn_exit 1
+fi
+if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
+fi
+
similarity index 96%
rename from nspr/configure.in
rename to configure.in
index 4b140c4..9e9f1b1 100644 (file)
@@ -4,24 +4,26 @@ dnl This Source Code Form is subject to the terms of the Mozilla Public
 dnl License, v. 2.0. If a copy of the MPL was not distributed with this
 dnl file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-AC_PREREQ(2.12)
-AC_INIT(config/libc_r.h)
+AC_PREREQ(2.61)
+AC_INIT
+AC_CONFIG_SRCDIR([pr/include/nspr.h])
 
 AC_CONFIG_AUX_DIR(${srcdir}/build/autoconf)
-AC_CANONICAL_SYSTEM
+AC_CANONICAL_TARGET
 
 dnl ========================================================
 dnl = Defaults
 dnl ========================================================
 MOD_MAJOR_VERSION=4
 MOD_MINOR_VERSION=10
-MOD_PATCH_VERSION=2
+MOD_PATCH_VERSION=6
 NSPR_MODNAME=nspr20
 _HAVE_PTHREADS=
 USE_PTHREADS=
 USE_USER_PTHREADS=
 USE_NSPR_THREADS=
 USE_N32=
+USE_X32=
 USE_64=
 USE_CPLUS=
 USE_IPV6=
@@ -66,7 +68,7 @@ HOST_CFLAGS="${HOST_CFLAGS=}"
 HOST_LDFLAGS="${HOST_LDFLAGS=}"
 
 case "$target" in
-*-cygwin*|*-mingw*)
+*-cygwin*|*-mingw*|*-msys*)
     # Check to see if we are really running in a msvc environemnt
     _WIN32_MSVC=
     AC_CHECK_PROGS(CC, cl)
@@ -82,9 +84,6 @@ case "$target" in
         rm -f dummy dummy.o dummy.obj dummy.exe dummy.c
     fi
     ;;
-*-msvc*)
-    _WIN32_MSVC=1
-    ;;
 *-mks*)
     _WIN32_MSVC=1
     ;;
@@ -385,6 +384,8 @@ AC_ARG_ENABLE(debug-rtl,
     [  --enable-debug-rtl      Use the MSVC debug runtime library],
     [ if test "$enableval" = "yes"; then
            USE_DEBUG_RTL=1
+      else
+           USE_DEBUG_RTL=0
       fi ])
 
 AC_ARG_ENABLE(n32,
@@ -396,6 +397,15 @@ AC_ARG_ENABLE(n32,
       fi
     fi ])
 
+AC_ARG_ENABLE(x32,
+    [  --enable-x32            Enable x32 ABI support (x86_64 only)],
+    [ if test "$enableval" = "yes"; then
+        USE_X32=1
+      else if test "$enableval" = "no"; then
+        USE_X32=
+      fi
+    fi ])
+
 AC_ARG_ENABLE(64bit,
     [  --enable-64bit          Enable 64-bit support (on certain platforms)],
     [ if test "$enableval" = "yes"; then
@@ -546,10 +556,10 @@ if test -n "$MOZ_DEBUG"; then
     beos*)
         DEFINES="$DEFINES -DDEBUG_${USER}"
         ;;
-    msvc*|mks*|cygwin*|mingw*|wince*|winmo*|os2*)
+    mks*|cygwin*|mingw*|msys*|os2*)
         DEFINES="$DEFINES -DDEBUG_`echo ${USERNAME} | sed -e 's| |_|g'`"
         ;;
-    *) 
+    *)
         DEFINES="$DEFINES -DDEBUG_`$WHOAMI`"
         ;;
     esac
@@ -562,52 +572,18 @@ if test -z "$SKIP_COMPILER_CHECKS"; then
 dnl ========================================================
 dnl Checks for compilers.
 dnl ========================================================
-
-dnl Explicitly honor $CROSS_COMPILE to allow cross-compiling
-dnl between toolkits on the same architecture, as when
-dnl targeting the iOS Simulator from OS X.
-if test "$target" != "$host" -o -n "$CROSS_COMPILE"; then
+if test "$target" != "$host"; then
     echo "cross compiling from $host to $target"
     cross_compiling=yes
 
-    _SAVE_CC="$CC"
-    _SAVE_CFLAGS="$CFLAGS"
-    _SAVE_LDFLAGS="$LDFLAGS"
-
-    AC_MSG_CHECKING([for $host compiler])
-    AC_CHECK_PROGS(HOST_CC, $HOST_CC gcc cc /usr/ucb/cc, "")
-    if test -z "$HOST_CC"; then
-        AC_MSG_ERROR([no acceptable cc found in \$PATH])
-    fi
-    AC_MSG_RESULT([$HOST_CC])
-    if test -z "$HOST_CFLAGS"; then
-        HOST_CFLAGS="$CFLAGS"
-    fi
-    if test -z "$HOST_LDFLAGS"; then
-        HOST_LDFLAGS="$LDFLAGS"
-    fi
-
-    CC="$HOST_CC"
-    CFLAGS="$HOST_CFLAGS"
-    LDFLAGS="$HOST_LDFLAGS"
-
-    AC_MSG_CHECKING([whether the $host compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works])
-    AC_TRY_COMPILE([], [return 0;],
-        [AC_MSG_RESULT([yes])],
-        [AC_MSG_ERROR([installation or configuration problem: $host compiler $HOST_CC cannot create executables.])] )
-
-    CC=$_SAVE_CC
-    CFLAGS=$_SAVE_CFLAGS
-    LDFLAGS=$_SAVE_LDFLAGS
-
-    case "$build:$target" in 
+    case "$build:$target" in
       powerpc-apple-darwin8*:i?86-apple-darwin*)
         dnl The Darwin cross compiler doesn't necessarily point itself at a
         dnl root that has libraries for the proper architecture, it defaults
         dnl to the system root.  The libraries in the system root on current
         dnl versions of PPC OS X 10.4 aren't fat, so these target compiler
         dnl checks will fail.  Fake a working SDK in that case.
-        _SAVE_CFLAGS=$CFLAGS 
+        _SAVE_CFLAGS=$CFLAGS
         _SAVE_CXXFLAGS=$CXXFLAGS
         CFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk $CFLAGS"
         CXXFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk $CXXFLAGS"
@@ -625,7 +601,17 @@ if test "$target" != "$host" -o -n "$CROSS_COMPILE"; then
 
     AC_CHECK_PROGS(CC, $CC "${target_alias}-gcc" "${target}-gcc", echo)
     unset ac_cv_prog_CC
-    AC_PROG_CC
+    dnl Now exit the conditional block to invoke AC_PROG_CC.
+fi
+
+dnl In the latest versions of autoconf, AC_PROG_CC is a one-shot macro,
+dnl declared with AC_DEFUN_ONCE. So it must not be expanded inside a
+dnl conditional block. Invoke AC_PROG_CC outside any conditional block
+dnl and before invoking AC_TRY_COMPILE (which requires AC_PROG_CC).
+AC_PROG_CC
+
+dnl Reenter the conditional blocks after invoking AC_PROG_CC.
+if test "$target" != "$host"; then
     if test -n "$USE_CPLUS"; then
         AC_CHECK_PROGS(CXX, $CXX "${target_alias}-g++" "${target}-g++", echo)
         unset ac_cv_prog_CXX
@@ -649,16 +635,43 @@ if test "$target" != "$host" -o -n "$CROSS_COMPILE"; then
     AC_CHECK_PROGS(STRIP, $STRIP "${target_alias}-strip" "${target}-strip", echo)
     AC_CHECK_PROGS(WINDRES, $WINDRES "${target_alias}-windres" "${target}-windres", echo)
 
+    _SAVE_CC="$CC"
+    _SAVE_CFLAGS="$CFLAGS"
+    _SAVE_LDFLAGS="$LDFLAGS"
+
+    AC_MSG_CHECKING([for $host compiler])
+    AC_CHECK_PROGS(HOST_CC, $HOST_CC gcc cc /usr/ucb/cc, "")
+    if test -z "$HOST_CC"; then
+        AC_MSG_ERROR([no acceptable cc found in \$PATH])
+    fi
+    AC_MSG_RESULT([$HOST_CC])
+    if test -z "$HOST_CFLAGS"; then
+        HOST_CFLAGS="$CFLAGS"
+    fi
+    if test -z "$HOST_LDFLAGS"; then
+        HOST_LDFLAGS="$LDFLAGS"
+    fi
+
+    CC="$HOST_CC"
+    CFLAGS="$HOST_CFLAGS"
+    LDFLAGS="$HOST_LDFLAGS"
+
+    AC_MSG_CHECKING([whether the $host compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works])
+    AC_TRY_COMPILE([], [return 0;],
+        [AC_MSG_RESULT([yes])],
+        [AC_MSG_ERROR([installation or configuration problem: $host compiler $HOST_CC cannot create executables.])] )
+
+    CC=$_SAVE_CC
+    CFLAGS=$_SAVE_CFLAGS
+    LDFLAGS=$_SAVE_LDFLAGS
 else
-    AC_PROG_CC
     if test -n "$USE_CPLUS"; then
         if test "$CC" = "cl" -a -z "$CXX"; then
             CXX=$CC
-        else        
+        else
             AC_PROG_CXX
         fi
     fi
-    AC_PROG_CPP
     AC_PROG_RANLIB
     AC_PATH_PROGS(AS, as, $CC)
     AC_PATH_PROGS(AR, ar, echo not_ar)
@@ -673,6 +686,8 @@ else
     fi
 fi
 
+AC_PROG_CPP
+
 if test "$GCC" = "yes"; then
     GNU_CC=1
 fi
@@ -848,9 +863,7 @@ if test -n "$CROSS_COMPILE"; then
     case "${target_os}" in
         linux*)       OS_ARCH=Linux ;;
         solaris*)     OS_ARCH=SunOS OS_RELEASE=5 ;;
-        mingw*)       OS_ARCH=WINNT ;;
-        wince*)       OS_ARCH=WINCE ;;
-        winmo*)       OS_ARCH=WINCE ;;
+        mingw*)       OS_ARCH=WINNT CPU_ARCH=x86 ;;
         darwin*)      OS_ARCH=Darwin ;;
         riscos*)      OS_ARCH=RISCOS ;;
     esac
@@ -901,10 +914,6 @@ fi
 # to do development on a WIN95 machine, you don't need this hack.
 #
 case "$OS_ARCH" in
-WIN95)
-    OS_ARCH=WINNT
-    OS_TARGET=WIN95
-    ;;
 Windows_95)
     OS_ARCH=Windows_NT
     OS_TARGET=WIN95
@@ -928,12 +937,6 @@ esac
 #
 
 case "$OS_ARCH" in
-WINNT)
-    CPU_ARCH=`uname -p`
-    if test "$CPU_ARCH" = "I386"; then
-        CPU_ARCH=x86
-    fi
-    ;;
 Windows_NT)
 #
 # If uname -s returns "Windows_NT", we assume that we are using
@@ -957,12 +960,14 @@ Windows_NT)
         CPU_ARCH=x86
     fi
     ;;
-CYGWIN_NT*|MINGW*_NT*)
+CYGWIN_NT*|MINGW*_NT*|MSYS_NT*)
 #
 # If uname -s returns "CYGWIN_NT-4.0", we assume that we are using
 # the uname.exe in the Cygwin tools.
-# If uname -s returns MINGW32_NT-5.1, we assume that we are using
+# If uname -s returns "MINGW32_NT-5.1", we assume that we are using
 # the uname.exe in the MSYS tools.
+# If uname -s returns "MSYS_NT-6.3", we assume that we are using
+# the uname.exe in the MSYS2 tools.
 #
     OS_RELEASE=`expr $OS_ARCH : '.*NT-\(.*\)'`
     OS_ARCH=WINNT
@@ -978,7 +983,7 @@ esac
 
 if test -n "$MOZILLA_CLIENT" && test "$OS_ARCH" = "WINNT"; then
     OS_TARGET=WIN95
-    if test -n "$MOZ_DEBUG"; then
+    if test -n "$MOZ_DEBUG" -a -z "$USE_DEBUG_RTL"; then
         USE_DEBUG_RTL=1
     fi
 fi
@@ -1006,6 +1011,8 @@ dnl = ARM toolchain tweaks
 dnl ========================================================
 
 dnl Defaults
+MOZ_ALIGN=toolchain-default
+
 case "$target" in
 arm*-android*|arm*-linuxandroid*)
     MOZ_THUMB=yes
@@ -1013,6 +1020,7 @@ arm*-android*|arm*-linuxandroid*)
     MOZ_FPU=vfp
     MOZ_FLOAT_ABI=softfp
     MOZ_SOFT_FLOAT=yes
+    MOZ_ALIGN=no
     ;;
 arm*-*)
     if test -n "$MOZ_PLATFORM_MAEMO"; then
@@ -1148,8 +1156,31 @@ no)
     ;;
 esac
 
+case "$MOZ_ALIGN" in
+toolchain-default|"")
+    align_flag=""
+    ;;
+no)
+    align_flag="-mno-unaligned-access"
+    ;;
+yes)
+    align_flag="-munaligned-access"
+    ;;
+*)
+    align_flag=""
+    ;;
+esac
+
+if test -n "$align_flag"; then
+  _SAVE_CFLAGS="$CFLAGS"
+  CFLAGS="$CFLAGS $align_flag"
+  AC_MSG_CHECKING(whether alignment flag ($align_flag) is supported)
+  AC_TRY_COMPILE([],[],,align_flag="")
+  CFLAGS="$_SAVE_CFLAGS"
+fi
+
 dnl Use echo to avoid accumulating space characters
-all_flags=`echo $arch_flag $thumb_flag $thumb_interwork_flag $fpu_flag $float_abi_flag $soft_float_flag`
+all_flags=`echo $arch_flag $thumb_flag $thumb_interwork_flag $fpu_flag $float_abi_flag $soft_float_flag $align_flag`
 if test -n "$all_flags"; then
     _SAVE_CFLAGS="$CFLAGS"
     CFLAGS="$all_flags"
@@ -1170,10 +1201,10 @@ dnl ========================================================
 dnl Override of system specific host options
 dnl ========================================================
 case "$host" in
-*-mingw*)
+*-mingw*|*-msys*)
     NSINSTALL=nsinstall
     ;;
-*-cygwin*|*-msvc*|*-mks*|*-wince*|*-winmo*)
+*-cygwin*|*-mks*)
     NSINSTALL='$(CYGWIN_WRAPPER) nsinstall'
     if test `echo "${PATH}" | grep -c \;` = 0; then
         CYGWIN_WRAPPER='sh $(topsrcdir)/build/cygwin-wrapper'
@@ -1359,16 +1390,13 @@ case "$target" in
         arm*)
             CPU_ARCH=arm
             ;;
-        i*86*)
+        i*86*|x86_64)
             if test -n "$USE_64"; then
                 CPU_ARCH=x86_64
             else        
                 CPU_ARCH=i386
             fi
             ;;
-        x86_64)
-            CPU_ARCH=x86_64
-            ;;
         *)
             CPU_ARCH=ppc
             ;;
@@ -1841,6 +1869,10 @@ tools are selected during the Xcode/Developer Tools installation.])
     x86_64)
         if test -n "$USE_64"; then
             PR_MD_ASFILES=os_Linux_x86_64.s
+        elif test -n "$USE_X32"; then
+            PR_MD_ASFILES=os_Linux_x86_64.s
+            CC="$CC -mx32"
+            CXX="$CXX -mx32"
         else
             AC_DEFINE(i386)
             PR_MD_ASFILES=os_Linux_x86.s
@@ -1866,7 +1898,7 @@ tools are selected during the Xcode/Developer Tools installation.])
     esac    
     ;;
 
-*-mingw*|*-cygwin*|*-msvc*|*-mks*)
+*-mingw*|*-msys*|*-cygwin*|*-mks*)
     AC_DEFINE(XP_PC)
     AC_DEFINE(WIN32)
     PR_MD_ARCH_DIR=windows
@@ -1971,7 +2003,7 @@ tools are selected during the Xcode/Developer Tools installation.])
             CFLAGS="$CFLAGS -Od"
         fi
 
-        if test -n "$USE_DEBUG_RTL"; then
+        if test "$USE_DEBUG_RTL" = 1; then
             CFLAGS="$CFLAGS -MDd"
         else
             CFLAGS="$CFLAGS -MD"
@@ -2027,7 +2059,7 @@ tools are selected during the Xcode/Developer Tools installation.])
         CPU_ARCH_TAG=$CPU_ARCH
     fi
 
-    if test -n "$USE_DEBUG_RTL"; then
+    if test "$USE_DEBUG_RTL" = 1; then
         OBJDIR_SUFFIX=OBJD
     fi
 
@@ -2065,36 +2097,6 @@ tools are selected during the Xcode/Developer Tools installation.])
     esac
     ;;
 
-*-wince*|*-winmo*)
-    AC_DEFINE(XP_PC)
-    AC_DEFINE(WIN32)
-    AC_DEFINE(WINCE)
-    AC_DEFINE(_PR_GLOBAL_THREADS_ONLY)
-
-    AR_FLAGS='-NOLOGO -OUT:"$@"'
-
-    OBJ_SUFFIX=obj
-    LIB_SUFFIX=lib
-    DLL_SUFFIX=dll
-    MKSHLIB='$(LD) -DLL $(DSO_LDOPTS) -OUT:$@'
-
-    PR_MD_ARCH_DIR=windows
-    RESOLVE_LINK_SYMBOLS=1
-
-    MDCPUCFG_H=_win95.cfg
-    LIBNSPR='$(dist_libdir)/nspr$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
-    LIBPLC='$(dist_libdir)/plc$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
-
-    DLLFLAGS='-OUT:"$@"'
-    if test -n "$MOZ_DEBUG_SYMBOLS"; then
-        OS_LDFLAGS='-DEBUG -DEBUGTYPE:CV'
-        OS_DLLFLAGS='-DEBUG -DEBUGTYPE:CV'
-        DSO_LDOPTS='-DEBUG -DEBUGTYPE:CV'
-    fi
-    _DEBUG_FLAGS=-Zi
-    _OPTIMIZE_FLAGS=-O2
-    ;;
-
 *-netbsd*)
     AC_DEFINE(XP_UNIX)
     AC_DEFINE(NETBSD)
@@ -2528,29 +2530,6 @@ if test -z "$SKIP_LIBRARY_CHECKS"; then
 dnl ========================================================
 dnl Check for system libraries
 dnl ========================================================
-dnl AC_CHECK_LIB(C, main)
-dnl AC_CHECK_LIB(C_r, main)
-dnl AC_CHECK_LIB(c, main)
-dnl AC_CHECK_LIB(c_r, main)
-dnl AC_CHECK_LIB(dce, main)
-dnl AC_CHECK_LIB(dl, main)
-dnl AC_CHECK_LIB(dld, main)
-dnl AC_CHECK_LIB(gen, main)
-dnl AC_CHECK_LIB(ip6, main)
-dnl AC_CHECK_LIB(l, main)
-dnl AC_CHECK_LIB(m, main)
-dnl AC_CHECK_LIB(nsl, main)
-dnl AC_CHECK_LIB(posix4, main)
-dnl AC_CHECK_LIB(prstrms, main)
-dnl AC_CHECK_LIB(prstrms_shr, main)
-dnl AC_CHECK_LIB(pthread, main)
-dnl AC_CHECK_LIB(pthreads, main)
-dnl AC_CHECK_LIB(resolv, main)
-dnl AC_CHECK_LIB(rt, main)
-dnl AC_CHECK_LIB(socket, main)
-dnl AC_CHECK_LIB(svld, main)
-dnl AC_CHECK_LIB(thread, main)
-dnl AC_CHECK_LIB(vms_jackets, main)
 
 
 dnl We don't want anything to link with libdl even if it's present on OS X, 
@@ -2572,25 +2551,10 @@ esac
 dnl ========================================================
 dnl Check for system header files.
 dnl ========================================================
-dnl AC_HEADER_DIRENT
-dnl AC_HEADER_STDC
-dnl AC_HEADER_SYS_WAIT
-dnl AC_CHECK_HEADERS(fcntl.h limits.h sys/file.h sys/ioctl.h sys/time.h unistd.h)
 
 dnl ========================================================
 dnl Check for typedefs and structs
 dnl ========================================================
-dnl AC_C_CONST
-dnl AC_TYPE_UID_T
-dnl AC_TYPE_MODE_T
-dnl AC_TYPE_OFF_T
-dnl AC_TYPE_PID_T
-dnl AC_TYPE_SIZE_T
-dnl AC_STRUCT_ST_BLKSIZE
-dnl AC_STRUCT_ST_BLOCKS
-dnl AC_STRUCT_ST_RDEV
-dnl AC_HEADER_TIME
-dnl AC_STRUCT_TM
 
 dnl ========================================================
 dnl Checks for library functions.
@@ -2601,15 +2565,6 @@ LIBS="$LIBS $OS_LIBS"
 AC_CHECK_FUNCS(dladdr gettid lchown setpriority strerror syscall)
 LIBS="$_SAVE_LIBS"
 
-dnl AC_FUNC_MEMCMP
-dnl AC_FUNC_MMAP
-dnl AC_FUNC_SETVBUF_REVERSED
-dnl AC_FUNC_STRCOLL
-dnl AC_FUNC_STRFTIME
-dnl AC_FUNC_UTIME_NULL
-dnl AC_FUNC_VPRINTF
-dnl AC_CHECK_FUNCS(ftime getcwd gethostname gettimeofday getwd mkdir mktime putenv rmdir select socket strdup strerror strstr strtol strtoul uname)
-
 dnl ========================================================
 dnl Check options
 dnl ========================================================
@@ -2724,9 +2679,6 @@ case "$target_os" in
 darwin*)
     _HAVE_PTHREADS=1
     ;;
-wince*)
-    _HAVE_PTHREADS=
-    ;;
 *)
     MOZ_CHECK_PTHREADS(pthreads,
         _HAVE_PTHREADS=1 _PTHREAD_LDFLAGS="-lpthreads",
@@ -2971,8 +2923,8 @@ case "$target" in
         AC_DEFINE(_PR_LOCAL_THREADS_ONLY)
     fi
     ;;
-*-mingw*|*-cygwin*|*-msvc*|*-mks*|*-wince*|*-winmo*|*-os2*|*-beos*)
-    dnl win32, wince, os2 & beos cannot use pthreads
+*-mingw*|*-msys*|*-cygwin*|*-mks*|*-os2*|*-beos*)
+    dnl win32, os2 & beos cannot use pthreads
     USE_PTHREADS=
     _PTHREAD_LDFLAGS=
     USE_USER_PTHREADS=
@@ -3060,7 +3012,7 @@ dnl ========================================================
 dnl Use cygwin wrapper for win32 builds, except MSYS/MinGW
 dnl ========================================================
 case "$target_os" in
-cygwin*|msvc*|mks*)
+cygwin*|mks*)
     CC="\$(CYGWIN_WRAPPER) $CC"
     CXX="\$(CYGWIN_WRAPPER) $CXX"
     RC="\$(CYGWIN_WRAPPER) $RC"
@@ -3121,6 +3073,7 @@ AC_SUBST(MOZ_DEBUG_SYMBOLS)
 AC_SUBST(USE_CPLUS)
 AC_SUBST(USE_IPV6)
 AC_SUBST(USE_N32)
+AC_SUBST(USE_X32)
 AC_SUBST(USE_64)
 AC_SUBST(OBJECT_MODE)
 AC_SUBST(ENABLE_STRIP)
@@ -3272,4 +3225,6 @@ fi
 
 echo $MAKEFILES > unallmakefiles
 
-AC_OUTPUT([$MAKEFILES], [chmod +x config/nspr-config])
+AC_CONFIG_FILES([$MAKEFILES])
+AC_CONFIG_COMMANDS([default], [chmod +x config/nspr-config])
+AC_OUTPUT
similarity index 100%
rename from nspr/tools/.cvsignore
rename to lib/.cvsignore
similarity index 100%
rename from nspr/lib/Makefile.in
rename to lib/Makefile.in
similarity index 100%
rename from nspr/lib/ds/Makefile.in
rename to lib/ds/Makefile.in
similarity index 100%
rename from nspr/lib/ds/plarena.c
rename to lib/ds/plarena.c
similarity index 100%
rename from nspr/lib/ds/plarena.h
rename to lib/ds/plarena.h
similarity index 100%
rename from nspr/lib/ds/plarenas.h
rename to lib/ds/plarenas.h
similarity index 100%
rename from nspr/lib/ds/plds.def
rename to lib/ds/plds.def
similarity index 100%
rename from nspr/lib/ds/plds.rc
rename to lib/ds/plds.rc
similarity index 100%
rename from nspr/lib/ds/plhash.c
rename to lib/ds/plhash.c
similarity index 100%
rename from nspr/lib/ds/plhash.h
rename to lib/ds/plhash.h
similarity index 100%
rename from nspr/lib/ds/plvrsion.c
rename to lib/ds/plvrsion.c
similarity index 100%
rename from nspr/lib/libc/src/README
rename to lib/libc/README
similarity index 100%
rename from nspr/lib/libc/README
rename to lib/libc/src/README
similarity index 100%
rename from nspr/lib/libc/src/plc.rc
rename to lib/libc/src/plc.rc
similarity index 98%
rename from nspr/lib/prstreams/tests/testprstrm/Makefile.in
rename to lib/prstreams/tests/testprstrm/Makefile.in
index 4d0357a..1271f94 100644 (file)
@@ -150,7 +150,7 @@ else
 $(OBJDIR)/%$(PROG_SUFFIX): $(OBJDIR)/%.$(OBJ_SUFFIX)
        @$(MAKE_OBJDIR)
 ifeq ($(OS_ARCH), WINNT)
-       link $(LDOPTS) $< $(LIBPR) $(LIBPRSTRMS) wsock32.lib -out:$@
+       link $(LDOPTS) $< $(LIBPR) $(LIBPRSTRMS) ws2_32.lib -out:$@
 else
 ifeq ($(OS_ARCH),OS2)
        $(LINK) $(EXEFLAGS) $(LDOPTS) $< $(LIBPR) $(LIBPRSTRMS) $(OS_LIBS) $(EXTRA_LIBS)
similarity index 98%
rename from nspr/lib/tests/Makefile.in
rename to lib/tests/Makefile.in
index 671b040..d8f595f 100644 (file)
@@ -159,7 +159,7 @@ $(OBJDIR)/%$(PROG_SUFFIX): $(OBJDIR)/%.$(OBJ_SUFFIX)
        @$(MAKE_OBJDIR)
 
 ifeq ($(OS_ARCH), WINNT)
-       link $(LDOPTS) $< $(LIBPLC) $(LIBPLDS) $(LIBPR) wsock32.lib -out:$@
+       link $(LDOPTS) $< $(LIBPLC) $(LIBPLDS) $(LIBPR) ws2_32.lib -out:$@
 else
 ifeq ($(OS_ARCH), WINCE)
        $(LD) $(LDOPTS) $< $(LIBPLC) $(LIBPLDS) $(LIBPR) ws2.lib -out:$@
similarity index 100%
rename from nspr/lib/tests/arena.c
rename to lib/tests/arena.c
similarity index 100%
rename from nspr/lib/tests/base64t.c
rename to lib/tests/base64t.c
similarity index 100%
rename from nspr/lib/tests/getopt.c
rename to lib/tests/getopt.c
similarity index 100%
rename from nspr/lib/tests/string.c
rename to lib/tests/string.c
diff --git a/nspr/.hg_archival.txt b/nspr/.hg_archival.txt
deleted file mode 100644 (file)
index 6608483..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-repo: a4b34919bf34db2ee22acbbc305693c8980b6dc6
-node: 1ef9f206a61fe3bbe3f9837f7429d1434ed0542c
-branch: default
-tag: NSPR_4_10_2_RTM
diff --git a/nspr/aclocal.m4 b/nspr/aclocal.m4
deleted file mode 100644 (file)
index 9f27aab..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-dnl
-dnl Local autoconf macros used with Mozilla.
-dnl The contents of this file are under the Public Domain.
-dnl 
-
-builtin(include, build/autoconf/acwinpaths.m4)
diff --git a/nspr/build/autoconf/acwinpaths.m4 b/nspr/build/autoconf/acwinpaths.m4
deleted file mode 100644 (file)
index ad9c754..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-dnl This Source Code Form is subject to the terms of the Mozilla Public
-dnl License, v. 2.0. If a copy of the MPL was not distributed with this
-dnl file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-define(GENERATE_SUB_ABS, [
-define([AC_OUTPUT_FILES_SUB1], [
-patsubst($@, [/\*)], [/* | ?:/*)])
-])
-])
-GENERATE_SUB_ABS(defn([AC_OUTPUT_FILES]))
-
-define(GENERATE_SUB_NOSPLIT, [
-define([AC_OUTPUT_FILES], [
-patsubst($@, [-e "s%:% \$ac_given_srcdir/%g"], [])
-])
-])
-GENERATE_SUB_NOSPLIT(defn([AC_OUTPUT_FILES_SUB1]))
-
-define(GENERATE_HEADER_NOSPLIT, [
-define([AC_OUTPUT_HEADER], [
-patsubst($@, [-e "s%:% \$ac_given_srcdir/%g"], [])
-])
-])
-GENERATE_HEADER_NOSPLIT(defn([AC_OUTPUT_HEADER]))
-
-define(GENERATE_SUBDIRS_ABS, [
-define([AC_OUTPUT_SUBDIRS], [
-patsubst($@, [/\*)], [/* | ?:/*)])
-])
-])
-GENERATE_SUBDIRS_ABS(defn([AC_OUTPUT_SUBDIRS]))
diff --git a/nspr/config/now.c b/nspr/config/now.c
deleted file mode 100644 (file)
index 165b924..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include <stdio.h>
-#include <stdlib.h>
-
-#if defined(XP_UNIX) || defined(XP_OS2) || defined(XP_BEOS)
-#include <sys/time.h>
-#elif defined(_WIN32)
-#include <windows.h>
-#else
-#error "Architecture not supported"
-#endif
-
-
-int main(int argc, char **argv)
-{
-#if defined(OMIT_LIB_BUILD_TIME)
-    /*
-     * Some platforms don't have any 64-bit integer type
-     * such as 'long long'.  Because we can't use NSPR's
-     * PR_snprintf in this program, it is difficult to
-     * print a static initializer for PRInt64 (a struct).
-     * So we print nothing.  The makefiles that build the
-     * shared libraries will detect the empty output string
-     * of this program and omit the library build time
-     * in PRVersionDescription.
-     */
-#elif defined(XP_UNIX) || defined(XP_OS2) || defined(XP_BEOS)
-    long long now;
-    struct timeval tv;
-#ifdef HAVE_SVID_GETTOD
-    gettimeofday(&tv);
-#else
-    gettimeofday(&tv, NULL);
-#endif
-    now = ((1000000LL) * tv.tv_sec) + (long long)tv.tv_usec;
-#if defined(OSF1)
-    fprintf(stdout, "%ld", now);
-#elif defined(BEOS) && defined(__POWERPC__)
-    fprintf(stdout, "%Ld", now);  /* Metroworks on BeOS PPC */
-#else
-    fprintf(stdout, "%lld", now);
-#endif
-
-#elif defined(_WIN32)
-    __int64 now;
-    FILETIME ft;
-    GetSystemTimeAsFileTime(&ft);
-    CopyMemory(&now, &ft, sizeof(now));
-    /*
-     * 116444736000000000 is the number of 100-nanosecond intervals
-     * between Jan. 1, 1601 and Jan. 1, 1970.
-     */
-#ifdef __GNUC__
-    now = (now - 116444736000000000LL) / 10LL;
-    fprintf(stdout, "%lld", now);
-#else
-    now = (now - 116444736000000000i64) / 10i64;
-    fprintf(stdout, "%I64d", now);
-#endif
-
-#else
-#error "Architecture not supported"
-#endif
-
-    return 0;
-}  /* main */
-
-/* now.c */
diff --git a/nspr/configure b/nspr/configure
deleted file mode 100755 (executable)
index 484a15a..0000000
+++ /dev/null
@@ -1,6892 +0,0 @@
-#! /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
-# gives unlimited permission to copy, distribute and modify it.
-
-# Defaults:
-ac_help=
-ac_default_prefix=/usr/local
-# Any additions from configure.in:
-ac_help="$ac_help
-  --with-android-ndk=DIR
-                          location where the Android NDK can be found"
-ac_help="$ac_help
-  --with-android-toolchain=DIR
-                          location of the Android toolchain"
-ac_help="$ac_help
-  --with-android-version=VER
-                          Android platform version, default 5 for arm, 9 for x86/mips"
-ac_help="$ac_help
-  --with-android-platform=DIR
-                          location of platform dir"
-ac_help="$ac_help
-  --with-gonk=DIR         location of gonk dir"
-ac_help="$ac_help
-  --with-dist-prefix=DIST_PREFIX
-                          place build files in DIST_PREFIX [dist]"
-ac_help="$ac_help
-  --with-dist-bindir=DIR  build execuatables in DIR [DIST_PREFIX/bin]"
-ac_help="$ac_help
-  --with-dist-includedir=DIR
-                          build include files in DIR [DIST_PREFIX/include/nspr]"
-ac_help="$ac_help
-  --with-dist-libdir=DIR  build library files in DIR [DIST_PREFIX/lib]"
-ac_help="$ac_help
-  --with-mozilla          Compile NSPR with Mozilla support"
-ac_help="$ac_help
-  --enable-optimize[=OPT] Enable code optimizations (ie. -O2) "
-ac_help="$ac_help
-  --enable-debug[=DBG]    Enable debugging (using compiler flags DBG)"
-ac_help="$ac_help
-  --enable-debug-symbols[=DBG]    Enable debugging symbols
-                                       (using compiler flags DBG)"
-ac_help="$ac_help
-  --enable-win32-target=\$t
-                          Specify win32 flavor. (WIN95 or WINNT)"
-ac_help="$ac_help
-  --enable-symbian-target=\$t
-                          Specify symbian flavor. (WINSCW or GCCE)"
-ac_help="$ac_help
-  --enable-debug-rtl      Use the MSVC debug runtime library"
-ac_help="$ac_help
-  --enable-n32            Enable n32 ABI support (IRIX only)"
-ac_help="$ac_help
-  --enable-64bit          Enable 64-bit support (on certain platforms)"
-ac_help="$ac_help
-  --enable-mdupdate       Enable use of certain compilers' mdupdate feature"
-ac_help="$ac_help
-  --enable-cplus          Enable some c++ api routines"
-ac_help="$ac_help
-  --with-arm-kuser        Use kuser helpers (Linux/ARM only)
-                          (Requires kernel 2.6.13 or later)"
-ac_help="$ac_help
-  --with-macos-sdk=dir    Location of platform SDK to use (Mac OS X only)"
-ac_help="$ac_help
-  --enable-macos-target=VER
-                          Set the minimum MacOS version needed at runtime
-                          [10.2 for ppc, 10.4 for x86]"
-ac_help="$ac_help
-  --disable-os2-high-mem  Disable high-memory support on OS/2"
-ac_help="$ac_help
-"
-ac_help="$ac_help
-  --with-thumb[[=yes|no|toolchain-default]]
-                          Use Thumb instruction set (-mthumb)"
-ac_help="$ac_help
-  --with-thumb-interwork[[=yes|no|toolchain-default]]
-                           Use Thumb/ARM instuctions interwork (-mthumb-interwork)"
-ac_help="$ac_help
-  --with-arch=[[type|toolchain-default]]
-                           Use specific CPU features (-march=type)"
-ac_help="$ac_help
-  --with-fpu=[[type|toolchain-default]]
-                           Use specific FPU type (-mfpu=type)"
-ac_help="$ac_help
-  --with-float-abi=[[type|toolchain-default]]
-                           Use specific arm float ABI (-mfloat-abi=type)"
-ac_help="$ac_help
-  --with-soft-float[[=yes|no|toolchain-default]]
-                           Use soft float library (-msoft-float)"
-ac_help="$ac_help
-  --with-symbian-sdk=SYMBIAN_SDK_DIR
-                          The path to the Symbian SDK"
-ac_help="$ac_help
-  --with-ccache[=path/to/ccache]
-                          Enable compiling with ccache"
-ac_help="$ac_help
-  --enable-strip          Enable stripping of shared libs and programs"
-ac_help="$ac_help
-  --with-pthreads         Use system pthreads library as thread subsystem"
-ac_help="$ac_help
-  --enable-user-pthreads  Build using userland pthreads"
-ac_help="$ac_help
-  --enable-nspr-threads   Build using classic nspr threads"
-ac_help="$ac_help
-  --with-bthreads         Use system bthreads library as thread subsystem
-                          (BeOS only)"
-ac_help="$ac_help
-  --enable-ipv6           Compile ipv6 support"
-ac_help="$ac_help
-  --enable-wrap-malloc    Wrap malloc calls (gnu linker only)"
-ac_help="$ac_help
-  --with-wrap-malloc=SHAREDLIB  Location of malloc wrapper library"
-
-# Initialize some variables set by options.
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
-exec_prefix=NONE
-host=NONE
-no_create=
-nonopt=NONE
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-target=NONE
-verbose=
-x_includes=NONE
-x_libraries=NONE
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-# 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
-do
-
-  # If the previous option needs an argument, assign it.
-  if test -n "$ac_prev"; then
-    eval "$ac_prev=\$ac_option"
-    ac_prev=
-    continue
-  fi
-
-  case "$ac_option" in
-  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
-  *) ac_optarg= ;;
-  esac
-
-  # Accept the important Cygnus configure options, so we can diagnose typos.
-
-  case "$ac_option" in
-
-  -bindir | --bindir | --bindi | --bind | --bin | --bi)
-    ac_prev=bindir ;;
-  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
-    bindir="$ac_optarg" ;;
-
-  -build | --build | --buil | --bui | --bu)
-    ac_prev=build ;;
-  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
-    build="$ac_optarg" ;;
-
-  -cache-file | --cache-file | --cache-fil | --cache-fi \
-  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
-    ac_prev=cache_file ;;
-  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
-  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
-    cache_file="$ac_optarg" ;;
-
-  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
-    ac_prev=datadir ;;
-  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
-  | --da=*)
-    datadir="$ac_optarg" ;;
-
-  -disable-* | --disable-*)
-    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
-      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
-    fi
-    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
-    eval "enable_${ac_feature}=no" ;;
-
-  -enable-* | --enable-*)
-    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
-      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
-    fi
-    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
-    case "$ac_option" in
-      *=*) ;;
-      *) ac_optarg=yes ;;
-    esac
-    eval "enable_${ac_feature}='$ac_optarg'" ;;
-
-  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
-  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
-  | --exec | --exe | --ex)
-    ac_prev=exec_prefix ;;
-  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
-  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
-  | --exec=* | --exe=* | --ex=*)
-    exec_prefix="$ac_optarg" ;;
-
-  -gas | --gas | --ga | --g)
-    # Obsolete; use --with-gas.
-    with_gas=yes ;;
-
-  -help | --help | --hel | --he)
-    # Omit some internal or obsolete options to make the list less imposing.
-    # This message is too long to be a string in the A/UX 3.1 sh.
-    cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
-  --cache-file=FILE       cache test results in FILE
-  --help                  print this message
-  --no-create             do not create output files
-  --quiet, --silent       do not print \`checking...' messages
-  --version               print the version of autoconf that created configure
-Directory and file names:
-  --prefix=PREFIX         install architecture-independent files in PREFIX
-                          [$ac_default_prefix]
-  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
-                          [same as prefix]
-  --bindir=DIR            user executables in DIR [EPREFIX/bin]
-  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
-  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
-  --datadir=DIR           read-only architecture-independent data in DIR
-                          [PREFIX/share]
-  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
-  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
-                          [PREFIX/com]
-  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
-  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
-  --includedir=DIR        C header files in DIR [PREFIX/include]
-  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
-  --infodir=DIR           info documentation in DIR [PREFIX/info]
-  --mandir=DIR            man documentation in DIR [PREFIX/man]
-  --srcdir=DIR            find the sources in DIR [configure dir or ..]
-  --program-prefix=PREFIX prepend PREFIX to installed program names
-  --program-suffix=SUFFIX append SUFFIX to installed program names
-  --program-transform-name=PROGRAM
-                          run sed PROGRAM on installed program names
-EOF
-    cat << EOF
-Host type:
-  --build=BUILD           configure for building on BUILD [BUILD=HOST]
-  --host=HOST             configure for HOST [guessed]
-  --target=TARGET         configure for TARGET [TARGET=HOST]
-Features and packages:
-  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
-  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
-  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
-  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
-  --x-includes=DIR        X include files are in DIR
-  --x-libraries=DIR       X library files are in DIR
-EOF
-    if test -n "$ac_help"; then
-      echo "--enable and --with options recognized:$ac_help"
-    fi
-    exit 0 ;;
-
-  -host | --host | --hos | --ho)
-    ac_prev=host ;;
-  -host=* | --host=* | --hos=* | --ho=*)
-    host="$ac_optarg" ;;
-
-  -includedir | --includedir | --includedi | --included | --include \
-  | --includ | --inclu | --incl | --inc)
-    ac_prev=includedir ;;
-  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
-  | --includ=* | --inclu=* | --incl=* | --inc=*)
-    includedir="$ac_optarg" ;;
-
-  -infodir | --infodir | --infodi | --infod | --info | --inf)
-    ac_prev=infodir ;;
-  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
-    infodir="$ac_optarg" ;;
-
-  -libdir | --libdir | --libdi | --libd)
-    ac_prev=libdir ;;
-  -libdir=* | --libdir=* | --libdi=* | --libd=*)
-    libdir="$ac_optarg" ;;
-
-  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
-  | --libexe | --libex | --libe)
-    ac_prev=libexecdir ;;
-  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
-  | --libexe=* | --libex=* | --libe=*)
-    libexecdir="$ac_optarg" ;;
-
-  -localstatedir | --localstatedir | --localstatedi | --localstated \
-  | --localstate | --localstat | --localsta | --localst \
-  | --locals | --local | --loca | --loc | --lo)
-    ac_prev=localstatedir ;;
-  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
-  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
-  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
-    localstatedir="$ac_optarg" ;;
-
-  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
-    ac_prev=mandir ;;
-  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
-    mandir="$ac_optarg" ;;
-
-  -nfp | --nfp | --nf)
-    # Obsolete; use --without-fp.
-    with_fp=no ;;
-
-  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
-  | --no-cr | --no-c)
-    no_create=yes ;;
-
-  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
-  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
-    no_recursion=yes ;;
-
-  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
-  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
-  | --oldin | --oldi | --old | --ol | --o)
-    ac_prev=oldincludedir ;;
-  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
-  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
-  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
-    oldincludedir="$ac_optarg" ;;
-
-  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
-    ac_prev=prefix ;;
-  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
-    prefix="$ac_optarg" ;;
-
-  -program-prefix | --program-prefix | --program-prefi | --program-pref \
-  | --program-pre | --program-pr | --program-p)
-    ac_prev=program_prefix ;;
-  -program-prefix=* | --program-prefix=* | --program-prefi=* \
-  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
-    program_prefix="$ac_optarg" ;;
-
-  -program-suffix | --program-suffix | --program-suffi | --program-suff \
-  | --program-suf | --program-su | --program-s)
-    ac_prev=program_suffix ;;
-  -program-suffix=* | --program-suffix=* | --program-suffi=* \
-  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
-    program_suffix="$ac_optarg" ;;
-
-  -program-transform-name | --program-transform-name \
-  | --program-transform-nam | --program-transform-na \
-  | --program-transform-n | --program-transform- \
-  | --program-transform | --program-transfor \
-  | --program-transfo | --program-transf \
-  | --program-trans | --program-tran \
-  | --progr-tra | --program-tr | --program-t)
-    ac_prev=program_transform_name ;;
-  -program-transform-name=* | --program-transform-name=* \
-  | --program-transform-nam=* | --program-transform-na=* \
-  | --program-transform-n=* | --program-transform-=* \
-  | --program-transform=* | --program-transfor=* \
-  | --program-transfo=* | --program-transf=* \
-  | --program-trans=* | --program-tran=* \
-  | --progr-tra=* | --program-tr=* | --program-t=*)
-    program_transform_name="$ac_optarg" ;;
-
-  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
-  | -silent | --silent | --silen | --sile | --sil)
-    silent=yes ;;
-
-  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
-    ac_prev=sbindir ;;
-  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
-  | --sbi=* | --sb=*)
-    sbindir="$ac_optarg" ;;
-
-  -sharedstatedir | --sharedstatedir | --sharedstatedi \
-  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
-  | --sharedst | --shareds | --shared | --share | --shar \
-  | --sha | --sh)
-    ac_prev=sharedstatedir ;;
-  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
-  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
-  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
-  | --sha=* | --sh=*)
-    sharedstatedir="$ac_optarg" ;;
-
-  -site | --site | --sit)
-    ac_prev=site ;;
-  -site=* | --site=* | --sit=*)
-    site="$ac_optarg" ;;
-
-  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
-    ac_prev=srcdir ;;
-  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
-    srcdir="$ac_optarg" ;;
-
-  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
-  | --syscon | --sysco | --sysc | --sys | --sy)
-    ac_prev=sysconfdir ;;
-  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
-  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
-    sysconfdir="$ac_optarg" ;;
-
-  -target | --target | --targe | --targ | --tar | --ta | --t)
-    ac_prev=target ;;
-  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
-    target="$ac_optarg" ;;
-
-  -v | -verbose | --verbose | --verbos | --verbo | --verb)
-    verbose=yes ;;
-
-  -version | --version | --versio | --versi | --vers)
-    echo "configure generated by autoconf version 2.13"
-    exit 0 ;;
-
-  -with-* | --with-*)
-    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
-      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
-    fi
-    ac_package=`echo $ac_package| sed 's/-/_/g'`
-    case "$ac_option" in
-      *=*) ;;
-      *) ac_optarg=yes ;;
-    esac
-    eval "with_${ac_package}='$ac_optarg'" ;;
-
-  -without-* | --without-*)
-    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
-      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
-    fi
-    ac_package=`echo $ac_package| sed 's/-/_/g'`
-    eval "with_${ac_package}=no" ;;
-
-  --x)
-    # Obsolete; use --with-x.
-    with_x=yes ;;
-
-  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
-  | --x-incl | --x-inc | --x-in | --x-i)
-    ac_prev=x_includes ;;
-  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
-  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
-    x_includes="$ac_optarg" ;;
-
-  -x-libraries | --x-libraries | --x-librarie | --x-librari \
-  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
-    ac_prev=x_libraries ;;
-  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
-  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
-    x_libraries="$ac_optarg" ;;
-
-  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
-    ;;
-
-  *)
-    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
-      echo "configure: warning: $ac_option: invalid host type" 1>&2
-    fi
-    if test "x$nonopt" != xNONE; then
-      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
-    fi
-    nonopt="$ac_option"
-    ;;
-
-  esac
-done
-
-if test -n "$ac_prev"; then
-  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
-fi
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
-  exec 6>/dev/null
-else
-  exec 6>&1
-fi
-exec 5>./config.log
-
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
-
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
-do
-  case "$ac_arg" in
-  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
-  | --no-cr | --no-c) ;;
-  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
-  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
-  *" "*|*"     "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
-  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
-  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
-  esac
-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
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
-
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=config/libc_r.h
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
-  ac_srcdir_defaulted=yes
-  # Try the directory containing this script, then its parent.
-  ac_prog=$0
-  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
-  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
-  srcdir=$ac_confdir
-  if test ! -r $srcdir/$ac_unique_file; then
-    srcdir=..
-  fi
-else
-  ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
-  if test "$ac_srcdir_defaulted" = yes; then
-    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
-  else
-    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
-  fi
-fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
-
-# Prefer explicitly selected file to automatically selected ones.
-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
-fi
-for ac_site_file in $CONFIG_SITE; do
-  if test -r "$ac_site_file"; then
-    echo "loading site script $ac_site_file"
-    . "$ac_site_file"
-  fi
-done
-
-if test -r "$cache_file"; then
-  echo "loading cache $cache_file"
-  . $cache_file
-else
-  echo "creating cache $cache_file"
-  > $cache_file
-fi
-
-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
-
-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
-    ac_n= ac_c='
-' ac_t='       '
-  else
-    ac_n=-n ac_c= ac_t=
-  fi
-else
-  ac_n= ac_c='\c' ac_t=
-fi
-
-
-
-ac_aux_dir=
-for ac_dir in ${srcdir}/build/autoconf $srcdir/${srcdir}/build/autoconf; do
-  if test -f $ac_dir/install-sh; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/install-sh -c"
-    break
-  elif test -f $ac_dir/install.sh; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/install.sh -c"
-    break
-  fi
-done
-if test -z "$ac_aux_dir"; then
-  { echo "configure: error: can not find install-sh or install.sh in ${srcdir}/build/autoconf $srcdir/${srcdir}/build/autoconf" 1>&2; exit 1; }
-fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
-
-
-# Do some error checking and defaulting for the host and target type.
-# The inputs are:
-#    configure --host=HOST --target=TARGET --build=BUILD NONOPT
-#
-# The rules are:
-# 1. You are not allowed to specify --host, --target, and nonopt at the
-#    same time.
-# 2. Host defaults to nonopt.
-# 3. If nonopt is not specified, then host defaults to the current host,
-#    as determined by config.guess.
-# 4. Target and build default to nonopt.
-# 5. If nonopt is not specified, then target and build default to host.
-
-# The aliases save the names the user supplied, while $host etc.
-# will get canonicalized.
-case $host---$target---$nonopt in
-NONE---*---* | *---NONE---* | *---*---NONE) ;;
-*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
-esac
-
-
-# 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:676: 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:697: checking target system type" >&5
-
-target_alias=$target
-case "$target_alias" in
-NONE)
-  case $nonopt in
-  NONE) target_alias=$host_alias ;;
-  *) target_alias=$nonopt ;;
-  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:715: checking build system type" >&5
-
-build_alias=$build
-case "$build_alias" in
-NONE)
-  case $nonopt in
-  NONE) build_alias=$host_alias ;;
-  *) build_alias=$nonopt ;;
-  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" &&
-  test "$program_prefix$program_suffix$program_transform_name" = \
-    NONENONEs,x,x, &&
-  program_prefix=${target_alias}-
-
-
-MOD_MAJOR_VERSION=4
-MOD_MINOR_VERSION=10
-MOD_PATCH_VERSION=2
-NSPR_MODNAME=nspr20
-_HAVE_PTHREADS=
-USE_PTHREADS=
-USE_USER_PTHREADS=
-USE_NSPR_THREADS=
-USE_N32=
-USE_64=
-USE_CPLUS=
-USE_IPV6=
-USE_MDUPDATE=
-_MACOSX_DEPLOYMENT_TARGET=
-_OPTIMIZE_FLAGS=-O
-_DEBUG_FLAGS=-g
-MOZ_DEBUG=1
-MOZ_OPTIMIZE=
-OBJDIR='$(OBJDIR_NAME)'
-OBJDIR_NAME=.
-OBJDIR_SUFFIX=OBJ
-NSINSTALL='$(MOD_DEPTH)/config/$(OBJDIR_NAME)/nsinstall'
-NOSUCHFILE=/no-such-file
-LIBNSPR='-L$(dist_libdir) -lnspr$(MOD_MAJOR_VERSION)'
-LIBPLC='-L$(dist_libdir) -lplc$(MOD_MAJOR_VERSION)'
-CYGWIN_WRAPPER=
-MACOS_SDK_DIR=
-NEXT_ROOT=
-MT=
-MOZ_OS2_HIGH_MEMORY=1
-PROFILE_GEN_CFLAGS=
-PROFILE_GEN_LDFLAGS=
-PROFILE_USE_CFLAGS=
-PROFILE_USE_LDFLAGS=
-
-RESOLVE_LINK_SYMBOLS=
-
-CFLAGS="${CFLAGS=}"
-CXXFLAGS="${CXXFLAGS=}"
-LDFLAGS="${LDFLAGS=}"
-DLLFLAGS="${DLLFLAGS=}"
-HOST_CFLAGS="${HOST_CFLAGS=}"
-HOST_LDFLAGS="${HOST_LDFLAGS=}"
-
-case "$target" in
-*-cygwin*|*-mingw*)
-    # Check to see if we are really running in a msvc environemnt
-    _WIN32_MSVC=
-    for ac_prog in 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:791: 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="$ac_prog"
-      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
-
-test -n "$CC" && break
-done
-
-    if test "$CC" = "cl"; then
-        echo 'main() { return 0; }' > dummy.c
-        ${CC} -o dummy dummy.c >/dev/null 2>&1
-        if test $? = 0; then
-            _WIN32_MSVC=1
-            CXX=$CC
-        else
-            echo "configure: warning: $(CC) test failed.  Using normal feature tests" 1>&2
-        fi
-        rm -f dummy dummy.o dummy.obj dummy.exe dummy.c
-    fi
-    ;;
-*-msvc*)
-    _WIN32_MSVC=1
-    ;;
-*-mks*)
-    _WIN32_MSVC=1
-    ;;
-esac
-
-if test -n "$_WIN32_MSVC"; then
-    SKIP_PATH_CHECKS=1
-    SKIP_COMPILER_CHECKS=1
-    SKIP_LIBRARY_CHECKS=1
-fi
-
-
-# Check whether --with-android-ndk or --without-android-ndk was given.
-if test "${with_android_ndk+set}" = set; then
-  withval="$with_android_ndk"
-  android_ndk=$withval
-fi
-
-
-# Check whether --with-android-toolchain or --without-android-toolchain was given.
-if test "${with_android_toolchain+set}" = set; then
-  withval="$with_android_toolchain"
-  android_toolchain=$withval
-fi
-
-
-case "$target_cpu" in
-arm)
-    android_version=5
-    ;;
-i?86|mipsel)
-    android_version=9
-    ;;
-esac
-
-# Check whether --with-android-version or --without-android-version was given.
-if test "${with_android_version+set}" = set; then
-  withval="$with_android_version"
-  android_version=$withval
-fi
-
-
-# Check whether --with-android-platform or --without-android-platform was given.
-if test "${with_android_platform+set}" = set; then
-  withval="$with_android_platform"
-  android_platform=$withval
-fi
-
-
-case "$target" in
-arm-linux*-android*|*-linuxandroid*)
-    android_tool_prefix="arm-linux-androideabi"
-    ;;
-i?86-*android*)
-    android_tool_prefix="i686-linux-android"
-    ;;
-mipsel-*android*)
-    android_tool_prefix="mipsel-linux-android"
-    ;;
-*)
-    android_tool_prefix="$target_os"
-    ;;
-esac
-
-
-# Check whether --with-gonk or --without-gonk was given.
-if test "${with_gonk+set}" = set; then
-  withval="$with_gonk"
-  gonkdir=$withval
-fi
-
-
-if test -n "$gonkdir" ; then
-    
-        if test -z "$HOST_CPPFLAGS" ; then
-        HOST_CPPFLAGS=" "
-    fi
-    if test -z "$HOST_CFLAGS" ; then
-        HOST_CFLAGS=" "
-    fi
-    if test -z "$HOST_CXXFLAGS" ; then
-        HOST_CXXFLAGS=" "
-    fi
-    if test -z "$HOST_LDFLAGS" ; then
-        HOST_LDFLAGS=" "
-    fi
-
-    cat >> confdefs.h <<\EOF
-#define ANDROID 1
-EOF
-
-else
-case "$target" in
-*-android*|*-linuxandroid*)
-    if test -z "$android_ndk" ; then
-       { echo "configure: error: You must specify --with-android-ndk=/path/to/ndk when targeting Android." 1>&2; exit 1; }
-    fi
-
-    if test -z "$android_toolchain" ; then
-        echo $ac_n "checking for android toolchain directory""... $ac_c" 1>&6
-echo "configure:935: checking for android toolchain directory" >&5
-
-        kernel_name=`uname -s | tr "[:upper:]" "[:lower:]"`
-
-        case "$target_cpu" in
-        arm)
-            target_name=arm-linux-androideabi-4.4.3
-            ;;
-        i?86)
-            target_name=x86-4.4.3
-            ;;
-        mipsel)
-            target_name=mipsel-linux-android-4.4.3
-            ;;
-        esac
-        android_toolchain="$android_ndk"/toolchains/$target_name/prebuilt/$kernel_name-x86
-
-        if test -d "$android_toolchain" ; then
-            echo "$ac_t""$android_toolchain" 1>&6
-        else
-            { echo "configure: error: not found. You have to specify --with-android-toolchain=/path/to/ndk/toolchain." 1>&2; exit 1; }
-        fi
-    fi
-
-    if test -z "$android_platform" ; then
-        echo $ac_n "checking for android platform directory""... $ac_c" 1>&6
-echo "configure:961: checking for android platform directory" >&5
-
-        case "$target_cpu" in
-        arm)
-            target_name=arm
-            ;;
-        i?86)
-            target_name=x86
-            ;;
-        mipsel)
-            target_name=mips
-            ;;
-        esac
-
-        android_platform="$android_ndk"/platforms/android-"$android_version"/arch-"$target_name"
-
-        if test -d "$android_platform" ; then
-            echo "$ac_t""$android_platform" 1>&6
-        else
-            { echo "configure: error: not found. You have to specify --with-android-platform=/path/to/ndk/platform." 1>&2; exit 1; }
-        fi
-    fi
-
-            case "$target_cpu" in
-    i?86)
-        if ! test -e "$android_toolchain"/bin/"$android_tool_prefix"-gcc; then
-                        android_tool_prefix="i686-android-linux"
-        fi
-        ;;
-    esac
-
-        AS="$android_toolchain"/bin/"$android_tool_prefix"-as
-    CC="$android_toolchain"/bin/"$android_tool_prefix"-gcc
-    CXX="$android_toolchain"/bin/"$android_tool_prefix"-g++
-    CPP="$android_toolchain"/bin/"$android_tool_prefix"-cpp
-    LD="$android_toolchain"/bin/"$android_tool_prefix"-ld
-    AR="$android_toolchain"/bin/"$android_tool_prefix"-ar
-    RANLIB="$android_toolchain"/bin/"$android_tool_prefix"-ranlib
-    STRIP="$android_toolchain"/bin/"$android_tool_prefix"-strip
-
-    CPPFLAGS="-I$android_platform/usr/include $CPPFLAGS"
-    CFLAGS="-mandroid -I$android_platform/usr/include -fno-short-enums -fno-exceptions $CFLAGS"
-    CXXFLAGS="-mandroid -I$android_platform/usr/include -fpic -fno-short-enums -fno-exceptions $CXXFLAGS"
-    LDFLAGS="-mandroid -L$android_platform/usr/lib -Wl,-rpath-link=$android_platform/usr/lib --sysroot=$android_platform $LDFLAGS"
-
-        if test -z "$HOST_CPPFLAGS" ; then
-        HOST_CPPFLAGS=" "
-    fi
-    if test -z "$HOST_CFLAGS" ; then
-        HOST_CFLAGS=" "
-    fi
-    if test -z "$HOST_CXXFLAGS" ; then
-        HOST_CXXFLAGS=" "
-    fi
-    if test -z "$HOST_LDFLAGS" ; then
-        HOST_LDFLAGS=" "
-    fi
-
-    cat >> confdefs.h <<\EOF
-#define ANDROID 1
-EOF
-
-    ;;
-esac
-fi
-
-dist_prefix='${MOD_DEPTH}/dist'
-dist_bindir='${dist_prefix}/bin'
-dist_includedir='${dist_prefix}/include/nspr'
-dist_libdir='${dist_prefix}/lib'
-if test "${includedir}" = '${prefix}/include'; then
-    includedir='${prefix}/include/nspr'
-fi
-
-# Check whether --with-dist-prefix or --without-dist-prefix was given.
-if test "${with_dist_prefix+set}" = set; then
-  withval="$with_dist_prefix"
-  dist_prefix=$withval
-fi
-
-
-# Check whether --with-dist-bindir or --without-dist-bindir was given.
-if test "${with_dist_bindir+set}" = set; then
-  withval="$with_dist_bindir"
-  dist_bindir=$withval
-fi
-
-
-# Check whether --with-dist-includedir or --without-dist-includedir was given.
-if test "${with_dist_includedir+set}" = set; then
-  withval="$with_dist_includedir"
-  dist_includedir=$withval
-fi
-
-
-# Check whether --with-dist-libdir or --without-dist-libdir was given.
-if test "${with_dist_libdir+set}" = set; then
-  withval="$with_dist_libdir"
-  dist_libdir=$withval
-fi
-
-
-
-
-
-
-
-# Check whether --with-mozilla or --without-mozilla was given.
-if test "${with_mozilla+set}" = set; then
-  withval="$with_mozilla"
-     if test "$withval" = "yes"; then
-            cat >> confdefs.h <<\EOF
-#define MOZILLA_CLIENT 1
-EOF
-
-            MOZILLA_CLIENT=1
-           else
-               MOZILLA_CLIENT=
-           fi
-else
-       if test -n "$MOZILLA_CLIENT"; then
-               cat >> confdefs.h <<\EOF
-#define MOZILLA_CLIENT 1
-EOF
-
-           fi
-fi
-
-
-# Check whether --enable-optimize or --disable-optimize was given.
-if test "${enable_optimize+set}" = set; then
-  enableval="$enable_optimize"
-   if test "$enableval" != "no"; then
-          MOZ_OPTIMIZE=1
-          if test -n "$enableval" -a "$enableval" != "yes"; then
-            _OPTIMIZE_FLAGS=`echo $enableval | sed -e 's|\\\ | |g'`
-            _SAVE_OPTIMIZE_FLAGS=$_OPTIMIZE_FLAGS
-          fi
-      else
-          MOZ_OPTIMIZE=
-      fi 
-fi
-
-
-# Check whether --enable-debug or --disable-debug was given.
-if test "${enable_debug+set}" = set; then
-  enableval="$enable_debug"
-   if test "$enableval" != "no"; then
-          MOZ_DEBUG=1
-          MOZ_DEBUG_SYMBOLS=1
-          if test -n "$enableval" -a "$enableval" != "yes"; then
-              _DEBUG_FLAGS=`echo $enableval | sed -e 's|\\\ | |g'`
-              _SAVE_DEBUG_FLAGS=$_DEBUG_FLAGS
-          fi
-      else
-          MOZ_DEBUG=
-      fi 
-else
-  MOZ_DEBUG_SYMBOLS=1
-fi
-
-
-# Check whether --enable-debug-symbols or --disable-debug-symbols was given.
-if test "${enable_debug_symbols+set}" = set; then
-  enableval="$enable_debug_symbols"
-   if test "$enableval" != "no"; then
-          MOZ_DEBUG_SYMBOLS=1
-          if test -n "$enableval" -a "$enableval" != "yes"; then
-              if test -z "$_SAVE_DEBUG_FLAGS"; then
-                  _DEBUG_FLAGS=`echo $enableval | sed -e 's|\\\ | |g'`
-                  _SAVE_DEBUG_FLAGS=$_DEBUG_FLAGS
-              else
-                  { echo "configure: error: --enable-debug-symbols flags cannot be used with --enable-debug flags" 1>&2; exit 1; }
-              fi
-          fi
-      else
-          MOZ_DEBUG_SYMBOLS=
-      fi 
-fi
-
-
-# Check whether --enable-win32-target or --disable-win32-target was given.
-if test "${enable_win32_target+set}" = set; then
-  enableval="$enable_win32_target"
-  OS_TARGET=`echo $enableval | tr a-z A-Z`
-fi
-
-
-# Check whether --enable-symbian-target or --disable-symbian-target was given.
-if test "${enable_symbian_target+set}" = set; then
-  enableval="$enable_symbian_target"
-  OS_TARGET=`echo $enableval | tr a-z A-Z`
-fi
-
-
-# Check whether --enable-debug-rtl or --disable-debug-rtl was given.
-if test "${enable_debug_rtl+set}" = set; then
-  enableval="$enable_debug_rtl"
-   if test "$enableval" = "yes"; then
-           USE_DEBUG_RTL=1
-      fi 
-fi
-
-
-# Check whether --enable-n32 or --disable-n32 was given.
-if test "${enable_n32+set}" = set; then
-  enableval="$enable_n32"
-   if test "$enableval" = "yes"; then
-       USE_N32=1
-      else if test "$enableval" = "no"; then
-       USE_N32=
-      fi
-    fi 
-fi
-
-
-# Check whether --enable-64bit or --disable-64bit was given.
-if test "${enable_64bit+set}" = set; then
-  enableval="$enable_64bit"
-   if test "$enableval" = "yes"; then
-           USE_64=1
-      fi 
-fi
-
-
-# Check whether --enable-mdupdate or --disable-mdupdate was given.
-if test "${enable_mdupdate+set}" = set; then
-  enableval="$enable_mdupdate"
-   if test "$enableval" = "yes"; then
-           USE_MDUPDATE=1
-      fi 
-fi
-
-
-# Check whether --enable-cplus or --disable-cplus was given.
-if test "${enable_cplus+set}" = set; then
-  enableval="$enable_cplus"
-   if test "$enableval" = "yes"; then
-           USE_CPLUS=1
-      fi
-fi
-
-# Check whether --with-arm-kuser or --without-arm-kuser was given.
-if test "${with_arm_kuser+set}" = set; then
-  withval="$with_arm_kuser"
-   if test "$withval" = "yes"; then
-           cat >> confdefs.h <<\EOF
-#define _PR_ARM_KUSER 1
-EOF
-
-      fi 
-fi
-
-
-# Check whether --with-macos-sdk or --without-macos-sdk was given.
-if test "${with_macos_sdk+set}" = set; then
-  withval="$with_macos_sdk"
-  MACOS_SDK_DIR=$withval
-fi
-
-
-# Check whether --enable-macos-target or --disable-macos-target was given.
-if test "${enable_macos_target+set}" = set; then
-  enableval="$enable_macos_target"
-  _MACOSX_DEPLOYMENT_TARGET=$enableval
-fi
-
-
-case "$target" in
-
-*-aix*)
-    case "${target_os}" in
-    aix3.2*)
-        USE_NSPR_THREADS=1
-        ;;
-    *)
-        USE_PTHREADS=1
-        ;;
-    esac
-    ;;
-
-esac
-
-if test -z "$CC"; then
-    case "$target" in
-
-    *-aix*)
-        if test -z "$USE_NSPR_THREADS"; then
-            CC=xlc_r
-        else
-            CC=xlc
-        fi
-    ;;
-
-    *-hpux*)
-        CC=cc
-    ;;
-
-    *-irix*)
-        CC=cc
-    ;;
-
-    *-osf*)
-        CC=cc
-    ;;
-
-    *-solaris*)
-        CC=cc
-    ;;
-
-    esac
-fi
-
-if test -z "$CXX"; then
-    case "$target" in
-
-    *-aix*)
-        if test -z "$USE_NSPR_THREADS"; then
-            CXX=xlC_r
-        else
-            CXX=xlC
-        fi
-    ;;
-
-    *-hpux*)
-        case "${target_os}" in
-        hpux10.30)
-            CXX=aCC
-            ;;
-        hpux11.*)
-            CXX=aCC
-            ;;
-        *)
-            CXX=CC
-            ;;
-        esac
-    ;;
-
-    *-irix*)
-        CXX=CC
-    ;;
-
-    *-osf*)
-        CXX=cxx
-    ;;
-
-    *-solaris*)
-        CXX=CC
-    ;;
-
-    esac
-fi
-
-if test -z "$SKIP_PATH_CHECKS"; then
-    # Extract the first word of "$WHOAMI whoami", so it can be a program name with args.
-set dummy $WHOAMI whoami; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1319: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_WHOAMI'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  case "$WHOAMI" in
-  /*)
-  ac_cv_path_WHOAMI="$WHOAMI" # Let the user override the test with a path.
-  ;;
-  ?:/*)                         
-  ac_cv_path_WHOAMI="$WHOAMI" # Let the user override the test with a dos path.
-  ;;
-  *)
-  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_path_WHOAMI="$ac_dir/$ac_word"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_path_WHOAMI" && ac_cv_path_WHOAMI="echo not_whoami"
-  ;;
-esac
-fi
-WHOAMI="$ac_cv_path_WHOAMI"
-if test -n "$WHOAMI"; then
-  echo "$ac_t""$WHOAMI" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-fi
-
-if test -n "$MOZ_DEBUG"; then
-    cat >> confdefs.h <<\EOF
-#define DEBUG 1
-EOF
-
-    DEFINES="$DEFINES -UNDEBUG"
-
-    case "${target_os}" in
-    beos*)
-        DEFINES="$DEFINES -DDEBUG_${USER}"
-        ;;
-    msvc*|mks*|cygwin*|mingw*|wince*|winmo*|os2*)
-        DEFINES="$DEFINES -DDEBUG_`echo ${USERNAME} | sed -e 's| |_|g'`"
-        ;;
-    *) 
-        DEFINES="$DEFINES -DDEBUG_`$WHOAMI`"
-        ;;
-    esac
-else
-    cat >> confdefs.h <<\EOF
-#define NDEBUG 1
-EOF
-
-    DEFINES="$DEFINES -UDEBUG"
-fi
-
-if test -z "$SKIP_COMPILER_CHECKS"; then
-
-if test "$target" != "$host" -o -n "$CROSS_COMPILE"; then
-    echo "cross compiling from $host to $target"
-    cross_compiling=yes
-
-    _SAVE_CC="$CC"
-    _SAVE_CFLAGS="$CFLAGS"
-    _SAVE_LDFLAGS="$LDFLAGS"
-
-    echo $ac_n "checking for $host compiler""... $ac_c" 1>&6
-echo "configure:1391: checking for $host compiler" >&5
-    for ac_prog in $HOST_CC gcc cc /usr/ucb/cc
-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:1397: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_HOST_CC'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$HOST_CC"; then
-  ac_cv_prog_HOST_CC="$HOST_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_HOST_CC="$ac_prog"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-HOST_CC="$ac_cv_prog_HOST_CC"
-if test -n "$HOST_CC"; then
-  echo "$ac_t""$HOST_CC" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-test -n "$HOST_CC" && break
-done
-test -n "$HOST_CC" || HOST_CC=""""
-
-    if test -z "$HOST_CC"; then
-        { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
-    fi
-    echo "$ac_t""$HOST_CC" 1>&6
-    if test -z "$HOST_CFLAGS"; then
-        HOST_CFLAGS="$CFLAGS"
-    fi
-    if test -z "$HOST_LDFLAGS"; then
-        HOST_LDFLAGS="$LDFLAGS"
-    fi
-
-    CC="$HOST_CC"
-    CFLAGS="$HOST_CFLAGS"
-    LDFLAGS="$HOST_LDFLAGS"
-
-    echo $ac_n "checking whether the $host compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1443: checking whether the $host compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works" >&5
-    cat > conftest.$ac_ext <<EOF
-#line 1445 "configure"
-#include "confdefs.h"
-
-int main() {
-return 0;
-; return 0; }
-EOF
-if { (eval echo configure:1452: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  echo "$ac_t""yes" 1>&6
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  { echo "configure: error: installation or configuration problem: $host compiler $HOST_CC cannot create executables." 1>&2; exit 1; } 
-fi
-rm -f conftest*
-
-    CC=$_SAVE_CC
-    CFLAGS=$_SAVE_CFLAGS
-    LDFLAGS=$_SAVE_LDFLAGS
-
-    case "$build:$target" in 
-      powerpc-apple-darwin8*:i?86-apple-darwin*)
-                                                _SAVE_CFLAGS=$CFLAGS 
-        _SAVE_CXXFLAGS=$CXXFLAGS
-        CFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk $CFLAGS"
-        CXXFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk $CXXFLAGS"
-        ;;
-      *:arm*-apple-darwin*)
-                                _SAVE_CFLAGS=$CFLAGS
-        _SAVE_CXXFLAGS=$CXXFLAGS
-        CFLAGS="-isysroot $MACOS_SDK_DIR $CFLAGS"
-        CXXFLAGS="-isysroot $MACOS_SDK_DIR $CXXFLAGS"
-        ;;
-    esac
-
-    for ac_prog in $CC "${target_alias}-gcc" "${target}-gcc"
-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:1487: 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="$ac_prog"
-      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
-
-test -n "$CC" && break
-done
-test -n "$CC" || CC="echo"
-
-    unset ac_cv_prog_CC
-    # 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:1521: 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"
-      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
-
-if test -z "$CC"; then
-  # 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:1551: 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
-        ac_prog_rejected=yes
-       continue
-      fi
-      ac_cv_prog_CC="cc"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-if test $ac_prog_rejected = yes; then
-  # We found a bogon in the path, so make sure we never use it.
-  set dummy $ac_cv_prog_CC
-  shift
-  if test $# -gt 0; then
-    # We chose a different compiler from the bogus one.
-    # However, it has the same basename, so the bogon will be chosen
-    # first if we set CC to just the basename; use the full file name.
-    shift
-    set dummy "$ac_dir/$ac_word" "$@"
-    shift
-    ac_cv_prog_CC="$@"
-  fi
-fi
-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
-
-  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:1602: 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:1634: 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 1645 "configure"
-#include "confdefs.h"
-
-main(){return(0);}
-EOF
-if { (eval echo configure:1650: \"$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:1676: 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:1681: 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
-  cat > conftest.c <<EOF
-#ifdef __GNUC__
-  yes;
-#endif
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1690: \"$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
-fi
-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:1709: 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
-
-    if test -n "$USE_CPLUS"; then
-        for ac_prog in $CXX "${target_alias}-g++" "${target}-g++"
-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:1746: 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"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-CXX="$ac_cv_prog_CXX"
-if test -n "$CXX"; then
-  echo "$ac_t""$CXX" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-test -n "$CXX" && break
-done
-test -n "$CXX" || CXX="echo"
-
-        unset ac_cv_prog_CXX
-        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:1782: 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"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-CXX="$ac_cv_prog_CXX"
-if test -n "$CXX"; then
-  echo "$ac_t""$CXX" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-test -n "$CXX" && break
-done
-test -n "$CXX" || CXX="gcc"
-
-
-echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1814: 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 1825 "configure"
-#include "confdefs.h"
-
-int main(){return(0);}
-EOF
-if { (eval echo configure:1830: \"$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:1856: 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:1861: 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
-  cat > conftest.C <<EOF
-#ifdef __GNUC__
-  yes;
-#endif
-EOF
-if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1870: \"$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
-fi
-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:1889: 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
-
-    fi
-
-    case "$build:$target" in
-      powerpc-apple-darwin8*:i?86-apple-darwin*|*:arm*-apple-darwin*)
-                                CFLAGS=$_SAVE_CFLAGS
-        CXXFLAGS=$_SAVE_CXXFLAGS
-        ;;
-    esac
-
-    for ac_prog in $RANLIB "${target_alias}-ranlib" "${target}-ranlib"
-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:1934: 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="$ac_prog"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
-  echo "$ac_t""$RANLIB" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-test -n "$RANLIB" && break
-done
-test -n "$RANLIB" || RANLIB="echo"
-
-    for ac_prog in $AR "${target_alias}-ar" "${target}-ar"
-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:1969: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$AR"; then
-  ac_cv_prog_AR="$AR" # 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_AR="$ac_prog"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-AR="$ac_cv_prog_AR"
-if test -n "$AR"; then
-  echo "$ac_t""$AR" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-test -n "$AR" && break
-done
-test -n "$AR" || AR="echo"
-
-    for ac_prog in $AS "${target_alias}-as" "${target}-as"
-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:2004: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$AS"; then
-  ac_cv_prog_AS="$AS" # 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_AS="$ac_prog"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-AS="$ac_cv_prog_AS"
-if test -n "$AS"; then
-  echo "$ac_t""$AS" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-test -n "$AS" && break
-done
-test -n "$AS" || AS="echo"
-
-    for ac_prog in $LD "${target_alias}-ld" "${target}-ld"
-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:2039: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_LD'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$LD"; then
-  ac_cv_prog_LD="$LD" # 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_LD="$ac_prog"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-LD="$ac_cv_prog_LD"
-if test -n "$LD"; then
-  echo "$ac_t""$LD" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-test -n "$LD" && break
-done
-test -n "$LD" || LD="echo"
-
-    for ac_prog in $STRIP "${target_alias}-strip" "${target}-strip"
-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:2074: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$STRIP"; then
-  ac_cv_prog_STRIP="$STRIP" # 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_STRIP="$ac_prog"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-STRIP="$ac_cv_prog_STRIP"
-if test -n "$STRIP"; then
-  echo "$ac_t""$STRIP" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-test -n "$STRIP" && break
-done
-test -n "$STRIP" || STRIP="echo"
-
-    for ac_prog in $WINDRES "${target_alias}-windres" "${target}-windres"
-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:2109: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$WINDRES"; then
-  ac_cv_prog_WINDRES="$WINDRES" # 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_WINDRES="$ac_prog"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-WINDRES="$ac_cv_prog_WINDRES"
-if test -n "$WINDRES"; then
-  echo "$ac_t""$WINDRES" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-test -n "$WINDRES" && break
-done
-test -n "$WINDRES" || WINDRES="echo"
-
-
-else
-    # 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:2144: 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"
-      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
-
-if test -z "$CC"; then
-  # 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:2174: 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
-        ac_prog_rejected=yes
-       continue
-      fi
-      ac_cv_prog_CC="cc"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-if test $ac_prog_rejected = yes; then
-  # We found a bogon in the path, so make sure we never use it.
-  set dummy $ac_cv_prog_CC
-  shift
-  if test $# -gt 0; then
-    # We chose a different compiler from the bogus one.
-    # However, it has the same basename, so the bogon will be chosen
-    # first if we set CC to just the basename; use the full file name.
-    shift
-    set dummy "$ac_dir/$ac_word" "$@"
-    shift
-    ac_cv_prog_CC="$@"
-  fi
-fi
-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
-
-  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:2225: 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:2257: 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 2268 "configure"
-#include "confdefs.h"
-
-main(){return(0);}
-EOF
-if { (eval echo configure:2273: \"$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:2299: 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:2304: 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
-  cat > conftest.c <<EOF
-#ifdef __GNUC__
-  yes;
-#endif
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2313: \"$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
-fi
-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:2332: 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
-
-    if test -n "$USE_CPLUS"; then
-        if test "$CC" = "cl" -a -z "$CXX"; then
-            CXX=$CC
-        else        
-            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:2372: 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"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-CXX="$ac_cv_prog_CXX"
-if test -n "$CXX"; then
-  echo "$ac_t""$CXX" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-test -n "$CXX" && break
-done
-test -n "$CXX" || CXX="gcc"
-
-
-echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:2404: 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 2415 "configure"
-#include "confdefs.h"
-
-int main(){return(0);}
-EOF
-if { (eval echo configure:2420: \"$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:2446: 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:2451: 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
-  cat > conftest.C <<EOF
-#ifdef __GNUC__
-  yes;
-#endif
-EOF
-if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:2460: \"$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
-fi
-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:2479: 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
-
-        fi
-    fi
-    echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:2513: checking how to run the C preprocessor" >&5
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
-  CPP=
-fi
-if test -z "$CPP"; then
-if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-    # This must be in double quotes, not single quotes, because CPP may get
-  # substituted into the Makefile and "${CC-cc}" will confuse make.
-  CPP="${CC-cc} -E"
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp.
-  cat > conftest.$ac_ext <<EOF
-#line 2528 "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:2534: \"$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 2545 "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:2551: \"$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 2562 "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:2568: \"$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"
-else
-  ac_cv_prog_CPP="$CPP"
-fi
-echo "$ac_t""$CPP" 1>&6
-
-    # 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:2595: 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"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
-  echo "$ac_t""$RANLIB" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-    for ac_prog in as
-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:2627: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_AS'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  case "$AS" in
-  /*)
-  ac_cv_path_AS="$AS" # Let the user override the test with a path.
-  ;;
-  ?:/*)                         
-  ac_cv_path_AS="$AS" # Let the user override the test with a dos path.
-  ;;
-  *)
-  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_path_AS="$ac_dir/$ac_word"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  ;;
-esac
-fi
-AS="$ac_cv_path_AS"
-if test -n "$AS"; then
-  echo "$ac_t""$AS" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-test -n "$AS" && break
-done
-test -n "$AS" || AS="$CC"
-
-    for ac_prog in ar
-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:2668: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_AR'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  case "$AR" in
-  /*)
-  ac_cv_path_AR="$AR" # Let the user override the test with a path.
-  ;;
-  ?:/*)                         
-  ac_cv_path_AR="$AR" # Let the user override the test with a dos path.
-  ;;
-  *)
-  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_path_AR="$ac_dir/$ac_word"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  ;;
-esac
-fi
-AR="$ac_cv_path_AR"
-if test -n "$AR"; then
-  echo "$ac_t""$AR" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-test -n "$AR" && break
-done
-test -n "$AR" || AR="echo not_ar"
-
-    for ac_prog in ld link
-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:2709: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  case "$LD" in
-  /*)
-  ac_cv_path_LD="$LD" # Let the user override the test with a path.
-  ;;
-  ?:/*)                         
-  ac_cv_path_LD="$LD" # Let the user override the test with a dos path.
-  ;;
-  *)
-  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_path_LD="$ac_dir/$ac_word"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  ;;
-esac
-fi
-LD="$ac_cv_path_LD"
-if test -n "$LD"; then
-  echo "$ac_t""$LD" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-test -n "$LD" && break
-done
-test -n "$LD" || LD="echo not_ld"
-
-    for ac_prog in strip
-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:2750: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_STRIP'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  case "$STRIP" in
-  /*)
-  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
-  ;;
-  ?:/*)                         
-  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a dos path.
-  ;;
-  *)
-  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_path_STRIP="$ac_dir/$ac_word"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  ;;
-esac
-fi
-STRIP="$ac_cv_path_STRIP"
-if test -n "$STRIP"; then
-  echo "$ac_t""$STRIP" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-test -n "$STRIP" && break
-done
-test -n "$STRIP" || STRIP="echo not_strip"
-
-    for ac_prog in windres
-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:2791: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_WINDRES'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  case "$WINDRES" in
-  /*)
-  ac_cv_path_WINDRES="$WINDRES" # Let the user override the test with a path.
-  ;;
-  ?:/*)                         
-  ac_cv_path_WINDRES="$WINDRES" # Let the user override the test with a dos path.
-  ;;
-  *)
-  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_path_WINDRES="$ac_dir/$ac_word"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  ;;
-esac
-fi
-WINDRES="$ac_cv_path_WINDRES"
-if test -n "$WINDRES"; then
-  echo "$ac_t""$WINDRES" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-test -n "$WINDRES" && break
-done
-test -n "$WINDRES" || WINDRES="echo not_windres"
-
-    if test -z "$HOST_CC"; then
-        HOST_CC="$CC"
-    fi
-    if test -z "$HOST_CFLAGS"; then
-        HOST_CFLAGS="$CFLAGS"
-    fi
-fi
-
-if test "$GCC" = "yes"; then
-    GNU_CC=1
-fi
-if test "$GXX" = "yes"; then
-    GNU_CXX=1
-fi
-if test "`echo | $AS -v 2>&1 | grep -c GNU`" != "0"; then
-    GNU_AS=1
-fi
-rm -f a.out
-
-case "$build:$target" in
-    i?86-apple-darwin*:powerpc-apple-darwin*)
-                                cross_compiling=yes
-        ;;
-esac
-
-if test "$cross_compiling"  = "yes"; then
-    CROSS_COMPILE=1
-else
-    CROSS_COMPILE=
-fi
-
-echo $ac_n "checking for gcc -pipe support""... $ac_c" 1>&6
-echo "configure:2859: checking for gcc -pipe support" >&5
-if test -n "$GNU_CC" && test -n "$GNU_CXX" && test -n "$GNU_AS"; then
-    echo '#include <stdio.h>' > dummy-hello.c
-    echo 'int main() { printf("Hello World\n"); return 0; }' >> dummy-hello.c
-    ${CC} -S dummy-hello.c -o dummy-hello.s 2>&5
-    cat dummy-hello.s | ${AS} -o dummy-hello.S - 2>&5
-    if test $? = 0; then
-        _res_as_stdin="yes"
-    else
-        _res_as_stdin="no"
-    fi
-    if test "$_res_as_stdin" = "yes"; then
-        _SAVE_CFLAGS=$CFLAGS
-        CFLAGS="$CFLAGS -pipe"
-        cat > conftest.$ac_ext <<EOF
-#line 2874 "configure"
-#include "confdefs.h"
- #include <stdio.h> 
-int main() {
-printf("Hello World\n");
-; return 0; }
-EOF
-if { (eval echo configure:2881: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  _res_gcc_pipe="yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  _res_gcc_pipe="no" 
-fi
-rm -f conftest*
-        CFLAGS=$_SAVE_CFLAGS
-    fi
-    if test "$_res_as_stdin" = "yes" && test "$_res_gcc_pipe" = "yes"; then
-        _res="yes";
-        CFLAGS="$CFLAGS -pipe"
-        CXXFLAGS="$CXXFLAGS -pipe"
-    else
-        _res="no"
-    fi
-    rm -f dummy-hello.c dummy-hello.s dummy-hello.S dummy-hello a.out
-    echo "$ac_t""$_res" 1>&6
-else
-    echo "$ac_t""no" 1>&6
-fi
-
-
-_SAVE_CFLAGS="$CFLAGS"
-CFLAGS="$CFLAGS -fprofile-generate -fprofile-correction"
-
-echo $ac_n "checking whether C compiler supports -fprofile-generate""... $ac_c" 1>&6
-echo "configure:2911: checking whether C compiler supports -fprofile-generate" >&5
-cat > conftest.$ac_ext <<EOF
-#line 2913 "configure"
-#include "confdefs.h"
-
-int main() {
-return 0;
-; return 0; }
-EOF
-if { (eval echo configure:2920: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-   PROFILE_GEN_CFLAGS="-fprofile-generate"
-                 result="yes" 
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  result="no"
-fi
-rm -f conftest*
-echo "$ac_t""$result" 1>&6
-
-if test $result = "yes"; then
-   PROFILE_GEN_LDFLAGS="-fprofile-generate"
-   PROFILE_USE_CFLAGS="-fprofile-use -fprofile-correction -Wcoverage-mismatch"
-   PROFILE_USE_LDFLAGS="-fprofile-use"
-fi
-
-CFLAGS="$_SAVE_CFLAGS"
-
-if test "$GNU_CC"; then
-    echo $ac_n "checking for visibility(hidden) attribute""... $ac_c" 1>&6
-echo "configure:2943: checking for visibility(hidden) attribute" >&5
-if eval "test \"`echo '$''{'ac_cv_visibility_hidden'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.c <<EOF
-        int foo __attribute__ ((visibility ("hidden"))) = 1;
-EOF
-        ac_cv_visibility_hidden=no
-        if ${CC-cc} -Werror -S conftest.c -o conftest.s >/dev/null 2>&1; then
-            if grep '\.hidden.*foo' conftest.s >/dev/null; then
-                ac_cv_visibility_hidden=yes
-            fi
-        fi
-        rm -f conftest.cs
-        
-fi
-
-echo "$ac_t""$ac_cv_visibility_hidden" 1>&6
-    if test "$ac_cv_visibility_hidden" = "yes"; then
-        cat >> confdefs.h <<\EOF
-#define HAVE_VISIBILITY_HIDDEN_ATTRIBUTE 1
-EOF
-
-        echo $ac_n "checking for visibility pragma support""... $ac_c" 1>&6
-echo "configure:2967: checking for visibility pragma support" >&5
-if eval "test \"`echo '$''{'ac_cv_visibility_pragma'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.c <<EOF
-#pragma GCC visibility push(hidden)
-            int foo_hidden = 1;
-#pragma GCC visibility push(default)
-            int foo_default = 1;
-EOF
-            ac_cv_visibility_pragma=no
-            if ${CC-cc} -Werror -S conftest.c -o conftest.s >/dev/null 2>&1; then
-                if grep '\.hidden.*foo_hidden' conftest.s >/dev/null; then
-                    if ! grep '\.hidden.*foo_default' conftest.s > /dev/null; then
-                        ac_cv_visibility_pragma=yes
-                    fi
-                fi
-            fi
-            rm -f conftest.cs
-            
-fi
-
-echo "$ac_t""$ac_cv_visibility_pragma" 1>&6
-        if test "$ac_cv_visibility_pragma" = "yes"; then
-            cat >> confdefs.h <<\EOF
-#define HAVE_VISIBILITY_PRAGMA 1
-EOF
-
-            # To work around a build problem on Linux x86-64 (Bugzilla bug
-            # 293438), we use the -fvisibility=hidden flag.  This flag is less
-            # optimal than #pragma GCC visibility push(hidden) because the flag
-            # assumes that symbols defined outside the current source file have
-            # the default visibility.  This has the advantage that we don't need
-            # to wrap system header files, but has the disadvantage that calls
-            # to hidden symbols defined in other source files cannot be
-            # optimized by the compiler.  The -fvisibility=hidden flag does
-            # hide and export symbols correctly.
-            #VISIBILITY_FLAGS='-I$(dist_includedir)/system_wrappers -include $(topsrcdir)/config/gcc_hidden.h'
-            #WRAP_SYSTEM_INCLUDES=1
-            VISIBILITY_FLAGS="-fvisibility=hidden"
-            WRAP_SYSTEM_INCLUDES=
-        fi
-    fi
-fi # GNU_CC
-
-fi # SKIP_COMPILER_CHECKS
-
-if test -z "$SKIP_PATH_CHECKS"; then
-    for ac_prog in perl5 perl
-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:3020: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  case "$PERL" in
-  /*)
-  ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
-  ;;
-  ?:/*)                         
-  ac_cv_path_PERL="$PERL" # Let the user override the test with a dos path.
-  ;;
-  *)
-  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_path_PERL="$ac_dir/$ac_word"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  ;;
-esac
-fi
-PERL="$ac_cv_path_PERL"
-if test -n "$PERL"; then
-  echo "$ac_t""$PERL" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-test -n "$PERL" && break
-done
-test -n "$PERL" || PERL="echo not_perl"
-
-elif test -z "$PERL"; then
-    PERL=perl
-fi
-
-OBJ_SUFFIX=o
-LIB_SUFFIX=a
-DLL_SUFFIX=so
-ASM_SUFFIX=s
-MKSHLIB='$(LD) $(DSO_LDOPTS) -o $@'
-PR_MD_ASFILES=
-PR_MD_CSRCS=
-PR_MD_ARCH_DIR=unix
-AR_FLAGS='cr $@'
-AS='$(CC)'
-ASFLAGS='$(CFLAGS)'
-
-if test -n "$CROSS_COMPILE"; then
-    OS_ARCH=`echo $target_os | sed -e 's|/|_|g'`
-    OS_RELEASE=
-    OS_TEST="${target_cpu}"
-    case "${target_os}" in
-        linux*)       OS_ARCH=Linux ;;
-        solaris*)     OS_ARCH=SunOS OS_RELEASE=5 ;;
-        mingw*)       OS_ARCH=WINNT ;;
-        wince*)       OS_ARCH=WINCE ;;
-        winmo*)       OS_ARCH=WINCE ;;
-        darwin*)      OS_ARCH=Darwin ;;
-        riscos*)      OS_ARCH=RISCOS ;;
-    esac
-else
-    OS_ARCH=`uname -s | sed -e 's|/|_|g'`
-    OS_RELEASE=`uname -r`
-    OS_TEST=`uname -m`
-fi
-
-if test "$OS_ARCH" = "IRIX64"; then
-    OS_ARCH=IRIX
-fi
-
-if test "$OS_ARCH" = "AIX"; then
-    OS_RELEASE=`uname -v`.`uname -r`
-fi
-
-if test "$OS_ARCH" = "FreeBSD"; then
-    OS_RELEASE=`echo $OS_RELEASE | sed 's/-.*//'`
-fi
-
-if test "$OS_ARCH" = "Linux"; then
-    OS_RELEASE=`echo $OS_RELEASE | sed 's/-.*//'`
-    OS_RELEASE=`echo $OS_RELEASE | awk -F\. '{ print $1 "." $2 }'`
-fi
-
-#######################################################################
-# Master "Core Components" macros for getting the OS target           #
-#######################################################################
-
-#
-# Note: OS_TARGET should be specified on the command line for gmake.
-# When OS_TARGET=WIN95 is specified, then a Windows 95 target is built.
-# The difference between the Win95 target and the WinNT target is that
-# the WinNT target uses Windows NT specific features not available
-# in Windows 95. The Win95 target will run on Windows NT, but (supposedly)
-# at lesser performance (the Win95 target uses threads; the WinNT target
-# uses fibers).
-#
-# If OS_TARGET is not specified, it defaults to $(OS_ARCH), i.e., no
-# cross-compilation.
-#
-
-#
-# The following hack allows one to build on a WIN95 machine (as if
-# s/he were cross-compiling on a WINNT host for a WIN95 target).
-# It also accomodates for MKS's uname.exe.  If you never intend
-# to do development on a WIN95 machine, you don't need this hack.
-#
-case "$OS_ARCH" in
-WIN95)
-    OS_ARCH=WINNT
-    OS_TARGET=WIN95
-    ;;
-Windows_95)
-    OS_ARCH=Windows_NT
-    OS_TARGET=WIN95
-    ;;
-Windows_98)
-    OS_ARCH=Windows_NT
-    OS_TARGET=WIN95
-    ;;
-CYGWIN_9*|CYGWIN_ME*)
-    OS_ARCH='CYGWIN_NT-4.0'
-    OS_TARGET=WIN95
-    ;;
-OS_2)
-    OS_ARCH=OS2
-    OS_TARGET=OS2
-    ;;
-esac
-
-#
-# On WIN32, we also define the variable CPU_ARCH.
-#
-
-case "$OS_ARCH" in
-WINNT)
-    CPU_ARCH=`uname -p`
-    if test "$CPU_ARCH" = "I386"; then
-        CPU_ARCH=x86
-    fi
-    ;;
-Windows_NT)
-#
-# If uname -s returns "Windows_NT", we assume that we are using
-# the uname.exe in MKS toolkit.
-#
-# The -r option of MKS uname only returns the major version number.
-# So we need to use its -v option to get the minor version number.
-# Moreover, it doesn't have the -p option, so we need to use uname -m.
-#
-    OS_ARCH=WINNT
-    OS_MINOR_RELEASE=`uname -v`
-    if test "$OS_MINOR_RELEASE" = "00"; then
-        OS_MINOR_RELEASE=0
-    fi
-    OS_RELEASE="${OS_RELEASE}.${OS_MINOR_RELEASE}"
-    CPU_ARCH=`uname -m`
-    #
-    # MKS's uname -m returns "586" on a Pentium machine.
-    #
-    if echo "$CPU_ARCH" | grep -c 86 >/dev/null; then
-        CPU_ARCH=x86
-    fi
-    ;;
-CYGWIN_NT*|MINGW*_NT*)
-#
-# If uname -s returns "CYGWIN_NT-4.0", we assume that we are using
-# the uname.exe in the Cygwin tools.
-# If uname -s returns MINGW32_NT-5.1, we assume that we are using
-# the uname.exe in the MSYS tools.
-#
-    OS_RELEASE=`expr $OS_ARCH : '.*NT-\(.*\)'`
-    OS_ARCH=WINNT
-    CPU_ARCH=`uname -m`
-    #
-    # Cygwin's uname -m returns "i686" on a Pentium Pro machine.
-    #
-    if echo "$CPU_ARCH" | grep -c 86 >/dev/null; then
-        CPU_ARCH=x86
-    fi
-    ;;
-esac
-
-if test -n "$MOZILLA_CLIENT" && test "$OS_ARCH" = "WINNT"; then
-    OS_TARGET=WIN95
-    if test -n "$MOZ_DEBUG"; then
-        USE_DEBUG_RTL=1
-    fi
-fi
-if test -z "$OS_TARGET"; then
-    OS_TARGET=$OS_ARCH
-fi
-if test "$OS_TARGET" = "WIN95"; then
-    OS_RELEASE="4.0"
-fi
-OS_CONFIG="${OS_TARGET}${OS_RELEASE}"
-
-# Check whether --enable-os2-high-mem or --disable-os2-high-mem was given.
-if test "${enable_os2_high_mem+set}" = set; then
-  enableval="$enable_os2_high_mem"
-   if test "$enableval" = "no"; then
-        MOZ_OS2_HIGH_MEMORY=
-      else
-        MOZ_OS2_HIGH_MEMORY=1
-      fi 
-fi
-
-
-
-case "$target" in
-arm*-android*|arm*-linuxandroid*)
-    MOZ_THUMB=yes
-    MOZ_ARCH=armv7-a
-    MOZ_FPU=vfp
-    MOZ_FLOAT_ABI=softfp
-    MOZ_SOFT_FLOAT=yes
-    ;;
-arm*-*)
-    if test -n "$MOZ_PLATFORM_MAEMO"; then
-        MOZ_THUMB=no
-        MOZ_ARCH=armv7-a
-        MOZ_FLOAT_ABI=softfp
-    fi
-    if test "$MOZ_PLATFORM_MAEMO" = 6; then
-        MOZ_THUMB=yes
-    fi
-    ;;
-esac
-
-# Check whether --enable-thumb2 or --disable-thumb2 was given.
-if test "${enable_thumb2+set}" = set; then
-  enableval="$enable_thumb2"
-  MOZ_THUMB=$enableval
-fi
-
-
-# Check whether --with-thumb or --without-thumb was given.
-if test "${with_thumb+set}" = set; then
-  withval="$with_thumb"
-  if test -z "$GNU_CC"; then
-        { echo "configure: error: --with-thumb is not supported on non-GNU toolchain-defaults" 1>&2; exit 1; }
-    fi
-    MOZ_THUMB=$withval
-fi
-
-
-# Check whether --with-thumb-interwork or --without-thumb-interwork was given.
-if test "${with_thumb_interwork+set}" = set; then
-  withval="$with_thumb_interwork"
-  if test -z "$GNU_CC"; then
-        { echo "configure: error: --with-thumb-interwork is not supported on non-GNU toolchain-defaults" 1>&2; exit 1; }
-    fi
-    MOZ_THUMB_INTERWORK=$withval
-fi
-
-
-# Check whether --with-arch or --without-arch was given.
-if test "${with_arch+set}" = set; then
-  withval="$with_arch"
-  if test -z "$GNU_CC"; then
-        { echo "configure: error: --with-arch is not supported on non-GNU toolchain-defaults" 1>&2; exit 1; }
-    fi
-    MOZ_ARCH=$withval
-fi
-
-
-# Check whether --with-fpu or --without-fpu was given.
-if test "${with_fpu+set}" = set; then
-  withval="$with_fpu"
-  if test -z "$GNU_CC"; then
-        { echo "configure: error: --with-fpu is not supported on non-GNU toolchain-defaults" 1>&2; exit 1; }
-    fi
-    MOZ_FPU=$withval
-fi
-
-
-# Check whether --with-float-abi or --without-float-abi was given.
-if test "${with_float_abi+set}" = set; then
-  withval="$with_float_abi"
-  if test -z "$GNU_CC"; then
-        { echo "configure: error: --with-float-abi is not supported on non-GNU toolchain-defaults" 1>&2; exit 1; }
-    fi
-    MOZ_FLOAT_ABI=$withval
-fi
-
-
-# Check whether --with-soft-float or --without-soft-float was given.
-if test "${with_soft_float+set}" = set; then
-  withval="$with_soft_float"
-  if test -z "$GNU_CC"; then
-        { echo "configure: error: --with-soft-float is not supported on non-GNU toolchain-defaults" 1>&2; exit 1; }
-    fi
-    MOZ_SOFT_FLOAT=$withval
-fi
-
-
-case "$MOZ_ARCH" in
-toolchain-default|"")
-    arch_flag=""
-    ;;
-*)
-    arch_flag="-march=$MOZ_ARCH"
-    ;;
-esac
-
-case "$MOZ_THUMB" in
-yes)
-    MOZ_THUMB2=1
-    thumb_flag="-mthumb"
-    ;;
-no)
-    MOZ_THUMB2=
-    thumb_flag="-marm"
-    ;;
-*)
-    _SAVE_CFLAGS="$CFLAGS"
-    CFLAGS="$arch_flag"
-    cat > conftest.$ac_ext <<EOF
-#line 3342 "configure"
-#include "confdefs.h"
-
-int main() {
-return sizeof(__thumb2__);
-; return 0; }
-EOF
-if { (eval echo configure:3349: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  MOZ_THUMB2=1
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  MOZ_THUMB2=
-fi
-rm -f conftest*
-    CFLAGS="$_SAVE_CFLAGS"
-    thumb_flag=""
-    ;;
-esac
-
-case "$MOZ_THUMB_INTERWORK" in
-yes)
-    thumb_interwork_flag="-mthumb-interwork"
-    ;;
-no)
-    thumb_interwork_flag="-mno-thumb-interwork"
-    ;;
-*) # toolchain-default
-    thumb_interwork_flag=""
-    ;;
-esac
-
-case "$MOZ_FPU" in
-toolchain-default|"")
-    fpu_flag=""
-    ;;
-*)
-    fpu_flag="-mfpu=$MOZ_FPU"
-    ;;
-esac
-
-case "$MOZ_FLOAT_ABI" in
-toolchain-default|"")
-    float_abi_flag=""
-    ;;
-*)
-    float_abi_flag="-mfloat-abi=$MOZ_FLOAT_ABI"
-    ;;
-esac
-
-case "$MOZ_SOFT_FLOAT" in
-yes)
-    soft_float_flag="-msoft-float"
-    ;;
-no)
-    soft_float_flag="-mno-soft-float"
-    ;;
-*) # toolchain-default
-    soft_float_flag=""
-    ;;
-esac
-
-all_flags=`echo $arch_flag $thumb_flag $thumb_interwork_flag $fpu_flag $float_abi_flag $soft_float_flag`
-if test -n "$all_flags"; then
-    _SAVE_CFLAGS="$CFLAGS"
-    CFLAGS="$all_flags"
-    echo $ac_n "checking whether the chosen combination of compiler flags ($all_flags) works""... $ac_c" 1>&6
-echo "configure:3411: checking whether the chosen combination of compiler flags ($all_flags) works" >&5
-    cat > conftest.$ac_ext <<EOF
-#line 3413 "configure"
-#include "confdefs.h"
-
-int main() {
-return 0;
-; return 0; }
-EOF
-if { (eval echo configure:3420: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  echo "$ac_t""yes" 1>&6
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  { echo "configure: error: no" 1>&2; exit 1; }
-fi
-rm -f conftest*
-
-    CFLAGS="$_SAVE_CFLAGS $all_flags"
-    CXXFLAGS="$CXXFLAGS $all_flags"
-    ASFLAGS="$ASFLAGS $all_flags"
-    if test -n "$thumb_flag"; then
-        LDFLAGS="$LDFLAGS $thumb_flag"
-    fi
-fi
-
-case "$host" in
-*-mingw*)
-    NSINSTALL=nsinstall
-    ;;
-*-cygwin*|*-msvc*|*-mks*|*-wince*|*-winmo*)
-    NSINSTALL='$(CYGWIN_WRAPPER) nsinstall'
-    if test `echo "${PATH}" | grep -c \;` = 0; then
-        CYGWIN_WRAPPER='sh $(topsrcdir)/build/cygwin-wrapper'
-    fi
-    ;;
-*-beos*)
-    HOST_CFLAGS="$HOST_CFLAGS -DXP_BEOS -DBeOS -DBEOS -D_POSIX_SOURCE"
-    ;;
-*os2*)
-    ;;
-*)
-    HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX"
-    ;;
-esac
-
-case "$target" in
-
-*-aix*)
-    cat >> confdefs.h <<\EOF
-#define XP_UNIX 1
-EOF
-
-    cat >> confdefs.h <<\EOF
-#define AIX 1
-EOF
-
-    cat >> confdefs.h <<\EOF
-#define SYSV 1
-EOF
-
-    DSO_LDOPTS='-brtl -bnortllib -bM:SRE -bnoentry -bexpall -blibpath:/usr/lib:/lib'
-    ac_safe=`echo "sys/atomic_op.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for sys/atomic_op.h""... $ac_c" 1>&6
-echo "configure:3477: checking for sys/atomic_op.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 3482 "configure"
-#include "confdefs.h"
-#include <sys/atomic_op.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3487: \"$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
-  cat >> confdefs.h <<\EOF
-#define AIX_HAVE_ATOMIC_OP_H 1
-EOF
-
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-    case "${target_os}" in
-    aix3.2*)
-        cat >> confdefs.h <<\EOF
-#define AIX_RENAME_SELECT 1
-EOF
-
-        cat >> confdefs.h <<\EOF
-#define _PR_NO_LARGE_FILES 1
-EOF
-
-        AIX_LINK_OPTS='-bnso -berok'
-        PR_MD_ASFILES=os_AIX.s
-        ;;
-    aix4.1*)
-        cat >> confdefs.h <<\EOF
-#define AIX_TIMERS 1
-EOF
-
-        cat >> confdefs.h <<\EOF
-#define _PR_NO_LARGE_FILES 1
-EOF
-
-        cat >> confdefs.h <<\EOF
-#define AIX4_1 1
-EOF
-
-        MKSHLIB=
-        DSO_LDOPTS=
-        AIX_LINK_OPTS='-bnso -berok'
-        LIBNSPR='-L$(dist_libdir) -lnspr$(MOD_MAJOR_VERSION)_shr'
-        LIBPLC='-L$(dist_libdir) -lplc$(MOD_MAJOR_VERSION)_shr'
-        ;;
-    aix4.2*)
-        cat >> confdefs.h <<\EOF
-#define AIX_TIMERS 1
-EOF
-
-        cat >> confdefs.h <<\EOF
-#define _PR_HAVE_OFF64_T 1
-EOF
-
-        AIX_LINK_OPTS='-brtl -bnso -berok'
-        ;;
-    aix4.3*)
-        cat >> confdefs.h <<\EOF
-#define AIX_TIMERS 1
-EOF
-
-        cat >> confdefs.h <<\EOF
-#define _PR_HAVE_OFF64_T 1
-EOF
-
-        cat >> confdefs.h <<\EOF
-#define AIX4_3_PLUS 1
-EOF
-
-        cat >> confdefs.h <<\EOF
-#define HAVE_SOCKLEN_T 1
-EOF
-
-        cat >> confdefs.h <<\EOF
-#define HAVE_FCNTL_FILE_LOCKING 1
-EOF
-
-        USE_IPV6=1
-        AIX_LINK_OPTS='-brtl -bnso -berok'
-        ;;
-    *)
-        cat >> confdefs.h <<\EOF
-#define AIX_TIMERS 1
-EOF
-
-        cat >> confdefs.h <<\EOF
-#define _PR_HAVE_OFF64_T 1
-EOF
-
-        cat >> confdefs.h <<\EOF
-#define AIX4_3_PLUS 1
-EOF
-
-        cat >> confdefs.h <<\EOF
-#define HAVE_SOCKLEN_T 1
-EOF
-
-        cat >> confdefs.h <<\EOF
-#define HAVE_FCNTL_FILE_LOCKING 1
-EOF
-
-        USE_IPV6=1
-        AIX_LINK_OPTS='-brtl -bnso -berok'
-        ;;
-    esac
-    CFLAGS="$CFLAGS -qro -qroconst"
-    AIX_WRAP='$(DIST)/lib/aixwrap.o'
-    AIX_TMP='./_aix_tmp.o'
-    if test -n "$USE_64"; then
-        MDCPUCFG_H=_aix64.cfg
-        OBJECT_MODE=64
-    else
-        MDCPUCFG_H=_aix32.cfg
-    fi
-    PR_MD_CSRCS=aix.c
-    RESOLVE_LINK_SYMBOLS=1
-    ;;
-        
-*-beos*)
-    cat >> confdefs.h <<\EOF
-#define XP_BEOS 1
-EOF
-
-    cat >> confdefs.h <<\EOF
-#define BeOS 1
-EOF
-
-    cat >> confdefs.h <<\EOF
-#define BEOS 1
-EOF
-
-    cat >> confdefs.h <<\EOF
-#define _POSIX_SOURCE 1
-EOF
-
-    DSO_LDOPTS=-nostart
-    MDCPUCFG_H=_beos.cfg
-    USE_BTHREADS=1
-    PR_MD_ARCH_DIR=beos
-    RESOLVE_LINK_SYMBOLS=1
-    case "${target_cpu}" in
-    i*86)
-        _OPTIMIZE_FLAGS=-O2
-        _DEBUG_FLAGS='-gdwarf-2 -O0'
-        MKSHLIB='$(CCC) $(DSO_LDOPTS) -o $@'
-        echo $ac_n "checking for gethostbyaddr in -lbind""... $ac_c" 1>&6
-echo "configure:3644: checking for gethostbyaddr in -lbind" >&5
-ac_lib_var=`echo bind'_'gethostbyaddr | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lbind  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3652 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char gethostbyaddr();
-
-int main() {
-gethostbyaddr()
-; return 0; }
-EOF
-if { (eval echo configure:3663: \"$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"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  OS_LIBS="$OS_LIBS -lbind -lsocket"
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-        ;;
-    powerpc)
-        CC=mwcc
-        CCC=mwcc
-        LD=mwld
-        DSO_LDOPTS='-xms -export pragma -init _init_routine_ -term _term_routine_ -lroot -lnet /boot/develop/lib/ppc/glue-noinit.a /boot/develop/lib/ppc/init_term_dyn.o /boot/develop/lib/ppc/start_dyn.o'
-        _OPTIMIZE_FLAGS=-O2    
-        _DEBUG_FLAGS='-g -O0'
-        ;;
-    esac
-    ;;
-
-*-bsdi*)
-    cat >> confdefs.h <<\EOF
-#define XP_UNIX 1
-EOF
-
-    cat >> confdefs.h <<\EOF
-#define BSDI 1
-EOF
-
-    cat >> confdefs.h <<\EOF
-#define NEED_BSDREGEX 1
-EOF
-
-
-    CFLAGS="$CFLAGS -Wall -Wno-format"
-    CXXFLAGS="$CXXFLAGS -Wall -Wno-format"
-
-    if echo "$OS_TEST" | grep -c 86 >/dev/null; then
-        CPU_ARCH=x86
-    elif echo "$OS_TEST" | grep -c sparc >/dev/null; then 
-        CPU_ARCH=sparc
-    fi
-
-    MDCPUCFG_H=_bsdi.cfg
-    PR_MD_CSRCS=bsdi.c
-
-    DSO_LDOPTS=-r
-
-    case "$target_os" in
-    bsdi1.1*)
-        cat >> confdefs.h <<\EOF
-#define _PR_BSDI_JMPBUF_IS_ARRAY 1
-EOF
-
-        cat >> confdefs.h <<\EOF
-#define _PR_STAT_HAS_ONLY_ST_ATIME 1
-EOF
-
-        cat >> confdefs.h <<\EOF
-#define _PR_NEED_H_ERRNO 1
-EOF
-
-        MKSHLIB=
-        DSO_CFLAGS=
-        DSO_LDOPTS=
-        ;;
-
-    bsdi2.1*)
-        cat >> confdefs.h <<\EOF
-#define _PR_TIMESPEC_HAS_TS_SEC 1
-EOF
-
-        cat >> confdefs.h <<\EOF
-#define _PR_BSDI_JMPBUF_IS_ARRAY 1
-EOF
-
-        cat >> confdefs.h <<\EOF
-#define HAVE_DLL 1
-EOF
-
-        cat >> confdefs.h <<\EOF
-#define USE_DLFCN 1
-EOF
-
-        cat >> confdefs.h <<\EOF
-#define _PR_STAT_HAS_ST_ATIMESPEC 1
-EOF
-
-        PR_MD_ASFILES=os_BSD_OS_386_2.s
-        ;;
-
-    bsdi4.* | bsdi5.*)
-        cat >> confdefs.h <<\EOF
-#define _PR_SELECT_CONST_TIMEVAL 1
-EOF
-
-        cat >> confdefs.h <<\EOF
-#define _PR_BSDI_JMPBUF_IS_STRUCT 1
-EOF
-
-        cat >> confdefs.h <<\EOF
-#define HAVE_DLL 1
-EOF
-
-        cat >> confdefs.h <<\EOF
-#define USE_DLFCN 1
-EOF
-
-        cat >> confdefs.h <<\EOF
-#define _PR_STAT_HAS_ST_ATIMESPEC 1
-EOF
-
-        MKSHLIB='$(CC) -o $@ $(DSO_LDOPTS)'
-        DSO_CFLAGS=-fPIC
-        DSO_LDOPTS='-shared -Wl,-soname,$(@:$(OBJDIR)/%.so=%.so)'
-        STRIP="$STRIP -d"
-        case "$target_os" in
-        bsdi4.2* | bsdi4.3* | bsdi5.*)
-            cat >> confdefs.h <<\EOF
-#define _PR_HAVE_GETPROTO_R 1
-EOF
-
-            cat >> confdefs.h <<\EOF
-#define _PR_HAVE_GETPROTO_R_POINTER 1
-EOF
-
-            ;;
-        esac
-        ;;
-    *)
-        cat >> confdefs.h <<\EOF
-#define _PR_SELECT_CONST_TIMEVAL 1
-EOF
-
-        cat >> confdefs.h <<\EOF
-#define _PR_BSDI_JMPBUF_IS_STRUCT 1
-EOF
-
-        cat >> confdefs.h <<\EOF
-#define HAVE_DLL 1
-EOF
-
-        cat >> confdefs.h <<\EOF
-#define USE_DLFCN 1
-EOF
-
-        cat >> confdefs.h <<\EOF
-#define _PR_STAT_HAS_ST_ATIMESPEC 1
-EOF
-
-        ;;
-    esac
-
-    ;;
-
-*-darwin*)
-    cat >> confdefs.h <<\EOF
-#define XP_UNIX 1
-EOF
-
-    cat >> confdefs.h <<\EOF
-#define DARWIN 1
-EOF
-
-    cat >> confdefs.h <<\EOF
-#define HAVE_BSD_FLOCK 1
-EOF
-
-    cat >> confdefs.h <<\EOF
-#define HAVE_SOCKLEN_T 1
-EOF
-
-    AS='$(CC) -x assembler-with-cpp'
-    CFLAGS="$CFLAGS -Wall -fno-common"
-    case "${target_cpu}" in
-        arm*)
-            CPU_ARCH=arm
-            ;;
-        i*86*)
-            if test -n "$USE_64"; then
-                CPU_ARCH=x86_64
-            else        
-                CPU_ARCH=i386
-            fi
-            ;;
-        x86_64)
-            CPU_ARCH=x86_64
-            ;;
-        *)
-            CPU_ARCH=ppc
-            ;;
-    esac
-    if test "`echo $CC | grep -c '\-arch '`" = "0"; then
-        CC="$CC -arch $CPU_ARCH"
-    fi
-    ac_safe=`echo "crt_externs.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for crt_externs.h""... $ac_c" 1>&6
-echo "configure:3872: checking for crt_externs.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 3877 "configure"
-#include "confdefs.h"
-#include <crt_externs.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3882: \"$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
-  :
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-    DSO_CFLAGS=-fPIC
-    DSO_LDOPTS='-dynamiclib -compatibility_version 1 -current_version 1 -all_load -install_name @executable_path/$@ -headerpad_max_install_names'
-    _OPTIMIZE_FLAGS=-O2
-    MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
-    STRIP="$STRIP -x -S"
-    DLL_SUFFIX=dylib
-    USE_PTHREADS=1
-    MDCPUCFG_H=_darwin.cfg
-    PR_MD_CSRCS=darwin.c
-    PR_MD_ASFILES=os_Darwin.s
-
-    # Add Mac OS X support for loading CFM & CFBundle plugins
-    if test -f "${MACOS_SDK_DIR}/System/Library/Frameworks/Carbon.framework/Carbon"; then
-        cat >> confdefs.h <<\EOF
-#define XP_MACOSX 1
-EOF
-
-        OS_TARGET=MacOSX
-
-        if test -n "$_MACOSX_DEPLOYMENT_TARGET" ; then
-                        export MACOSX_DEPLOYMENT_TARGET=$_MACOSX_DEPLOYMENT_TARGET
-        elif test -z "$MACOSX_DEPLOYMENT_TARGET" ; then
-                                                case "${target_cpu}" in
-                powerpc*)
-                                        export MACOSX_DEPLOYMENT_TARGET=10.2
-                    ;;
-                i*86*)
-                                        export MACOSX_DEPLOYMENT_TARGET=10.4
-                    ;;
-            esac
-        fi
-
-                        
-        if test "$MACOS_SDK_DIR"; then
-            
-            if test ! -d "$MACOS_SDK_DIR"; then
-                { echo "configure: error: SDK not found.  When using --with-macos-sdk, you must
-specify a valid SDK.  SDKs are installed when the optional cross-development
-tools are selected during the Xcode/Developer Tools installation." 1>&2; exit 1; }
-            fi
-
-            
-            CC_VERSION=`$CC -v 2>&1 | grep 'gcc version'`
-            GCC_VERSION_FULL=`echo $CC_VERSION | $PERL -pe 's/^.*gcc version ([^ ]*).*/$1/'`
-            GCC_VERSION=`echo $GCC_VERSION_FULL | $PERL -pe '(split(/\./))[0]>=4&&s/(^\d*\.\d*).*/$1/;'`
-            
-            GCC_VERSION_MAJOR=`echo $GCC_VERSION_FULL | $PERL -pe 's/(^\d*).*/$1/;'`
-            if test "$GCC_VERSION_MAJOR" -lt "4" ; then
-                SDK_C_FRAMEWORK="-F${MACOS_SDK_DIR}/System/Library/Frameworks"
-                if test -d "${MACOS_SDK_DIR}/Library/Frameworks" ; then
-                    SDK_C_FRAMEWORK="$SDK_C_FRAMEWORK -F${MACOS_SDK_DIR}/Library/Frameworks"
-                fi
-
-                SDK_C_INCLUDE="-isystem ${MACOS_SDK_DIR}/usr/include/gcc/darwin/${GCC_VERSION} -isystem ${MACOS_SDK_DIR}/usr/include ${SDK_C_FRAMEWORK}"
-
-                CFLAGS="$CFLAGS -nostdinc ${SDK_C_INCLUDE}"
-
-                                CPP="$CPP -nostdinc ${SDK_C_INCLUDE}"
-
-                
-                HOST_DARWIN_MAJOR=`echo "$build_os" | sed -E -e 's/^darwin([0-9]+).*$/\1/'`
-                
-                if test "$HOST_DARWIN_MAJOR" -lt 9 ; then
-                                                                                                                        MACOS_SDK_LIBS="-L${MACOS_SDK_DIR}/usr/lib/gcc/darwin -L${MACOS_SDK_DIR}/usr/lib/gcc/darwin/${GCC_VERSION_FULL} -L${MACOS_SDK_DIR}/usr/lib ${SDK_C_FRAMEWORK}"
-                else
-                                                                                                                                                                                                        MACOS_SDK_LIBS="-Wl,-syslibroot,${MACOS_SDK_DIR}"
-                fi
-
-                LDFLAGS="${MACOS_SDK_LIBS} $LDFLAGS"
-                export NEXT_ROOT=$MACOS_SDK_DIR
-
-                if test -n "$CROSS_COMPILE" ; then
-                                                                                HOST_CC="NEXT_ROOT= $HOST_CC"
-                    HOST_CXX="NEXT_ROOT= $HOST_CXX"
-                fi
-            else
-                                                CFLAGS="$CFLAGS -isysroot ${MACOS_SDK_DIR}"
-
-                                CPP="$CPP -isysroot ${MACOS_SDK_DIR}"
-
-                                                                                if test "$GCC_VERSION_FULL" != "4.0.0" ; then
-                                                            LDFLAGS="$LDFLAGS -isysroot ${MACOS_SDK_DIR}"
-                else
-                                                            LDFLAGS="$LDFLAGS -Wl,-syslibroot,${MACOS_SDK_DIR}"
-                fi
-            fi
-        fi
-    fi
-    ;;
-
-*-dgux*)
-    cat >> confdefs.h <<\EOF
-#define XP_UNIX 1
-EOF
-
-    cat >> confdefs.h <<\EOF
-#define _PR_LOCAL_THREADS_ONLY 1
-EOF
-
-    cat >> confdefs.h <<\EOF
-#define SVR4 1
-EOF
-
-    cat >> confdefs.h <<\EOF
-#define SYSV 1
-EOF
-
-    cat >> confdefs.h <<\EOF
-#define DGUX 1
-EOF
-
-    cat >> confdefs.h <<\EOF
-#define _DGUX_SOURCE 1
-EOF
-
-    cat >> confdefs.h <<\EOF
-#define _POSIX4A_DRAFT6_SOURCE 1
-EOF
-
-    DSO_LDOPTS=-G
-    _OPTIMIZE_FLAGS=-O2
-    _DEBUG_FLAGS=
-    MDCPUCFG_H=_dgux.cfg
-    PR_MD_CSRCS=dgux.c
-    ;;
-
-*-freebsd*)
-    if test -z "$USE_NSPR_THREADS"; then
-        USE_PTHREADS=1
-    fi
-    cat >> confdefs.h <<\EOF
-#define XP_UNIX 1
-EOF
-
-    cat >> confdefs.h <<\EOF
-#define FREEBSD 1
-EOF
-
-    cat >> confdefs.h <<\EOF
-#define HAVE_BSD_FLOCK 1
-EOF
-
-    cat >> confdefs.h <<\EOF
-#define HAVE_SOCKLEN_T 1
-EOF
-
-    CFLAGS="$CFLAGS $(DSO_CFLAGS) -ansi -Wall"
-    MOZ_OBJFORMAT=`test -x /usr/bin/objformat && /usr/bin/objformat || echo elf`
-    if test "$MOZ_OBJFORMAT" = "elf"; then
-        DLL_SUFFIX=so
-    else
-        DLL_SUFFIX=so.1.0
-    fi
-    MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
-    DSO_CFLAGS=-fPIC
-    DSO_LDOPTS='-shared -Wl,-soname -Wl,$(notdir $@)'
-    MDCPUCFG_H=_freebsd.cfg
-    PR_MD_CSRCS=freebsd.c
-    ;;
-
-*-hpux*)
-    cat >> confdefs.h <<\EOF
-#define XP_UNIX 1
-EOF
-
-    cat >> confdefs.h <<\EOF
-#define HPUX 1
-EOF
-
-    cat >> confdefs.h <<\EOF
-#define _HPUX_SOURCE 1
-EOF
-
-    # OSF1 and HPUX report the POLLHUP event for a socket when the
-    # shutdown(SHUT_WR) operation is called for the remote end, even though
-    # the socket is still writeable. Use select(), instead of poll(), to
-    # workaround this problem.
-    cat >> confdefs.h <<\EOF
-#define _PR_POLL_WITH_SELECT 1
-EOF
-
-    cat >> confdefs.h <<\EOF
-#define _USE_BIG_FDS 1
-EOF
-
-    DSO_LDOPTS='-b +h $(notdir $@)'
-    PR_MD_CSRCS=hpux.c
-    if test "$OS_TEST" = "ia64"; then
-        DLL_SUFFIX=so
-        DSO_LDOPTS="$DSO_LDOPTS +b '\$\$ORIGIN'"
-        CPU_ARCH_TAG=_$OS_TEST 
-        if test -z "$USE_64"; then
-            COMPILER_TAG=_32
-        fi
-        PR_MD_ASFILES=os_HPUX_ia64.s
-    else
-        cat >> confdefs.h <<\EOF
-#define hppa 1
-EOF
-
-        DLL_SUFFIX=sl
-        PR_MD_ASFILES=os_HPUX.s
-    fi
-    if test -n "$USE_64"; then
-        MDCPUCFG_H=_hpux64.cfg
-    else
-        MDCPUCFG_H=_hpux32.cfg
-    fi
-    if test -z "$GNU_CC"; then
-        CC="$CC -Ae"
-        CXX="$CXX -ext"
-        DSO_CFLAGS=+Z
-    else
-        DSO_CFLAGS=-fPIC
-        ASFLAGS="$ASFLAGS -x assembler-with-cpp"
-    fi
-
-    if test -n "$MOZILLA_CLIENT"; then
-        DEFAULT_IMPL_STRATEGY=_EMU
-    fi
-
-    if echo "$OS_RELEASE" | grep ^A.09 >/dev/null; then
-        cat >> confdefs.h <<\EOF
-#define _PR_NEED_H_ERRNO 1
-EOF
-
-        cat >> confdefs.h <<\EOF
-#define HPUX9 1
-EOF
-
-        DEFAULT_IMPL_STRATEGY=_EMU
-       USE_NSPR_THREADS=1
-    fi
-
-    if echo "$OS_RELEASE" | egrep '^(A.09|B.10)' >/dev/null; then
-        cat >> confdefs.h <<\EOF
-#define _PR_NO_LARGE_FILES 1
-EOF
-
-    fi
-
-    if echo "$OS_RELEASE" | egrep '^(B.10.10|B.10.20)' >/dev/null; then
-        cat >> confdefs.h <<\EOF
-#define _PR_NEED_H_ERRNO 1
-EOF
-
-    fi
-
-    if echo "$OS_RELEASE" | egrep '^(B.10.10|B.10.20)' >/dev/null; then
-        cat >> confdefs.h <<\EOF
-#define HAVE_INT_LOCALTIME_R 1
-EOF
-
-    fi
-
-    if echo "$OS_RELEASE" | egrep '^(B.10.30|B.11)' >/dev/null; then
-        cat >> confdefs.h <<\EOF
-#define HAVE_POINTER_LOCALTIME_R 1
-EOF
-
-    fi
-
-    # HP-UX 11i v2 (B.11.23) or higher
-    
-    case "$OS_RELEASE" in
-    [C-Z]*|B.[2-9]*|B.1[2-9]*|B.11.[3-9]*|B.11.2[3-9]*)
-        USE_IPV6=1
-        ;;
-    esac
-    
-
-    if test "$OS_RELEASE" = "B.10.01"; then
-        cat >> confdefs.h <<\EOF
-#define HPUX10 1
-EOF
-
-        DEFAULT_IMPL_STRATEGY=_EMU
-    fi
-
-    if test "$OS_RELEASE" = "B.10.10"; then
-        cat >> confdefs.h <<\EOF
-#define HPUX10 1
-EOF
-
-        cat >> confdefs.h <<\EOF
-#define HPUX10_10 1
-EOF
-
-        DEFAULT_IMPL_STRATEGY=_PTH
-    fi
-
-    if test "$OS_RELEASE" = "B.10.20"; then
-        cat >> confdefs.h <<\EOF
-#define HPUX10 1
-EOF
-
-        cat >> confdefs.h <<\EOF
-#define HPUX10_20 1
-EOF
-
-        if test -z "$GNU_CC"; then
-            CFLAGS="$CFLAGS +DAportable +DS1.1"
-            CXXFLAGS="$CXXFLAGS +DAportable +DS1.1"
-        fi
-        DEFAULT_IMPL_STRATEGY=_PTH
-    fi
-
-    if test "$OS_RELEASE" = "B.10.30"; then
-        cat >> confdefs.h <<\EOF
-#define HPUX10 1
-EOF
-
-        cat >> confdefs.h <<\EOF
-#define HPUX10_30 1
-EOF
-
-        if test -z "$GNU_CC"; then
-            CFLAGS="$CFLAGS +DAportable +DS1.1"
-            CXXFLAGS="$CXXFLAGS +DAportable +DS1.1"
-        fi
-        DEFAULT_IMPL_STRATEGY=_PTH
-    fi
-
-    if echo "$OS_RELEASE" | grep ^B.11 >/dev/null; then
-        cat >> confdefs.h <<\EOF
-#define HPUX10 1
-EOF
-
-        cat >> confdefs.h <<\EOF
-#define HPUX11 1
-EOF
-
-        cat >> confdefs.h <<\EOF
-#define _LARGEFILE64_SOURCE 1
-EOF
-
-        cat >> confdefs.h <<\EOF
-#define _PR_HAVE_OFF64_T 1
-EOF
-
-        cat >> confdefs.h <<\EOF
-#define HAVE_FCNTL_FILE_LOCKING 1
-EOF
-
-        if test -z "$GNU_CC"; then
-            if test -z "$USE_64"; then
-                if test "$OS_TEST" = "ia64"; then
-                    CFLAGS="$CFLAGS +DD32"
-                    CXXFLAGS="$CXXFLAGS +DD32"
-                else
-                    CFLAGS="$CFLAGS +DAportable +DS2.0"
-                    CXXFLAGS="$CXXFLAGS +DAportable +DS2.0"
-                fi
-            else
-                if test "$OS_TEST" = "ia64"; then
-                    CFLAGS="$CFLAGS +DD64"
-                    CXXFLAGS="$CXXFLAGS +DD64"
-                else
-                    CFLAGS="$CFLAGS +DA2.0W +DS2.0"
-                    CXXFLAGS="$CXXFLAGS +DA2.0W +DS2.0"
-                fi
-            fi
-        fi
-        DEFAULT_IMPL_STRATEGY=_PTH
-    fi
-
-    if test "$DEFAULT_IMPL_STRATEGY" = "_EMU"; then
-        USE_NSPR_THREADS=1
-        USE_PTHREADS=
-        USE_USER_PTHREADS=
-    elif test "$DEFAULT_IMPL_STRATEGY" = "_PTH"; then
-        USE_PTHREADS=1
-        if test "$USE_NSPR_THREADS"; then
-            USE_PTHREADS=
-        fi
-        if test "$USE_USER_PTHREADS"; then
-            USE_PTHREADS=
-        fi
-    fi
-    ;;
-
-*-irix*)
-    cat >> confdefs.h <<\EOF
-#define XP_UNIX 1
-EOF
-
-    cat >> confdefs.h <<\EOF
-#define IRIX 1
-EOF
-
-    cat >> confdefs.h <<\EOF
-#define SVR4 1
-EOF
-
-    cat >> confdefs.h <<\EOF
-#define _SGI_MP_SOURCE 1
-EOF
-
-    cat >> confdefs.h <<\EOF
-#define HAVE_FCNTL_FILE_LOCKING 1
-EOF
-
-    PR_MD_CSRCS=irix.c
-    PR_MD_ASFILES=os_Irix.s
-    MKSHLIB='$(LD) $(DSO_LDOPTS) -rdata_shared -shared -soname $(notdir $@) -o $@'
-    STRIP="$STRIP -f"
-    RESOLVE_LINK_SYMBOLS=1
-    if test -n "$USE_64"; then
-        MDCPUCFG_H=_irix64.cfg
-    else
-        MDCPUCFG_H=_irix32.cfg
-    fi
-    case "${target_os}" in
-    irix6*)
-        cat >> confdefs.h <<\EOF
-#define IRIX6 1
-EOF
-
-        USE_PTHREADS=1
-        USE_N32=1
-        COMPILER_TAG=_n32
-        IMPL_STRATEGY=_PTH
-        ;;
-    irix5*)
-        cat >> confdefs.h <<\EOF
-#define IRIX5 1
-EOF
-
-        USE_NSPR_THREADS=1
-        ;;
-    *)
-        USE_PTHREADS=1
-        USE_N32=1
-        ;;
-    esac
-    if test "$GNU_CC"; then
-                                                                   AS='$(CC) -Wp,-P -x assembler-with-cpp -D_ASM -mips2 $(INCLUDES)'
-           CFLAGS="$CFLAGS -Wall -Wno-format"
-           _OPTIMIZE_FLAGS="-O6"
-    else
-           if test -n "$USE_N32"; then
-               AS='as -D_ASM $(INCLUDES) -n32'
-           else
-               AS='as -D_ASM $(INCLUDES)'
-           fi
-           CFLAGS="$CFLAGS -fullwarn -xansi"
-           if test "$USE_N32"; then
-               _OPTIMIZE_FLAGS="-O -OPT:Olimit=4000"
-           else
-               _OPTIMIZE_FLAGS="-O -Olimit 4000"
-           fi
-           if test "$USE_MDUPDATE"; then
-                CFLAGS="$CFLAGS -MDupdate \$(DEPENDENCIES)"
-           fi
-           case "${target}" in
-           *-irix6.*)
-               CFLAGS="$CFLAGS -multigot"
-               DSO_LDOPTS="-no_unresolved"
-               if test "$USE_N32"; then
-                       CFLAGS="$CFLAGS -n32 -woff 1209"
-                       DSO_LDOPTS="$DSO_LDOPTS -n32"
-               else
-                       if test "$USE_64"; then
-                           CFLAGS="$CFLAGS -64"
-                       else
-                           CFLAGS="$CFLAGS -32"
-                       fi
-               fi
-               ;;
-           *)
-               CFLAGS="$CFLAGS -xgot"
-               ;;
-           esac
-    fi
-    if test "${target_os}" = "irix5.3"; then
-           cat >> confdefs.h <<\EOF
-#define IRIX5_3 1
-EOF
-
-    fi
-    case "${target_os}" in
-       irix6.5)
-           if test -z "$GNU_CC"; then
-                   CFLAGS="$CFLAGS -mips3"
-           fi
-           cat >> confdefs.h <<\EOF
-#define _PR_HAVE_GETPROTO_R 1
-EOF
-
-           cat >> confdefs.h <<\EOF
-#define _PR_HAVE_GETPROTO_R_POINTER 1
-EOF
-
-           cat >> confdefs.h <<\EOF
-#define _PR_HAVE_SGI_PRDA_PROCMASK 1
-EOF
-
-           ;;
-       irix5*)
-           ;;
-       *)
-           cat >> confdefs.h <<\EOF
-#define _PR_HAVE_SGI_PRDA_PROCMASK 1
-EOF
-
-           ;;
-       esac
-    ;;
-
-*-linux*|*-gnu*|*-k*bsd*-gnu|*-android*|*-linuxandroid*)
-    if test -z "$USE_NSPR_THREADS"; then
-        USE_PTHREADS=1
-        IMPL_STRATEGY=_PTH
-    fi
-    cat >> confdefs.h <<\EOF
-#define XP_UNIX 1
-EOF
-
-    cat >> confdefs.h <<\EOF
-#define _GNU_SOURCE 1
-EOF
-
-    cat >> confdefs.h <<\EOF
-#define HAVE_FCNTL_FILE_LOCKING 1
-EOF
-
-    case "${target}" in
-    *-android*|*-linuxandroid*)
-        OS_TARGET=Android
-        cat >> confdefs.h <<\EOF
-#define LINUX 1
-EOF
-
-        ;;
-    *-linux*)
-        cat >> confdefs.h <<\EOF
-#define LINUX 1
-EOF
-
-        ;;
-    esac
-    CFLAGS="$CFLAGS -Wall"
-    CXXFLAGS="$CXXFLAGS -Wall"
-    MDCPUCFG_H=_linux.cfg
-    PR_MD_CSRCS=linux.c
-    MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
-    DSO_CFLAGS=-fPIC
-    DSO_LDOPTS='-shared -Wl,-soname -Wl,$(notdir $@)'
-    _OPTIMIZE_FLAGS=-O2
-    _DEBUG_FLAGS="-g -fno-inline"  # most people on linux use gcc/gdb, and that
-                                   # combo is not yet good at debugging inlined
-                                   # functions (even when using DWARF2 as the
-                                   # debugging format)
-    COMPILER_TAG=_glibc
-    if echo "$OS_TEST" | grep -c 86 >/dev/null; then
-        CPU_ARCH=x86
-    else
-        CPU_ARCH=$OS_TEST
-    fi
-    CPU_ARCH_TAG=_${CPU_ARCH}
-    case "${target_cpu}" in
-    alpha)
-        cat >> confdefs.h <<\EOF
-#define _ALPHA_ 1
-EOF
-
-        cat >> confdefs.h <<\EOF
-#define __alpha 1
-EOF
-
-        CFLAGS="$CFLAGS -mieee"
-        CXXFLAGS="$CXXFLAGS -mieee"
-        ;;
-    i*86)
-        cat >> confdefs.h <<\EOF
-#define i386 1
-EOF
-
-        PR_MD_ASFILES=os_Linux_x86.s
-        ;;
-    ia64)
-        PR_MD_ASFILES=os_Linux_ia64.s
-        ;;
-    x86_64)
-        if test -n "$USE_64"; then
-            PR_MD_ASFILES=os_Linux_x86_64.s
-        else
-            cat >> confdefs.h <<\EOF
-#define i386 1
-EOF
-
-            PR_MD_ASFILES=os_Linux_x86.s
-            CC="$CC -m32"
-            CXX="$CXX -m32"
-        fi
-        ;;
-    ppc|powerpc)
-        PR_MD_ASFILES=os_Linux_ppc.s
-        ;;
-    powerpc64)
-        if test -n "$USE_64"; then
-            CC="$CC -m64"
-            CXX="$CXX -m64"
-        else
-            PR_MD_ASFILES=os_Linux_ppc.s
-        fi
-        ;;
-    m68k)
-        CFLAGS="$CFLAGS -m68020-60"
-        CXXFLAGS="$CXXFLAGS -m68020-60"
-        ;;
-    esac    
-    ;;
-
-*-mingw*|*-cygwin*|*-msvc*|*-mks*)
-    cat >> confdefs.h <<\EOF
-#define XP_PC 1
-EOF
-
-    cat >> confdefs.h <<\EOF
-#define WIN32 1
-EOF
-
-    PR_MD_ARCH_DIR=windows
-    RESOLVE_LINK_SYMBOLS=1
-
-    if test -n "$GNU_CC"; then
-        CC="$CC -mwindows"
-        CXX="$CXX -mwindows"
-        DLL_SUFFIX=dll
-        MKSHLIB='$(CC) -shared -Wl,--export-all-symbols -Wl,--out-implib -Wl,$(IMPORT_LIBRARY) $(DLLBASE) -o $(subst $(OBJDIR)/,,$(SHARED_LIBRARY))'
-        RC=$WINDRES
-        # Use temp file for windres (bug 213281)
-        RCFLAGS='-O coff --use-temp-file'
-    else
-        CC=cl
-        CXX=cl
-        LD=link
-        AR='lib -NOLOGO -OUT:"$@"'
-        AR_FLAGS=
-        RANLIB='echo not_ranlib'
-        STRIP='echo not_strip'
-        RC=rc.exe
-        GARBAGE='$(OBJDIR)/vc20.pdb $(OBJDIR)/vc40.pdb'
-        OBJ_SUFFIX=obj
-        LIB_SUFFIX=lib
-        DLL_SUFFIX=dll
-
-        # Determine compiler version
-        
-        _MSVC_VER_FILTER='s|.* \([0-9]\+\.[0-9]\+\.[0-9]\+\(\.[0-9]\+\)\?\).*|\1|p'
-        
-        CC_VERSION=`"${CC}" -v 2>&1 | sed -ne "$_MSVC_VER_FILTER"`
-        _CC_MAJOR_VERSION=`echo ${CC_VERSION} | awk -F\. '{ print $1 }'`
-        _CC_MINOR_VERSION=`echo ${CC_VERSION} | awk -F\. '{ print $2 }'`
-        _CC_RELEASE=`echo ${CC_VERSION} | awk -F\. '{ print $3 }'`
-        _CC_BUILD=`echo ${CC_VERSION} | awk -F\. '{ print $4 }'`
-        MSC_VER=${_CC_MAJOR_VERSION}${_CC_MINOR_VERSION}
-
-        if test "$_CC_MAJOR_VERSION" -eq "14"; then
-                                            if test $_CC_RELEASE -gt 50727; then
-              _USE_DYNAMICBASE=1
-           elif test $_CC_BUILD -ge 762; then
-              _USE_DYNAMICBASE=1
-           fi
-           cat >> confdefs.h <<\EOF
-#define _CRT_SECURE_NO_DEPRECATE 1
-EOF
-
-           cat >> confdefs.h <<\EOF
-#define _CRT_NONSTDC_NO_DEPRECATE 1
-EOF
-
-        elif test $_CC_MAJOR_VERSION -ge 15; then
-           _USE_DYNAMICBASE=1    
-           cat >> confdefs.h <<\EOF
-#define _CRT_SECURE_NO_WARNINGS 1
-EOF
-
-           cat >> confdefs.h <<\EOF
-#define _CRT_NONSTDC_NO_WARNINGS 1
-EOF
-
-        fi
-
-        if test -n "$_USE_DYNAMICBASE"; then
-           DLLFLAGS="$DLLFLAGS -DYNAMICBASE"
-        fi
-
-        # Ensure that mt is Microsoft (R) Manifest Tool and not magnetic
-        # tape manipulation utility (or something else)
-        if test "$MSC_VER" -ge "1400"; then
-            
-            _MSMT_VER_FILTER='s|.* \([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*|\1|p'
-            
-
-            MSMT_TOOL=`mt 2>&1|grep 'Microsoft (R) Manifest Tool'`
-            if test -n "$MSMT_TOOL"; then
-                MSMANIFEST_TOOL_VERSION=`echo ${MSMT_TOOL}|sed -ne "$_MSMT_VER_FILTER"`
-                if test -z "$MSMANIFEST_TOOL_VERSION"; then
-                    echo "configure: warning: Unknown version of the Microsoft (R) Manifest Tool." 1>&2
-                fi
-                MT=mt
-                unset MSMT_TOOL
-            else
-                { echo "configure: error: Microsoft (R) Manifest Tool must be in your \$PATH." 1>&2; exit 1; }
-            fi
-        fi
-        
-        CFLAGS="$CFLAGS -W3 -nologo -GF -Gy"
-        DLLFLAGS="$DLLFLAGS -OUT:\"\$@\""
-        _DEBUG_FLAGS=-Zi
-        _OPTIMIZE_FLAGS=-O2
-
-        PROFILE_GEN_CFLAGS="-GL"
-        PROFILE_GEN_LDFLAGS="-LTCG:PGINSTRUMENT"
-        PROFILE_USE_CFLAGS="-GL -wd4624 -wd4952"
-        PROFILE_USE_LDFLAGS="-LTCG:PGUPDATE"
-
-        if test "$MSC_VER" -ge "1800"; then
-                                                CFLAGS="$CFLAGS -FS"
-                                    PROFILE_GEN_CFLAGS="$PROFILE_GEN_CFLAGS -Gw"
-            PROFILE_USE_CFLAGS="$PROFILE_USE_CFLAGS -Gw"
-        fi
-
-        if test -z "$MOZ_OPTIMIZE"; then
-            CFLAGS="$CFLAGS -Od"
-        fi
-
-        if test -n "$USE_DEBUG_RTL"; then
-            CFLAGS="$CFLAGS -MDd"
-        else
-            CFLAGS="$CFLAGS -MD"
-        fi
-
-        if test -n "$MOZ_DEBUG"; then
-            cat >> confdefs.h <<\EOF
-#define _DEBUG 1
-EOF
-
-        else
-            DEFINES="$DEFINES -U_DEBUG"
-        fi
-
-        if test -n "$MOZ_DEBUG_SYMBOLS"; then
-            if test -n "$MOZ_OPTIMIZE"; then
-                DLLFLAGS="$DLLFLAGS -DEBUG -OPT:REF"
-                LDFLAGS="$LDFLAGS -DEBUG -OPT:REF"
-            else
-                DLLFLAGS="$DLLFLAGS -DEBUG"
-                LDFLAGS="$LDFLAGS -DEBUG"
-            fi
-        fi
-
-        OS_DLLFLAGS="-nologo -DLL -SUBSYSTEM:WINDOWS"
-        if test "$MSC_VER" -le "1200" -a -z "$MOZ_DEBUG_SYMBOLS"; then
-            OS_DLLFLAGS="$OS_DLLFLAGS -PDB:NONE"
-        fi
-        
-        if test "$OS_TARGET" = "WINNT"; then
-            CFLAGS="$CFLAGS -GT"
-            LIBNSPR='$(dist_libdir)/libnspr$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
-            LIBPLC='$(dist_libdir)/libplc$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
-        else
-            LIBNSPR='$(dist_libdir)/nspr$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
-            LIBPLC='$(dist_libdir)/plc$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
-        fi
-    fi # GNU_CC
-
-    if test -n "$USE_STATIC_TLS"; then
-        cat >> confdefs.h <<\EOF
-#define _PR_USE_STATIC_TLS 1
-EOF
-
-    fi
-
-    if test "$OS_TARGET" = "WINNT"; then
-        cat >> confdefs.h <<\EOF
-#define WINNT 1
-EOF
-
-    else
-        cat >> confdefs.h <<\EOF
-#define WIN95 1
-EOF
-
-        # undefine WINNT as some versions of mingw gcc define it by default
-        DEFINES="$DEFINES -UWINNT"
-        cat >> confdefs.h <<\EOF
-#define _PR_GLOBAL_THREADS_ONLY 1
-EOF
-
-    fi
-
-    if test "$CPU_ARCH" = "x86"; then
-        CPU_ARCH_TAG=
-    else
-        CPU_ARCH_TAG=$CPU_ARCH
-    fi
-
-    if test -n "$USE_DEBUG_RTL"; then
-        OBJDIR_SUFFIX=OBJD
-    fi
-
-    case "$OS_TARGET" in
-    WINNT)
-           MDCPUCFG_H=_winnt.cfg
-           ;;
-    WIN95)
-           MDCPUCFG_H=_win95.cfg
-           ;;
-    *)
-           { echo "configure: error: Missing OS_TARGET for ${target}.  Use --enable-win32-target to set." 1>&2; exit 1; }
-       ;;
-    esac
-
-    case "$target_cpu" in
-    i*86)
-       if test -n "$USE_64"; then
-           cat >> confdefs.h <<\EOF
-#define _AMD64_ 1
-EOF
-
-       else            
-           cat >> confdefs.h <<\EOF
-#define _X86_ 1
-EOF
-
-       fi
-        ;;
-    x86_64)
-           cat >> confdefs.h <<\EOF
-#define _AMD64_ 1
-EOF
-
-           USE_64=1
-           ;;
-    ia64)
-           cat >> confdefs.h <<\EOF
-#define _IA64_ 1
-EOF
-
-           USE_64=1
-           ;;
-    *)
-           cat >> confdefs.h <<\EOF
-#define _CPU_ARCH_NOT_DEFINED 1
-EOF
-
-           ;;
-    esac
-    ;;
-
-*-wince*|*-winmo*)
-    cat >> confdefs.h <<\EOF
-#define XP_PC 1
-EOF
-
-    cat >> confdefs.h <<\EOF
-#define WIN32 1
-EOF
-
-    cat >> confdefs.h <<\EOF
-#define WINCE 1
-EOF
-
-    cat >> confdefs.h <<\EOF
-#define _PR_GLOBAL_THREADS_ONLY 1
-EOF
-
-
-    AR_FLAGS='-NOLOGO -OUT:"$@"'
-
-    OBJ_SUFFIX=obj
-    LIB_SUFFIX=lib
-    DLL_SUFFIX=dll
-    MKSHLIB='$(LD) -DLL $(DSO_LDOPTS) -OUT:$@'
-
-    PR_MD_ARCH_DIR=windows
-    RESOLVE_LINK_SYMBOLS=1
-
-    MDCPUCFG_H=_win95.cfg
-    LIBNSPR='$(dist_libdir)/nspr$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
-    LIBPLC='$(dist_libdir)/plc$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
-
-    DLLFLAGS='-OUT:"$@"'
-    if test -n "$MOZ_DEBUG_SYMBOLS"; then
-        OS_LDFLAGS='-DEBUG -DEBUGTYPE:CV'
-        OS_DLLFLAGS='-DEBUG -DEBUGTYPE:CV'
-        DSO_LDOPTS='-DEBUG -DEBUGTYPE:CV'
-    fi
-    _DEBUG_FLAGS=-Zi
-    _OPTIMIZE_FLAGS=-O2
-    ;;
-
-*-netbsd*)
-    cat >> confdefs.h <<\EOF
-#define XP_UNIX 1
-EOF
-
-    cat >> confdefs.h <<\EOF
-#define NETBSD 1
-EOF
-
-    cat >> confdefs.h <<\EOF
-#define HAVE_BSD_FLOCK 1
-EOF
-
-    if test -z "$USE_NSPR_THREADS"; then
-        USE_PTHREADS=1
-    fi
-    MDCPUCFG_H=_netbsd.cfg
-    PR_MD_CSRCS=netbsd.c
-
-    DSO_CFLAGS='-fPIC -DPIC'
-    CFLAGS="$CFLAGS -ansi -Wall"
-    CXXFLAGS="$CXXFLAGS -ansi -Wall"
-    MKSHLIB='$(CC) -o $@ $(DSO_LDOPTS)'
-
-    if test -z "$OBJECT_FMT"; then
-        if echo __ELF__ | ${CC-cc} -E - | grep -q __ELF__ 2>/dev/null; then
-            OBJECT_FMT=a.out
-            DLL_SUFFIX=so.1.0
-            DSO_LDOPTS='-shared'
-        else
-            OBJECT_FMT=ELF
-            DLL_SUFFIX=so
-            DSO_LDOPTS='-shared -Wl,-soname,$(notdir $@)'
-        fi
-    fi
-
-    if test "$LIBRUNPATH"; then
-        DSO_LDOPTS="$DSO_LDOPTS -Wl,-R$LIBRUNPATH"
-    fi
-    ;;
-
-*-nto*)
-    cat >> confdefs.h <<\EOF
-#define XP_UNIX 1
-EOF
-
-    cat >> confdefs.h <<\EOF
-#define NTO 1
-EOF
-
-    cat >> confdefs.h <<\EOF
-#define _QNX_SOURCE 1
-EOF
-
-    cat >> confdefs.h <<\EOF
-#define HAVE_POINTER_LOCALTIME_R 1
-EOF
-
-    MDCPUCFG_H=_nto.cfg
-    PR_MD_CSRCS=nto.c
-    MKSHLIB='$(CC) $(DSO_LDOPTS) -Wl,-soname -Wl,$(notdir $@) -o $@'
-    DSO_CFLAGS=-fPIC
-    DSO_LDOPTS=-shared
-    OS_LIBS="$OS_LIBS -lsocket"
-    _OPTIMIZE_FLAGS="-O1"
-    _DEBUG_FLAGS="-gstabs"
-       ;;
-
-*-openbsd*)
-    cat >> confdefs.h <<\EOF
-#define XP_UNIX 1
-EOF
-
-    cat >> confdefs.h <<\EOF
-#define OPENBSD 1
-EOF
-
-    cat >> confdefs.h <<\EOF
-#define HAVE_BSD_FLOCK 1
-EOF
-
-    cat >> confdefs.h <<\EOF
-#define HAVE_SOCKLEN_T 1
-EOF
-
-    CFLAGS="$CFLAGS -ansi -Wall"
-    CXXFLAGS="$CXXFLAGS -ansi -Wall"
-    DLL_SUFFIX=so.1.0
-    DSO_CFLAGS=-fPIC
-    MDCPUCFG_H=_openbsd.cfg
-    PR_MD_CSRCS=openbsd.c
-    OS_LIBS="-lc"
-    if test -z "$USE_NSPR_THREADS"; then
-        USE_PTHREADS=1
-    fi
-    DSO_LDOPTS='-shared -fPIC'
-    MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
-    ;;
-
-*-osf*)
-    SHELL_OVERRIDE="SHELL              = /usr/bin/ksh"
-    cat >> confdefs.h <<\EOF
-#define XP_UNIX 1
-EOF
-
-    cat >> confdefs.h <<\EOF
-#define OSF1 1
-EOF
-
-    cat >> confdefs.h <<\EOF
-#define _REENTRANT 1
-EOF
-
-    # OSF1 and HPUX report the POLLHUP event for a socket when the
-    # shutdown(SHUT_WR) operation is called for the remote end, even though
-    # the socket is still writeable. Use select(), instead of poll(), to
-    # workaround this problem.
-    cat >> confdefs.h <<\EOF
-#define _PR_POLL_WITH_SELECT 1
-EOF
-
-
-    if echo "$OS_RELEASE" | egrep -c '(V2.0|V3.2)' 2>/dev/null ; then
-        USE_NSPR_THREADS=1
-    fi
-
-    if test -z "$GNU_CC"; then
-        CC="$CC -std1 -ieee_with_inexact"
-        if test "$OS_RELEASE" != "V2.0"; then
-            CC="$CC -readonly_strings"
-        fi
-        _OPTIMIZE_FLAGS="$_OPTIMIZE_FLAGS -Olimit 4000"
-        ac_safe=`echo "machine/builtins.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for machine/builtins.h""... $ac_c" 1>&6
-echo "configure:4932: checking for machine/builtins.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 4937 "configure"
-#include "confdefs.h"
-#include <machine/builtins.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4942: \"$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
-  cat >> confdefs.h <<\EOF
-#define OSF1_HAVE_MACHINE_BUILTINS_H 1
-EOF
-
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-    else
-        CFLAGS="$CFLAGS -mieee"
-        CXXFLAGS="$CXXFLAGS -mieee"
-    fi
-
-    if echo $OS_RELEASE | egrep -c '(V2.0|V3.2)' 2>/dev/null; then
-        cat >> confdefs.h <<\EOF
-#define HAVE_INT_LOCALTIME_R 1
-EOF
-
-    else
-        cat >> confdefs.h <<\EOF
-#define HAVE_FCNTL_FILE_LOCKING 1
-EOF
-
-        cat >> confdefs.h <<\EOF
-#define HAVE_POINTER_LOCALTIME_R 1
-EOF
-
-    fi
-    if echo $OS_RELEASE | grep -c V4.0 >/dev/null; then
-        cat >> confdefs.h <<\EOF
-#define OSF1V4_MAP_PRIVATE_BUG 1
-EOF
-
-    fi
-    DSO_LDOPTS='-shared -all -expect_unresolved "*" -soname $(notdir $@)'
-    MDCPUCFG_H=_osf1.cfg
-    PR_MD_CSRCS=osf1.c
-    ;;
-
-*-qnx*)
-    cat >> confdefs.h <<\EOF
-#define XP_UNIX 1
-EOF
-
-    cat >> confdefs.h <<\EOF
-#define QNX 1
-EOF
-
-    cat >> confdefs.h <<\EOF
-#define _PR_NEED_H_ERRNO 1
-EOF
-
-    USE_NSPR_THREADS=1
-    MDCPUCFG_H=_qnx.cfg
-    PR_MD_CSRCS=qnx.c
-    ;;
-
-*-riscos*)
-    cat >> confdefs.h <<\EOF
-#define XP_UNIX 1
-EOF
-
-    cat >> confdefs.h <<\EOF
-#define RISCOS 1
-EOF
-
-    cat >> confdefs.h <<\EOF
-#define _PR_NEED_H_ERRNO 1
-EOF
-
-    USE_PTHREADS=1
-    MDCPUCFG_H=_riscos.cfg
-    PR_MD_CSRCS=riscos.c
-    DSO_CFLAGS=-fPIC
-    DSO_LDOPTS='-shared -Wl,-soname -Wl,$(notdir $@)'
-    MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
-    ;;
-
-*-*-sco*)
-    cat >> confdefs.h <<\EOF
-#define XP_UNIX 1
-EOF
-
-    cat >> confdefs.h <<\EOF
-#define SCO 1
-EOF
-
-    cat >> confdefs.h <<\EOF
-#define sco 1
-EOF
-
-    cat >> confdefs.h <<\EOF
-#define SYSV 1
-EOF
-
-    cat >> confdefs.h <<\EOF
-#define _SVID3 1
-EOF
-
-    cat >> confdefs.h <<\EOF
-#define _PR_NEED_H_ERRNO 1
-EOF
-
-    CC='cc -b elf -KPIC'
-    CXX='$(NSDEPTH)/build/hcpp CC +.cpp +w'
-    USE_NSPR_THREADS=1
-    CPU_ARCH=x86
-    DSO_LDOPTS='-b elf -G'
-    MDCPUCFG_H=_scoos.cfg
-    PR_MD_SRCS=scoos.c
-    ;;
-
-*-solaris*)
-    if test -z "$USE_NSPR_THREADS"; then
-        USE_PTHREADS=1
-    fi
-    cat >> confdefs.h <<\EOF
-#define XP_UNIX 1
-EOF
-
-    cat >> confdefs.h <<\EOF
-#define SVR4 1
-EOF
-
-    cat >> confdefs.h <<\EOF
-#define SYSV 1
-EOF
-
-    cat >> confdefs.h <<\EOF
-#define __svr4 1
-EOF
-
-    cat >> confdefs.h <<\EOF
-#define __svr4__ 1
-EOF
-
-    cat >> confdefs.h <<\EOF
-#define SOLARIS 1
-EOF
-
-    cat >> confdefs.h <<\EOF
-#define HAVE_FCNTL_FILE_LOCKING 1
-EOF
-
-    CPU_ARCH=`uname -p`
-    MDCPUCFG_H=_solaris.cfg
-    PR_MD_CSRCS=solaris.c
-    LD=/usr/ccs/bin/ld
-    MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
-    RESOLVE_LINK_SYMBOLS=1
-    case "${OS_RELEASE}" in
-    5.8|5.9)
-        ;;
-    *)
-        # It is safe to use the -Bdirect linker flag on Solaris 10 or later.
-        USE_B_DIRECT=1
-        ;;
-    esac
-    if test -n "$GNU_CC"; then
-        DSO_CFLAGS=-fPIC
-        if `$CC -print-prog-name=ld` -v 2>&1 | grep -c GNU >/dev/null; then
-            GCC_USE_GNU_LD=1
-        fi
-        DSO_LDOPTS='-shared -Wl,-h,$(notdir $@),-z,combreloc,-z,defs,-z,ignore' 
-        if test -n "$USE_B_DIRECT"; then
-            DSO_LDOPTS="$DSO_LDOPTS,-Bdirect"
-        fi
-    else
-        DSO_CFLAGS=-KPIC
-        DSO_LDOPTS='-G -h $(notdir $@) -z combreloc -z defs -z ignore'
-        if test -n "$USE_B_DIRECT"; then
-            DSO_LDOPTS="$DSO_LDOPTS -Bdirect"
-        fi
-    fi
-    if test -n "$GNU_CC"; then
-        CFLAGS="$CFLAGS -Wall"
-        CXXFLAGS="$CXXFLAGS -Wall"
-        if test -n "$USE_MDUPDATE"; then
-            CFLAGS="$CFLAGS -MDupdate \$(DEPENDENCIES)"
-            CXXFLAGS="$CXXFLAGS -MDupdate \$(DEPENDENCIES)"
-        fi
-        GCC_AS=`$CC -print-prog-name=as`
-        if test "`echo | $GCC_AS -v 2>&1 | grep -c GNU`" != "0"; then
-            GNU_AS=1
-        fi
-    else
-        CFLAGS="$CFLAGS -xstrconst"
-        CXXFLAGS="$CXXFLAGS -Qoption cg -xstrconst -features=tmplife"
-        if test -z "$MOZ_OPTIMIZE"; then
-            CFLAGS="$CFLAGS -xs"
-            CXXFLAGS="$CXXFLAGS -xs"
-        fi
-        _OPTIMIZE_FLAGS=-xO4
-    fi
-    if test -z "$GNU_AS"; then
-        ASFLAGS="$ASFLAGS -Wa,-P"
-    fi
-    if test -n "$USE_64"; then
-        if test -n "$GNU_CC"; then
-            CC="$CC -m64"
-            CXX="$CXX -m64"
-        else
-            if test "$OS_TEST" = "i86pc"; then
-                CC="$CC -xarch=amd64"
-                CXX="$CXX -xarch=amd64"
-            else
-                CC="$CC -xarch=v9"
-                CXX="$CXX -xarch=v9"
-            fi
-        fi
-    fi
-    if test "$OS_TEST" = "i86pc"; then
-        if test -z "$USE_64"; then
-            cat >> confdefs.h <<\EOF
-#define i386 1
-EOF
-
-        fi
-        CPU_ARCH_TAG=_$OS_TEST
-        # The default debug format, DWARF (-g), is not supported by gcc
-        # on i386-ANY-sysv4/solaris, but the stabs format is.  It is
-        # assumed that the Solaris assembler /usr/ccs/bin/as is used.
-        # If your gcc uses GNU as, you do not need the -Wa,-s option.
-        if test -n "$MOZ_DEBUG" && test -n "$GNU_CC"; then
-            _DEBUG_FLAGS=-gstabs
-            if test -z "$GNU_AS"; then
-                _DEBUG_FLAGS="$_DEBUG_FLAGS -Wa,-s"
-            fi
-        fi
-    fi
-    case "${target_os}" in
-    solaris2.3*)
-        cat >> confdefs.h <<\EOF
-#define _PR_NO_LARGE_FILES 1
-EOF
-
-        ;;
-    solaris2.4*)
-        cat >> confdefs.h <<\EOF
-#define _PR_NO_LARGE_FILES 1
-EOF
-
-        ;;
-    solaris2.5*)
-        cat >> confdefs.h <<\EOF
-#define SOLARIS2_5 1
-EOF
-    
-        ;;
-    *)
-        cat >> confdefs.h <<\EOF
-#define _PR_HAVE_OFF64_T 1
-EOF
-
-        # The lfcompile64(5) man page on Solaris 2.6 says:
-        #     For applications that do not wish to conform to the POSIX or
-        #     X/Open  specifications,  the  64-bit transitional interfaces
-        #     are available by default.  No compile-time flags need to  be
-        #     set.
-        # But gcc 2.7.2.x fails to define _LARGEFILE64_SOURCE by default.
-        # The native compiler, gcc 2.8.x, and egcs don't have this problem.
-        if test -n "$GNU_CC"; then
-            cat >> confdefs.h <<\EOF
-#define _LARGEFILE64_SOURCE 1
-EOF
-
-        fi
-        ;;
-    esac
-    case "${target_os}" in
-    solaris2.3*)
-        ;;
-    solaris2.4*)
-        ;;
-    solaris2.5*)
-        ;;
-    solaris2.6*)
-        ;;
-    solaris2.7*)
-        ;;
-    *)
-        # Solaris 8 or higher has IPv6.
-        cat >> confdefs.h <<\EOF
-#define _PR_INET6 1
-EOF
-
-        ;;
-    esac
-    if test "$CPU_ARCH" = "sparc"; then
-        # 64-bit Solaris SPARC requires V9 architecture, so the following
-        # is not needed.
-        if test -z "$USE_64"; then
-            ULTRASPARC_LIBRARY=nspr_flt
-        fi
-    fi
-    # Purify requires that binaries linked against nspr also
-    # be linked against -lrt (or -lposix4) so add it to OS_LIBS
-    _rev=`uname -r`
-    _librt=`echo $_rev 5.6 | awk '{ if ($1 > $2) print "-lrt"; else print "-lposix4" }'`
-    OS_LIBS="$OS_LIBS $_librt"
-    ;;
-
-*-sco-sysv5*)
-    cat >> confdefs.h <<\EOF
-#define XP_UNIX 1
-EOF
-
-    cat >> confdefs.h <<\EOF
-#define UNIXWARE 1
-EOF
-
-    cat >> confdefs.h <<\EOF
-#define SVR4 1
-EOF
-
-    cat >> confdefs.h <<\EOF
-#define SYSV 1
-EOF
-
-    USE_NSPR_THREADS=1
-    if echo $OS_RELEASE | grep -c 2.1 2>/dev/null; then
-        cat >> confdefs.h <<\EOF
-#define _PR_NO_LARGE_FILES 1
-EOF
-
-        CC='$(NSDEPTH)/build/hcc cc'
-        CXX='$(NSDEPTH)/build/hcpp CC'
-        MDCPUCFG_H=_unixware.cfg
-    else
-        cat >> confdefs.h <<\EOF
-#define _LARGEFILE64_SOURCE 1
-EOF
-
-        cat >> confdefs.h <<\EOF
-#define _PR_HAVE_OFF64_T 1
-EOF
-
-        cat >> confdefs.h <<\EOF
-#define _PR_HAVE_SOCKADDR_LEN 1
-EOF
-
-        MDCPUCFG_H=_unixware7.cfg
-    fi
-    PR_MD_CSRCS=unixware.c
-    DSO_LDOPTS=-G
-    CPU_ARCH=x86
-    ;;
-
-*-symbian*)
-    # Check whether --with-symbian-sdk or --without-symbian-sdk was given.
-if test "${with_symbian_sdk+set}" = set; then
-  withval="$with_symbian_sdk"
-  SYMBIAN_SDK_DIR=$withval
-fi
-
-
-    echo -----------------------------------------------------------------------------
-    echo Building with Symbian SDK in: $SYMBIAN_SDK_DIR
-    echo -----------------------------------------------------------------------------
-
-    cat >> confdefs.h <<\EOF
-#define XP_UNIX 1
-EOF
-
-    cat >> confdefs.h <<\EOF
-#define SYMBIAN 1
-EOF
-
-    cat >> confdefs.h <<\EOF
-#define __arm__ 1
-EOF
-
-    cat >> confdefs.h <<\EOF
-#define __SYMBIAN32__ 1
-EOF
-
-    cat >> confdefs.h <<\EOF
-#define _UNICODE 1
-EOF
-
-    cat >> confdefs.h <<\EOF
-#define NDEBUG 1
-EOF
-
-    cat >> confdefs.h <<\EOF
-#define __SUPPORT_CPP_EXCEPTIONS__ 1
-EOF
-
-    cat >> confdefs.h <<\EOF
-#define MOZ_STDERR_TO_STDOUT 1
-EOF
-
-    cat >> confdefs.h <<\EOF
-#define HAVE_FCNTL_FILE_LOCKING 1
-EOF
-
-    cat >> confdefs.h <<\EOF
-#define HAVE_SOCKLEN_T 1
-EOF
-
-    USE_PTHREADS=1
-    LIB_SUFFIX=lib
-    DLL_SUFFIX=dll
-    MKSHLIB=
-    DSO_LDOPTS=
-    DSO_CFLAGS=
-    VISIBILITY_FLAGS=
-    MDCPUCFG_H=_symbian.cfg
-    PR_MD_CSRCS=symbian.c
-    NSINSTALL=nsinstall
-    RANLIB='echo no ranlib '
-    CPU_ARCH=ARM
-    OS_ARCH=SYMBIAN
-    OS_EXE_CFLAGS="$OS_EXE_CFLAGS -D__EXE__"
-    CFLAGS="$CFLAGS -MD -nostdinc"
-    SYMBIAN_SYS_INCLUDE="-I$SYMBIAN_SDK_DIR/Epoc32/include/variant -I$SYMBIAN_SDK_DIR/Epoc32/include -I$SYMBIAN_SDK_DIR/Epoc32/include/stdapis"
-    echo -------------------------------------------------------
-    echo SYMBIAN_SYS_INCLUDE is: $SYMBIAN_SYS_INCLUDE
-    echo -------------------------------------------------------
-    case "$OS_TARGET" in
-    WINSCW)
-        CC=mwccsym2.exe
-        CXX=mwccsym2.exe
-        LD=mwldsym2.exe
-        AR=mwldsym2.exe
-        WINSCW_LD_DIR="\$(SYMBIAN_SDK_DIR)/EPOC32/RELEASE/WINSCW/UDEB"
-        CFLAGS="$CFLAGS -O0 -inline off -wchar_t off -align 4 -warnings on -w nohidevirtual,nounusedexpr -msgstyle gcc -enum int -str pool -exc ms -trigraphs on -nostderr -gccdep -cwd source -i- -I\$(VPATH)"
-        SYMBIAN_SYS_INCLUDE="$SYMBIAN_SYS_INCLUDE -include Symbian_OS_v9.2.hrh"
-        AR_FLAGS="-library -msgstyle gcc -stdlib -subsystem windows -noimplib -o \$@"
-        cat >> confdefs.h <<\EOF
-#define _DEBUG 1
-EOF
-
-        cat >> confdefs.h <<\EOF
-#define __CW32__ 1
-EOF
-
-        cat >> confdefs.h <<\EOF
-#define __WINS__ 1
-EOF
-
-        cat >> confdefs.h <<\EOF
-#define __WINSCW__ 1
-EOF
-
-        DEFINES="$DEFINES -U_WIN32"
-           ;;
-    GCCE)
-        CFLAGS="$CFLAGS -Wall -Wno-unknown-pragmas -fexceptions -march=armv5t -mapcs -pipe -x c -msoft-float"
-        CXXFLAGS="$CXXFLAGS $CFLAGS -Wno-ctor-dtor-privacy"
-        SYMBIAN_SYS_INCLUDE="$SYMBIAN_SYS_INCLUDE -include $SYMBIAN_SDK_DIR/EPOC32/INCLUDE/GCCE/GCCE.h"
-        cat >> confdefs.h <<\EOF
-#define __GCCE__ 1
-EOF
-
-        cat >> confdefs.h <<\EOF
-#define __EABI__ 1
-EOF
-
-        DEFINES="$DEFINES -D__PRODUCT_INCLUDE__=$SYMBIAN_SDK_DIR/Epoc32/include/variant/Symbian_OS_v9.2.hrh"
-           ;;
-    *)
-           { echo "configure: error: Missing OS_TARGET for ${target}. Set --enable-symbian-target to with 'WINSCW' or 'GCCE'." 1>&2; exit 1; }
-       ;;
-    esac
-    CFLAGS="$CFLAGS ${SYMBIAN_SYS_INCLUDE}"
-    ;;
-
-*-os2*)
-    cat >> confdefs.h <<\EOF
-#define XP_OS2 1
-EOF
-
-    cat >> confdefs.h <<\EOF
-#define XP_PC 1
-EOF
-
-    cat >> confdefs.h <<\EOF
-#define BSD_SELECT 1
-EOF
-
-    cat >> confdefs.h <<\EOF
-#define TCPV40HDRS 1
-EOF
-
-    LIB_SUFFIX=lib
-    DLL_SUFFIX=dll
-    RC=rc.exe
-    PR_MD_ARCH_DIR=os2
-    PROG_SUFFIX=.exe
-    NSINSTALL=nsinstall
-    MDCPUCFG_H=_os2.cfg
-    RESOLVE_LINK_SYMBOLS=1
-
-    cat >> confdefs.h <<\EOF
-#define OS2 1
-EOF
-
-    AR=emxomfar
-    AR_FLAGS='r $@'
-    CFLAGS="$CFLAGS -Wall -Zomf"
-    CXXFLAGS="$CFLAGS -Wall -Zomf"
-    MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
-    DSO_CFLAGS=
-    DSO_LDOPTS='-Zomf -Zdll'
-    LDFLAGS='-Zmap'
-    _OPTIMIZE_FLAGS="-O2 -s"
-    _DEBUG_FLAGS="-g -fno-inline"
-    if test -n "$MOZ_OPTIMIZE"; then
-      DSO_LDOPTS="$DSO_LDOPTS -Zlinker /EXEPACK:2 -Zlinker /PACKCODE -Zlinker /PACKDATA"
-    fi
-    IMPLIB='emximp -o'
-    FILTER='emxexp -o'
-    if test -n "$MOZ_OS2_HIGH_MEMORY"; then
-      LDFLAGS="$LDFLAGS -Zhigh-mem"
-      cat >> confdefs.h <<\EOF
-#define MOZ_OS2_HIGH_MEMORY 1
-EOF
-
-    fi
-
-    # GCC for OS/2 currently predefines these, but we don't want them
-    DEFINES="$DEFINES -Uunix -U__unix -U__unix__"
-    ;;
-
-*)
-    cat >> confdefs.h <<\EOF
-#define XP_UNIX 1
-EOF
-
-    ;;
-   
-esac
-
-if test -z "$SKIP_LIBRARY_CHECKS"; then
-
-
-
-case $target in
-*-darwin*|*-beos*|*-os2*)
-    ;;
-*)
-    echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:5501: checking for dlopen in -ldl" >&5
-ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-ldl  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 5509 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char dlopen();
-
-int main() {
-dlopen()
-; return 0; }
-EOF
-if { (eval echo configure:5520: \"$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"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
-echo "configure:5537: checking for dlfcn.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 5542 "configure"
-#include "confdefs.h"
-#include <dlfcn.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5547: \"$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
-  OS_LIBS="-ldl $OS_LIBS"
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-    ;;
-esac
-
-
-
-
-if test $ac_cv_prog_gcc = yes; then
-    echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
-echo "configure:5580: checking whether ${CC-cc} needs -traditional" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-    ac_pattern="Autoconf.*'x'"
-  cat > conftest.$ac_ext <<EOF
-#line 5586 "configure"
-#include "confdefs.h"
-#include <sgtty.h>
-Autoconf TIOCGETP
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "$ac_pattern" >/dev/null 2>&1; then
-  rm -rf conftest*
-  ac_cv_prog_gcc_traditional=yes
-else
-  rm -rf conftest*
-  ac_cv_prog_gcc_traditional=no
-fi
-rm -f conftest*
-
-
-  if test $ac_cv_prog_gcc_traditional = no; then
-    cat > conftest.$ac_ext <<EOF
-#line 5604 "configure"
-#include "confdefs.h"
-#include <termio.h>
-Autoconf TCGETA
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "$ac_pattern" >/dev/null 2>&1; then
-  rm -rf conftest*
-  ac_cv_prog_gcc_traditional=yes
-fi
-rm -f conftest*
-
-  fi
-fi
-
-echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
-  if test $ac_cv_prog_gcc_traditional = yes; then
-    CC="$CC -traditional"
-  fi
-fi
-
-_SAVE_LIBS="$LIBS"
-LIBS="$LIBS $OS_LIBS"
-for ac_func in dladdr gettid lchown setpriority strerror syscall
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5630: 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 5635 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    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
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:5658: \"$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'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-LIBS="$_SAVE_LIBS"
-
-
-
-# Check whether --with-ccache or --without-ccache was given.
-if test "${with_ccache+set}" = set; then
-  withval="$with_ccache"
-  CCACHE=$withval
-else
-  CCACHE="no"
-fi
-
-
-if test "$CCACHE" != "no"; then
-    if test -n "$CCACHE"; then
-        if test "$CCACHE" = "yes"; then
-            CCACHE=
-        else
-            if test ! -e "$CCACHE"; then
-                { echo "configure: error: $CCACHE not found" 1>&2; exit 1; }
-            fi
-        fi
-    fi
-    for ac_prog in $CCACHE ccache
-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:5710: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_CCACHE'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  case "$CCACHE" in
-  /*)
-  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
-  ;;
-  ?:/*)                         
-  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a dos path.
-  ;;
-  *)
-  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_path_CCACHE="$ac_dir/$ac_word"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  ;;
-esac
-fi
-CCACHE="$ac_cv_path_CCACHE"
-if test -n "$CCACHE"; then
-  echo "$ac_t""$CCACHE" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-test -n "$CCACHE" && break
-done
-
-    if test -z "$CCACHE" -o "$CCACHE" = ":"; then
-        { echo "configure: error: ccache not found" 1>&2; exit 1; }
-    elif test -x "$CCACHE"; then
-        CC="$CCACHE $CC"
-        CXX="$CCACHE $CXX"
-    else
-        { echo "configure: error: $CCACHE is not executable" 1>&2; exit 1; }
-    fi
-fi
-
-# Check whether --enable-strip or --disable-strip was given.
-if test "${enable_strip+set}" = set; then
-  enableval="$enable_strip"
-   if test "$enableval" = "yes"; then
-           ENABLE_STRIP=1
-      fi 
-fi
-
-
-case "${target_os}" in
-hpux*)
-if test -z "$GNU_CC"; then
-
-    echo $ac_n "checking for +Olit support""... $ac_c" 1>&6
-echo "configure:5769: checking for +Olit support" >&5
-if eval "test \"`echo '$''{'ac_cv_hpux_usable_olit_option'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-                  ac_cv_hpux_usable_olit_option=no
-        rm -f conftest*
-        echo 'int main() { return 0; }' | cat > conftest.c
-        ${CC-cc} ${CFLAGS} +Olit=all -o conftest conftest.c > conftest.out 2>&1
-        if test $? -eq 0; then
-            if test -z "`egrep -i '(unrecognize|unknown)' conftest.out`"; then
-                ac_cv_hpux_usable_olit_option=yes
-            fi
-        fi
-        rm -f conftest*
-        
-fi
-
-echo "$ac_t""$ac_cv_hpux_usable_olit_option" 1>&6
-
-    if test "$ac_cv_hpux_usable_olit_option" = "yes"; then
-        CFLAGS="$CFLAGS +Olit=all"
-        CXXFLAGS="$CXXFLAGS +Olit=all"
-    else
-        CFLAGS="$CFLAGS +ESlit"
-        CXXFLAGS="$CXXFLAGS +ESlit"
-    fi
-fi
-;;
-esac
-
-
-
-case "$target_os" in
-darwin*)
-    _HAVE_PTHREADS=1
-    ;;
-wince*)
-    _HAVE_PTHREADS=
-    ;;
-*)
-    
-echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
-echo "configure:5811: checking for pthread_create in -lpthreads" >&5
-echo "
-    #include <pthread.h> 
-    void *foo(void *v) { return v; } 
-    int main() { 
-        pthread_t t;
-        if (!pthread_create(&t, 0, &foo, 0)) {
-            pthread_join(t, 0);
-        }
-        return 0;
-    }" > dummy.c ;
-    echo "${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lpthreads $LDFLAGS $LIBS" 1>&5;
-    ${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lpthreads $LDFLAGS $LIBS 2>&5;
-    _res=$? ;
-    rm -f dummy.c dummy${ac_exeext} ;
-    if test "$_res" = "0"; then
-        echo "$ac_t""yes" 1>&6
-        _HAVE_PTHREADS=1 _PTHREAD_LDFLAGS="-lpthreads"
-    else
-        echo "$ac_t""no" 1>&6
-        
-echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
-echo "configure:5833: checking for pthread_create in -lpthread" >&5
-echo "
-    #include <pthread.h> 
-    void *foo(void *v) { return v; } 
-    int main() { 
-        pthread_t t;
-        if (!pthread_create(&t, 0, &foo, 0)) {
-            pthread_join(t, 0);
-        }
-        return 0;
-    }" > dummy.c ;
-    echo "${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lpthread $LDFLAGS $LIBS" 1>&5;
-    ${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lpthread $LDFLAGS $LIBS 2>&5;
-    _res=$? ;
-    rm -f dummy.c dummy${ac_exeext} ;
-    if test "$_res" = "0"; then
-        echo "$ac_t""yes" 1>&6
-        _HAVE_PTHREADS=1 _PTHREAD_LDFLAGS="-lpthread"
-    else
-        echo "$ac_t""no" 1>&6
-        
-echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
-echo "configure:5855: checking for pthread_create in -lc_r" >&5
-echo "
-    #include <pthread.h> 
-    void *foo(void *v) { return v; } 
-    int main() { 
-        pthread_t t;
-        if (!pthread_create(&t, 0, &foo, 0)) {
-            pthread_join(t, 0);
-        }
-        return 0;
-    }" > dummy.c ;
-    echo "${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lc_r $LDFLAGS $LIBS" 1>&5;
-    ${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lc_r $LDFLAGS $LIBS 2>&5;
-    _res=$? ;
-    rm -f dummy.c dummy${ac_exeext} ;
-    if test "$_res" = "0"; then
-        echo "$ac_t""yes" 1>&6
-        _HAVE_PTHREADS=1 _PTHREAD_LDFLAGS="-lc_r"
-    else
-        echo "$ac_t""no" 1>&6
-        
-echo $ac_n "checking for pthread_create in -lc""... $ac_c" 1>&6
-echo "configure:5877: checking for pthread_create in -lc" >&5
-echo "
-    #include <pthread.h> 
-    void *foo(void *v) { return v; } 
-    int main() { 
-        pthread_t t;
-        if (!pthread_create(&t, 0, &foo, 0)) {
-            pthread_join(t, 0);
-        }
-        return 0;
-    }" > dummy.c ;
-    echo "${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lc $LDFLAGS $LIBS" 1>&5;
-    ${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lc $LDFLAGS $LIBS 2>&5;
-    _res=$? ;
-    rm -f dummy.c dummy${ac_exeext} ;
-    if test "$_res" = "0"; then
-        echo "$ac_t""yes" 1>&6
-        _HAVE_PTHREADS=1
-                
-    else
-        echo "$ac_t""no" 1>&6
-        
-    fi
-
-            
-    fi
-
-        
-    fi
-
-    
-    fi
-
-    ;;
-esac
-
-# Check whether --with-pthreads or --without-pthreads was given.
-if test "${with_pthreads+set}" = set; then
-  withval="$with_pthreads"
-   if test "$withval" = "yes"; then
-           if test -n "$_HAVE_PTHREADS"; then
-                   USE_PTHREADS=1 
-                   USE_USER_PTHREADS=
-                   USE_NSPR_THREADS=
-           else
-                   { echo "configure: error:  --with-pthreads specified for a system without pthread support " 1>&2; exit 1; };
-           fi
-         else
-           USE_PTHREADS=
-           _PTHREAD_LDFLAGS=
-         fi
-else
-   if test -n "$_HAVE_PTHREADS" && test -z "$USE_USER_PTHREADS" && test -z "$USE_NSPR_THREADS"; then
-           USE_PTHREADS=1
-           USE_USER_PTHREADS=
-           USE_NSPR_THREADS=
-         fi
-fi
-
-
-# Check whether --enable-user-pthreads or --disable-user-pthreads was given.
-if test "${enable_user_pthreads+set}" = set; then
-  enableval="$enable_user_pthreads"
-   if test "$enableval" = "yes"; then
-        if test -n "$_HAVE_PTHREADS"; then
-                   USE_PTHREADS=
-                   USE_USER_PTHREADS=1
-                   USE_NSPR_THREADS=
-           else
-                   { echo "configure: error:  --enable-user-pthreads specified for a system without pthread support " 1>&2; exit 1; };
-           fi
-         fi
-fi
-
-
-# Check whether --enable-nspr-threads or --disable-nspr-threads was given.
-if test "${enable_nspr_threads+set}" = set; then
-  enableval="$enable_nspr_threads"
-   if test "$enableval" = "yes"; then
-           USE_PTHREADS=
-           USE_USER_PTHREADS=
-           USE_NSPR_THREADS=1
-         fi
-fi
-
-
-case "$target" in
-*-beos*)
-    # Check whether --with-bthreads or --without-bthreads was given.
-if test "${with_bthreads+set}" = set; then
-  withval="$with_bthreads"
-       if test "$withval" = "yes"; then
-           USE_BTHREADS=1
-               USE_USER_PTHREADS=
-               USE_PTHREADS=
-           fi
-fi
-
-    ;;
-esac
-
-fi # SKIP_LIBRARY_CHECKS
-
-# Check whether --enable-ipv6 or --disable-ipv6 was given.
-if test "${enable_ipv6+set}" = set; then
-  enableval="$enable_ipv6"
-   if test "$enableval" = "yes"; then
-           USE_IPV6=1
-      else
-           USE_IPV6=
-      fi
-fi
-
-
-if test -n "$USE_PTHREADS"; then
-      rm -f conftest*
-   ac_cv_have_dash_pthread=no
-   echo $ac_n "checking whether ${CC-cc} accepts -pthread""... $ac_c" 1>&6
-echo "configure:5995: checking whether ${CC-cc} accepts -pthread" >&5
-   echo 'int main() { return 0; }' | cat > conftest.c
-   ${CC-cc} -pthread -o conftest conftest.c > conftest.out 2>&1
-   if test $? -eq 0; then
-       if test -z "`egrep -i '(unrecognize|unknown)' conftest.out | grep pthread`" && test -z "`egrep -i '(error|incorrect)' conftest.out`" ; then
-           ac_cv_have_dash_pthread=yes
-               case "$target_os" in
-           freebsd*)
-# Freebsd doesn't use -pthread for compiles, it uses them for linking
-            ;;
-           *)
-            CFLAGS="$CFLAGS -pthread"
-            CXXFLAGS="$CXXFLAGS -pthread"
-            ;;
-        esac
-       fi
-    fi
-    rm -f conftest*
-    echo "$ac_t""$ac_cv_have_dash_pthread" 1>&6
-
-                           ac_cv_have_dash_pthreads=no
-    if test "$ac_cv_have_dash_pthread" = "no"; then
-           echo $ac_n "checking whether ${CC-cc} accepts -pthreads""... $ac_c" 1>&6
-echo "configure:6018: checking whether ${CC-cc} accepts -pthreads" >&5
-       echo 'int main() { return 0; }' | cat > conftest.c
-           ${CC-cc} -pthreads -o conftest conftest.c > conftest.out 2>&1
-       if test $? -eq 0; then
-               if test -z "`egrep -i '(unrecognize|unknown)' conftest.out | grep pthreads`" && test -z "`egrep -i '(error|incorrect)' conftest.out`" ; then
-                           ac_cv_have_dash_pthreads=yes
-                           CFLAGS="$CFLAGS -pthreads"
-                           CXXFLAGS="$CXXFLAGS -pthreads"
-                   fi
-           fi
-           rm -f conftest*
-       echo "$ac_t""$ac_cv_have_dash_pthreads" 1>&6
-    fi
-
-    case "$target" in
-    *-solaris*)
-        if test "$ac_cv_have_dash_pthreads" = "yes"; then
-            _PTHREAD_LDFLAGS=
-        fi
-           ;;
-    *-freebsd*)
-           cat >> confdefs.h <<\EOF
-#define _REENTRANT 1
-EOF
-
-           cat >> confdefs.h <<\EOF
-#define _THREAD_SAFE 1
-EOF
-
-                   if test "$ac_cv_have_dash_pthread" = "yes"; then
-               _PTHREAD_LDFLAGS="-pthread"
-           else
-               _PTHREAD_LDFLAGS="-lc_r"
-           fi
-           ;;
-    *-netbsd*)
-           if test "$ac_cv_have_dash_pthread" = "yes"; then
-               _PTHREAD_LDFLAGS="-pthread"
-           fi
-           ;;
-    *-bsdi*)
-           cat >> confdefs.h <<\EOF
-#define _THREAD_SAFE 1
-EOF
-
-                   if test "$ac_cv_have_dash_pthread" = "yes"; then
-               _PTHREAD_LDFLAGS=
-           fi
-           ;;
-    *-openbsd*)
-        if test "$ac_cv_have_dash_pthread" = "yes"; then
-            _PTHREAD_LDFLAGS=-pthread
-        fi
-        ;;
-    *-linux*|*-gnu*|*-k*bsd*-gnu)
-        cat >> confdefs.h <<\EOF
-#define _REENTRANT 1
-EOF
-
-        ;;
-    esac
-
-else 
-    if test -n "$USE_USER_PTHREADS"; then
-           USE_PTHREADS=
-           USE_NSPR_THREADS=
-    else
-        _PTHREAD_LDFLAGS=
-    fi
-fi
-
-case "$target" in
-*-aix*)
-    if test -n "$USE_NSPR_THREADS"; then
-        cat >> confdefs.h <<\EOF
-#define _PR_LOCAL_THREADS_ONLY 1
-EOF
-
-    fi
-    case "$target_os" in
-    aix4.1*)
-        if test -z "$USE_PTHREADS"; then
-            cat >> confdefs.h <<\EOF
-#define AIX_RENAME_SELECT 1
-EOF
-
-        fi
-        ;;
-    aix4.2*)
-        if test -z "$USE_NSPR_THREADS"; then
-            cat >> confdefs.h <<\EOF
-#define HAVE_POINTER_LOCALTIME_R 1
-EOF
-
-        fi
-        ;;
-    aix4.3*)
-        if test -z "$USE_NSPR_THREADS"; then
-            cat >> confdefs.h <<\EOF
-#define HAVE_POINTER_LOCALTIME_R 1
-EOF
-
-        fi
-        if test -n "$USE_PTHREADS"; then
-            cat >> confdefs.h <<\EOF
-#define _PR_HAVE_THREADSAFE_GETHOST 1
-EOF
-
-        fi
-        ;;
-    *)
-        if test -z "$USE_NSPR_THREADS"; then
-            cat >> confdefs.h <<\EOF
-#define HAVE_POINTER_LOCALTIME_R 1
-EOF
-
-        fi
-        if test -n "$USE_PTHREADS"; then
-            cat >> confdefs.h <<\EOF
-#define _PR_HAVE_THREADSAFE_GETHOST 1
-EOF
-
-        fi
-        ;;
-    esac
-    ;;
-*-bsdi*)
-    if test -n "$USE_PTHREADS"; then
-        cat >> confdefs.h <<\EOF
-#define _PR_NEED_PTHREAD_INIT 1
-EOF
-
-    fi
-    ;;
-*-freebsd*)
-    if test -n "$USE_NSPR_THREADS"; then
-        cat >> confdefs.h <<\EOF
-#define _PR_LOCAL_THREADS_ONLY 1
-EOF
-
-    fi
-    ;;
-*-hpux*)
-    if test -n "$USE_NSPR_THREADS"; then
-        cat >> confdefs.h <<\EOF
-#define _PR_LOCAL_THREADS_ONLY 1
-EOF
-
-    fi 
-    if test "$USE_PTHREADS"; then
-        if echo "$OS_RELEASE" | egrep '^(B.10.10|B.10.20)' >/dev/null; then
-            cat >> confdefs.h <<\EOF
-#define _REENTRANT 1
-EOF
-
-            cat >> confdefs.h <<\EOF
-#define _PR_DCETHREADS 1
-EOF
-
-        else
-            cat >> confdefs.h <<EOF
-#define _POSIX_C_SOURCE 199506L
-EOF
-
-            cat >> confdefs.h <<\EOF
-#define _PR_HAVE_THREADSAFE_GETHOST 1
-EOF
-
-        fi
-    fi
-    if test "$USE_USER_PTHREADS"; then
-        cat >> confdefs.h <<EOF
-#define _POSIX_C_SOURCE 199506L
-EOF
-
-    fi
-    ;;
-*-irix*)
-    if test "${target_os}" = "irix6.5"; then
-        if test -n "$USE_PTHREADS"; then
-            cat >> confdefs.h <<\EOF
-#define _PR_HAVE_GETHOST_R 1
-EOF
-
-            cat >> confdefs.h <<\EOF
-#define _PR_HAVE_GETHOST_R_POINTER 1
-EOF
-
-        fi
-    fi
-    ;;
-*-linux*|*-gnu*|*-k*bsd*-gnu)
-    if test -n "$USE_NSPR_THREADS"; then
-        cat >> confdefs.h <<\EOF
-#define _PR_LOCAL_THREADS_ONLY 1
-EOF
-
-    fi
-    ;;
-*-mingw*|*-cygwin*|*-msvc*|*-mks*|*-wince*|*-winmo*|*-os2*|*-beos*)
-        USE_PTHREADS=
-    _PTHREAD_LDFLAGS=
-    USE_USER_PTHREADS=
-    ;;
-*-netbsd*|*-openbsd*)
-    if test -n "$USE_NSPR_THREADS"; then
-        cat >> confdefs.h <<\EOF
-#define _PR_LOCAL_THREADS_ONLY 1
-EOF
-
-    fi
-    ;;
-*-osf*)
-    if test -n "$USE_NSPR_THREADS"; then
-        cat >> confdefs.h <<\EOF
-#define _PR_LOCAL_THREADS_ONLY 1
-EOF
-
-    fi
-    if test -n "$USE_PTHREADS"; then
-        if echo $OS_RELEASE | egrep -c '(V2.0|V3.2)' 2>/dev/null; then
-            :
-        else
-            cat >> confdefs.h <<\EOF
-#define _PR_HAVE_THREADSAFE_GETHOST 1
-EOF
-
-        fi
-    fi
-    ;;
-*-solaris*)
-    if test -n "$USE_NSPR_THREADS"; then
-        cat >> confdefs.h <<\EOF
-#define _PR_LOCAL_THREADS_ONLY 1
-EOF
-
-    fi
-    if test -n "$USE_PTHREADS"; then
-        cat >> confdefs.h <<\EOF
-#define _REENTRANT 1
-EOF
-
-        cat >> confdefs.h <<\EOF
-#define HAVE_POINTER_LOCALTIME_R 1
-EOF
-
-        if test "$OS_TEST" = "i86pc"; then
-            if test -n "$USE_64"; then
-               PR_MD_ASFILES=os_SunOS_x86_64.s
-            else
-               PR_MD_ASFILES=os_SunOS_x86.s
-            fi
-        else
-            if test -n "$USE_64"; then
-                PR_MD_ASFILES=os_SunOS_sparcv9.s
-            fi
-        fi
-    fi
-    ;;
-*-nto*)
-    if test -n "$USE_PTHREADS"; then
-        cat >> confdefs.h <<\EOF
-#define _PR_HAVE_GETHOST_R 1
-EOF
-
-        cat >> confdefs.h <<\EOF
-#define _PR_HAVE_GETHOST_R_POINTER 1
-EOF
-
-    fi
-    ;;
-esac
-
-OS_LIBS="$_PTHREAD_LDFLAGS $OS_LIBS"
-
-if test -n "$_SAVE_OPTIMIZE_FLAGS"; then
-    _OPTIMIZE_FLAGS="$_SAVE_OPTIMIZE_FLAGS"
-fi
-
-if test -n "$_SAVE_DEBUG_FLAGS"; then
-    _DEBUG_FLAGS="$_SAVE_DEBUG_FLAGS"
-fi
-
-if test -n "$MOZ_OPTIMIZE"; then
-    CFLAGS="$CFLAGS $_OPTIMIZE_FLAGS"
-    CXXFLAGS="$CXXFLAGS $_OPTIMIZE_FLAGS"
-fi
-
-if test -n "$MOZ_DEBUG_SYMBOLS"; then
-    CFLAGS="$CFLAGS $_DEBUG_FLAGS"
-    CXXFLAGS="$CXXFLAGS $_DEBUG_FLAGS"
-fi
-
-if test -n "$MOZ_OPTIMIZE"; then
-    OBJDIR_TAG=_OPT
-else
-    OBJDIR_TAG=_DBG
-fi
-
-if test -n "$USE_64"; then
-    COMPILER_TAG=_64
-fi
-
-RELEASE_OBJDIR_NAME="${OS_CONFIG}${CPU_ARCH_TAG}${COMPILER_TAG}${IMPL_STRATEGY}${OBJDIR_TAG}.${OBJDIR_SUFFIX}"
-
-case "$target_os" in
-cygwin*|msvc*|mks*)
-    CC="\$(CYGWIN_WRAPPER) $CC"
-    CXX="\$(CYGWIN_WRAPPER) $CXX"
-    RC="\$(CYGWIN_WRAPPER) $RC"
-    ;;
-esac
-
-# Check whether --enable-wrap-malloc or --disable-wrap-malloc was given.
-if test "${enable_wrap_malloc+set}" = set; then
-  enableval="$enable_wrap_malloc"
-       if test "$enableval" = "yes"; then
-           _WRAP_MALLOC=1
-      fi 
-fi
-
-
-if test -n "$_WRAP_MALLOC"; then
-    if test -n "$GNU_CC"; then
-        WRAP_LDFLAGS="${WRAP_LDFLAGS} -Wl,--wrap=malloc,--wrap=calloc,--wrap=valloc,--wrap=free,--wrap=realloc,--wrap=memalign"
-        WRAP_LDFLAGS="${WRAP_LDFLAGS} -Wl,--wrap=__builtin_new,--wrap=__builtin_vec_new,--wrap=__builtin_delete,--wrap=__builtin_vec_delete"
-        WRAP_LDFLAGS="${WRAP_LDFLAGS} -Wl,--wrap=strdup,--wrap=strndup"
-        WRAP_LDFLAGS="${WRAP_LDFLAGS} -Wl,--wrap=posix_memalign,--wrap=malloc_usable_size"
-    else
-        { echo "configure: error: --enable-wrap-malloc is not supported for non-GNU toolchains" 1>&2; exit 1; }
-    fi
-fi
-
-# Check whether --with-wrap-malloc or --without-wrap-malloc was given.
-if test "${with_wrap_malloc+set}" = set; then
-  withval="$with_wrap_malloc"
-  WRAP_LDFLAGS="${WRAP_LDFLAGS} $withval"
-fi
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-MAKEFILES="
-    Makefile
-    config/Makefile
-    config/autoconf.mk
-    config/nsprincl.mk
-    config/nsprincl.sh
-    config/nspr-config
-    config/nspr.pc
-    lib/Makefile
-    lib/ds/Makefile
-    lib/libc/Makefile
-    lib/libc/include/Makefile
-    lib/libc/src/Makefile
-    lib/tests/Makefile
-    pkg/Makefile
-    pr/Makefile
-    pr/include/Makefile
-    pr/include/md/Makefile
-    pr/include/obsolete/Makefile
-    pr/include/private/Makefile
-    pr/src/Makefile
-    pr/src/io/Makefile
-    pr/src/linking/Makefile
-    pr/src/malloc/Makefile
-    pr/src/md/Makefile
-    pr/src/md/${PR_MD_ARCH_DIR}/Makefile
-    pr/src/memory/Makefile
-    pr/src/misc/Makefile
-    pr/src/threads/Makefile
-    pr/tests/Makefile
-    pr/tests/dll/Makefile
-"
-
-if test "$OS_TARGET" = "Linux"; then
-    MAKEFILES="$MAKEFILES
-        pkg/linux/Makefile
-    "
-elif test "$OS_TARGET" = "SunOS"; then
-    MAKEFILES="$MAKEFILES
-        pkg/solaris/Makefile
-        pkg/solaris/SUNWpr/Makefile
-        pkg/solaris/SUNWprd/Makefile
-    "
-fi
-
-if test -z "$USE_PTHREADS" && test -z "$USE_BTHREADS"; then
-    MAKEFILES="$MAKEFILES
-        pr/src/threads/combined/Makefile
-    "
-elif test -n "$USE_PTHREADS"; then
-    MAKEFILES="$MAKEFILES
-        pr/src/pthreads/Makefile
-    "
-elif test -n "$USE_BTHREADS"; then
-    MAKEFILES="$MAKEFILES
-        pr/src/bthreads/Makefile
-    "
-fi
-
-if test -n "$USE_CPLUS"; then
-    MAKEFILES="$MAKEFILES
-        pr/src/cplus/Makefile
-        pr/src/cplus/tests/Makefile
-    "
-fi
-
-echo $MAKEFILES > unallmakefiles
-
-trap '' 1 2 15
-cat > confcache <<\EOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs.  It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
-#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already.  You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --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
-  if test -w $cache_file; then
-    echo "updating cache $cache_file"
-    cat confcache > $cache_file
-  else
-    echo "not updating unwritable cache $cache_file"
-  fi
-fi
-rm -f confcache
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
-if test "x$srcdir" = x.; then
-  ac_vpsub='/^[        ]*VPATH[        ]*=[^:]*$/d'
-fi
-
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-cat > conftest.defs <<\EOF
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
-s%[    `~#$^&*(){}\\|;'"<>?]%\\&%g
-s%\[%\\&%g
-s%\]%\\&%g
-s%\$%$$%g
-EOF
-DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
-rm -f conftest.defs
-
-
-# Without the "./", some shells look in PATH for config.status.
-: ${CONFIG_STATUS=./config.status}
-
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
-# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
-# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
-
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
-do
-  case "\$ac_option" in
-  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
-    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 ;;
-  *) echo "\$ac_cs_usage"; exit 1 ;;
-  esac
-done
-
-ac_given_srcdir=$srcdir
-
-trap 'rm -fr `echo "$MAKEFILES" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-
-
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- 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
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@host@%$host%g
-s%@host_alias@%$host_alias%g
-s%@host_cpu@%$host_cpu%g
-s%@host_vendor@%$host_vendor%g
-s%@host_os@%$host_os%g
-s%@target@%$target%g
-s%@target_alias@%$target_alias%g
-s%@target_cpu@%$target_cpu%g
-s%@target_vendor@%$target_vendor%g
-s%@target_os@%$target_os%g
-s%@build@%$build%g
-s%@build_alias@%$build_alias%g
-s%@build_cpu@%$build_cpu%g
-s%@build_vendor@%$build_vendor%g
-s%@build_os@%$build_os%g
-s%@CC@%$CC%g
-s%@dist_prefix@%$dist_prefix%g
-s%@dist_bindir@%$dist_bindir%g
-s%@dist_includedir@%$dist_includedir%g
-s%@dist_libdir@%$dist_libdir%g
-s%@WHOAMI@%$WHOAMI%g
-s%@HOST_CC@%$HOST_CC%g
-s%@CXX@%$CXX%g
-s%@RANLIB@%$RANLIB%g
-s%@AR@%$AR%g
-s%@AS@%$AS%g
-s%@LD@%$LD%g
-s%@STRIP@%$STRIP%g
-s%@WINDRES@%$WINDRES%g
-s%@CPP@%$CPP%g
-s%@PERL@%$PERL%g
-s%@CCACHE@%$CCACHE%g
-s%@SHELL_OVERRIDE@%$SHELL_OVERRIDE%g
-s%@MOZILLA_CLIENT@%$MOZILLA_CLIENT%g
-s%@HOST_CFLAGS@%$HOST_CFLAGS%g
-s%@HOST_LDFLAGS@%$HOST_LDFLAGS%g
-s%@GNU_CC@%$GNU_CC%g
-s%@GCC_USE_GNU_LD@%$GCC_USE_GNU_LD%g
-s%@MSC_VER@%$MSC_VER%g
-s%@CROSS_COMPILE@%$CROSS_COMPILE%g
-s%@MOZ_OPTIMIZE@%$MOZ_OPTIMIZE%g
-s%@MOZ_DEBUG@%$MOZ_DEBUG%g
-s%@MOZ_DEBUG_SYMBOLS@%$MOZ_DEBUG_SYMBOLS%g
-s%@USE_CPLUS@%$USE_CPLUS%g
-s%@USE_IPV6@%$USE_IPV6%g
-s%@USE_N32@%$USE_N32%g
-s%@USE_64@%$USE_64%g
-s%@OBJECT_MODE@%$OBJECT_MODE%g
-s%@ENABLE_STRIP@%$ENABLE_STRIP%g
-s%@USE_PTHREADS@%$USE_PTHREADS%g
-s%@USE_BTHREADS@%$USE_BTHREADS%g
-s%@USE_USER_PTHREADS@%$USE_USER_PTHREADS%g
-s%@USE_NSPR_THREADS@%$USE_NSPR_THREADS%g
-s%@LIBNSPR@%$LIBNSPR%g
-s%@LIBPLC@%$LIBPLC%g
-s%@MOD_MAJOR_VERSION@%$MOD_MAJOR_VERSION%g
-s%@MOD_MINOR_VERSION@%$MOD_MINOR_VERSION%g
-s%@MOD_PATCH_VERSION@%$MOD_PATCH_VERSION%g
-s%@NSPR_MODNAME@%$NSPR_MODNAME%g
-s%@MDCPUCFG_H@%$MDCPUCFG_H%g
-s%@PR_MD_CSRCS@%$PR_MD_CSRCS%g
-s%@PR_MD_ASFILES@%$PR_MD_ASFILES%g
-s%@PR_MD_ARCH_DIR@%$PR_MD_ARCH_DIR%g
-s%@CPU_ARCH@%$CPU_ARCH%g
-s%@OBJ_SUFFIX@%$OBJ_SUFFIX%g
-s%@LIB_SUFFIX@%$LIB_SUFFIX%g
-s%@DLL_SUFFIX@%$DLL_SUFFIX%g
-s%@ASM_SUFFIX@%$ASM_SUFFIX%g
-s%@WRAP_LDFLAGS@%$WRAP_LDFLAGS%g
-s%@MKSHLIB@%$MKSHLIB%g
-s%@DSO_CFLAGS@%$DSO_CFLAGS%g
-s%@DSO_LDOPTS@%$DSO_LDOPTS%g
-s%@OS_TARGET@%$OS_TARGET%g
-s%@OS_ARCH@%$OS_ARCH%g
-s%@OS_RELEASE@%$OS_RELEASE%g
-s%@OS_TEST@%$OS_TEST%g
-s%@MACOSX_DEPLOYMENT_TARGET@%$MACOSX_DEPLOYMENT_TARGET%g
-s%@DEFINES@%$DEFINES%g
-s%@AR_FLAGS@%$AR_FLAGS%g
-s%@ASFLAGS@%$ASFLAGS%g
-s%@FILTER@%$FILTER%g
-s%@IMPLIB@%$IMPLIB%g
-s%@PROFILE_GEN_CFLAGS@%$PROFILE_GEN_CFLAGS%g
-s%@PROFILE_GEN_LDFLAGS@%$PROFILE_GEN_LDFLAGS%g
-s%@PROFILE_USE_CFLAGS@%$PROFILE_USE_CFLAGS%g
-s%@PROFILE_USE_LDFLAGS@%$PROFILE_USE_LDFLAGS%g
-s%@OS_LIBS@%$OS_LIBS%g
-s%@RESOLVE_LINK_SYMBOLS@%$RESOLVE_LINK_SYMBOLS%g
-s%@AIX_LINK_OPTS@%$AIX_LINK_OPTS%g
-s%@NOSUCHFILE@%$NOSUCHFILE%g
-s%@MOZ_OBJFORMAT@%$MOZ_OBJFORMAT%g
-s%@ULTRASPARC_LIBRARY@%$ULTRASPARC_LIBRARY%g
-s%@OBJDIR@%$OBJDIR%g
-s%@OBJDIR_NAME@%$OBJDIR_NAME%g
-s%@RELEASE_OBJDIR_NAME@%$RELEASE_OBJDIR_NAME%g
-s%@NSINSTALL@%$NSINSTALL%g
-s%@OPTIMIZER@%$OPTIMIZER%g
-s%@RC@%$RC%g
-s%@RCFLAGS@%$RCFLAGS%g
-s%@DLLFLAGS@%$DLLFLAGS%g
-s%@EXEFLAGS@%$EXEFLAGS%g
-s%@OS_DLLFLAGS@%$OS_DLLFLAGS%g
-s%@CYGWIN_WRAPPER@%$CYGWIN_WRAPPER%g
-s%@VISIBILITY_FLAGS@%$VISIBILITY_FLAGS%g
-s%@WRAP_SYSTEM_INCLUDES@%$WRAP_SYSTEM_INCLUDES%g
-s%@MACOS_SDK_DIR@%$MACOS_SDK_DIR%g
-s%@SYMBIAN_SDK_DIR@%$SYMBIAN_SDK_DIR%g
-s%@NEXT_ROOT@%$NEXT_ROOT%g
-s%@MT@%$MT%g
-
-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-"$MAKEFILES"}
-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%/[^/][^/]*$%%'`
-  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
-    # The file is in a subdirectory.
-    test ! -d "$ac_dir" && mkdir "$ac_dir"
-    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
-    # A "../" for each directory in $ac_dir_suffix.
-    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
-  else
-    ac_dir_suffix= ac_dots=
-  fi
-
-  case "$ac_given_srcdir" in
-  .)  srcdir=.
-      if test -z "$ac_dots"; then top_srcdir=.
-      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
-  /* | ?:/*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
-  *) # Relative path.
-    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
-    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."
-  case "$ac_file" in
-  *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
-  *) ac_comsub= ;;
-  esac
-
-  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" `
-  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*
-
-
-
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-chmod +x config/nspr-config
-exit 0
-EOF
-chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-
diff --git a/nspr/pr/src/threads/prmon.c b/nspr/pr/src/threads/prmon.c
deleted file mode 100644 (file)
index bcfc50d..0000000
+++ /dev/null
@@ -1,199 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "primpl.h"
-
-/************************************************************************/
-
-/*
-** Create a new monitor.
-*/
-PR_IMPLEMENT(PRMonitor*) PR_NewMonitor()
-{
-    PRMonitor *mon;
-       PRCondVar *cvar;
-       PRLock *lock;
-
-    mon = PR_NEWZAP(PRMonitor);
-    if (mon) {
-               lock = PR_NewLock();
-           if (!lock) {
-                       PR_DELETE(mon);
-                       return 0;
-       }
-
-           cvar = PR_NewCondVar(lock);
-           if (!cvar) {
-               PR_DestroyLock(lock);
-                       PR_DELETE(mon);
-                       return 0;
-       }
-       mon->cvar = cvar;
-       mon->name = NULL;
-    }
-    return mon;
-}
-
-PR_IMPLEMENT(PRMonitor*) PR_NewNamedMonitor(const char* name)
-{
-    PRMonitor* mon = PR_NewMonitor();
-    if (mon)
-        mon->name = name;
-    return mon;
-}
-
-/*
-** Destroy a monitor. There must be no thread waiting on the monitor's
-** condition variable. The caller is responsible for guaranteeing that the
-** monitor is no longer in use.
-*/
-PR_IMPLEMENT(void) PR_DestroyMonitor(PRMonitor *mon)
-{
-       PR_DestroyLock(mon->cvar->lock);
-    PR_DestroyCondVar(mon->cvar);
-    PR_DELETE(mon);
-}
-
-/*
-** Enter the lock associated with the monitor.
-*/
-PR_IMPLEMENT(void) PR_EnterMonitor(PRMonitor *mon)
-{
-    if (mon->cvar->lock->owner == _PR_MD_CURRENT_THREAD()) {
-               mon->entryCount++;
-    } else {
-               PR_Lock(mon->cvar->lock);
-               mon->entryCount = 1;
-    }
-}
-
-/*
-** Test and then enter the lock associated with the monitor if it's not
-** already entered by some other thread. Return PR_FALSE if some other
-** thread owned the lock at the time of the call.
-*/
-PR_IMPLEMENT(PRBool) PR_TestAndEnterMonitor(PRMonitor *mon)
-{
-    if (mon->cvar->lock->owner == _PR_MD_CURRENT_THREAD()) {
-               mon->entryCount++;
-               return PR_TRUE;
-    } else {
-               if (PR_TestAndLock(mon->cvar->lock)) {
-               mon->entryCount = 1;
-                       return PR_TRUE;
-               }
-    }
-    return PR_FALSE;
-}
-
-/*
-** Exit the lock associated with the monitor once.
-*/
-PR_IMPLEMENT(PRStatus) PR_ExitMonitor(PRMonitor *mon)
-{
-    if (mon->cvar->lock->owner != _PR_MD_CURRENT_THREAD()) {
-        return PR_FAILURE;
-    }
-    if (--mon->entryCount == 0) {
-               return PR_Unlock(mon->cvar->lock);
-    }
-    return PR_SUCCESS;
-}
-
-/*
-** Return the number of times that the current thread has entered the
-** lock. Returns zero if the current thread has not entered the lock.
-*/
-PR_IMPLEMENT(PRIntn) PR_GetMonitorEntryCount(PRMonitor *mon)
-{
-    return (mon->cvar->lock->owner == _PR_MD_CURRENT_THREAD()) ?
-        mon->entryCount : 0;
-}
-
-/*
-** If the current thread is in |mon|, this assertion is guaranteed to
-** succeed.  Otherwise, the behavior of this function is undefined.
-*/
-PR_IMPLEMENT(void) PR_AssertCurrentThreadInMonitor(PRMonitor *mon)
-{
-    PR_ASSERT_CURRENT_THREAD_OWNS_LOCK(mon->cvar->lock);
-}
-
-/*
-** Wait for a notify on the condition variable. Sleep for "ticks" amount
-** of time (if "tick" is 0 then the sleep is indefinite). While
-** the thread is waiting it exits the monitors lock (as if it called
-** PR_ExitMonitor as many times as it had called PR_EnterMonitor).  When
-** the wait has finished the thread regains control of the monitors lock
-** with the same entry count as before the wait began.
-**
-** The thread waiting on the monitor will be resumed when the monitor is
-** notified (assuming the thread is the next in line to receive the
-** notify) or when the "ticks" elapses.
-**
-** Returns PR_FAILURE if the caller has not locked the lock associated
-** with the condition variable.
-** This routine can return PR_PENDING_INTERRUPT if the waiting thread 
-** has been interrupted.
-*/
-PR_IMPLEMENT(PRStatus) PR_Wait(PRMonitor *mon, PRIntervalTime ticks)
-{
-    PRUintn entryCount;
-       PRStatus status;
-    PRThread *me = _PR_MD_CURRENT_THREAD();
-
-    if (mon->cvar->lock->owner != me) return PR_FAILURE;
-
-    entryCount = mon->entryCount;
-    mon->entryCount = 0;
-
-       status = _PR_WaitCondVar(me, mon->cvar, mon->cvar->lock, ticks);
-
-    mon->entryCount = entryCount;
-
-    return status;
-}
-
-/*
-** Notify the highest priority thread waiting on the condition
-** variable. If a thread is waiting on the condition variable (using
-** PR_Wait) then it is awakened and begins waiting on the monitor's lock.
-*/
-PR_IMPLEMENT(PRStatus) PR_Notify(PRMonitor *mon)
-{
-    PRThread *me = _PR_MD_CURRENT_THREAD();
-    if (mon->cvar->lock->owner != me) return PR_FAILURE;
-    PR_NotifyCondVar(mon->cvar);
-    return PR_SUCCESS;
-}
-
-/*
-** Notify all of the threads waiting on the condition variable. All of
-** threads are notified in turn. The highest priority thread will
-** probably acquire the monitor first when the monitor is exited.
-*/
-PR_IMPLEMENT(PRStatus) PR_NotifyAll(PRMonitor *mon)
-{
-    PRThread *me = _PR_MD_CURRENT_THREAD();
-    if (mon->cvar->lock->owner != me) return PR_FAILURE;
-    PR_NotifyAllCondVar(mon->cvar);
-    return PR_SUCCESS;
-}
-
-/************************************************************************/
-
-PRUint32 _PR_MonitorToString(PRMonitor *mon, char *buf, PRUint32 buflen)
-{
-    PRUint32 nb;
-
-    if (mon->cvar->lock->owner) {
-       nb = PR_snprintf(buf, buflen, "[%p] owner=%d[%p] count=%ld",
-                        mon, mon->cvar->lock->owner->id,
-                        mon->cvar->lock->owner, mon->entryCount);
-    } else {
-       nb = PR_snprintf(buf, buflen, "[%p]", mon);
-    }
-    return nb;
-}
similarity index 100%
rename from nspr/pkg/Makefile.in
rename to pkg/Makefile.in
similarity index 100%
rename from nspr/pr/src/misc/.cvsignore
rename to pr/.cvsignore
similarity index 100%
rename from nspr/pr/Makefile.in
rename to pr/Makefile.in
similarity index 100%
rename from nspr/pr/include/gencfg.c
rename to pr/include/gencfg.c
similarity index 99%
rename from nspr/pr/include/md/_darwin.cfg
rename to pr/include/md/_darwin.cfg
index e43728e..5e11893 100644 (file)
@@ -20,7 +20,7 @@
 #define  IS_BIG_ENDIAN 1
 #endif
 
-#ifdef __x86_64__
+#ifdef __LP64__
 #define IS_64
 #endif
 
similarity index 98%
rename from nspr/pr/include/md/_darwin.h
rename to pr/include/md/_darwin.h
index 094d1c0..d321023 100644 (file)
@@ -26,6 +26,8 @@
 #define _PR_SI_ARCHITECTURE "ppc"
 #elif defined(__arm__)
 #define _PR_SI_ARCHITECTURE "arm"
+#elif defined(__aarch64__)
+#define _PR_SI_ARCHITECTURE "aarch64"
 #else
 #error "Unknown CPU architecture"
 #endif
@@ -122,7 +124,7 @@ extern PRInt32 _PR_Darwin_x86_64_AtomicAdd(PRInt32 *ptr, PRInt32 val);
 #define _MD_ATOMIC_ADD(ptr, val)    _PR_Darwin_x86_64_AtomicAdd(ptr, val)
 #endif /* __x86_64__ */
 
-#ifdef __arm__
+#if defined(__arm__) || defined(__aarch64__)
 #define _PR_HAVE_ATOMIC_OPS
 #define _MD_INIT_ATOMIC()
 #define _MD_ATOMIC_INCREMENT(val)   OSAtomicIncrement32(val)
@@ -136,7 +138,7 @@ static inline PRInt32 _MD_ATOMIC_SET(PRInt32 *val, PRInt32 newval)
     return oldval;
 }
 #define _MD_ATOMIC_ADD(ptr, val)    OSAtomicAdd32(val, ptr)
-#endif /* __arm__ */
+#endif /* __arm__ || __aarch64__ */
 
 #define USE_SETJMP
 
similarity index 99%
rename from nspr/pr/include/md/_linux.cfg
rename to pr/include/md/_linux.cfg
index 2fdbf63..1d09b31 100644 (file)
 
 #ifdef __powerpc64__
 
+#ifdef __LITTLE_ENDIAN__
+#define IS_LITTLE_ENDIAN 1
+#undef  IS_BIG_ENDIAN
+#else
 #undef  IS_LITTLE_ENDIAN
 #define IS_BIG_ENDIAN    1
+#endif
 #define IS_64
 
 #define PR_BYTES_PER_BYTE   1
 
 #elif defined(__powerpc__)
 
+#ifdef __LITTLE_ENDIAN__
+#define IS_LITTLE_ENDIAN 1
+#undef  IS_BIG_ENDIAN
+#else
 #undef  IS_LITTLE_ENDIAN
 #define IS_BIG_ENDIAN    1
+#endif
 
 #define PR_BYTES_PER_BYTE   1
 #define PR_BYTES_PER_SHORT  2
 #define PR_ALIGN_OF_SHORT   2
 #define PR_ALIGN_OF_INT     4
 #define PR_ALIGN_OF_LONG    4
-#define PR_ALIGN_OF_INT64   4
+#define PR_ALIGN_OF_INT64   8
 #define PR_ALIGN_OF_FLOAT   4
-#define PR_ALIGN_OF_DOUBLE  4
+#define PR_ALIGN_OF_DOUBLE  8
 #define PR_ALIGN_OF_POINTER 4
 #define PR_ALIGN_OF_WORD    4
 
similarity index 97%
rename from nspr/pr/include/md/_linux.h
rename to pr/include/md/_linux.h
index 906822f..278f90c 100644 (file)
@@ -80,7 +80,7 @@
 #define NO_DLOPEN_NULL
 #endif
 
-#ifdef __FreeBSD_kernel__
+#if defined(__FreeBSD_kernel__) || defined(__GNU__)
 #define _PR_HAVE_SOCKADDR_LEN
 #endif
 
@@ -136,6 +136,18 @@ extern PRInt32 _PR_ppc_AtomicSet(PRInt32 *val, PRInt32 newval);
 #define _MD_ATOMIC_SET                _PR_ppc_AtomicSet
 #endif
 
+#if defined(__powerpc64__)
+#if (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 1)
+/* Use GCC built-in functions */
+#define _PR_HAVE_ATOMIC_OPS
+#define _MD_INIT_ATOMIC()
+#define _MD_ATOMIC_INCREMENT(ptr) __sync_add_and_fetch(ptr, 1)
+#define _MD_ATOMIC_DECREMENT(ptr) __sync_sub_and_fetch(ptr, 1)
+#define _MD_ATOMIC_ADD(ptr, i) __sync_add_and_fetch(ptr, i)
+#define _MD_ATOMIC_SET(ptr, nv) __sync_lock_test_and_set(ptr, nv)
+#endif
+#endif
+
 #if defined(__alpha)
 #define _PR_HAVE_ATOMIC_OPS
 #define _MD_INIT_ATOMIC()
similarity index 99%
rename from nspr/pr/include/md/_unixos.h
rename to pr/include/md/_unixos.h
index 798d0b3..04d9904 100644 (file)
@@ -493,6 +493,12 @@ extern PRStatus _MD_MemUnmap(void *addr, PRUint32 size);
 extern PRStatus _MD_CloseFileMap(struct PRFileMap *fmap);
 #define _MD_CLOSE_FILE_MAP _MD_CloseFileMap
 
+extern PRStatus _MD_SyncMemMap(
+    PRFileDesc *fd,
+    void *addr,
+    PRUint32 len);
+#define _MD_SYNC_MEM_MAP _MD_SyncMemMap
+
 /*
  * The standard (XPG4) gettimeofday() (from BSD) takes two arguments.
  * On some SVR4 derivatives, gettimeofday() takes only one argument.
similarity index 99%
rename from nspr/pr/include/md/_win95.h
rename to pr/include/md/_win95.h
index b008c13..d65e264 100644 (file)
@@ -527,6 +527,12 @@ extern PRStatus _MD_MemUnmap(void *addr, PRUint32 size);
 extern PRStatus _MD_CloseFileMap(struct PRFileMap *fmap);
 #define _MD_CLOSE_FILE_MAP _MD_CloseFileMap
 
+extern PRStatus _MD_SyncMemMap(
+    PRFileDesc *fd,
+    void *addr,
+    PRUint32 len);
+#define _MD_SYNC_MEM_MAP _MD_SyncMemMap
+
 /* --- Named semaphores stuff --- */
 #define _PR_HAVE_NAMED_SEMAPHORES
 #define _MD_OPEN_SEMAPHORE            _PR_MD_OPEN_SEMAPHORE
similarity index 99%
rename from nspr/pr/include/md/_winnt.h
rename to pr/include/md/_winnt.h
index 4d4d2c1..7e5477f 100644 (file)
@@ -582,6 +582,12 @@ extern PRStatus _MD_MemUnmap(void *addr, PRUint32 size);
 extern PRStatus _MD_CloseFileMap(struct PRFileMap *fmap);
 #define _MD_CLOSE_FILE_MAP _MD_CloseFileMap
 
+extern PRStatus _MD_SyncMemMap(
+    PRFileDesc *fd,
+    void *addr,
+    PRUint32 len);
+#define _MD_SYNC_MEM_MAP _MD_SyncMemMap
+
 /* --- Named semaphores stuff --- */
 #define _PR_HAVE_NAMED_SEMAPHORES
 #define _MD_OPEN_SEMAPHORE            _PR_MD_OPEN_SEMAPHORE
similarity index 100%
rename from nspr/pr/include/nspr.h
rename to pr/include/nspr.h
similarity index 98%
rename from nspr/pr/include/pratom.h
rename to pr/include/pratom.h
index bcf34c1..3b2fe5c 100644 (file)
@@ -107,10 +107,10 @@ long __cdecl _InterlockedExchangeAdd(long volatile *Addend, long Value);
            ((defined(__i386__) && \
            defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4)) || \
            defined(__ia64__) || defined(__x86_64__) || \
-           (defined(__powerpc__) && !defined(__powerpc64__)) || \
+           defined(__powerpc__) || \
            (defined(__arm__) && \
            defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4)) || \
-           defined(__alpha))))
+           defined(__aarch64__) || defined(__alpha))))
 
 /*
  * Because the GCC manual warns that some processors may support
similarity index 100%
rename from nspr/pr/include/prbit.h
rename to pr/include/prbit.h
similarity index 100%
rename from nspr/pr/include/prcmon.h
rename to pr/include/prcmon.h
similarity index 100%
rename from nspr/pr/include/prcvar.h
rename to pr/include/prcvar.h
similarity index 100%
rename from nspr/pr/include/prdtoa.h
rename to pr/include/prdtoa.h
similarity index 100%
rename from nspr/pr/include/prenv.h
rename to pr/include/prenv.h
similarity index 100%
rename from nspr/pr/include/prerr.h
rename to pr/include/prerr.h
similarity index 100%
rename from nspr/pr/include/prinet.h
rename to pr/include/prinet.h
similarity index 99%
rename from nspr/pr/include/prinit.h
rename to pr/include/prinit.h
index 557f2e2..e77eaf1 100644 (file)
@@ -31,10 +31,10 @@ PR_BEGIN_EXTERN_C
 ** The format of the version string is
 **     "<major version>.<minor version>[.<patch level>] [<Beta>]"
 */
-#define PR_VERSION  "4.10.2"
+#define PR_VERSION  "4.10.6"
 #define PR_VMAJOR   4
 #define PR_VMINOR   10
-#define PR_VPATCH   2
+#define PR_VPATCH   6
 #define PR_BETA     PR_FALSE
 
 /*
similarity index 99%
rename from nspr/pr/include/prio.h
rename to pr/include/prio.h
index ac4b270..c7e85db 100644 (file)
@@ -211,6 +211,8 @@ typedef enum PRSockOption
     PR_SockOpt_NoDelay,         /* don't delay send to coalesce packets */
     PR_SockOpt_MaxSegment,      /* maximum segment size */
     PR_SockOpt_Broadcast,       /* enable broadcast */
+    PR_SockOpt_Reuseport,       /* allow local address & port reuse on
+                                 * platforms that support it */
     PR_SockOpt_Last
 } PRSockOption;
 
@@ -234,6 +236,8 @@ typedef struct PRSocketOptionData
         PRUintn tos;                /* IP type of service and precedence */
         PRBool non_blocking;        /* Non-blocking (network) I/O */
         PRBool reuse_addr;          /* Allow local address reuse */
+        PRBool reuse_port;          /* Allow local address & port reuse on
+                                     * platforms that support it */
         PRBool keep_alive;          /* Keep connections alive */
         PRBool mcast_loopback;      /* IP multicast loopback */
         PRBool no_delay;            /* Don't delay send to coalesce packets */
@@ -1855,6 +1859,19 @@ NSPR_API(PRStatus) PR_MemUnmap(void *addr, PRUint32 len);
 NSPR_API(PRStatus) PR_CloseFileMap(PRFileMap *fmap);
 
 /*
+ * Synchronously flush the given memory-mapped address range of the given open
+ * file to disk. The function does not return until all modified data have
+ * been written to disk.
+ *
+ * On some platforms, the function will call PR_Sync(fd) internally if it is
+ * necessary for flushing modified data to disk synchronously.
+ */
+NSPR_API(PRStatus) PR_SyncMemMap(
+    PRFileDesc *fd,
+    void *addr,
+    PRUint32 len);
+
+/*
  ******************************************************************
  *
  * Interprocess communication
similarity index 96%
rename from nspr/pr/include/private/primpl.h
rename to pr/include/private/primpl.h
index 5b5469c..63ba3ee 100644 (file)
@@ -539,6 +539,8 @@ NSPR_API(void) _PR_PauseCPU(void);
     _PR_MD_UNLOCK(&(_lock)->ilock);
     
 extern void _PR_UnblockLockWaiter(PRLock *lock);
+extern PRStatus _PR_InitLock(PRLock *lock);
+extern void _PR_FreeLock(PRLock *lock);
 
 #define _PR_LOCK_PTR(_qp) \
     ((PRLock*) ((char*) (_qp) - offsetof(PRLock,links)))
@@ -550,8 +552,11 @@ extern void _PR_UnblockLockWaiter(PRLock *lock);
 #define _PR_CVAR_UNLOCK(_cvar) \
     _PR_MD_UNLOCK(&(_cvar)->ilock);
 
+extern PRStatus _PR_InitCondVar(PRCondVar *cvar, PRLock *lock);
+extern void _PR_FreeCondVar(PRCondVar *cvar);
 extern PRStatus _PR_WaitCondVar(
     PRThread *thread, PRCondVar *cvar, PRLock *lock, PRIntervalTime timeout);
+extern void _PR_NotifyCondVar(PRCondVar *cvar, PRThread *me);
 extern PRUint32 _PR_CondVarToString(PRCondVar *cvar, char *buf, PRUint32 buflen);
 
 NSPR_API(void) _PR_Notify(PRMonitor *mon, PRBool all, PRBool sticky);
@@ -1420,8 +1425,6 @@ struct PRLock {
 #endif
 };
 
-extern void _PR_InitLocks(void);
-
 struct PRCondVar {
     PRLock *lock;               /* associated lock that protects the condition */
 #if defined(_PR_PTHREADS)
@@ -1446,13 +1449,38 @@ struct PRCondVar {
 struct PRMonitor {
     const char* name;           /* monitor name for debugging */
 #if defined(_PR_PTHREADS)
-    PRLock lock;                /* the lock structure */
-    pthread_t owner;            /* the owner of the lock or invalid */
-    PRCondVar *cvar;            /* condition variable queue */
+    pthread_mutex_t lock;       /* lock is only held when accessing fields
+                                 * of the PRMonitor, instead of being held
+                                 * while the monitor is entered. The only
+                                 * exception is notifyTimes, which is
+                                 * protected by the monitor. */
+    pthread_t owner;            /* the owner of the monitor or invalid */
+    pthread_cond_t entryCV;     /* for threads waiting to enter the monitor */
+
+    pthread_cond_t waitCV;      /* for threads waiting on the monitor */
+    PRInt32 refCount;           /* reference count, an atomic variable.
+                                 * PR_NewMonitor adds a reference to the
+                                 * newly created PRMonitor, and
+                                 * PR_DestroyMonitor releases that reference.
+                                 * PR_ExitMonitor adds a reference before
+                                 * unlocking the internal lock if it needs to
+                                 * signal entryCV, and releases the reference
+                                 * after signaling entryCV. */
 #else  /* defined(_PR_PTHREADS) */
-    PRCondVar *cvar;            /* associated lock and condition variable queue */
+    PRLock lock;                /* lock is only held when accessing fields
+                                 * of the PRMonitor, instead of being held
+                                 * while the monitor is entered. The only
+                                 * exception is notifyTimes, which is
+                                 * protected by the monitor. */
+    PRThread *owner;            /* the owner of the monitor or invalid */
+    PRCondVar entryCV;          /* for threads waiting to enter the monitor */
+
+    PRCondVar waitCV;           /* for threads waiting on the monitor */
 #endif /* defined(_PR_PTHREADS) */
     PRUint32 entryCount;        /* # of times re-entered */
+    PRIntn notifyTimes;         /* number of pending notifies for waitCV.
+                                 * The special value -1 means a broadcast
+                                 * (PR_NotifyAll). */
 };
 
 /************************************************************************/
@@ -1472,8 +1500,6 @@ struct PRSemaphore {
 #endif /* defined(_PR_BTHREADS) */
 };
 
-NSPR_API(void) _PR_InitSem(void);
-
 /*************************************************************************/
 
 struct PRSem {
@@ -1555,6 +1581,8 @@ struct PRThread {
 
 #if defined(_PR_PTHREADS)
     pthread_t id;                   /* pthread identifier for the thread */
+    PRBool idSet;                   /* whether 'id' has been set. Protected by
+                                     * pt_book.ml. */
 #ifdef _PR_NICE_PRIORITY_SCHEDULING
     pid_t tid;                      /* Linux-specific kernel thread ID */
 #endif
@@ -1745,6 +1773,7 @@ struct PRDirUTF16 {
 }; 
 #endif /* MOZ_UNICODE */
 
+extern void _PR_InitLocks(void);
 extern void _PR_InitSegs(void);
 extern void _PR_InitStacks(void);
 extern void _PR_InitTPD(void);
@@ -1762,7 +1791,6 @@ extern void _PR_InitDtoa(void);
 extern void _PR_InitTime(void);
 extern void _PR_InitMW(void);
 extern void _PR_InitRWLocks(void);
-extern void _PR_NotifyCondVar(PRCondVar *cvar, PRThread *me);
 extern void _PR_CleanupThread(PRThread *thread);
 extern void _PR_CleanupCallOnce(void);
 extern void _PR_CleanupMW(void);
@@ -1974,6 +2002,12 @@ extern PRStatus _PR_MD_MEM_UNMAP(void *addr, PRUint32 size);
 extern PRStatus _PR_MD_CLOSE_FILE_MAP(PRFileMap *fmap);
 #define _PR_MD_CLOSE_FILE_MAP _MD_CLOSE_FILE_MAP
 
+extern PRStatus _PR_MD_SYNC_MEM_MAP(
+    PRFileDesc *fd,
+    void *addr,
+    PRUint32 len);
+#define _PR_MD_SYNC_MEM_MAP _MD_SYNC_MEM_MAP
+
 /* Named Shared Memory */
 
 /*
similarity index 100%
rename from nspr/pr/include/prlink.h
rename to pr/include/prlink.h
similarity index 100%
rename from nspr/pr/include/prlock.h
rename to pr/include/prlock.h
similarity index 100%
rename from nspr/pr/include/prlog.h
rename to pr/include/prlog.h
similarity index 100%
rename from nspr/pr/include/prlong.h
rename to pr/include/prlong.h
similarity index 100%
rename from nspr/pr/include/prmem.h
rename to pr/include/prmem.h
similarity index 100%
rename from nspr/pr/include/prmon.h
rename to pr/include/prmon.h
similarity index 100%
rename from nspr/pr/include/prpdce.h
rename to pr/include/prpdce.h
similarity index 100%
rename from nspr/pr/include/prprf.h
rename to pr/include/prprf.h
similarity index 100%
rename from nspr/pr/include/prrng.h
rename to pr/include/prrng.h
similarity index 100%
rename from nspr/pr/include/prshm.h
rename to pr/include/prshm.h
similarity index 100%
rename from nspr/pr/include/prshma.h
rename to pr/include/prshma.h
similarity index 100%
rename from nspr/pr/include/prtime.h
rename to pr/include/prtime.h
similarity index 100%
rename from nspr/pr/src/.cvsignore
rename to pr/src/.cvsignore
similarity index 99%
rename from nspr/pr/src/Makefile.in
rename to pr/src/Makefile.in
index dfe1b50..e656ccc 100644 (file)
@@ -165,9 +165,9 @@ endif
 
 ifeq ($(OS_ARCH),WINNT)
 ifdef NS_USE_GCC
-OS_LIBS                = -ladvapi32 -lwsock32 -lwinmm
+OS_LIBS                = -ladvapi32 -lws2_32 -lwinmm
 else
-OS_LIBS                = advapi32.lib wsock32.lib winmm.lib
+OS_LIBS                = advapi32.lib ws2_32.lib winmm.lib
 endif
 endif
 
similarity index 100%
rename from nspr/pr/src/cplus/rccv.h
rename to pr/src/cplus/rccv.h
similarity index 100%
rename from nspr/pr/src/cplus/rcio.h
rename to pr/src/cplus/rcio.h
similarity index 98%
rename from nspr/pr/src/cplus/tests/Makefile.in
rename to pr/src/cplus/tests/Makefile.in
index 181a920..c164238 100644 (file)
@@ -204,7 +204,7 @@ ifeq ($(OS_TARGET),WIN16)
        echo winsock.lib            >>w16link
        wlink @w16link.
 else
-       link $(LDOPTS) $< $(LIBPR) $(LIBPL) wsock32.lib -out:$@
+       link $(LDOPTS) $< $(LIBPR) $(LIBPL) ws2_32.lib -out:$@
 endif
 else
 ifeq ($(OS_ARCH),OS2)
similarity index 100%
rename from nspr/pr/src/io/prdir.c
rename to pr/src/io/prdir.c
similarity index 100%
rename from nspr/pr/src/io/prfile.c
rename to pr/src/io/prfile.c
similarity index 100%
rename from nspr/pr/src/io/prio.c
rename to pr/src/io/prio.c
similarity index 100%
rename from nspr/pr/src/io/pripv6.c
rename to pr/src/io/pripv6.c
similarity index 100%
rename from nspr/pr/src/io/prlayer.c
rename to pr/src/io/prlayer.c
similarity index 100%
rename from nspr/pr/src/io/prlog.c
rename to pr/src/io/prlog.c
similarity index 97%
rename from nspr/pr/src/io/prmapopt.c
rename to pr/src/io/prmapopt.c
index 43e8f9c..f92a76b 100644 (file)
@@ -85,6 +85,7 @@ PRStatus PR_CALLBACK _PR_SocketGetSocketOption(PRFileDesc *fd, PRSocketOptionDat
             case PR_SockOpt_Keepalive:
             case PR_SockOpt_NoDelay:
             case PR_SockOpt_Broadcast:
+            case PR_SockOpt_Reuseport:
             {
 #ifdef WIN32 /* Winsock */
                 BOOL value;
@@ -236,6 +237,7 @@ PRStatus PR_CALLBACK _PR_SocketSetSocketOption(PRFileDesc *fd, const PRSocketOpt
             case PR_SockOpt_Keepalive:
             case PR_SockOpt_NoDelay:
             case PR_SockOpt_Broadcast:
+            case PR_SockOpt_Reuseport:
             {
 #ifdef WIN32 /* Winsock */
                 BOOL value;
@@ -412,10 +414,14 @@ PRStatus PR_CALLBACK _PR_SocketSetSocketOption(PRFileDesc *fd, const PRSocketOpt
 #define TCP_MAXSEG          _PR_NO_SUCH_SOCKOPT
 #endif
 
-#ifndef SO_BROADCAST                 /* enable broadcast on udp sockets */
+#ifndef SO_BROADCAST                    /* enable broadcast on UDP sockets  */
 #define SO_BROADCAST        _PR_NO_SUCH_SOCKOPT
 #endif
 
+#ifndef SO_REUSEPORT                    /* allow local address & port reuse */
+#define SO_REUSEPORT        _PR_NO_SUCH_SOCKOPT
+#endif
+
 PRStatus _PR_MapOptionName(
     PRSockOption optname, PRInt32 *level, PRInt32 *name)
 {
@@ -424,14 +430,14 @@ PRStatus _PR_MapOptionName(
         0, SO_LINGER, SO_REUSEADDR, SO_KEEPALIVE, SO_RCVBUF, SO_SNDBUF,
         IP_TTL, IP_TOS, IP_ADD_MEMBERSHIP, IP_DROP_MEMBERSHIP,
         IP_MULTICAST_IF, IP_MULTICAST_TTL, IP_MULTICAST_LOOP,
-        TCP_NODELAY, TCP_MAXSEG, SO_BROADCAST
+        TCP_NODELAY, TCP_MAXSEG, SO_BROADCAST, SO_REUSEPORT
     };
     static PRInt32 socketLevels[PR_SockOpt_Last] =
     {
         0, SOL_SOCKET, SOL_SOCKET, SOL_SOCKET, SOL_SOCKET, SOL_SOCKET,
         IPPROTO_IP, IPPROTO_IP, IPPROTO_IP, IPPROTO_IP,
         IPPROTO_IP, IPPROTO_IP, IPPROTO_IP,
-        IPPROTO_TCP, IPPROTO_TCP, SOL_SOCKET
+        IPPROTO_TCP, IPPROTO_TCP, SOL_SOCKET, SOL_SOCKET
     };
 
     if ((optname < PR_SockOpt_Linger)
similarity index 91%
rename from nspr/pr/src/io/prmmap.c
rename to pr/src/io/prmmap.c
index d22ba39..6ffc133 100644 (file)
@@ -59,3 +59,11 @@ PR_IMPLEMENT(PRStatus) PR_CloseFileMap(PRFileMap *fmap)
 {
     return _PR_MD_CLOSE_FILE_MAP(fmap);
 }
+
+PR_IMPLEMENT(PRStatus) PR_SyncMemMap(
+    PRFileDesc *fd,
+    void *addr,
+    PRUint32 len)
+{
+  return _PR_MD_SYNC_MEM_MAP(fd, addr, len);
+}
similarity index 100%
rename from nspr/pr/src/io/prmwait.c
rename to pr/src/io/prmwait.c
similarity index 97%
rename from nspr/pr/src/io/prprf.c
rename to pr/src/io/prprf.c
index aa7852f..a2eb417 100644 (file)
 #include "prlog.h"
 #include "prmem.h"
 
+#ifdef _MSC_VER
+#define snprintf _snprintf
+#endif
+
 /*
 ** WARNING: This code may *NOT* call PR_LOG (because PR_LOG calls it)
 */
@@ -304,7 +308,7 @@ static int cvt_ll(SprintfState *ss, PRInt64 num, int width, int prec, int radix,
 ** Convert a double precision floating point number into its printable
 ** form.
 **
-** XXX stop using sprintf to convert floating point
+** XXX stop using snprintf to convert floating point
 */
 static int cvt_f(SprintfState *ss, double d, const char *fmt0, const char *fmt1)
 {
@@ -312,15 +316,14 @@ static int cvt_f(SprintfState *ss, double d, const char *fmt0, const char *fmt1)
     char fout[300];
     int amount = fmt1 - fmt0;
 
-    PR_ASSERT((amount > 0) && (amount < sizeof(fin)));
-    if (amount >= sizeof(fin)) {
-       /* Totally bogus % command to sprintf. Just ignore it */
+    if (amount <= 0 || amount >= sizeof(fin)) {
+       /* Totally bogus % command to snprintf. Just ignore it */
        return 0;
     }
     memcpy(fin, fmt0, amount);
     fin[amount] = 0;
 
-    /* Convert floating point using the native sprintf code */
+    /* Convert floating point using the native snprintf code */
 #ifdef DEBUG
     {
         const char *p = fin;
@@ -330,14 +333,11 @@ static int cvt_f(SprintfState *ss, double d, const char *fmt0, const char *fmt1)
         }
     }
 #endif
-    sprintf(fout, fin, d);
-
-    /*
-    ** This assert will catch overflow's of fout, when building with
-    ** debugging on. At least this way we can track down the evil piece
-    ** of calling code and fix it!
-    */
-    PR_ASSERT(strlen(fout) < sizeof(fout));
+    memset(fout, 0, sizeof(fout));
+    snprintf(fout, sizeof(fout), fin, d);
+    /* Explicitly null-terminate fout because on Windows snprintf doesn't
+     * append a null-terminator if the buffer is too small. */
+    fout[sizeof(fout) - 1] = '\0';
 
     return (*ss->stuff)(ss, fout, strlen(fout));
 }
similarity index 100%
rename from nspr/pr/src/io/prscanf.c
rename to pr/src/io/prscanf.c
similarity index 100%
rename from nspr/pr/src/io/prstdio.c
rename to pr/src/io/prstdio.c
similarity index 100%
rename from nspr/pr/src/md/prosdep.c
rename to pr/src/md/prosdep.c
similarity index 99%
rename from nspr/pr/src/md/unix/unix.c
rename to pr/src/md/unix/unix.c
index 02962e6..38f7be9 100644 (file)
@@ -3614,14 +3614,9 @@ PRStatus _MD_MemUnmap(void *addr, PRUint32 len)
 {
     if (munmap(addr, len) == 0) {
         return PR_SUCCESS;
-    } else {
-    if (errno == EINVAL) {
-            PR_SetError(PR_INVALID_ARGUMENT_ERROR, errno);
-    } else {
-        PR_SetError(PR_UNKNOWN_ERROR, errno);
-    }
-        return PR_FAILURE;
     }
+    _PR_MD_MAP_DEFAULT_ERROR(errno);
+    return PR_FAILURE;
 }
 
 PRStatus _MD_CloseFileMap(PRFileMap *fmap)
@@ -3638,6 +3633,20 @@ PRStatus _MD_CloseFileMap(PRFileMap *fmap)
     return PR_SUCCESS;
 }
 
+PRStatus _MD_SyncMemMap(
+    PRFileDesc *fd,
+    void *addr,
+    PRUint32 len)
+{
+    /* msync(..., MS_SYNC) alone is sufficient to flush modified data to disk
+     * synchronously. It is not necessary to call fsync. */
+    if (msync(addr, len, MS_SYNC) == 0) {
+        return PR_SUCCESS;
+    }
+    _PR_MD_MAP_DEFAULT_ERROR(errno);
+    return PR_FAILURE;
+}
+
 #if defined(_PR_NEED_FAKE_POLL)
 
 /*
similarity index 98%
rename from nspr/pr/src/md/windows/ntmisc.c
rename to pr/src/md/windows/ntmisc.c
index e23f672..12f8c1d 100644 (file)
@@ -982,10 +982,9 @@ PRStatus _MD_MemUnmap(void *addr, PRUint32 len)
 {
     if (UnmapViewOfFile(addr)) {
         return PR_SUCCESS;
-    } else {
-        PR_SetError(PR_UNKNOWN_ERROR, GetLastError());
-        return PR_FAILURE;
     }
+    _PR_MD_MAP_DEFAULT_ERROR(GetLastError());
+    return PR_FAILURE;
 }
 
 PRStatus _MD_CloseFileMap(PRFileMap *fmap)
@@ -995,6 +994,25 @@ PRStatus _MD_CloseFileMap(PRFileMap *fmap)
     return PR_SUCCESS;
 }
 
+PRStatus _MD_SyncMemMap(
+    PRFileDesc *fd,
+    void *addr,
+    PRUint32 len)
+{
+    PROsfd osfd = fd->secret->md.osfd;
+
+    /* The FlushViewOfFile page on MSDN says:
+     *  To flush all the dirty pages plus the metadata for the file and
+     *  ensure that they are physically written to disk, call
+     *  FlushViewOfFile and then call the FlushFileBuffers function.
+     */
+    if (FlushViewOfFile(addr, len) && FlushFileBuffers((HANDLE) osfd)) {
+        return PR_SUCCESS;
+    }
+    _PR_MD_MAP_DEFAULT_ERROR(GetLastError());
+    return PR_FAILURE;
+}
+
 /*
  ***********************************************************************
  *
similarity index 99%
rename from nspr/pr/src/md/windows/ntthread.c
rename to pr/src/md/windows/ntthread.c
index 3814142..fead123 100644 (file)
@@ -182,7 +182,7 @@ _PR_MD_CREATE_THREAD(PRThread *thread,
                     thread->stack->stackSize,
                     pr_root,
                     (void *)thread,
-                    CREATE_SUSPENDED,
+                    CREATE_SUSPENDED | STACK_SIZE_PARAM_IS_A_RESERVATION,
                     &(thread->id));
     if(!thread->md.handle) {
         PRErrorCode prerror;
similarity index 99%
rename from nspr/pr/src/md/windows/w95io.c
rename to pr/src/md/windows/w95io.c
index 824b6ff..de55a8f 100644 (file)
@@ -90,7 +90,6 @@ _PR_MD_WAIT(PRThread *thread, PRIntervalTime ticks)
     {
         case WAIT_OBJECT_0:
             return PR_SUCCESS;
-            break;
         case WAIT_TIMEOUT:
             _PR_THREAD_LOCK(thread);
             if (thread->state == _PR_IO_WAIT) {
@@ -110,10 +109,8 @@ _PR_MD_WAIT(PRThread *thread, PRIntervalTime ticks)
                 }
             }
             return PR_SUCCESS;
-            break;
         default:
             return PR_FAILURE;
-            break;
     }
 }
 PRStatus
similarity index 99%
rename from nspr/pr/src/md/windows/w95thred.c
rename to pr/src/md/windows/w95thred.c
index be92e20..932c50c 100644 (file)
@@ -106,7 +106,7 @@ _PR_MD_CREATE_THREAD(PRThread *thread,
                     thread->stack->stackSize,
                     pr_root,
                     (void *)thread,
-                    CREATE_SUSPENDED,
+                    CREATE_SUSPENDED | STACK_SIZE_PARAM_IS_A_RESERVATION,
                     &(thread->id));
     if(!thread->md.handle) {
         return PR_FAILURE;
similarity index 100%
rename from nspr/pr/.cvsignore
rename to pr/src/misc/.cvsignore
similarity index 100%
rename from nspr/pr/src/misc/dtoa.c
rename to pr/src/misc/dtoa.c
similarity index 98%
rename from nspr/pr/src/misc/prcountr.c
rename to pr/src/misc/prcountr.c
index e47ff1b..0f126ad 100644 (file)
@@ -145,7 +145,7 @@ PR_IMPLEMENT(PRCounterHandle)
                 break;
             }
             qnp = (QName *)PR_NEXT_LINK( &qnp->link );
-        } while( qnp != (QName *)PR_LIST_HEAD( &qNameList ));
+        } while( qnp != (QName *)&qNameList );
     }
     /*
     ** If we did not find a matching QName,
@@ -174,7 +174,7 @@ PR_IMPLEMENT(PRCounterHandle)
             */
             PR_ASSERT( strcmp(rnp->name, rName));
             rnp = (RName *)PR_NEXT_LINK( &rnp->link );
-        } while( rnp != (RName *)PR_LIST_HEAD( &qnp->rNameList ));
+        } while( rnp != (RName *)&qnp->rNameList );
     }
 
     /* Get a new RName structure; initialize its members */
similarity index 100%
rename from nspr/pr/src/misc/prenv.c
rename to pr/src/misc/prenv.c
similarity index 100%
rename from nspr/pr/src/misc/prerr.c
rename to pr/src/misc/prerr.c
similarity index 100%
rename from nspr/pr/src/misc/pripc.c
rename to pr/src/misc/pripc.c
similarity index 99%
rename from nspr/pr/src/misc/prnetdb.c
rename to pr/src/misc/prnetdb.c
index 7d05e57..b86248f 100644 (file)
@@ -2228,10 +2228,6 @@ PR_IMPLEMENT(PRStatus) PR_StringToNetAddr(const char *string, PRNetAddr *addr)
 #if !defined(_PR_HAVE_GETADDRINFO)
     return pr_StringToNetAddrFB(string, addr);
 #else
-#if defined(_PR_INET6_PROBE)
-    if (!_pr_ipv6_is_present())
-        return pr_StringToNetAddrFB(string, addr);
-#endif
     /*
      * getaddrinfo with AI_NUMERICHOST is much slower than pr_inet_aton on some
      * platforms, such as Mac OS X (bug 404399), Linux glibc 2.10 (bug 344809),
@@ -2241,6 +2237,11 @@ PR_IMPLEMENT(PRStatus) PR_StringToNetAddr(const char *string, PRNetAddr *addr)
     if (!strchr(string, '%'))
         return pr_StringToNetAddrFB(string, addr);
 
+#if defined(_PR_INET6_PROBE)
+    if (!_pr_ipv6_is_present())
+        return pr_StringToNetAddrFB(string, addr);
+#endif
+
     return pr_StringToNetAddrGAI(string, addr);
 #endif
 }
similarity index 100%
rename from nspr/pr/src/misc/prrng.c
rename to pr/src/misc/prrng.c
similarity index 98%
rename from nspr/pr/src/misc/prsystem.c
rename to pr/src/misc/prsystem.c
index 9579fcc..7a25071 100644 (file)
@@ -33,6 +33,7 @@
 #if defined(DARWIN)
 #include <mach/mach_init.h>
 #include <mach/mach_host.h>
+#include <mach/mach_port.h>
 #endif
 
 #if defined(HPUX)
@@ -297,13 +298,15 @@ PR_IMPLEMENT(PRUint64) PR_GetPhysicalMemorySize(void)
 
 #elif defined(DARWIN)
 
+    mach_port_t mach_host = mach_host_self();
     struct host_basic_info hInfo;
     mach_msg_type_number_t count = HOST_BASIC_INFO_COUNT;
 
-    int result = host_info(mach_host_self(),
+    int result = host_info(mach_host,
                            HOST_BASIC_INFO,
                            (host_info_t) &hInfo,
                            &count);
+    mach_port_deallocate(mach_task_self(), mach_host);
     if (result == KERN_SUCCESS)
         bytes = hInfo.max_mem;
 
similarity index 99%
rename from nspr/pr/src/misc/prtrace.c
rename to pr/src/misc/prtrace.c
index 07e7045..e1b456c 100644 (file)
@@ -222,7 +222,7 @@ PR_IMPLEMENT(PRTraceHandle)
                 break;
             }
             qnp = (QName *)PR_NEXT_LINK( &qnp->link );
-        } while( qnp != (QName *)PR_LIST_HEAD( &qNameList ));
+        } while( qnp != (QName *)&qNameList );
     }
     /*
     ** If we did not find a matching QName,
@@ -251,7 +251,7 @@ PR_IMPLEMENT(PRTraceHandle)
             */
             PR_ASSERT( strcmp(rnp->name, rName));
             rnp = (RName *)PR_NEXT_LINK( &rnp->link );
-        } while( rnp != (RName *)PR_LIST_HEAD( &qnp->rNameList ));
+        } while( rnp != (RName *)&qnp->rNameList );
     }
 
     /* Get a new RName structure; initialize its members */
similarity index 99%
rename from nspr/pr/src/nspr.def
rename to pr/src/nspr.def
index 7777a3d..6b91e55 100644 (file)
@@ -451,3 +451,7 @@ EXPORTS ;-
                PR_GetThreadName;
                PR_SetCurrentThreadName;
 ;+} NSPR_4.8.9;
+;+NSPR_4.10.3 {
+;+      global:
+               PR_SyncMemMap;
+;+} NSPR_4.9.2;
similarity index 100%
rename from nspr/pr/src/nspr.rc
rename to pr/src/nspr.rc
similarity index 100%
rename from nspr/pr/src/os2extra.def
rename to pr/src/os2extra.def
similarity index 100%
rename from nspr/pr/src/prvrsion.c
rename to pr/src/prvrsion.c
similarity index 99%
rename from nspr/pr/src/pthreads/ptio.c
rename to pr/src/pthreads/ptio.c
index 79d58ce..125f1f9 100644 (file)
@@ -2854,6 +2854,7 @@ static PRStatus pt_GetSocketOption(PRFileDesc *fd, PRSocketOptionData *data)
             case PR_SockOpt_Keepalive:
             case PR_SockOpt_NoDelay:
             case PR_SockOpt_Broadcast:
+            case PR_SockOpt_Reuseport:
             {
                 PRIntn value;
                 length = sizeof(PRIntn);
@@ -2973,6 +2974,7 @@ static PRStatus pt_SetSocketOption(PRFileDesc *fd, const PRSocketOptionData *dat
             case PR_SockOpt_Keepalive:
             case PR_SockOpt_NoDelay:
             case PR_SockOpt_Broadcast:
+            case PR_SockOpt_Reuseport:
             {
                 PRIntn value = (data->value.reuse_addr) ? 1 : 0;
                 rv = setsockopt(
@@ -3400,7 +3402,7 @@ PR_EXTERN(PRStatus) _pr_push_ipv6toipv4_layer(PRFileDesc *fd);
 extern PRBool _pr_ipv6_is_present(void);
 PR_IMPLEMENT(PRBool) _pr_test_ipv6_socket()
 {
-PRInt32 osfd;
+    int osfd;
 
 #if defined(DARWIN)
     /*
similarity index 82%
rename from nspr/pr/src/pthreads/ptsynch.c
rename to pr/src/pthreads/ptsynch.c
index 11412d4..03c5720 100644 (file)
@@ -169,6 +169,9 @@ PR_IMPLEMENT(void) PR_DestroyLock(PRLock *lock)
 
 PR_IMPLEMENT(void) PR_Lock(PRLock *lock)
 {
+    /* Nb: PR_Lock must not call PR_GetCurrentThread to access the |id| or
+     * |tid| field of the current thread's PRThread structure because
+     * _pt_root calls PR_Lock before setting thred->id and thred->tid. */
     PRIntn rv;
     PR_ASSERT(lock != NULL);
     rv = pthread_mutex_lock(&lock->mutex);
@@ -189,14 +192,15 @@ PR_IMPLEMENT(void) PR_Lock(PRLock *lock)
 
 PR_IMPLEMENT(PRStatus) PR_Unlock(PRLock *lock)
 {
+    pthread_t self = pthread_self();
     PRIntn rv;
 
     PR_ASSERT(lock != NULL);
     PR_ASSERT(_PT_PTHREAD_MUTEX_IS_LOCKED(lock->mutex));
     PR_ASSERT(PR_TRUE == lock->locked);
-    PR_ASSERT(pthread_equal(lock->owner, pthread_self()));
+    PR_ASSERT(pthread_equal(lock->owner, self));
 
-    if (!lock->locked || !pthread_equal(lock->owner, pthread_self()))
+    if (!lock->locked || !pthread_equal(lock->owner, self))
         return PR_FAILURE;
 
     lock->locked = PR_FALSE;
@@ -293,7 +297,7 @@ static void pt_PostNotifyToCvar(PRCondVar *cvar, PRBool broadcast)
                     notified->cv[index].times = -1;
                 else if (-1 != notified->cv[index].times)
                     notified->cv[index].times += 1;
-                goto finished;  /* we're finished */
+                return;  /* we're finished */
             }
         }
         /* if not full, enter new CV in this array */
@@ -310,10 +314,6 @@ static void pt_PostNotifyToCvar(PRCondVar *cvar, PRBool broadcast)
     notified->cv[index].times = (broadcast) ? -1 : 1;
     notified->cv[index].cv = cvar;
     notified->length += 1;
-
-finished:
-    PR_ASSERT(PR_TRUE == cvar->lock->locked);
-    PR_ASSERT(pthread_equal(cvar->lock->owner, pthread_self()));
 }  /* pt_PostNotifyToCvar */
 
 PR_IMPLEMENT(PRCondVar*) PR_NewCondVar(PRLock *lock)
@@ -427,54 +427,95 @@ PR_IMPLEMENT(PRStatus) PR_NotifyAllCondVar(PRCondVar *cvar)
 /**************************************************************/
 /**************************************************************/
 
+/*
+ * Notifies just get posted to the monitor. The actual notification is done
+ * when the monitor is fully exited so that MP systems don't contend for a
+ * monitor that they can't enter.
+ */
+static void pt_PostNotifyToMonitor(PRMonitor *mon, PRBool broadcast)
+{
+    PR_ASSERT(NULL != mon);
+    PR_ASSERT_CURRENT_THREAD_IN_MONITOR(mon);
+
+    /* mon->notifyTimes is protected by the monitor, so we don't need to
+     * acquire mon->lock.
+     */
+    if (broadcast)
+        mon->notifyTimes = -1;
+    else if (-1 != mon->notifyTimes)
+        mon->notifyTimes += 1;
+}  /* pt_PostNotifyToMonitor */
+
+static void pt_PostNotifiesFromMonitor(pthread_cond_t *cv, PRIntn times)
+{
+    PRIntn rv;
+
+    /*
+     * Time to actually notify any waits that were affected while the monitor
+     * was entered.
+     */
+    PR_ASSERT(NULL != cv);
+    PR_ASSERT(0 != times);
+    if (-1 == times)
+    {
+        rv = pthread_cond_broadcast(cv);
+        PR_ASSERT(0 == rv);
+    }
+    else
+    {
+        while (times-- > 0)
+        {
+            rv = pthread_cond_signal(cv);
+            PR_ASSERT(0 == rv);
+        }
+    }
+}  /* pt_PostNotifiesFromMonitor */
+
 PR_IMPLEMENT(PRMonitor*) PR_NewMonitor(void)
 {
     PRMonitor *mon;
-    PRCondVar *cvar;
     int rv;
 
     if (!_pr_initialized) _PR_ImplicitInitialization();
 
-    cvar = PR_NEWZAP(PRCondVar);
-    if (NULL == cvar)
-    {
-        PR_SetError(PR_OUT_OF_MEMORY_ERROR, 0);
-        return NULL;
-    }
     mon = PR_NEWZAP(PRMonitor);
     if (mon == NULL)
     {
-        PR_Free(cvar);
         PR_SetError(PR_OUT_OF_MEMORY_ERROR, 0);
         return NULL;
     }
 
-    rv = _PT_PTHREAD_MUTEX_INIT(mon->lock.mutex, _pt_mattr); 
+    rv = _PT_PTHREAD_MUTEX_INIT(mon->lock, _pt_mattr);
     PR_ASSERT(0 == rv);
     if (0 != rv)
-    {
-        PR_Free(mon);
-        PR_Free(cvar);
-        PR_SetError(PR_OPERATION_NOT_SUPPORTED_ERROR, 0);
-        return NULL;
-    }
+        goto error1;
 
     _PT_PTHREAD_INVALIDATE_THR_HANDLE(mon->owner);
 
-    mon->cvar = cvar;
-    rv = _PT_PTHREAD_COND_INIT(mon->cvar->cv, _pt_cvar_attr); 
+    rv = _PT_PTHREAD_COND_INIT(mon->entryCV, _pt_cvar_attr);
     PR_ASSERT(0 == rv);
-    mon->entryCount = 0;
-    mon->cvar->lock = &mon->lock;
     if (0 != rv)
-    {
-        pthread_mutex_destroy(&mon->lock.mutex);
-        PR_Free(mon);
-        PR_Free(cvar);
-        PR_SetError(PR_OPERATION_NOT_SUPPORTED_ERROR, 0);
-        return NULL;
-    }
+        goto error2;
+
+    rv = _PT_PTHREAD_COND_INIT(mon->waitCV, _pt_cvar_attr);
+    PR_ASSERT(0 == rv);
+    if (0 != rv)
+        goto error3;
+
+    mon->notifyTimes = 0;
+    mon->entryCount = 0;
+    mon->refCount = 1;
+    mon->name = NULL;
     return mon;
+
+error3:
+    pthread_cond_destroy(&mon->entryCV);
+error2:
+    pthread_mutex_destroy(&mon->lock);
+error1:
+    PR_Free(mon);
+    _PR_MD_MAP_DEFAULT_ERROR(rv);
+    return NULL;
 }  /* PR_NewMonitor */
 
 PR_IMPLEMENT(PRMonitor*) PR_NewNamedMonitor(const char* name)
@@ -488,73 +529,125 @@ PR_IMPLEMENT(PRMonitor*) PR_NewNamedMonitor(const char* name)
 PR_IMPLEMENT(void) PR_DestroyMonitor(PRMonitor *mon)
 {
     int rv;
+
     PR_ASSERT(mon != NULL);
-    PR_DestroyCondVar(mon->cvar);
-    rv = pthread_mutex_destroy(&mon->lock.mutex); PR_ASSERT(0 == rv);
+    if (PR_ATOMIC_DECREMENT(&mon->refCount) == 0)
+    {
+        rv = pthread_cond_destroy(&mon->waitCV); PR_ASSERT(0 == rv);
+        rv = pthread_cond_destroy(&mon->entryCV); PR_ASSERT(0 == rv);
+        rv = pthread_mutex_destroy(&mon->lock); PR_ASSERT(0 == rv);
 #if defined(DEBUG)
         memset(mon, 0xaf, sizeof(PRMonitor));
 #endif
-    PR_Free(mon);    
+        PR_Free(mon);
+    }
 }  /* PR_DestroyMonitor */
 
-
 /* The GC uses this; it is quite arguably a bad interface.  I'm just 
  * duplicating it for now - XXXMB
  */
 PR_IMPLEMENT(PRIntn) PR_GetMonitorEntryCount(PRMonitor *mon)
 {
     pthread_t self = pthread_self();
+    PRIntn rv;
+    PRIntn count = 0;
+
+    rv = pthread_mutex_lock(&mon->lock);
+    PR_ASSERT(0 == rv);
     if (pthread_equal(mon->owner, self))
-        return mon->entryCount;
-    return 0;
+        count = mon->entryCount;
+    rv = pthread_mutex_unlock(&mon->lock);
+    PR_ASSERT(0 == rv);
+    return count;
 }
 
 PR_IMPLEMENT(void) PR_AssertCurrentThreadInMonitor(PRMonitor *mon)
 {
-    PR_ASSERT_CURRENT_THREAD_OWNS_LOCK(&mon->lock);
+#if defined(DEBUG) || defined(FORCE_PR_ASSERT)
+    PRIntn rv;
+
+    rv = pthread_mutex_lock(&mon->lock);
+    PR_ASSERT(0 == rv);
+    PR_ASSERT(mon->entryCount != 0 &&
+              pthread_equal(mon->owner, pthread_self()));
+    rv = pthread_mutex_unlock(&mon->lock);
+    PR_ASSERT(0 == rv);
+#endif
 }
 
 PR_IMPLEMENT(void) PR_EnterMonitor(PRMonitor *mon)
 {
     pthread_t self = pthread_self();
+    PRIntn rv;
 
     PR_ASSERT(mon != NULL);
-    /*
-     * This is safe only if mon->owner (a pthread_t) can be
-     * read in one instruction.  Perhaps mon->owner should be
-     * a "PRThread *"?
-     */
-    if (!pthread_equal(mon->owner, self))
+    rv = pthread_mutex_lock(&mon->lock);
+    PR_ASSERT(0 == rv);
+    if (mon->entryCount != 0)
     {
-        PR_Lock(&mon->lock);
-        /* and now I have the lock */
-        PR_ASSERT(0 == mon->entryCount);
-        PR_ASSERT(_PT_PTHREAD_THR_HANDLE_IS_INVALID(mon->owner));
-        _PT_PTHREAD_COPY_THR_HANDLE(self, mon->owner);
+        if (pthread_equal(mon->owner, self))
+            goto done;
+        while (mon->entryCount != 0)
+        {
+            rv = pthread_cond_wait(&mon->entryCV, &mon->lock);
+            PR_ASSERT(0 == rv);
+        }
     }
+    /* and now I have the monitor */
+    PR_ASSERT(0 == mon->notifyTimes);
+    PR_ASSERT(_PT_PTHREAD_THR_HANDLE_IS_INVALID(mon->owner));
+    _PT_PTHREAD_COPY_THR_HANDLE(self, mon->owner);
+
+done:
     mon->entryCount += 1;
+    rv = pthread_mutex_unlock(&mon->lock);
+    PR_ASSERT(0 == rv);
 }  /* PR_EnterMonitor */
 
 PR_IMPLEMENT(PRStatus) PR_ExitMonitor(PRMonitor *mon)
 {
     pthread_t self = pthread_self();
+    PRIntn rv;
+    PRBool notifyEntryWaiter = PR_FALSE;
+    PRIntn notifyTimes = 0;
 
     PR_ASSERT(mon != NULL);
-    /* The lock better be that - locked */
-    PR_ASSERT(_PT_PTHREAD_MUTEX_IS_LOCKED(mon->lock.mutex));
-    /* we'd better be the owner */
+    rv = pthread_mutex_lock(&mon->lock);
+    PR_ASSERT(0 == rv);
+    /* the entries should be > 0 and we'd better be the owner */
+    PR_ASSERT(mon->entryCount > 0);
     PR_ASSERT(pthread_equal(mon->owner, self));
-    if (!pthread_equal(mon->owner, self))
+    if (mon->entryCount == 0 || !pthread_equal(mon->owner, self))
+    {
+        rv = pthread_mutex_unlock(&mon->lock);
+        PR_ASSERT(0 == rv);
         return PR_FAILURE;
+    }
 
-    /* if it's locked and we have it, then the entries should be > 0 */
-    PR_ASSERT(mon->entryCount > 0);
     mon->entryCount -= 1;  /* reduce by one */
     if (mon->entryCount == 0)
     {
-        /* and if it transitioned to zero - unlock */
-        _PT_PTHREAD_INVALIDATE_THR_HANDLE(mon->owner);  /* make the owner unknown */
-        PR_Unlock(&mon->lock);
+        /* and if it transitioned to zero - notify an entry waiter */
+        /* make the owner unknown */
+        _PT_PTHREAD_INVALIDATE_THR_HANDLE(mon->owner);
+        notifyEntryWaiter = PR_TRUE;
+        notifyTimes = mon->notifyTimes;
+        mon->notifyTimes = 0;
+        /* We will access the members of 'mon' after unlocking mon->lock.
+         * Add a reference. */
+        PR_ATOMIC_INCREMENT(&mon->refCount);
+    }
+    rv = pthread_mutex_unlock(&mon->lock);
+    PR_ASSERT(0 == rv);
+    if (notifyEntryWaiter)
+    {
+        if (notifyTimes)
+            pt_PostNotifiesFromMonitor(&mon->waitCV, notifyTimes);
+        rv = pthread_cond_signal(&mon->entryCV);
+        PR_ASSERT(0 == rv);
+        /* We are done accessing the members of 'mon'. Release the
+         * reference. */
+        PR_DestroyMonitor(mon);
     }
     return PR_SUCCESS;
 }  /* PR_ExitMonitor */
@@ -562,15 +655,15 @@ PR_IMPLEMENT(PRStatus) PR_ExitMonitor(PRMonitor *mon)
 PR_IMPLEMENT(PRStatus) PR_Wait(PRMonitor *mon, PRIntervalTime timeout)
 {
     PRStatus rv;
-    PRInt16 saved_entries;
+    PRUint32 saved_entries;
     pthread_t saved_owner;
 
     PR_ASSERT(mon != NULL);
-    /* we'd better be locked */
-    PR_ASSERT(_PT_PTHREAD_MUTEX_IS_LOCKED(mon->lock.mutex));
-    /* and the entries better be positive */
+    rv = pthread_mutex_lock(&mon->lock);
+    PR_ASSERT(0 == rv);
+    /* the entries better be positive */
     PR_ASSERT(mon->entryCount > 0);
-    /* and it better be by us */
+    /* and it better be owned by us */
     PR_ASSERT(pthread_equal(mon->owner, pthread_self()));
 
     /* tuck these away 'till later */
@@ -578,43 +671,52 @@ PR_IMPLEMENT(PRStatus) PR_Wait(PRMonitor *mon, PRIntervalTime timeout)
     mon->entryCount = 0;
     _PT_PTHREAD_COPY_THR_HANDLE(mon->owner, saved_owner);
     _PT_PTHREAD_INVALIDATE_THR_HANDLE(mon->owner);
-    
-    rv = PR_WaitCondVar(mon->cvar, timeout);
+    /*
+     * If we have pending notifies, post them now.
+     *
+     * This is not optimal. We're going to post these notifies
+     * while we're holding the lock. That means on MP systems
+     * that they are going to collide for the lock that we will
+     * hold until we actually wait.
+     */
+    if (0 != mon->notifyTimes)
+    {
+        pt_PostNotifiesFromMonitor(&mon->waitCV, mon->notifyTimes);
+        mon->notifyTimes = 0;
+    }
+    rv = pthread_cond_signal(&mon->entryCV);
+    PR_ASSERT(0 == rv);
 
-    /* reinstate the intresting information */
+    if (timeout == PR_INTERVAL_NO_TIMEOUT)
+        rv = pthread_cond_wait(&mon->waitCV, &mon->lock);
+    else
+        rv = pt_TimedWait(&mon->waitCV, &mon->lock, timeout);
+    PR_ASSERT(0 == rv);
+
+    while (mon->entryCount != 0)
+    {
+        rv = pthread_cond_wait(&mon->entryCV, &mon->lock);
+        PR_ASSERT(0 == rv);
+    }
+    PR_ASSERT(0 == mon->notifyTimes);
+    /* reinstate the interesting information */
     mon->entryCount = saved_entries;
     _PT_PTHREAD_COPY_THR_HANDLE(saved_owner, mon->owner);
 
+    rv = pthread_mutex_unlock(&mon->lock);
+    PR_ASSERT(0 == rv);
     return rv;
 }  /* PR_Wait */
 
 PR_IMPLEMENT(PRStatus) PR_Notify(PRMonitor *mon)
 {
-    PR_ASSERT(NULL != mon);
-    /* we'd better be locked */
-    PR_ASSERT(_PT_PTHREAD_MUTEX_IS_LOCKED(mon->lock.mutex));
-    /* and the entries better be positive */
-    PR_ASSERT(mon->entryCount > 0);
-    /* and it better be by us */
-    PR_ASSERT(pthread_equal(mon->owner, pthread_self()));
-
-    pt_PostNotifyToCvar(mon->cvar, PR_FALSE);
-
+    pt_PostNotifyToMonitor(mon, PR_FALSE);
     return PR_SUCCESS;
 }  /* PR_Notify */
 
 PR_IMPLEMENT(PRStatus) PR_NotifyAll(PRMonitor *mon)
 {
-    PR_ASSERT(mon != NULL);
-    /* we'd better be locked */
-    PR_ASSERT(_PT_PTHREAD_MUTEX_IS_LOCKED(mon->lock.mutex));
-    /* and the entries better be positive */
-    PR_ASSERT(mon->entryCount > 0);
-    /* and it better be by us */
-    PR_ASSERT(pthread_equal(mon->owner, pthread_self()));
-
-    pt_PostNotifyToCvar(mon->cvar, PR_TRUE);
-
+    pt_PostNotifyToMonitor(mon, PR_TRUE);
     return PR_SUCCESS;
 }  /* PR_NotifyAll */
 
similarity index 97%
rename from nspr/pr/src/pthreads/ptthread.c
rename to pr/src/pthreads/ptthread.c
index 764ec2c..4ab564a 100644 (file)
@@ -52,6 +52,7 @@ static struct _PT_Bookeeping
     PRInt32 system, user;       /* a count of the two different types */
     PRUintn this_many;          /* number of threads allowed for exit */
     pthread_key_t key;          /* thread private data key */
+    PRBool keyCreated;          /* whether 'key' should be deleted */
     PRThread *first, *last;     /* list of threads we know about */
 #if defined(_PR_DCETHREADS) || defined(_POSIX_THREAD_PRIORITY_SCHEDULING)
     PRInt32 minPrio, maxPrio;   /* range of scheduling priorities */
@@ -121,21 +122,11 @@ static void *_pt_root(void *arg)
     PRIntn rv;
     PRThread *thred = (PRThread*)arg;
     PRBool detached = (thred->state & PT_THREAD_DETACHED) ? PR_TRUE : PR_FALSE;
+    pthread_t id = pthread_self();
 #ifdef _PR_NICE_PRIORITY_SCHEDULING
     pid_t tid;
 #endif
 
-    /*
-     * Both the parent thread and this new thread set thred->id.
-     * The new thread must ensure that thred->id is set before
-     * it executes its startFunc.  The parent thread must ensure
-     * that thred->id is set before PR_CreateThread() returns.
-     * Both threads set thred->id without holding a lock.  Since
-     * they are writing the same value, this unprotected double
-     * write should be safe.
-     */
-    thred->id = pthread_self();
-
 #ifdef _PR_NICE_PRIORITY_SCHEDULING
     /*
      * We need to know the kernel thread ID of each thread in order to
@@ -151,11 +142,6 @@ static void *_pt_root(void *arg)
         setpriority(PRIO_PROCESS, tid,
                     pt_RelativePriority(rv, thred->priority));
     }
-
-    PR_Lock(pt_book.ml);
-    thred->tid = tid;
-    PR_NotifyAllCondVar(pt_book.cv);
-    PR_Unlock(pt_book.ml);
 #endif
 
     /*
@@ -167,7 +153,7 @@ static void *_pt_root(void *arg)
     if (detached)
     {
         /* pthread_detach() modifies its argument, so we must pass a copy */
-        pthread_t self = thred->id;
+        pthread_t self = id;
         rv = pthread_detach(&self);
         PR_ASSERT(0 == rv);
     }
@@ -186,6 +172,28 @@ static void *_pt_root(void *arg)
 
     /* make the thread visible to the rest of the runtime */
     PR_Lock(pt_book.ml);
+    /*
+     * Both the parent thread and this new thread set thred->id.
+     * The new thread must ensure that thred->id is set before
+     * it executes its startFunc.  The parent thread must ensure
+     * that thred->id is set before PR_CreateThread() returns.
+     * Both threads set thred->id while holding pt_book.ml and
+     * use thred->idSet to ensure thred->id is written only once.
+     */
+    if (!thred->idSet)
+    {
+        thred->id = id;
+        thred->idSet = PR_TRUE;
+    }
+    else
+    {
+        PR_ASSERT(pthread_equal(thred->id, id));
+    }
+
+#ifdef _PR_NICE_PRIORITY_SCHEDULING
+    thred->tid = tid;
+    PR_NotifyAllCondVar(pt_book.cv);
+#endif
 
     /* If this is a GCABLE thread, set its state appropriately */
     if (thred->suspend & PT_THREAD_SETGCABLE)
@@ -208,7 +216,7 @@ static void *_pt_root(void *arg)
     /*
      * At this moment, PR_CreateThread() may not have set thred->id yet.
      * It is safe for a detached thread to free thred only after
-     * PR_CreateThread() has set thred->id.
+     * PR_CreateThread() has accessed thred->id and thred->idSet.
      */
     if (detached)
     {
@@ -272,6 +280,7 @@ static PRThread* pt_AttachThread(void)
 
         thred->priority = PR_PRIORITY_NORMAL;
         thred->id = pthread_self();
+        thred->idSet = PR_TRUE;
 #ifdef _PR_NICE_PRIORITY_SCHEDULING
         thred->tid = gettid();
 #endif
@@ -492,24 +501,32 @@ static PRThread* _PR_CreateThread(
             goto done;
         }
 
+        PR_Lock(pt_book.ml);
         /*
          * Both the parent thread and this new thread set thred->id.
          * The parent thread must ensure that thred->id is set before
          * PR_CreateThread() returns.  (See comments in _pt_root().)
          */
-        thred->id = id;
+        if (!thred->idSet)
+        {
+            thred->id = id;
+            thred->idSet = PR_TRUE;
+        }
+        else
+        {
+            PR_ASSERT(pthread_equal(thred->id, id));
+        }
 
         /*
-         * If the new thread is detached, tell it that PR_CreateThread()
-         * has set thred->id so it's ok to delete thred.
+         * If the new thread is detached, tell it that PR_CreateThread() has
+         * accessed thred->id and thred->idSet so it's ok to delete thred.
          */
         if (PR_UNJOINABLE_THREAD == state)
         {
-            PR_Lock(pt_book.ml);
             thred->okToDelete = PR_TRUE;
             PR_NotifyAllCondVar(pt_book.cv);
-            PR_Unlock(pt_book.ml);
         }
+        PR_Unlock(pt_book.ml);
     }
 
 done:
@@ -939,6 +956,7 @@ void _PR_InitThreads(
     thred->startFunc = NULL;
     thred->priority = priority;
     thred->id = pthread_self();
+    thred->idSet = PR_TRUE;
 #ifdef _PR_NICE_PRIORITY_SCHEDULING
     thred->tid = gettid();
 #endif
@@ -979,9 +997,11 @@ void _PR_InitThreads(
      * nothing.
      */
     rv = _PT_PTHREAD_KEY_CREATE(&pt_book.key, _pt_thread_death);
-    PR_ASSERT(0 == rv);
+    if (0 != rv)
+        PR_Assert("0 == rv", __FILE__, __LINE__);
+    pt_book.keyCreated = PR_TRUE;
     rv = pthread_setspecific(pt_book.key, thred);
-    PR_ASSERT(0 == rv);    
+    PR_ASSERT(0 == rv);
 }  /* _PR_InitThreads */
 
 #ifdef __GNUC__
@@ -1041,7 +1061,17 @@ void _PR_Fini(void)
     void *thred;
     int rv;
 
-    if (!_pr_initialized) return;
+    if (!_pr_initialized) {
+        /* Either NSPR was never successfully initialized or 
+         * PR_Cleanup has been called already. */
+        if (pt_book.keyCreated)
+        {
+            rv = pthread_key_delete(pt_book.key);
+            PR_ASSERT(0 == rv);
+            pt_book.keyCreated = PR_FALSE;
+        }
+        return;
+    }
 
     _PT_PTHREAD_GETSPECIFIC(pt_book.key, thred);
     if (NULL != thred)
@@ -1056,6 +1086,7 @@ void _PR_Fini(void)
     }
     rv = pthread_key_delete(pt_book.key);
     PR_ASSERT(0 == rv);
+    pt_book.keyCreated = PR_FALSE;
     /* TODO: free other resources used by NSPR */
     /* _pr_initialized = PR_FALSE; */
 }  /* _PR_Fini */
similarity index 96%
rename from nspr/pr/src/threads/combined/prucv.c
rename to pr/src/threads/combined/prucv.c
index 43582b0..d0bf4c4 100644 (file)
@@ -446,31 +446,37 @@ PR_IMPLEMENT(PRCondVar*) PR_NewCondVar(PRLock *lock)
 {
     PRCondVar *cvar;
 
-    PR_ASSERT(lock != NULL);
-
     cvar = PR_NEWZAP(PRCondVar);
     if (cvar) {
-#ifdef _PR_GLOBAL_THREADS_ONLY
-       if(_PR_MD_NEW_CV(&cvar->md)) {
-               PR_DELETE(cvar);
-               PR_SetError(PR_INSUFFICIENT_RESOURCES_ERROR, 0);
-               return NULL;
-       }
-#endif
-        if (_PR_MD_NEW_LOCK(&(cvar->ilock)) == PR_FAILURE) {
-               PR_DELETE(cvar);
-               PR_SetError(PR_INSUFFICIENT_RESOURCES_ERROR, 0);
-               return NULL;
-       }
-    cvar->lock = lock;
-       PR_INIT_CLIST(&cvar->condQ);
-
+        if (_PR_InitCondVar(cvar, lock) != PR_SUCCESS) {
+            PR_DELETE(cvar);
+            return NULL;
+        }
     } else {
         PR_SetError(PR_OUT_OF_MEMORY_ERROR, 0);
     }
     return cvar;
 }
 
+PRStatus _PR_InitCondVar(PRCondVar *cvar, PRLock *lock)
+{
+    PR_ASSERT(lock != NULL);
+
+#ifdef _PR_GLOBAL_THREADS_ONLY
+    if(_PR_MD_NEW_CV(&cvar->md)) {
+        PR_SetError(PR_INSUFFICIENT_RESOURCES_ERROR, 0);
+        return PR_FAILURE;
+    }
+#endif
+    if (_PR_MD_NEW_LOCK(&(cvar->ilock)) != PR_SUCCESS) {
+        PR_SetError(PR_INSUFFICIENT_RESOURCES_ERROR, 0);
+        return PR_FAILURE;
+    }
+    cvar->lock = lock;
+    PR_INIT_CLIST(&cvar->condQ);
+    return PR_SUCCESS;
+}
+
 /*
 ** Destroy a condition variable. There must be no thread
 ** waiting on the condvar. The caller is responsible for guaranteeing
@@ -479,14 +485,18 @@ PR_IMPLEMENT(PRCondVar*) PR_NewCondVar(PRLock *lock)
 */
 PR_IMPLEMENT(void) PR_DestroyCondVar(PRCondVar *cvar)
 {
+    _PR_FreeCondVar(cvar);
+    PR_DELETE(cvar);
+}
+
+void _PR_FreeCondVar(PRCondVar *cvar)
+{
     PR_ASSERT(cvar->condQ.next == &cvar->condQ);
 
 #ifdef _PR_GLOBAL_THREADS_ONLY
     _PR_MD_FREE_CV(&cvar->md);
 #endif
     _PR_MD_FREE_LOCK(&(cvar->ilock));
-    PR_DELETE(cvar);
 }
 
 /*
similarity index 95%
rename from nspr/pr/src/threads/combined/prulock.c
rename to pr/src/threads/combined/prulock.c
index e2d29ba..8b2f41e 100644 (file)
@@ -160,16 +160,24 @@ PR_IMPLEMENT(PRLock*) PR_NewLock(void)
 
     lock = PR_NEWZAP(PRLock);
     if (lock) {
-        if (_PR_MD_NEW_LOCK(&lock->ilock) == PR_FAILURE) {
-               PR_DELETE(lock);
-               return(NULL);
-       }
-        PR_INIT_CLIST(&lock->links);
-        PR_INIT_CLIST(&lock->waitQ);
+        if (_PR_InitLock(lock) != PR_SUCCESS) {
+            PR_DELETE(lock);
+            return NULL;
+        }
     }
     return lock;
 }
 
+PRStatus _PR_InitLock(PRLock *lock)
+{
+    if (_PR_MD_NEW_LOCK(&lock->ilock) != PR_SUCCESS) {
+        return PR_FAILURE;
+    }
+    PR_INIT_CLIST(&lock->links);
+    PR_INIT_CLIST(&lock->waitQ);
+    return PR_SUCCESS;
+}
+
 /*
 ** Destroy the given lock "lock". There is no point in making this race
 ** free because if some other thread has the pointer to this lock all
@@ -177,11 +185,16 @@ PR_IMPLEMENT(PRLock*) PR_NewLock(void)
 */
 PR_IMPLEMENT(void) PR_DestroyLock(PRLock *lock)
 {
-    PR_ASSERT(lock->owner == 0);
-       _PR_MD_FREE_LOCK(&lock->ilock);
+    _PR_FreeLock(lock);
     PR_DELETE(lock);
 }
 
+void _PR_FreeLock(PRLock *lock)
+{
+    PR_ASSERT(lock->owner == 0);
+    _PR_MD_FREE_LOCK(&lock->ilock);
+}
+
 extern PRThread *suspendAllThread;
 /*
 ** Lock the lock.
@@ -197,15 +210,15 @@ PR_IMPLEMENT(void) PR_Lock(PRLock *lock)
     PR_ASSERT(!(me->flags & _PR_IDLE_THREAD));
     PR_ASSERT(lock != NULL);
 #ifdef _PR_GLOBAL_THREADS_ONLY 
-    PR_ASSERT(lock->owner != me);
     _PR_MD_LOCK(&lock->ilock);
+    PR_ASSERT(lock->owner == 0);
     lock->owner = me;
     return;
 #else  /* _PR_GLOBAL_THREADS_ONLY */
 
        if (_native_threads_only) {
-               PR_ASSERT(lock->owner != me);
                _PR_MD_LOCK(&lock->ilock);
+               PR_ASSERT(lock->owner == 0);
                lock->owner = me;
                return;
        }
diff --git a/pr/src/threads/prmon.c b/pr/src/threads/prmon.c
new file mode 100644 (file)
index 0000000..36be8a9
--- /dev/null
@@ -0,0 +1,346 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#include "primpl.h"
+
+/************************************************************************/
+
+/*
+ * Notifies just get posted to the monitor. The actual notification is done
+ * when the monitor is fully exited so that MP systems don't contend for a
+ * monitor that they can't enter.
+ */
+static void _PR_PostNotifyToMonitor(PRMonitor *mon, PRBool broadcast)
+{
+    PR_ASSERT(mon != NULL);
+    PR_ASSERT_CURRENT_THREAD_IN_MONITOR(mon);
+
+    /* mon->notifyTimes is protected by the monitor, so we don't need to
+     * acquire mon->lock.
+     */
+    if (broadcast)
+        mon->notifyTimes = -1;
+    else if (mon->notifyTimes != -1)
+        mon->notifyTimes += 1;
+}
+
+static void _PR_PostNotifiesFromMonitor(PRCondVar *cv, PRIntn times)
+{
+    PRStatus rv;
+
+    /*
+     * Time to actually notify any waits that were affected while the monitor
+     * was entered.
+     */
+    PR_ASSERT(cv != NULL);
+    PR_ASSERT(times != 0);
+    if (times == -1) {
+        rv = PR_NotifyAllCondVar(cv);
+        PR_ASSERT(rv == PR_SUCCESS);
+    } else {
+        while (times-- > 0) {
+            rv = PR_NotifyCondVar(cv);
+            PR_ASSERT(rv == PR_SUCCESS);
+        }
+    }
+}
+
+/*
+** Create a new monitor.
+*/
+PR_IMPLEMENT(PRMonitor*) PR_NewMonitor()
+{
+    PRMonitor *mon;
+    PRStatus rv;
+
+    if (!_pr_initialized) _PR_ImplicitInitialization();
+
+    mon = PR_NEWZAP(PRMonitor);
+    if (mon == NULL) {
+        PR_SetError(PR_OUT_OF_MEMORY_ERROR, 0);
+        return NULL;
+    }
+
+    rv = _PR_InitLock(&mon->lock);
+    PR_ASSERT(rv == PR_SUCCESS);
+    if (rv != PR_SUCCESS)
+        goto error1;
+
+    mon->owner = NULL;
+
+    rv = _PR_InitCondVar(&mon->entryCV, &mon->lock);
+    PR_ASSERT(rv == PR_SUCCESS);
+    if (rv != PR_SUCCESS)
+        goto error2;
+
+    rv = _PR_InitCondVar(&mon->waitCV, &mon->lock);
+    PR_ASSERT(rv == PR_SUCCESS);
+    if (rv != PR_SUCCESS)
+        goto error3;
+
+    mon->notifyTimes = 0;
+    mon->entryCount = 0;
+    mon->name = NULL;
+    return mon;
+
+error3:
+    _PR_FreeCondVar(&mon->entryCV);
+error2:
+    _PR_FreeLock(&mon->lock);
+error1:
+    PR_Free(mon);
+    return NULL;
+}
+
+PR_IMPLEMENT(PRMonitor*) PR_NewNamedMonitor(const char* name)
+{
+    PRMonitor* mon = PR_NewMonitor();
+    if (mon)
+        mon->name = name;
+    return mon;
+}
+
+/*
+** Destroy a monitor. There must be no thread waiting on the monitor's
+** condition variable. The caller is responsible for guaranteeing that the
+** monitor is no longer in use.
+*/
+PR_IMPLEMENT(void) PR_DestroyMonitor(PRMonitor *mon)
+{
+    PR_ASSERT(mon != NULL);
+    _PR_FreeCondVar(&mon->waitCV);
+    _PR_FreeCondVar(&mon->entryCV);
+    _PR_FreeLock(&mon->lock);
+#if defined(DEBUG)
+    memset(mon, 0xaf, sizeof(PRMonitor));
+#endif
+    PR_Free(mon);
+}
+
+/*
+** Enter the lock associated with the monitor.
+*/
+PR_IMPLEMENT(void) PR_EnterMonitor(PRMonitor *mon)
+{
+    PRThread *me = _PR_MD_CURRENT_THREAD();
+    PRStatus rv;
+
+    PR_ASSERT(mon != NULL);
+    PR_Lock(&mon->lock);
+    if (mon->entryCount != 0) {
+        if (mon->owner == me)
+            goto done;
+        while (mon->entryCount != 0) {
+            rv = PR_WaitCondVar(&mon->entryCV, PR_INTERVAL_NO_TIMEOUT);
+            PR_ASSERT(rv == PR_SUCCESS);
+        }
+    }
+    /* and now I have the monitor */
+    PR_ASSERT(mon->notifyTimes == 0);
+    PR_ASSERT(mon->owner == NULL);
+    mon->owner = me;
+
+done:
+    mon->entryCount += 1;
+    rv = PR_Unlock(&mon->lock);
+    PR_ASSERT(rv == PR_SUCCESS);
+}
+
+/*
+** Test and then enter the lock associated with the monitor if it's not
+** already entered by some other thread. Return PR_FALSE if some other
+** thread owned the lock at the time of the call.
+*/
+PR_IMPLEMENT(PRBool) PR_TestAndEnterMonitor(PRMonitor *mon)
+{
+    PRThread *me = _PR_MD_CURRENT_THREAD();
+    PRStatus rv;
+
+    PR_ASSERT(mon != NULL);
+    PR_Lock(&mon->lock);
+    if (mon->entryCount != 0) {
+        if (mon->owner == me)
+            goto done;
+        rv = PR_Unlock(&mon->lock);
+        PR_ASSERT(rv == PR_SUCCESS);
+        return PR_FALSE;
+    }
+    /* and now I have the monitor */
+    PR_ASSERT(mon->notifyTimes == 0);
+    PR_ASSERT(mon->owner == NULL);
+    mon->owner = me;
+
+done:
+    mon->entryCount += 1;
+    rv = PR_Unlock(&mon->lock);
+    PR_ASSERT(rv == PR_SUCCESS);
+    return PR_TRUE;
+}
+
+/*
+** Exit the lock associated with the monitor once.
+*/
+PR_IMPLEMENT(PRStatus) PR_ExitMonitor(PRMonitor *mon)
+{
+    PRThread *me = _PR_MD_CURRENT_THREAD();
+    PRStatus rv;
+
+    PR_ASSERT(mon != NULL);
+    PR_Lock(&mon->lock);
+    /* the entries should be > 0 and we'd better be the owner */
+    PR_ASSERT(mon->entryCount > 0);
+    PR_ASSERT(mon->owner == me);
+    if (mon->entryCount == 0 || mon->owner != me)
+    {
+        rv = PR_Unlock(&mon->lock);
+        PR_ASSERT(rv == PR_SUCCESS);
+        return PR_FAILURE;
+    }
+
+    mon->entryCount -= 1;  /* reduce by one */
+    if (mon->entryCount == 0)
+    {
+        /* and if it transitioned to zero - notify an entry waiter */
+        /* make the owner unknown */
+        mon->owner = NULL;
+        if (mon->notifyTimes != 0) {
+            _PR_PostNotifiesFromMonitor(&mon->waitCV, mon->notifyTimes);
+            mon->notifyTimes = 0;
+        }
+        rv = PR_NotifyCondVar(&mon->entryCV);
+        PR_ASSERT(rv == PR_SUCCESS);
+    }
+    rv = PR_Unlock(&mon->lock);
+    PR_ASSERT(rv == PR_SUCCESS);
+    return PR_SUCCESS;
+}
+
+/*
+** Return the number of times that the current thread has entered the
+** lock. Returns zero if the current thread has not entered the lock.
+*/
+PR_IMPLEMENT(PRIntn) PR_GetMonitorEntryCount(PRMonitor *mon)
+{
+    PRThread *me = _PR_MD_CURRENT_THREAD();
+    PRStatus rv;
+    PRIntn count = 0;
+
+    PR_Lock(&mon->lock);
+    if (mon->owner == me)
+        count = mon->entryCount;
+    rv = PR_Unlock(&mon->lock);
+    PR_ASSERT(rv == PR_SUCCESS);
+    return count;
+}
+
+PR_IMPLEMENT(void) PR_AssertCurrentThreadInMonitor(PRMonitor *mon)
+{
+#if defined(DEBUG) || defined(FORCE_PR_ASSERT)
+    PRStatus rv;
+
+    PR_Lock(&mon->lock);
+    PR_ASSERT(mon->entryCount != 0 &&
+              mon->owner == _PR_MD_CURRENT_THREAD());
+    rv = PR_Unlock(&mon->lock);
+    PR_ASSERT(rv == PR_SUCCESS);
+#endif
+}
+
+/*
+** Wait for a notify on the condition variable. Sleep for "ticks" amount
+** of time (if "tick" is 0 then the sleep is indefinite). While
+** the thread is waiting it exits the monitors lock (as if it called
+** PR_ExitMonitor as many times as it had called PR_EnterMonitor).  When
+** the wait has finished the thread regains control of the monitors lock
+** with the same entry count as before the wait began.
+**
+** The thread waiting on the monitor will be resumed when the monitor is
+** notified (assuming the thread is the next in line to receive the
+** notify) or when the "ticks" elapses.
+**
+** Returns PR_FAILURE if the caller has not locked the lock associated
+** with the condition variable.
+** This routine can return PR_PENDING_INTERRUPT_ERROR if the waiting thread
+** has been interrupted.
+*/
+PR_IMPLEMENT(PRStatus) PR_Wait(PRMonitor *mon, PRIntervalTime ticks)
+{
+    PRStatus rv;
+    PRUint32 saved_entries;
+    PRThread *saved_owner;
+
+    PR_ASSERT(mon != NULL);
+    PR_Lock(&mon->lock);
+    /* the entries better be positive */
+    PR_ASSERT(mon->entryCount > 0);
+    /* and it better be owned by us */
+    PR_ASSERT(mon->owner == _PR_MD_CURRENT_THREAD());  /* XXX return failure */
+
+    /* tuck these away 'till later */
+    saved_entries = mon->entryCount;
+    mon->entryCount = 0;
+    saved_owner = mon->owner;
+    mon->owner = NULL;
+    /* If we have pending notifies, post them now. */
+    if (mon->notifyTimes != 0) {
+        _PR_PostNotifiesFromMonitor(&mon->waitCV, mon->notifyTimes);
+        mon->notifyTimes = 0;
+    }
+    rv = PR_NotifyCondVar(&mon->entryCV);
+    PR_ASSERT(rv == PR_SUCCESS);
+
+    rv = PR_WaitCondVar(&mon->waitCV, ticks);
+    PR_ASSERT(rv == PR_SUCCESS);
+
+    while (mon->entryCount != 0) {
+        rv = PR_WaitCondVar(&mon->entryCV, PR_INTERVAL_NO_TIMEOUT);
+        PR_ASSERT(rv == PR_SUCCESS);
+    }
+    PR_ASSERT(mon->notifyTimes == 0);
+    /* reinstate the interesting information */
+    mon->entryCount = saved_entries;
+    mon->owner = saved_owner;
+
+    rv = PR_Unlock(&mon->lock);
+    PR_ASSERT(rv == PR_SUCCESS);
+    return rv;
+}
+
+/*
+** Notify the highest priority thread waiting on the condition
+** variable. If a thread is waiting on the condition variable (using
+** PR_Wait) then it is awakened and begins waiting on the monitor's lock.
+*/
+PR_IMPLEMENT(PRStatus) PR_Notify(PRMonitor *mon)
+{
+    _PR_PostNotifyToMonitor(mon, PR_FALSE);
+    return PR_SUCCESS;
+}
+
+/*
+** Notify all of the threads waiting on the condition variable. All of
+** threads are notified in turn. The highest priority thread will
+** probably acquire the monitor first when the monitor is exited.
+*/
+PR_IMPLEMENT(PRStatus) PR_NotifyAll(PRMonitor *mon)
+{
+    _PR_PostNotifyToMonitor(mon, PR_TRUE);
+    return PR_SUCCESS;
+}
+
+/************************************************************************/
+
+PRUint32 _PR_MonitorToString(PRMonitor *mon, char *buf, PRUint32 buflen)
+{
+    PRUint32 nb;
+
+    if (mon->owner) {
+       nb = PR_snprintf(buf, buflen, "[%p] owner=%d[%p] count=%ld",
+                        mon, mon->owner->id, mon->owner, mon->entryCount);
+    } else {
+       nb = PR_snprintf(buf, buflen, "[%p]", mon);
+    }
+    return nb;
+}
similarity index 95%
rename from nspr/pr/src/threads/prrwlock.c
rename to pr/src/threads/prrwlock.c
index c255dc8..2e0f9ea 100644 (file)
@@ -226,7 +226,8 @@ int err;
        /*
         * update thread's lock rank
         */
-       _PR_SET_THREAD_RWLOCK_RANK(rwlock);
+       if (rwlock->rw_rank != PR_RWLOCK_RANK_NONE)
+               _PR_SET_THREAD_RWLOCK_RANK(rwlock);
 #endif
 }
 
@@ -282,7 +283,8 @@ int err;
        /*
         * update thread's lock rank
         */
-       _PR_SET_THREAD_RWLOCK_RANK(rwlock);
+       if (rwlock->rw_rank != PR_RWLOCK_RANK_NONE)
+               _PR_SET_THREAD_RWLOCK_RANK(rwlock);
 #endif
 }
 
@@ -347,7 +349,8 @@ int err;
        /*
         * update thread's lock rank
         */
-       _PR_UNSET_THREAD_RWLOCK_RANK(rwlock);
+       if (rwlock->rw_rank != PR_RWLOCK_RANK_NONE)
+               _PR_UNSET_THREAD_RWLOCK_RANK(rwlock);
 #endif
        return;
 }
@@ -429,7 +432,8 @@ _PR_GET_THREAD_RWLOCK_RANK(void)
 {
        thread_rwlock_stack *lock_stack;
 
-       if ((lock_stack = PR_GetThreadPrivate(pr_thread_rwlock_key)) == NULL)
+       lock_stack = PR_GetThreadPrivate(pr_thread_rwlock_key);
+       if (lock_stack == NULL || lock_stack->trs_index == 0)
                return (PR_RWLOCK_RANK_NONE);
        else
                return(lock_stack->trs_stack[lock_stack->trs_index - 1]->rw_rank);
@@ -452,9 +456,8 @@ _PR_UNSET_THREAD_RWLOCK_RANK(PRRWLock *rwlock)
 
        PR_ASSERT(lock_stack != NULL);
 
-       index = lock_stack->trs_index - 1;
-       while (index-- >= 0) {
-               if ((lock_stack->trs_stack[index] == rwlock) && !done)  {
+       for (index = lock_stack->trs_index - 1; index >= 0; index--) {
+               if (!done && (lock_stack->trs_stack[index] == rwlock))  {
                        /*
                         * reset the slot for rwlock
                         */
@@ -465,7 +468,7 @@ _PR_UNSET_THREAD_RWLOCK_RANK(PRRWLock *rwlock)
                 * search for the lowest-numbered empty slot, above which there are
                 * no non-empty slots
                 */
-               if ((lock_stack->trs_stack[index] != NULL) && !new_index)
+               if (!new_index && (lock_stack->trs_stack[index] != NULL))
                        new_index = index + 1;
                if (done && new_index)
                        break;
similarity index 99%
rename from nspr/pr/tests/Makefile.in
rename to pr/tests/Makefile.in
index 50e8776..9ebd923 100644 (file)
@@ -79,6 +79,7 @@ CSRCS =             \
        multiacc.c              \
        multiwait.c             \
        many_cv.c               \
+       monref.c                \
        nameshm1.c      \
        nbconn.c                \
        nblayer.c               \
@@ -106,6 +107,7 @@ CSRCS =             \
        poll_nm.c               \
        poll_to.c               \
        pollable.c              \
+       prfdbl.c                \
        prftest.c               \
        prftest1.c              \
        prftest2.c              \
@@ -119,6 +121,7 @@ CSRCS =             \
        randseed.c      \
        reinit.c        \
        rmdir.c                 \
+       rwlockrank.c    \
        rwlocktest.c    \
        sel_spd.c               \
        selct_er.c          \
@@ -204,9 +207,9 @@ INCLUDES = -I$(dist_includedir) -I$(topsrcdir)/pr/include -I$(topsrcdir)/pr/incl
 
 ifeq ($(OS_ARCH), WINNT)
 ifdef NS_USE_GCC
-  EXTRA_LIBS += -lwsock32
+  EXTRA_LIBS += -lws2_32
 else
-  EXTRA_LIBS += wsock32.lib
+  EXTRA_LIBS += ws2_32.lib
   LDOPTS = -NOLOGO -DEBUG -DEBUGTYPE:CV -INCREMENTAL:NO
   ifdef PROFILE
     LDOPTS += -PROFILE -MAP
similarity index 100%
rename from nspr/pr/tests/README.TXT
rename to pr/tests/README.TXT
similarity index 100%
rename from nspr/pr/tests/accept.c
rename to pr/tests/accept.c
similarity index 100%
rename from nspr/pr/tests/addrstr.c
rename to pr/tests/addrstr.c
similarity index 100%
rename from nspr/pr/tests/affinity.c
rename to pr/tests/affinity.c
similarity index 100%
rename from nspr/pr/tests/alarm.c
rename to pr/tests/alarm.c
similarity index 100%
rename from nspr/pr/tests/anonfm.c
rename to pr/tests/anonfm.c
similarity index 100%
rename from nspr/pr/tests/append.c
rename to pr/tests/append.c
similarity index 100%
rename from nspr/pr/tests/atomic.c
rename to pr/tests/atomic.c
similarity index 99%
rename from nspr/pr/tests/attach.c
rename to pr/tests/attach.c
index e0ae9dd..a5daf9d 100644 (file)
@@ -260,7 +260,7 @@ int main(int argc, char **argv)
 #elif defined(WIN32)
 
     hThread = (HANDLE) _beginthreadex(NULL, 0, threadStartFunc, NULL,
-            0, &threadID); 
+            STACK_SIZE_PARAM_IS_A_RESERVATION, &threadID);
     if (hThread == 0) {
         fprintf(stderr, "thread creation failed: error code %d\n",
                 GetLastError());
similarity index 100%
rename from nspr/pr/tests/bigfile.c
rename to pr/tests/bigfile.c
similarity index 100%
rename from nspr/pr/tests/bigfile2.c
rename to pr/tests/bigfile2.c
similarity index 100%
rename from nspr/pr/tests/bigfile3.c
rename to pr/tests/bigfile3.c
similarity index 100%
rename from nspr/pr/tests/bug1test.c
rename to pr/tests/bug1test.c
similarity index 100%
rename from nspr/pr/tests/cleanup.c
rename to pr/tests/cleanup.c
similarity index 100%
rename from nspr/pr/tests/cltsrv.c
rename to pr/tests/cltsrv.c
similarity index 100%
rename from nspr/pr/tests/concur.c
rename to pr/tests/concur.c
similarity index 100%
rename from nspr/pr/tests/cvar.c
rename to pr/tests/cvar.c
similarity index 100%
rename from nspr/pr/tests/cvar2.c
rename to pr/tests/cvar2.c
similarity index 100%
rename from nspr/pr/tests/dbmalloc.c
rename to pr/tests/dbmalloc.c
similarity index 100%
rename from nspr/pr/tests/dceemu.c
rename to pr/tests/dceemu.c
similarity index 100%
rename from nspr/pr/tests/depend.c
rename to pr/tests/depend.c
similarity index 100%
rename from nspr/pr/tests/dll/my.def
rename to pr/tests/dll/my.def
similarity index 100%
rename from nspr/pr/tests/dlltest.c
rename to pr/tests/dlltest.c
similarity index 100%
rename from nspr/pr/tests/dtoa.c
rename to pr/tests/dtoa.c
similarity index 100%
rename from nspr/pr/tests/env.c
rename to pr/tests/env.c
similarity index 100%
rename from nspr/pr/tests/errcodes.c
rename to pr/tests/errcodes.c
similarity index 100%
rename from nspr/pr/tests/errset.c
rename to pr/tests/errset.c
similarity index 100%
rename from nspr/pr/tests/exit.c
rename to pr/tests/exit.c
similarity index 100%
rename from nspr/pr/tests/fdcach.c
rename to pr/tests/fdcach.c
similarity index 100%
rename from nspr/pr/tests/fileio.c
rename to pr/tests/fileio.c
similarity index 99%
rename from nspr/pr/tests/foreign.c
rename to pr/tests/foreign.c
index d5be90a..637f419 100644 (file)
@@ -79,9 +79,7 @@ static void sproc_start(void *arg, PRSize size)
 #endif  /* defined(IRIX) && !defined(_PR_PTHREADS) */
 
 #if defined(WIN32)
-#if defined(WINCE)
 #include <windows.h>
-#endif
 #include <process.h>  /* for _beginthreadex() */
 
 static PRUintn __stdcall windows_start(void *arg)
@@ -174,7 +172,7 @@ static PRStatus NSPRPUB_TESTS_CreateThread(StartFn start, void *arg)
                 0U, /* DWORD - initial thread stack size, in bytes */
                 windows_start, /* LPTHREAD_START_ROUTINE - pointer to thread function */
                 start_object, /* LPVOID - argument for new thread */
-                0U, /*DWORD dwCreationFlags - creation flags */
+                STACK_SIZE_PARAM_IS_A_RESERVATION, /*DWORD dwCreationFlags - creation flags */
                 &id /* LPDWORD - pointer to returned thread identifier */ );
 
             rv = (NULL == th) ? PR_FAILURE : PR_SUCCESS;
similarity index 100%
rename from nspr/pr/tests/forktest.c
rename to pr/tests/forktest.c
similarity index 100%
rename from nspr/pr/tests/formattm.c
rename to pr/tests/formattm.c
similarity index 100%
rename from nspr/pr/tests/freeif.c
rename to pr/tests/freeif.c
similarity index 100%
rename from nspr/pr/tests/fsync.c
rename to pr/tests/fsync.c
similarity index 100%
rename from nspr/pr/tests/getai.c
rename to pr/tests/getai.c
similarity index 100%
rename from nspr/pr/tests/gethost.c
rename to pr/tests/gethost.c
similarity index 100%
rename from nspr/pr/tests/getproto.c
rename to pr/tests/getproto.c
similarity index 100%
rename from nspr/pr/tests/i2l.c
rename to pr/tests/i2l.c
similarity index 100%
rename from nspr/pr/tests/initclk.c
rename to pr/tests/initclk.c
similarity index 100%
rename from nspr/pr/tests/inrval.c
rename to pr/tests/inrval.c
similarity index 99%
rename from nspr/pr/tests/instrumt.c
rename to pr/tests/instrumt.c
index 21fb849..5094e5d 100644 (file)
@@ -93,7 +93,7 @@ static void ListCounters(void)
         while ( rh != NULL )
         {
             PR_GET_COUNTER_NAME_FROM_HANDLE( rh, qname, rname, desc );
-            tCtr = PR_GET_COUNTER(tCtr, rh);
+            PR_GET_COUNTER(tCtr, rh);
             PR_LOG( lm, msgLevel,
                 ( "QName: %s  RName: %s  Desc: %s  Value: %ld\n", 
                 qn, rn, dn, tCtr ));
similarity index 100%
rename from nspr/pr/tests/intrio.c
rename to pr/tests/intrio.c
similarity index 100%
rename from nspr/pr/tests/intrupt.c
rename to pr/tests/intrupt.c
similarity index 100%
rename from nspr/pr/tests/ioconthr.c
rename to pr/tests/ioconthr.c
similarity index 100%
rename from nspr/pr/tests/ipv6.c
rename to pr/tests/ipv6.c
similarity index 100%
rename from nspr/pr/tests/join.c
rename to pr/tests/join.c
similarity index 100%
rename from nspr/pr/tests/joinkk.c
rename to pr/tests/joinkk.c
similarity index 100%
rename from nspr/pr/tests/joinku.c
rename to pr/tests/joinku.c
similarity index 100%
rename from nspr/pr/tests/joinuk.c
rename to pr/tests/joinuk.c
similarity index 100%
rename from nspr/pr/tests/joinuu.c
rename to pr/tests/joinuu.c
similarity index 100%
rename from nspr/pr/tests/layer.c
rename to pr/tests/layer.c
similarity index 100%
rename from nspr/pr/tests/lazyinit.c
rename to pr/tests/lazyinit.c
similarity index 100%
rename from nspr/pr/tests/lltest.c
rename to pr/tests/lltest.c
similarity index 100%
rename from nspr/pr/tests/lock.c
rename to pr/tests/lock.c
similarity index 100%
rename from nspr/pr/tests/lockfile.c
rename to pr/tests/lockfile.c
similarity index 100%
rename from nspr/pr/tests/logfile.c
rename to pr/tests/logfile.c
similarity index 100%
rename from nspr/pr/tests/logger.c
rename to pr/tests/logger.c
similarity index 100%
rename from nspr/pr/tests/makedir.c
rename to pr/tests/makedir.c
similarity index 100%
rename from nspr/pr/tests/many_cv.c
rename to pr/tests/many_cv.c
similarity index 100%
rename from nspr/pr/tests/mbcs.c
rename to pr/tests/mbcs.c
diff --git a/pr/tests/monref.c b/pr/tests/monref.c
new file mode 100644 (file)
index 0000000..3e2ae63
--- /dev/null
@@ -0,0 +1,74 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+/*
+ * This test program demonstrates that PR_ExitMonitor needs to add a
+ * reference to the PRMonitor object before unlocking the internal
+ * mutex.
+ */
+
+#include "prlog.h"
+#include "prmon.h"
+#include "prthread.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+
+/* Protected by the PRMonitor 'mon' in the main function. */
+static PRBool done = PR_FALSE;
+
+static void ThreadFunc(void *arg)
+{
+    PRMonitor *mon = (PRMonitor *)arg;
+    PRStatus rv;
+
+    PR_EnterMonitor(mon);
+    done = PR_TRUE;
+    rv = PR_Notify(mon);
+    PR_ASSERT(rv == PR_SUCCESS);
+    rv = PR_ExitMonitor(mon);
+    PR_ASSERT(rv == PR_SUCCESS);
+}
+
+int main()
+{
+    PRMonitor *mon;
+    PRThread *thread;
+    PRStatus rv;
+
+    mon = PR_NewMonitor();
+    if (!mon) {
+        fprintf(stderr, "PR_NewMonitor failed\n");
+        exit(1);
+    }
+
+    thread = PR_CreateThread(PR_USER_THREAD, ThreadFunc, mon,
+                             PR_PRIORITY_NORMAL, PR_GLOBAL_THREAD,
+                             PR_JOINABLE_THREAD, 0);
+    if (!thread) {
+        fprintf(stderr, "PR_CreateThread failed\n");
+        exit(1);
+    }
+
+    PR_EnterMonitor(mon);
+    while (!done) {
+        rv = PR_Wait(mon, PR_INTERVAL_NO_TIMEOUT);
+        PR_ASSERT(rv == PR_SUCCESS);
+    }
+    rv = PR_ExitMonitor(mon);
+    PR_ASSERT(rv == PR_SUCCESS);
+
+    /*
+     * Do you agree it should be safe to destroy 'mon' now?
+     * See bug 844784 comment 27.
+     */
+    PR_DestroyMonitor(mon);
+
+    rv = PR_JoinThread(thread);
+    PR_ASSERT(rv == PR_SUCCESS);
+
+    printf("PASS\n");
+    return 0;
+}
similarity index 100%
rename from nspr/pr/tests/multiacc.c
rename to pr/tests/multiacc.c
similarity index 100%
rename from nspr/pr/tests/nameshm1.c
rename to pr/tests/nameshm1.c
similarity index 100%
rename from nspr/pr/tests/nbconn.c
rename to pr/tests/nbconn.c
similarity index 100%
rename from nspr/pr/tests/nblayer.c
rename to pr/tests/nblayer.c
similarity index 100%
rename from nspr/pr/tests/nonblock.c
rename to pr/tests/nonblock.c
similarity index 100%
rename from nspr/pr/tests/ntioto.c
rename to pr/tests/ntioto.c
similarity index 100%
rename from nspr/pr/tests/ntoh.c
rename to pr/tests/ntoh.c
similarity index 100%
rename from nspr/pr/tests/obsints.c
rename to pr/tests/obsints.c
similarity index 100%
rename from nspr/pr/tests/op_2long.c
rename to pr/tests/op_2long.c
similarity index 100%
rename from nspr/pr/tests/op_excl.c
rename to pr/tests/op_excl.c
similarity index 100%
rename from nspr/pr/tests/op_filnf.c
rename to pr/tests/op_filnf.c
similarity index 100%
rename from nspr/pr/tests/op_filok.c
rename to pr/tests/op_filok.c
similarity index 100%
rename from nspr/pr/tests/op_noacc.c
rename to pr/tests/op_noacc.c
similarity index 100%
rename from nspr/pr/tests/op_nofil.c
rename to pr/tests/op_nofil.c
similarity index 100%
rename from nspr/pr/tests/openfile.c
rename to pr/tests/openfile.c
similarity index 100%
rename from nspr/pr/tests/parent.c
rename to pr/tests/parent.c
similarity index 100%
rename from nspr/pr/tests/parsetm.c
rename to pr/tests/parsetm.c
similarity index 100%
rename from nspr/pr/tests/peek.c
rename to pr/tests/peek.c
similarity index 100%
rename from nspr/pr/tests/perf.c
rename to pr/tests/perf.c
similarity index 100%
rename from nspr/pr/tests/pipeping.c
rename to pr/tests/pipeping.c
similarity index 100%
rename from nspr/pr/tests/pipepong.c
rename to pr/tests/pipepong.c
similarity index 100%
rename from nspr/pr/tests/pipeself.c
rename to pr/tests/pipeself.c
similarity index 100%
rename from nspr/pr/tests/poll_er.c
rename to pr/tests/poll_er.c
similarity index 100%
rename from nspr/pr/tests/poll_nm.c
rename to pr/tests/poll_nm.c
similarity index 100%
rename from nspr/pr/tests/poll_to.c
rename to pr/tests/poll_to.c
similarity index 100%
rename from nspr/pr/tests/pollable.c
rename to pr/tests/pollable.c
diff --git a/pr/tests/prfdbl.c b/pr/tests/prfdbl.c
new file mode 100644 (file)
index 0000000..3bb0650
--- /dev/null
@@ -0,0 +1,29 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+/*
+ * This is a simple test of the PR_fprintf() function for doubles.
+ */
+
+#include "prprf.h"
+
+int main()
+{
+    double pi = 3.1415926;
+    double e = 2.71828;
+    double root2 = 1.414;
+    double zero = 0.0;
+    double nan = zero / zero;
+
+    PR_fprintf(PR_STDOUT, "pi is %f.\n", pi);
+    PR_fprintf(PR_STDOUT, "e is %f.\n", e);
+    PR_fprintf(PR_STDOUT, "The square root of 2 is %f.\n", root2);
+    PR_fprintf(PR_STDOUT, "NaN is %f.\n", nan);
+
+    PR_fprintf(PR_STDOUT, "pi is %301f.\n", pi);
+    PR_fprintf(PR_STDOUT, "e is %65416.123f.\n", e);
+    PR_fprintf(PR_STDOUT, "e is %0000000000000000000065416.123f.\n", e);
+    PR_fprintf(PR_STDOUT, "NaN is %1024.1f.\n", nan);
+    return 0;
+}
similarity index 100%
rename from nspr/pr/tests/prftest.c
rename to pr/tests/prftest.c
similarity index 100%
rename from nspr/pr/tests/prftest1.c
rename to pr/tests/prftest1.c
similarity index 100%
rename from nspr/pr/tests/prftest2.c
rename to pr/tests/prftest2.c
similarity index 100%
rename from nspr/pr/tests/primblok.c
rename to pr/tests/primblok.c
similarity index 100%
rename from nspr/pr/tests/priotest.c
rename to pr/tests/priotest.c
similarity index 99%
rename from nspr/pr/tests/provider.c
rename to pr/tests/provider.c
index c62387a..0e6569d 100644 (file)
@@ -753,7 +753,7 @@ static PRStatus NewThread(
                 0U, /* DWORD - initial thread stack size, in bytes */
                 windows_start, /* LPTHREAD_START_ROUTINE - pointer to thread function */
                 start_object, /* LPVOID - argument for new thread */
-                0U, /*DWORD dwCreationFlags - creation flags */
+                STACK_SIZE_PARAM_IS_A_RESERVATION, /*DWORD dwCreationFlags - creation flags */
                 &id /* LPDWORD - pointer to returned thread identifier */ );
 
             rv = (NULL == th) ? PR_FAILURE : PR_SUCCESS;
similarity index 100%
rename from nspr/pr/tests/prpoll.c
rename to pr/tests/prpoll.c
similarity index 100%
rename from nspr/pr/tests/prpollml.c
rename to pr/tests/prpollml.c
similarity index 100%
rename from nspr/pr/tests/prselect.c
rename to pr/tests/prselect.c
similarity index 100%
rename from nspr/pr/tests/prttools.h
rename to pr/tests/prttools.h
similarity index 100%
rename from nspr/pr/tests/pushtop.c
rename to pr/tests/pushtop.c
similarity index 100%
rename from nspr/pr/tests/randseed.c
rename to pr/tests/randseed.c
similarity index 100%
rename from nspr/pr/tests/ranfile.c
rename to pr/tests/ranfile.c
similarity index 100%
rename from nspr/pr/tests/reinit.c
rename to pr/tests/reinit.c
similarity index 100%
rename from nspr/pr/tests/rmdir.c
rename to pr/tests/rmdir.c
diff --git a/pr/tests/rwlockrank.c b/pr/tests/rwlockrank.c
new file mode 100644 (file)
index 0000000..8d128f3
--- /dev/null
@@ -0,0 +1,120 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+/*
+ * RWLock rank tests
+ */
+
+#include "nspr.h"
+#include "plgetopt.h"
+
+static int _debug_on;
+static PRRWLock *rwlock0;
+static PRRWLock *rwlock1;
+static PRRWLock *rwlock2;
+
+static void rwtest(void *args)
+{
+    PR_RWLock_Rlock(rwlock1);
+    PR_RWLock_Unlock(rwlock1);
+
+    PR_RWLock_Rlock(rwlock1);
+    PR_RWLock_Unlock(rwlock1);
+
+    // Test correct lock rank.
+    PR_RWLock_Rlock(rwlock1);
+    PR_RWLock_Rlock(rwlock2);
+    PR_RWLock_Unlock(rwlock2);
+    PR_RWLock_Unlock(rwlock1);
+
+    PR_RWLock_Rlock(rwlock1);
+    PR_RWLock_Rlock(rwlock2);
+    PR_RWLock_Unlock(rwlock1);
+    PR_RWLock_Unlock(rwlock2);
+
+    PR_RWLock_Rlock(rwlock1);
+    PR_RWLock_Rlock(rwlock0);
+    PR_RWLock_Rlock(rwlock2);
+    PR_RWLock_Unlock(rwlock2);
+    PR_RWLock_Unlock(rwlock0);
+    PR_RWLock_Unlock(rwlock1);
+
+#if 0
+    // Test incorrect lock rank.
+    PR_RWLock_Rlock(rwlock2);
+    PR_RWLock_Rlock(rwlock1);
+    PR_RWLock_Unlock(rwlock1);
+    PR_RWLock_Unlock(rwlock2);
+
+    PR_RWLock_Rlock(rwlock2);
+    PR_RWLock_Rlock(rwlock0);
+    PR_RWLock_Rlock(rwlock1);
+    PR_RWLock_Unlock(rwlock1);
+    PR_RWLock_Unlock(rwlock0);
+    PR_RWLock_Unlock(rwlock2);
+#endif
+}
+
+int main(int argc, char **argv)
+{
+    PRStatus rc;
+    PRThread *thread;
+    PLOptStatus os;
+    PLOptState *opt = PL_CreateOptState(argc, argv, "d");
+
+    while (PL_OPT_EOL != (os = PL_GetNextOpt(opt))) {
+        if (PL_OPT_BAD == os) continue;
+        switch (opt->option) {
+        case 'd':  /* debug mode */
+            _debug_on = 1;
+            break;
+         default:
+            break;
+        }
+    }
+    PL_DestroyOptState(opt);
+
+    rwlock0 = PR_NewRWLock(PR_RWLOCK_RANK_NONE, "Lock 0");
+    if (rwlock0 == NULL) {
+        fprintf(stderr, "PR_NewRWLock failed - error %d\n",
+                (int)PR_GetError());
+        return 1;
+    }
+    rwlock1 = PR_NewRWLock(1, "Lock 1");
+    if (rwlock1 == NULL) {
+        fprintf(stderr, "PR_NewRWLock failed - error %d\n",
+                (int)PR_GetError());
+        return 1;
+    }
+    rwlock2 = PR_NewRWLock(2, "Lock 2");
+    if (rwlock2 == NULL) {
+        fprintf(stderr, "PR_NewRWLock failed - error %d\n",
+                (int)PR_GetError());
+        return 1;
+    }
+
+    thread = PR_CreateThread(PR_USER_THREAD, rwtest, NULL, PR_PRIORITY_NORMAL,
+                             PR_GLOBAL_THREAD, PR_JOINABLE_THREAD, 0);
+    if (thread == NULL) {
+        fprintf(stderr, "PR_CreateThread failed - error %d\n",
+                (int)PR_GetError());
+        PR_ProcessExit(2);
+    }
+    if (_debug_on) {
+        printf("%s: created thread = %p\n", argv[0], thread);
+    }
+
+    rc = PR_JoinThread(thread);
+    PR_ASSERT(rc == PR_SUCCESS);
+
+    PR_DestroyRWLock(rwlock0);
+    rwlock0 = NULL;
+    PR_DestroyRWLock(rwlock1);
+    rwlock1 = NULL;
+    PR_DestroyRWLock(rwlock2);
+    rwlock2 = NULL;
+
+    printf("PASS\n");
+    return 0;
+}
similarity index 98%
rename from nspr/pr/tests/rwlocktest.c
rename to pr/tests/rwlocktest.c
index 4a325fb..d9368a4 100644 (file)
@@ -132,7 +132,7 @@ int main(int argc, char **argv)
                        PR_ProcessExit(2);
                }
                if (_debug_on)
-                       PR_fprintf(output,"%s: created thread = 0x%x\n", argv[0],
+                       PR_fprintf(output,"%s: created thread = %p\n", argv[0],
                                                                                threads[cnt]);
        }
 
similarity index 100%
rename from nspr/pr/tests/sel_spd.c
rename to pr/tests/sel_spd.c
similarity index 100%
rename from nspr/pr/tests/selct_er.c
rename to pr/tests/selct_er.c
similarity index 100%
rename from nspr/pr/tests/selct_nm.c
rename to pr/tests/selct_nm.c
similarity index 100%
rename from nspr/pr/tests/selct_to.c
rename to pr/tests/selct_to.c
similarity index 100%
rename from nspr/pr/tests/select2.c
rename to pr/tests/select2.c
similarity index 100%
rename from nspr/pr/tests/selintr.c
rename to pr/tests/selintr.c
similarity index 100%
rename from nspr/pr/tests/sem.c
rename to pr/tests/sem.c
similarity index 100%
rename from nspr/pr/tests/sema.c
rename to pr/tests/sema.c
similarity index 100%
rename from nspr/pr/tests/semaerr.c
rename to pr/tests/semaerr.c
similarity index 100%
rename from nspr/pr/tests/semaerr1.c
rename to pr/tests/semaerr1.c
similarity index 100%
rename from nspr/pr/tests/semaping.c
rename to pr/tests/semaping.c
similarity index 100%
rename from nspr/pr/tests/semapong.c
rename to pr/tests/semapong.c
similarity index 100%
rename from nspr/pr/tests/sendzlf.c
rename to pr/tests/sendzlf.c
similarity index 100%
rename from nspr/pr/tests/servr_kk.c
rename to pr/tests/servr_kk.c
similarity index 100%
rename from nspr/pr/tests/servr_ku.c
rename to pr/tests/servr_ku.c
similarity index 100%
rename from nspr/pr/tests/servr_uk.c
rename to pr/tests/servr_uk.c
similarity index 100%
rename from nspr/pr/tests/servr_uu.c
rename to pr/tests/servr_uu.c
similarity index 100%
rename from nspr/pr/tests/sigpipe.c
rename to pr/tests/sigpipe.c
similarity index 100%
rename from nspr/pr/tests/sleep.c
rename to pr/tests/sleep.c
similarity index 99%
rename from nspr/pr/tests/socket.c
rename to pr/tests/socket.c
index 7664c0c..3544ba5 100644 (file)
@@ -347,7 +347,7 @@ PRInt32 native_thread = 0;
                                                stackSize,
                                                (unsigned (__stdcall *)(void *))start,
                                                arg,
-                                               0,
+                                               STACK_SIZE_PARAM_IS_A_RESERVATION,
                                                &tid);          
                return((PRThread *) thandle);
 #endif
similarity index 94%
rename from nspr/pr/tests/sockopt.c
rename to pr/tests/sockopt.c
index 66b4027..158b829 100644 (file)
 
 #include "plerror.h"
 
+#ifdef XP_UNIX
+#include <sys/socket.h>  /* SO_REUSEPORT */
+#endif
+
 static PRFileDesc *err = NULL;
 static PRBool failed = PR_FALSE;
 
@@ -54,6 +58,7 @@ int main(int argc, char **argv)
         "PR_SockOpt_NoDelay",         /* don't delay send to coalesce packets */
         "PR_SockOpt_MaxSegment",      /* maximum segment size */
         "PR_SockOpt_Broadcast",       /* Enable broadcast */
+        "PR_SockOpt_Reuseport",       /* allow local address & port reuse */
         "PR_SockOpt_Last"
     };
 
@@ -130,6 +135,11 @@ int main(int argc, char **argv)
                     data.value.broadcast = PR_TRUE;         
                     break;    
 #endif
+#ifdef SO_REUSEPORT
+                case PR_SockOpt_Reuseport:
+                    data.value.reuse_port = PR_TRUE;
+                    break;
+#endif
                 default: continue;
             }
 
similarity index 100%
rename from nspr/pr/tests/sockping.c
rename to pr/tests/sockping.c
similarity index 100%
rename from nspr/pr/tests/sockpong.c
rename to pr/tests/sockpong.c
similarity index 100%
rename from nspr/pr/tests/sprintf.c
rename to pr/tests/sprintf.c
similarity index 100%
rename from nspr/pr/tests/sproc_ch.c
rename to pr/tests/sproc_ch.c
similarity index 100%
rename from nspr/pr/tests/sproc_p.c
rename to pr/tests/sproc_p.c
similarity index 100%
rename from nspr/pr/tests/stack.c
rename to pr/tests/stack.c
similarity index 100%
rename from nspr/pr/tests/stat.c
rename to pr/tests/stat.c
similarity index 100%
rename from nspr/pr/tests/stdio.c
rename to pr/tests/stdio.c
similarity index 100%
rename from nspr/pr/tests/str2addr.c
rename to pr/tests/str2addr.c
similarity index 100%
rename from nspr/pr/tests/strod.c
rename to pr/tests/strod.c
similarity index 100%
rename from nspr/pr/tests/suspend.c
rename to pr/tests/suspend.c
similarity index 100%
rename from nspr/pr/tests/switch.c
rename to pr/tests/switch.c
similarity index 100%
rename from nspr/pr/tests/system.c
rename to pr/tests/system.c
similarity index 100%
rename from nspr/pr/tests/testbit.c
rename to pr/tests/testbit.c
similarity index 99%
rename from nspr/pr/tests/testfile.c
rename to pr/tests/testfile.c
index 6846e3b..b5f07fa 100644 (file)
@@ -150,7 +150,7 @@ PRInt32 native_thread = 0;
                                                stackSize,
                                                (unsigned (__stdcall *)(void *))start,
                                                arg,
-                                               0,
+                                               STACK_SIZE_PARAM_IS_A_RESERVATION,
                                                &tid);          
                return((PRThread *) thandle);
 #endif
similarity index 100%
rename from nspr/pr/tests/threads.c
rename to pr/tests/threads.c
similarity index 100%
rename from nspr/pr/tests/thruput.c
rename to pr/tests/thruput.c
similarity index 100%
rename from nspr/pr/tests/time.c
rename to pr/tests/time.c
similarity index 100%
rename from nspr/pr/tests/timemac.c
rename to pr/tests/timemac.c
similarity index 100%
rename from nspr/pr/tests/timetest.c
rename to pr/tests/timetest.c
similarity index 100%
rename from nspr/pr/tests/tmoacc.c
rename to pr/tests/tmoacc.c
similarity index 100%
rename from nspr/pr/tests/tmocon.c
rename to pr/tests/tmocon.c
similarity index 100%
rename from nspr/pr/tests/tpd.c
rename to pr/tests/tpd.c
similarity index 100%
rename from nspr/pr/tests/udpsrv.c
rename to pr/tests/udpsrv.c
similarity index 92%
rename from nspr/pr/tests/vercheck.c
rename to pr/tests/vercheck.c
index 6cfe137..256e5ed 100644 (file)
 #include <stdlib.h>
 
 /*
- * This release (4.10.2) is backward compatible with the
+ * This release (4.10.6) is backward compatible with the
  * 4.0.x, 4.1.x, 4.2.x, 4.3.x, 4.4.x, 4.5.x, 4.6.x, 4.7.x,
- * 4.8.x, 4.9.x, 4.10, and 4.10.1 releases.
+ * 4.8.x, 4.9.x, 4.10, 4.10.1, 4.10.2, 4.10.3, 4.10.4, and
+ * 4.10.5 releases.
  * It, of course, is compatible with itself.
  */
 static char *compatible_version[] = {
@@ -37,7 +38,8 @@ static char *compatible_version[] = {
     "4.8.6", "4.8.7", "4.8.8", "4.8.9",
     "4.9", "4.9.1", "4.9.2", "4.9.3", "4.9.4", "4.9.5",
     "4.9.6",
-    "4.10", "4.10.1",
+    "4.10", "4.10.1", "4.10.2", "4.10.3", "4.10.4",
+    "4.10.5",
     PR_VERSION
 };
 
@@ -53,7 +55,7 @@ static char *incompatible_version[] = {
     "3.0", "3.0.1",
     "3.1", "3.1.1", "3.1.2", "3.1.3",
     "3.5", "3.5.1",
-    "4.10.3",
+    "4.10.7",
     "4.11", "4.11.1",
     "10.0", "11.1", "12.14.20"
 };
similarity index 100%
rename from nspr/pr/tests/version.c
rename to pr/tests/version.c
similarity index 100%
rename from nspr/pr/tests/writev.c
rename to pr/tests/writev.c
similarity index 100%
rename from nspr/pr/tests/xnotify.c
rename to pr/tests/xnotify.c
similarity index 100%
rename from nspr/pr/tests/y2k.c
rename to pr/tests/y2k.c
similarity index 100%
rename from nspr/pr/tests/y2ktmo.c
rename to pr/tests/y2ktmo.c
similarity index 100%
rename from nspr/pr/tests/yield.c
rename to pr/tests/yield.c
similarity index 100%
rename from nspr/pr/tests/zerolen.c
rename to pr/tests/zerolen.c
similarity index 100%
rename from nspr/lib/.cvsignore
rename to tools/.cvsignore
similarity index 98%
rename from nspr/tools/Makefile.in
rename to tools/Makefile.in
index b54776c..38dd178 100644 (file)
@@ -167,7 +167,7 @@ ifeq ($(OS_TARGET),WIN16)
        echo winsock.lib     >>w16link
        wlink @w16link.
 else
-       link $(LDOPTS) $< $(LIBPR) $(LIBPLC) wsock32.lib -out:$@
+       link $(LDOPTS) $< $(LIBPR) $(LIBPLC) ws2_32.lib -out:$@
 endif
 else
 ifeq ($(OS_ARCH),OS2)
similarity index 100%
rename from nspr/tools/httpget.c
rename to tools/httpget.c
similarity index 100%
rename from nspr/tools/tail.c
rename to tools/tail.c