diff -Nru mozjs52-52.3.1/build/autoconf/nspr-build.m4 mozjs52-52.8.1/build/autoconf/nspr-build.m4 --- mozjs52-52.3.1/build/autoconf/nspr-build.m4 2017-08-08 10:25:46.000000000 +0000 +++ mozjs52-52.8.1/build/autoconf/nspr-build.m4 2018-06-08 12:27:06.000000000 +0000 @@ -177,11 +177,8 @@ AC_SUBST(NSPR_INCLUDE_DIR) AC_SUBST(NSPR_LIB_DIR) -NSPR_PKGCONF_CHECK="nspr" +PKGCONF_REQUIRES_PRIVATE="Requires.private: nspr" if test -n "$MOZ_SYSTEM_NSPR"; then - # piggy back on $MOZ_SYSTEM_NSPR to set a variable for the nspr check for js.pc - NSPR_PKGCONF_CHECK="nspr >= $NSPR_MINVER" - _SAVE_CFLAGS=$CFLAGS CFLAGS="$CFLAGS $NSPR_CFLAGS" AC_TRY_COMPILE([#include "prlog.h"], @@ -191,8 +188,12 @@ , AC_MSG_ERROR([system NSPR does not support PR_STATIC_ASSERT])) CFLAGS=$_SAVE_CFLAGS + # piggy back on $MOZ_SYSTEM_NSPR to set a variable for the nspr check for js.pc + PKGCONF_REQUIRES_PRIVATE="Requires.private: nspr >= $NSPR_MINVER" +elif test -n "$JS_POSIX_NSPR"; then + PKGCONF_REQUIRES_PRIVATE= fi -AC_SUBST(NSPR_PKGCONF_CHECK) +AC_SUBST([PKGCONF_REQUIRES_PRIVATE]) fi # _IS_OUTER_CONFIGURE diff -Nru mozjs52-52.3.1/build/pgo/certs/alternateroot.ca mozjs52-52.8.1/build/pgo/certs/alternateroot.ca --- mozjs52-52.3.1/build/pgo/certs/alternateroot.ca 2017-08-08 10:25:46.000000000 +0000 +++ mozjs52-52.8.1/build/pgo/certs/alternateroot.ca 2018-06-08 12:27:06.000000000 +0000 @@ -1,18 +1,18 @@ -----BEGIN CERTIFICATE----- -MIIC2jCCAcKgAwIBAgIBATANBgkqhkiG9w0BAQsFADAmMSQwIgYDVQQDExtBbHRl -cm5hdGUgVHJ1c3RlZCBBdXRob3JpdHkwHhcNMTQwOTI1MjEyMTU0WhcNMjQwOTI1 -MjEyMTU0WjAmMSQwIgYDVQQDExtBbHRlcm5hdGUgVHJ1c3RlZCBBdXRob3JpdHkw -ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDBT+BwAhO52IWgSIdZZifU -9LHOs3IR/+8DCC0WP5d/OuyKlZ6Rqd0tsd3i7durhQyjHSbLf2lJStcnFjcVEbEn -NI76RuvlN8xLLn5eV+2Ayr4cZYKztudwRmw+DV/iYAiMSy0hs7m3ssfX7qpoi1aN -RjUanwU0VTCPQhF1bEKAC2du+C5Z8e92zN5t87w7bYr7lt+m8197XliXEu+0s9Rg -nGwGaZ296BIRz6NOoJYTa43n06LU1I1+Z4d6lPdzUFrSR0GBaMhUSurUBtOin3yW -iMhg1VHX/KwqGc4als5GyCVXy8HGrA/0zQPOhetxrlhEVAdK/xBt7CZvByj1Rcc7 -AgMBAAGjEzARMA8GA1UdEwQIMAYBAf8CAQAwDQYJKoZIhvcNAQELBQADggEBAJq/ -hogSRqzPWTwX4wTn/DVSNdWwFLv53qep9YrSMJ8ZsfbfK9Es4VP4dBLRQAVMJ0Z5 -mW1I6d/n0KayTanuUBvemYdxPi/qQNSs8UJcllqdhqWzmzAg6a0LxrMnEeKzPBPD -6q8PwQ7tYP+B4sBN9tnnsnyPgti9ZiNZn5FwXZliHXseQ7FE9/SqHlLw5LXW3YtK -juti6RmuV6fq3j+D4oeC5vb1mKgIyoTqGN6ze57v8RHi+pQ8Q+kmoUn/L3Z2YmFe -4SKN/4WoyXr8TdejpThGOCGCAd3565s5gOx5QfSQX11P8NZKO8hcN0tme3VzmGpH -K0Z/6MTmdpNaTwQ6odk= +MIIC+zCCAeOgAwIBAgIUb/+pohOlRCuQgMy2GJLCUQq+HeMwDQYJKoZIhvcNAQEL +BQAwJjEkMCIGA1UEAwwbQWx0ZXJuYXRlIFRydXN0ZWQgQXV0aG9yaXR5MCIYDzIw +MTAwMTAxMDAwMDAwWhgPMjA1MDAxMDEwMDAwMDBaMCYxJDAiBgNVBAMMG0FsdGVy +bmF0ZSBUcnVzdGVkIEF1dGhvcml0eTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC +AQoCggEBAMF1xlJmCZ93CCpnkfG4dsN/XOU4sGxKzSKxy9RvplraKt1ByMJJisSj +s8H2FIf0G2mJQb2ApRw8EgJExYSkxEgzBeUTjAEGzwi+moYnYLrmoujzbyPF2YMT +ud+vN4NF2s5R1Nbc0qbLPMcG680wcOyYzOQKpZHXKVp/ccW+ZmkdKy3+yElEWQvF +o+pJ/ZOx11NAXxdzdpmVhmYlR5ftQmkIiAgRQiBpmIpD/uSM5oeB3SK2ppzSg3UT +H5MrEozihvp9JRwGKtJ+8Bbxh83VToMrNbiTD3S6kKqLx2FnJCqx/W1iFA0YxMC4 +xo/DdIRXMkrX3obmVS8dHhkdcSFo07sCAwEAAaMdMBswCwYDVR0PBAQDAgEGMAwG +A1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAAS+qy/sIFV+oia7zsyFhe3X +j3ZHSvmqJ4mxIg5KOPVP2NvDaxD/+pysxGLf69QDRjIsePBdRJz0zZoVl9pSXIn1 +Kpk0sjzKX2bJtAomog+ZnAZUxtLzoXy/aqaheWm8cRJ8qFOJtSMDRrLISqBXCQLO +ECqXIxf3Nt3S+Riu2Pam3YymFdtmqUJvLhhekWtEEnXyh/xfAsoUgS3SQ27c4dCY +R7XGnFsaXrKXv93QeJmtfvrAZMXEuKaBGPSNHV6QH0S0Loh9Jed2Zp7GxnFtIPYe +J2Q5qtxa8KD/tgGFpAD74eMBdgQ4SxbA/YqqXIt1lLNcr7wm0cPRpP0vIY3hk8k= -----END CERTIFICATE----- diff -Nru mozjs52-52.3.1/build/pgo/certs/alternateroot.ca.keyspec mozjs52-52.8.1/build/pgo/certs/alternateroot.ca.keyspec --- mozjs52-52.3.1/build/pgo/certs/alternateroot.ca.keyspec 1970-01-01 00:00:00.000000000 +0000 +++ mozjs52-52.8.1/build/pgo/certs/alternateroot.ca.keyspec 2018-06-08 12:27:06.000000000 +0000 @@ -0,0 +1 @@ +alternate diff -Nru mozjs52-52.3.1/build/pgo/certs/alternateroot.certspec mozjs52-52.8.1/build/pgo/certs/alternateroot.certspec --- mozjs52-52.3.1/build/pgo/certs/alternateroot.certspec 1970-01-01 00:00:00.000000000 +0000 +++ mozjs52-52.8.1/build/pgo/certs/alternateroot.certspec 2018-06-08 12:27:06.000000000 +0000 @@ -0,0 +1,7 @@ +issuer:Alternate Trusted Authority +subject:Alternate Trusted Authority +validity:20100101-20500101 +extension:keyUsage:keyCertSign,cRLSign +extension:basicConstraints:cA, +issuerKey:alternate +subjectKey:alternate diff -Nru mozjs52-52.3.1/build/pgo/certs/bug413909cert.certspec mozjs52-52.8.1/build/pgo/certs/bug413909cert.certspec --- mozjs52-52.3.1/build/pgo/certs/bug413909cert.certspec 1970-01-01 00:00:00.000000000 +0000 +++ mozjs52-52.8.1/build/pgo/certs/bug413909cert.certspec 2018-06-08 12:27:06.000000000 +0000 @@ -0,0 +1,3 @@ +subject:bug413909.xn--hxajbheg2az3al.xn--jxalpdlp +issuer:printableString/CN=Temporary Certificate Authority/O=Mozilla Testing/OU=Profile Guided Optimization +extension:subjectAlternativeName:bug413909.xn--hxajbheg2az3al.xn--jxalpdlp Binary files /tmp/tmpjn7M6C/31iJlPBASl/mozjs52-52.3.1/build/pgo/certs/cert8.db and /tmp/tmpjn7M6C/Ce4QwoDRii/mozjs52-52.8.1/build/pgo/certs/cert8.db differ diff -Nru mozjs52-52.3.1/build/pgo/certs/dynamicPinningBad.certspec mozjs52-52.8.1/build/pgo/certs/dynamicPinningBad.certspec --- mozjs52-52.3.1/build/pgo/certs/dynamicPinningBad.certspec 1970-01-01 00:00:00.000000000 +0000 +++ mozjs52-52.8.1/build/pgo/certs/dynamicPinningBad.certspec 2018-06-08 12:27:06.000000000 +0000 @@ -0,0 +1,5 @@ +subject:bad.include-subdomains.pinning-dynamic.example.com +issuer:Alternate Trusted Authority +extension:subjectAlternativeName:bad.include-subdomains.pinning-dynamic.example.com +subjectKey:alternate +issuerKey:alternate diff -Nru mozjs52-52.3.1/build/pgo/certs/dynamicPinningBad.server.keyspec mozjs52-52.8.1/build/pgo/certs/dynamicPinningBad.server.keyspec --- mozjs52-52.3.1/build/pgo/certs/dynamicPinningBad.server.keyspec 1970-01-01 00:00:00.000000000 +0000 +++ mozjs52-52.8.1/build/pgo/certs/dynamicPinningBad.server.keyspec 2018-06-08 12:27:06.000000000 +0000 @@ -0,0 +1 @@ +alternate diff -Nru mozjs52-52.3.1/build/pgo/certs/dynamicPinningGood.certspec mozjs52-52.8.1/build/pgo/certs/dynamicPinningGood.certspec --- mozjs52-52.3.1/build/pgo/certs/dynamicPinningGood.certspec 1970-01-01 00:00:00.000000000 +0000 +++ mozjs52-52.8.1/build/pgo/certs/dynamicPinningGood.certspec 2018-06-08 12:27:06.000000000 +0000 @@ -0,0 +1,3 @@ +subject:dynamic-pinning.example.com +issuer:printableString/CN=Temporary Certificate Authority/O=Mozilla Testing/OU=Profile Guided Optimization +extension:subjectAlternativeName:*.include-subdomains.pinning-dynamic.example.com,*.pinning-dynamic.example.com diff -Nru mozjs52-52.3.1/build/pgo/certs/escapeattack1.certspec mozjs52-52.8.1/build/pgo/certs/escapeattack1.certspec --- mozjs52-52.3.1/build/pgo/certs/escapeattack1.certspec 1970-01-01 00:00:00.000000000 +0000 +++ mozjs52-52.8.1/build/pgo/certs/escapeattack1.certspec 2018-06-08 12:27:06.000000000 +0000 @@ -0,0 +1,3 @@ +subject:www.bank1.com\00www.bad-guy.com +issuer:printableString/CN=Temporary Certificate Authority/O=Mozilla Testing/OU=Profile Guided Optimization +extension:subjectAlternativeName:www.bank1.com\00www.bad-guy.com diff -Nru mozjs52-52.3.1/build/pgo/certs/evintermediate.ca mozjs52-52.8.1/build/pgo/certs/evintermediate.ca --- mozjs52-52.3.1/build/pgo/certs/evintermediate.ca 2017-08-08 10:25:46.000000000 +0000 +++ mozjs52-52.8.1/build/pgo/certs/evintermediate.ca 2018-06-08 12:27:06.000000000 +0000 @@ -1,34 +1,26 @@ -----BEGIN CERTIFICATE----- -MIIF9zCCBN+gAwIBAgIBAzANBgkqhkiG9w0BAQUFADCB4TELMAkGA1UEBhMCVVMx -CzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MSMwIQYDVQQKExpN -b3ppbGxhIC0gRVYgZGVidWcgdGVzdCBDQTEdMBsGA1UECxMUU2VjdXJpdHkgRW5n -aW5lZXJpbmcxJjAkBgNVBAMTHUVWIFRlc3RpbmcgKHVudHJ1c3R3b3J0aHkpIENB -MRMwEQYDVQQpEwpldi10ZXN0LWNhMSwwKgYJKoZIhvcNAQkBFh1jaGFybGF0YW5A -dGVzdGluZy5leGFtcGxlLmNvbTAeFw0xMzAyMTQxNzU5MDlaFw0yMzAyMTIxNzU5 -MDlaMIHRMQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExFjAUBgNVBAcTDU1vdW50 -YWluIFZpZXcxIzAhBgNVBAoTGk1vemlsbGEgLSBFViBkZWJ1ZyB0ZXN0IENBMR0w -GwYDVQQLExRTZWN1cml0eSBFbmdpbmVlcmluZzEWMBQGA1UEAxMNaW50ZXJtZWRp -YXRlMzETMBEGA1UEKRMKZXYtdGVzdC1jYTEsMCoGCSqGSIb3DQEJARYdY2hhcmxh -dGFuQHRlc3RpbmcuZXhhbXBsZS5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw -ggEKAoIBAQDAfzrlJdawr7v8m7lslODk5FTqCiBO7tPxnWhAOEL5g05knLTZTc5J -3ywmGoW6ae6RwPlWuqRuFd2Ea+yCawyjkUoLOpFH/xziDzvaS6LXNdJoxQqWk/LX -8YYQVFfmxh8E11fz74IoCzX++mY1byaNONf3bLU2HU8vnVvENr1gy9Bzpm8wUuKm -HkBYuG0SVzaeym2H/mo5PJICPVhPa+YxfEVS8EIFCigXGH7xrz/bPXnpfgsSJTnN -4amBNkORfjf7H9x6IWkJGEkIvkVoYKT4iQ9q6/C4YDjWa9p5lA4F/qxnJefezH/I -6hcqEODSaDsY+I6vsN8ks8r8MTTnd7BjAgMBAAGjggHGMIIBwjAdBgNVHQ4EFgQU -fluXMAT0ZS21pV13vv46m8k7nRkwggEYBgNVHSMEggEPMIIBC4AUyJg651hwk+3B -V0rQvQZv9n2bWPahgeekgeQwgeExCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEW -MBQGA1UEBxMNTW91bnRhaW4gVmlldzEjMCEGA1UEChMaTW96aWxsYSAtIEVWIGRl -YnVnIHRlc3QgQ0ExHTAbBgNVBAsTFFNlY3VyaXR5IEVuZ2luZWVyaW5nMSYwJAYD -VQQDEx1FViBUZXN0aW5nICh1bnRydXN0d29ydGh5KSBDQTETMBEGA1UEKRMKZXYt -dGVzdC1jYTEsMCoGCSqGSIb3DQEJARYdY2hhcmxhdGFuQHRlc3RpbmcuZXhhbXBs -ZS5jb22CCQCvxT0iZiZJMjAMBgNVHRMEBTADAQH/MDYGA1UdHwQvMC0wK6ApoCeG -JWh0dHA6Ly9leGFtcGxlLmNvbS9yb290LWV2LXRlc3Rlci5jcmwwPwYDVR0gBDgw -NjA0BgRVHSAAMCwwKgYIKwYBBQUHAgEWHmh0dHA6Ly9teXRlc3Rkb21haW4ubG9j -YWwvY3BzOzANBgkqhkiG9w0BAQUFAAOCAQEAC4grNTV5K8yqiAJ/0f6oIkTMqyJ4 -lyHXvvKXMHTpRZ7Jdy0aq5KTSHswx64ZRN7V2ds+czzDWgxX3rBuZZAgOW1JYva3 -Ps3XRYUiaTW8eeaWjuVRFAp7ytRmSsOGeOtHbez8jDmTqPRQ1mTMsMzpY4bFD8do -5y0xsbz4DYIeeNnX9+XGB5u2ml8t5L8Cj65wwMAx9HlsjTrfQTMIwpwbNle6GuZ3 -9FzmE2piAND73yCgU5W66K2lZg8N6vHBq0UhPDCF72y8MlHxQOpTr3/jIGr4X7k9 -uyYq0Pw5Y/LKyGbyW5iMFdLzabm1ua8IWAf7DSFMH6L3WlK8mngCfJ1icQ== +MIIEfDCCA2SgAwIBAgIUETbLA86peOWkUFhyKYIuZVGUEygwDQYJKoZIhvcNAQEL +BQAwgdwxCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEWMBQGA1UEBxMNTW91bnRh +aW4gVmlldzEjMCEGA1UEChMaTW96aWxsYSAtIEVWIGRlYnVnIHRlc3QgQ0ExHTAb +BgNVBAsTFFNlY3VyaXR5IEVuZ2luZWVyaW5nMTYwNAYDVQQDEy1FViBUZXN0aW5n +ICh1bnRydXN0d29ydGh5KSBDQS9uYW1lPWV2LXRlc3QtY2ExLDAqBgkqhkiG9w0B +CQEWHWNoYXJsYXRhbkB0ZXN0aW5nLmV4YW1wbGUuY29tMCIYDzIwMTAwMTAxMDAw +MDAwWhgPMjA1MDAxMDEwMDAwMDBaMIHcMQswCQYDVQQGEwJVUzELMAkGA1UECBMC +Q0ExFjAUBgNVBAcTDU1vdW50YWluIFZpZXcxIzAhBgNVBAoTGk1vemlsbGEgLSBF +ViBkZWJ1ZyB0ZXN0IENBMR0wGwYDVQQLExRTZWN1cml0eSBFbmdpbmVlcmluZzE2 +MDQGA1UEAxMtRVYgVGVzdGluZyAodW50cnVzdHdvcnRoeSkgQ0EvbmFtZT1ldi10 +ZXN0LWNhMSwwKgYJKoZIhvcNAQkBFh1jaGFybGF0YW5AdGVzdGluZy5leGFtcGxl +LmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALVJiVydABCNEaH5 +n4ep49Gl21367PGI2le/ZBNojyzkciz/EJA4wXQCyToqRz29KGrtP9zTY89aKRR3 +Ab3YGNdhW/k1a9XTyDNqqowJcTaKBsPNRGG5PlFCThdEuy6q1GqrOM4ZaCGWH4dx +ShZjaT8JdhzfTWuhJerOx74nDTiPeJ9s33iuMUTtKMReeSk4Y6eiKkiYCjakDnLV +ecm5Jd/4x5M2L/1ol6fBdUxel8lnw+rdGq6KoszONIoBabgOKKLXDBqWDG8zXy2g +m5tkP1q/uknoqqmB6WDifYdIC91V3ZQX+hhQn7tVTM+BpDl+i6gSijS98nhlwYnl +c0+yKQUCAwEAAaMwMC4wCwYDVR0PBAQDAgEGMAwGA1UdEwQFMAMBAf8wEQYDVR0g +BAowCDAGBgRVHSAAMA0GCSqGSIb3DQEBCwUAA4IBAQArG5slgBRJuytlKFa4qcHW +pAOfjN9fwi57fDds1yNv6tXhESdkbVPhIgw+GanVbrVcorGdCkfB51+dPJM+cBgH +HSwEB7TQnNYvm/csA1zH4n+CnX9nBL7dwK63n6dyR9f1uvu6KSB+YJm3amKil85a +d7HeDWdh+gNhC58lEC2QzuOMivP593aS5vLJHfp8pjc21XJkO8M7SRw44OJKYq9/ +v0k6v4SznbfZzSLg3gM4aSNuCLExUtUY2myxPFwJs9QQ4xx5zJTjJTRlpxUm630Z +n4IYlseao949U+UbBNU4PZKH7dzSQzfhdFJpvK3dsPOPNnHYiXO0xAhsEvvjq8zQ -----END CERTIFICATE----- diff -Nru mozjs52-52.3.1/build/pgo/certs/evintermediate.ca.keyspec mozjs52-52.8.1/build/pgo/certs/evintermediate.ca.keyspec --- mozjs52-52.3.1/build/pgo/certs/evintermediate.ca.keyspec 1970-01-01 00:00:00.000000000 +0000 +++ mozjs52-52.8.1/build/pgo/certs/evintermediate.ca.keyspec 2018-06-08 12:27:06.000000000 +0000 @@ -0,0 +1 @@ +ev diff -Nru mozjs52-52.3.1/build/pgo/certs/evintermediate.certspec mozjs52-52.8.1/build/pgo/certs/evintermediate.certspec --- mozjs52-52.3.1/build/pgo/certs/evintermediate.certspec 1970-01-01 00:00:00.000000000 +0000 +++ mozjs52-52.8.1/build/pgo/certs/evintermediate.certspec 2018-06-08 12:27:06.000000000 +0000 @@ -0,0 +1,7 @@ +issuer:printableString/C=US/ST=CA/L=Mountain View/O=Mozilla - EV debug test CA/OU=Security Engineering/CN=EV Testing (untrustworthy) CA/name=ev-test-ca/emailAddress=charlatan@testing.example.com +subject:printableString/C=US/ST=CA/L=Mountain View/O=Mozilla - EV debug test CA/OU=Security Engineering/CN=EV Testing (untrustworthy) CA/name=ev-test-ca/emailAddress=charlatan@testing.example.com +subjectKey:ev +validity:20100101-20500101 +extension:keyUsage:keyCertSign,cRLSign +extension:basicConstraints:cA, +extension:certificatePolicies:any diff -Nru mozjs52-52.3.1/build/pgo/certs/expired.certspec mozjs52-52.8.1/build/pgo/certs/expired.certspec --- mozjs52-52.3.1/build/pgo/certs/expired.certspec 1970-01-01 00:00:00.000000000 +0000 +++ mozjs52-52.8.1/build/pgo/certs/expired.certspec 2018-06-08 12:27:06.000000000 +0000 @@ -0,0 +1,4 @@ +subject:expired.example.com +issuer:printableString/CN=Temporary Certificate Authority/O=Mozilla Testing/OU=Profile Guided Optimization +extension:subjectAlternativeName:expired.example.com +validity:20100105-20100106 diff -Nru mozjs52-52.3.1/build/pgo/certs/imminently_distrusted.certspec mozjs52-52.8.1/build/pgo/certs/imminently_distrusted.certspec --- mozjs52-52.3.1/build/pgo/certs/imminently_distrusted.certspec 1970-01-01 00:00:00.000000000 +0000 +++ mozjs52-52.8.1/build/pgo/certs/imminently_distrusted.certspec 2018-06-08 12:27:06.000000000 +0000 @@ -0,0 +1,4 @@ +issuer:printableString/CN=Temporary Certificate Authority/O=Mozilla Testing/OU=Profile Guided Optimization +subject:printableString/CN=Imminently Distrusted End Entity +validity:20100101-20500101 +extension:subjectAlternativeName:imminently-distrusted.example.com Binary files /tmp/tmpjn7M6C/31iJlPBASl/mozjs52-52.3.1/build/pgo/certs/key3.db and /tmp/tmpjn7M6C/Ce4QwoDRii/mozjs52-52.8.1/build/pgo/certs/key3.db differ diff -Nru mozjs52-52.3.1/build/pgo/certs/mochitest.certspec mozjs52-52.8.1/build/pgo/certs/mochitest.certspec --- mozjs52-52.3.1/build/pgo/certs/mochitest.certspec 1970-01-01 00:00:00.000000000 +0000 +++ mozjs52-52.8.1/build/pgo/certs/mochitest.certspec 2018-06-08 12:27:06.000000000 +0000 @@ -0,0 +1,3 @@ +subject:Mochitest client +issuer:printableString/CN=Temporary Certificate Authority/O=Mozilla Testing/OU=Profile Guided Optimization +serialNumber:3 Binary files /tmp/tmpjn7M6C/31iJlPBASl/mozjs52-52.3.1/build/pgo/certs/mochitest.client and /tmp/tmpjn7M6C/Ce4QwoDRii/mozjs52-52.8.1/build/pgo/certs/mochitest.client differ diff -Nru mozjs52-52.3.1/build/pgo/certs/mochitest.client.keyspec mozjs52-52.8.1/build/pgo/certs/mochitest.client.keyspec --- mozjs52-52.3.1/build/pgo/certs/mochitest.client.keyspec 1970-01-01 00:00:00.000000000 +0000 +++ mozjs52-52.8.1/build/pgo/certs/mochitest.client.keyspec 2018-06-08 12:27:06.000000000 +0000 @@ -0,0 +1 @@ +default diff -Nru mozjs52-52.3.1/build/pgo/certs/pgoca.ca mozjs52-52.8.1/build/pgo/certs/pgoca.ca --- mozjs52-52.3.1/build/pgo/certs/pgoca.ca 2017-08-08 10:25:46.000000000 +0000 +++ mozjs52-52.8.1/build/pgo/certs/pgoca.ca 2018-06-08 12:27:06.000000000 +0000 @@ -1,15 +1,21 @@ -----BEGIN CERTIFICATE----- -MIICXTCCAcagAwIBAgIBATANBgkqhkiG9w0BAQUFADBqMSQwIgYDVQQLExtQcm9m -aWxlIEd1aWRlZCBPcHRpbWl6YXRpb24xGDAWBgNVBAoTD01vemlsbGEgVGVzdGlu -ZzEoMCYGA1UEAxMfVGVtcG9yYXJ5IENlcnRpZmljYXRlIEF1dGhvcml0eTAeFw0w -ODA1MjIwMDM4MDVaFw0xODA1MjIwMDM4MDVaMGoxJDAiBgNVBAsTG1Byb2ZpbGUg -R3VpZGVkIE9wdGltaXphdGlvbjEYMBYGA1UEChMPTW96aWxsYSBUZXN0aW5nMSgw -JgYDVQQDEx9UZW1wb3JhcnkgQ2VydGlmaWNhdGUgQXV0aG9yaXR5MIGfMA0GCSqG -SIb3DQEBAQUAA4GNADCBiQKBgQDg6iipAXGZYmgTcHfx8M2hcLqmqDalcj7sZ1A7 -a3LiCBb+1uHKKy9hUxRUe61aJF4NgMAF5oc+HpXN0hpvkiNHxqqD7R6hrkP3gAJ3 -eczEFKsFUI6AqaCL0+xpyhaaZmmarcHxU+PL2h5zq6VssxfBAsO0DkzWzk6E8vM+ -jrku7QIDAQABoxMwETAPBgNVHRMECDAGAQH/AgEAMA0GCSqGSIb3DQEBBQUAA4GB -ALPbn3Ztg0m8qDt8Vkf5You6HEqIxZe+ffDTrfq/L7ofHk/OXEpL7OWKRHU33pNG -QS8khBG+sO461C51s6u9giW+eq2PaQv2HGASBpDbvPqc/Hf+zupZsdsXzHv6rt0V -lu5B6nOpMse1nhA494i1ARSuBNzLv5mas38YWG8Rr6jR +MIIDgzCCAmugAwIBAgIUQx5pxD+JMg1qPztfSg1Ucw8xsz0wDQYJKoZIhvcNAQEL +BQAwajEoMCYGA1UEAxMfVGVtcG9yYXJ5IENlcnRpZmljYXRlIEF1dGhvcml0eTEY +MBYGA1UEChMPTW96aWxsYSBUZXN0aW5nMSQwIgYDVQQLExtQcm9maWxlIEd1aWRl +ZCBPcHRpbWl6YXRpb24wIhgPMjAxMDAxMDEwMDAwMDBaGA8yMDUwMDEwMTAwMDAw +MFowajEoMCYGA1UEAxMfVGVtcG9yYXJ5IENlcnRpZmljYXRlIEF1dGhvcml0eTEY +MBYGA1UEChMPTW96aWxsYSBUZXN0aW5nMSQwIgYDVQQLExtQcm9maWxlIEd1aWRl +ZCBPcHRpbWl6YXRpb24wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC6 +iFGoRI4W1kH9braIBjYQPTwT2erkNUq07PVoV2wke8HHJajg2B+9sZwGm24ahvJr +4q9adWtqZHEIeqVap0WH9xzVJJwCfs1D/B5p0DggKZOrIMNJ5Nu5TMJrbA7tFYIP +8X6taRqx0wI6iypB7qdw4A8Njf1mCyuwJJKkfbmIYXmQsVeQPdI7xeC4SB+oN9OI +Q+8nFthVt2Zaqn4CkC86exCABiTMHGyXrZZhW7filhLAdTGjDJHdtMr3/K0dJdMJ +77kXDqdo4bN7LyJvaeO0ipVhHe4m1iWdq5EITjbLHCQELL8Wiy/l8Y+ZFzG4s/5J +I/pyUcQx1QOs2hgKNe2NAgMBAAGjHTAbMAsGA1UdDwQEAwIBBjAMBgNVHRMEBTAD +AQH/MA0GCSqGSIb3DQEBCwUAA4IBAQAYFnzom5ROuxDR3WFQatxHs5ekni4uUbEx +6pN8fOzcsllEfCwvmMLVCh36ffSguf/UlmR5Hq1s/S7iMiic5mnK4aaVwixzS4Z3 +ug7Dc+fG7j0VOcBTKWU983xUK/1F409ghQ5KlO38KA7hyx1kzjYjzvxLaweDXRqr +J/RZ1ACP2fKNziEOCbXzzzEx39oc17NBV+LotPFzKZ+pcxMDrtiNts4hwCw/UUw7 +Gp0tKte2CevGJbzjPHP3/6FUzHfOatZSpxEmvAcSTDp5sjdVuOStx4v6jVrwvyAz +VQzDPzaRWh3NtY5JNasrhExr5qxQlygfBngCMgZ9gESG9FvLG+sx -----END CERTIFICATE----- diff -Nru mozjs52-52.3.1/build/pgo/certs/pgoca.ca.keyspec mozjs52-52.8.1/build/pgo/certs/pgoca.ca.keyspec --- mozjs52-52.3.1/build/pgo/certs/pgoca.ca.keyspec 1970-01-01 00:00:00.000000000 +0000 +++ mozjs52-52.8.1/build/pgo/certs/pgoca.ca.keyspec 2018-06-08 12:27:06.000000000 +0000 @@ -0,0 +1 @@ +default diff -Nru mozjs52-52.3.1/build/pgo/certs/pgoca.certspec mozjs52-52.8.1/build/pgo/certs/pgoca.certspec --- mozjs52-52.3.1/build/pgo/certs/pgoca.certspec 1970-01-01 00:00:00.000000000 +0000 +++ mozjs52-52.8.1/build/pgo/certs/pgoca.certspec 2018-06-08 12:27:06.000000000 +0000 @@ -0,0 +1,5 @@ +issuer:printableString/CN=Temporary Certificate Authority/O=Mozilla Testing/OU=Profile Guided Optimization +subject:printableString/CN=Temporary Certificate Authority/O=Mozilla Testing/OU=Profile Guided Optimization +validity:20100101-20500101 +extension:keyUsage:keyCertSign,cRLSign +extension:basicConstraints:cA, Binary files /tmp/tmpjn7M6C/31iJlPBASl/mozjs52-52.3.1/build/pgo/certs/pgoca.p12 and /tmp/tmpjn7M6C/Ce4QwoDRii/mozjs52-52.8.1/build/pgo/certs/pgoca.p12 differ diff -Nru mozjs52-52.3.1/build/pgo/certs/pkcs11.txt mozjs52-52.8.1/build/pgo/certs/pkcs11.txt --- mozjs52-52.3.1/build/pgo/certs/pkcs11.txt 1970-01-01 00:00:00.000000000 +0000 +++ mozjs52-52.8.1/build/pgo/certs/pkcs11.txt 2018-06-08 12:27:06.000000000 +0000 @@ -0,0 +1,5 @@ +library= +name=NSS Internal PKCS #11 Module +parameters=configdir='/Users/jcjones/hg/mozilla-central/build/pgo/certs' certPrefix='' keyPrefix='' secmod='secmod.db' flags= updatedir='' updateCertPrefix='' updateKeyPrefix='' updateid='' updateTokenDescription='' +NSS=Flags=internal,critical trustOrder=75 cipherOrder=100 slotParams=(1={slotFlags=[ECC,RSA,DSA,DH,RC2,RC4,DES,RANDOM,SHA1,MD5,MD2,SSL,TLS,AES,Camellia,SEED,SHA256,SHA512] askpw=any timeout=30}) + diff -Nru mozjs52-52.3.1/build/pgo/certs/README mozjs52-52.8.1/build/pgo/certs/README --- mozjs52-52.3.1/build/pgo/certs/README 2017-08-08 10:25:46.000000000 +0000 +++ mozjs52-52.8.1/build/pgo/certs/README 2018-06-08 12:27:06.000000000 +0000 @@ -1,9 +1,31 @@ -The certificate authority and server certificates here are generated by $topsrcdir/build/pgo/genpgocert.py. +The certificate authority and server certificates here are generated by +$topsrcdir/build/pgo/genpgocert.py. -You can generate a new CA cert by running: -$objdir/_virtualenv/bin/python $topsrcdir/build/pgo/genpgocert.py --gen-ca +You can regenerate the certificates by running: ./mach python +build/pgo/genpgocert.py -You can generate new server certificates by running: -$objdir/_virtualenv/bin/python $topsrcdir/build/pgo/genpgocert.py --gen-server +To add a new CA, add a ${cert_name}.ca.keyspec as well as a corresponding +${cert_name}.certspec to this folder. -These will place the new files in this directory where you can commit them. +To add new server certificates, add a ${cert_name}.certspec file to this folder. +If it needs a non-default private key, add a corresponding +${cert_name}.server.keyspec. + +For new client certificates, add a ${cert_name}.client.keyspec and corresponding +${cert_name}.certspec. + +The naming convention here is because the generated ".client" and ".ca" PEM +files need to be copied into this folder for Mochitests' runtests.py to import. + +These commands will modify cert9.db and key4.db. The changes to these should be +committed. + +Specific notes for certs: + + dynamicPinningGood: Changing this keyspec will require changing + browser/base/content/test/general/pinning_headers.sjs . You can obtain a new + valid pin via: + + certutil -L -d . -n dynamicPinningGood -r | openssl x509 -inform der -pubkey \ + -noout | openssl pkey -pubin -outform der | openssl dgst -sha256 -binary \ + | openssl enc -base64 Binary files /tmp/tmpjn7M6C/31iJlPBASl/mozjs52-52.3.1/build/pgo/certs/secmod.db and /tmp/tmpjn7M6C/Ce4QwoDRii/mozjs52-52.8.1/build/pgo/certs/secmod.db differ diff -Nru mozjs52-52.3.1/build/pgo/certs/selfsigned.certspec mozjs52-52.8.1/build/pgo/certs/selfsigned.certspec --- mozjs52-52.3.1/build/pgo/certs/selfsigned.certspec 1970-01-01 00:00:00.000000000 +0000 +++ mozjs52-52.8.1/build/pgo/certs/selfsigned.certspec 2018-06-08 12:27:06.000000000 +0000 @@ -0,0 +1,3 @@ +issuer:self-signed.example.com +subject:self-signed.example.com +extension:subjectAlternativeName:self-signed.example.com diff -Nru mozjs52-52.3.1/build/pgo/certs/sha1_end_entity.certspec mozjs52-52.8.1/build/pgo/certs/sha1_end_entity.certspec --- mozjs52-52.3.1/build/pgo/certs/sha1_end_entity.certspec 1970-01-01 00:00:00.000000000 +0000 +++ mozjs52-52.8.1/build/pgo/certs/sha1_end_entity.certspec 2018-06-08 12:27:06.000000000 +0000 @@ -0,0 +1,4 @@ +subject:sha1ee.example.com +issuer:printableString/CN=Temporary Certificate Authority/O=Mozilla Testing/OU=Profile Guided Optimization +extension:subjectAlternativeName:sha1ee.example.com +signature:sha1WithRSAEncryption diff -Nru mozjs52-52.3.1/build/pgo/certs/sha256_end_entity.certspec mozjs52-52.8.1/build/pgo/certs/sha256_end_entity.certspec --- mozjs52-52.3.1/build/pgo/certs/sha256_end_entity.certspec 1970-01-01 00:00:00.000000000 +0000 +++ mozjs52-52.8.1/build/pgo/certs/sha256_end_entity.certspec 2018-06-08 12:27:06.000000000 +0000 @@ -0,0 +1,4 @@ +subject:sha256ee.example.com +issuer:printableString/CN=Temporary Certificate Authority/O=Mozilla Testing/OU=Profile Guided Optimization +extension:subjectAlternativeName:sha256ee.example.com +signature:sha256WithRSAEncryption diff -Nru mozjs52-52.3.1/build/pgo/certs/staticPinningBad.certspec mozjs52-52.8.1/build/pgo/certs/staticPinningBad.certspec --- mozjs52-52.3.1/build/pgo/certs/staticPinningBad.certspec 1970-01-01 00:00:00.000000000 +0000 +++ mozjs52-52.8.1/build/pgo/certs/staticPinningBad.certspec 2018-06-08 12:27:06.000000000 +0000 @@ -0,0 +1,5 @@ +subject:include-subdomains.pinning.example.com +issuer:Alternate Trusted Authority +extension:subjectAlternativeName:include-subdomains.pinning.example.com +subjectKey:alternate +issuerKey:alternate diff -Nru mozjs52-52.3.1/build/pgo/certs/staticPinningBad.server.keyspec mozjs52-52.8.1/build/pgo/certs/staticPinningBad.server.keyspec --- mozjs52-52.3.1/build/pgo/certs/staticPinningBad.server.keyspec 1970-01-01 00:00:00.000000000 +0000 +++ mozjs52-52.8.1/build/pgo/certs/staticPinningBad.server.keyspec 2018-06-08 12:27:06.000000000 +0000 @@ -0,0 +1 @@ +alternate diff -Nru mozjs52-52.3.1/build/pgo/certs/unknown_ca.certspec mozjs52-52.8.1/build/pgo/certs/unknown_ca.certspec --- mozjs52-52.3.1/build/pgo/certs/unknown_ca.certspec 1970-01-01 00:00:00.000000000 +0000 +++ mozjs52-52.8.1/build/pgo/certs/unknown_ca.certspec 2018-06-08 12:27:06.000000000 +0000 @@ -0,0 +1,5 @@ +issuer:Unknown CA +subject:Unknown CA +validity:20100101-20500101 +extension:keyUsage:keyCertSign,cRLSign +extension:basicConstraints:cA, diff -Nru mozjs52-52.3.1/build/pgo/certs/untrustedandexpired.certspec mozjs52-52.8.1/build/pgo/certs/untrustedandexpired.certspec --- mozjs52-52.3.1/build/pgo/certs/untrustedandexpired.certspec 1970-01-01 00:00:00.000000000 +0000 +++ mozjs52-52.8.1/build/pgo/certs/untrustedandexpired.certspec 2018-06-08 12:27:06.000000000 +0000 @@ -0,0 +1,4 @@ +subject:untrusted-expired.example.com +issuer:Unknown CA +extension:subjectAlternativeName:untrusted-expired.example.com +validity:20121012-20121012 diff -Nru mozjs52-52.3.1/build/pgo/certs/untrusted.certspec mozjs52-52.8.1/build/pgo/certs/untrusted.certspec --- mozjs52-52.3.1/build/pgo/certs/untrusted.certspec 1970-01-01 00:00:00.000000000 +0000 +++ mozjs52-52.8.1/build/pgo/certs/untrusted.certspec 2018-06-08 12:27:06.000000000 +0000 @@ -0,0 +1,3 @@ +subject:untrusted.example.com +issuer:Unknown CA +extension:subjectAlternativeName:untrusted.example.com diff -Nru mozjs52-52.3.1/build/pgo/genpgocert.py mozjs52-52.8.1/build/pgo/genpgocert.py --- mozjs52-52.3.1/build/pgo/genpgocert.py 2017-08-08 10:25:46.000000000 +0000 +++ mozjs52-52.8.1/build/pgo/genpgocert.py 2018-06-08 12:27:06.000000000 +0000 @@ -15,9 +15,10 @@ import subprocess import sys import tempfile +import distutils from mozbuild.base import MozbuildObject -from mozfile import NamedTemporaryFile +from mozfile import NamedTemporaryFile, TemporaryDirectory from mozprofile.permissions import ServerLocations dbFiles = [ @@ -41,8 +42,7 @@ return True return False - -def runUtil(util, args, inputdata = None): +def runUtil(util, args, inputdata = None, outputstream = None): env = os.environ.copy() if mozinfo.os == "linux": pathvar = "LD_LIBRARY_PATH" @@ -52,141 +52,132 @@ else: env[pathvar] = app_path proc = subprocess.Popen([util] + args, env=env, - stdin=subprocess.PIPE if inputdata else None) + stdin=subprocess.PIPE if inputdata else None, + stdout=outputstream) proc.communicate(inputdata) return proc.returncode - def createRandomFile(randomFile): for count in xrange(0, 2048): randomFile.write(chr(random.randint(0, 255))) +def writeCertspecForServerLocations(fd): + locations = ServerLocations(os.path.join(build.topsrcdir, + "build", "pgo", + "server-locations.txt")) + SAN=[] + for loc in [i for i in iter(locations) if i.scheme == "https" and "nocert" not in i.options]: + customCertOption = False + customCertRE = re.compile("^cert=(?:\w+)") + for _ in [i for i in loc.options if customCertRE.match(i)]: + customCertOption = True + break + + if not customCertOption: + SAN.append(loc.host) + + fd.write("issuer:printableString/CN=Temporary Certificate Authority/O=Mozilla Testing/OU=Profile Guided Optimization\n") + fd.write("subject:{}\n".format(SAN[0])) + fd.write("extension:subjectAlternativeName:{}\n".format(",".join(SAN))) -def createCertificateAuthority(build, srcDir): +def constructCertDatabase(build, srcDir): certutil = build.get_binary_path(what="certutil") pk12util = build.get_binary_path(what="pk12util") + openssl = distutils.spawn.find_executable("openssl") + pycert = os.path.join(build.topsrcdir, "security", "manager", "ssl", "tests", + "unit", "pycert.py") + pykey = os.path.join(build.topsrcdir, "security", "manager", "ssl", "tests", + "unit", "pykey.py") - #TODO: mozfile.TemporaryDirectory - tempDbDir = tempfile.mkdtemp() - with NamedTemporaryFile() as pwfile, NamedTemporaryFile() as rndfile: - pgoCAModulePathSrc = os.path.join(srcDir, "pgoca.p12") - pgoCAPathSrc = os.path.join(srcDir, "pgoca.ca") - - pwfile.write("\n") - - # Create temporary certification database for CA generation - status = runUtil(certutil, ["-N", "-d", tempDbDir, "-f", pwfile.name]) - if status: - return status - - createRandomFile(rndfile) - status = runUtil(certutil, ["-S", "-d", tempDbDir, "-s", "CN=Temporary Certificate Authority, O=Mozilla Testing, OU=Profile Guided Optimization", "-t", "C,,", "-x", "-m", "1", "-v", "120", "-n", "pgo temporary ca", "-2", "-f", pwfile.name, "-z", rndfile.name], "Y\n0\nN\n") - if status: - return status - - status = runUtil(certutil, ["-L", "-d", tempDbDir, "-n", "pgo temporary ca", "-a", "-o", pgoCAPathSrc, "-f", pwfile.name]) - if status: - return status - - status = runUtil(pk12util, ["-o", pgoCAModulePathSrc, "-n", "pgo temporary ca", "-d", tempDbDir, "-w", pwfile.name, "-k", pwfile.name]) - if status: - return status - - shutil.rmtree(tempDbDir) - return 0 - - -def createSSLServerCertificate(build, srcDir): - certutil = build.get_binary_path(what="certutil") - pk12util = build.get_binary_path(what="pk12util") - with NamedTemporaryFile() as pwfile, NamedTemporaryFile() as rndfile: + with NamedTemporaryFile() as pwfile, NamedTemporaryFile() as rndfile, TemporaryDirectory() as pemfolder: pgoCAPath = os.path.join(srcDir, "pgoca.p12") pwfile.write("\n") + pwfile.flush() - if not dbFilesExist(srcDir): + if dbFilesExist(srcDir): # Make sure all DB files from src are really deleted unlinkDbFiles(srcDir) - # Create certification database for ssltunnel - status = runUtil(certutil, ["-N", "-d", srcDir, "-f", pwfile.name]) - if status: - return status - - status = runUtil(pk12util, ["-i", pgoCAPath, "-w", pwfile.name, "-d", srcDir, "-k", pwfile.name]) - if status: - return status - - # Generate automatic certificate - locations = ServerLocations(os.path.join(build.topsrcdir, - "build", "pgo", - "server-locations.txt")) - iterator = iter(locations) - - # Skips the first entry, I don't know why: bug 879740 - iterator.next() - - locationsParam = "" - firstLocation = "" - for loc in iterator: - if loc.scheme == "https" and "nocert" not in loc.options: - customCertOption = False - customCertRE = re.compile("^cert=(?:\w+)") - for option in loc.options: - match = customCertRE.match(option) - if match: - customCertOption = True - break - - if not customCertOption: - if len(locationsParam) > 0: - locationsParam += "," - locationsParam += loc.host - - if firstLocation == "": - firstLocation = loc.host - - if not firstLocation: - print "Nothing to generate, no automatic secure hosts specified" - else: - createRandomFile(rndfile) - - runUtil(certutil, ["-D", "-n", "pgo server certificate", "-d", srcDir, "-z", rndfile.name, "-f", pwfile.name]) - # Ignore the result, the certificate may not be present when new database is being built - - status = runUtil(certutil, ["-S", "-s", "CN=%s" % firstLocation, "-t", "Pu,,", "-c", "pgo temporary ca", "-m", "2", "-8", locationsParam, "-v", "120", "-n", "pgo server certificate", "-d", srcDir, "-z", rndfile.name, "-f", pwfile.name]) - if status: - return status + # Copy all .certspec and .keyspec files to a temporary directory + for root, dirs, files in os.walk(srcDir): + for spec in [i for i in files if i.endswith(".certspec") or i.endswith(".keyspec")]: + shutil.copyfile(os.path.join(root, spec), os.path.join(pemfolder, spec)) + + # Write a certspec for the "server-locations.txt" file to that temporary directory + pgoserver_certspec = os.path.join(pemfolder, "pgoserver.certspec") + if os.path.exists(pgoserver_certspec): + raise Exception("{} already exists, which isn't allowed".format(pgoserver_certspec)) + with open(pgoserver_certspec, "w") as fd: + writeCertspecForServerLocations(fd) + + # Generate certs for all certspecs + for root, dirs, files in os.walk(pemfolder): + for certspec in [i for i in files if i.endswith(".certspec")]: + name = certspec.split(".certspec")[0] + pem = os.path.join(pemfolder, "{}.cert.pem".format(name)) + + print("Generating public certificate {} (pem={})".format(name, pem)) + + with open(os.path.join(root, certspec), "r") as certspec_file: + certspec_data = certspec_file.read() + with open(pem, "w") as pem_file: + status = runUtil(pycert, [], inputdata=certspec_data, outputstream=pem_file) + if status: + return status + + status = runUtil(certutil, ["-A", "-n", name, "-t", "P,,", "-i", pem, "-d", "dbm:"+srcDir, "-f", pwfile.name]) + if status: + return status + + + for keyspec in [i for i in files if i.endswith(".keyspec")]: + parts = keyspec.split(".") + name = parts[0] + key_type = parts[1] + if key_type not in ["ca", "client", "server"]: + raise Exception("{}: keyspec filenames must be of the form XXX.client.keyspec or XXX.ca.keyspec (key_type={})".format(keyspec, key_type)) + key_pem = os.path.join(pemfolder, "{}.key.pem".format(name)) + + print("Generating private key {} (pem={})".format(name, key_pem)) + + with open(os.path.join(root, keyspec), "r") as keyspec_file: + keyspec_data = keyspec_file.read() + with open(key_pem, "w") as pem_file: + status = runUtil(pykey, [], inputdata=keyspec_data, outputstream=pem_file) + if status: + return status + + cert_pem = os.path.join(pemfolder, "{}.cert.pem".format(name)) + if not os.path.exists(cert_pem): + raise Exception("There has to be a corresponding certificate named {} for the keyspec {}".format(cert_pem, keyspec)) + + p12 = os.path.join(pemfolder, "{}.key.p12".format(name)) + print("Converting private key {} to PKCS12 (p12={})".format(key_pem, p12)) + status = runUtil(openssl, ["pkcs12", "-export", "-inkey", key_pem, "-in", cert_pem, "-name", name, "-out", p12, "-passout", "file:"+pwfile.name]) + if status: + return status + + print("Importing private key {} to database".format(key_pem)) + status = runUtil(pk12util, ["-i", p12, "-d", "dbm:"+srcDir, "-w", pwfile.name, "-k", pwfile.name]) + if status: + return status + + if key_type == "ca": + shutil.copyfile(cert_pem, os.path.join(srcDir, "{}.ca".format(name))) + elif key_type == "client": + shutil.copyfile(p12, os.path.join(srcDir, "{}.client".format(name))) + elif key_type == "server": + pass # Nothing to do for server keys + else: + raise Exception("State error: Unknown keyspec key_type: {}".format(key_type)) return 0 -if len(sys.argv) == 1: - print "Specify --gen-server or --gen-ca" - sys.exit(1) - build = MozbuildObject.from_environment() certdir = os.path.join(build.topsrcdir, "build", "pgo", "certs") -if sys.argv[1] == "--gen-server": - certificateStatus = createSSLServerCertificate(build, certdir) - if certificateStatus: - print "TEST-UNEXPECTED-FAIL | SSL Server Certificate generation" - - sys.exit(certificateStatus) - -if sys.argv[1] == "--gen-ca": - certificateStatus = createCertificateAuthority(build, certdir) - if certificateStatus: - print "TEST-UNEXPECTED-FAIL | Certificate Authority generation" - else: - print "\n\n" - print "===================================================" - print " IMPORTANT:" - print " To use this new certificate authority in tests" - print " run 'make' at testing/mochitest" - print "===================================================" - - sys.exit(certificateStatus) - -print "Invalid option specified" -sys.exit(1) +certificateStatus = constructCertDatabase(build, certdir) +if certificateStatus: + print "TEST-UNEXPECTED-FAIL | SSL Server Certificate generation" +sys.exit(certificateStatus) Binary files /tmp/tmpjn7M6C/31iJlPBASl/mozjs52-52.3.1/config/external/icu/data/icudt58l.dat and /tmp/tmpjn7M6C/Ce4QwoDRii/mozjs52-52.8.1/config/external/icu/data/icudt58l.dat differ diff -Nru mozjs52-52.3.1/config/external/nss/nss.symbols mozjs52-52.8.1/config/external/nss/nss.symbols --- mozjs52-52.3.1/config/external/nss/nss.symbols 2017-08-08 10:25:46.000000000 +0000 +++ mozjs52-52.8.1/config/external/nss/nss.symbols 2018-06-08 12:27:06.000000000 +0000 @@ -185,6 +185,7 @@ NSSBase64_EncodeItem NSSBase64_EncodeItem_Util NSS_CMSContentInfo_GetContent +NSS_CMSContentInfo_GetContentTypeTag NSS_CMSContentInfo_SetContent_Data NSS_CMSContentInfo_SetContent_EnvelopedData NSS_CMSContentInfo_SetContent_SignedData diff -Nru mozjs52-52.3.1/config/milestone.txt mozjs52-52.8.1/config/milestone.txt --- mozjs52-52.3.1/config/milestone.txt 2017-08-08 10:25:46.000000000 +0000 +++ mozjs52-52.8.1/config/milestone.txt 2018-06-11 16:38:18.000000000 +0000 @@ -10,4 +10,4 @@ # hardcoded milestones in the tree from these two files. #-------------------------------------------------------- -52.3.1 +52.8.1 diff -Nru mozjs52-52.3.1/debian/changelog mozjs52-52.8.1/debian/changelog --- mozjs52-52.3.1/debian/changelog 2017-10-27 07:29:25.000000000 +0000 +++ mozjs52-52.8.1/debian/changelog 2018-06-11 17:00:08.000000000 +0000 @@ -1,3 +1,35 @@ +mozjs52 (52.8.1-0ubuntu0.18.04.1) bionic-security; urgency=medium + + * SECURITY UPDATE: Multiple memory safety issues + - CVE-2017-7810, CVE-2017-7826, CVE-2018-5089, CVE-2018-5125, + CVE-2018-5150 + + * Update to 52.8.1esr + * Drop patches that are fixed upstream + - remove debian/patches/remove-nspr-dependency.patch + - remove debian/patches/tests-skip-on-all-64-bit-archs.patch + - update debian/patches/series + * Refresh patches + - update debian/patches/include-configure-script.patch - the + configure script is included in the tarball now. This patch should + probably be renamed to something more appropriate + - update debian/patches/pre-generate-old-configure.patch - a pre-generated + old-configure script is included in the tarball now, although the one + generated by js/src/make-source-package.sh includes the wrong aclocal.m4 + and doesn't work, so regenerate it again with the correct aclocal.m4 + * Move pre-generate-old-configure.patch to after + Allow-to-override-ICU_DATA_FILE-from-the-environment.patch and drop + Patch-pregenerated-old-configure-to-match-build-autoconf-.patch + - update debian/patches/series + - remove debian/patches/Patch-pregenerated-old-configure-to-match-build-autoconf-.patch + - update debian/patches/pre-generate-old-configure.patch to refresh old-configure + * Don't build-depend on libicu-dev - the bundled ICU is used and the + distro ICU package ships the layout engine API since 60.2, which + causes intl/icu_sources_data.py to fail due to source files excluded from + the Mozilla source + + -- Chris Coulson Mon, 11 Jun 2018 18:00:08 +0100 + mozjs52 (52.3.1-7fakesync1) bionic; urgency=medium * Fake sync due to mismatching orig tarball. diff -Nru mozjs52-52.3.1/debian/control mozjs52-52.8.1/debian/control --- mozjs52-52.3.1/debian/control 2017-10-27 07:29:25.000000000 +0000 +++ mozjs52-52.8.1/debian/control 2018-06-11 17:00:08.000000000 +0000 @@ -1,5 +1,5 @@ # This file is autogenerated. DO NOT EDIT! -# +# # Modifications should be made to debian/control.in instead. # This file is regenerated automatically in the clean target. Source: mozjs52 @@ -7,11 +7,10 @@ Priority: optional Maintainer: Ubuntu Developers XSBC-Original-Maintainer: Debian GNOME Maintainers -Uploaders: Iain Lane , Jeremy Bicha +Uploaders: Iain Lane , Jeremy Bicha , Tim Lunn Build-Depends: debhelper (>= 10), gnome-pkg-tools, autoconf2.13, - libicu-dev, libreadline-dev, zlib1g-dev (>= 1:1.2.3), pkg-config, diff -Nru mozjs52-52.3.1/debian/control.in mozjs52-52.8.1/debian/control.in --- mozjs52-52.3.1/debian/control.in 2017-10-27 07:29:25.000000000 +0000 +++ mozjs52-52.8.1/debian/control.in 2018-06-11 17:00:08.000000000 +0000 @@ -7,7 +7,6 @@ Build-Depends: debhelper (>= 10), gnome-pkg-tools, autoconf2.13, - libicu-dev, libreadline-dev, zlib1g-dev (>= 1:1.2.3), pkg-config, diff -Nru mozjs52-52.3.1/debian/patches/include-configure-script.patch mozjs52-52.8.1/debian/patches/include-configure-script.patch --- mozjs52-52.3.1/debian/patches/include-configure-script.patch 2017-10-20 17:12:58.000000000 +0000 +++ mozjs52-52.8.1/debian/patches/include-configure-script.patch 2018-06-11 17:00:08.000000000 +0000 @@ -14,21 +14,6 @@ 3 files changed, 15 insertions(+), 2 deletions(-) create mode 100755 js/src/configure -diff --git a/js/src/configure b/js/src/configure -new file mode 100755 -index 0000000..f1ef8c4 ---- /dev/null -+++ b/js/src/configure -@@ -0,0 +1,9 @@ -+#!/bin/sh -+ -+SRCDIR=$(dirname $0) -+TOPSRCDIR="$SRCDIR"/../.. -+export OLD_CONFIGURE="$SRCDIR"/old-configure -+ -+set -- "$@" --enable-project=js -+ -+which python2.7 > /dev/null && exec python2.7 "$TOPSRCDIR/configure.py" "$@" || exec python "$TOPSRCDIR/configure.py" "$@" diff --git a/python/mozbuild/mozbuild/configure/__init__.py b/python/mozbuild/mozbuild/configure/__init__.py index 0fe640c..09b460d 100644 --- a/python/mozbuild/mozbuild/configure/__init__.py diff -Nru mozjs52-52.3.1/debian/patches/Patch-pregenerated-old-configure-to-match-build-autoconf-.patch mozjs52-52.8.1/debian/patches/Patch-pregenerated-old-configure-to-match-build-autoconf-.patch --- mozjs52-52.3.1/debian/patches/Patch-pregenerated-old-configure-to-match-build-autoconf-.patch 2017-10-20 17:12:58.000000000 +0000 +++ mozjs52-52.8.1/debian/patches/Patch-pregenerated-old-configure-to-match-build-autoconf-.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,23 +0,0 @@ -From: Simon McVittie -Date: Mon, 9 Oct 2017 10:18:53 +0100 -Subject: Patch pregenerated old-configure to match build/autoconf/icu.m4 - ---- - js/src/old-configure | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/js/src/old-configure b/js/src/old-configure -index de0f877..320d515 100644 ---- a/js/src/old-configure -+++ b/js/src/old-configure -@@ -9831,7 +9831,9 @@ if test -n "$USE_ICU"; then - # TODO: the l is actually endian-dependent - # We could make this set as 'l' or 'b' for little or big, respectively, - # but we'd need to check in a big-endian version of the file. -- ICU_DATA_FILE="icudt${version}l.dat" -+ if test -z "$ICU_DATA_FILE"; then -+ ICU_DATA_FILE="icudt${version}l.dat" -+ fi - - if test -z "$JS_STANDALONE" -a -z "$MOZ_SYSTEM_ICU" -a "$OS_TARGET" != WINNT -a "$MOZ_WIDGET_TOOLKIT" != "android"; then - MOZ_ICU_DATA_ARCHIVE=1 diff -Nru mozjs52-52.3.1/debian/patches/pre-generate-old-configure.patch mozjs52-52.8.1/debian/patches/pre-generate-old-configure.patch --- mozjs52-52.3.1/debian/patches/pre-generate-old-configure.patch 2017-10-20 17:12:58.000000000 +0000 +++ mozjs52-52.8.1/debian/patches/pre-generate-old-configure.patch 2018-06-11 17:00:08.000000000 +0000 @@ -17,11 +17,9 @@ 3 files changed, 10951 insertions(+) create mode 100644 js/src/old-configure -diff --git a/build/moz.configure/old.configure b/build/moz.configure/old.configure -index b32c3f7..3febf71 100644 --- a/build/moz.configure/old.configure +++ b/build/moz.configure/old.configure -@@ -98,6 +98,9 @@ def prepare_configure(old_configure, mozconfig, autoconf, build_env, shell, +@@ -98,6 +98,9 @@ else: refresh = False @@ -31,11 +29,10 @@ if refresh: log.info('Refreshing %s with %s', old_configure, autoconf) script = subprocess.check_output([ -diff --git a/js/src/configure b/js/src/configure -index f1ef8c4..a1d952e 100755 --- a/js/src/configure +++ b/js/src/configure -@@ -1,5 +1,7 @@ +@@ -18,6 +18,8 @@ + : "divert(0)dnl" #!/bin/sh +touch $0 # this is a git checkout, mtimes are not reliable @@ -43,10955 +40,519 @@ SRCDIR=$(dirname $0) TOPSRCDIR="$SRCDIR"/../.. export OLD_CONFIGURE="$SRCDIR"/old-configure -diff --git a/js/src/old-configure b/js/src/old-configure -new file mode 100644 -index 0000000..de0f877 ---- /dev/null +--- a/js/src/old-configure +++ b/js/src/old-configure -@@ -0,0 +1,10946 @@ -+#! /bin/sh -+ -+if test `uname -s | grep -c MINGW 2>/dev/null` != "0"; then -+ msyshost=1 -+fi -+ -+. ./old-configure.vars -+ -+# 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 -+ --enable-release Build with more conservative, release engineering-oriented options. -+ This may slow down builds." -+ac_help="$ac_help -+ --with-android-cxx-stl=VALUE -+ use the specified C++ STL (libstdc++, libc++)" -+ac_help="$ac_help -+ --with-ios-sdk=TYPE -+ Type of iOS SDK to use (iphonesimulator, iphoneos) -+ and optionally version (like iphoneos8.2)" -+ac_help="$ac_help -+ --enable-ios-target=VER (default=8.0) -+ Set the minimum iOS version needed at runtime" -+ac_help="$ac_help -+ --with-macos-sdk=dir Location of platform SDK to use (Mac OS X only)" -+ac_help="$ac_help -+ --with-x use the X Window System" -+ac_help="$ac_help -+ --with-arch=[[type|toolchain-default]] -+ Use specific CPU features (-march=type). Resets -+ thumb, fpu, float-abi, etc. defaults when set" -+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-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 -+ --enable-address-sanitizer Enable Address Sanitizer (default=no)" -+ac_help="$ac_help -+ --enable-memory-sanitizer Enable Memory Sanitizer (default=no)" -+ac_help="$ac_help -+ --enable-thread-sanitizer Enable Thread Sanitizer (default=no)" -+ac_help="$ac_help -+ --enable-llvm-hacks Enable workarounds required for several LLVM instrumentations (default=no)" -+ac_help="$ac_help -+ --disable-ion Disable use of the IonMonkey JIT" -+ac_help="$ac_help -+ --with-debug-label=LABELS -+ Define DEBUG_ for each comma-separated -+ value given." -+ac_help="$ac_help -+ --enable-cpp-rtti Enable C++ RTTI " -+ac_help="$ac_help -+ --enable-gold Enable GNU Gold Linker when it is not already the default" -+ac_help="$ac_help -+ --disable-icf Disable Identical Code Folding" -+ac_help="$ac_help -+ --enable-pie Enable Position Independent Executables" -+ac_help="$ac_help -+ --enable-dtrace build with dtrace support if available (default=no)" -+ac_help="$ac_help -+ --with-pthreads Force use of system pthread library with NSPR " -+ac_help="$ac_help -+ --with-nspr-cflags=FLAGS -+ Pass FLAGS to CC when building code that uses NSPR. -+ Use this when there's no accurate nspr-config -+ script available. This is the case when building -+ SpiderMonkey as part of the Mozilla tree: the -+ top-level configure script computes NSPR flags -+ that accomodate the quirks of that environment." -+ac_help="$ac_help -+ --with-nspr-libs=LIBS Pass LIBS to LD when linking code that uses NSPR. -+ See --with-nspr-cflags for more details." -+ac_help="$ac_help -+ --enable-nspr-build Build NSPR from source tree" -+ac_help="$ac_help -+ --with-system-nspr Use an NSPR that is already built and installed. -+ Use the 'nspr-config' script in the current path, -+ or look for the script in the directories given with -+ --with-nspr-exec-prefix or --with-nspr-prefix. -+ (Those flags are only checked if you specify -+ --with-system-nspr.)" -+ac_help="$ac_help -+ --enable-posix-nspr-emulation -+ Enable emulation of NSPR for POSIX systems" -+ac_help="$ac_help -+ --with-nspr-prefix=PFX Prefix where NSPR is installed" -+ac_help="$ac_help -+ --with-nspr-exec-prefix=PFX -+ Exec prefix where NSPR is installed" -+ac_help="$ac_help -+ --with-system-zlib[=PFX] -+ Use system libz [installed at prefix PFX]" -+ac_help="$ac_help -+ --enable-ui-locale=ab-CD -+ Select the user interface locale (default: en-US)" -+ac_help="$ac_help -+ --disable-optimize Disable compiler optimization -+ --enable-optimize=[OPT] Specify compiler optimization flags [OPT=-O]" -+ac_help="$ac_help -+ --disable-trace-logging Disable trace logging" -+ac_help="$ac_help -+ --enable-small-chunk-size Allocate memory for JS GC things in smaller chunks" -+ac_help="$ac_help -+ --enable-valgrind Enable Valgrind integration hooks (default=no)" -+ac_help="$ac_help -+ --enable-simulator=ARCH -+ Enable a JIT code simulator for the specified arch. -+ (arm, arm64, mips32, mips64)." -+ac_help="$ac_help -+ --enable-jitspew Enable the Jit spew and IONFLAGS." -+ac_help="$ac_help -+ --enable-gczeal Enable zealous GCing" -+ac_help="$ac_help -+ --enable-oom-breakpoint -+ Enable a breakpoint function for artificial OOMs" -+ac_help="$ac_help -+ --enable-clang-plugin Enable building with the mozilla clang plugin " -+ac_help="$ac_help -+ --with-sixgill=path/to/sixgill -+ Enable static checking of code using sixgill" -+ac_help="$ac_help -+ --enable-strip Enable stripping of libs & executables " -+ac_help="$ac_help -+ --enable-install-strip Enable stripping of libs & executables when packaging " -+ac_help="$ac_help -+ --jitreport-granularity=N -+ Default granularity at which to report JIT code -+ to external tools -+ 0 - no info -+ 1 - code ranges for whole functions only -+ 2 - per-line information -+ 3 - per-op information" -+ac_help="$ac_help -+ --enable-readline Link js shell to system readline library" -+ac_help="$ac_help -+ --with-qemu-exe=path Use path as an arm emulator on host platforms" -+ac_help="$ac_help -+ --with-cross-lib=dir Use dir as the location for arm libraries" -+ac_help="$ac_help -+ --with-system-icu -+ Use system ICU (located with pkgconfig)" -+ac_help="$ac_help -+ --with-intl-api, --with-intl-api=build, --without-intl-api -+ Determine the status of the ECMAScript Internationalization API. The first -+ (or lack of any of these) builds and exposes the API. The second builds it -+ but doesn't use ICU or expose the API to script. The third doesn't build -+ ICU at all." -+ -+# 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; echo "configure: error: $ac_feature: invalid feature name" 1>&5; 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; echo "configure: error: $ac_feature: invalid feature name" 1>&5; 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; echo "configure: error: $ac_package: invalid package name" 1>&5; 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; echo "configure: error: $ac_package: invalid package name" 1>&5; 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; echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&5; 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; echo "configure: error: can only configure for one host and one target at a time" 1>&5; 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; echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&5; exit 1; } -+fi -+ +@@ -4,11 +4,6 @@ + msyshost=1 + fi + +- +-# Read the user's .mozconfig script. We can't do this in +-# configure.in: autoconf puts the argument parsing code above anything +-# expanded from configure.in, and we need to get the configure options +-# from .mozconfig in place before that argument parsing code. + . ./old-configure.vars + + # Guess values for system-dependent variables and create Makefiles. +@@ -555,6 +550,10 @@ + { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&5; exit 1; } + fi + +if test -z "$srcdir"; then + srcdir=`dirname "$0"` +fi +srcdir="$srcdir/../.." -+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=js/src/jsapi.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; echo "configure: error: can not find sources in $ac_confdir or .." 1>&5; exit 1; } -+ else -+ { echo "configure: error: can not find sources in $srcdir" 1>&2; echo "configure: error: can not find sources in $srcdir" 1>&5; 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 + trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 + + # File descriptor usage: +@@ -688,6 +687,7 @@ + > subconfigures + > skip_subconfigures + + -+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 + ac_aux_dir= + for ac_dir in ${srcdir}/build/autoconf $srcdir/${srcdir}/build/autoconf; do + if test -f $ac_dir/install-sh; then +@@ -8546,21 +8546,25 @@ + fi + + +-case "${OS_TARGET}" in +-Android|WINNT|Darwin) ++if test "$JS_STANDALONE"; then + MOZ_GLUE_IN_PROGRAM= +- ;; +-*) +- MOZ_GLUE_IN_PROGRAM=1 +- cat >> confdefs.pytmp <<\EOF +else -+ ac_n= ac_c='\c' ac_t= -+fi -+ -+ -+ -+test "x$prefix" = xNONE && prefix=$ac_default_prefix -+# Let make expand exec_prefix. -+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' -+ -+> subconfigures -+> skip_subconfigures -+ -+ -+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; echo "configure: error: can not find install-sh or install.sh in ${srcdir}/build/autoconf $srcdir/${srcdir}/build/autoconf" 1>&5; 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; echo "configure: error: can only configure for one host and one target at a time" 1>&5; 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; echo "configure: error: can not run $ac_config_sub" 1>&5; exit 1; } -+fi -+ -+echo $ac_n "checking host system type""... $ac_c" 1>&6 -+echo "configure:739: 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; echo "configure: error: can not guess host type; you must specify one" 1>&5; 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:760: 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:778: 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}- -+ -+ -+CFLAGS="${CFLAGS=}" -+CPPFLAGS="${CPPFLAGS=}" -+CXXFLAGS="${CXXFLAGS=}" -+LDFLAGS="${LDFLAGS=}" -+HOST_CFLAGS="${HOST_CFLAGS=}" -+HOST_CXXFLAGS="${HOST_CXXFLAGS=}" -+HOST_LDFLAGS="${HOST_LDFLAGS=}" -+ -+_SUBDIR_CC="$CC" -+_SUBDIR_CXX="$CXX" -+_SUBDIR_CFLAGS="$CFLAGS" -+_SUBDIR_CPPFLAGS="$CPPFLAGS" -+_SUBDIR_CXXFLAGS="$CXXFLAGS" -+_SUBDIR_LDFLAGS="$LDFLAGS" -+_SUBDIR_HOST_CC="$HOST_CC" -+_SUBDIR_HOST_CFLAGS="$HOST_CFLAGS" -+_SUBDIR_HOST_CXXFLAGS="$HOST_CXXFLAGS" -+_SUBDIR_HOST_LDFLAGS="$HOST_LDFLAGS" -+_SUBDIR_CONFIG_ARGS="$ac_configure_args" -+ -+NSPR_VERSION=4 -+NSPR_MINVER=4.9.2 -+ -+WINDRES_VERSION=2.14.90 -+W32API_VERSION=3.14 -+ -+MISSING_X= -+ -+USE_PTHREADS= -+_PTHREAD_LDFLAGS="" -+ -+_topsrcdir=`cd $srcdir; pwd -W 2>/dev/null || pwd -P` -+_objdir=`pwd -P` -+ -+MOZ_BUILD_ROOT=`pwd -W 2>/dev/null || pwd -P` -+ -+ -+ if test -z "$MOZILLA_OFFICIAL"; then -+ DEVELOPER_OPTIONS=1 -+ fi -+ # Check whether --enable-release or --disable-release was given. -+if test "${enable_release+set}" = set; then -+ enableval="$enable_release" -+ if test "$enableval" = "yes"; then -+ DEVELOPER_OPTIONS= -+ elif test "$enableval" = "no"; then -+ DEVELOPER_OPTIONS=1 -+ else -+ { echo "configure: error: Option, release, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, release, does not take an argument ($enableval)." 1>&5; exit 1; } -+ fi -+fi -+ -+ -+if test -z "$CROSS_COMPILE"; then -+case "$target" in -+*-mingw*) -+ if test -z "$CPP"; then CPP="$CC -E -nologo"; fi -+ if test -z "$CXXCPP"; then CXXCPP="$CXX -TP -E -nologo"; ac_cv_prog_CXXCPP="$CXXCPP"; fi -+ if test -z "$AS"; then -+ case "${target_cpu}" in -+ i*86) -+ AS=ml; -+ ;; -+ x86_64) -+ AS=ml64; -+ ;; -+ esac -+ fi -+ if test -z "$MIDL"; then MIDL=midl; fi -+ -+ # need override this flag since we don't use $(LDFLAGS) for this. -+ if test -z "$HOST_LDFLAGS" ; then -+ HOST_LDFLAGS=" " -+ fi ++ case "${OS_TARGET}" in ++ Android|WINNT|Darwin) ++ MOZ_GLUE_IN_PROGRAM= + ;; -+esac -+fi -+ -+ -+if test -z "$JS_STANDALONE"; then -+ autoconfmk=autoconf-js.mk -+ #DIST is exported from top-level configure -+else -+ DIST="$MOZ_BUILD_ROOT/dist" -+fi -+ -+ -+ -+ -+# Check whether --with-android-cxx-stl or --without-android-cxx-stl was given. -+if test "${with_android_cxx_stl+set}" = set; then -+ withval="$with_android_cxx_stl" -+ android_cxx_stl=$withval -+else -+ android_cxx_stl=libc++ -+fi -+ -+ -+case "$target" in -+*-android*|*-linuxandroid*) -+ CPPFLAGS="-idirafter $android_platform/usr/include $CPPFLAGS" -+ CFLAGS="-fno-short-enums -fno-exceptions $CFLAGS" -+ CXXFLAGS="-fno-short-enums -fno-exceptions $CXXFLAGS" -+ ASFLAGS="-idirafter $android_platform/usr/include -DANDROID $ASFLAGS" -+ -+ LDFLAGS="-L$android_platform/usr/lib -Wl,-rpath-link=$android_platform/usr/lib --sysroot=$android_platform -Wl,--allow-shlib-undefined $LDFLAGS" -+ LIBS="-llog $LIBS" -+ ANDROID_PLATFORM="${android_platform}" -+ ++ *) ++ MOZ_GLUE_IN_PROGRAM=1 + cat >> confdefs.pytmp <<\EOF -+ (''' ANDROID ''', ' 1 ') -+EOF -+cat >> confdefs.h <<\EOF -+#define ANDROID 1 -+EOF -+ -+ -+ + (''' MOZ_GLUE_IN_PROGRAM ''', ' 1 ') + EOF + cat >> confdefs.h <<\EOF + #define MOZ_GLUE_IN_PROGRAM 1 + EOF + +- ;; +-esac + ;; -+esac -+ -+ -+ -+if test -n "$gonkdir" ; then -+ LDFLAGS="-L$gonkdir/out/target/product/$GONK_PRODUCT/obj/lib -Wl,-rpath-link=$gonkdir/out/target/product/$GONK_PRODUCT/obj/lib --sysroot=$gonkdir/out/target/product/$GONK_PRODUCT/obj/ -llog $LDFLAGS" -+fi -+ -+case "$target" in -+*-apple-darwin*) -+ -+ -+# Check whether --with-ios-sdk or --without-ios-sdk was given. -+if test "${with_ios_sdk+set}" = set; then -+ withval="$with_ios_sdk" -+ ios_sdk=$withval -+fi -+ -+ -+# Check whether --enable-ios-target or --disable-ios-target was given. -+if test "${enable_ios_target+set}" = set; then -+ enableval="$enable_ios_target" -+ _IOS_TARGET=$enableval ++ esac +fi -+ -+_IOS_TARGET_DEFAULT=8.0 -+ -+case "$target" in -+arm*-apple-darwin*) -+ if test -z "$ios_sdk" -o "$ios_sdk" = "yes"; then -+ ios_sdk=iphoneos + + if test "$MOZ_MEMORY"; then + if test "x$MOZ_DEBUG" = "x1"; then +@@ -8618,12 +8622,12 @@ + if test -n "$MOZ_VALGRIND"; then + ac_safe=`echo "valgrind/valgrind.h" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for valgrind/valgrind.h""... $ac_c" 1>&6 +-echo "configure:8622: checking for valgrind/valgrind.h" >&5 ++echo "configure:8626: checking for valgrind/valgrind.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 < +@@ -8631,7 +8635,7 @@ + + ; return 0; } + EOF +-if { (eval echo configure:8635: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:8639: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" + else +@@ -8980,7 +8984,7 @@ + fi + + echo $ac_n "checking for llvm-config""... $ac_c" 1>&6 +-echo "configure:8984: checking for llvm-config" >&5 ++echo "configure:8988: checking for llvm-config" >&5 + if test -z "$LLVMCONFIG"; then + if test -n "$CLANG_CL"; then + CXX_COMPILER="$(dirname "$CXX")/clang" +@@ -9040,7 +9044,7 @@ + fi + + echo $ac_n "checking for new ASTMatcher API""... $ac_c" 1>&6 +-echo "configure:9044: checking for new ASTMatcher API" >&5 ++echo "configure:9048: checking for new ASTMatcher API" >&5 + if eval "test \"`echo '$''{'ac_cv_have_new_ASTMatcher_api'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -9060,14 +9064,14 @@ + CXXFLAGS="${LLVM_CXXFLAGS}" + CXX="${HOST_CXX}" + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:9075: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_have_new_ASTMatcher_names="yes" + else +@@ -9096,7 +9100,7 @@ + fi + + echo $ac_n "checking for has with ignoringParenImpCasts""... $ac_c" 1>&6 +-echo "configure:9100: checking for has with ignoringParenImpCasts" >&5 ++echo "configure:9104: checking for has with ignoringParenImpCasts" >&5 + if eval "test \"`echo '$''{'ac_cv_has_accepts_ignoringParenImpCasts'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -9116,7 +9120,7 @@ + CXXFLAGS="${LLVM_CXXFLAGS}" + CXX="${HOST_CXX}" + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:9133: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_has_accepts_ignoringParenImpCasts="yes" + else +@@ -9227,12 +9231,12 @@ + for ac_func in __cxa_demangle + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:9231: checking for $ac_func" >&5 ++echo "configure:9235: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:9270: \"$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 +@@ -9323,7 +9327,7 @@ + # Compiler Options + + echo $ac_n "checking for -pipe support""... $ac_c" 1>&6 +-echo "configure:9327: checking for -pipe support" >&5 ++echo "configure:9331: checking for -pipe support" >&5 + if test -n "$GNU_CC" -a -n "$GNU_CXX"; then + CFLAGS="$CFLAGS -pipe" + CXXFLAGS="$CXXFLAGS -pipe" +@@ -9337,16 +9341,16 @@ + CFLAGS="$CFLAGS -fprofile-generate -fprofile-correction" + + echo $ac_n "checking whether C compiler supports -fprofile-generate""... $ac_c" 1>&6 +-echo "configure:9341: checking whether C compiler supports -fprofile-generate" >&5 ++echo "configure:9345: checking whether C compiler supports -fprofile-generate" >&5 + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:9354: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + PROFILE_GEN_CFLAGS="-fprofile-generate" + result="yes" +@@ -9381,19 +9385,19 @@ + + + echo $ac_n "checking for tm_zone tm_gmtoff in struct tm""... $ac_c" 1>&6 +-echo "configure:9385: checking for tm_zone tm_gmtoff in struct tm" >&5 ++echo "configure:9389: checking for tm_zone tm_gmtoff in struct tm" >&5 + if eval "test \"`echo '$''{'ac_cv_struct_tm_zone_tm_gmtoff'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + int main() { + struct tm tm; tm.tm_zone = 0; tm.tm_gmtoff = 1; + ; return 0; } + EOF +-if { (eval echo configure:9397: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:9401: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_struct_tm_zone_tm_gmtoff="yes" + else +@@ -9435,20 +9439,20 @@ + + + echo $ac_n "checking what kind of list files are supported by the linker""... $ac_c" 1>&6 +-echo "configure:9439: checking what kind of list files are supported by the linker" >&5 ++echo "configure:9443: checking what kind of list files are supported by the linker" >&5 + if eval "test \"`echo '$''{'EXPAND_LIBS_LIST_STYLE'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + echo "int main() {return 0;}" > conftest.${ac_ext} +- if { ac_try='${CC-cc} -o conftest.${OBJ_SUFFIX} -c $CFLAGS $CPPFLAGS conftest.${ac_ext} 1>&5'; { (eval echo configure:9444: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest.${OBJ_SUFFIX}; then ++ if { ac_try='${CC-cc} -o conftest.${OBJ_SUFFIX} -c $CFLAGS $CPPFLAGS conftest.${ac_ext} 1>&5'; { (eval echo configure:9448: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest.${OBJ_SUFFIX}; then + echo "INPUT(conftest.${OBJ_SUFFIX})" > conftest.list +- if { ac_try='${CC-cc} -o conftest${ac_exeext} $LDFLAGS conftest.list $LIBS 1>&5'; { (eval echo configure:9446: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest${ac_exeext}; then ++ if { ac_try='${CC-cc} -o conftest${ac_exeext} $LDFLAGS conftest.list $LIBS 1>&5'; { (eval echo configure:9450: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest${ac_exeext}; then + EXPAND_LIBS_LIST_STYLE=linkerscript + else + echo "conftest.${OBJ_SUFFIX}" > conftest.list +- if { ac_try='${CC-cc} -o conftest${ac_exeext} $LDFLAGS -Wl,-filelist,conftest.list $LIBS 1>&5'; { (eval echo configure:9450: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest${ac_exeext}; then ++ if { ac_try='${CC-cc} -o conftest${ac_exeext} $LDFLAGS -Wl,-filelist,conftest.list $LIBS 1>&5'; { (eval echo configure:9454: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest${ac_exeext}; then + EXPAND_LIBS_LIST_STYLE=filelist +- elif { ac_try='${CC-cc} -o conftest${ac_exeext} $LDFLAGS @conftest.list $LIBS 1>&5'; { (eval echo configure:9452: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest${ac_exeext}; then ++ elif { ac_try='${CC-cc} -o conftest${ac_exeext} $LDFLAGS @conftest.list $LIBS 1>&5'; { (eval echo configure:9456: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest${ac_exeext}; then + EXPAND_LIBS_LIST_STYLE=list + else + EXPAND_LIBS_LIST_STYLE=none +@@ -9468,7 +9472,7 @@ + + if test "$GCC_USE_GNU_LD"; then + echo $ac_n "checking what kind of ordering can be done with the linker""... $ac_c" 1>&6 +-echo "configure:9472: checking what kind of ordering can be done with the linker" >&5 ++echo "configure:9476: checking what kind of ordering can be done with the linker" >&5 + if eval "test \"`echo '$''{'EXPAND_LIBS_ORDER_STYLE'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -9476,14 +9480,14 @@ + _SAVE_LDFLAGS="$LDFLAGS" + LDFLAGS="${LDFLAGS} -Wl,--section-ordering-file,conftest.order" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:9491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + EXPAND_LIBS_ORDER_STYLE=section-ordering-file + else +@@ -9495,7 +9499,7 @@ + rm -f conftest* + LDFLAGS="$_SAVE_LDFLAGS" + if test -z "$EXPAND_LIBS_ORDER_STYLE"; then +- if { ac_try='${CC-cc} ${DSO_LDOPTS} ${LDFLAGS} -o ${DLL_PREFIX}conftest${DLL_SUFFIX} -Wl'; { (eval echo configure:9499: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then ++ if { ac_try='${CC-cc} ${DSO_LDOPTS} ${LDFLAGS} -o ${DLL_PREFIX}conftest${DLL_SUFFIX} -Wl'; { (eval echo configure:9503: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then + EXPAND_LIBS_ORDER_STYLE=linkerscript + else + EXPAND_LIBS_ORDER_STYLE=none +@@ -9567,7 +9571,7 @@ + if test -z "$SKIP_LIBRARY_CHECKS" -a -z "$NO_EDITLINE"; then + if test -n "$JS_WANT_READLINE"; then + echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6 +-echo "configure:9571: checking for readline in -lreadline" >&5 ++echo "configure:9575: checking for readline in -lreadline" >&5 + ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -9575,7 +9579,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lreadline $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:9594: \"$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 +@@ -9714,19 +9718,19 @@ + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + echo $ac_n "checking for icu-i18n >= 58.1""... $ac_c" 1>&6 +-echo "configure:9718: checking for icu-i18n >= 58.1" >&5 ++echo "configure:9722: checking for icu-i18n >= 58.1" >&5 + + if $PKG_CONFIG --exists "icu-i18n >= 58.1" ; then + echo "$ac_t""yes" 1>&6 + succeeded=yes + + echo $ac_n "checking MOZ_ICU_CFLAGS""... $ac_c" 1>&6 +-echo "configure:9725: checking MOZ_ICU_CFLAGS" >&5 ++echo "configure:9729: checking MOZ_ICU_CFLAGS" >&5 + MOZ_ICU_CFLAGS=`$PKG_CONFIG --cflags "icu-i18n >= 58.1"` + echo "$ac_t""$MOZ_ICU_CFLAGS" 1>&6 + + echo $ac_n "checking MOZ_ICU_LIBS""... $ac_c" 1>&6 +-echo "configure:9730: checking MOZ_ICU_LIBS" >&5 ++echo "configure:9734: checking MOZ_ICU_LIBS" >&5 + ## Remove evil flags like -Wl,--export-dynamic + MOZ_ICU_LIBS="`$PKG_CONFIG --libs \"icu-i18n >= 58.1\" |sed s/-Wl,--export-dynamic//g`" + echo "$ac_t""$MOZ_ICU_LIBS" 1>&6 +@@ -9827,7 +9831,9 @@ + # TODO: the l is actually endian-dependent + # We could make this set as 'l' or 'b' for little or big, respectively, + # but we'd need to check in a big-endian version of the file. +- ICU_DATA_FILE="icudt${version}l.dat" ++ if test -z "$ICU_DATA_FILE"; then ++ ICU_DATA_FILE="icudt${version}l.dat" + fi -+ case "$ios_sdk" in -+ iphoneos*) -+ ios_target_arg="-miphoneos-version-min" -+ ;; -+ *) -+ { echo "configure: error: Only 'iphoneos' SDKs are valid when targeting iOS device, don't know what to do with '$ios_sdk'." 1>&2; echo "configure: error: Only 'iphoneos' SDKs are valid when targeting iOS device, don't know what to do with '$ios_sdk'." 1>&5; exit 1; } -+ ;; -+ esac -+ ;; -+*-apple-darwin*) -+ ios_target_arg="-mios-simulator-version-min" -+ case "$ios_sdk" in -+ # Empty SDK is okay, this might be an OS X desktop build. -+ ""|iphonesimulator*) -+ ;; -+ # Default to iphonesimulator -+ yes) -+ ios_sdk=iphonesimulator -+ ;; -+ *) -+ { echo "configure: error: Only 'iphonesimulator' SDKs are valid when targeting iOS simulator." 1>&2; echo "configure: error: Only 'iphonesimulator' SDKs are valid when targeting iOS simulator." 1>&5; exit 1; } -+ ;; -+ esac -+ ;; -+esac -+ -+ -+if test -n "$ios_sdk"; then -+ if test -z "$_IOS_TARGET"; then -+ _IOS_TARGET=$_IOS_TARGET_DEFAULT -+ ios_target_arg="${ios_target_arg}=${_IOS_TARGET}" -+ fi -+ # Ensure that xcrun knows where this SDK is. -+ ios_sdk_path=`xcrun --sdk $ios_sdk --show-sdk-path 2>/dev/null` -+ _ret=$? -+ if test $_ret -ne 0; then -+ { echo "configure: error: iOS SDK '$ios_sdk' could not be found." 1>&2; echo "configure: error: iOS SDK '$ios_sdk' could not be found." 1>&5; exit 1; } -+ fi -+ MOZ_IOS=1 -+ export HOST_CC=clang -+ export HOST_CXX=clang++ -+ # Add isysroot, arch, and ios target arguments -+ case "$target_cpu" in -+ arm*) -+ ARGS="-arch armv7" -+ ;; -+ *) -+ # Unfortunately simulator builds need this. -+ export CROSS_COMPILE=1 -+ ;; -+ esac -+ ARGS=" $ARGS -isysroot $ios_sdk_path $ios_target_arg" -+ # Now find our tools -+ -+ -+_prog_name=clang -+ -+echo $ac_n "checking for $_prog_name in iOS SDK""... $ac_c" 1>&6 -+echo "configure:1010: checking for $_prog_name in iOS SDK" >&5 -+if eval "test \"`echo '$''{'ac_cv_ios_path_CC'+set}'`\" = set"; then -+ echo $ac_n "(cached) $ac_c" 1>&6 -+else -+ -+_path=`xcrun --sdk $ios_sdk --find $_prog_name 2>/dev/null` -+_res=$? -+if test $_res -ne 0; then -+ { echo "configure: error: Could not find '$_prog_name' in the iOS SDK" 1>&2; echo "configure: error: Could not find '$_prog_name' in the iOS SDK" 1>&5; exit 1; } -+fi -+ac_cv_ios_path_CC=$_path -+ -+fi -+ -+echo "$ac_t""$ac_cv_ios_path_CC" 1>&6 -+CC="${ac_cv_ios_path_CC}$ARGS" -+ -+ -+ -+_prog_name=clang++ -+ -+echo $ac_n "checking for $_prog_name in iOS SDK""... $ac_c" 1>&6 -+echo "configure:1032: checking for $_prog_name in iOS SDK" >&5 -+if eval "test \"`echo '$''{'ac_cv_ios_path_CXX'+set}'`\" = set"; then -+ echo $ac_n "(cached) $ac_c" 1>&6 -+else -+ -+_path=`xcrun --sdk $ios_sdk --find $_prog_name 2>/dev/null` -+_res=$? -+if test $_res -ne 0; then -+ { echo "configure: error: Could not find '$_prog_name' in the iOS SDK" 1>&2; echo "configure: error: Could not find '$_prog_name' in the iOS SDK" 1>&5; exit 1; } -+fi -+ac_cv_ios_path_CXX=$_path -+ -+fi -+ -+echo "$ac_t""$ac_cv_ios_path_CXX" 1>&6 -+CXX="${ac_cv_ios_path_CXX}$ARGS" -+ -+ export CPP="$CC -E" -+ export LD="$CXX" -+ -+ -+_prog_name=`echo AR | tr "[:upper:]" "[:lower:]"` -+ -+echo $ac_n "checking for $_prog_name in iOS SDK""... $ac_c" 1>&6 -+echo "configure:1056: checking for $_prog_name in iOS SDK" >&5 -+if eval "test \"`echo '$''{'ac_cv_ios_path_AR'+set}'`\" = set"; then -+ echo $ac_n "(cached) $ac_c" 1>&6 -+else -+ -+_path=`xcrun --sdk $ios_sdk --find $_prog_name 2>/dev/null` -+_res=$? -+if test $_res -ne 0; then -+ { echo "configure: error: Could not find '$_prog_name' in the iOS SDK" 1>&2; echo "configure: error: Could not find '$_prog_name' in the iOS SDK" 1>&5; exit 1; } -+fi -+ac_cv_ios_path_AR=$_path -+ -+fi -+ -+echo "$ac_t""$ac_cv_ios_path_AR" 1>&6 -+AR="${ac_cv_ios_path_AR}" -+ -+ -+ -+_prog_name=as -+ -+echo $ac_n "checking for $_prog_name in iOS SDK""... $ac_c" 1>&6 -+echo "configure:1078: checking for $_prog_name in iOS SDK" >&5 -+if eval "test \"`echo '$''{'ac_cv_ios_path_AS'+set}'`\" = set"; then -+ echo $ac_n "(cached) $ac_c" 1>&6 -+else -+ -+_path=`xcrun --sdk $ios_sdk --find $_prog_name 2>/dev/null` -+_res=$? -+if test $_res -ne 0; then -+ { echo "configure: error: Could not find '$_prog_name' in the iOS SDK" 1>&2; echo "configure: error: Could not find '$_prog_name' in the iOS SDK" 1>&5; exit 1; } -+fi -+ac_cv_ios_path_AS=$_path -+ -+fi -+ -+echo "$ac_t""$ac_cv_ios_path_AS" 1>&6 -+AS="${ac_cv_ios_path_AS}$ARGS" -+ -+ -+ -+_prog_name=`echo OTOOL | tr "[:upper:]" "[:lower:]"` -+ -+echo $ac_n "checking for $_prog_name in iOS SDK""... $ac_c" 1>&6 -+echo "configure:1100: checking for $_prog_name in iOS SDK" >&5 -+if eval "test \"`echo '$''{'ac_cv_ios_path_OTOOL'+set}'`\" = set"; then -+ echo $ac_n "(cached) $ac_c" 1>&6 -+else -+ -+_path=`xcrun --sdk $ios_sdk --find $_prog_name 2>/dev/null` -+_res=$? -+if test $_res -ne 0; then -+ { echo "configure: error: Could not find '$_prog_name' in the iOS SDK" 1>&2; echo "configure: error: Could not find '$_prog_name' in the iOS SDK" 1>&5; exit 1; } -+fi -+ac_cv_ios_path_OTOOL=$_path -+ -+fi -+ -+echo "$ac_t""$ac_cv_ios_path_OTOOL" 1>&6 -+OTOOL="${ac_cv_ios_path_OTOOL}" -+ -+ -+ -+_prog_name=`echo STRIP | tr "[:upper:]" "[:lower:]"` -+ -+echo $ac_n "checking for $_prog_name in iOS SDK""... $ac_c" 1>&6 -+echo "configure:1122: checking for $_prog_name in iOS SDK" >&5 -+if eval "test \"`echo '$''{'ac_cv_ios_path_STRIP'+set}'`\" = set"; then -+ echo $ac_n "(cached) $ac_c" 1>&6 -+else -+ -+_path=`xcrun --sdk $ios_sdk --find $_prog_name 2>/dev/null` -+_res=$? -+if test $_res -ne 0; then -+ { echo "configure: error: Could not find '$_prog_name' in the iOS SDK" 1>&2; echo "configure: error: Could not find '$_prog_name' in the iOS SDK" 1>&5; exit 1; } -+fi -+ac_cv_ios_path_STRIP=$_path -+ -+fi -+ -+echo "$ac_t""$ac_cv_ios_path_STRIP" 1>&6 -+STRIP="${ac_cv_ios_path_STRIP}" -+ -+ export PKG_CONFIG_PATH=${ios_sdk_path}/usr/lib/pkgconfig/ -+fi -+ -+ -+ -+ ;; -+esac -+ -+ -+AR_FLAGS='crs $@' -+ -+if test "$COMPILE_ENVIRONMENT"; then -+ -+# Note: -+# In Mozilla, we use the names $target, $host and $build incorrectly, but are -+# too far gone to back out now. See Bug 475488: -+# - When we say $target, we mean $host, that is, the system on which -+# Mozilla will be run. -+# - When we say $host, we mean $build, that is, the system on which Mozilla -+# is built. -+# - $target (in its correct usage) is for compilers who generate code for a -+# different platform than $host, so it would not be used by Mozilla. -+if test "$target" != "$host"; then -+ -+echo "cross compiling from $host to $target" -+ -+if test -z "$HOST_AR_FLAGS"; then -+ HOST_AR_FLAGS="$AR_FLAGS" -+fi -+for ac_prog in $HOST_RANLIB 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:1173: checking for $ac_word" >&5 -+if eval "test \"`echo '$''{'ac_cv_prog_HOST_RANLIB'+set}'`\" = set"; then -+ echo $ac_n "(cached) $ac_c" 1>&6 -+else -+ if test -n "$HOST_RANLIB"; then -+ ac_cv_prog_HOST_RANLIB="$HOST_RANLIB" # Let the user override the test. -+else -+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" -+ ac_dummy=":" -+ 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_RANLIB="$ac_prog" -+ break -+ fi -+ done -+ IFS="$ac_save_ifs" -+fi -+fi -+HOST_RANLIB="$ac_cv_prog_HOST_RANLIB" -+if test -n "$HOST_RANLIB"; then -+ echo "$ac_t""$HOST_RANLIB" 1>&6 -+else -+ echo "$ac_t""no" 1>&6 -+fi -+ -+test -n "$HOST_RANLIB" && break -+done -+test -n "$HOST_RANLIB" || HOST_RANLIB="ranlib" -+ -+for ac_prog in $HOST_AR 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:1208: checking for $ac_word" >&5 -+if eval "test \"`echo '$''{'ac_cv_prog_HOST_AR'+set}'`\" = set"; then -+ echo $ac_n "(cached) $ac_c" 1>&6 -+else -+ if test -n "$HOST_AR"; then -+ ac_cv_prog_HOST_AR="$HOST_AR" # Let the user override the test. -+else -+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" -+ ac_dummy=":" -+ 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_AR="$ac_prog" -+ break -+ fi -+ done -+ IFS="$ac_save_ifs" -+fi -+fi -+HOST_AR="$ac_cv_prog_HOST_AR" -+if test -n "$HOST_AR"; then -+ echo "$ac_t""$HOST_AR" 1>&6 -+else -+ echo "$ac_t""no" 1>&6 -+fi -+ -+test -n "$HOST_AR" && break -+done -+test -n "$HOST_AR" || HOST_AR="ar" -+ -+ -+_SAVE_PATH=$PATH -+case "${TOOLCHAIN_PREFIX}" in -+/*) -+ PATH="/:$PATH" -+ ;; -+esac -+# 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:1248: 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:1278: 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:1329: 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; echo "configure: error: no acceptable cc found in \$PATH" 1>&5; exit 1; } -+fi -+ -+echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -+echo "configure:1361: 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 1372 "configure" -+#include "confdefs.h" -+ -+main(){return(0);} -+EOF -+if { (eval echo configure:1377: \"$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; echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&5; exit 1; } -+fi -+echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -+echo "configure:1403: 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:1408: 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 <&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:1436: checking whether ${CC-cc} accepts -g" >&5 -+if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then -+ echo $ac_n "(cached) $ac_c" 1>&6 -+else -+ echo 'void f(){}' > conftest.c -+if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then -+ ac_cv_prog_cc_g=yes -+else -+ ac_cv_prog_cc_g=no -+fi -+rm -f conftest* -+ -+fi -+ -+echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 -+if test "$ac_test_CFLAGS" = set; then -+ CFLAGS="$ac_save_CFLAGS" -+elif test $ac_cv_prog_cc_g = yes; then -+ if test "$GCC" = yes; then -+ CFLAGS="-g -O2" -+ else -+ CFLAGS="-g" -+ fi -+else -+ if test "$GCC" = yes; then -+ CFLAGS="-O2" -+ else -+ CFLAGS= -+ fi -+fi -+ -+for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl -+do -+# Extract the first word of "$ac_prog", so it can be a program name with args. -+set dummy $ac_prog; ac_word=$2 -+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -+echo "configure:1472: 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:1504: 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 1515 "configure" -+#include "confdefs.h" -+ -+int main(){return(0);} -+EOF -+if { (eval echo configure:1520: \"$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; echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&5; exit 1; } -+fi -+echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -+echo "configure:1546: 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:1551: 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 <&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:1579: 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 -+ -+ -+for ac_prog in "${TOOLCHAIN_PREFIX}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:1616: 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=":" -+ -+for ac_prog in "${TOOLCHAIN_PREFIX}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:1651: 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=":" -+ -+for ac_prog in "${TOOLCHAIN_PREFIX}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:1686: 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=":" -+ -+for ac_prog in "${TOOLCHAIN_PREFIX}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:1721: 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=":" -+ -+for ac_prog in "${TOOLCHAIN_PREFIX}lipo" -+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:1756: checking for $ac_word" >&5 -+if eval "test \"`echo '$''{'ac_cv_prog_LIPO'+set}'`\" = set"; then -+ echo $ac_n "(cached) $ac_c" 1>&6 -+else -+ if test -n "$LIPO"; then -+ ac_cv_prog_LIPO="$LIPO" # 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_LIPO="$ac_prog" -+ break -+ fi -+ done -+ IFS="$ac_save_ifs" -+fi -+fi -+LIPO="$ac_cv_prog_LIPO" -+if test -n "$LIPO"; then -+ echo "$ac_t""$LIPO" 1>&6 -+else -+ echo "$ac_t""no" 1>&6 -+fi -+ -+test -n "$LIPO" && break -+done -+test -n "$LIPO" || LIPO=":" -+ -+for ac_prog in "${TOOLCHAIN_PREFIX}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:1791: 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=":" -+ -+for ac_prog in "${TOOLCHAIN_PREFIX}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:1826: 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=":" -+ -+for ac_prog in "${TOOLCHAIN_PREFIX}otool" -+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:1861: checking for $ac_word" >&5 -+if eval "test \"`echo '$''{'ac_cv_prog_OTOOL'+set}'`\" = set"; then -+ echo $ac_n "(cached) $ac_c" 1>&6 -+else -+ if test -n "$OTOOL"; then -+ ac_cv_prog_OTOOL="$OTOOL" # 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_OTOOL="$ac_prog" -+ break -+ fi -+ done -+ IFS="$ac_save_ifs" -+fi -+fi -+OTOOL="$ac_cv_prog_OTOOL" -+if test -n "$OTOOL"; then -+ echo "$ac_t""$OTOOL" 1>&6 -+else -+ echo "$ac_t""no" 1>&6 -+fi -+ -+test -n "$OTOOL" && break -+done -+test -n "$OTOOL" || OTOOL=":" -+ -+for ac_prog in "${TOOLCHAIN_PREFIX}objcopy" -+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:1896: checking for $ac_word" >&5 -+if eval "test \"`echo '$''{'ac_cv_prog_OBJCOPY'+set}'`\" = set"; then -+ echo $ac_n "(cached) $ac_c" 1>&6 -+else -+ if test -n "$OBJCOPY"; then -+ ac_cv_prog_OBJCOPY="$OBJCOPY" # 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_OBJCOPY="$ac_prog" -+ break -+ fi -+ done -+ IFS="$ac_save_ifs" -+fi -+fi -+OBJCOPY="$ac_cv_prog_OBJCOPY" -+if test -n "$OBJCOPY"; then -+ echo "$ac_t""$OBJCOPY" 1>&6 -+else -+ echo "$ac_t""no" 1>&6 -+fi -+ -+test -n "$OBJCOPY" && break -+done -+test -n "$OBJCOPY" || OBJCOPY=":" -+ -+PATH=$_SAVE_PATH -+ -+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:1932: 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:1962: 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:2013: 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; echo "configure: error: no acceptable cc found in \$PATH" 1>&5; exit 1; } -+fi -+ -+echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -+echo "configure:2045: 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 2056 "configure" -+#include "confdefs.h" -+ -+main(){return(0);} -+EOF -+if { (eval echo configure:2061: \"$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; echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&5; exit 1; } -+fi -+echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -+echo "configure:2087: 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:2092: 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 <&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:2120: checking whether ${CC-cc} accepts -g" >&5 -+if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then -+ echo $ac_n "(cached) $ac_c" 1>&6 -+else -+ echo 'void f(){}' > conftest.c -+if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then -+ ac_cv_prog_cc_g=yes -+else -+ ac_cv_prog_cc_g=no -+fi -+rm -f conftest* -+ -+fi -+ -+echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 -+if test "$ac_test_CFLAGS" = set; then -+ CFLAGS="$ac_save_CFLAGS" -+elif test $ac_cv_prog_cc_g = yes; then -+ if test "$GCC" = yes; then -+ CFLAGS="-g -O2" -+ else -+ CFLAGS="-g" -+ fi -+else -+ if test "$GCC" = yes; then -+ CFLAGS="-O2" -+ else -+ CFLAGS= -+ fi -+fi -+ -+ for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl -+do -+# Extract the first word of "$ac_prog", so it can be a program name with args. -+set dummy $ac_prog; ac_word=$2 -+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -+echo "configure:2156: 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:2188: 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 2199 "configure" -+#include "confdefs.h" -+ -+int main(){return(0);} -+EOF -+if { (eval echo configure:2204: \"$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; echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&5; exit 1; } -+fi -+echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -+echo "configure:2230: 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:2235: 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 <&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:2263: 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 -+ -+ # 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:2297: 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 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:2329: 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" -+ -+ if test "$msyshost"; then -+ case "$AS" in -+ /*) -+ tmp_DIRNAME=`dirname "$AS"` -+ tmp_BASENAME=`basename "$AS"` -+ tmp_PWD=`cd "$tmp_DIRNAME" && pwd -W` -+ AS="$tmp_PWD/$tmp_BASENAME" -+ if test -e "$AS.exe"; then -+ AS="$AS.exe" -+ fi -+ esac -+ fi -+ -+ 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:2383: 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=":" -+ -+ for ac_prog in 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:2418: 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=":" -+ -+ 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:2453: 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=":" -+ -+ 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:2488: 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=":" -+ -+ if test -z "$HOST_CC"; then -+ HOST_CC='$(CC)' -+ fi -+ if test -z "$HOST_CXX"; then -+ HOST_CXX='$(CXX)' -+ fi -+ if test -z "$HOST_RANLIB"; then -+ HOST_RANLIB='$(RANLIB)' -+ fi -+ if test -z "$HOST_AR"; then -+ HOST_AR='$(AR)' -+ fi -+ if test -z "$HOST_AR_FLAGS"; then -+ HOST_AR_FLAGS='$(AR_FLAGS)' -+ fi -+fi -+ -+ -+GNU_AS= -+GNU_LD= -+ -+GNU_CC= -+GNU_CXX= -+if test "$CC_TYPE" = "gcc"; then -+ GNU_CC=1 -+ GNU_CXX=1 -+fi -+ -+if test "`echo | $AS -o conftest.out -v 2>&1 | grep -c GNU`" != "0"; then -+ GNU_AS=1 -+fi -+rm -f conftest.out -+if test "`echo | $LD -v 2>&1 | grep -c GNU`" != "0"; then -+ GNU_LD=1 -+fi -+ -+CLANG_CC= -+CLANG_CXX= -+CLANG_CL= -+if test "$CC_TYPE" = "clang"; then -+ GNU_CC=1 -+ GNU_CXX=1 -+ CLANG_CC=1 -+ CLANG_CXX=1 -+fi -+if test "$CC_TYPE" = "clang-cl"; then -+ CLANG_CL=1 -+fi -+ -+if test "$GNU_CC"; then -+ if `$CC -print-prog-name=ld` -v 2>&1 | grep -c GNU >/dev/null; then -+ GCC_USE_GNU_LD=1 -+ fi -+fi -+ -+ -+ -+ -+ -+ -+# Target the Windows 8.1 SDK by default -+WINVER=502 -+ -+case "$target" in -+*-mingw*) -+ if test "$GCC" != "yes"; then -+ # Check to see if we are really running in a msvc environemnt -+ _WIN32_MSVC=1 -+ -+ # Make sure compilers are valid -+ CFLAGS="$CFLAGS -TC -nologo" -+ CXXFLAGS="$CXXFLAGS -TP -nologo" -+ if test -z "$CLANG_CL"; then -+ CFLAGS="$CFLAGS -utf-8" -+ CXXFLAGS="$CXXFLAGS -utf-8" -+ fi -+ # MSVC warning C4345 warns of newly conformant behavior as of VS2003. -+ # MSVC warning C4351 warns of newly conformant behavior as of VS2005. -+ # MSVC warning C4800 warns when a value is implicitly cast to bool, -+ # because this also forces narrowing to a single byte, which can be a -+ # perf hit. But this matters so little in practice (and often we want -+ # that behavior) that it's better to turn it off. -+ # _CRT_SECURE_NO_WARNINGS disables warnings about using MSVC-specific -+ # secure CRT functions. -+ # MSVC warning wd4595 warns non-member operator new or delete functions -+ # may not be declared inline, as of VS2015 Update 2. -+ CXXFLAGS="$CXXFLAGS -wd4345 -wd4351 -wd4800 -wd4595 -D_CRT_SECURE_NO_WARNINGS" -+ -+ 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 < -+int main() { -+ printf("Hello World\n"); -+; return 0; } -+EOF -+if { (eval echo configure:2621: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -+ : -+else -+ echo "configure: failed program was:" >&5 -+ cat conftest.$ac_ext >&5 -+ rm -rf conftest* -+ { echo "configure: error: \$(CC) test failed. You must have MS VC++ in your path to build." 1>&2; echo "configure: error: \$(CC) test failed. You must have MS VC++ in your path to build." 1>&5; exit 1; } -+fi -+rm -f conftest* -+ -+ 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 < -+int main() { -+ unsigned *test = new unsigned(42); -+; return 0; } -+EOF -+if { (eval echo configure:2646: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -+ : -+else -+ echo "configure: failed program was:" >&5 -+ cat conftest.$ac_ext >&5 -+ rm -rf conftest* -+ { echo "configure: error: \$(CXX) test failed. You must have MS VC++ in your path to build." 1>&2; echo "configure: error: \$(CXX) test failed. You must have MS VC++ in your path to build." 1>&5; exit 1; } -+fi -+rm -f 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 -+ -+ -+ -+ _MSVC_VER_FILTER='s|.*[^!-~]([0-9]+\.[0-9]+\.[0-9]+(\.[0-9]+)?).*|\1|p' -+ -+ -+ _MSC_VER=`echo ${CC_VERSION} | cut -c 1-2,4-5` -+ -+ cat >> confdefs.pytmp <<\EOF -+ (''' _CRT_SECURE_NO_WARNINGS ''', ' 1 ') -+EOF -+cat >> confdefs.h <<\EOF -+#define _CRT_SECURE_NO_WARNINGS 1 -+EOF -+ -+ cat >> confdefs.pytmp <<\EOF -+ (''' _CRT_NONSTDC_NO_WARNINGS ''', ' 1 ') -+EOF -+cat >> confdefs.h <<\EOF -+#define _CRT_NONSTDC_NO_WARNINGS 1 -+EOF -+ -+ cat >> confdefs.pytmp <<\EOF -+ (''' _USE_MATH_DEFINES ''', ' 1 ') -+EOF -+cat >> confdefs.h <<\EOF -+#define _USE_MATH_DEFINES 1 -+EOF -+ # Otherwise MSVC's math.h doesn't #define M_PI. -+ -+ case "$CC_VERSION" in -+ 19*) -+ _CC_SUITE=14 -+ MSVS_VERSION=2015 -+ MSVC_C_RUNTIME_DLL=vcruntime140.dll -+ MSVC_CXX_RUNTIME_DLL=msvcp140.dll -+ -+ # C5026: move constructor was implicitly defined as deleted -+ CXXFLAGS="$CXXFLAGS -wd5026" -+ -+ # C5027: move assignment operator was implicitly defined as deleted -+ CXXFLAGS="$CXXFLAGS -wd5027" -+ -+ # -Zc:sizedDealloc- disables C++14 global sized deallocation (see bug 1160146) -+ CXXFLAGS="$CXXFLAGS -Zc:sizedDealloc-" -+ -+ # Disable C++11 thread-safe statics due to crashes on XP (bug 1204752) -+ # See https://connect.microsoft.com/VisualStudio/feedback/details/1789709/visual-c-2015-runtime-broken-on-windows-server-2003-c-11-magic-statics -+ CXXFLAGS="$CXXFLAGS -Zc:threadSafeInit-" -+ ;; -+ esac -+ -+ -+ -+ -+ # Check linker version -+ _LD_FULL_VERSION=`"${LD}" -v 2>&1 | sed -nre "$_MSVC_VER_FILTER"` -+ _LD_MAJOR_VERSION=`echo ${_LD_FULL_VERSION} | $AWK -F\. '{ print $1 }'` -+ if test "$_LD_MAJOR_VERSION" != "$_CC_SUITE"; then -+ { echo "configure: error: The linker major version, $_LD_FULL_VERSION, does not match the compiler suite version, $_CC_SUITE." 1>&2; echo "configure: error: The linker major version, $_LD_FULL_VERSION, does not match the compiler suite version, $_CC_SUITE." 1>&5; exit 1; } -+ fi -+ -+ INCREMENTAL_LINKER=1 -+ -+ unset _MSVC_VER_FILTER -+ -+ CFLAGS="$CFLAGS -D_HAS_EXCEPTIONS=0" -+ CXXFLAGS="$CXXFLAGS -D_HAS_EXCEPTIONS=0" -+ else -+ # Check w32api version -+ _W32API_MAJOR_VERSION=`echo $W32API_VERSION | $AWK -F\. '{ print $1 }'` -+ _W32API_MINOR_VERSION=`echo $W32API_VERSION | $AWK -F\. '{ print $2 }'` -+ echo $ac_n "checking for w32api version >= $W32API_VERSION""... $ac_c" 1>&6 -+echo "configure:2734: checking for w32api version >= $W32API_VERSION" >&5 -+ cat > conftest.$ac_ext < -+int main() { -+#if (__W32API_MAJOR_VERSION < $_W32API_MAJOR_VERSION) || \ -+ (__W32API_MAJOR_VERSION == $_W32API_MAJOR_VERSION && \ -+ __W32API_MINOR_VERSION < $_W32API_MINOR_VERSION) -+ #error "test failed." -+ #endif -+ -+; return 0; } -+EOF -+if { (eval echo configure:2748: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -+ rm -rf conftest* -+ res=yes -+else -+ echo "configure: failed program was:" >&5 -+ cat conftest.$ac_ext >&5 -+ rm -rf conftest* -+ res=no -+fi -+rm -f conftest* -+ echo "$ac_t""$res" 1>&6 -+ if test "$res" != "yes"; then -+ { echo "configure: error: w32api version $W32API_VERSION or higher required." 1>&2; echo "configure: error: w32api version $W32API_VERSION or higher required." 1>&5; exit 1; } -+ fi -+ # Check windres version -+ echo $ac_n "checking for windres version >= $WINDRES_VERSION""... $ac_c" 1>&6 -+echo "configure:2764: checking for windres version >= $WINDRES_VERSION" >&5 -+ _WINDRES_VERSION=`${WINDRES} --version 2>&1 | grep -i windres 2>/dev/null | $AWK '{ print $3 }'` -+ echo "$ac_t""$_WINDRES_VERSION" 1>&6 -+ _WINDRES_MAJOR_VERSION=`echo $_WINDRES_VERSION | $AWK -F\. '{ print $1 }'` -+ _WINDRES_MINOR_VERSION=`echo $_WINDRES_VERSION | $AWK -F\. '{ print $2 }'` -+ _WINDRES_RELEASE_VERSION=`echo $_WINDRES_VERSION | $AWK -F\. '{ print $3 }'` -+ WINDRES_MAJOR_VERSION=`echo $WINDRES_VERSION | $AWK -F\. '{ print $1 }'` -+ WINDRES_MINOR_VERSION=`echo $WINDRES_VERSION | $AWK -F\. '{ print $2 }'` -+ WINDRES_RELEASE_VERSION=`echo $WINDRES_VERSION | $AWK -F\. '{ print $3 }'` -+ if test "$_WINDRES_MAJOR_VERSION" -lt "$WINDRES_MAJOR_VERSION" -o \ -+ "$_WINDRES_MAJOR_VERSION" -eq "$WINDRES_MAJOR_VERSION" -a \ -+ "$_WINDRES_MINOR_VERSION" -lt "$WINDRES_MINOR_VERSION" -o \ -+ "$_WINDRES_MAJOR_VERSION" -eq "$WINDRES_MAJOR_VERSION" -a \ -+ "$_WINDRES_MINOR_VERSION" -eq "$WINDRES_MINOR_VERSION" -a \ -+ "$_WINDRES_RELEASE_VERSION" -lt "$WINDRES_RELEASE_VERSION" -+ then -+ { echo "configure: error: windres version $WINDRES_VERSION or higher is required to build." 1>&2; echo "configure: error: windres version $WINDRES_VERSION or higher is required to build." 1>&5; exit 1; } -+ fi -+ fi # !GNU_CC -+ -+ cat >> confdefs.pytmp <> confdefs.h <> confdefs.pytmp <> confdefs.h <> confdefs.pytmp <> confdefs.h <> confdefs.pytmp <<\EOF -+ (''' HAVE_LOCALECONV ''', ' 1 ') -+EOF -+cat >> confdefs.h <<\EOF -+#define HAVE_LOCALECONV 1 -+EOF -+ -+ cat >> confdefs.pytmp <<\EOF -+ (''' HAVE_HYPOT ''', ' 1 ') -+EOF -+cat >> confdefs.h <<\EOF -+#define HAVE_HYPOT 1 -+EOF -+ -+ for ac_func in _getc_nolock -+do -+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -+echo "configure:2837: 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 < -+#undef $ac_func -+/* 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:2869: \"$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.pytmp <> confdefs.h <&6 -+fi -+done -+ -+fi -+ -+fi # COMPILE_ENVIRONMENT -+ -+# Check to see if we are running in a broken QEMU scratchbox. -+# We know that anything below 1.0.16 is broken. -+for ac_prog in sb-conf ve -+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:2907: checking for $ac_word" >&5 -+if eval "test \"`echo '$''{'ac_cv_prog_SBCONF'+set}'`\" = set"; then -+ echo $ac_n "(cached) $ac_c" 1>&6 -+else -+ if test -n "$SBCONF"; then -+ ac_cv_prog_SBCONF="$SBCONF" # 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_SBCONF="$ac_prog" -+ break -+ fi -+ done -+ IFS="$ac_save_ifs" -+fi -+fi -+SBCONF="$ac_cv_prog_SBCONF" -+if test -n "$SBCONF"; then -+ echo "$ac_t""$SBCONF" 1>&6 -+else -+ echo "$ac_t""no" 1>&6 -+fi -+ -+test -n "$SBCONF" && break -+done -+test -n "$SBCONF" || SBCONF="""" -+ -+if test -n "$SBCONF"; then -+ _sb_version=`$SBCONF ve` -+ _sb_version_major=`echo $_sb_version | cut -f1 -d.` -+ _sb_version_minor=`echo $_sb_version | cut -f2 -d.` -+ _sb_version_point=`echo $_sb_version | cut -f3 -d.` -+ if test $_sb_version_major -eq 1 -a $_sb_version_minor -eq 0 -a $_sb_version_point -le 16; then -+ QEMU_CANT_RUN_JS_SHELL=1 -+ fi -+fi -+ -+ -+ -+ -+ -+ -+ -+ -+ -+if test "$COMPILE_ENVIRONMENT"; then -+ -+ -+ -+ -+MACOS_SDK_DIR= -+# 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 -+ -+ -+ -+ -+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; 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>&5; exit 1; } -+ fi -+ -+ CFLAGS="$CFLAGS -isysroot ${MACOS_SDK_DIR}" -+ CXXFLAGS="$CXXFLAGS -isysroot ${MACOS_SDK_DIR}" -+ -+ CPP="$CPP -isysroot ${MACOS_SDK_DIR}" -+ CXXCPP="$CXXCPP -isysroot ${MACOS_SDK_DIR}" -+ -+ -+ echo $ac_n "checking for valid compiler/Mac OS X SDK combination""... $ac_c" 1>&6 -+echo "configure:2988: checking for valid compiler/Mac OS X SDK combination" >&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 < -+ int main() { return 0; } -+int main() { -+result=yes -+; return 0; } -+EOF -+if { (eval echo configure:3005: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -+ rm -rf conftest* -+ result=no -+else -+ echo "configure: failed program was:" >&5 -+ cat conftest.$ac_ext >&5 -+fi -+rm -f 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""$result" 1>&6 -+ -+ if test "$result" = "no" ; then -+ { echo "configure: error: The selected compiler and Mac OS X SDK are incompatible." 1>&2; echo "configure: error: The selected compiler and Mac OS X SDK are incompatible." 1>&5; exit 1; } -+ fi -+fi -+ -+ -+ -+# If we find X, set shell vars x_includes and x_libraries to the -+# paths, otherwise set no_x=yes. -+# Uses ac_ vars as temps to allow command line to override cache and checks. -+# --without-x overrides everything else, but does not touch the cache. -+echo $ac_n "checking for X""... $ac_c" 1>&6 -+echo "configure:3034: checking for X" >&5 -+ -+# Check whether --with-x or --without-x was given. -+if test "${with_x+set}" = set; then -+ withval="$with_x" -+ : -+fi -+ -+# $have_x is `yes', `no', `disabled', or empty when we do not yet know. -+if test "x$with_x" = xno; then -+ # The user explicitly disabled X. -+ have_x=disabled -+else -+ if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then -+ # Both variables are already set. -+ have_x=yes -+ else -+if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then -+ echo $ac_n "(cached) $ac_c" 1>&6 -+else -+ # One or both of the vars are not set, and there is no cached value. -+ac_x_includes=NO ac_x_libraries=NO -+rm -fr conftestdir -+if mkdir conftestdir; then -+ cd conftestdir -+ # Make sure to not put "make" in the Imakefile rules, since we grep it out. -+ cat > Imakefile <<'EOF' -+acfindx: -+ @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"' -+EOF -+ if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then -+ # GNU make sometimes prints "make[1]: Entering...", which would confuse us. -+ eval `${MAKE-make} acfindx 2>/dev/null | grep -v make` -+ # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. -+ for ac_extension in a so sl; do -+ if test ! -f $ac_im_usrlibdir/libX11.$ac_extension && -+ test -f $ac_im_libdir/libX11.$ac_extension; then -+ ac_im_usrlibdir=$ac_im_libdir; break -+ fi -+ done -+ # Screen out bogus values from the imake configuration. They are -+ # bogus both because they are the default anyway, and because -+ # using them would break gcc on systems where it needs fixed includes. -+ case "$ac_im_incroot" in -+ /usr/include) ;; -+ *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;; -+ esac -+ case "$ac_im_usrlibdir" in -+ /usr/lib | /lib) ;; -+ *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;; -+ esac -+ fi -+ cd .. -+ rm -fr conftestdir -+fi -+ -+if test "$ac_x_includes" = NO; then -+ # Guess where to find include files, by looking for this one X11 .h file. -+ test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h -+ -+ # First, try using that file with no special directory specified. -+cat > conftest.$ac_ext < -+EOF -+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -+{ (eval echo configure:3101: \"$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* -+ # We can compile using X headers with no special include directory. -+ac_x_includes= -+else -+ echo "$ac_err" >&5 -+ echo "configure: failed program was:" >&5 -+ cat conftest.$ac_ext >&5 -+ rm -rf conftest* -+ # Look for the header file in a standard set of common directories. -+# Check X11 before X11Rn because it is often a symlink to the current release. -+ for ac_dir in \ -+ /usr/X11/include \ -+ /usr/X11R6/include \ -+ /usr/X11R5/include \ -+ /usr/X11R4/include \ -+ \ -+ /usr/include/X11 \ -+ /usr/include/X11R6 \ -+ /usr/include/X11R5 \ -+ /usr/include/X11R4 \ -+ \ -+ /usr/local/X11/include \ -+ /usr/local/X11R6/include \ -+ /usr/local/X11R5/include \ -+ /usr/local/X11R4/include \ -+ \ -+ /usr/local/include/X11 \ -+ /usr/local/include/X11R6 \ -+ /usr/local/include/X11R5 \ -+ /usr/local/include/X11R4 \ -+ \ -+ /usr/X386/include \ -+ /usr/x386/include \ -+ /usr/XFree86/include/X11 \ -+ \ -+ /usr/include \ -+ /usr/local/include \ -+ /usr/unsupported/include \ -+ /usr/athena/include \ -+ /usr/local/x11r5/include \ -+ /usr/lpp/Xamples/include \ -+ \ -+ /usr/openwin/include \ -+ /usr/openwin/share/include \ -+ ; \ -+ do -+ if test -r "$ac_dir/$x_direct_test_include"; then -+ ac_x_includes=$ac_dir -+ break -+ fi -+ done -+fi -+rm -f conftest* -+fi # $ac_x_includes = NO -+ -+if test "$ac_x_libraries" = NO; then -+ # Check for the libraries. -+ -+ test -z "$x_direct_test_library" && x_direct_test_library=Xt -+ test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc -+ -+ # See if we find them without any special options. -+ # Don't add to $LIBS permanently. -+ ac_save_LIBS="$LIBS" -+ LIBS="-l$x_direct_test_library $LIBS" -+cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+ rm -rf conftest* -+ LIBS="$ac_save_LIBS" -+# We can link X programs with no special library path. -+ac_x_libraries= -+else -+ echo "configure: failed program was:" >&5 -+ cat conftest.$ac_ext >&5 -+ rm -rf conftest* -+ LIBS="$ac_save_LIBS" -+# First see if replacing the include by lib works. -+# Check X11 before X11Rn because it is often a symlink to the current release. -+for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \ -+ /usr/X11/lib \ -+ /usr/X11R6/lib \ -+ /usr/X11R5/lib \ -+ /usr/X11R4/lib \ -+ \ -+ /usr/lib/X11 \ -+ /usr/lib/X11R6 \ -+ /usr/lib/X11R5 \ -+ /usr/lib/X11R4 \ -+ \ -+ /usr/local/X11/lib \ -+ /usr/local/X11R6/lib \ -+ /usr/local/X11R5/lib \ -+ /usr/local/X11R4/lib \ -+ \ -+ /usr/local/lib/X11 \ -+ /usr/local/lib/X11R6 \ -+ /usr/local/lib/X11R5 \ -+ /usr/local/lib/X11R4 \ -+ \ -+ /usr/X386/lib \ -+ /usr/x386/lib \ -+ /usr/XFree86/lib/X11 \ -+ \ -+ /usr/lib \ -+ /usr/local/lib \ -+ /usr/unsupported/lib \ -+ /usr/athena/lib \ -+ /usr/local/x11r5/lib \ -+ /usr/lpp/Xamples/lib \ -+ /lib/usr/lib/X11 \ -+ \ -+ /usr/openwin/lib \ -+ /usr/openwin/share/lib \ -+ ; \ -+do -+ for ac_extension in a so sl; do -+ if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then -+ ac_x_libraries=$ac_dir -+ break 2 -+ fi -+ done -+done -+fi -+rm -f conftest* -+fi # $ac_x_libraries = NO -+ -+if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then -+ # Didn't find X anywhere. Cache the known absence of X. -+ ac_cv_have_x="have_x=no" -+else -+ # Record where we found X for the cache. -+ ac_cv_have_x="have_x=yes \ -+ ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries" -+fi -+fi -+ fi -+ eval "$ac_cv_have_x" -+fi # $with_x != no -+ -+if test "$have_x" != yes; then -+ echo "$ac_t""$have_x" 1>&6 -+ no_x=yes -+else -+ # If each of the values was on the command line, it overrides each guess. -+ test "x$x_includes" = xNONE && x_includes=$ac_x_includes -+ test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries -+ # Update the cache value to reflect the command line values. -+ ac_cv_have_x="have_x=yes \ -+ ac_x_includes=$x_includes ac_x_libraries=$x_libraries" -+ echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6 -+fi -+ -+if test "$no_x" = yes; then -+ # Not all programs may use this symbol, but it does not hurt to define it. -+ cat >> confdefs.pytmp <<\EOF -+ (''' X_DISPLAY_MISSING ''', ' 1 ') -+EOF -+cat >> confdefs.h <<\EOF -+#define X_DISPLAY_MISSING 1 -+EOF -+ -+ X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS= -+else -+ if test -n "$x_includes"; then -+ X_CFLAGS="$X_CFLAGS -I$x_includes" -+ fi -+ -+ # It would also be nice to do this for all -L options, not just this one. -+ if test -n "$x_libraries"; then -+ X_LIBS="$X_LIBS -L$x_libraries" -+ # For Solaris; some versions of Sun CC require a space after -R and -+ # others require no space. Words are not sufficient . . . . -+ case "`(uname -sr) 2>/dev/null`" in -+ "SunOS 5"*) -+ echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6 -+echo "configure:3286: checking whether -R must be followed by a space" >&5 -+ ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries" -+ cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+ rm -rf conftest* -+ ac_R_nospace=yes -+else -+ echo "configure: failed program was:" >&5 -+ cat conftest.$ac_ext >&5 -+ rm -rf conftest* -+ ac_R_nospace=no -+fi -+rm -f conftest* -+ if test $ac_R_nospace = yes; then -+ echo "$ac_t""no" 1>&6 -+ X_LIBS="$X_LIBS -R$x_libraries" -+ else -+ LIBS="$ac_xsave_LIBS -R $x_libraries" -+ cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+ rm -rf conftest* -+ ac_R_space=yes -+else -+ echo "configure: failed program was:" >&5 -+ cat conftest.$ac_ext >&5 -+ rm -rf conftest* -+ ac_R_space=no -+fi -+rm -f conftest* -+ if test $ac_R_space = yes; then -+ echo "$ac_t""yes" 1>&6 -+ X_LIBS="$X_LIBS -R $x_libraries" -+ else -+ echo "$ac_t""neither works" 1>&6 -+ fi -+ fi -+ LIBS="$ac_xsave_LIBS" -+ esac -+ fi -+ -+ # Check for system-dependent libraries X programs must link with. -+ # Do this before checking for the system-independent R6 libraries -+ # (-lICE), since we may need -lsocket or whatever for X linking. -+ -+ if test "$ISC" = yes; then -+ X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet" -+ else -+ # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X -+ # libraries were built with DECnet support. And karl@cs.umb.edu says -+ # the Alpha needs dnet_stub (dnet does not exist). -+ echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6 -+echo "configure:3351: checking for dnet_ntoa in -ldnet" >&5 -+ac_lib_var=`echo dnet'_'dnet_ntoa | 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="-ldnet $LIBS" -+cat > conftest.$ac_ext <&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 -+ X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet" -+else -+ echo "$ac_t""no" 1>&6 -+fi -+ -+ if test $ac_cv_lib_dnet_dnet_ntoa = no; then -+ echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6 -+echo "configure:3392: checking for dnet_ntoa in -ldnet_stub" >&5 -+ac_lib_var=`echo dnet_stub'_'dnet_ntoa | 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="-ldnet_stub $LIBS" -+cat > conftest.$ac_ext <&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 -+ X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub" -+else -+ echo "$ac_t""no" 1>&6 -+fi -+ -+ fi -+ -+ # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT, -+ # to get the SysV transport functions. -+ # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4) -+ # needs -lnsl. -+ # The nsl library prevents programs from opening the X display -+ # on Irix 5.2, according to dickey@clark.net. -+ echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6 -+echo "configure:3440: checking for gethostbyname" >&5 -+if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then -+ echo $ac_n "(cached) $ac_c" 1>&6 -+else -+ cat > conftest.$ac_ext < -+#undef gethostbyname -+/* 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 gethostbyname(); -+ -+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_gethostbyname) || defined (__stub___gethostbyname) -+choke me -+#else -+gethostbyname(); -+#endif -+ -+; return 0; } -+EOF -+if { (eval echo configure:3472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+ rm -rf conftest* -+ eval "ac_cv_func_gethostbyname=yes" -+else -+ echo "configure: failed program was:" >&5 -+ cat conftest.$ac_ext >&5 -+ rm -rf conftest* -+ eval "ac_cv_func_gethostbyname=no" -+fi -+rm -f conftest* -+fi -+ -+if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then -+ echo "$ac_t""yes" 1>&6 -+ : -+else -+ echo "$ac_t""no" 1>&6 -+fi -+ -+ if test $ac_cv_func_gethostbyname = no; then -+ echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 -+echo "configure:3493: checking for gethostbyname in -lnsl" >&5 -+ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'` -+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then -+ echo $ac_n "(cached) $ac_c" 1>&6 -+else -+ ac_save_LIBS="$LIBS" -+LIBS="-lnsl $LIBS" -+cat > conftest.$ac_ext <&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 -+ X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl" -+else -+ echo "$ac_t""no" 1>&6 -+fi -+ -+ fi -+ -+ # lieder@skyler.mavd.honeywell.com says without -lsocket, -+ # socket/setsockopt and other routines are undefined under SCO ODT -+ # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary -+ # on later versions), says simon@lia.di.epfl.ch: it contains -+ # gethostby* variants that don't use the nameserver (or something). -+ # -lsocket must be given before -lnsl if both are needed. -+ # We assume that if connect needs -lnsl, so does gethostbyname. -+ echo $ac_n "checking for connect""... $ac_c" 1>&6 -+echo "configure:3542: checking for connect" >&5 -+if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then -+ echo $ac_n "(cached) $ac_c" 1>&6 -+else -+ cat > conftest.$ac_ext < -+#undef connect -+/* 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 connect(); -+ -+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_connect) || defined (__stub___connect) -+choke me -+#else -+connect(); -+#endif -+ -+; return 0; } -+EOF -+if { (eval echo configure:3574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+ rm -rf conftest* -+ eval "ac_cv_func_connect=yes" -+else -+ echo "configure: failed program was:" >&5 -+ cat conftest.$ac_ext >&5 -+ rm -rf conftest* -+ eval "ac_cv_func_connect=no" -+fi -+rm -f conftest* -+fi -+ -+if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then -+ echo "$ac_t""yes" 1>&6 -+ : -+else -+ echo "$ac_t""no" 1>&6 -+fi -+ -+ if test $ac_cv_func_connect = no; then -+ echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6 -+echo "configure:3595: checking for connect in -lsocket" >&5 -+ac_lib_var=`echo socket'_'connect | 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="-lsocket $X_EXTRA_LIBS $LIBS" -+cat > conftest.$ac_ext <&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 -+ X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS" -+else -+ echo "$ac_t""no" 1>&6 -+fi -+ -+ fi -+ -+ # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX. -+ echo $ac_n "checking for remove""... $ac_c" 1>&6 -+echo "configure:3638: checking for remove" >&5 -+if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then -+ echo $ac_n "(cached) $ac_c" 1>&6 -+else -+ cat > conftest.$ac_ext < -+#undef remove -+/* 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 remove(); -+ -+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_remove) || defined (__stub___remove) -+choke me -+#else -+remove(); -+#endif -+ -+; return 0; } -+EOF -+if { (eval echo configure:3670: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+ rm -rf conftest* -+ eval "ac_cv_func_remove=yes" -+else -+ echo "configure: failed program was:" >&5 -+ cat conftest.$ac_ext >&5 -+ rm -rf conftest* -+ eval "ac_cv_func_remove=no" -+fi -+rm -f conftest* -+fi -+ -+if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then -+ echo "$ac_t""yes" 1>&6 -+ : -+else -+ echo "$ac_t""no" 1>&6 -+fi -+ -+ if test $ac_cv_func_remove = no; then -+ echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6 -+echo "configure:3691: checking for remove in -lposix" >&5 -+ac_lib_var=`echo posix'_'remove | 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="-lposix $LIBS" -+cat > conftest.$ac_ext <&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 -+ X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix" -+else -+ echo "$ac_t""no" 1>&6 -+fi -+ -+ fi -+ -+ # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. -+ echo $ac_n "checking for shmat""... $ac_c" 1>&6 -+echo "configure:3734: checking for shmat" >&5 -+if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then -+ echo $ac_n "(cached) $ac_c" 1>&6 -+else -+ cat > conftest.$ac_ext < -+#undef shmat -+/* 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 shmat(); -+ -+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_shmat) || defined (__stub___shmat) -+choke me -+#else -+shmat(); -+#endif -+ -+; return 0; } -+EOF -+if { (eval echo configure:3766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+ rm -rf conftest* -+ eval "ac_cv_func_shmat=yes" -+else -+ echo "configure: failed program was:" >&5 -+ cat conftest.$ac_ext >&5 -+ rm -rf conftest* -+ eval "ac_cv_func_shmat=no" -+fi -+rm -f conftest* -+fi -+ -+if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then -+ echo "$ac_t""yes" 1>&6 -+ : -+else -+ echo "$ac_t""no" 1>&6 -+fi -+ -+ if test $ac_cv_func_shmat = no; then -+ echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6 -+echo "configure:3787: checking for shmat in -lipc" >&5 -+ac_lib_var=`echo ipc'_'shmat | 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="-lipc $LIBS" -+cat > conftest.$ac_ext <&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 -+ X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc" -+else -+ echo "$ac_t""no" 1>&6 -+fi -+ -+ fi -+ fi -+ -+ # Check for libraries that X11R6 Xt/Xaw programs need. -+ ac_save_LDFLAGS="$LDFLAGS" -+ test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries" -+ # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to -+ # check for ICE first), but we must link in the order -lSM -lICE or -+ # we get undefined symbols. So assume we have SM if we have ICE. -+ # These have to be linked with before -lX11, unlike the other -+ # libraries we check for below, so use a different variable. -+ # --interran@uluru.Stanford.EDU, kb@cs.umb.edu. -+ echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6 -+echo "configure:3839: checking for IceConnectionNumber in -lICE" >&5 -+ac_lib_var=`echo ICE'_'IceConnectionNumber | 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="-lICE $X_EXTRA_LIBS $LIBS" -+cat > conftest.$ac_ext <&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 -+ X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE" -+else -+ echo "$ac_t""no" 1>&6 -+fi -+ -+ LDFLAGS="$ac_save_LDFLAGS" -+ -+fi -+ -+ -+XCFLAGS="$X_CFLAGS" -+ -+fi # COMPILE_ENVIRONMENT -+ -+MOZILLA_VERSION=`$PYTHON $srcdir/python/mozbuild/mozbuild/milestone.py --topsrcdir $srcdir` -+MOZILLA_UAVERSION=`$PYTHON $srcdir/python/mozbuild/mozbuild/milestone.py --topsrcdir $srcdir --uaversion` -+MOZILLA_SYMBOLVERSION=`$PYTHON $srcdir/python/mozbuild/mozbuild/milestone.py --topsrcdir $srcdir --symbolversion` -+if test -z "$MOZILLA_VERSION"; then -+ { echo "configure: error: failed to read version info from milestone file" 1>&2; echo "configure: error: failed to read version info from milestone file" 1>&5; exit 1; } -+fi -+ -+cat >> confdefs.pytmp <> confdefs.h <> confdefs.pytmp <> confdefs.h <> confdefs.pytmp <> confdefs.h <> confdefs.pytmp <> confdefs.h <> confdefs.pytmp <> confdefs.h <&2; echo "configure: error: --with-arch is not supported on non-GNU toolchains" 1>&5; exit 1; } -+ fi -+ MOZ_ARCH=$withval -+fi -+ -+ -+if test -z "$MOZ_ARCH"; then -+ case "${CPU_ARCH}-${OS_TARGET}" in -+ arm-Android) -+ MOZ_THUMB=yes -+ MOZ_ARCH=armv7-a -+ MOZ_FPU=vfp -+ MOZ_FLOAT_ABI=softfp -+ MOZ_ALIGN=no -+ ;; -+ arm-Darwin) -+ MOZ_ARCH=toolchain-default -+ ;; -+ esac -+fi -+ -+if test "$MOZ_ARCH" = "armv6" -a "$OS_TARGET" = "Android"; then -+ MOZ_FPU=vfp -+ MOZ_FLOAT_ABI=softfp -+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 toolchains" 1>&2; echo "configure: error: --with-thumb is not supported on non-GNU toolchains" 1>&5; 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 toolchains" 1>&2; echo "configure: error: --with-thumb-interwork is not supported on non-GNU toolchains" 1>&5; exit 1; } -+ fi -+ MOZ_THUMB_INTERWORK=$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 toolchains" 1>&2; echo "configure: error: --with-fpu is not supported on non-GNU toolchains" 1>&5; 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 toolchains" 1>&2; echo "configure: error: --with-float-abi is not supported on non-GNU toolchains" 1>&5; 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 toolchains" 1>&2; echo "configure: error: --with-soft-float is not supported on non-GNU toolchains" 1>&5; 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 <&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 -+ -+if test "$MOZ_THUMB2" = 1; then -+ cat >> confdefs.pytmp <<\EOF -+ (''' MOZ_THUMB2 ''', ' 1 ') -+EOF -+cat >> confdefs.h <<\EOF -+#define MOZ_THUMB2 1 -+EOF -+ -+fi -+ -+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 -+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" -+ echo $ac_n "checking whether alignment flag ($align_flag) is supported""... $ac_c" 1>&6 -+echo "configure:4172: checking whether alignment flag ($align_flag) is supported" >&5 -+ cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then -+ : -+else -+ echo "configure: failed program was:" >&5 -+ cat conftest.$ac_ext >&5 -+ rm -rf conftest* -+ align_flag="" -+fi -+rm -f conftest* -+ 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" -+ echo $ac_n "checking whether the chosen combination of compiler flags ($all_flags) works""... $ac_c" 1>&6 -+echo "configure:4198: checking whether the chosen combination of compiler flags ($all_flags) works" >&5 -+ cat > conftest.$ac_ext <&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; echo "configure: error: no" 1>&5; 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 -+ -+ -+ -+if test "$CPU_ARCH" = "arm"; then -+ NEON_FLAGS="-mfpu=neon" -+ echo $ac_n "checking for ARM SIMD support in compiler""... $ac_c" 1>&6 -+echo "configure:4231: checking for ARM SIMD support in compiler" >&5 -+ # We try to link so that this also fails when -+ # building with LTO. -+ cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+ rm -rf conftest* -+ 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 -+ cat >> confdefs.pytmp <<\EOF -+ (''' HAVE_ARM_SIMD ''', ' 1 ') -+EOF -+cat >> confdefs.h <<\EOF -+#define HAVE_ARM_SIMD 1 -+EOF -+ -+ HAVE_ARM_SIMD=1 -+ fi -+ -+ echo $ac_n "checking ARM version support in compiler""... $ac_c" 1>&6 -+echo "configure:4265: checking ARM version support in compiler" >&5 -+ ARM_ARCH=`${CC-cc} ${CFLAGS} -dM -E - < /dev/null | sed -n 's/.*__ARM_ARCH_\([0-9][0-9]*\).*/\1/p'` -+ echo "$ac_t"""$ARM_ARCH"" 1>&6 -+ -+ echo $ac_n "checking for ARM NEON support in compiler""... $ac_c" 1>&6 -+echo "configure:4270: checking for ARM NEON support in compiler" >&5 -+ # We try to link so that this also fails when -+ # building with LTO. -+ cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+ rm -rf conftest* -+ 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 -+ cat >> confdefs.pytmp <<\EOF -+ (''' HAVE_ARM_NEON ''', ' 1 ') -+EOF -+cat >> confdefs.h <<\EOF -+#define HAVE_ARM_NEON 1 -+EOF -+ -+ HAVE_ARM_NEON=1 -+ -+ if test -n "$ARM_ARCH"; then -+ if test "$ARM_ARCH" -lt 7; then -+ BUILD_ARM_NEON= -+ else -+ cat >> confdefs.pytmp <<\EOF -+ (''' BUILD_ARM_NEON ''', ' 1 ') -+EOF -+cat >> confdefs.h <<\EOF -+#define BUILD_ARM_NEON 1 -+EOF -+ -+ BUILD_ARM_NEON=1 -+ fi -+ fi -+ fi -+ -+fi # CPU_ARCH = arm -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+if test "$OS_TARGET" = "Android"; then -+ case "${CPU_ARCH}-${MOZ_ARCH}" in -+ arm-armv7*) -+ ANDROID_CPU_ARCH=armeabi-v7a -+ ;; -+ arm-*) -+ ANDROID_CPU_ARCH=armeabi -+ ;; -+ x86-*) -+ ANDROID_CPU_ARCH=x86 -+ ;; -+ mips32-*) # When target_cpu is mipsel, CPU_ARCH is mips32 -+ ANDROID_CPU_ARCH=mips -+ ;; -+ aarch64-*) -+ ANDROID_CPU_ARCH=arm64-v8a -+ ;; -+ esac -+ -+ -+fi -+ -+ -+ -+if test "$OS_TARGET" = "Android"; then -+ cpu_arch_dir="$ANDROID_CPU_ARCH" -+ # NDK r12 removed the arm/thumb library split and just made everything -+ # thumb by default. Attempt to compensate. -+ if test "$MOZ_THUMB2" = 1 -a -d "$cpu_arch_dir/thumb"; then -+ cpu_arch_dir="$cpu_arch_dir/thumb" -+ fi -+ -+ if test -z "$STLPORT_CPPFLAGS$STLPORT_LIBS"; then -+ case "$android_cxx_stl" in -+ libstdc++) -+ # android-ndk-r8b and later -+ ndk_base="$android_ndk/sources/cxx-stl/gnu-libstdc++/$android_gnu_compiler_version" -+ ndk_libs_include="$ndk_base/libs/$ANDROID_CPU_ARCH" -+ ndk_libs="$ndk_base/libs/$cpu_arch_dir" -+ ndk_include="$ndk_base/include" -+ -+ if ! test -e "$ndk_libs/libgnustl_static.a"; then -+ { echo "configure: error: Couldn't find path to gnu-libstdc++ in the android ndk" 1>&2; echo "configure: error: Couldn't find path to gnu-libstdc++ in the android ndk" 1>&5; exit 1; } -+ fi -+ -+ STLPORT_LIBS="-L$ndk_libs -lgnustl_static" -+ STLPORT_CPPFLAGS="-I$ndk_include -I$ndk_include/backward -I$ndk_libs_include/include" -+ ;; -+ libc++) -+ # android-ndk-r8b and later -+ ndk_base="$android_ndk/sources/cxx-stl" -+ cxx_base="$ndk_base/llvm-libc++" -+ cxx_libs="$cxx_base/libs/$cpu_arch_dir" -+ cxx_include="$cxx_base/libcxx/include" -+ cxxabi_base="$ndk_base/llvm-libc++abi" -+ cxxabi_include="$cxxabi_base/libcxxabi/include" -+ -+ if ! test -e "$cxx_libs/libc++_static.a"; then -+ { echo "configure: error: Couldn't find path to llvm-libc++ in the android ndk" 1>&2; echo "configure: error: Couldn't find path to llvm-libc++ in the android ndk" 1>&5; exit 1; } -+ fi -+ -+ STLPORT_LIBS="-L$cxx_libs -lc++_static" -+ # NDK r12 split the libc++ runtime libraries into pieces. -+ for lib in c++abi unwind android_support; do -+ if test -e "$cxx_libs/lib${lib}.a"; then -+ STLPORT_LIBS="$STLPORT_LIBS -l${lib}" -+ fi -+ done -+ # Add android/support/include/ for prototyping long double math -+ # functions, locale-specific C library functions, multibyte support, -+ # etc. -+ STLPORT_CPPFLAGS="-I$android_ndk/sources/android/support/include -I$cxx_include -I$cxxabi_include" -+ ;; -+ *) -+ { echo "configure: error: Bad value for --enable-android-cxx-stl" 1>&2; echo "configure: error: Bad value for --enable-android-cxx-stl" 1>&5; exit 1; } -+ ;; -+ esac -+ fi -+ CXXFLAGS="$CXXFLAGS $STLPORT_CPPFLAGS" -+fi -+MOZ_ANDROID_CXX_STL=$android_cxx_stl -+ -+ -+ -+ -+ -+if test -n "${CLANG_CC}${CLANG_CL}"; then -+ _WARNINGS_CFLAGS="-Qunused-arguments ${_WARNINGS_CFLAGS}" -+ CPPFLAGS="-Qunused-arguments ${CPPFLAGS}" -+fi -+if test -n "${CLANG_CXX}${CLANG_CL}"; then -+ _WARNINGS_CXXFLAGS="-Qunused-arguments ${_WARNINGS_CXXFLAGS}" -+fi -+ -+ -+ -+# Check whether --enable-address-sanitizer or --disable-address-sanitizer was given. -+if test "${enable_address_sanitizer+set}" = set; then -+ enableval="$enable_address_sanitizer" -+ if test "$enableval" = "yes"; then -+ MOZ_ASAN=1 -+ elif test "$enableval" = "no"; then -+ MOZ_ASAN= -+ else -+ { echo "configure: error: Option, address-sanitizer, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, address-sanitizer, does not take an argument ($enableval)." 1>&5; exit 1; } -+ fi -+fi -+ -+if test -n "$MOZ_ASAN"; then -+ MOZ_LLVM_HACKS=1 -+ if test -n "$CLANG_CL"; then -+ # Look for the ASan runtime binary -+ if test "$CPU_ARCH" = "x86_64"; then -+ MOZ_CLANG_RT_ASAN_LIB=clang_rt.asan_dynamic-x86_64.dll -+ else -+ MOZ_CLANG_RT_ASAN_LIB=clang_rt.asan_dynamic-i386.dll -+ fi -+ # We use MOZ_PATH_PROG in order to get a Windows style path. -+ # Extract the first word of "$MOZ_CLANG_RT_ASAN_LIB", so it can be a program name with args. -+set dummy $MOZ_CLANG_RT_ASAN_LIB; ac_word=$2 -+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -+echo "configure:4452: checking for $ac_word" >&5 -+if eval "test \"`echo '$''{'ac_cv_path_MOZ_CLANG_RT_ASAN_LIB_PATH'+set}'`\" = set"; then -+ echo $ac_n "(cached) $ac_c" 1>&6 -+else -+ case "$MOZ_CLANG_RT_ASAN_LIB_PATH" in -+ /*) -+ ac_cv_path_MOZ_CLANG_RT_ASAN_LIB_PATH="$MOZ_CLANG_RT_ASAN_LIB_PATH" # Let the user override the test with a path. -+ ;; -+ ?:/*) -+ ac_cv_path_MOZ_CLANG_RT_ASAN_LIB_PATH="$MOZ_CLANG_RT_ASAN_LIB_PATH" # 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_MOZ_CLANG_RT_ASAN_LIB_PATH="$ac_dir/$ac_word" -+ break -+ fi -+ done -+ IFS="$ac_save_ifs" -+ ;; -+esac -+fi -+MOZ_CLANG_RT_ASAN_LIB_PATH="$ac_cv_path_MOZ_CLANG_RT_ASAN_LIB_PATH" -+if test -n "$MOZ_CLANG_RT_ASAN_LIB_PATH"; then -+ echo "$ac_t""$MOZ_CLANG_RT_ASAN_LIB_PATH" 1>&6 -+else -+ echo "$ac_t""no" 1>&6 -+fi -+ -+ if test "$msyshost"; then -+ case "$MOZ_CLANG_RT_ASAN_LIB_PATH" in -+ /*) -+ tmp_DIRNAME=`dirname "$MOZ_CLANG_RT_ASAN_LIB_PATH"` -+ tmp_BASENAME=`basename "$MOZ_CLANG_RT_ASAN_LIB_PATH"` -+ tmp_PWD=`cd "$tmp_DIRNAME" && pwd -W` -+ MOZ_CLANG_RT_ASAN_LIB_PATH="$tmp_PWD/$tmp_BASENAME" -+ if test -e "$MOZ_CLANG_RT_ASAN_LIB_PATH.exe"; then -+ MOZ_CLANG_RT_ASAN_LIB_PATH="$MOZ_CLANG_RT_ASAN_LIB_PATH.exe" -+ fi -+ esac -+ fi -+ -+ if test -z "$MOZ_CLANG_RT_ASAN_LIB_PATH"; then -+ { echo "configure: error: Couldn't find $MOZ_CLANG_RT_ASAN_LIB. It should be available in the same location as clang-cl." 1>&2; echo "configure: error: Couldn't find $MOZ_CLANG_RT_ASAN_LIB. It should be available in the same location as clang-cl." 1>&5; exit 1; } -+ fi -+ -+ # Suppressing errors in recompiled code. -+ if test "$OS_ARCH" = "WINNT"; then -+ CFLAGS="-fsanitize-blacklist=$_topsrcdir/build/sanitizers/asan_blacklist_win.txt $CFLAGS" -+ CXXFLAGS="-fsanitize-blacklist=$_topsrcdir/build/sanitizers/asan_blacklist_win.txt $CXXFLAGS" -+ fi -+ fi -+ CFLAGS="-fsanitize=address $CFLAGS" -+ CXXFLAGS="-fsanitize=address $CXXFLAGS" -+ if test -z "$CLANG_CL"; then -+ LDFLAGS="-fsanitize=address $LDFLAGS" -+ fi -+ cat >> confdefs.pytmp <<\EOF -+ (''' MOZ_ASAN ''', ' 1 ') -+EOF -+cat >> confdefs.h <<\EOF -+#define MOZ_ASAN 1 -+EOF -+ -+ # Extract the first word of "llvm-symbolizer", so it can be a program name with args. -+set dummy llvm-symbolizer; ac_word=$2 -+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -+echo "configure:4522: checking for $ac_word" >&5 -+if eval "test \"`echo '$''{'ac_cv_path_LLVM_SYMBOLIZER'+set}'`\" = set"; then -+ echo $ac_n "(cached) $ac_c" 1>&6 -+else -+ case "$LLVM_SYMBOLIZER" in -+ /*) -+ ac_cv_path_LLVM_SYMBOLIZER="$LLVM_SYMBOLIZER" # Let the user override the test with a path. -+ ;; -+ ?:/*) -+ ac_cv_path_LLVM_SYMBOLIZER="$LLVM_SYMBOLIZER" # 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_LLVM_SYMBOLIZER="$ac_dir/$ac_word" -+ break -+ fi -+ done -+ IFS="$ac_save_ifs" -+ ;; -+esac -+fi -+LLVM_SYMBOLIZER="$ac_cv_path_LLVM_SYMBOLIZER" -+if test -n "$LLVM_SYMBOLIZER"; then -+ echo "$ac_t""$LLVM_SYMBOLIZER" 1>&6 -+else -+ echo "$ac_t""no" 1>&6 -+fi -+ -+ if test "$msyshost"; then -+ case "$LLVM_SYMBOLIZER" in -+ /*) -+ tmp_DIRNAME=`dirname "$LLVM_SYMBOLIZER"` -+ tmp_BASENAME=`basename "$LLVM_SYMBOLIZER"` -+ tmp_PWD=`cd "$tmp_DIRNAME" && pwd -W` -+ LLVM_SYMBOLIZER="$tmp_PWD/$tmp_BASENAME" -+ if test -e "$LLVM_SYMBOLIZER.exe"; then -+ LLVM_SYMBOLIZER="$LLVM_SYMBOLIZER.exe" -+ fi -+ esac -+ fi -+ -+fi -+ -+ -+# Check whether --enable-memory-sanitizer or --disable-memory-sanitizer was given. -+if test "${enable_memory_sanitizer+set}" = set; then -+ enableval="$enable_memory_sanitizer" -+ if test "$enableval" = "yes"; then -+ MOZ_MSAN=1 -+ elif test "$enableval" = "no"; then -+ MOZ_MSAN= -+ else -+ { echo "configure: error: Option, memory-sanitizer, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, memory-sanitizer, does not take an argument ($enableval)." 1>&5; exit 1; } -+ fi -+fi -+ -+if test -n "$MOZ_MSAN"; then -+ MOZ_LLVM_HACKS=1 -+ CFLAGS="-fsanitize=memory -fsanitize-memory-track-origins $CFLAGS" -+ CXXFLAGS="-fsanitize=memory -fsanitize-memory-track-origins $CXXFLAGS" -+ if test -z "$CLANG_CL"; then -+ LDFLAGS="-fsanitize=memory -fsanitize-memory-track-origins $LDFLAGS" -+ fi -+ cat >> confdefs.pytmp <<\EOF -+ (''' MOZ_MSAN ''', ' 1 ') -+EOF -+cat >> confdefs.h <<\EOF -+#define MOZ_MSAN 1 -+EOF -+ -+ # Extract the first word of "llvm-symbolizer", so it can be a program name with args. -+set dummy llvm-symbolizer; ac_word=$2 -+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -+echo "configure:4599: checking for $ac_word" >&5 -+if eval "test \"`echo '$''{'ac_cv_path_LLVM_SYMBOLIZER'+set}'`\" = set"; then -+ echo $ac_n "(cached) $ac_c" 1>&6 -+else -+ case "$LLVM_SYMBOLIZER" in -+ /*) -+ ac_cv_path_LLVM_SYMBOLIZER="$LLVM_SYMBOLIZER" # Let the user override the test with a path. -+ ;; -+ ?:/*) -+ ac_cv_path_LLVM_SYMBOLIZER="$LLVM_SYMBOLIZER" # 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_LLVM_SYMBOLIZER="$ac_dir/$ac_word" -+ break -+ fi -+ done -+ IFS="$ac_save_ifs" -+ ;; -+esac -+fi -+LLVM_SYMBOLIZER="$ac_cv_path_LLVM_SYMBOLIZER" -+if test -n "$LLVM_SYMBOLIZER"; then -+ echo "$ac_t""$LLVM_SYMBOLIZER" 1>&6 -+else -+ echo "$ac_t""no" 1>&6 -+fi -+ -+ if test "$msyshost"; then -+ case "$LLVM_SYMBOLIZER" in -+ /*) -+ tmp_DIRNAME=`dirname "$LLVM_SYMBOLIZER"` -+ tmp_BASENAME=`basename "$LLVM_SYMBOLIZER"` -+ tmp_PWD=`cd "$tmp_DIRNAME" && pwd -W` -+ LLVM_SYMBOLIZER="$tmp_PWD/$tmp_BASENAME" -+ if test -e "$LLVM_SYMBOLIZER.exe"; then -+ LLVM_SYMBOLIZER="$LLVM_SYMBOLIZER.exe" -+ fi -+ esac -+ fi -+ -+fi -+ -+ -+# Check whether --enable-thread-sanitizer or --disable-thread-sanitizer was given. -+if test "${enable_thread_sanitizer+set}" = set; then -+ enableval="$enable_thread_sanitizer" -+ if test "$enableval" = "yes"; then -+ MOZ_TSAN=1 -+ elif test "$enableval" = "no"; then -+ MOZ_TSAN= -+ else -+ { echo "configure: error: Option, thread-sanitizer, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, thread-sanitizer, does not take an argument ($enableval)." 1>&5; exit 1; } -+ fi -+fi -+ -+if test -n "$MOZ_TSAN"; then -+ MOZ_LLVM_HACKS=1 -+ CFLAGS="-fsanitize=thread $CFLAGS" -+ CXXFLAGS="-fsanitize=thread $CXXFLAGS" -+ if test -z "$CLANG_CL"; then -+ LDFLAGS="-fsanitize=thread $LDFLAGS" -+ fi -+ cat >> confdefs.pytmp <<\EOF -+ (''' MOZ_TSAN ''', ' 1 ') -+EOF -+cat >> confdefs.h <<\EOF -+#define MOZ_TSAN 1 -+EOF -+ -+ # Extract the first word of "llvm-symbolizer", so it can be a program name with args. -+set dummy llvm-symbolizer; ac_word=$2 -+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -+echo "configure:4676: checking for $ac_word" >&5 -+if eval "test \"`echo '$''{'ac_cv_path_LLVM_SYMBOLIZER'+set}'`\" = set"; then -+ echo $ac_n "(cached) $ac_c" 1>&6 -+else -+ case "$LLVM_SYMBOLIZER" in -+ /*) -+ ac_cv_path_LLVM_SYMBOLIZER="$LLVM_SYMBOLIZER" # Let the user override the test with a path. -+ ;; -+ ?:/*) -+ ac_cv_path_LLVM_SYMBOLIZER="$LLVM_SYMBOLIZER" # 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_LLVM_SYMBOLIZER="$ac_dir/$ac_word" -+ break -+ fi -+ done -+ IFS="$ac_save_ifs" -+ ;; -+esac -+fi -+LLVM_SYMBOLIZER="$ac_cv_path_LLVM_SYMBOLIZER" -+if test -n "$LLVM_SYMBOLIZER"; then -+ echo "$ac_t""$LLVM_SYMBOLIZER" 1>&6 -+else -+ echo "$ac_t""no" 1>&6 -+fi -+ -+ if test "$msyshost"; then -+ case "$LLVM_SYMBOLIZER" in -+ /*) -+ tmp_DIRNAME=`dirname "$LLVM_SYMBOLIZER"` -+ tmp_BASENAME=`basename "$LLVM_SYMBOLIZER"` -+ tmp_PWD=`cd "$tmp_DIRNAME" && pwd -W` -+ LLVM_SYMBOLIZER="$tmp_PWD/$tmp_BASENAME" -+ if test -e "$LLVM_SYMBOLIZER.exe"; then -+ LLVM_SYMBOLIZER="$LLVM_SYMBOLIZER.exe" -+ fi -+ esac -+ fi -+ -+fi -+ -+ -+# The LLVM symbolizer is used by all sanitizers -+ -+ -+# Check whether --enable-llvm-hacks or --disable-llvm-hacks was given. -+if test "${enable_llvm_hacks+set}" = set; then -+ enableval="$enable_llvm_hacks" -+ if test "$enableval" = "yes"; then -+ MOZ_LLVM_HACKS=1 -+ elif test "$enableval" = "no"; then -+ MOZ_LLVM_HACKS= -+ else -+ { echo "configure: error: Option, llvm-hacks, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, llvm-hacks, does not take an argument ($enableval)." 1>&5; exit 1; } -+ fi -+fi -+ -+if test -n "$MOZ_LLVM_HACKS"; then -+ MOZ_NO_WLZDEFS=1 -+ MOZ_CFLAGS_NSS=1 -+fi -+ -+ -+ -+cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+ : -+else -+ echo "configure: failed program was:" >&5 -+ cat conftest.$ac_ext >&5 -+ rm -rf conftest* -+ { echo "configure: error: compiler is incompatible with sanitize options" 1>&2; echo "configure: error: compiler is incompatible with sanitize options" 1>&5; exit 1; } -+fi -+rm -f conftest* -+ -+ -+ -+if test "$GNU_CC"; then -+ MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -Wl,-h,$(DSO_SONAME) -o $@' -+ MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -Wl,-h,$(DSO_SONAME) -o $@' -+ DSO_LDOPTS='-shared' -+ if test "$GCC_USE_GNU_LD"; then -+ # Some tools like ASan use a runtime library that is only -+ # linked against executables, so we must allow undefined -+ # symbols for shared objects in some cases. -+ if test -z "$MOZ_NO_WLZDEFS"; then -+ # Don't allow undefined symbols in libraries -+ DSO_LDOPTS="$DSO_LDOPTS -Wl,-z,defs" -+ fi -+ fi -+ WARNINGS_AS_ERRORS='-Werror' -+ DSO_CFLAGS='' -+ DSO_PIC_CFLAGS='-fPIC' -+ ASFLAGS="$ASFLAGS -fPIC" -+ echo $ac_n "checking for --noexecstack option to as""... $ac_c" 1>&6 -+echo "configure:4784: checking for --noexecstack option to as" >&5 -+ _SAVE_CFLAGS=$CFLAGS -+ CFLAGS="$CFLAGS -Wa,--noexecstack" -+ cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then -+ rm -rf conftest* -+ echo "$ac_t""yes" 1>&6 -+ ASFLAGS="$ASFLAGS -Wa,--noexecstack" -+else -+ echo "configure: failed program was:" >&5 -+ cat conftest.$ac_ext >&5 -+ rm -rf conftest* -+ echo "$ac_t""no" 1>&6 -+fi -+rm -f conftest* -+ CFLAGS=$_SAVE_CFLAGS -+ echo $ac_n "checking for -z noexecstack option to ld""... $ac_c" 1>&6 -+echo "configure:4808: checking for -z noexecstack option to ld" >&5 -+ _SAVE_LDFLAGS=$LDFLAGS -+ LDFLAGS="$LDFLAGS -Wl,-z,noexecstack" -+ cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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 "$ac_t""no" 1>&6 -+ LDFLAGS=$_SAVE_LDFLAGS -+fi -+rm -f conftest* -+ -+ echo $ac_n "checking for -z text option to ld""... $ac_c" 1>&6 -+echo "configure:4832: checking for -z text option to ld" >&5 -+ _SAVE_LDFLAGS=$LDFLAGS -+ LDFLAGS="$LDFLAGS -Wl,-z,text" -+ cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+ rm -rf conftest* -+ echo "$ac_t""yes" 1>&6 -+ NSPR_LDFLAGS="$NSPR_LDFLAGS -Wl,-z,text" -+else -+ echo "configure: failed program was:" >&5 -+ cat conftest.$ac_ext >&5 -+ rm -rf conftest* -+ echo "$ac_t""no" 1>&6 -+ LDFLAGS=$_SAVE_LDFLAGS -+fi -+rm -f conftest* -+ -+ echo $ac_n "checking for --build-id option to ld""... $ac_c" 1>&6 -+echo "configure:4857: checking for --build-id option to ld" >&5 -+ _SAVE_LDFLAGS=$LDFLAGS -+ LDFLAGS="$LDFLAGS -Wl,--build-id" -+ cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+ rm -rf conftest* -+ echo "$ac_t""yes" 1>&6 -+ NSPR_LDFLAGS="$NSPR_LDFLAGS -Wl,--build-id" -+else -+ echo "configure: failed program was:" >&5 -+ cat conftest.$ac_ext >&5 -+ rm -rf conftest* -+ echo "$ac_t""no" 1>&6 -+ LDFLAGS=$_SAVE_LDFLAGS -+fi -+rm -f conftest* -+ -+ _DEFINES_CFLAGS='-include $(topobjdir)/js/src/js-confdefs.h -DMOZILLA_CLIENT' -+ _USE_CPP_INCLUDE_FLAG=1 -+ -+else -+ MKSHLIB='$(LD) $(DSO_LDOPTS) -h $(DSO_SONAME) -o $@' -+ MKCSHLIB='$(LD) $(DSO_LDOPTS) -h $(DSO_SONAME) -o $@' -+ -+ DSO_LDOPTS='-shared' -+ if test "$GNU_LD"; then -+ # Don't allow undefined symbols in libraries -+ DSO_LDOPTS="$DSO_LDOPTS -z defs" -+ fi -+ -+ DSO_CFLAGS='' -+ DSO_PIC_CFLAGS='-KPIC' -+ _DEFINES_CFLAGS='$(ACDEFINES) -D_JS_CONFDEFS_H_ -DMOZILLA_CLIENT' -+fi -+ -+if test "$GNU_CXX"; then -+ _DEFINES_CXXFLAGS='-DMOZILLA_CLIENT -include $(topobjdir)/js/src/js-confdefs.h' -+ _USE_CPP_INCLUDE_FLAG=1 -+ -+else -+ _DEFINES_CXXFLAGS='-DMOZILLA_CLIENT -D_JS_CONFDEFS_H_ $(ACDEFINES)' -+fi -+ -+case "$host" in -+*mingw*) -+ if test -n "$_WIN32_MSVC"; then -+ HOST_AR=lib -+ HOST_AR_FLAGS='-NOLOGO -OUT:$@' -+ HOST_CFLAGS="$HOST_CFLAGS -TC -nologo" -+ HOST_RANLIB='echo ranlib' -+ else -+ HOST_CFLAGS="$HOST_CFLAGS -mwindows" -+ fi -+ HOST_CFLAGS="$HOST_CFLAGS -DXP_WIN32 -DXP_WIN -DWIN32 -D_WIN32 -D_CRT_SECURE_NO_WARNINGS" -+ HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O2}" -+ HOST_BIN_SUFFIX=.exe -+ -+ case "${host_cpu}" in -+ i*86) -+ if test -n "$_WIN32_MSVC"; then -+ HOST_LDFLAGS="$HOST_LDFLAGS -MACHINE:X86" -+ fi -+ ;; -+ x86_64) -+ if test -n "$_WIN32_MSVC"; then -+ HOST_LDFLAGS="$HOST_LDFLAGS -MACHINE:X64" -+ fi -+ HOST_CFLAGS="$HOST_CFLAGS -D_AMD64_" -+ ;; -+ esac -+ ;; -+ -+*-darwin*) -+ HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX -DXP_MACOSX" -+ HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O3}" -+ ;; -+ -+*-linux*|*-kfreebsd*-gnu|*-gnu*) -+ HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX" -+ HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O3}" -+ ;; -+ -+*) -+ HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX" -+ HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O2}" -+ ;; -+esac -+ -+ -+ cat > conftest.c </dev/null 2>&1; then -+ if grep '^target triple =' conftest.s; then -+ lto_is_enabled=yes -+ fi -+ fi -+ rm -f conftest.cs -+ -+ -+ -+case "$target" in -+*-darwin*) -+ MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -o $@' -+ MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -o $@' -+ MOZ_OPTIMIZE_FLAGS="-O3 -fno-stack-protector" -+ CFLAGS="$CFLAGS -fno-common" -+ CXXFLAGS="$CXXFLAGS -fno-common -stdlib=libc++" -+ DLL_SUFFIX=".dylib" -+ DSO_LDOPTS='' -+ STRIP="$STRIP -x -S" -+ LDFLAGS="$LDFLAGS -lobjc" -+ # The ExceptionHandling framework is needed for Objective-C exception -+ # logging code in nsObjCExceptions.h. Currently we only use that in debug -+ # builds. -+ _SAVE_LDFLAGS=$LDFLAGS -+ echo $ac_n "checking for -framework ExceptionHandling""... $ac_c" 1>&6 -+echo "configure:4982: checking for -framework ExceptionHandling" >&5 -+ LDFLAGS="$LDFLAGS -framework ExceptionHandling" -+ cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+ rm -rf conftest* -+ ac_cv_have_framework_exceptionhandling="yes" -+else -+ echo "configure: failed program was:" >&5 -+ cat conftest.$ac_ext >&5 -+ rm -rf conftest* -+ ac_cv_have_framework_exceptionhandling="no" -+fi -+rm -f conftest* -+ echo "$ac_t""$ac_cv_have_framework_exceptionhandling" 1>&6 -+ if test "$ac_cv_have_framework_exceptionhandling" = "yes"; then -+ MOZ_DEBUG_LDFLAGS="$MOZ_DEBUG_LDFLAGS -framework ExceptionHandling"; -+ fi -+ LDFLAGS=$_SAVE_LDFLAGS -+ -+ if test "x$lto_is_enabled" = "xyes"; then -+ echo "Skipping -dead_strip because lto is enabled." -+ elif test "x$enable_dtrace" = "xyes"; then -+ echo "Skipping -dead_strip because DTrace is enabled. See bug 403132." -+ else -+ echo $ac_n "checking for -dead_strip option to ld""... $ac_c" 1>&6 -+echo "configure:5014: checking for -dead_strip option to ld" >&5 -+ _SAVE_LDFLAGS=$LDFLAGS -+ LDFLAGS="$LDFLAGS -Wl,-dead_strip" -+ cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+ rm -rf conftest* -+ _HAVE_DEAD_STRIP=1 -+else -+ echo "configure: failed program was:" >&5 -+ cat conftest.$ac_ext >&5 -+ rm -rf conftest* -+ _HAVE_DEAD_STRIP= -+fi -+rm -f conftest* -+ if test -n "$_HAVE_DEAD_STRIP" ; then -+ echo "$ac_t""yes" 1>&6 -+ MOZ_OPTIMIZE_LDFLAGS="-Wl,-dead_strip" -+ else -+ echo "$ac_t""no" 1>&6 -+ fi -+ -+ LDFLAGS=$_SAVE_LDFLAGS -+ fi -+ MOZ_FIX_LINK_PATHS="-Wl,-executable_path,${DIST}/bin" -+ ;; -+ -+*-android*|*-linuxandroid*) -+ cat >> confdefs.pytmp <<\EOF -+ (''' NO_PW_GECOS ''', ' 1 ') -+EOF -+cat >> confdefs.h <<\EOF -+#define NO_PW_GECOS 1 -+EOF -+ -+ MOZ_GFX_OPTIMIZE_MOBILE=1 -+ MOZ_OPTIMIZE_FLAGS="-O3" -+ if test -z "$CLANG_CC"; then -+ MOZ_OPTIMIZE_FLAGS="-freorder-blocks -fno-reorder-functions $MOZ_OPTIMIZE_FLAGS" -+ fi -+ ;; -+ -+*-*linux*) -+ if test "$GNU_CC" -o "$GNU_CXX"; then -+ MOZ_PGO_OPTIMIZE_FLAGS="-O3" -+ MOZ_OPTIMIZE_FLAGS="-O3" -+ if test -z "$CLANG_CC"; then -+ MOZ_OPTIMIZE_FLAGS="-freorder-blocks $MOZ_OPTIMIZE_FLAGS" -+ fi -+ fi -+ -+ case "${target_cpu}" in -+ alpha*) -+ CFLAGS="$CFLAGS -mieee" -+ CXXFLAGS="$CXXFLAGS -mieee" -+ ;; -+ esac -+ ;; -+ -+*-mingw*) -+ DSO_CFLAGS= -+ DSO_PIC_CFLAGS= -+ DLL_SUFFIX=.dll -+ RC=rc.exe -+ if test -n "$GNU_CC" -o -n "$CLANG_CC"; then -+ CC="$CC -mwindows" -+ CXX="$CXX -mwindows" -+ CPP="$CPP -mwindows" -+ CFLAGS="$CFLAGS -mms-bitfields" -+ CXXFLAGS="$CXXFLAGS -mms-bitfields" -+ DSO_LDOPTS='-shared' -+ MKSHLIB='$(CXX) $(DSO_LDOPTS) -o $@' -+ MKCSHLIB='$(CC) $(DSO_LDOPTS) -o $@' -+ RC='$(WINDRES)' -+ # Use static libgcc and libstdc++ -+ LDFLAGS="$LDFLAGS -static" -+ # Use temp file for windres (bug 213281) -+ RCFLAGS='-O coff --use-temp-file' -+ # mingw doesn't require kernel32, user32, and advapi32 explicitly -+ LIBS="$LIBS -lgdi32 -lwinmm -lwsock32 -lpsapi" -+ MOZ_FIX_LINK_PATHS= -+ DLL_PREFIX= -+ IMPORT_LIB_SUFFIX=a -+ -+ WIN32_CONSOLE_EXE_LDFLAGS=-mconsole -+ WIN32_GUI_EXE_LDFLAGS=-mwindows -+ else -+ TARGET_COMPILER_ABI=msvc -+ HOST_CC='$(CC)' -+ HOST_CXX='$(CXX)' -+ HOST_LD='$(LD)' -+ if test "$AS_BIN"; then -+ AS="$(basename "$AS_BIN")" -+ fi -+ AR='lib' -+ AR_FLAGS='-NOLOGO -OUT:$@' -+ AR_EXTRACT= -+ RANLIB='echo not_ranlib' -+ STRIP='echo not_strip' -+ PKG_SKIP_STRIP=1 -+ OBJ_SUFFIX=obj -+ LIB_SUFFIX=lib -+ DLL_PREFIX= -+ LIB_PREFIX= -+ IMPORT_LIB_SUFFIX=lib -+ MKSHLIB='$(LD) -NOLOGO -DLL -OUT:$@ -PDB:$(LINK_PDBFILE) $(DSO_LDOPTS)' -+ MKCSHLIB='$(LD) -NOLOGO -DLL -OUT:$@ -PDB:$(LINK_PDBFILE) $(DSO_LDOPTS)' -+ if test "$CPU_ARCH" = "x86"; then -+ WIN32_SUBSYSTEM_VERSION=5.01 -+ else -+ WIN32_SUBSYSTEM_VERSION=6.01 -+ fi -+ WIN32_CONSOLE_EXE_LDFLAGS=-SUBSYSTEM:CONSOLE,$WIN32_SUBSYSTEM_VERSION -+ WIN32_GUI_EXE_LDFLAGS=-SUBSYSTEM:WINDOWS,$WIN32_SUBSYSTEM_VERSION -+ DSO_LDOPTS=-SUBSYSTEM:WINDOWS,$WIN32_SUBSYSTEM_VERSION -+ _USE_CPP_INCLUDE_FLAG=1 -+ _DEFINES_CFLAGS='-FI $(topobjdir)/js/src/js-confdefs.h -DMOZILLA_CLIENT' -+ _DEFINES_CXXFLAGS='-FI $(topobjdir)/js/src/js-confdefs.h -DMOZILLA_CLIENT' -+ CFLAGS="$CFLAGS -W3 -Gy -Zc:inline" -+ CXXFLAGS="$CXXFLAGS -W3 -Gy -Zc:inline" -+ if test "$CPU_ARCH" = "x86";then -+ if test -z `echo $CFLAGS | grep -i -/arch:` ; then -+ CFLAGS="$CFLAGS -arch:SSE2" -+ fi -+ if test -z `echo $CXXFLAGS | grep -i -/arch:` ; then -+ CXXFLAGS="$CXXFLAGS -arch:SSE2" -+ fi -+ fi -+ CFLAGS="$CFLAGS -FS" -+ CXXFLAGS="$CXXFLAGS -FS" -+ if test -z "$MOZ_ASAN"; then -+ CFLAGS="$CFLAGS -Gw" -+ CXXFLAGS="$CXXFLAGS -Gw" -+ fi -+ # khuey says we can safely ignore MSVC warning C4251 -+ # MSVC warning C4244 (implicit type conversion may lose data) warns -+ # and requires workarounds for perfectly valid code. Also, GCC/clang -+ # don't warn about it by default. So for consistency/sanity, we turn -+ # it off on MSVC, too. -+ # MSVC warning C4267 warns for narrowing type conversions from size_t -+ # to 32-bit integer types on 64-bit platforms. Since this is virtually -+ # the same thing as C4244, we disable C4267, too. -+ CFLAGS="$CFLAGS -wd4244 -wd4267" -+ CXXFLAGS="$CXXFLAGS -wd4244 -wd4267 -wd4251" -+ if test -n "$CLANG_CL"; then -+ # XXX We should combine some of these with our generic GCC-style -+ # warning checks. -+ # -+ # Suppress the clang-cl warning for the inline 'new' and 'delete' in mozalloc -+ CXXFLAGS="$CXXFLAGS -Wno-inline-new-delete" -+ # We use offsetof on non-POD objects all the time. -+ # We also suppress this warning on other platforms. -+ CXXFLAGS="$CXXFLAGS -Wno-invalid-offsetof" -+ # MFBT thinks clang-cl supports constexpr, which it does, but -+ # not everything in Windows C++ headers supports constexpr -+ # as we might expect until MSVC 2015, so turn off this warning -+ # for now. -+ CXXFLAGS="$CXXFLAGS -Wno-invalid-constexpr" -+ # This warns for reasonable things like: -+ # enum { X = 0xffffffffU }; -+ # which is annoying for IDL headers. -+ CXXFLAGS="$CXXFLAGS -Wno-microsoft-enum-value" -+ # This warns for cases that would be reached by the Microsoft -+ # #include rules, but also currently warns on cases that would -+ # *also* be reached by standard C++ include rules. That -+ # behavior doesn't seem useful, so we turn it off. -+ CXXFLAGS="$CXXFLAGS -Wno-microsoft-include" -+ # We normally error out on unknown pragmas, but since clang-cl -+ # claims to be MSVC, it would be difficult to add -+ # #if defined(_MSC_VER) && !defined(__clang__) everywhere we -+ # use such pragmas, so just ignore them. -+ CFLAGS="$CFLAGS -Wno-unknown-pragmas" -+ CXXFLAGS="$CXXFLAGS -Wno-unknown-pragmas" -+ # We get errors about various #pragma intrinsic directives from -+ # clang-cl, and we don't need to hear about those. -+ CFLAGS="$CFLAGS -Wno-ignored-pragmas" -+ CXXFLAGS="$CXXFLAGS -Wno-ignored-pragmas" -+ # clang-cl's Intrin.h marks things like _ReadWriteBarrier -+ # as __attribute((__deprecated__)). This is nice to know, -+ # but since we don't get the equivalent warning from MSVC, -+ # let's just ignore it. -+ CFLAGS="$CFLAGS -Wno-deprecated-declarations" -+ CXXFLAGS="$CXXFLAGS -Wno-deprecated-declarations" -+ # We use a function like: -+ # __declspec(noreturn) __inline void f() {} -+ # which -Winvalid-noreturn complains about. Again, MSVC seems -+ # OK with it, so let's silence the warning. -+ CFLAGS="$CFLAGS -Wno-invalid-noreturn" -+ CXXFLAGS="$CXXFLAGS -Wno-invalid-noreturn" -+ # Missing |override| on virtual function declarations isn't -+ # something that MSVC currently warns about. -+ CXXFLAGS="$CXXFLAGS -Wno-inconsistent-missing-override" -+ # We use -DHAS_EXCEPTIONS=0, which removes the |throw()| -+ # declaration on |operator delete(void*)|. However, clang-cl -+ # must internally declare |operator delete(void*)| differently, -+ # which causes this warning for virtually every file in the -+ # tree. clang-cl doesn't support -fno-exceptions or equivalent, -+ # so there doesn't seem to be any way to convince clang-cl to -+ # declare |delete| differently. Therefore, suppress this -+ # warning. -+ CXXFLAGS="$CXXFLAGS -Wno-implicit-exception-spec-mismatch" -+ # At least one MSVC header and several headers in-tree have -+ # unused typedefs, so turn this on. -+ CXXFLAGS="$CXXFLAGS -Wno-unused-local-typedef" -+ # Several JS engine header files use __declspec(dllimport) on -+ # classes, and clang-cl helpfully warns about its non-support -+ # for such cases. We're not particularly worried about that, -+ # so ignore that warning. -+ CXXFLAGS="$CXXFLAGS -Wno-ignored-attributes" -+ fi -+ # make 'foo == bar;' error out -+ CFLAGS="$CFLAGS -we4553" -+ CXXFLAGS="$CXXFLAGS -we4553" -+ LIBS="$LIBS kernel32.lib user32.lib gdi32.lib winmm.lib wsock32.lib advapi32.lib psapi.lib" -+ MOZ_DEBUG_LDFLAGS='-DEBUG -DEBUGTYPE:CV' -+ WARNINGS_AS_ERRORS='-WX' -+ MOZ_OPTIMIZE_FLAGS="-O2" -+ MOZ_FIX_LINK_PATHS= -+ LDFLAGS="$LDFLAGS -LARGEADDRESSAWARE -NXCOMPAT" -+ if test -z "$DEVELOPER_OPTIONS"; then -+ LDFLAGS="$LDFLAGS -RELEASE" -+ fi -+ PROFILE_GEN_CFLAGS="-GL" -+ PROFILE_GEN_LDFLAGS="-LTCG:PGINSTRUMENT" -+ PROFILE_USE_CFLAGS="-GL -wd4624 -wd4952" -+ PROFILE_USE_LDFLAGS="-LTCG:PGUPDATE" -+ LDFLAGS="$LDFLAGS -DYNAMICBASE" -+ RCFLAGS="-nologo" -+ fi -+ cat >> confdefs.pytmp <<\EOF -+ (''' HAVE__MSIZE ''', ' 1 ') -+EOF -+cat >> confdefs.h <<\EOF -+#define HAVE__MSIZE 1 -+EOF -+ -+ cat >> confdefs.pytmp <<\EOF -+ (''' WIN32_LEAN_AND_MEAN ''', ' 1 ') -+EOF -+cat >> confdefs.h <<\EOF -+#define WIN32_LEAN_AND_MEAN 1 -+EOF -+ -+ BIN_SUFFIX='.exe' -+ MOZ_USER_DIR="Mozilla" -+ -+ case "$host_os" in -+ cygwin*|msvc*|mks*) -+ { echo "configure: error: Using a Cygwin build environment is unsupported. Configure cannot check for presence of necessary headers. Please upgrade to MozillaBuild; see https://developer.mozilla.org/en/Windows_Build_Prerequisites." 1>&2; echo "configure: error: Using a Cygwin build environment is unsupported. Configure cannot check for presence of necessary headers. Please upgrade to MozillaBuild; see https://developer.mozilla.org/en/Windows_Build_Prerequisites." 1>&5; exit 1; } -+ ;; -+ esac -+ -+ case "$target" in -+ i*86-*) -+ if test -n "$GNU_CC"; then -+ CFLAGS="$CFLAGS -mstackrealign -fno-keep-inline-dllexport" -+ CXXFLAGS="$CXXFLAGS -mstackrealign -fno-keep-inline-dllexport" -+ LDFLAGS="$LDFLAGS -Wl,--large-address-aware" -+ else -+ DSO_LDOPTS="$DSO_LDOPTS -MACHINE:X86" -+ LDFLAGS="$LDFLAGS -SAFESEH" -+ fi -+ -+ cat >> confdefs.pytmp <<\EOF -+ (''' _X86_ ''', ' 1 ') -+EOF -+cat >> confdefs.h <<\EOF -+#define _X86_ 1 -+EOF -+ -+ ;; -+ x86_64-*) -+ if test -n "$_WIN32_MSVC"; then -+ DSO_LDOPTS="$DSO_LDOPTS -MACHINE:X64" -+ fi -+ cat >> confdefs.pytmp <<\EOF -+ (''' _AMD64_ ''', ' 1 ') -+EOF -+cat >> confdefs.h <<\EOF -+#define _AMD64_ 1 -+EOF -+ -+ ;; -+ *) -+ cat >> confdefs.pytmp <<\EOF -+ (''' _CPU_ARCH_NOT_DEFINED ''', ' 1 ') -+EOF -+cat >> confdefs.h <<\EOF -+#define _CPU_ARCH_NOT_DEFINED 1 -+EOF -+ -+ ;; -+ esac -+ ;; -+ -+*-netbsd*) -+ DSO_CFLAGS='' -+ CFLAGS="$CFLAGS -Dunix" -+ CXXFLAGS="$CXXFLAGS -Dunix" -+ if $CC -E - -dM /dev/null; then -+ DLL_SUFFIX=".so" -+ DSO_PIC_CFLAGS='-fPIC -DPIC' -+ DSO_LDOPTS='-shared' -+ BIN_FLAGS='-Wl,--export-dynamic' -+ else -+ DSO_PIC_CFLAGS='-fPIC -DPIC' -+ DLL_SUFFIX=".so.1.0" -+ DSO_LDOPTS='-shared' -+ fi -+ # This will fail on a.out systems prior to 1.5.1_ALPHA. -+ if test "$LIBRUNPATH"; then -+ DSO_LDOPTS="-Wl,-R$LIBRUNPATH $DSO_LDOPTS" -+ fi -+ MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -Wl,-soname,$(DSO_SONAME) -o $@' -+ MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -Wl,-soname,$(DSO_SONAME) -o $@' -+ ;; -+ -+*-openbsd*) -+ DLL_SUFFIX=".so.1.0" -+ DSO_CFLAGS='' -+ DSO_PIC_CFLAGS='-fPIC' -+ DSO_LDOPTS='-shared -fPIC' -+ if test "$LIBRUNPATH"; then -+ DSO_LDOPTS="-R$LIBRUNPATH $DSO_LDOPTS" -+ fi -+ ;; -+ -+esac -+ -+cat >> confdefs.pytmp <> confdefs.h <> confdefs.pytmp <<\EOF -+ (''' JS_CPU_X86 ''', ' 1 ') -+EOF -+cat >> confdefs.h <<\EOF -+#define JS_CPU_X86 1 -+EOF -+ -+ ;; -+x86_64*-*) -+ ENABLE_ION=1 -+ cat >> confdefs.pytmp <<\EOF -+ (''' JS_CPU_X64 ''', ' 1 ') -+EOF -+cat >> confdefs.h <<\EOF -+#define JS_CPU_X64 1 -+EOF -+ -+ ;; -+arm*-*) -+ ENABLE_ION=1 -+ cat >> confdefs.pytmp <<\EOF -+ (''' JS_CPU_ARM ''', ' 1 ') -+EOF -+cat >> confdefs.h <<\EOF -+#define JS_CPU_ARM 1 -+EOF -+ -+ ;; -+sparc-*) -+ cat >> confdefs.pytmp <<\EOF -+ (''' JS_CPU_SPARC ''', ' 1 ') -+EOF -+cat >> confdefs.h <<\EOF -+#define JS_CPU_SPARC 1 -+EOF -+ -+ ;; -+mips*-*) -+ ENABLE_ION=1 -+ cat >> confdefs.pytmp <<\EOF -+ (''' JS_CPU_MIPS ''', ' 1 ') -+EOF -+cat >> confdefs.h <<\EOF -+#define JS_CPU_MIPS 1 -+EOF -+ -+ ;; -+esac -+ -+if test "$HAVE_64BIT_BUILD" ; then -+ cat >> confdefs.pytmp <<\EOF -+ (''' JS_PUNBOX64 ''', ' 1 ') -+EOF -+cat >> confdefs.h <<\EOF -+#define JS_PUNBOX64 1 -+EOF -+ -+else -+ cat >> confdefs.pytmp <<\EOF -+ (''' JS_NUNBOX32 ''', ' 1 ') -+EOF -+cat >> confdefs.h <<\EOF -+#define JS_NUNBOX32 1 -+EOF -+ -+fi -+ -+# Check whether --enable-ion or --disable-ion was given. -+if test "${enable_ion+set}" = set; then -+ enableval="$enable_ion" -+ if test "$enableval" = "no"; then -+ ENABLE_ION= -+ elif test "$enableval" = "yes"; then -+ : -+ else -+ { echo "configure: error: Option, ion, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, ion, does not take an argument ($enableval)." 1>&5; exit 1; } -+ fi -+fi -+ -+ -+ -+ -+if test -n "$COMPILE_ENVIRONMENT"; then -+ -+ -+ -+if test -z "$MOZ_DEBUG" -o -n "$MOZ_ASAN"; then -+ MOZ_NO_DEBUG_RTL=1 -+fi -+ -+ -+ -+MOZ_DEBUG_ENABLE_DEFS="DEBUG TRACING" -+# Check whether --with-debug-label or --without-debug-label was given. -+if test "${with_debug_label+set}" = set; then -+ withval="$with_debug_label" -+ for option in `echo $withval | sed 's/,/ /g'`; do -+ MOZ_DEBUG_ENABLE_DEFS="$MOZ_DEBUG_ENABLE_DEFS DEBUG_${option}" -+done -+fi -+ -+ -+if test -n "$MOZ_DEBUG"; then -+ if test -n "$COMPILE_ENVIRONMENT"; then -+ echo $ac_n "checking for valid debug flags""... $ac_c" 1>&6 -+echo "configure:5471: checking for valid debug flags" >&5 -+ _SAVE_CFLAGS=$CFLAGS -+ CFLAGS="$CFLAGS $MOZ_DEBUG_FLAGS" -+ cat > conftest.$ac_ext < -+int main() { -+printf("Hello World\n"); -+; return 0; } -+EOF -+if { (eval echo configure:5482: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -+ rm -rf conftest* -+ _results=yes -+else -+ echo "configure: failed program was:" >&5 -+ cat conftest.$ac_ext >&5 -+ rm -rf conftest* -+ _results=no -+fi -+rm -f conftest* -+ echo "$ac_t""$_results" 1>&6 -+ if test "$_results" = "no"; then -+ { echo "configure: error: These compiler flags are invalid: $MOZ_DEBUG_FLAGS" 1>&2; echo "configure: error: These compiler flags are invalid: $MOZ_DEBUG_FLAGS" 1>&5; exit 1; } -+ fi -+ CFLAGS=$_SAVE_CFLAGS -+ fi -+ -+ MOZ_DEBUG_DEFINES="$MOZ_DEBUG_ENABLE_DEFS" -+else -+ MOZ_DEBUG_DEFINES="NDEBUG TRIMMED" -+fi -+ -+ -+ -+ -+ -+# Check whether --enable-cpp-rtti or --disable-cpp-rtti was given. -+if test "${enable_cpp_rtti+set}" = set; then -+ enableval="$enable_cpp_rtti" -+ if test "$enableval" = "yes"; then -+ _MOZ_USE_RTTI=1 -+ elif test "$enableval" = "no"; then -+ _MOZ_USE_RTTI= -+ else -+ { echo "configure: error: Option, cpp-rtti, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, cpp-rtti, does not take an argument ($enableval)." 1>&5; exit 1; } -+ fi -+fi -+ -+ -+if test -z "$_MOZ_USE_RTTI"; then -+ if test "$GNU_CC"; then -+ CXXFLAGS="$CXXFLAGS -fno-rtti" -+ else -+ case "$target" in -+ *-mingw*) -+ CXXFLAGS="$CXXFLAGS -GR-" -+ esac -+ fi -+fi -+ -+if test "$CLANG_CXX"; then -+ ## We disable return-type-c-linkage because jsval is defined as a C++ type but is -+ ## returned by C functions. This is possible because we use knowledge about the ABI -+ ## to typedef it to a C type with the same layout when the headers are included -+ ## from C. -+ _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wno-unknown-warning-option -Wno-return-type-c-linkage" -+fi -+ -+if test -n "$DEVELOPER_OPTIONS"; then -+ MOZ_FORCE_GOLD=1 -+fi -+ -+# Check whether --enable-gold or --disable-gold was given. -+if test "${enable_gold+set}" = set; then -+ enableval="$enable_gold" -+ if test "$enableval" = "yes"; then -+ MOZ_FORCE_GOLD=1 -+ elif test "$enableval" = "no"; then -+ MOZ_FORCE_GOLD= -+ -+ else -+ { echo "configure: error: Option, gold, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, gold, does not take an argument ($enableval)." 1>&5; exit 1; } -+ fi -+fi -+ -+ -+if test "$GNU_CC" -a -n "$MOZ_FORCE_GOLD"; then -+ if $CC -Wl,--version 2>&1 | grep -q "GNU ld"; then -+ GOLD=$($CC -print-prog-name=ld.gold) -+ case "$GOLD" in -+ /*) -+ ;; -+ *) -+ GOLD=$(which $GOLD) -+ ;; -+ esac -+ if test -n "$GOLD"; then -+ mkdir -p $_objdir/build/unix/gold -+ rm -f $_objdir/build/unix/gold/ld -+ ln -s "$GOLD" $_objdir/build/unix/gold/ld -+ if $CC -B $_objdir/build/unix/gold -Wl,--version 2>&1 | grep -q "GNU gold"; then -+ LDFLAGS="$LDFLAGS -B $_objdir/build/unix/gold" -+ else -+ rm -rf $_objdir/build/unix/gold -+ fi -+ fi -+ fi -+fi -+if test "$GNU_CC"; then -+ if $CC $LDFLAGS -Wl,--version 2>&1 | grep -q "GNU ld"; then -+ LD_IS_BFD=1 -+ fi -+fi -+ -+ -+ -+if test "$GNU_CC"; then -+ if test -z "$DEVELOPER_OPTIONS"; then -+ CFLAGS="$CFLAGS -ffunction-sections -fdata-sections" -+ CXXFLAGS="$CXXFLAGS -ffunction-sections -fdata-sections" -+ fi -+ CFLAGS="$CFLAGS -fno-math-errno" -+ CXXFLAGS="$CXXFLAGS -fno-exceptions -fno-math-errno" -+ -+ if test -z "$CLANG_CC"; then -+ case "$CC_VERSION" in -+ 4.*) -+ ;; -+ *) -+ # Lifetime Dead Store Elimination level 2 (default in GCC6+) breaks Gecko. -+ # Ideally, we'd use -flifetime-dse=1, but that means we'd forcefully -+ # enable it on optimization levels where it would otherwise not be enabled. -+ # So we disable it entirely. But since that would mean inconsistency with -+ # GCC5, which has level 1 depending on optimization level, disable it on -+ # GCC5 as well, because better safe than sorry. -+ # Add it first so that a mozconfig can override by setting CFLAGS/CXXFLAGS. -+ CFLAGS="-fno-lifetime-dse $CFLAGS" -+ CXXFLAGS="-fno-lifetime-dse $CXXFLAGS" -+ ;; -+ esac -+ fi -+fi -+ -+ -+# Check whether --enable-icf or --disable-icf was given. -+if test "${enable_icf+set}" = set; then -+ enableval="$enable_icf" -+ if test "$enableval" = "no"; then -+ MOZ_DISABLE_ICF=1 -+ elif test "$enableval" = "yes"; then -+ MOZ_DISABLE_ICF= -+ else -+ { echo "configure: error: Option, icf, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, icf, does not take an argument ($enableval)." 1>&5; exit 1; } -+ fi -+fi -+ -+ -+if test "$GNU_CC" -a "$GCC_USE_GNU_LD" -a -z "$MOZ_DISABLE_ICF" -a -z "$DEVELOPER_OPTIONS"; then -+ echo $ac_n "checking whether the linker supports Identical Code Folding""... $ac_c" 1>&6 -+echo "configure:5631: checking whether the linker supports Identical Code Folding" >&5 -+if eval "test \"`echo '$''{'LD_SUPPORTS_ICF'+set}'`\" = set"; then -+ echo $ac_n "(cached) $ac_c" 1>&6 -+else -+ echo 'int foo() {return 42;}' \ -+ 'int bar() {return 42;}' \ -+ 'int main() {return foo() - bar();}' > conftest.${ac_ext} -+ # If the linker supports ICF, foo and bar symbols will have -+ # the same address -+ if { ac_try='${CC-cc} -o conftest${ac_exeext} $LDFLAGS -Wl,--icf=safe -ffunction-sections conftest.${ac_ext} $LIBS 1>&2'; { (eval echo configure:5640: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && -+ test -s conftest${ac_exeext} && -+ objdump -t conftest${ac_exeext} | awk '{a[$6] = $1} END {if (a["foo"] && (a["foo"] != a["bar"])) { exit 1 }}'; then -+ LD_SUPPORTS_ICF=yes -+ else -+ LD_SUPPORTS_ICF=no -+ fi -+ rm -rf conftest* -+fi -+ -+echo "$ac_t""$LD_SUPPORTS_ICF" 1>&6 -+ if test "$LD_SUPPORTS_ICF" = yes; then -+ _SAVE_LDFLAGS="$LDFLAGS -Wl,--icf=safe" -+ LDFLAGS="$LDFLAGS -Wl,--icf=safe -Wl,--print-icf-sections" -+ cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+ rm -rf conftest* -+ LD_PRINT_ICF_SECTIONS=-Wl,--print-icf-sections -+else -+ echo "configure: failed program was:" >&5 -+ cat conftest.$ac_ext >&5 -+ rm -rf conftest* -+ LD_PRINT_ICF_SECTIONS= -+fi -+rm -f conftest* -+ -+ LDFLAGS="$_SAVE_LDFLAGS" -+ fi -+fi -+ -+ -+if test "$GNU_CC" -a "$GCC_USE_GNU_LD" -a -z "$DEVELOPER_OPTIONS"; then -+ if test -n "$MOZ_DEBUG_FLAGS"; then -+ echo $ac_n "checking whether removing dead symbols breaks debugging""... $ac_c" 1>&6 -+echo "configure:5681: checking whether removing dead symbols breaks debugging" >&5 -+if eval "test \"`echo '$''{'GC_SECTIONS_BREAKS_DEBUG_RANGES'+set}'`\" = set"; then -+ echo $ac_n "(cached) $ac_c" 1>&6 -+else -+ echo 'int foo() {return 42;}' \ -+ 'int bar() {return 1;}' \ -+ 'int main() {return foo();}' > conftest.${ac_ext} -+ if { ac_try='${CC-cc} -o conftest.${ac_objext} $CFLAGS $MOZ_DEBUG_FLAGS -c conftest.${ac_ext} 1>&2'; { (eval echo configure:5688: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && -+ { ac_try='${CC-cc} -o conftest${ac_exeext} $LDFLAGS $MOZ_DEBUG_FLAGS -Wl,--gc-sections conftest.${ac_objext} $LIBS 1>&2'; { (eval echo configure:5689: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && -+ test -s conftest${ac_exeext} -a -s conftest.${ac_objext}; then -+ if test "`$PYTHON -m mozbuild.configure.check_debug_ranges conftest.${ac_objext} conftest.${ac_ext}`" = \ -+ "`$PYTHON -m mozbuild.configure.check_debug_ranges conftest${ac_exeext} conftest.${ac_ext}`"; then -+ GC_SECTIONS_BREAKS_DEBUG_RANGES=no -+ else -+ GC_SECTIONS_BREAKS_DEBUG_RANGES=yes -+ fi -+ else -+ GC_SECTIONS_BREAKS_DEBUG_RANGES="no, but it's broken in some other way" -+ fi -+ rm -rf conftest* -+fi -+ -+echo "$ac_t""$GC_SECTIONS_BREAKS_DEBUG_RANGES" 1>&6 -+ if test "$GC_SECTIONS_BREAKS_DEBUG_RANGES" = no; then -+ DSO_LDOPTS="$DSO_LDOPTS -Wl,--gc-sections" -+ fi -+ else -+ DSO_LDOPTS="$DSO_LDOPTS -Wl,--gc-sections" -+ fi -+fi -+ -+# bionic in Android < 4.1 doesn't support PIE -+# On OSX, the linker defaults to building PIE programs when targetting OSX 10.7+, -+# but not when targetting OSX < 10.7. OSX < 10.7 doesn't support running PIE -+# programs, so as long as support for OSX 10.6 is kept, we can't build PIE. -+# Even after dropping 10.6 support, MOZ_PIE would not be useful since it's the -+# default (and clang says the -pie option is not used). -+# On other Unix systems, some file managers (Nautilus) can't start PIE programs -+if test -n "$gonkdir" && test "$ANDROID_VERSION" -ge 16; then -+ MOZ_PIE=1 -+else -+ MOZ_PIE= -+fi -+ -+# Check whether --enable-pie or --disable-pie was given. -+if test "${enable_pie+set}" = set; then -+ enableval="$enable_pie" -+ if test "$enableval" = "yes"; then -+ MOZ_PIE=1 -+ elif test "$enableval" = "no"; then -+ MOZ_PIE= -+ else -+ { echo "configure: error: Option, pie, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, pie, does not take an argument ($enableval)." 1>&5; exit 1; } -+ fi -+fi -+ -+ -+if test "$GNU_CC" -a -n "$MOZ_PIE"; then -+ echo $ac_n "checking for PIE support""... $ac_c" 1>&6 -+echo "configure:5740: checking for PIE support" >&5 -+ _SAVE_LDFLAGS=$LDFLAGS -+ LDFLAGS="$LDFLAGS $DSO_PIC_CFLAGS -pie" -+ cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+ rm -rf conftest* -+ echo "$ac_t""yes" 1>&6 -+ MOZ_PROGRAM_LDFLAGS="$MOZ_PROGRAM_LDFLAGS -pie" -+else -+ echo "configure: failed program was:" >&5 -+ cat conftest.$ac_ext >&5 -+ rm -rf conftest* -+ echo "$ac_t""no" 1>&6 -+ { echo "configure: error: --enable-pie requires PIE support from the linker." 1>&2; echo "configure: error: --enable-pie requires PIE support from the linker." 1>&5; exit 1; } -+fi -+rm -f conftest* -+ LDFLAGS=$_SAVE_LDFLAGS -+fi -+ -+ -+ -+if test -n "$GCC_USE_GNU_LD"; then -+ case "$LDFLAGS" in -+ *-fsanitize=address*) -+ LDFLAGS="$LDFLAGS -Wl,-Bsymbolic" -+ ;; -+ esac -+fi -+ -+ -+fi -+ -+if test -z "$SKIP_COMPILER_CHECKS"; then -+echo $ac_n "checking for working const""... $ac_c" 1>&6 -+echo "configure:5781: checking for working const" >&5 -+if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then -+ echo $ac_n "(cached) $ac_c" 1>&6 -+else -+ cat > conftest.$ac_ext <j = 5; -+} -+{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ -+ const int foo = 10; -+} -+ -+; return 0; } -+EOF -+if { (eval echo configure:5835: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -+ rm -rf conftest* -+ ac_cv_c_const=yes -+else -+ echo "configure: failed program was:" >&5 -+ cat conftest.$ac_ext >&5 -+ rm -rf conftest* -+ ac_cv_c_const=no -+fi -+rm -f conftest* -+fi -+ -+echo "$ac_t""$ac_cv_c_const" 1>&6 -+if test $ac_cv_c_const = no; then -+ cat >> confdefs.pytmp <<\EOF -+ (''' const ''', r''' ''') -+EOF -+cat >> confdefs.h <<\EOF -+#define const -+EOF -+ -+fi -+ -+ -+ -+echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -+echo "configure:5861: checking for mode_t" >&5 -+if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then -+ echo $ac_n "(cached) $ac_c" 1>&6 -+else -+ cat > conftest.$ac_ext < -+#if STDC_HEADERS -+#include -+#include -+#endif -+EOF -+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | -+ egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then -+ rm -rf conftest* -+ ac_cv_type_mode_t=yes -+else -+ rm -rf conftest* -+ ac_cv_type_mode_t=no -+fi -+rm -f conftest* -+ -+fi -+echo "$ac_t""$ac_cv_type_mode_t" 1>&6 -+if test $ac_cv_type_mode_t = no; then -+ cat >> confdefs.pytmp <<\EOF -+ (''' mode_t ''', r''' int ''') -+EOF -+cat >> confdefs.h <<\EOF -+#define mode_t int -+EOF -+ -+fi -+ -+ -+ -+echo $ac_n "checking for off_t""... $ac_c" 1>&6 -+echo "configure:5899: checking for off_t" >&5 -+if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then -+ echo $ac_n "(cached) $ac_c" 1>&6 -+else -+ cat > conftest.$ac_ext < -+#if STDC_HEADERS -+#include -+#include -+#endif -+EOF -+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | -+ egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then -+ rm -rf conftest* -+ ac_cv_type_off_t=yes -+else -+ rm -rf conftest* -+ ac_cv_type_off_t=no -+fi -+rm -f conftest* -+ -+fi -+echo "$ac_t""$ac_cv_type_off_t" 1>&6 -+if test $ac_cv_type_off_t = no; then -+ cat >> confdefs.pytmp <<\EOF -+ (''' off_t ''', r''' long ''') -+EOF -+cat >> confdefs.h <<\EOF -+#define off_t long -+EOF -+ -+fi -+ -+ -+ -+echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -+echo "configure:5937: checking for pid_t" >&5 -+if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then -+ echo $ac_n "(cached) $ac_c" 1>&6 -+else -+ cat > conftest.$ac_ext < -+#if STDC_HEADERS -+#include -+#include -+#endif -+EOF -+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | -+ egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then -+ rm -rf conftest* -+ ac_cv_type_pid_t=yes -+else -+ rm -rf conftest* -+ ac_cv_type_pid_t=no -+fi -+rm -f conftest* -+ -+fi -+echo "$ac_t""$ac_cv_type_pid_t" 1>&6 -+if test $ac_cv_type_pid_t = no; then -+ cat >> confdefs.pytmp <<\EOF -+ (''' pid_t ''', r''' int ''') -+EOF -+cat >> confdefs.h <<\EOF -+#define pid_t int -+EOF -+ -+fi -+ -+ -+ -+echo $ac_n "checking for size_t""... $ac_c" 1>&6 -+echo "configure:5975: checking for size_t" >&5 -+if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then -+ echo $ac_n "(cached) $ac_c" 1>&6 -+else -+ cat > conftest.$ac_ext < -+#if STDC_HEADERS -+#include -+#include -+#endif -+EOF -+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | -+ egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then -+ rm -rf conftest* -+ ac_cv_type_size_t=yes -+else -+ rm -rf conftest* -+ ac_cv_type_size_t=no -+fi -+rm -f conftest* -+ -+fi -+echo "$ac_t""$ac_cv_type_size_t" 1>&6 -+if test $ac_cv_type_size_t = no; then -+ cat >> confdefs.pytmp <<\EOF -+ (''' size_t ''', r''' unsigned ''') -+EOF -+cat >> confdefs.h <<\EOF -+#define size_t unsigned -+EOF -+ -+fi -+ -+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 -+ -+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_n "checking for ssize_t""... $ac_c" 1>&6 -+echo "configure:6025: checking for ssize_t" >&5 -+if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then -+ echo $ac_n "(cached) $ac_c" 1>&6 -+else -+ cat > conftest.$ac_ext < -+ #include -+int main() { -+ssize_t foo = 0; -+; return 0; } -+EOF -+if { (eval echo configure:6038: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -+ rm -rf conftest* -+ ac_cv_type_ssize_t=true -+else -+ echo "configure: failed program was:" >&5 -+ cat conftest.$ac_ext >&5 -+ rm -rf conftest* -+ ac_cv_type_ssize_t=false -+fi -+rm -f conftest* -+fi -+ -+if test "$ac_cv_type_ssize_t" = true ; then -+ cat >> confdefs.pytmp <<\EOF -+ (''' HAVE_SSIZE_T ''', ' 1 ') -+EOF -+cat >> confdefs.h <<\EOF -+#define HAVE_SSIZE_T 1 -+EOF -+ -+ echo "$ac_t""yes" 1>&6 -+else -+ echo "$ac_t""no" 1>&6 -+fi -+ -+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 -+ -+ -+ -+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 -+ -+if test "$GNU_CXX"; then -+ echo $ac_n "checking whether 64-bits std::atomic requires -latomic""... $ac_c" 1>&6 -+echo "configure:6081: checking whether 64-bits std::atomic requires -latomic" >&5 -+if eval "test \"`echo '$''{'ac_cv_needs_atomic'+set}'`\" = set"; then -+ echo $ac_n "(cached) $ac_c" 1>&6 -+else -+ cat > conftest.$ac_ext < -+ #include -+int main() { -+ std::atomic foo; foo = 1; -+; return 0; } -+EOF -+if { (eval echo configure:6094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+ rm -rf conftest* -+ ac_cv_needs_atomic=no -+else -+ echo "configure: failed program was:" >&5 -+ cat conftest.$ac_ext >&5 -+ rm -rf conftest* -+ _SAVE_LIBS="$LIBS" -+ LIBS="$LIBS -latomic" -+ cat > conftest.$ac_ext < -+ #include -+int main() { -+ std::atomic foo; foo = 1; -+; return 0; } -+EOF -+if { (eval echo configure:6112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+ rm -rf conftest* -+ ac_cv_needs_atomic=yes -+else -+ echo "configure: failed program was:" >&5 -+ cat conftest.$ac_ext >&5 -+ rm -rf conftest* -+ ac_cv_needs_atomic="do not know; assuming no" -+fi -+rm -f conftest* -+ LIBS="$_SAVE_LIBS" -+ -+fi -+rm -f conftest* -+ -+fi -+ -+echo "$ac_t""$ac_cv_needs_atomic" 1>&6 -+ if test "$ac_cv_needs_atomic" = yes; then -+ MOZ_NEEDS_LIBATOMIC=1 -+ else -+ MOZ_NEEDS_LIBATOMIC= -+ fi -+ -+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 -+ -+ -+ -+case "${OS_TARGET}" in -+WINNT|Darwin|Android) -+ ;; -+*) -+ STL_FLAGS="-I${DIST}/stl_wrappers" -+ WRAP_STL_INCLUDES=1 -+ ;; -+esac -+ -+ac_header_dirent=no -+for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h -+do -+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -+echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 -+echo "configure:6160: checking for $ac_hdr that defines DIR" >&5 -+if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then -+ echo $ac_n "(cached) $ac_c" 1>&6 -+else -+ cat > conftest.$ac_ext < -+#include <$ac_hdr> -+int main() { -+DIR *dirp = 0; -+; return 0; } -+EOF -+if { (eval echo configure:6173: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -+ rm -rf conftest* -+ eval "ac_cv_header_dirent_$ac_safe=yes" -+else -+ echo "configure: failed program was:" >&5 -+ cat conftest.$ac_ext >&5 -+ rm -rf conftest* -+ eval "ac_cv_header_dirent_$ac_safe=no" -+fi -+rm -f conftest* -+fi -+if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then -+ echo "$ac_t""yes" 1>&6 -+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` -+ cat >> confdefs.pytmp <> confdefs.h <&6 -+fi -+done -+# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. -+if test $ac_header_dirent = dirent.h; then -+echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 -+echo "configure:6201: checking for opendir in -ldir" >&5 -+ac_lib_var=`echo dir'_'opendir | 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="-ldir $LIBS" -+cat > conftest.$ac_ext <&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 -+ LIBS="$LIBS -ldir" -+else -+ echo "$ac_t""no" 1>&6 -+fi -+ -+else -+echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -+echo "configure:6242: checking for opendir in -lx" >&5 -+ac_lib_var=`echo x'_'opendir | 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="-lx $LIBS" -+cat > conftest.$ac_ext <&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 -+ LIBS="$LIBS -lx" -+else -+ echo "$ac_t""no" 1>&6 -+fi -+ -+fi -+ -+case "$target_os" in -+freebsd*) -+# for stuff like -lXshm -+ CPPFLAGS="${CPPFLAGS} ${X_CFLAGS}" -+ ;; -+esac -+ -+# Check whether --enable-dtrace or --disable-dtrace was given. -+if test "${enable_dtrace+set}" = set; then -+ enableval="$enable_dtrace" -+ if test "$enableval" = "yes"; then -+ enable_dtrace="yes" -+ elif test "$enableval" = "no"; then -+ : -+ else -+ { echo "configure: error: Option, dtrace, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, dtrace, does not take an argument ($enableval)." 1>&5; exit 1; } -+ fi -+fi -+ -+if test "x$enable_dtrace" = "xyes"; then -+ ac_safe=`echo "sys/sdt.h" | sed 'y%./+-%__p_%'` -+ echo $ac_n "checking for sys/sdt.h""... $ac_c" 1>&6 -+echo "configure:6305: checking for sys/sdt.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 < -+int main() { -+ -+; return 0; } -+EOF -+if { (eval echo configure:6318: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -+ rm -rf conftest* -+ eval "ac_cv_header_$ac_safe=yes" -+else -+ 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 -+ HAVE_DTRACE=1 -+ else -+ echo "$ac_t""no" 1>&6 -+ -+ fi -+ -+ if test -n "$HAVE_DTRACE"; then -+ cat >> confdefs.pytmp <<\EOF -+ (''' INCLUDE_MOZILLA_DTRACE ''', ' 1 ') -+EOF -+cat >> confdefs.h <<\EOF -+#define INCLUDE_MOZILLA_DTRACE 1 -+EOF -+ -+ else -+ { echo "configure: error: dtrace enabled but sys/sdt.h not found" 1>&2; echo "configure: error: dtrace enabled but sys/sdt.h not found" 1>&5; exit 1; }; -+ fi -+fi -+ -+ -+echo $ac_n "checking for gethostbyname_r in -lc_r""... $ac_c" 1>&6 -+echo "configure:6353: checking for gethostbyname_r in -lc_r" >&5 -+ac_lib_var=`echo c_r'_'gethostbyname_r | 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="-lc_r $LIBS" -+cat > conftest.$ac_ext <&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_tr_lib=HAVE_LIB`echo c_r | sed -e 's/[^a-zA-Z0-9_]/_/g' \ -+ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` -+ cat >> confdefs.pytmp <> confdefs.h <&6 -+fi -+ -+ -+case $target in -+*-darwin*) -+ ;; -+*) -+ -+echo $ac_n "checking for library containing dlopen""... $ac_c" 1>&6 -+echo "configure:6409: checking for library containing dlopen" >&5 -+if eval "test \"`echo '$''{'ac_cv_search_dlopen'+set}'`\" = set"; then -+ echo $ac_n "(cached) $ac_c" 1>&6 -+else -+ ac_func_search_save_LIBS="$LIBS" -+ac_cv_search_dlopen="no" -+cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+ rm -rf conftest* -+ ac_cv_search_dlopen="none required" -+else -+ echo "configure: failed program was:" >&5 -+ cat conftest.$ac_ext >&5 -+fi -+rm -f conftest* -+test "$ac_cv_search_dlopen" = "no" && for i in dl; do -+LIBS="-l$i $ac_func_search_save_LIBS" -+cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+ rm -rf conftest* -+ ac_cv_search_dlopen="-l$i" -+break -+else -+ echo "configure: failed program was:" >&5 -+ cat conftest.$ac_ext >&5 -+fi -+rm -f conftest* -+done -+LIBS="$ac_func_search_save_LIBS" -+fi -+ -+echo "$ac_t""$ac_cv_search_dlopen" 1>&6 -+if test "$ac_cv_search_dlopen" != "no"; then -+ test "$ac_cv_search_dlopen" = "none required" || LIBS="$ac_cv_search_dlopen $LIBS" -+ ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'` -+ echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6 -+echo "configure:6467: 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 < -+int main() { -+ -+; return 0; } -+EOF -+if { (eval echo configure:6480: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -+ rm -rf conftest* -+ eval "ac_cv_header_$ac_safe=yes" -+else -+ 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.pytmp <<\EOF -+ (''' HAVE_DLOPEN ''', ' 1 ') -+EOF -+cat >> confdefs.h <<\EOF -+#define HAVE_DLOPEN 1 -+EOF -+ -+ else -+ echo "$ac_t""no" 1>&6 -+ -+ fi -+ -+else : -+ -+fi -+ ;; -+esac -+ -+if test ! "$GNU_CXX"; then -+ echo $ac_n "checking for demangle in -lC""... $ac_c" 1>&6 -+echo "configure:6514: checking for demangle in -lC" >&5 -+ac_lib_var=`echo C'_'demangle | 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="-lC $LIBS" -+cat > conftest.$ac_ext <&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_tr_lib=HAVE_LIB`echo C | sed -e 's/[^a-zA-Z0-9_]/_/g' \ -+ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` -+ cat >> confdefs.pytmp <> confdefs.h <&6 -+fi -+ -+fi -+ -+echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 -+echo "configure:6566: checking for socket in -lsocket" >&5 -+ac_lib_var=`echo socket'_'socket | 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="-lsocket $LIBS" -+cat > conftest.$ac_ext <&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_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \ -+ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` -+ cat >> confdefs.pytmp <> confdefs.h <&6 -+fi -+ -+ -+case "$target_os" in -+darwin*) -+ USE_PTHREADS=1 -+ ;; -+*) -+ echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6 -+echo "configure:6622: checking for pthread_create in -lpthreads" >&5 -+ac_lib_var=`echo pthreads'_'pthread_create | 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="-lpthreads $LIBS" -+cat > conftest.$ac_ext <&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 -+ USE_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:6660: checking for pthread_create in -lpthread" >&5 -+ac_lib_var=`echo pthread'_'pthread_create | 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="-lpthread $LIBS" -+cat > conftest.$ac_ext <&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 -+ USE_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:6698: checking for pthread_create in -lc_r" >&5 -+ac_lib_var=`echo c_r'_'pthread_create | 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="-lc_r $LIBS" -+cat > conftest.$ac_ext <&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 -+ USE_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:6736: checking for pthread_create in -lc" >&5 -+ac_lib_var=`echo c'_'pthread_create | 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="-lc $LIBS" -+cat > conftest.$ac_ext <&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 -+ USE_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 "$USE_PTHREADS"x = x; then -+ { echo "configure: error: --with-pthreads specified for a system without pthread support " 1>&2; echo "configure: error: --with-pthreads specified for a system without pthread support " 1>&5; exit 1; }; -+fi -+ elif test "$withval" = "no"; then -+ USE_PTHREADS= -+ _PTHREAD_LDFLAGS= -+ -+ else -+ { echo "configure: error: Option, pthreads, does not take an argument ($withval)." 1>&2; echo "configure: error: Option, pthreads, does not take an argument ($withval)." 1>&5; exit 1; } -+ fi -+fi -+ -+ -+if test "$USE_PTHREADS"x != x -+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:6810: 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`" -a -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:6833: 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`" -a -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 -+ *-*-freebsd*) -+ cat >> confdefs.pytmp <<\EOF -+ (''' _REENTRANT ''', ' 1 ') -+EOF -+cat >> confdefs.h <<\EOF -+#define _REENTRANT 1 -+EOF -+ -+ cat >> confdefs.pytmp <<\EOF -+ (''' _THREAD_SAFE ''', ' 1 ') -+EOF -+cat >> confdefs.h <<\EOF -+#define _THREAD_SAFE 1 -+EOF -+ -+ if test "$ac_cv_have_dash_pthread" = "yes"; then -+ _PTHREAD_LDFLAGS="-pthread" -+ fi -+ ;; -+ -+ *-*-openbsd*|*-*-bsdi*) -+ cat >> confdefs.pytmp <<\EOF -+ (''' _REENTRANT ''', ' 1 ') -+EOF -+cat >> confdefs.h <<\EOF -+#define _REENTRANT 1 -+EOF -+ -+ cat >> confdefs.pytmp <<\EOF -+ (''' _THREAD_SAFE ''', ' 1 ') -+EOF -+cat >> confdefs.h <<\EOF -+#define _THREAD_SAFE 1 -+EOF -+ -+ if test "$ac_cv_have_dash_pthread" = "yes"; then -+ _PTHREAD_LDFLAGS="-pthread" -+ fi -+ ;; -+ -+ *-*-linux*|*-*-kfreebsd*-gnu|*-*-gnu*) -+ cat >> confdefs.pytmp <<\EOF -+ (''' _REENTRANT ''', ' 1 ') -+EOF -+cat >> confdefs.h <<\EOF -+#define _REENTRANT 1 -+EOF -+ -+ ;; -+ -+ esac -+ LDFLAGS="${_PTHREAD_LDFLAGS} ${LDFLAGS}" -+fi -+ -+ -+ -+ -+ -+if test $ac_cv_prog_gcc = yes; then -+ echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6 -+echo "configure:6908: 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 < -+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 < -+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 -+ -+echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 -+echo "configure:6954: checking for 8-bit clean memcmp" >&5 -+if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then -+ echo $ac_n "(cached) $ac_c" 1>&6 -+else -+ if test "$cross_compiling" = yes; then -+ ac_cv_func_memcmp_clean=no -+else -+ cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+then -+ ac_cv_func_memcmp_clean=yes -+else -+ echo "configure: failed program was:" >&5 -+ cat conftest.$ac_ext >&5 -+ rm -fr conftest* -+ ac_cv_func_memcmp_clean=no -+fi -+rm -fr conftest* -+fi -+ -+fi -+ -+echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6 -+test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}" -+ -+for ac_func in getc_unlocked _getc_nolock gmtime_r localtime_r pthread_getname_np -+do -+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -+echo "configure:6992: 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 < -+#undef $ac_func -+/* 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:7024: \"$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.pytmp <> confdefs.h <&6 -+fi -+done -+ -+ -+case "$OS_TARGET" in -+Darwin) -+ ;; -+*) -+ echo $ac_n "checking for clock_gettime(CLOCK_MONOTONIC)""... $ac_c" 1>&6 -+echo "configure:7057: checking for clock_gettime(CLOCK_MONOTONIC)" >&5 -+if eval "test \"`echo '$''{'ac_cv_clock_monotonic'+set}'`\" = set"; then -+ echo $ac_n "(cached) $ac_c" 1>&6 -+else -+ for libs in "" -lrt; do -+ _SAVE_LIBS="$LIBS" -+ LIBS="$LIBS $libs" -+ cat > conftest.$ac_ext < -+int main() { -+ struct timespec ts; -+ clock_gettime(CLOCK_MONOTONIC, &ts); -+; return 0; } -+EOF -+if { (eval echo configure:7073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+ rm -rf conftest* -+ ac_cv_clock_monotonic=$libs -+ LIBS="$_SAVE_LIBS" -+ break -+else -+ echo "configure: failed program was:" >&5 -+ cat conftest.$ac_ext >&5 -+ rm -rf conftest* -+ ac_cv_clock_monotonic=no -+fi -+rm -f conftest* -+ LIBS="$_SAVE_LIBS" -+ done -+fi -+ -+echo "$ac_t""$ac_cv_clock_monotonic" 1>&6 -+ if test "$ac_cv_clock_monotonic" != "no"; then -+ HAVE_CLOCK_MONOTONIC=1 -+ REALTIME_LIBS=$ac_cv_clock_monotonic -+ cat >> confdefs.pytmp <<\EOF -+ (''' HAVE_CLOCK_MONOTONIC ''', ' 1 ') -+EOF -+cat >> confdefs.h <<\EOF -+#define HAVE_CLOCK_MONOTONIC 1 -+EOF -+ -+ -+ -+ fi -+ ;; -+esac -+ -+echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6 -+echo "configure:7107: checking for sin in -lm" >&5 -+ac_lib_var=`echo m'_'sin | 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="-lm $LIBS" -+cat > conftest.$ac_ext <&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_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \ -+ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` -+ cat >> confdefs.pytmp <> confdefs.h <&6 -+fi -+ -+echo $ac_n "checking for sincos in -lm""... $ac_c" 1>&6 -+echo "configure:7157: checking for sincos in -lm" >&5 -+ac_lib_var=`echo m'_'sincos | 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="-lm $LIBS" -+cat > conftest.$ac_ext <&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 -+ cat >> confdefs.pytmp <<\EOF -+ (''' HAVE_SINCOS ''', ' 1 ') -+EOF -+cat >> confdefs.h <<\EOF -+#define HAVE_SINCOS 1 -+EOF -+ -+else -+ echo "$ac_t""no" 1>&6 -+fi -+ -+echo $ac_n "checking for __sincos in -lm""... $ac_c" 1>&6 -+echo "configure:7203: checking for __sincos in -lm" >&5 -+ac_lib_var=`echo m'_'__sincos | 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="-lm $LIBS" -+cat > conftest.$ac_ext <&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 -+ cat >> confdefs.pytmp <<\EOF -+ (''' HAVE___SINCOS ''', ' 1 ') -+EOF -+cat >> confdefs.h <<\EOF -+#define HAVE___SINCOS 1 -+EOF -+ -+else -+ echo "$ac_t""no" 1>&6 -+fi -+ -+ -+ -+if test -z "$MACOS_DEPLOYMENT_TARGET" || test "$MACOS_DEPLOYMENT_TARGET" -ge "100300"; then -+ -+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 -+ -+echo $ac_n "checking for wcrtomb""... $ac_c" 1>&6 -+echo "configure:7260: checking for wcrtomb" >&5 -+if eval "test \"`echo '$''{'ac_cv_have_wcrtomb'+set}'`\" = set"; then -+ echo $ac_n "(cached) $ac_c" 1>&6 -+else -+ cat > conftest.$ac_ext < -+int main() { -+mbstate_t ps={0};wcrtomb(0,'f',&ps); -+; return 0; } -+EOF -+if { (eval echo configure:7272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+ rm -rf conftest* -+ ac_cv_have_wcrtomb="yes" -+else -+ echo "configure: failed program was:" >&5 -+ cat conftest.$ac_ext >&5 -+ rm -rf conftest* -+ ac_cv_have_wcrtomb="no" -+fi -+rm -f conftest* -+fi -+ -+echo "$ac_t""$ac_cv_have_wcrtomb" 1>&6 -+if test "$ac_cv_have_wcrtomb" = "yes"; then -+ cat >> confdefs.pytmp <<\EOF -+ (''' HAVE_WCRTOMB ''', ' 1 ') -+EOF -+cat >> confdefs.h <<\EOF -+#define HAVE_WCRTOMB 1 -+EOF -+ -+fi -+echo $ac_n "checking for mbrtowc""... $ac_c" 1>&6 -+echo "configure:7295: checking for mbrtowc" >&5 -+if eval "test \"`echo '$''{'ac_cv_have_mbrtowc'+set}'`\" = set"; then -+ echo $ac_n "(cached) $ac_c" 1>&6 -+else -+ cat > conftest.$ac_ext < -+int main() { -+mbstate_t ps={0};mbrtowc(0,0,0,&ps); -+; return 0; } -+EOF -+if { (eval echo configure:7307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+ rm -rf conftest* -+ ac_cv_have_mbrtowc="yes" -+else -+ echo "configure: failed program was:" >&5 -+ cat conftest.$ac_ext >&5 -+ rm -rf conftest* -+ ac_cv_have_mbrtowc="no" -+fi -+rm -f conftest* -+fi -+ -+echo "$ac_t""$ac_cv_have_mbrtowc" 1>&6 -+if test "$ac_cv_have_mbrtowc" = "yes"; then -+ cat >> confdefs.pytmp <<\EOF -+ (''' HAVE_MBRTOWC ''', ' 1 ') -+EOF -+cat >> confdefs.h <<\EOF -+#define HAVE_MBRTOWC 1 -+EOF -+ -+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 -+ -+fi -+ -+echo $ac_n "checking for res_ninit()""... $ac_c" 1>&6 -+echo "configure:7339: checking for res_ninit()" >&5 -+if eval "test \"`echo '$''{'ac_cv_func_res_ninit'+set}'`\" = set"; then -+ echo $ac_n "(cached) $ac_c" 1>&6 -+else -+ if test "$OS_TARGET" = NetBSD -o "$OS_TARGET" = OpenBSD; then -+ ac_cv_func_res_ninit=no -+ else -+ cat > conftest.$ac_ext < -+ #include -+ #include -+ #include -+ -+int main() { -+int foo = res_ninit(&_res); -+; return 0; } -+EOF -+if { (eval echo configure:7362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+ rm -rf conftest* -+ ac_cv_func_res_ninit=yes -+else -+ echo "configure: failed program was:" >&5 -+ cat conftest.$ac_ext >&5 -+ rm -rf conftest* -+ ac_cv_func_res_ninit=no -+fi -+rm -f conftest* -+ fi -+ -+fi -+ -+echo "$ac_t""$ac_cv_func_res_ninit" 1>&6 -+ -+if test "$ac_cv_func_res_ninit" = "yes"; then -+ cat >> confdefs.pytmp <<\EOF -+ (''' HAVE_RES_NINIT ''', ' 1 ') -+EOF -+cat >> confdefs.h <<\EOF -+#define HAVE_RES_NINIT 1 -+EOF -+ -+fi -+ -+ -+ echo $ac_n "checking for nl_langinfo and CODESET""... $ac_c" 1>&6 -+echo "configure:7390: checking for nl_langinfo and CODESET" >&5 -+if eval "test \"`echo '$''{'am_cv_langinfo_codeset'+set}'`\" = set"; then -+ echo $ac_n "(cached) $ac_c" 1>&6 -+else -+ cat > conftest.$ac_ext < -+int main() { -+char* cs = nl_langinfo(CODESET); -+; return 0; } -+EOF -+if { (eval echo configure:7402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+ rm -rf conftest* -+ am_cv_langinfo_codeset=yes -+else -+ echo "configure: failed program was:" >&5 -+ cat conftest.$ac_ext >&5 -+ rm -rf conftest* -+ am_cv_langinfo_codeset=no -+fi -+rm -f conftest* -+ -+fi -+ -+echo "$ac_t""$am_cv_langinfo_codeset" 1>&6 -+ if test $am_cv_langinfo_codeset = yes; then -+ cat >> confdefs.pytmp <<\EOF -+ (''' HAVE_LANGINFO_CODESET ''', r''' 1 ''') -+EOF -+cat >> confdefs.h <<\EOF -+#define HAVE_LANGINFO_CODESET 1 -+EOF -+ -+ HAVE_LANGINFO_CODESET=1 -+ 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 -+ -+ -+echo $ac_n "checking for an implementation of va_copy()""... $ac_c" 1>&6 -+echo "configure:7438: checking for an implementation of va_copy()" >&5 -+if eval "test \"`echo '$''{'ac_cv_va_copy'+set}'`\" = set"; then -+ echo $ac_n "(cached) $ac_c" 1>&6 -+else -+ cat > conftest.$ac_ext < -+ #include -+ void f (int i, ...) { -+ va_list args1, args2; -+ va_start (args1, i); -+ va_copy (args2, args1); -+ if (va_arg (args2, int) != 42 || va_arg (args1, int) != 42) -+ exit (1); -+ va_end (args1); va_end (args2); -+ } -+int main() { -+f(0, 42); return 0 -+; return 0; } -+EOF -+if { (eval echo configure:7459: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -+ rm -rf conftest* -+ ac_cv_va_copy=yes -+else -+ echo "configure: failed program was:" >&5 -+ cat conftest.$ac_ext >&5 -+ rm -rf conftest* -+ ac_cv_va_copy=no -+ -+fi -+rm -f conftest* -+ -+fi -+ -+echo "$ac_t""$ac_cv_va_copy" 1>&6 -+echo $ac_n "checking whether va_list can be copied by value""... $ac_c" 1>&6 -+echo "configure:7475: checking whether va_list can be copied by value" >&5 -+if eval "test \"`echo '$''{'ac_cv_va_val_copy'+set}'`\" = set"; then -+ echo $ac_n "(cached) $ac_c" 1>&6 -+else -+ cat > conftest.$ac_ext < -+ #include -+ void f (int i, ...) { -+ va_list args1, args2; -+ va_start (args1, i); -+ args2 = args1; -+ if (va_arg (args2, int) != 42 || va_arg (args1, int) != 42) -+ exit (1); -+ va_end (args1); va_end (args2); -+ } -+int main() { -+f(0, 42); return 0 -+; return 0; } -+EOF -+if { (eval echo configure:7496: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -+ rm -rf conftest* -+ ac_cv_va_val_copy=yes -+else -+ echo "configure: failed program was:" >&5 -+ cat conftest.$ac_ext >&5 -+ rm -rf conftest* -+ ac_cv_va_val_copy=no -+fi -+rm -f conftest* -+ -+fi -+ -+echo "$ac_t""$ac_cv_va_val_copy" 1>&6 -+if test "x$ac_cv_va_copy" = "xyes"; then -+ cat >> confdefs.pytmp <<\EOF -+ (''' VA_COPY ''', r''' va_copy ''') -+EOF -+cat >> confdefs.h <<\EOF -+#define VA_COPY va_copy -+EOF -+ -+ cat >> confdefs.pytmp <<\EOF -+ (''' HAVE_VA_COPY ''', ' 1 ') -+EOF -+cat >> confdefs.h <<\EOF -+#define HAVE_VA_COPY 1 -+EOF -+ -+fi -+ -+if test "x$ac_cv_va_val_copy" = "xno"; then -+ cat >> confdefs.pytmp <<\EOF -+ (''' HAVE_VA_LIST_AS_ARRAY ''', ' 1 ') -+EOF -+cat >> confdefs.h <<\EOF -+#define HAVE_VA_LIST_AS_ARRAY 1 -+EOF -+ -+fi -+ -+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 -+ -+ -+ARM_ABI_PREFIX= -+if test "$GNU_CC"; then -+ if test "$CPU_ARCH" = "arm" ; then -+ echo $ac_n "checking for ARM EABI""... $ac_c" 1>&6 -+echo "configure:7549: checking for ARM EABI" >&5 -+if eval "test \"`echo '$''{'ac_cv_gcc_arm_eabi'+set}'`\" = set"; then -+ echo $ac_n "(cached) $ac_c" 1>&6 -+else -+ cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then -+ rm -rf conftest* -+ ac_cv_gcc_arm_eabi="yes" -+else -+ echo "configure: failed program was:" >&5 -+ cat conftest.$ac_ext >&5 -+ rm -rf conftest* -+ ac_cv_gcc_arm_eabi="no" -+fi -+rm -f conftest* -+fi -+ -+echo "$ac_t""$ac_cv_gcc_arm_eabi" 1>&6 -+ if test "$ac_cv_gcc_arm_eabi" = "yes"; then -+ HAVE_ARM_EABI=1 -+ ARM_ABI_PREFIX=eabi- -+ else -+ ARM_ABI_PREFIX=oabi- -+ fi -+ fi -+ -+ TARGET_COMPILER_ABI="${TARGET_COMPILER_ABI-${ARM_ABI_PREFIX}gcc3}" -+fi -+ -+echo $ac_n "checking whether the C++ \"using\" keyword resolves ambiguity""... $ac_c" 1>&6 -+echo "configure:7592: checking whether the C++ \"using\" keyword resolves ambiguity" >&5 -+if eval "test \"`echo '$''{'ac_cv_cpp_ambiguity_resolving_using'+set}'`\" = set"; then -+ echo $ac_n "(cached) $ac_c" 1>&6 -+else -+ cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then -+ rm -rf conftest* -+ ac_cv_cpp_ambiguity_resolving_using=yes -+else -+ echo "configure: failed program was:" >&5 -+ cat conftest.$ac_ext >&5 -+ rm -rf conftest* -+ ac_cv_cpp_ambiguity_resolving_using=no -+fi -+rm -f conftest* -+fi -+ -+echo "$ac_t""$ac_cv_cpp_ambiguity_resolving_using" 1>&6 -+if test "$ac_cv_cpp_ambiguity_resolving_using" = yes ; then -+ cat >> confdefs.pytmp <<\EOF -+ (''' HAVE_CPP_AMBIGUITY_RESOLVING_USING ''', ' 1 ') -+EOF -+cat >> confdefs.h <<\EOF -+#define HAVE_CPP_AMBIGUITY_RESOLVING_USING 1 -+EOF -+ -+fi -+ -+echo $ac_n "checking for C++ dynamic_cast to void*""... $ac_c" 1>&6 -+echo "configure:7637: checking for C++ dynamic_cast to void*" >&5 -+if eval "test \"`echo '$''{'ac_cv_cpp_dynamic_cast_void_ptr'+set}'`\" = set"; then -+ echo $ac_n "(cached) $ac_c" 1>&6 -+else -+ if test "$cross_compiling" = yes; then -+ ac_cv_cpp_dynamic_cast_void_ptr=no -+else -+ cat > conftest.$ac_ext <(subx))) || -+ (((void*)&mdo != (void*)suby) && -+ ((void*)&mdo == dynamic_cast(suby)))); -+ } -+EOF -+if { (eval echo configure:7664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+then -+ ac_cv_cpp_dynamic_cast_void_ptr=yes -+else -+ echo "configure: failed program was:" >&5 -+ cat conftest.$ac_ext >&5 -+ rm -fr conftest* -+ ac_cv_cpp_dynamic_cast_void_ptr=no -+fi -+rm -fr conftest* -+fi -+ -+fi -+ -+echo "$ac_t""$ac_cv_cpp_dynamic_cast_void_ptr" 1>&6 -+if test "$ac_cv_cpp_dynamic_cast_void_ptr" = yes ; then -+ cat >> confdefs.pytmp <<\EOF -+ (''' HAVE_CPP_DYNAMIC_CAST_TO_VOID_PTR ''', ' 1 ') -+EOF -+cat >> confdefs.h <<\EOF -+#define HAVE_CPP_DYNAMIC_CAST_TO_VOID_PTR 1 -+EOF -+ -+fi -+ -+ -+# try harder, when checking for __thread support, see bug 521750 comment #33 and below -+# We pass MOZ_OPTIMIZE_LDFLAGS to the linker because if dead_strip is -+# enabled, the linker in xcode 4.1 will crash. Without this it would crash when -+# linking XUL. -+_SAVE_LDFLAGS=$LDFLAGS -+LDFLAGS="$LDFLAGS $DSO_PIC_CFLAGS $DSO_LDOPTS $MOZ_OPTIMIZE_LDFLAGS" -+echo $ac_n "checking for __thread keyword for TLS variables""... $ac_c" 1>&6 -+echo "configure:7697: checking for __thread keyword for TLS variables" >&5 -+if eval "test \"`echo '$''{'ac_cv_thread_keyword'+set}'`\" = set"; then -+ echo $ac_n "(cached) $ac_c" 1>&6 -+else -+ cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+ rm -rf conftest* -+ ac_cv_thread_keyword=yes -+else -+ echo "configure: failed program was:" >&5 -+ cat conftest.$ac_ext >&5 -+ rm -rf conftest* -+ ac_cv_thread_keyword=no -+fi -+rm -f conftest* -+fi -+ -+echo "$ac_t""$ac_cv_thread_keyword" 1>&6 -+LDFLAGS=$_SAVE_LDFLAGS -+if test "$ac_cv_thread_keyword" = yes; then -+ # mips builds fail with TLS variables because of a binutils bug. -+ # See bug 528687 -+ case "${target}" in -+ mips*-*) -+ : -+ ;; -+ *-android*|*-linuxandroid*) -+ : -+ ;; -+ *) -+ cat >> confdefs.pytmp <<\EOF -+ (''' HAVE_THREAD_TLS_KEYWORD ''', ' 1 ') -+EOF -+cat >> confdefs.h <<\EOF -+#define HAVE_THREAD_TLS_KEYWORD 1 -+EOF -+ -+ ;; -+ esac -+fi -+ -+ -+echo $ac_n "checking for __attribute__((always_inline))""... $ac_c" 1>&6 -+echo "configure:7747: checking for __attribute__((always_inline))" >&5 -+if eval "test \"`echo '$''{'ac_cv_attribute_always_inline'+set}'`\" = set"; then -+ echo $ac_n "(cached) $ac_c" 1>&6 -+else -+ cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then -+ rm -rf conftest* -+ ac_cv_attribute_always_inline=yes -+else -+ echo "configure: failed program was:" >&5 -+ cat conftest.$ac_ext >&5 -+ rm -rf conftest* -+ ac_cv_attribute_always_inline=no -+fi -+rm -f conftest* -+fi -+ -+echo "$ac_t""$ac_cv_attribute_always_inline" 1>&6 -+ -+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_n "checking for LC_MESSAGES""... $ac_c" 1>&6 -+echo "configure:7783: checking for LC_MESSAGES" >&5 -+if eval "test \"`echo '$''{'ac_cv_i18n_lc_messages'+set}'`\" = set"; then -+ echo $ac_n "(cached) $ac_c" 1>&6 -+else -+ cat > conftest.$ac_ext < -+int main() { -+int category = LC_MESSAGES; -+; return 0; } -+EOF -+if { (eval echo configure:7795: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -+ rm -rf conftest* -+ ac_cv_i18n_lc_messages=yes -+else -+ echo "configure: failed program was:" >&5 -+ cat conftest.$ac_ext >&5 -+ rm -rf conftest* -+ ac_cv_i18n_lc_messages=no -+fi -+rm -f conftest* -+fi -+ -+echo "$ac_t""$ac_cv_i18n_lc_messages" 1>&6 -+if test "$ac_cv_i18n_lc_messages" = yes; then -+ cat >> confdefs.pytmp <<\EOF -+ (''' HAVE_I18N_LC_MESSAGES ''', ' 1 ') -+EOF -+cat >> confdefs.h <<\EOF -+#define HAVE_I18N_LC_MESSAGES 1 -+EOF -+ -+fi -+ -+for ac_func in localeconv -+do -+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -+echo "configure:7821: 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 < -+#undef $ac_func -+/* 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:7853: \"$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.pytmp <> confdefs.h <&6 -+fi -+done -+ -+fi # ! SKIP_COMPILER_CHECKS -+ -+TARGET_XPCOM_ABI= -+if test -n "${CPU_ARCH}" -a -n "${TARGET_COMPILER_ABI}"; then -+ TARGET_XPCOM_ABI="${CPU_ARCH}-${TARGET_COMPILER_ABI}" -+fi -+ -+ -+if test -n "$SKIP_COMPILER_CHECKS"; then -+ cat >> confdefs.pytmp <<\EOF -+ (''' MALLOC_H ''', r''' ''') -+EOF -+cat >> confdefs.h <<\EOF -+#define MALLOC_H -+EOF -+ -+ cat >> confdefs.pytmp <<\EOF -+ (''' HAVE_FORCEINLINE ''', ' 1 ') -+EOF -+cat >> confdefs.h <<\EOF -+#define HAVE_FORCEINLINE 1 -+EOF -+ -+ cat >> confdefs.pytmp <<\EOF -+ (''' HAVE_LOCALECONV ''', ' 1 ') -+EOF -+cat >> confdefs.h <<\EOF -+#define HAVE_LOCALECONV 1 -+EOF -+ -+fi # SKIP_COMPILER_CHECKS -+ -+ -+# External Packages -+ -+ -+ -+ -+ -+ -+# Check whether --with-nspr-cflags or --without-nspr-cflags was given. -+if test "${with_nspr_cflags+set}" = set; then -+ withval="$with_nspr_cflags" -+ NSPR_CFLAGS=$withval -+fi -+ -+# Check whether --with-nspr-libs or --without-nspr-libs was given. -+if test "${with_nspr_libs+set}" = set; then -+ withval="$with_nspr_libs" -+ NSPR_LIBS=$withval -+fi -+ -+ -+ -+ # Check whether --enable-nspr-build or --disable-nspr-build was given. -+if test "${enable_nspr_build+set}" = set; then -+ enableval="$enable_nspr_build" -+ if test "$enableval" = "yes"; then -+ MOZ_BUILD_NSPR=1 -+ elif test "$enableval" = "no"; then -+ MOZ_BUILD_NSPR= -+ else -+ { echo "configure: error: Option, nspr-build, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, nspr-build, does not take an argument ($enableval)." 1>&5; exit 1; } -+ fi -+fi -+ -+ -+ -+if test "$MOZ_BUILD_APP" != js || test -n "$JS_STANDALONE"; then -+ _IS_OUTER_CONFIGURE=1 -+fi -+ -+# Check whether --with-system-nspr or --without-system-nspr was given. -+if test "${with_system_nspr+set}" = set; then -+ withval="$with_system_nspr" -+ if test "$withval" = "yes"; then -+ _USE_SYSTEM_NSPR=1 -+ elif test "$withval" = "no"; then -+ : -+ else -+ { echo "configure: error: Option, system-nspr, does not take an argument ($withval)." 1>&2; echo "configure: error: Option, system-nspr, does not take an argument ($withval)." 1>&5; exit 1; } -+ fi -+fi -+ -+ -+JS_POSIX_NSPR=unset -+ -+ if test -n "$JS_STANDALONE"; then -+ case "$target" in -+ *linux*|*darwin*|*dragonfly*|*freebsd*|*netbsd*|*openbsd*) -+ if test -z "$_HAS_NSPR"; then -+ JS_POSIX_NSPR_DEFAULT=1 -+ fi -+ ;; -+ esac -+ fi -+ -+ # Check whether --enable-posix-nspr-emulation or --disable-posix-nspr-emulation was given. -+if test "${enable_posix_nspr_emulation+set}" = set; then -+ enableval="$enable_posix_nspr_emulation" -+ if test "$enableval" = "yes"; then -+ JS_POSIX_NSPR=1 -+ elif test "$enableval" = "no"; then -+ JS_POSIX_NSPR= -+ else -+ { echo "configure: error: Option, posix-nspr-emulation, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, posix-nspr-emulation, does not take an argument ($enableval)." 1>&5; exit 1; } -+ fi -+fi -+ -+ -+ -+ -+echo $ac_n "checking NSPR selection""... $ac_c" 1>&6 -+echo "configure:7993: checking NSPR selection" >&5 -+nspr_opts= -+which_nspr=default -+if test -n "$_USE_SYSTEM_NSPR"; then -+ nspr_opts="x$nspr_opts" -+ which_nspr="system" -+fi -+if test -n "$NSPR_CFLAGS" -o -n "$NSPR_LIBS"; then -+ nspr_opts="x$nspr_opts" -+ which_nspr="command-line" -+fi -+if test -n "$MOZ_BUILD_NSPR"; then -+ nspr_opts="x$nspr_opts" -+ which_nspr="source-tree" -+fi -+if test "$JS_POSIX_NSPR" = unset; then -+ JS_POSIX_NSPR= -+else -+ nspr_opts="x$nspr_opts" -+ which_nspr="posix-wrapper" -+fi -+ -+if test -z "$nspr_opts"; then -+ if test "$MOZ_BUILD_APP" != js; then -+ MOZ_BUILD_NSPR=1 -+ which_nspr="source-tree" -+ else -+ JS_POSIX_NSPR="$JS_POSIX_NSPR_DEFAULT" -+ if test -z "$JS_POSIX_NSPR"; then -+ MOZ_BUILD_NSPR=1 -+ which_nspr="source-tree" -+ else -+ which_nspr="posix-wrapper" -+ fi -+ fi -+fi -+ -+if test -z "$nspr_opts" || test "$nspr_opts" = x; then -+ echo "$ac_t""$which_nspr" 1>&6 -+else -+ { echo "configure: error: only one way of using NSPR may be selected. See 'configure --help'." 1>&2; echo "configure: error: only one way of using NSPR may be selected. See 'configure --help'." 1>&5; exit 1; } -+fi -+ -+ -+ -+if test "$MOZ_BUILD_APP" = js; then -+ if test "$JS_POSIX_NSPR" = 1; then -+ cat >> confdefs.pytmp <<\EOF -+ (''' JS_POSIX_NSPR ''', ' 1 ') -+EOF -+cat >> confdefs.h <<\EOF -+#define JS_POSIX_NSPR 1 -+EOF -+ -+ fi -+ -+fi -+ -+# A (sub)configure invoked by the toplevel configure will always receive -+# --with-nspr-libs on the command line. It will never need to figure out -+# anything itself. -+if test -n "$_IS_OUTER_CONFIGURE"; then -+ -+if test -n "$_USE_SYSTEM_NSPR"; then -+ -+# Check whether --with-nspr-prefix or --without-nspr-prefix was given. -+if test "${with_nspr_prefix+set}" = set; then -+ withval="$with_nspr_prefix" -+ nspr_config_prefix="$withval" -+else -+ nspr_config_prefix="" -+fi -+ -+ -+# Check whether --with-nspr-exec-prefix or --without-nspr-exec-prefix was given. -+if test "${with_nspr_exec_prefix+set}" = set; then -+ withval="$with_nspr_exec_prefix" -+ nspr_config_exec_prefix="$withval" -+else -+ nspr_config_exec_prefix="" -+fi -+ -+ -+ if test -n "$nspr_config_exec_prefix"; then -+ nspr_config_args="$nspr_config_args --exec-prefix=$nspr_config_exec_prefix" -+ if test -z "$NSPR_CONFIG"; then -+ NSPR_CONFIG=$nspr_config_exec_prefix/bin/nspr-config -+ fi -+ fi -+ if test -n "$nspr_config_prefix"; then -+ nspr_config_args="$nspr_config_args --prefix=$nspr_config_prefix" -+ if test -z "$NSPR_CONFIG"; then -+ NSPR_CONFIG=$nspr_config_prefix/bin/nspr-config -+ fi -+ fi -+ -+ unset ac_cv_path_NSPR_CONFIG -+ # Extract the first word of "nspr-config", so it can be a program name with args. -+set dummy nspr-config; ac_word=$2 -+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -+echo "configure:8093: checking for $ac_word" >&5 -+if eval "test \"`echo '$''{'ac_cv_path_NSPR_CONFIG'+set}'`\" = set"; then -+ echo $ac_n "(cached) $ac_c" 1>&6 -+else -+ case "$NSPR_CONFIG" in -+ /*) -+ ac_cv_path_NSPR_CONFIG="$NSPR_CONFIG" # Let the user override the test with a path. -+ ;; -+ ?:/*) -+ ac_cv_path_NSPR_CONFIG="$NSPR_CONFIG" # 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_NSPR_CONFIG="$ac_dir/$ac_word" -+ break -+ fi -+ done -+ IFS="$ac_save_ifs" -+ test -z "$ac_cv_path_NSPR_CONFIG" && ac_cv_path_NSPR_CONFIG="no" -+ ;; -+esac -+fi -+NSPR_CONFIG="$ac_cv_path_NSPR_CONFIG" -+if test -n "$NSPR_CONFIG"; then -+ echo "$ac_t""$NSPR_CONFIG" 1>&6 -+else -+ echo "$ac_t""no" 1>&6 -+fi -+ -+ min_nspr_version=$NSPR_MINVER -+ echo $ac_n "checking for NSPR - version >= $min_nspr_version""... $ac_c" 1>&6 -+echo "configure:8128: checking for NSPR - version >= $min_nspr_version" >&5 -+ -+ no_nspr="" -+ if test "$NSPR_CONFIG" != "no"; then -+ NSPR_CFLAGS=`$NSPR_CONFIG $nspr_config_args --cflags` -+ NSPR_LIBS=`$NSPR_CONFIG $nspr_config_args --libs` -+ NSPR_VERSION_STRING=`$NSPR_CONFIG $nspr_config_args --version` -+ elif test -n "${NO_NSPR_CONFIG_SYSTEM_VERSION}"; then -+ NSPR_CFLAGS="${NO_NSPR_CONFIG_SYSTEM_CFLAGS}" -+ NSPR_LIBS="${NO_NSPR_CONFIG_SYSTEM_LDFLAGS}" -+ NSPR_VERSION_STRING="$NO_NSPR_CONFIG_SYSTEM_VERSION" -+ else -+ no_nspr="yes" -+ fi -+ -+ if test -z "$no_nspr"; then -+ nspr_config_major_version=`echo $NSPR_VERSION_STRING | \ -+ sed 's/\([0-9]*\)\.\([0-9]*\)\(\.\([0-9]*\)\)\{0,1\}/\1/'` -+ nspr_config_minor_version=`echo $NSPR_VERSION_STRING | \ -+ sed 's/\([0-9]*\)\.\([0-9]*\)\(\.\([0-9]*\)\)\{0,1\}/\2/'` -+ nspr_config_micro_version=`echo $NSPR_VERSION_STRING | \ -+ sed 's/\([0-9]*\)\.\([0-9]*\)\(\.\([0-9]*\)\)\{0,1\}/\4/'` -+ if test -z "$nspr_config_micro_version"; then -+ nspr_config_micro_version="0" -+ fi -+ -+ min_nspr_major_version=`echo $min_nspr_version | \ -+ sed 's/\([0-9]*\)\.\([0-9]*\)\(\.\([0-9]*\)\)\{0,1\}/\1/'` -+ min_nspr_minor_version=`echo $min_nspr_version | \ -+ sed 's/\([0-9]*\)\.\([0-9]*\)\(\.\([0-9]*\)\)\{0,1\}/\2/'` -+ min_nspr_micro_version=`echo $min_nspr_version | \ -+ sed 's/\([0-9]*\)\.\([0-9]*\)\(\.\([0-9]*\)\)\{0,1\}/\4/'` -+ if test -z "$min_nspr_micro_version"; then -+ min_nspr_micro_version="0" -+ fi -+ -+ if test "$nspr_config_major_version" -ne "$min_nspr_major_version"; then -+ no_nspr="yes" -+ elif test "$nspr_config_major_version" -eq "$min_nspr_major_version" && -+ test "$nspr_config_minor_version" -lt "$min_nspr_minor_version"; then -+ no_nspr="yes" -+ elif test "$nspr_config_major_version" -eq "$min_nspr_major_version" && -+ test "$nspr_config_minor_version" -eq "$min_nspr_minor_version" && -+ test "$nspr_config_micro_version" -lt "$min_nspr_micro_version"; then -+ no_nspr="yes" -+ fi -+ fi -+ -+ if test -z "$no_nspr"; then -+ echo "$ac_t""yes" 1>&6 -+ MOZ_SYSTEM_NSPR=1 -+ else -+ echo "$ac_t""no" 1>&6 -+ { echo "configure: error: you do not have NSPR installed or your version is older than $NSPR_MINVER." 1>&2; echo "configure: error: you do not have NSPR installed or your version is older than $NSPR_MINVER." 1>&5; exit 1; } -+ fi -+ -+ -+ -+ -+ -+ -+fi -+ -+if test -n "$MOZ_SYSTEM_NSPR" -o -n "$NSPR_CFLAGS" -o -n "$NSPR_LIBS"; then -+ _SAVE_CFLAGS=$CFLAGS -+ CFLAGS="$CFLAGS $NSPR_CFLAGS" -+ cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then -+ : -+else -+ echo "configure: failed program was:" >&5 -+ cat conftest.$ac_ext >&5 -+ rm -rf conftest* -+ { echo "configure: error: system NSPR does not support PR_STATIC_ASSERT or including prtypes.h does not provide it" 1>&2; echo "configure: error: system NSPR does not support PR_STATIC_ASSERT or including prtypes.h does not provide it" 1>&5; exit 1; } -+fi -+rm -f conftest* -+ cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then -+ : -+else -+ echo "configure: failed program was:" >&5 -+ cat conftest.$ac_ext >&5 -+ rm -rf conftest* -+ { echo "configure: error: system NSPR does not support PR_UINT64 or including prtypes.h does not provide it" 1>&2; echo "configure: error: system NSPR does not support PR_UINT64 or including prtypes.h does not provide it" 1>&5; exit 1; } -+fi -+rm -f conftest* -+ CFLAGS=$_SAVE_CFLAGS -+elif test -z "$JS_POSIX_NSPR"; then -+ NSPR_INCLUDE_DIR="${DIST}/include/nspr" -+ NSPR_CFLAGS="-I${NSPR_INCLUDE_DIR}" -+ if test -n "$GNU_CC"; then -+ if test -n "$MOZ_FOLD_LIBS"; then -+ NSPR_LIB_DIR=${DIST}/lib -+ else -+ NSPR_LIB_DIR=${DIST}/bin -+ fi -+ NSPR_LIBS="-L${NSPR_LIB_DIR} -lnspr${NSPR_VERSION} -lplc${NSPR_VERSION} -lplds${NSPR_VERSION}" -+ else -+ # NSS needs actual static libs to link to, and this is where they are. -+ NSPR_LIBS="${DIST}/lib/nspr${NSPR_VERSION}.lib ${DIST}/lib/plc${NSPR_VERSION}.lib ${DIST}/lib/plds${NSPR_VERSION}.lib " -+ NSPR_LIB_DIR="${DIST}/lib" -+ fi -+fi -+ -+ -+ -+ -+ -+PKGCONF_REQUIRES_PRIVATE="Requires.private: nspr" -+if test -n "$MOZ_SYSTEM_NSPR"; then -+ _SAVE_CFLAGS=$CFLAGS -+ CFLAGS="$CFLAGS $NSPR_CFLAGS" -+ cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then -+ : -+else -+ echo "configure: failed program was:" >&5 -+ cat conftest.$ac_ext >&5 -+ rm -rf conftest* -+ { echo "configure: error: system NSPR does not support PR_STATIC_ASSERT" 1>&2; echo "configure: error: system NSPR does not support PR_STATIC_ASSERT" 1>&5; exit 1; } -+fi -+rm -f conftest* -+ CFLAGS=$_SAVE_CFLAGS -+ # piggy back on $MOZ_SYSTEM_NSPR to set a variable for the nspr check for js.pc -+ PKGCONF_REQUIRES_PRIVATE="Requires.private: nspr >= $NSPR_MINVER" -+elif test -n "$JS_POSIX_NSPR"; then -+ PKGCONF_REQUIRES_PRIVATE= -+fi -+ -+ -+fi # _IS_OUTER_CONFIGURE -+ -+ -+ -+if test -n "$JS_STANDALONE"; then -+ ZLIB_DIR=yes -+fi -+ -+ -+ -+MOZZLIB=1.2.3 -+ -+# Check whether --with-system-zlib or --without-system-zlib was given. -+if test "${with_system_zlib+set}" = set; then -+ withval="$with_system_zlib" -+ ZLIB_DIR=$withval -+fi -+ -+ -+if test -z "$MOZ_ZLIB_LIBS$MOZ_ZLIB_CFLAGS$SKIP_LIBRARY_CHECKS"; then -+ _SAVE_CFLAGS=$CFLAGS -+ _SAVE_LDFLAGS=$LDFLAGS -+ _SAVE_LIBS=$LIBS -+ -+ if test -n "${ZLIB_DIR}" -a "${ZLIB_DIR}" != "yes"; then -+ MOZ_ZLIB_CFLAGS="-I${ZLIB_DIR}/include" -+ MOZ_ZLIB_LIBS="-L${ZLIB_DIR}/lib" -+ CFLAGS="$MOZ_ZLIB_CFLAGS $CFLAGS" -+ LDFLAGS="$MOZ_ZLIB_LIBS $LDFLAGS" -+ fi -+ if test -z "$ZLIB_DIR" -o "$ZLIB_DIR" = no; then -+ MOZ_SYSTEM_ZLIB= -+ else -+ echo $ac_n "checking for gzread in -lz""... $ac_c" 1>&6 -+echo "configure:8319: checking for gzread in -lz" >&5 -+ac_lib_var=`echo z'_'gzread | 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="-lz $LIBS" -+cat > conftest.$ac_ext <&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 -+ MOZ_SYSTEM_ZLIB=1 MOZ_ZLIB_LIBS="$MOZ_ZLIB_LIBS -lz" -+else -+ echo "$ac_t""no" 1>&6 -+MOZ_SYSTEM_ZLIB= -+fi -+ -+ if test "$MOZ_SYSTEM_ZLIB" = 1; then -+ MOZZLIBNUM=`echo $MOZZLIB | awk -F. '{printf "0x%x\n", ((($1 * 16 + $2) * 16) + $3) * 16 + $4}'` -+ cat > conftest.$ac_ext < -+ #include -+ #include -+int main() { -+ #if ZLIB_VERNUM < $MOZZLIBNUM -+ #error "Insufficient zlib version ($MOZZLIBNUM required)." -+ #endif -+; return 0; } -+EOF -+if { (eval echo configure:8373: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -+ rm -rf conftest* -+ MOZ_SYSTEM_ZLIB=1 -+else -+ echo "configure: failed program was:" >&5 -+ cat conftest.$ac_ext >&5 -+ rm -rf conftest* -+ { echo "configure: error: Insufficient zlib version for --with-system-zlib ($MOZZLIB required)" 1>&2; echo "configure: error: Insufficient zlib version for --with-system-zlib ($MOZZLIB required)" 1>&5; exit 1; } -+fi -+rm -f conftest* -+ fi -+ fi -+ CFLAGS=$_SAVE_CFLAGS -+ LDFLAGS=$_SAVE_LDFLAGS -+ LIBS=$_SAVE_LIBS -+fi -+ -+ -+ -+ -+ -+ -+ -+if test -n "$ZLIB_IN_MOZGLUE"; then -+ cat >> confdefs.pytmp <<\EOF -+ (''' ZLIB_IN_MOZGLUE ''', ' 1 ') -+EOF -+cat >> confdefs.h <<\EOF -+#define ZLIB_IN_MOZGLUE 1 -+EOF -+ -+fi -+ -+ -+ -+# Application -+ -+# Components and Features -+ -+# Check whether --enable-ui-locale or --disable-ui-locale was given. -+if test "${enable_ui_locale+set}" = set; then -+ enableval="$enable_ui_locale" -+ MOZ_UI_LOCALE=$enableval -+fi -+ -+ -+ -+# Individual module options -+ -+# Debugging and Optimizations -+ -+if test -z "$MOZ_OPTIMIZE_FLAGS"; then -+ MOZ_OPTIMIZE_FLAGS="-O" -+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 -+ MOZ_OPTIMIZE_FLAGS=`echo "$enableval" | sed -e 's|\\\ | |g'` -+ MOZ_OPTIMIZE=2 -+ fi -+else -+ MOZ_OPTIMIZE= -+fi -+else -+ MOZ_OPTIMIZE=1 -+fi -+ -+ -+ -+ case "$target" in -+ *android*) -+ unwind_tables="-funwind-tables" -+ ;; -+ esac -+ if test "$GNU_CC"; then -+ MOZ_ENABLE_FRAME_PTR="-fno-omit-frame-pointer $unwind_tables" -+ MOZ_DISABLE_FRAME_PTR="-fomit-frame-pointer" -+ if test "$CPU_ARCH" = arm; then -+ # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54398 -+ MOZ_ENABLE_FRAME_PTR="$unwind_tables" -+ fi -+ else -+ case "$target" in -+ *-mingw32*) -+ MOZ_ENABLE_FRAME_PTR="-Oy-" -+ MOZ_DISABLE_FRAME_PTR="-Oy" -+ ;; -+ esac -+ fi -+ -+ # If we are debugging, profiling, using sanitizers, or on win32 we want a -+ # frame pointer. -+ if test -z "$MOZ_OPTIMIZE" -o \ -+ -n "$MOZ_PROFILING" -o \ -+ -n "$MOZ_DEBUG" -o \ -+ -n "$MOZ_MSAN" -o \ -+ -n "$MOZ_ASAN" -o \ -+ "$OS_ARCH:$CPU_ARCH" = "WINNT:x86"; then -+ MOZ_FRAMEPTR_FLAGS="$MOZ_ENABLE_FRAME_PTR" -+ else -+ MOZ_FRAMEPTR_FLAGS="$MOZ_DISABLE_FRAME_PTR" -+ fi -+ -+ -+if test "$COMPILE_ENVIRONMENT"; then -+if test -n "$MOZ_OPTIMIZE"; then -+ echo $ac_n "checking for valid optimization flags""... $ac_c" 1>&6 -+echo "configure:8484: checking for valid optimization flags" >&5 -+ _SAVE_CFLAGS=$CFLAGS -+ CFLAGS="$CFLAGS $MOZ_OPTIMIZE_FLAGS" -+ cat > conftest.$ac_ext < -+int main() { -+printf("Hello World\n"); -+; return 0; } -+EOF -+if { (eval echo configure:8495: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -+ rm -rf conftest* -+ _results=yes -+else -+ echo "configure: failed program was:" >&5 -+ cat conftest.$ac_ext >&5 -+ rm -rf conftest* -+ _results=no -+fi -+rm -f conftest* -+ echo "$ac_t""$_results" 1>&6 -+ if test "$_results" = "no"; then -+ { echo "configure: error: These compiler flags are invalid: $MOZ_OPTIMIZE_FLAGS" 1>&2; echo "configure: error: These compiler flags are invalid: $MOZ_OPTIMIZE_FLAGS" 1>&5; exit 1; } -+ fi -+ CFLAGS=$_SAVE_CFLAGS -+fi -+fi # COMPILE_ENVIRONMENT -+ -+ -+ -+ -+ -+ -+ -+ENABLE_TRACE_LOGGING=1 -+# Check whether --enable-trace-logging or --disable-trace-logging was given. -+if test "${enable_trace_logging+set}" = set; then -+ enableval="$enable_trace_logging" -+ if test "$enableval" = "no"; then -+ ENABLE_TRACE_LOGGING= -+ elif test "$enableval" = "yes"; then -+ : -+ else -+ { echo "configure: error: Option, trace-logging, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, trace-logging, does not take an argument ($enableval)." 1>&5; exit 1; } -+ fi -+fi -+ -+ -+ -+ -+if test -n "$ENABLE_TRACE_LOGGING"; then -+ cat >> confdefs.pytmp <<\EOF -+ (''' JS_TRACE_LOGGING ''', ' 1 ') -+EOF -+cat >> confdefs.h <<\EOF -+#define JS_TRACE_LOGGING 1 -+EOF -+ -+fi -+ -+if test -z "$MOZ_ENABLE_WARNINGS_AS_ERRORS"; then -+ WARNINGS_AS_ERRORS='' -+fi -+ -+ -+if test "$JS_STANDALONE"; then -+ MOZ_GLUE_IN_PROGRAM= -+else -+ case "${OS_TARGET}" in -+ Android|WINNT|Darwin) -+ MOZ_GLUE_IN_PROGRAM= -+ ;; -+ *) -+ MOZ_GLUE_IN_PROGRAM=1 -+ cat >> confdefs.pytmp <<\EOF -+ (''' MOZ_GLUE_IN_PROGRAM ''', ' 1 ') -+EOF -+cat >> confdefs.h <<\EOF -+#define MOZ_GLUE_IN_PROGRAM 1 -+EOF -+ -+ ;; -+ esac -+fi -+ -+if test "$MOZ_MEMORY"; then -+ if test "x$MOZ_DEBUG" = "x1"; then -+ cat >> confdefs.pytmp <<\EOF -+ (''' MOZ_MEMORY_DEBUG ''', ' 1 ') -+EOF -+cat >> confdefs.h <<\EOF -+#define MOZ_MEMORY_DEBUG 1 -+EOF -+ -+ fi -+ case "${target}" in -+ *-mingw*) -+ export MOZ_NO_DEBUG_RTL=1 -+ ;; -+ esac -+fi -+ -+ -+ -+# Check whether --enable-small-chunk-size or --disable-small-chunk-size was given. -+if test "${enable_small_chunk_size+set}" = set; then -+ enableval="$enable_small_chunk_size" -+ if test "$enableval" = "yes"; then -+ JS_GC_SMALL_CHUNK_SIZE=1 -+ elif test "$enableval" = "no"; then -+ JS_GC_SMALL_CHUNK_SIZE= -+ else -+ { echo "configure: error: Option, small-chunk-size, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, small-chunk-size, does not take an argument ($enableval)." 1>&5; exit 1; } -+ fi -+fi -+ -+if test -n "$JS_GC_SMALL_CHUNK_SIZE"; then -+ cat >> confdefs.pytmp <<\EOF -+ (''' JS_GC_SMALL_CHUNK_SIZE ''', ' 1 ') -+EOF -+cat >> confdefs.h <<\EOF -+#define JS_GC_SMALL_CHUNK_SIZE 1 -+EOF -+ -+fi -+ -+# Check whether --enable-valgrind or --disable-valgrind was given. -+if test "${enable_valgrind+set}" = set; then -+ enableval="$enable_valgrind" -+ if test "$enableval" = "yes"; then -+ MOZ_VALGRIND=1 -+ elif test "$enableval" = "no"; then -+ MOZ_VALGRIND= -+ else -+ { echo "configure: error: Option, valgrind, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, valgrind, does not take an argument ($enableval)." 1>&5; exit 1; } -+ fi -+fi -+ -+if test -n "$MOZ_VALGRIND"; then -+ ac_safe=`echo "valgrind/valgrind.h" | sed 'y%./+-%__p_%'` -+ echo $ac_n "checking for valgrind/valgrind.h""... $ac_c" 1>&6 -+echo "configure:8626: checking for valgrind/valgrind.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 < -+int main() { -+ -+; return 0; } -+EOF -+if { (eval echo configure:8639: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -+ rm -rf conftest* -+ eval "ac_cv_header_$ac_safe=yes" -+else -+ 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 -+ { echo "configure: error: --enable-valgrind specified but Valgrind is not installed" 1>&2; echo "configure: error: --enable-valgrind specified but Valgrind is not installed" 1>&5; exit 1; } -+ fi -+ -+ cat >> confdefs.pytmp <<\EOF -+ (''' MOZ_VALGRIND ''', ' 1 ') -+EOF -+cat >> confdefs.h <<\EOF -+#define MOZ_VALGRIND 1 -+EOF -+ -+ MOZ_VALGRIND=1 -+fi -+ -+ -+# Check whether --enable-simulator or --disable-simulator was given. -+if test "${enable_simulator+set}" = set; then -+ enableval="$enable_simulator" -+ JS_SIMULATOR="$enableval" -+fi -+ -+ -+if test -n "$JS_SIMULATOR"; then -+ case "$JS_SIMULATOR" in -+ arm|arm64|mips32|mips64) ;; -+ no) -+ JS_SIMULATOR= -+ ;; -+ *) { echo "configure: error: Invalid simulator. Valid simulators are: arm, arm64, mips32, mips64." 1>&2; echo "configure: error: Invalid simulator. Valid simulators are: arm, arm64, mips32, mips64." 1>&5; exit 1; } ;; -+ esac -+fi -+ -+if test -z "$ENABLE_ION"; then -+ cat >> confdefs.pytmp <<\EOF -+ (''' JS_CODEGEN_NONE ''', ' 1 ') -+EOF -+cat >> confdefs.h <<\EOF -+#define JS_CODEGEN_NONE 1 -+EOF -+ -+ JS_CODEGEN_NONE=1 -+elif test "$JS_SIMULATOR" = arm; then -+ if test "$CPU_ARCH" != "x86"; then -+ { echo "configure: error: The ARM simulator only works on x86." 1>&2; echo "configure: error: The ARM simulator only works on x86." 1>&5; exit 1; } -+ fi -+ cat >> confdefs.pytmp <<\EOF -+ (''' JS_SIMULATOR ''', ' 1 ') -+EOF -+cat >> confdefs.h <<\EOF -+#define JS_SIMULATOR 1 -+EOF -+ -+ cat >> confdefs.pytmp <<\EOF -+ (''' JS_SIMULATOR_ARM ''', ' 1 ') -+EOF -+cat >> confdefs.h <<\EOF -+#define JS_SIMULATOR_ARM 1 -+EOF -+ -+ cat >> confdefs.pytmp <<\EOF -+ (''' JS_DISASM_ARM ''', ' 1 ') -+EOF -+cat >> confdefs.h <<\EOF -+#define JS_DISASM_ARM 1 -+EOF -+ -+ cat >> confdefs.pytmp <<\EOF -+ (''' JS_CODEGEN_ARM ''', ' 1 ') -+EOF -+cat >> confdefs.h <<\EOF -+#define JS_CODEGEN_ARM 1 -+EOF -+ -+ JS_SIMULATOR_ARM=1 -+ JS_DISASM_ARM=1 -+ JS_CODEGEN_ARM=1 -+elif test "$JS_SIMULATOR" = arm64; then -+ if test "$CPU_ARCH" != "x86_64"; then -+ { echo "configure: error: The ARM64 simulator only works on x86_64." 1>&2; echo "configure: error: The ARM64 simulator only works on x86_64." 1>&5; exit 1; } -+ fi -+ cat >> confdefs.pytmp <<\EOF -+ (''' JS_SIMULATOR ''', ' 1 ') -+EOF -+cat >> confdefs.h <<\EOF -+#define JS_SIMULATOR 1 -+EOF -+ -+ cat >> confdefs.pytmp <<\EOF -+ (''' JS_SIMULATOR_ARM64 ''', ' 1 ') -+EOF -+cat >> confdefs.h <<\EOF -+#define JS_SIMULATOR_ARM64 1 -+EOF -+ -+ cat >> confdefs.pytmp <<\EOF -+ (''' JS_CODEGEN_ARM64 ''', ' 1 ') -+EOF -+cat >> confdefs.h <<\EOF -+#define JS_CODEGEN_ARM64 1 -+EOF -+ -+ JS_SIMULATOR_ARM64=1 -+ JS_CODEGEN_ARM64=1 -+elif test "$JS_SIMULATOR" = mips32; then -+ if test "$CPU_ARCH" != "x86"; then -+ { echo "configure: error: The MIPS32 simulator only works on x86." 1>&2; echo "configure: error: The MIPS32 simulator only works on x86." 1>&5; exit 1; } -+ fi -+ cat >> confdefs.pytmp <<\EOF -+ (''' JS_SIMULATOR ''', ' 1 ') -+EOF -+cat >> confdefs.h <<\EOF -+#define JS_SIMULATOR 1 -+EOF -+ -+ cat >> confdefs.pytmp <<\EOF -+ (''' JS_SIMULATOR_MIPS32 ''', ' 1 ') -+EOF -+cat >> confdefs.h <<\EOF -+#define JS_SIMULATOR_MIPS32 1 -+EOF -+ -+ cat >> confdefs.pytmp <<\EOF -+ (''' JS_CODEGEN_MIPS32 ''', ' 1 ') -+EOF -+cat >> confdefs.h <<\EOF -+#define JS_CODEGEN_MIPS32 1 -+EOF -+ -+ JS_SIMULATOR_MIPS32=1 -+ JS_CODEGEN_MIPS32=1 -+elif test "$JS_SIMULATOR" = mips64; then -+ if test "$CPU_ARCH" != "x86_64"; then -+ { echo "configure: error: The MIPS64 simulator only works on x86_64." 1>&2; echo "configure: error: The MIPS64 simulator only works on x86_64." 1>&5; exit 1; } -+ fi -+ cat >> confdefs.pytmp <<\EOF -+ (''' JS_SIMULATOR ''', ' 1 ') -+EOF -+cat >> confdefs.h <<\EOF -+#define JS_SIMULATOR 1 -+EOF -+ -+ cat >> confdefs.pytmp <<\EOF -+ (''' JS_SIMULATOR_MIPS64 ''', ' 1 ') -+EOF -+cat >> confdefs.h <<\EOF -+#define JS_SIMULATOR_MIPS64 1 -+EOF -+ -+ cat >> confdefs.pytmp <<\EOF -+ (''' JS_CODEGEN_MIPS64 ''', ' 1 ') -+EOF -+cat >> confdefs.h <<\EOF -+#define JS_CODEGEN_MIPS64 1 -+EOF -+ -+ JS_SIMULATOR_MIPS64=1 -+ JS_CODEGEN_MIPS64=1 -+elif test "$CPU_ARCH" = "x86"; then -+ cat >> confdefs.pytmp <<\EOF -+ (''' JS_CODEGEN_X86 ''', ' 1 ') -+EOF -+cat >> confdefs.h <<\EOF -+#define JS_CODEGEN_X86 1 -+EOF -+ -+ JS_CODEGEN_X86=1 -+elif test "$CPU_ARCH" = "x86_64"; then -+ cat >> confdefs.pytmp <<\EOF -+ (''' JS_CODEGEN_X64 ''', ' 1 ') -+EOF -+cat >> confdefs.h <<\EOF -+#define JS_CODEGEN_X64 1 -+EOF -+ -+ JS_CODEGEN_X64=1 -+elif test "$CPU_ARCH" = "arm"; then -+ cat >> confdefs.pytmp <<\EOF -+ (''' JS_CODEGEN_ARM ''', ' 1 ') -+EOF -+cat >> confdefs.h <<\EOF -+#define JS_CODEGEN_ARM 1 -+EOF -+ -+ JS_CODEGEN_ARM=1 -+ if test -n "$MOZ_DEBUG"; then -+ cat >> confdefs.pytmp <<\EOF -+ (''' JS_DISASM_ARM ''', ' 1 ') -+EOF -+cat >> confdefs.h <<\EOF -+#define JS_DISASM_ARM 1 -+EOF -+ -+ JS_DISASM_ARM=1 -+ fi -+ -+ elif test "$CPU_ARCH" = "mips32"; then -+ cat >> confdefs.pytmp <<\EOF -+ (''' JS_CODEGEN_MIPS32 ''', ' 1 ') -+EOF -+cat >> confdefs.h <<\EOF -+#define JS_CODEGEN_MIPS32 1 -+EOF -+ -+ JS_CODEGEN_MIPS32=1 -+elif test "$CPU_ARCH" = "mips64"; then -+ cat >> confdefs.pytmp <<\EOF -+ (''' JS_CODEGEN_MIPS64 ''', ' 1 ') -+EOF -+cat >> confdefs.h <<\EOF -+#define JS_CODEGEN_MIPS64 1 -+EOF -+ -+ JS_CODEGEN_MIPS64=1 -+fi -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+if test -n "$MOZ_INSTRUMENTS"; then -+ LIBS="$LIBS -framework CoreFoundation" -+fi -+ -+# Check whether --enable-jitspew or --disable-jitspew was given. -+if test "${enable_jitspew+set}" = set; then -+ enableval="$enable_jitspew" -+ if test "$enableval" = "yes"; then -+ JS_JITSPEW=1 -+ elif test "$enableval" = "no"; then -+ JS_JITSPEW= -+ else -+ { echo "configure: error: Option, jitspew, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, jitspew, does not take an argument ($enableval)." 1>&5; exit 1; } -+ fi -+fi -+ -+ -+if test -n "$JS_JITSPEW" -o -n "$MOZ_DEBUG"; then -+ cat >> confdefs.pytmp <<\EOF -+ (''' JS_JITSPEW ''', ' 1 ') -+EOF -+cat >> confdefs.h <<\EOF -+#define JS_JITSPEW 1 -+EOF -+ -+fi -+ -+ -+ -+if test -n "$MOZ_DEBUG"; then -+ cat >> confdefs.pytmp <<\EOF -+ (''' JS_DEBUG ''', ' 1 ') -+EOF -+cat >> confdefs.h <<\EOF -+#define JS_DEBUG 1 -+EOF -+ -+fi -+ -+# Check whether --enable-gczeal or --disable-gczeal was given. -+if test "${enable_gczeal+set}" = set; then -+ enableval="$enable_gczeal" -+ if test "$enableval" = "yes"; then -+ JS_GC_ZEAL=1 -+ elif test "$enableval" = "no"; then -+ JS_GC_ZEAL= -+ else -+ { echo "configure: error: Option, gczeal, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, gczeal, does not take an argument ($enableval)." 1>&5; exit 1; } -+ fi -+fi -+ -+if test -n "$JS_GC_ZEAL" -o -n "$MOZ_DEBUG"; then -+ cat >> confdefs.pytmp <<\EOF -+ (''' JS_GC_ZEAL ''', ' 1 ') -+EOF -+cat >> confdefs.h <<\EOF -+#define JS_GC_ZEAL 1 -+EOF -+ -+fi -+ -+# Check whether --enable-oom-breakpoint or --disable-oom-breakpoint was given. -+if test "${enable_oom_breakpoint+set}" = set; then -+ enableval="$enable_oom_breakpoint" -+ if test "$enableval" = "yes"; then -+ JS_OOM_BREAKPOINT=1 -+ elif test "$enableval" = "no"; then -+ JS_OOM_BREAKPOINT= -+ else -+ { echo "configure: error: Option, oom-breakpoint, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, oom-breakpoint, does not take an argument ($enableval)." 1>&5; exit 1; } -+ fi -+fi -+ -+if test -n "$JS_OOM_BREAKPOINT"; then -+ cat >> confdefs.pytmp <<\EOF -+ (''' JS_OOM_BREAKPOINT ''', ' 1 ') -+EOF -+cat >> confdefs.h <<\EOF -+#define JS_OOM_BREAKPOINT 1 -+EOF -+ -+fi -+ -+ -+ -+ -+# Check whether --enable-clang-plugin or --disable-clang-plugin was given. -+if test "${enable_clang_plugin+set}" = set; then -+ enableval="$enable_clang_plugin" -+ if test "$enableval" = "yes"; then -+ ENABLE_CLANG_PLUGIN=1 -+ elif test "$enableval" = "no"; then -+ ENABLE_CLANG_PLUGIN= -+ else -+ { echo "configure: error: Option, clang-plugin, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, clang-plugin, does not take an argument ($enableval)." 1>&5; exit 1; } -+ fi -+fi -+ -+if test -n "$ENABLE_CLANG_PLUGIN"; then -+ if test -z "${CLANG_CC}${CLANG_CL}"; then -+ { echo "configure: error: Can't use clang plugin without clang." 1>&2; echo "configure: error: Can't use clang plugin without clang." 1>&5; exit 1; } -+ fi -+ -+ echo $ac_n "checking for llvm-config""... $ac_c" 1>&6 -+echo "configure:8988: checking for llvm-config" >&5 -+ if test -z "$LLVMCONFIG"; then -+ if test -n "$CLANG_CL"; then -+ CXX_COMPILER="$(dirname "$CXX")/clang" -+ else -+ CXX_COMPILER="${CXX}" -+ fi -+ LLVMCONFIG=`$CXX_COMPILER -print-prog-name=llvm-config` -+ fi -+ -+ if test -z "$LLVMCONFIG"; then -+ LLVMCONFIG=`which llvm-config` -+ fi -+ -+ if test ! -x "$LLVMCONFIG"; then -+ echo "$ac_t""not found" 1>&6 -+ { echo "configure: error: Cannot find an llvm-config binary for building a clang plugin" 1>&2; echo "configure: error: Cannot find an llvm-config binary for building a clang plugin" 1>&5; exit 1; } -+ fi -+ -+ echo "$ac_t""$LLVMCONFIG" 1>&6 -+ -+ if test -z "$LLVMCONFIG"; then -+ { echo "configure: error: Cannot find an llvm-config binary for building a clang plugin" 1>&2; echo "configure: error: Cannot find an llvm-config binary for building a clang plugin" 1>&5; exit 1; } -+ fi -+ LLVM_CXXFLAGS=`$LLVMCONFIG --cxxflags | sed -e 's/-isysroot [^ ]*//'` -+ -+ LLVM_LDFLAGS=`$LLVMCONFIG --ldflags | tr '\n' ' '` -+ -+ if test "${HOST_OS_ARCH}" = "Darwin"; then -+ CLANG_LDFLAGS="-Wl,-flat_namespace -Wl,-undefined,suppress -lclangASTMatchers" -+ elif test "${HOST_OS_ARCH}" = "WINNT"; then -+ CLANG_LDFLAGS="clangASTMatchers.lib" -+ else -+ CLANG_LDFLAGS="-lclangASTMatchers" -+ fi -+ -+ if test -n "$CLANG_CL"; then -+ LLVM_REPLACE_CXXFLAGS='' -+ for arg in $LLVM_CXXFLAGS; do -+ arg=`echo "$arg"|sed -e 's/^\//-/' -e 's/\\\\/\//g'` -+ LLVM_REPLACE_CXXFLAGS="$LLVM_REPLACE_CXXFLAGS $arg" -+ done -+ LLVM_CXXFLAGS="$LLVM_REPLACE_CXXFLAGS" -+ -+ LLVM_REPLACE_LDFLAGS='' -+ for arg in $LLVM_LDFLAGS; do -+ arg=`echo "$arg"|sed -e 's/^\//-/' -e 's/\\\\/\//g'` -+ LLVM_REPLACE_LDFLAGS="$LLVM_REPLACE_LDFLAGS $arg" -+ done -+ LLVM_LDFLAGS="$LLVM_REPLACE_LDFLAGS" -+ -+ CLANG_REPLACE_LDFLAGS='' -+ for arg in $CLANG_LDFLAGS; do -+ arg=`echo "$arg"|sed -e 's/^\//-/' -e 's/\\\\/\//g'` -+ CLANG_REPLACE_LDFLAGS="$CLANG_REPLACE_LDFLAGS $arg" -+ done -+ CLANG_LDFLAGS="$CLANG_REPLACE_LDFLAGS" -+ fi -+ -+ echo $ac_n "checking for new ASTMatcher API""... $ac_c" 1>&6 -+echo "configure:9048: checking for new ASTMatcher API" >&5 -+if eval "test \"`echo '$''{'ac_cv_have_new_ASTMatcher_api'+set}'`\" = set"; then -+ echo $ac_n "(cached) $ac_c" 1>&6 -+else -+ -+ -+ 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 -+ -+ _SAVE_CXXFLAGS="$CXXFLAGS" -+ _SAVE_CXX="$CXX" -+ _SAVE_MACOSX_DEPLOYMENT_TARGET="$MACOSX_DEPLOYMENT_TARGET" -+ unset MACOSX_DEPLOYMENT_TARGET -+ CXXFLAGS="${LLVM_CXXFLAGS}" -+ CXX="${HOST_CXX}" -+ cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then -+ rm -rf conftest* -+ ac_cv_have_new_ASTMatcher_names="yes" -+else -+ echo "configure: failed program was:" >&5 -+ cat conftest.$ac_ext >&5 -+ rm -rf conftest* -+ ac_cv_have_new_ASTMatcher_names="no" -+fi -+rm -f conftest* -+ CXX="$_SAVE_CXX" -+ CXXFLAGS="$_SAVE_CXXFLAGS" -+ export MACOSX_DEPLOYMENT_TARGET="$_SAVE_MACOSX_DEPLOYMENT_TARGET" -+ 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 -+ -+ -+fi -+ -+echo "$ac_t""$ac_cv_have_new_ASTMatcher_api" 1>&6 -+ if test "$ac_cv_have_new_ASTMatcher_names" = "yes"; then -+ LLVM_CXXFLAGS="$LLVM_CXXFLAGS -DHAVE_NEW_ASTMATCHER_NAMES" -+ fi -+ -+ echo $ac_n "checking for has with ignoringParenImpCasts""... $ac_c" 1>&6 -+echo "configure:9104: checking for has with ignoringParenImpCasts" >&5 -+if eval "test \"`echo '$''{'ac_cv_has_accepts_ignoringParenImpCasts'+set}'`\" = set"; then -+ echo $ac_n "(cached) $ac_c" 1>&6 -+else -+ -+ -+ 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 -+ -+ _SAVE_CXXFLAGS="$CXXFLAGS" -+ _SAVE_CXX="$CXX" -+ _SAVE_MACOSX_DEPLOYMENT_TARGET="$MACOSX_DEPLOYMENT_TARGET" -+ unset MACOSX_DEPLOYMENT_TARGET -+ CXXFLAGS="${LLVM_CXXFLAGS}" -+ CXX="${HOST_CXX}" -+ cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then -+ rm -rf conftest* -+ ac_cv_has_accepts_ignoringParenImpCasts="yes" -+else -+ echo "configure: failed program was:" >&5 -+ cat conftest.$ac_ext >&5 -+ rm -rf conftest* -+ ac_cv_has_accepts_ignoringParenImpCasts="no" -+fi -+rm -f conftest* -+ CXX="$_SAVE_CXX" -+ CXXFLAGS="$_SAVE_CXXFLAGS" -+ export MACOSX_DEPLOYMENT_TARGET="$_SAVE_MACOSX_DEPLOYMENT_TARGET" -+ 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 -+ -+ -+fi -+ -+echo "$ac_t""$ac_cv_has_accepts_ignoringParenImpCasts" 1>&6 -+ if test "$ac_cv_has_accepts_ignoringParenImpCasts" = "yes"; then -+ LLVM_CXXFLAGS="$LLVM_CXXFLAGS -DHAS_ACCEPTS_IGNORINGPARENIMPCASTS" -+ fi -+ -+ cat >> confdefs.pytmp <<\EOF -+ (''' MOZ_CLANG_PLUGIN ''', ' 1 ') -+EOF -+cat >> confdefs.h <<\EOF -+#define MOZ_CLANG_PLUGIN 1 -+EOF -+ -+fi -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+# Check whether --with-sixgill or --without-sixgill was given. -+if test "${with_sixgill+set}" = set; then -+ withval="$with_sixgill" -+ SIXGILL_PATH=$withval -+else -+ SIXGILL_PATH= -+fi -+ -+ -+if test -n "$SIXGILL_PATH"; then -+ if test ! -x "$SIXGILL_PATH/bin/xdbfind" || test ! -f "$SIXGILL_PATH/gcc/xgill.so" || test ! -x "$SIXGILL_PATH/scripts/wrap_gcc/g++"; then -+ { echo "configure: error: The sixgill plugin and binaries are not at the specified path." 1>&2; echo "configure: error: The sixgill plugin and binaries are not at the specified path." 1>&5; 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 -+ elif test "$enableval" = "no"; then -+ ENABLE_STRIP= -+ else -+ { echo "configure: error: Option, strip, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, strip, does not take an argument ($enableval)." 1>&5; exit 1; } -+ fi -+fi -+ -+ -+# Check whether --enable-install-strip or --disable-install-strip was given. -+if test "${enable_install_strip+set}" = set; then -+ enableval="$enable_install_strip" -+ if test "$enableval" = "yes"; then -+ PKG_SKIP_STRIP= -+ elif test "$enableval" = "no"; then -+ PKG_SKIP_STRIP=1 -+ else -+ { echo "configure: error: Option, install-strip, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, install-strip, does not take an argument ($enableval)." 1>&5; exit 1; } -+ fi -+fi -+ -+ -+# Profiling and Instrumenting -+ -+if test -z "$SKIP_LIBRARY_CHECKS"; then -+ -+ 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 -+ -+ for ac_func in __cxa_demangle -+do -+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -+echo "configure:9235: 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 < -+#undef $ac_func -+/* Override any gcc2 internal prototype to avoid an error. */ -+#ifdef __cplusplus -+extern "C" -+#endif -+/* 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:9270: \"$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.pytmp <> confdefs.h <&6 -+HAVE_DEMANGLE= -+fi -+done -+ -+ 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 -+ -+fi -+ -+ -+# Check whether --with-jitreport-granularity or --without-jitreport-granularity was given. -+if test "${with_jitreport_granularity+set}" = set; then -+ withval="$with_jitreport_granularity" -+ JITREPORT_GRANULARITY=$withval -+else -+ JITREPORT_GRANULARITY=3 -+fi -+ -+ -+cat >> confdefs.pytmp <> confdefs.h <&6 -+echo "configure:9331: checking for -pipe support" >&5 -+if test -n "$GNU_CC" -a -n "$GNU_CXX"; then -+ CFLAGS="$CFLAGS -pipe" -+ CXXFLAGS="$CXXFLAGS -pipe" -+ echo "$ac_t""yes" 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:9345: checking whether C compiler supports -fprofile-generate" >&5 -+cat > conftest.$ac_ext <&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" -+ -+ -+ -+ -+ -+ -+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 -+ -+ -+echo $ac_n "checking for tm_zone tm_gmtoff in struct tm""... $ac_c" 1>&6 -+echo "configure:9389: checking for tm_zone tm_gmtoff in struct tm" >&5 -+if eval "test \"`echo '$''{'ac_cv_struct_tm_zone_tm_gmtoff'+set}'`\" = set"; then -+ echo $ac_n "(cached) $ac_c" 1>&6 -+else -+ cat > conftest.$ac_ext < -+int main() { -+struct tm tm; tm.tm_zone = 0; tm.tm_gmtoff = 1; -+; return 0; } -+EOF -+if { (eval echo configure:9401: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -+ rm -rf conftest* -+ ac_cv_struct_tm_zone_tm_gmtoff="yes" -+else -+ echo "configure: failed program was:" >&5 -+ cat conftest.$ac_ext >&5 -+ rm -rf conftest* -+ ac_cv_struct_tm_zone_tm_gmtoff="no" -+fi -+rm -f conftest* -+fi -+ -+echo "$ac_t""$ac_cv_struct_tm_zone_tm_gmtoff" 1>&6 -+if test "$ac_cv_struct_tm_zone_tm_gmtoff" = "yes" ; then -+ cat >> confdefs.pytmp <<\EOF -+ (''' HAVE_TM_ZONE_TM_GMTOFF ''', ' 1 ') -+EOF -+cat >> confdefs.h <<\EOF -+#define HAVE_TM_ZONE_TM_GMTOFF 1 -+EOF -+ -+fi -+fi # ! SKIP_COMPILER_CHECKS -+ -+cat >> confdefs.pytmp <<\EOF -+ (''' CPP_THROW_NEW ''', r''' throw() ''') -+EOF -+cat >> confdefs.h <<\EOF -+#define CPP_THROW_NEW throw() -+EOF -+ -+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_n "checking what kind of list files are supported by the linker""... $ac_c" 1>&6 -+echo "configure:9443: checking what kind of list files are supported by the linker" >&5 -+if eval "test \"`echo '$''{'EXPAND_LIBS_LIST_STYLE'+set}'`\" = set"; then -+ echo $ac_n "(cached) $ac_c" 1>&6 -+else -+ echo "int main() {return 0;}" > conftest.${ac_ext} -+ if { ac_try='${CC-cc} -o conftest.${OBJ_SUFFIX} -c $CFLAGS $CPPFLAGS conftest.${ac_ext} 1>&5'; { (eval echo configure:9448: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest.${OBJ_SUFFIX}; then -+ echo "INPUT(conftest.${OBJ_SUFFIX})" > conftest.list -+ if { ac_try='${CC-cc} -o conftest${ac_exeext} $LDFLAGS conftest.list $LIBS 1>&5'; { (eval echo configure:9450: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest${ac_exeext}; then -+ EXPAND_LIBS_LIST_STYLE=linkerscript -+ else -+ echo "conftest.${OBJ_SUFFIX}" > conftest.list -+ if { ac_try='${CC-cc} -o conftest${ac_exeext} $LDFLAGS -Wl,-filelist,conftest.list $LIBS 1>&5'; { (eval echo configure:9454: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest${ac_exeext}; then -+ EXPAND_LIBS_LIST_STYLE=filelist -+ elif { ac_try='${CC-cc} -o conftest${ac_exeext} $LDFLAGS @conftest.list $LIBS 1>&5'; { (eval echo configure:9456: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest${ac_exeext}; then -+ EXPAND_LIBS_LIST_STYLE=list -+ else -+ EXPAND_LIBS_LIST_STYLE=none -+ fi -+ fi -+ else -+ { echo "configure: error: couldn't compile a simple C file" 1>&2; echo "configure: error: couldn't compile a simple C file" 1>&5; exit 1; } -+ fi -+ rm -rf conftest* -+fi -+ -+echo "$ac_t""$EXPAND_LIBS_LIST_STYLE" 1>&6 -+ -+LIBS_DESC_SUFFIX=desc -+ -+ -+ -+if test "$GCC_USE_GNU_LD"; then -+ echo $ac_n "checking what kind of ordering can be done with the linker""... $ac_c" 1>&6 -+echo "configure:9476: checking what kind of ordering can be done with the linker" >&5 -+if eval "test \"`echo '$''{'EXPAND_LIBS_ORDER_STYLE'+set}'`\" = set"; then -+ echo $ac_n "(cached) $ac_c" 1>&6 -+else -+ > conftest.order -+ _SAVE_LDFLAGS="$LDFLAGS" -+ LDFLAGS="${LDFLAGS} -Wl,--section-ordering-file,conftest.order" -+ cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+ rm -rf conftest* -+ EXPAND_LIBS_ORDER_STYLE=section-ordering-file -+else -+ echo "configure: failed program was:" >&5 -+ cat conftest.$ac_ext >&5 -+ rm -rf conftest* -+ EXPAND_LIBS_ORDER_STYLE= -+fi -+rm -f conftest* -+ LDFLAGS="$_SAVE_LDFLAGS" -+ if test -z "$EXPAND_LIBS_ORDER_STYLE"; then -+ if { ac_try='${CC-cc} ${DSO_LDOPTS} ${LDFLAGS} -o ${DLL_PREFIX}conftest${DLL_SUFFIX} -Wl'; { (eval echo configure:9503: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then -+ EXPAND_LIBS_ORDER_STYLE=linkerscript -+ else -+ EXPAND_LIBS_ORDER_STYLE=none -+ fi -+ rm -f ${DLL_PREFIX}conftest${DLL_SUFFIX} -+ fi -+fi -+ -+echo "$ac_t""$EXPAND_LIBS_ORDER_STYLE" 1>&6 -+fi -+ -+ -+ -+ -+# Build dependencies -+ -+if test "$GNU_CC" -a "$GNU_CXX"; then -+ _DEPEND_CFLAGS='-MD -MP -MF $(MDDEPDIR)/$(@F).pp' -+else -+ if test -z "$_WIN32_MSVC"; then -+ _USE_CPP_INCLUDE_FLAG= -+ _DEFINES_CFLAGS='$(ACDEFINES) -D_JS_CONFDEFS_H_ -DMOZILLA_CLIENT' -+ _DEFINES_CXXFLAGS='$(ACDEFINES) -D_JS_CONFDEFS_H_ -DMOZILLA_CLIENT' -+ else -+ echo '#include ' > dummy-hello.c -+ -+ _CL_PREFIX_REGEX="^\([^:]*:.*[ :] \)\(.*\\\stdio.h\)$" -+ CL_INCLUDES_PREFIX=`${CC} -showIncludes -c -Fonul dummy-hello.c 2>&1 | sed -ne 's/'"$_CL_PREFIX_REGEX"'/\1/p'` -+ _CL_STDIO_PATH=`${CC} -showIncludes -c -Fonul dummy-hello.c 2>&1 | sed -ne 's/'"$_CL_PREFIX_REGEX"'/\2/p'` -+ -+ if ! test -e "$_CL_STDIO_PATH"; then -+ { echo "configure: error: Unable to parse cl -showIncludes prefix. This compiler's locale has an unsupported formatting." 1>&2; echo "configure: error: Unable to parse cl -showIncludes prefix. This compiler's locale has an unsupported formatting." 1>&5; exit 1; } -+ fi -+ if test -z "$CL_INCLUDES_PREFIX"; then -+ { echo "configure: error: Cannot find cl -showIncludes prefix." 1>&2; echo "configure: error: Cannot find cl -showIncludes prefix." 1>&5; exit 1; } -+ fi -+ -+ rm -f dummy-hello.c -+ -+ NONASCII=$'\241\241' -+ -+ fi -+fi -+ -+# Check whether --enable-readline or --disable-readline was given. -+if test "${enable_readline+set}" = set; then -+ enableval="$enable_readline" -+ if test "$enableval" = "yes"; then -+ JS_WANT_READLINE=1 -+ elif test "$enableval" = "no"; then -+ JS_WANT_READLINE= -+ else -+ { echo "configure: error: Option, readline, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, readline, does not take an argument ($enableval)." 1>&5; exit 1; } -+ fi -+fi -+ -+ -+JS_BUNDLED_EDITLINE= -+EDITLINE_LIBS= -+ -+case "$target" in -+*-mingw*) -+ NO_EDITLINE=1 -+ ;; -+*) -+ ;; -+esac -+ -+if test -z "$SKIP_LIBRARY_CHECKS" -a -z "$NO_EDITLINE"; then -+ if test -n "$JS_WANT_READLINE"; then -+ echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6 -+echo "configure:9575: checking for readline in -lreadline" >&5 -+ac_lib_var=`echo readline'_'readline | 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="-lreadline $LIBS" -+cat > conftest.$ac_ext <&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 -+ EDITLINE_LIBS="-lreadline" -+else -+ echo "$ac_t""no" 1>&6 -+{ echo "configure: error: No system readline library found." 1>&2; echo "configure: error: No system readline library found." 1>&5; exit 1; } -+fi -+ -+ else -+ JS_BUNDLED_EDITLINE=1 -+ fi -+ -+ cat >> confdefs.pytmp <<\EOF -+ (''' EDITLINE ''', ' 1 ') -+EOF -+cat >> confdefs.h <<\EOF -+#define EDITLINE 1 -+EOF -+ -+fi -+ -+ -+ -+# Standalone module options (Not for building Mozilla) -+ -+if test "$JS_HAS_CTYPES"; then -+ if test -n "$_MSC_VER" -a \( "$AS" != "ml.exe" -a "$AS" != "ml64.exe" \); then -+ { echo "configure: error: \"$AS\" is not a suitable assembler to build js-ctypes. If you are building with MS Visual Studio 8 Express, you may download the MASM 8.0 package, upgrade to Visual Studio 9 Express, or install the Vista SDK. Or do not use --enable-ctypes." 1>&2; echo "configure: error: \"$AS\" is not a suitable assembler to build js-ctypes. If you are building with MS Visual Studio 8 Express, you may download the MASM 8.0 package, upgrade to Visual Studio 9 Express, or install the Vista SDK. Or do not use --enable-ctypes." 1>&5; exit 1; } -+ fi -+fi -+ -+ -+# Check whether --with-qemu-exe or --without-qemu-exe was given. -+if test "${with_qemu_exe+set}" = set; then -+ withval="$with_qemu_exe" -+ QEMU_EXE=$withval -+fi -+ -+ -+# Check whether --with-cross-lib or --without-cross-lib was given. -+if test "${with_cross_lib+set}" = set; then -+ withval="$with_cross_lib" -+ CROSS_LIB=$withval -+else -+ CROSS_LIB=/usr/$target -+fi -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+_INTL_API=yes -+ -+ -+ -+ICU_LIB_NAMES= -+MOZ_SYSTEM_ICU= -+# Check whether --with-system-icu or --without-system-icu was given. -+if test "${with_system_icu+set}" = set; then -+ withval="$with_system_icu" -+ if test "$withval" = "yes"; then -+ MOZ_SYSTEM_ICU=1 -+ elif test "$withval" = "no"; then -+ : -+ else -+ { echo "configure: error: Option, system-icu, does not take an argument ($withval)." 1>&2; echo "configure: error: Option, system-icu, does not take an argument ($withval)." 1>&5; exit 1; } -+ fi -+fi -+ -+ -+if test -n "$MOZ_SYSTEM_ICU"; then -+ succeeded=no -+ -+ if test -z "$PKG_CONFIG"; then -+ echo "*** The pkg-config script could not be found. Make sure it is" -+ echo "*** in your path, or set the PKG_CONFIG environment variable" -+ echo "*** to the full path to pkg-config." -+ echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." -+ else -+ PKG_CONFIG_MIN_VERSION=0.9.0 -+ if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then -+ echo $ac_n "checking for icu-i18n >= 58.1""... $ac_c" 1>&6 -+echo "configure:9722: checking for icu-i18n >= 58.1" >&5 -+ -+ if $PKG_CONFIG --exists "icu-i18n >= 58.1" ; then -+ echo "$ac_t""yes" 1>&6 -+ succeeded=yes -+ -+ echo $ac_n "checking MOZ_ICU_CFLAGS""... $ac_c" 1>&6 -+echo "configure:9729: checking MOZ_ICU_CFLAGS" >&5 -+ MOZ_ICU_CFLAGS=`$PKG_CONFIG --cflags "icu-i18n >= 58.1"` -+ echo "$ac_t""$MOZ_ICU_CFLAGS" 1>&6 -+ -+ echo $ac_n "checking MOZ_ICU_LIBS""... $ac_c" 1>&6 -+echo "configure:9734: checking MOZ_ICU_LIBS" >&5 -+ ## Remove evil flags like -Wl,--export-dynamic -+ MOZ_ICU_LIBS="`$PKG_CONFIG --libs \"icu-i18n >= 58.1\" |sed s/-Wl,--export-dynamic//g`" -+ echo "$ac_t""$MOZ_ICU_LIBS" 1>&6 -+ else -+ MOZ_ICU_CFLAGS="" -+ MOZ_ICU_LIBS="" -+ ## If we have a custom action on failure, don't print errors, but -+ ## do set a variable so people can do so. -+ MOZ_ICU_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "icu-i18n >= 58.1"` -+ echo $MOZ_ICU_PKG_ERRORS -+ fi -+ -+ -+ -+ else -+ echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." -+ echo "*** See http://www.freedesktop.org/software/pkgconfig" -+ fi -+ fi -+ -+ if test $succeeded = yes; then -+ : -+ else -+ if test "$COMPILE_ENVIRONMENT"; then -+ { echo "configure: error: Library requirements (icu-i18n >= 58.1) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." 1>&2; echo "configure: error: Library requirements (icu-i18n >= 58.1) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." 1>&5; exit 1; } -+ fi -+ fi -+ -+ CFLAGS="$CFLAGS $MOZ_ICU_CFLAGS" -+ CXXFLAGS="$CXXFLAGS $MOZ_ICU_CFLAGS" -+fi -+ -+ -+ -+# Check whether --with-intl-api or --without-intl-api was given. -+if test "${with_intl_api+set}" = set; then -+ withval="$with_intl_api" -+ _INTL_API=$withval -+fi -+ -+ -+ENABLE_INTL_API= -+EXPOSE_INTL_API= -+case "$_INTL_API" in -+no) -+ ;; -+build) -+ ENABLE_INTL_API=1 -+ ;; -+yes) -+ ENABLE_INTL_API=1 -+ EXPOSE_INTL_API=1 -+ ;; -+*) -+ { echo "configure: error: Invalid value passed to --with-intl-api: $_INTL_API" 1>&2; echo "configure: error: Invalid value passed to --with-intl-api: $_INTL_API" 1>&5; exit 1; } -+ ;; -+esac -+ -+if test -n "$ENABLE_INTL_API"; then -+ USE_ICU=1 -+fi -+ -+if test -n "$EXPOSE_INTL_API"; then -+ cat >> confdefs.pytmp <<\EOF -+ (''' EXPOSE_INTL_API ''', ' 1 ') -+EOF -+cat >> confdefs.h <<\EOF -+#define EXPOSE_INTL_API 1 -+EOF -+ -+fi -+ -+if test -n "$ENABLE_INTL_API"; then -+ cat >> confdefs.pytmp <<\EOF -+ (''' ENABLE_INTL_API ''', ' 1 ') -+EOF -+cat >> confdefs.h <<\EOF -+#define ENABLE_INTL_API 1 -+EOF -+ -+fi -+ -+if test -n "$USE_ICU"; then -+ icudir="$_topsrcdir/intl/icu/source" -+ if test ! -d "$icudir"; then -+ icudir="$_topsrcdir/../../intl/icu/source" -+ if test ! -d "$icudir"; then -+ { echo "configure: error: Cannot find the ICU directory" 1>&2; echo "configure: error: Cannot find the ICU directory" 1>&5; exit 1; } -+ fi -+ fi -+ -+ version=`sed -n 's/^[[:space:]]*#[[:space:]]*define[[:space:]][[:space:]]*U_ICU_VERSION_MAJOR_NUM[[:space:]][[:space:]]*\([0-9][0-9]*\)[[:space:]]*$/\1/p' "$icudir/common/unicode/uvernum.h"` -+ if test x"$version" = x; then -+ { echo "configure: error: cannot determine icu version number from uvernum.h header file $lineno" 1>&2; echo "configure: error: cannot determine icu version number from uvernum.h header file $lineno" 1>&5; exit 1; } -+ fi -+ MOZ_ICU_VERSION="$version" -+ -+ # TODO: the l is actually endian-dependent -+ # We could make this set as 'l' or 'b' for little or big, respectively, -+ # but we'd need to check in a big-endian version of the file. -+ ICU_DATA_FILE="icudt${version}l.dat" -+ -+ if test -z "$JS_STANDALONE" -a -z "$MOZ_SYSTEM_ICU" -a "$OS_TARGET" != WINNT -a "$MOZ_WIDGET_TOOLKIT" != "android"; then -+ MOZ_ICU_DATA_ARCHIVE=1 -+ else -+ MOZ_ICU_DATA_ARCHIVE= -+ fi -+fi -+ -+ -+ -+ -+ -+ -+ -+if test -n "$USE_ICU" -a -z "$MOZ_SYSTEM_ICU"; then -+ if test -z "$YASM" -a -z "$GNU_AS" -a "$COMPILE_ENVIRONMENT"; then -+ { echo "configure: error: Building ICU requires either yasm or a GNU assembler. If you do not have either of those available for this platform you must use --without-intl-api" 1>&2; echo "configure: error: Building ICU requires either yasm or a GNU assembler. If you do not have either of those available for this platform you must use --without-intl-api" 1>&5; exit 1; } -+ fi -+ cat >> confdefs.pytmp <<\EOF -+ (''' U_STATIC_IMPLEMENTATION ''', ' 1 ') -+EOF -+cat >> confdefs.h <<\EOF -+#define U_STATIC_IMPLEMENTATION 1 -+EOF -+ -+ cat >> confdefs.pytmp <<\EOF -+ (''' U_USING_ICU_NAMESPACE ''', r''' 0 ''') -+EOF -+cat >> confdefs.h <<\EOF -+#define U_USING_ICU_NAMESPACE 0 -+EOF -+ -+fi -+ -+ -+CFLAGS=`echo \ -+ $_WARNINGS_CFLAGS \ -+ $CFLAGS` -+ -+CXXFLAGS=`echo \ -+ $_WARNINGS_CXXFLAGS \ -+ $CXXFLAGS` -+ -+COMPILE_CFLAGS=`echo \ -+ $_DEFINES_CFLAGS \ -+ $COMPILE_CFLAGS` -+ -+COMPILE_CXXFLAGS=`echo \ -+ $_DEFINES_CXXFLAGS \ -+ $COMPILE_CXXFLAGS` -+ -+HOST_CFLAGS=`echo \ -+ $HOST_CFLAGS` -+ -+HOST_CXXFLAGS=`echo \ -+ $HOST_CXXFLAGS` -+ -+ -+ -+ -+OS_CFLAGS="$CFLAGS" -+OS_CXXFLAGS="$CXXFLAGS" -+OS_CPPFLAGS="$CPPFLAGS" -+OS_COMPILE_CFLAGS="$COMPILE_CFLAGS" -+OS_COMPILE_CXXFLAGS="$COMPILE_CXXFLAGS" -+OS_LDFLAGS="$LDFLAGS" -+OS_LIBS="$LIBS" -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+cat >> confdefs.pytmp <> confdefs.h <&6 -+echo "configure:9955: 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 < -+#undef $ac_func -+/* 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:9987: \"$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.pytmp <> confdefs.h <&6 -+fi -+done -+ -+ -+ -+if test "$MOZ_DEBUG"; then -+ cat >> confdefs.pytmp <<\EOF -+ (''' MOZ_REFLOW_PERF ''', ' 1 ') -+EOF -+cat >> confdefs.h <<\EOF -+#define MOZ_REFLOW_PERF 1 -+EOF -+ -+ cat >> confdefs.pytmp <<\EOF -+ (''' MOZ_REFLOW_PERF_DSP ''', ' 1 ') -+EOF -+cat >> confdefs.h <<\EOF -+#define MOZ_REFLOW_PERF_DSP 1 -+EOF -+ -+fi -+ -+ -+if test -z "$GNU_CC" -a "$OS_ARCH" = "WINNT"; then -+ PREPROCESS_OPTION="-P -Fi" -+else -+ PREPROCESS_OPTION="-E -o " -+fi -+ -+ -+ -+ -+ -+ -+ -+ -+MALLOC_HEADERS="malloc.h malloc_np.h malloc/malloc.h sys/malloc.h" -+MALLOC_H= -+ -+for file in $MALLOC_HEADERS; do -+ ac_safe=`echo "$file" | sed 'y%./+-%__p_%'` -+ echo $ac_n "checking for $file""... $ac_c" 1>&6 -+echo "configure:10053: checking for $file" >&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 < -+int main() { -+ -+; return 0; } -+EOF -+if { (eval echo configure:10066: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -+ rm -rf conftest* -+ eval "ac_cv_header_$ac_safe=yes" -+else -+ 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 -+ MALLOC_H=$file -+ else -+ echo "$ac_t""no" 1>&6 -+ -+ fi -+ -+ if test "$MALLOC_H" != ""; then -+ cat >> confdefs.pytmp < ''') -+EOF -+cat >> confdefs.h < -+EOF -+ -+ break -+ fi -+done -+ -+for ac_func in strndup posix_memalign memalign -+do -+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -+echo "configure:10101: 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 < -+#undef $ac_func -+/* 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:10133: \"$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.pytmp <> confdefs.h <&6 -+fi -+done -+ -+ -+for ac_func in malloc_usable_size -+do -+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -+echo "configure:10164: 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 < -+#undef $ac_func -+/* 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:10196: \"$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.pytmp <> confdefs.h <&6 -+fi -+done -+ -+MALLOC_USABLE_SIZE_CONST_PTR=const -+if test -n "$HAVE_MALLOC_H"; then -+ echo $ac_n "checking whether malloc_usable_size definition can use const argument""... $ac_c" 1>&6 -+echo "configure:10226: checking whether malloc_usable_size definition can use const argument" >&5 -+ cat > conftest.$ac_ext < -+ #include -+ size_t malloc_usable_size(const void *ptr); -+int main() { -+return malloc_usable_size(0); -+; return 0; } -+EOF -+if { (eval echo configure:10237: \"$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 "$ac_t""no" 1>&6 -+ MALLOC_USABLE_SIZE_CONST_PTR= -+fi -+rm -f conftest* -+fi -+cat >> confdefs.pytmp <> confdefs.h <&6 -+echo "configure:10259: checking for valloc in malloc.h" >&5 -+cat > conftest.$ac_ext < -+EOF -+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | -+ egrep "valloc" >/dev/null 2>&1; then -+ rm -rf conftest* -+ cat >> confdefs.pytmp <<\EOF -+ (''' HAVE_VALLOC ''', ' 1 ') -+EOF -+cat >> confdefs.h <<\EOF -+#define HAVE_VALLOC 1 -+EOF -+ -+ echo "$ac_t""yes" 1>&6 -+else -+ rm -rf conftest* -+ echo "$ac_t""no" 1>&6 -+fi -+rm -f conftest* -+ -+ -+echo $ac_n "checking for valloc in unistd.h""... $ac_c" 1>&6 -+echo "configure:10284: checking for valloc in unistd.h" >&5 -+cat > conftest.$ac_ext < -+EOF -+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | -+ egrep "valloc" >/dev/null 2>&1; then -+ rm -rf conftest* -+ cat >> confdefs.pytmp <<\EOF -+ (''' HAVE_VALLOC ''', ' 1 ') -+EOF -+cat >> confdefs.h <<\EOF -+#define HAVE_VALLOC 1 -+EOF -+ -+ echo "$ac_t""yes" 1>&6 -+else -+ rm -rf conftest* -+ echo "$ac_t""no" 1>&6 -+fi -+rm -f conftest* -+ -+ -+ -+ -+ -+for ac_func in setlocale localeconv -+do -+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -+echo "configure:10314: 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 < -+#undef $ac_func -+/* 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:10346: \"$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.pytmp <> confdefs.h <&6 -+fi -+done -+ -+ -+ -+ -+ -+ -+if test -n "$JS_STANDALONE"; then -+MOZ_APP_NAME="mozjs" -+MOZ_APP_VERSION="$MOZILLA_SYMBOLVERSION" -+JS_LIBRARY_NAME="mozjs-$MOZILLA_SYMBOLVERSION" -+else -+JS_LIBRARY_NAME="mozjs" -+fi -+JS_CONFIG_LIBS="$NSPR_LIBS $LIBS" -+if test -n "$GNU_CC"; then -+JS_CONFIG_MOZ_JS_LIBS='-L${libdir} -l${JS_LIBRARY_NAME}' -+else -+JS_CONFIG_MOZ_JS_LIBS='${libdir}/${JS_LIBRARY_NAME}.lib' -+fi -+ -+ -+ -+ -+ -+ -+if test "$MOZ_BUILD_APP" != js -o -n "$JS_STANDALONE"; then -+ -+ # Run jemalloc configure script -+ -+ if test -z "$MOZ_SYSTEM_JEMALLOC" -a "$MOZ_MEMORY" && test -n "$MOZ_JEMALLOC4" -o -n "$MOZ_REPLACE_MALLOC"; then -+ ac_configure_args="--build=$build --host=$target --enable-stats --with-jemalloc-prefix=je_ --disable-valgrind" -+ # We're using memalign for _aligned_malloc in memory/build/mozmemory_wrap.c -+ # on Windows, so just export memalign on all platforms. -+ ac_configure_args="$ac_configure_args ac_cv_func_memalign=yes" -+ if test -n "$MOZ_REPLACE_MALLOC"; then -+ # When using replace_malloc, we always want valloc exported from jemalloc. -+ ac_configure_args="$ac_configure_args ac_cv_func_valloc=yes" -+ if test "${OS_ARCH}" = Darwin; then -+ # We also need to enable pointer validation on Mac because jemalloc's -+ # zone allocator is not used. -+ ac_configure_args="$ac_configure_args --enable-ivsalloc" -+ fi -+ fi -+ if test -n "$MOZ_JEMALLOC4"; then -+ case "${OS_ARCH}" in -+ WINNT|Darwin) -+ # We want jemalloc functions to be kept hidden on both Mac and Windows -+ # See memory/build/mozmemory_wrap.h for details. -+ ac_configure_args="$ac_configure_args --without-export" -+ ;; -+ esac -+ if test "${OS_ARCH}" = WINNT; then -+ # Lazy lock initialization doesn't play well with lazy linking of -+ # mozglue.dll on Windows XP (leads to startup crash), so disable it. -+ ac_configure_args="$ac_configure_args --disable-lazy-lock" -+ -+ # 64-bit Windows builds require a minimum 16-byte alignment. -+ if test -n "$HAVE_64BIT_BUILD"; then -+ ac_configure_args="$ac_configure_args --with-lg-tiny-min=4" -+ fi -+ fi -+ elif test "${OS_ARCH}" = Darwin; then -+ # When building as a replace-malloc lib, disabling the zone allocator -+ # forces to use pthread_atfork. -+ ac_configure_args="$ac_configure_args --disable-zone-allocator" -+ fi -+ _MANGLE="malloc posix_memalign aligned_alloc calloc realloc free memalign valloc malloc_usable_size" -+ JEMALLOC_WRAPPER= -+ if test -z "$MOZ_REPLACE_MALLOC"; then -+ case "$OS_ARCH" in -+ Linux|DragonFly|FreeBSD|NetBSD|OpenBSD) -+ MANGLE=$_MANGLE -+ ;; -+ esac -+ elif test -z "$MOZ_JEMALLOC4"; then -+ MANGLE=$_MANGLE -+ JEMALLOC_WRAPPER=replace_ -+ fi -+ if test -n "$MANGLE"; then -+ MANGLED= -+ for mangle in ${MANGLE}; do -+ if test -n "$MANGLED"; then -+ MANGLED="$mangle:$JEMALLOC_WRAPPER$mangle,$MANGLED" -+ else -+ MANGLED="$mangle:$JEMALLOC_WRAPPER$mangle" -+ fi -+ done -+ ac_configure_args="$ac_configure_args --with-mangling=$MANGLED" -+ fi -+ unset CONFIG_FILES -+ if test -z "$MOZ_TLS"; then -+ ac_configure_args="$ac_configure_args --disable-tls" -+ fi -+ EXTRA_CFLAGS="$CFLAGS" -+ for var in AS CC CXX CPP LD AR RANLIB STRIP CPPFLAGS EXTRA_CFLAGS LDFLAGS; do -+ ac_configure_args="$ac_configure_args $var='`eval echo \\${${var}}`'" -+ done -+ -+ # jemalloc's configure assumes that if you have CFLAGS set at all, you set -+ # all the flags necessary to configure jemalloc, which is not likely to be -+ # the case on Windows if someone is building Firefox with flags set in -+ # their mozconfig. -+ if test "$_MSC_VER"; then -+ ac_configure_args="$ac_configure_args CFLAGS=" -+ fi -+ -+ # Force disable DSS support in jemalloc. -+ ac_configure_args="$ac_configure_args ac_cv_func_sbrk=false" -+ -+ # Make Linux builds munmap freed chunks instead of recycling them. -+ ac_configure_args="$ac_configure_args --enable-munmap" -+ -+ # Disable cache oblivious behavior that appears to have a performance -+ # impact on Firefox. -+ ac_configure_args="$ac_configure_args --disable-cache-oblivious" -+ -+ if ! test -e memory/jemalloc; then -+ mkdir -p memory/jemalloc -+ fi -+ -+ # jemalloc's configure runs git to determine the version. But when building -+ # from a gecko git clone, the git commands it uses is going to pick gecko's -+ # information, not jemalloc's, which is useless. So pretend we don't have git -+ # at all. That will make jemalloc's configure pick the in-tree VERSION file. -+ (PATH="$srcdir/memory/jemalloc/helper:$PATH"; -+ for moz_config_dir in memory/jemalloc/src; do -+ _CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} -+ case "$moz_config_dir" in -+ *:*) -+ objdir=$(echo $moz_config_dir | awk -F: '{print $2}') -+ ;; -+ *) -+ objdir=$moz_config_dir -+ ;; -+ esac -+ echo $objdir >> subconfigures -+ -+ dumpenv="true | " -+ case "$host" in -+ *-mingw*) -+ _CONFIG_SHELL=$(cd $(dirname $_CONFIG_SHELL); pwd -W)/$(basename $_CONFIG_SHELL) -+ if test ! -e "$_CONFIG_SHELL" -a -e "${_CONFIG_SHELL}.exe"; then -+ _CONFIG_SHELL="${_CONFIG_SHELL}.exe" -+ fi -+ dumpenv="$PERL $_topsrcdir/build/win32/dumpenv4python.pl $ac_configure_args | " -+ ;; -+ esac -+ -+ eval $dumpenv $PYTHON $_topsrcdir/build/subconfigure.py --prepare "$srcdir" "$moz_config_dir" "$_CONFIG_SHELL" $ac_configure_args -+ -+ done -+ -+ ) || exit 1 -+ ac_configure_args="$_SUBDIR_CONFIG_ARGS" -+ fi -+ -+fi -+ -+ -+ -+# Avoid using obsolete NSPR features -+cat >> confdefs.pytmp <<\EOF -+ (''' NO_NSPR_10_SUPPORT ''', ' 1 ') -+EOF -+cat >> confdefs.h <<\EOF -+#define NO_NSPR_10_SUPPORT 1 -+EOF -+ -+ -+WIN_TOP_SRC= -+case "$host_os" in -+mingw*) -+ WIN_TOP_SRC=`cd $srcdir; pwd -W` -+ ;; -+esac -+ -+ -+top_srcdir=$srcdir -+ -+ -+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 -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 -+: ${CONFIG_STATUS=./config.data} -+ -+echo creating $CONFIG_STATUS -+ -+cat > $CONFIG_STATUS <> $CONFIG_STATUS -+rm confdefs.pytmp confdefs.h -+ -+cat >> $CONFIG_STATUS <<\EOF -+] -+ -+substs = [ -+EOF -+ -+sed 's/$/,/' >> $CONFIG_STATUS <> $CONFIG_STATUS -+done -+ -+cat >> $CONFIG_STATUS <<\EOF -+] -+ -+non_global_defines = [ -+EOF -+ -+if test -n "$_NON_GLOBAL_ACDEFINES"; then -+ for var in $_NON_GLOBAL_ACDEFINES; do -+ echo " '$var'," >> $CONFIG_STATUS -+ done -+fi -+ -+cat >> $CONFIG_STATUS <&6 +-echo "configure:9951: checking for $ac_func" >&5 ++echo "configure:9957: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:9989: \"$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 +@@ -10045,12 +10051,12 @@ + for file in $MALLOC_HEADERS; do + ac_safe=`echo "$file" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $file""... $ac_c" 1>&6 +-echo "configure:10049: checking for $file" >&5 ++echo "configure:10055: checking for $file" >&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 < +@@ -10058,7 +10064,7 @@ + + ; return 0; } + EOF +-if { (eval echo configure:10062: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:10068: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" + else +@@ -10093,12 +10099,12 @@ + for ac_func in strndup posix_memalign memalign + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:10097: checking for $ac_func" >&5 ++echo "configure:10103: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:10135: \"$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 +@@ -10156,12 +10162,12 @@ + for ac_func in malloc_usable_size + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:10160: checking for $ac_func" >&5 ++echo "configure:10166: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:10198: \"$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 +@@ -10218,9 +10224,9 @@ + MALLOC_USABLE_SIZE_CONST_PTR=const + if test -n "$HAVE_MALLOC_H"; then + echo $ac_n "checking whether malloc_usable_size definition can use const argument""... $ac_c" 1>&6 +-echo "configure:10222: checking whether malloc_usable_size definition can use const argument" >&5 ++echo "configure:10228: checking whether malloc_usable_size definition can use const argument" >&5 + cat > conftest.$ac_ext < + #include +@@ -10229,7 +10235,7 @@ + return malloc_usable_size(0); + ; return 0; } + EOF +-if { (eval echo configure:10233: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:10239: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6 + else +@@ -10251,9 +10257,9 @@ + + + echo $ac_n "checking for valloc in malloc.h""... $ac_c" 1>&6 +-echo "configure:10255: checking for valloc in malloc.h" >&5 ++echo "configure:10261: checking for valloc in malloc.h" >&5 + cat > conftest.$ac_ext < + EOF +@@ -10276,9 +10282,9 @@ + + + echo $ac_n "checking for valloc in unistd.h""... $ac_c" 1>&6 +-echo "configure:10280: checking for valloc in unistd.h" >&5 ++echo "configure:10286: checking for valloc in unistd.h" >&5 + cat > conftest.$ac_ext < + EOF +@@ -10306,12 +10312,12 @@ + for ac_func in setlocale localeconv + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:10310: checking for $ac_func" >&5 ++echo "configure:10316: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:10348: \"$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 diff -Nru mozjs52-52.3.1/debian/patches/remove-nspr-dependency.patch mozjs52-52.8.1/debian/patches/remove-nspr-dependency.patch --- mozjs52-52.3.1/debian/patches/remove-nspr-dependency.patch 2017-10-20 17:12:58.000000000 +0000 +++ mozjs52-52.8.1/debian/patches/remove-nspr-dependency.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,56 +0,0 @@ -From: Philip Chimento -Date: Wed, 5 Jul 2017 22:53:30 -0700 -Subject: build: Remove unnecessary NSPR dependency - -When SpiderMonkey is configured with --enable-posix-nspr-emulation, then -the dependency on NSPR can be removed from the pkg-config file. - -https://bugzilla.mozilla.org/show_bug.cgi?id=1379539 ---- - build/autoconf/nspr-build.m4 | 11 ++++++----- - js/src/js.pc.in | 2 +- - 2 files changed, 7 insertions(+), 6 deletions(-) - -diff --git a/build/autoconf/nspr-build.m4 b/build/autoconf/nspr-build.m4 -index fe6dab7..b733579 100644 ---- a/build/autoconf/nspr-build.m4 -+++ b/build/autoconf/nspr-build.m4 -@@ -177,11 +177,8 @@ AC_SUBST_LIST(NSPR_CFLAGS) - AC_SUBST(NSPR_INCLUDE_DIR) - AC_SUBST(NSPR_LIB_DIR) - --NSPR_PKGCONF_CHECK="nspr" -+PKGCONF_REQUIRES_PRIVATE="Requires.private: nspr" - if test -n "$MOZ_SYSTEM_NSPR"; then -- # piggy back on $MOZ_SYSTEM_NSPR to set a variable for the nspr check for js.pc -- NSPR_PKGCONF_CHECK="nspr >= $NSPR_MINVER" -- - _SAVE_CFLAGS=$CFLAGS - CFLAGS="$CFLAGS $NSPR_CFLAGS" - AC_TRY_COMPILE([#include "prlog.h"], -@@ -191,8 +188,12 @@ if test -n "$MOZ_SYSTEM_NSPR"; then - , - AC_MSG_ERROR([system NSPR does not support PR_STATIC_ASSERT])) - CFLAGS=$_SAVE_CFLAGS -+ # piggy back on $MOZ_SYSTEM_NSPR to set a variable for the nspr check for js.pc -+ PKGCONF_REQUIRES_PRIVATE="Requires.private: nspr >= $NSPR_MINVER" -+elif test -n "$JS_POSIX_NSPR"; then -+ PKGCONF_REQUIRES_PRIVATE= - fi --AC_SUBST(NSPR_PKGCONF_CHECK) -+AC_SUBST([PKGCONF_REQUIRES_PRIVATE]) - - fi # _IS_OUTER_CONFIGURE - -diff --git a/js/src/js.pc.in b/js/src/js.pc.in -index 1efea33..2eae393 100644 ---- a/js/src/js.pc.in -+++ b/js/src/js.pc.in -@@ -6,6 +6,6 @@ includedir=@includedir@ - Name: SpiderMonkey @MOZILLA_VERSION@ - Description: The Mozilla library for JavaScript - Version: @MOZILLA_VERSION@ --Requires.private: @NSPR_PKGCONF_CHECK@ -+@PKGCONF_REQUIRES_PRIVATE@ - Libs: -L${libdir} -l@JS_LIBRARY_NAME@ - Cflags: -include ${includedir}/@JS_LIBRARY_NAME@/js/RequiredDefines.h -I${includedir}/@JS_LIBRARY_NAME@ diff -Nru mozjs52-52.3.1/debian/patches/series mozjs52-52.8.1/debian/patches/series --- mozjs52-52.3.1/debian/patches/series 2017-10-20 17:12:58.000000000 +0000 +++ mozjs52-52.8.1/debian/patches/series 2018-06-11 17:00:08.000000000 +0000 @@ -2,12 +2,9 @@ hurd-support.patch copy-headers.patch disable-mozglue.patch -remove-nspr-dependency.patch -tests-skip-on-all-64-bit-archs.patch include-configure-script.patch -pre-generate-old-configure.patch Allow-to-override-ICU_DATA_FILE-from-the-environment.patch -Patch-pregenerated-old-configure-to-match-build-autoconf-.patch +pre-generate-old-configure.patch Add-intl-icu_sources_data.py-from-firefox-esr.patch Fix-crashes-in-AtomicOperations-none.patch icu_sources_data.py-Decouple-from-Mozilla-build-system.patch diff -Nru mozjs52-52.3.1/debian/patches/tests-skip-on-all-64-bit-archs.patch mozjs52-52.8.1/debian/patches/tests-skip-on-all-64-bit-archs.patch --- mozjs52-52.3.1/debian/patches/tests-skip-on-all-64-bit-archs.patch 2017-10-20 17:12:58.000000000 +0000 +++ mozjs52-52.8.1/debian/patches/tests-skip-on-all-64-bit-archs.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,47 +0,0 @@ -From: Marcin Juszkiewicz -Date: Wed, 5 Jul 2017 21:05:27 -0700 -Subject: tests: Skip on all 64-bit archs - -Tests that are skipped on x86_64 should be skipped on all 64-bit -architectures. - -https://bugzilla.mozilla.org/show_bug.cgi?id=1357593 - -Taken from Fedora: -http://pkgs.fedoraproject.org/cgit/rpms/mozjs38.git/tree/fix-64bit-archs.patch ---- - js/src/tests/js1_5/Array/regress-157652.js | 2 +- - js/src/tests/js1_5/Array/regress-330812.js | 2 +- - js/src/tests/js1_5/Regress/regress-422348.js | 2 +- - 3 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/js/src/tests/js1_5/Array/regress-157652.js b/js/src/tests/js1_5/Array/regress-157652.js -index 0bdba8f..9d77802 100644 ---- a/js/src/tests/js1_5/Array/regress-157652.js -+++ b/js/src/tests/js1_5/Array/regress-157652.js -@@ -1,4 +1,4 @@ --// |reftest| skip-if(xulRuntime.XPCOMABI.match(/x86_64/)||Android) -- No test results -+// |reftest| skip-if(xulRuntime.XPCOMABI.match(/x86_64|aarch64|ppc64|ppc64le|s390x/)||Android) -- No test results - /* -*- Mode: C++; tab-width: 2; 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 -diff --git a/js/src/tests/js1_5/Array/regress-330812.js b/js/src/tests/js1_5/Array/regress-330812.js -index 3a39297..c48f4c8 100644 ---- a/js/src/tests/js1_5/Array/regress-330812.js -+++ b/js/src/tests/js1_5/Array/regress-330812.js -@@ -1,4 +1,4 @@ --// |reftest| skip-if(xulRuntime.XPCOMABI.match(/x86_64/)||Android) -- No test results -+// |reftest| skip-if(xulRuntime.XPCOMABI.match(/x86_64|aarch64|ppc64|ppc64le|s390x/)||Android) -- No test results - /* -*- Mode: C++; tab-width: 2; 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 -diff --git a/js/src/tests/js1_5/Regress/regress-422348.js b/js/src/tests/js1_5/Regress/regress-422348.js -index f2443c2..7ae83f4 100644 ---- a/js/src/tests/js1_5/Regress/regress-422348.js -+++ b/js/src/tests/js1_5/Regress/regress-422348.js -@@ -1,4 +1,4 @@ --// |reftest| skip-if(xulRuntime.XPCOMABI.match(/x86_64/)) -- On 64-bit, takes forever rather than throwing -+// |reftest| skip-if(xulRuntime.XPCOMABI.match(/x86_64|aarch64|ppc64|ppc64le|s390x/)) -- On 64-bit, takes forever rather than throwing - /* -*- Mode: C++; tab-width: 2; 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 diff -Nru mozjs52-52.3.1/js/public/CharacterEncoding.h mozjs52-52.8.1/js/public/CharacterEncoding.h --- mozjs52-52.3.1/js/public/CharacterEncoding.h 2017-08-08 10:25:50.000000000 +0000 +++ mozjs52-52.8.1/js/public/CharacterEncoding.h 2018-06-08 12:27:10.000000000 +0000 @@ -123,7 +123,7 @@ * to others. This differs from UTF8CharsZ in that the chars are * const and it allows assignment. */ -class ConstUTF8CharsZ +class JS_PUBLIC_API(ConstUTF8CharsZ) { const char* data_; diff -Nru mozjs52-52.3.1/js/public/RootingAPI.h mozjs52-52.8.1/js/public/RootingAPI.h --- mozjs52-52.3.1/js/public/RootingAPI.h 2017-08-08 10:25:50.000000000 +0000 +++ mozjs52-52.8.1/js/public/RootingAPI.h 2018-06-08 12:27:10.000000000 +0000 @@ -231,7 +231,7 @@ * Type T must be a public GC pointer type. */ template -class Heap : public js::HeapBase +class MOZ_NON_MEMMOVABLE Heap : public js::HeapBase { // Please note: this can actually also be used by nsXBLMaybeCompiled, for legacy reasons. static_assert(js::IsHeapConstructibleType::value, @@ -1196,6 +1196,14 @@ explicit ObjectPtr(JSObject* obj) : value(obj) {} + ObjectPtr(const ObjectPtr& other) : value(other.value) {} + + ObjectPtr(ObjectPtr&& other) + : value(other.value) + { + other.value = nullptr; + } + /* Always call finalize before the destructor. */ ~ObjectPtr() { MOZ_ASSERT(!value); } diff -Nru mozjs52-52.3.1/js/public/Value.h mozjs52-52.8.1/js/public/Value.h --- mozjs52-52.3.1/js/public/Value.h 2017-08-08 10:25:50.000000000 +0000 +++ mozjs52-52.8.1/js/public/Value.h 2018-06-08 12:27:10.000000000 +0000 @@ -140,6 +140,8 @@ #define JSVAL_TYPE_TO_TAG(type) ((JSValueTag)(JSVAL_TAG_CLEAR | (type))) +#define JSVAL_RAW64_UNDEFINED (uint64_t(JSVAL_TAG_UNDEFINED) << 32) + #define JSVAL_LOWER_INCL_TAG_OF_OBJ_OR_NULL_SET JSVAL_TAG_NULL #define JSVAL_UPPER_EXCL_TAG_OF_PRIMITIVE_SET JSVAL_TAG_OBJECT #define JSVAL_UPPER_INCL_TAG_OF_NUMBER_SET JSVAL_TAG_INT32 @@ -147,6 +149,8 @@ #elif defined(JS_PUNBOX64) +#define JSVAL_RAW64_UNDEFINED (uint64_t(JSVAL_TAG_UNDEFINED) << JSVAL_TAG_SHIFT) + #define JSVAL_PAYLOAD_MASK 0x00007FFFFFFFFFFFLL #define JSVAL_TAG_MASK 0xFFFF800000000000LL #define JSVAL_TYPE_TO_TAG(type) ((JSValueTag)(JSVAL_TAG_MAX_DOUBLE | (type))) @@ -834,7 +838,7 @@ double asDouble; void* asPtr; - layout() = default; + layout() : asBits(JSVAL_RAW64_UNDEFINED) {} explicit constexpr layout(uint64_t bits) : asBits(bits) {} explicit constexpr layout(double d) : asDouble(d) {} } data; @@ -860,7 +864,7 @@ size_t asWord; uintptr_t asUIntPtr; - layout() = default; + layout() : asBits(JSVAL_RAW64_UNDEFINED) {} explicit constexpr layout(uint64_t bits) : asBits(bits) {} explicit constexpr layout(double d) : asDouble(d) {} } data; @@ -888,7 +892,7 @@ double asDouble; void* asPtr; - layout() = default; + layout() : asBits(JSVAL_RAW64_UNDEFINED) {} explicit constexpr layout(uint64_t bits) : asBits(bits) {} explicit constexpr layout(double d) : asDouble(d) {} } data; @@ -912,7 +916,7 @@ size_t asWord; uintptr_t asUIntPtr; - layout() = default; + layout() : asBits(JSVAL_RAW64_UNDEFINED) {} explicit constexpr layout(uint64_t bits) : asBits(bits) {} explicit constexpr layout(double d) : asDouble(d) {} } data; @@ -965,8 +969,51 @@ } } JS_HAZ_GC_POINTER; +/** + * This is a null-constructible structure that can convert to and from + * a Value, allowing UninitializedValue to be stored in unions. + */ +struct MOZ_NON_PARAM alignas(8) UninitializedValue +{ + private: + uint64_t bits; + + public: + UninitializedValue() = default; + UninitializedValue(const UninitializedValue&) = default; + MOZ_IMPLICIT UninitializedValue(const Value& val) : bits(val.asRawBits()) {} + + inline uint64_t asRawBits() const { + return bits; + } + + inline Value& asValueRef() { + return *reinterpret_cast(this); + } + inline const Value& asValueRef() const { + return *reinterpret_cast(this); + } + + inline operator Value&() { + return asValueRef(); + } + inline operator Value const&() const { + return asValueRef(); + } + inline operator Value() const { + return asValueRef(); + } + + inline void operator=(Value const& other) { + asValueRef() = other; + } +}; + static_assert(sizeof(Value) == 8, "Value size must leave three tag bits, be a binary power, and is ubiquitously depended upon everywhere"); +static_assert(sizeof(UninitializedValue) == sizeof(Value), "Value and UninitializedValue must be the same size"); +static_assert(alignof(UninitializedValue) == alignof(Value), "Value and UninitializedValue must have same alignment"); + inline bool IsOptimizedPlaceholderMagicValue(const Value& v) { diff -Nru mozjs52-52.3.1/js/src/builtin/IntlTimeZoneData.h mozjs52-52.8.1/js/src/builtin/IntlTimeZoneData.h --- mozjs52-52.3.1/js/src/builtin/IntlTimeZoneData.h 2017-08-08 10:25:50.000000000 +0000 +++ mozjs52-52.8.1/js/src/builtin/IntlTimeZoneData.h 2018-06-11 16:38:18.000000000 +0000 @@ -1,5 +1,5 @@ // Generated by make_intl_data.py. DO NOT EDIT. -// tzdata version = 2017b +// tzdata version = 2018d #ifndef builtin_IntlTimeZoneData_h #define builtin_IntlTimeZoneData_h @@ -101,6 +101,7 @@ "CNT", "CST", "CTT", + "Canada/East-Saskatchewan", "EAT", "ECT", "IET", diff -Nru mozjs52-52.3.1/js/src/builtin/make_intl_data.py mozjs52-52.8.1/js/src/builtin/make_intl_data.py --- mozjs52-52.3.1/js/src/builtin/make_intl_data.py 2017-08-08 10:25:50.000000000 +0000 +++ mozjs52-52.8.1/js/src/builtin/make_intl_data.py 2018-06-08 12:27:10.000000000 +0000 @@ -468,6 +468,11 @@ # Remove the ICU placeholder time zone "Etc/Unknown". zones.remove(Zone("Etc/Unknown")) + # tzdata2017c removed the link Canada/East-Saskatchewan -> America/Regina, + # but it is still present in ICU sources. Manually remove it to keep our + # tables consistent with IANA. + del links[Zone("Canada/East-Saskatchewan")] + validateTimeZones(zones, links) return (zones, links) @@ -499,6 +504,11 @@ # Remove the ICU placeholder time zone "Etc/Unknown". zones.remove(Zone("Etc/Unknown")) + # tzdata2017c removed the link Canada/East-Saskatchewan -> America/Regina, + # but it is still present in ICU sources. Manually remove it to keep our + # tables consistent with IANA. + del links[Zone("Canada/East-Saskatchewan")] + # Remove the placeholder time zone "Factory". if ignoreFactory: zones.remove(Zone("Factory")) @@ -558,6 +568,11 @@ # Remove the ICU placeholder time zone "Etc/Unknown". zones.remove(Zone("Etc/Unknown")) + # tzdata2017c removed the link Canada/East-Saskatchewan -> America/Regina, + # but it is still present in ICU sources. Manually tag it as a legacy time + # zone so our tables are kept consistent with IANA. + links[Zone("Canada/East-Saskatchewan")] = "America/Regina" + return (zones, links) def icuTzDataVersion(icuTzDir): diff -Nru mozjs52-52.3.1/js/src/builtin/Object.cpp mozjs52-52.8.1/js/src/builtin/Object.cpp --- mozjs52-52.3.1/js/src/builtin/Object.cpp 2017-08-08 10:25:50.000000000 +0000 +++ mozjs52-52.8.1/js/src/builtin/Object.cpp 2018-06-08 12:27:10.000000000 +0000 @@ -815,9 +815,6 @@ RootedId id(cx); RootedValue key(cx); RootedValue value(cx); - RootedNativeObject nobj(cx); - if (obj->is()) - nobj = &obj->as(); RootedShape shape(cx); Rooted desc(cx); // Step 4. @@ -834,7 +831,8 @@ } // Step 4.a.i. - if (nobj) { + if (obj->is()) { + HandleNativeObject nobj = obj.as(); if (JSID_IS_INT(id) && nobj->containsDenseElement(JSID_TO_INT(id))) { value = nobj->getDenseOrTypedArrayElement(JSID_TO_INT(id)); } else { diff -Nru mozjs52-52.3.1/js/src/builtin/Promise.cpp mozjs52-52.8.1/js/src/builtin/Promise.cpp --- mozjs52-52.3.1/js/src/builtin/Promise.cpp 2017-08-08 10:25:50.000000000 +0000 +++ mozjs52-52.8.1/js/src/builtin/Promise.cpp 2018-06-08 12:27:10.000000000 +0000 @@ -2070,6 +2070,15 @@ HandleValue onRejected, HandleObject resolve, HandleObject reject, HandleObject incumbentGlobalObject) { + // Either of the following conditions must be met: + // * resultPromise is a PromiseObject + // * resolve and reject are callable + // except for Async Generator, there resultPromise can be nullptr. + MOZ_ASSERT_IF(resultPromise && !resultPromise->is(), resolve); + MOZ_ASSERT_IF(resultPromise && !resultPromise->is(), IsCallable(resolve)); + MOZ_ASSERT_IF(resultPromise && !resultPromise->is(), reject); + MOZ_ASSERT_IF(resultPromise && !resultPromise->is(), IsCallable(reject)); + Rooted reaction(cx, NewObjectWithClassProto(cx)); if (!reaction) return nullptr; @@ -2380,7 +2389,7 @@ // rejected promises list. bool addToDependent = true; - if (C == PromiseCtor) { + if (C == PromiseCtor && resultPromise->is()) { addToDependent = false; } else { // 25.4.5.3., step 4. @@ -2439,12 +2448,14 @@ return false; } - // If the object to depend on isn't a, maybe-wrapped, Promise instance, - // we ignore it. All this does is lose some small amount of debug - // information in scenarios that are highly unlikely to occur in useful - // code. + // If either the object to depend on or the object that gets blocked isn't + // a, maybe-wrapped, Promise instance, we ignore it. All this does is lose + // some small amount of debug information in scenarios that are highly + // unlikely to occur in useful code. if (!unwrappedPromiseObj->is()) return true; + if (!blockedPromise_->is()) + return true; Rooted promise(cx, &unwrappedPromiseObj->as()); return AddPromiseReaction(cx, promise, UndefinedHandleValue, UndefinedHandleValue, diff -Nru mozjs52-52.3.1/js/src/configure mozjs52-52.8.1/js/src/configure --- mozjs52-52.3.1/js/src/configure 1970-01-01 00:00:00.000000000 +0000 +++ mozjs52-52.8.1/js/src/configure 2018-06-11 16:42:43.000000000 +0000 @@ -0,0 +1,27 @@ +#!/bin/sh +# 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/. +# +# Welcome to the new world of configure. We're working on moving to a +# python based configure. In the meanwhile, remains of the old autoconf +# based configure is in old-configure.in. +# If you need to add something, please come talk to the build system +# peers for now. +# +# Because adding a configure file in the tree is going to conflict with +# existing configure files in people's (and automation) work trees, and +# because some automation jobs are still running autoconf and configure +# "manually", this file is actually an m4 file that is processed by +# autoconf, but doesn't call any autoconf macros. The `divert` line +# below ensures the script that follows is output by autoconf. +: "divert(0)dnl" +#!/bin/sh + +SRCDIR=$(dirname $0) +TOPSRCDIR="$SRCDIR"/../.. +export OLD_CONFIGURE="$SRCDIR"/old-configure + +set -- "$@" --enable-project=js + +which python2.7 > /dev/null && exec python2.7 "$TOPSRCDIR/configure.py" "$@" || exec python "$TOPSRCDIR/configure.py" "$@" diff -Nru mozjs52-52.3.1/js/src/ctypes/libffi/doc/libffi.info mozjs52-52.8.1/js/src/ctypes/libffi/doc/libffi.info --- mozjs52-52.3.1/js/src/ctypes/libffi/doc/libffi.info 1970-01-01 00:00:00.000000000 +0000 +++ mozjs52-52.8.1/js/src/ctypes/libffi/doc/libffi.info 2018-06-08 12:27:10.000000000 +0000 @@ -0,0 +1,618 @@ +This is libffi.info, produced by makeinfo version 5.1 from libffi.texi. + +This manual is for Libffi, a portable foreign-function interface +library. + + Copyright (C) 2008, 2010, 2011 Red Hat, Inc. + + Permission is granted to copy, distribute and/or modify this + document under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2, or (at + your option) any later version. A copy of the license is included + in the section entitled "GNU General Public License". + +INFO-DIR-SECTION Development +START-INFO-DIR-ENTRY +* libffi: (libffi). Portable foreign-function interface library. +END-INFO-DIR-ENTRY + + +File: libffi.info, Node: Top, Next: Introduction, Up: (dir) + +libffi +****** + +This manual is for Libffi, a portable foreign-function interface +library. + + Copyright (C) 2008, 2010, 2011 Red Hat, Inc. + + Permission is granted to copy, distribute and/or modify this + document under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2, or (at + your option) any later version. A copy of the license is included + in the section entitled "GNU General Public License". + +* Menu: + +* Introduction:: What is libffi? +* Using libffi:: How to use libffi. +* Missing Features:: Things libffi can't do. +* Index:: Index. + + +File: libffi.info, Node: Introduction, Next: Using libffi, Prev: Top, Up: Top + +1 What is libffi? +***************** + +Compilers for high level languages generate code that follow certain +conventions. These conventions are necessary, in part, for separate +compilation to work. One such convention is the "calling convention". +The calling convention is a set of assumptions made by the compiler +about where function arguments will be found on entry to a function. A +calling convention also specifies where the return value for a function +is found. The calling convention is also sometimes called the "ABI" or +"Application Binary Interface". + + Some programs may not know at the time of compilation what arguments +are to be passed to a function. For instance, an interpreter may be +told at run-time about the number and types of arguments used to call a +given function. 'Libffi' can be used in such programs to provide a +bridge from the interpreter program to compiled code. + + The 'libffi' library provides a portable, high level programming +interface to various calling conventions. This allows a programmer to +call any function specified by a call interface description at run time. + + FFI stands for Foreign Function Interface. A foreign function +interface is the popular name for the interface that allows code written +in one language to call code written in another language. The 'libffi' +library really only provides the lowest, machine dependent layer of a +fully featured foreign function interface. A layer must exist above +'libffi' that handles type conversions for values passed between the two +languages. + + +File: libffi.info, Node: Using libffi, Next: Missing Features, Prev: Introduction, Up: Top + +2 Using libffi +************** + +* Menu: + +* The Basics:: The basic libffi API. +* Simple Example:: A simple example. +* Types:: libffi type descriptions. +* Multiple ABIs:: Different passing styles on one platform. +* The Closure API:: Writing a generic function. +* Closure Example:: A closure example. + + +File: libffi.info, Node: The Basics, Next: Simple Example, Up: Using libffi + +2.1 The Basics +============== + +'Libffi' assumes that you have a pointer to the function you wish to +call and that you know the number and types of arguments to pass it, as +well as the return type of the function. + + The first thing you must do is create an 'ffi_cif' object that +matches the signature of the function you wish to call. This is a +separate step because it is common to make multiple calls using a single +'ffi_cif'. The "cif" in 'ffi_cif' stands for Call InterFace. To +prepare a call interface object, use the function 'ffi_prep_cif'. + + -- Function: ffi_status ffi_prep_cif (ffi_cif *CIF, ffi_abi ABI, + unsigned int NARGS, ffi_type *RTYPE, ffi_type **ARGTYPES) + This initializes CIF according to the given parameters. + + ABI is the ABI to use; normally 'FFI_DEFAULT_ABI' is what you want. + *note Multiple ABIs:: for more information. + + NARGS is the number of arguments that this function accepts. + + RTYPE is a pointer to an 'ffi_type' structure that describes the + return type of the function. *Note Types::. + + ARGTYPES is a vector of 'ffi_type' pointers. ARGTYPES must have + NARGS elements. If NARGS is 0, this argument is ignored. + + 'ffi_prep_cif' returns a 'libffi' status code, of type + 'ffi_status'. This will be either 'FFI_OK' if everything worked + properly; 'FFI_BAD_TYPEDEF' if one of the 'ffi_type' objects is + incorrect; or 'FFI_BAD_ABI' if the ABI parameter is invalid. + + If the function being called is variadic (varargs) then +'ffi_prep_cif_var' must be used instead of 'ffi_prep_cif'. + + -- Function: ffi_status ffi_prep_cif_var (ffi_cif *CIF, ffi_abi varabi, + unsigned int NFIXEDARGS, unsigned int varntotalargs, ffi_type + *RTYPE, ffi_type **ARGTYPES) + This initializes CIF according to the given parameters for a call + to a variadic function. In general it's operation is the same as + for 'ffi_prep_cif' except that: + + NFIXEDARGS is the number of fixed arguments, prior to any variadic + arguments. It must be greater than zero. + + NTOTALARGS the total number of arguments, including variadic and + fixed arguments. + + Note that, different cif's must be prepped for calls to the same + function when different numbers of arguments are passed. + + Also note that a call to 'ffi_prep_cif_var' with + NFIXEDARGS=NOTOTALARGS is NOT equivalent to a call to + 'ffi_prep_cif'. + + To call a function using an initialized 'ffi_cif', use the 'ffi_call' +function: + + -- Function: void ffi_call (ffi_cif *CIF, void *FN, void *RVALUE, void + **AVALUES) + This calls the function FN according to the description given in + CIF. CIF must have already been prepared using 'ffi_prep_cif'. + + RVALUE is a pointer to a chunk of memory that will hold the result + of the function call. This must be large enough to hold the + result, no smaller than the system register size (generally 32 or + 64 bits), and must be suitably aligned; it is the caller's + responsibility to ensure this. If CIF declares that the function + returns 'void' (using 'ffi_type_void'), then RVALUE is ignored. + + AVALUES is a vector of 'void *' pointers that point to the memory + locations holding the argument values for a call. If CIF declares + that the function has no arguments (i.e., NARGS was 0), then + AVALUES is ignored. Note that argument values may be modified by + the callee (for instance, structs passed by value); the burden of + copying pass-by-value arguments is placed on the caller. + + +File: libffi.info, Node: Simple Example, Next: Types, Prev: The Basics, Up: Using libffi + +2.2 Simple Example +================== + +Here is a trivial example that calls 'puts' a few times. + + #include + #include + + int main() + { + ffi_cif cif; + ffi_type *args[1]; + void *values[1]; + char *s; + ffi_arg rc; + + /* Initialize the argument info vectors */ + args[0] = &ffi_type_pointer; + values[0] = &s; + + /* Initialize the cif */ + if (ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 1, + &ffi_type_sint, args) == FFI_OK) + { + s = "Hello World!"; + ffi_call(&cif, puts, &rc, values); + /* rc now holds the result of the call to puts */ + + /* values holds a pointer to the function's arg, so to + call puts() again all we need to do is change the + value of s */ + s = "This is cool!"; + ffi_call(&cif, puts, &rc, values); + } + + return 0; + } + + +File: libffi.info, Node: Types, Next: Multiple ABIs, Prev: Simple Example, Up: Using libffi + +2.3 Types +========= + +* Menu: + +* Primitive Types:: Built-in types. +* Structures:: Structure types. +* Type Example:: Structure type example. + + +File: libffi.info, Node: Primitive Types, Next: Structures, Up: Types + +2.3.1 Primitive Types +--------------------- + +'Libffi' provides a number of built-in type descriptors that can be used +to describe argument and return types: + +'ffi_type_void' + The type 'void'. This cannot be used for argument types, only for + return values. + +'ffi_type_uint8' + An unsigned, 8-bit integer type. + +'ffi_type_sint8' + A signed, 8-bit integer type. + +'ffi_type_uint16' + An unsigned, 16-bit integer type. + +'ffi_type_sint16' + A signed, 16-bit integer type. + +'ffi_type_uint32' + An unsigned, 32-bit integer type. + +'ffi_type_sint32' + A signed, 32-bit integer type. + +'ffi_type_uint64' + An unsigned, 64-bit integer type. + +'ffi_type_sint64' + A signed, 64-bit integer type. + +'ffi_type_float' + The C 'float' type. + +'ffi_type_double' + The C 'double' type. + +'ffi_type_uchar' + The C 'unsigned char' type. + +'ffi_type_schar' + The C 'signed char' type. (Note that there is not an exact + equivalent to the C 'char' type in 'libffi'; ordinarily you should + either use 'ffi_type_schar' or 'ffi_type_uchar' depending on + whether 'char' is signed.) + +'ffi_type_ushort' + The C 'unsigned short' type. + +'ffi_type_sshort' + The C 'short' type. + +'ffi_type_uint' + The C 'unsigned int' type. + +'ffi_type_sint' + The C 'int' type. + +'ffi_type_ulong' + The C 'unsigned long' type. + +'ffi_type_slong' + The C 'long' type. + +'ffi_type_longdouble' + On platforms that have a C 'long double' type, this is defined. On + other platforms, it is not. + +'ffi_type_pointer' + A generic 'void *' pointer. You should use this for all pointers, + regardless of their real type. + + Each of these is of type 'ffi_type', so you must take the address +when passing to 'ffi_prep_cif'. + + +File: libffi.info, Node: Structures, Next: Type Example, Prev: Primitive Types, Up: Types + +2.3.2 Structures +---------------- + +Although 'libffi' has no special support for unions or bit-fields, it is +perfectly happy passing structures back and forth. You must first +describe the structure to 'libffi' by creating a new 'ffi_type' object +for it. + + -- Data type: ffi_type + The 'ffi_type' has the following members: + 'size_t size' + This is set by 'libffi'; you should initialize it to zero. + + 'unsigned short alignment' + This is set by 'libffi'; you should initialize it to zero. + + 'unsigned short type' + For a structure, this should be set to 'FFI_TYPE_STRUCT'. + + 'ffi_type **elements' + This is a 'NULL'-terminated array of pointers to 'ffi_type' + objects. There is one element per field of the struct. + + +File: libffi.info, Node: Type Example, Prev: Structures, Up: Types + +2.3.3 Type Example +------------------ + +The following example initializes a 'ffi_type' object representing the +'tm' struct from Linux's 'time.h'. + + Here is how the struct is defined: + + struct tm { + int tm_sec; + int tm_min; + int tm_hour; + int tm_mday; + int tm_mon; + int tm_year; + int tm_wday; + int tm_yday; + int tm_isdst; + /* Those are for future use. */ + long int __tm_gmtoff__; + __const char *__tm_zone__; + }; + + Here is the corresponding code to describe this struct to 'libffi': + + { + ffi_type tm_type; + ffi_type *tm_type_elements[12]; + int i; + + tm_type.size = tm_type.alignment = 0; + tm_type.type = FFI_TYPE_STRUCT; + tm_type.elements = &tm_type_elements; + + for (i = 0; i < 9; i++) + tm_type_elements[i] = &ffi_type_sint; + + tm_type_elements[9] = &ffi_type_slong; + tm_type_elements[10] = &ffi_type_pointer; + tm_type_elements[11] = NULL; + + /* tm_type can now be used to represent tm argument types and + return types for ffi_prep_cif() */ + } + + +File: libffi.info, Node: Multiple ABIs, Next: The Closure API, Prev: Types, Up: Using libffi + +2.4 Multiple ABIs +================= + +A given platform may provide multiple different ABIs at once. For +instance, the x86 platform has both 'stdcall' and 'fastcall' functions. + + 'libffi' provides some support for this. However, this is +necessarily platform-specific. + + +File: libffi.info, Node: The Closure API, Next: Closure Example, Prev: Multiple ABIs, Up: Using libffi + +2.5 The Closure API +=================== + +'libffi' also provides a way to write a generic function - a function +that can accept and decode any combination of arguments. This can be +useful when writing an interpreter, or to provide wrappers for arbitrary +functions. + + This facility is called the "closure API". Closures are not supported +on all platforms; you can check the 'FFI_CLOSURES' define to determine +whether they are supported on the current platform. + + Because closures work by assembling a tiny function at runtime, they +require special allocation on platforms that have a non-executable heap. +Memory management for closures is handled by a pair of functions: + + -- Function: void *ffi_closure_alloc (size_t SIZE, void **CODE) + Allocate a chunk of memory holding SIZE bytes. This returns a + pointer to the writable address, and sets *CODE to the + corresponding executable address. + + SIZE should be sufficient to hold a 'ffi_closure' object. + + -- Function: void ffi_closure_free (void *WRITABLE) + Free memory allocated using 'ffi_closure_alloc'. The argument is + the writable address that was returned. + + Once you have allocated the memory for a closure, you must construct +a 'ffi_cif' describing the function call. Finally you can prepare the +closure function: + + -- Function: ffi_status ffi_prep_closure_loc (ffi_closure *CLOSURE, + ffi_cif *CIF, void (*FUN) (ffi_cif *CIF, void *RET, void + **ARGS, void *USER_DATA), void *USER_DATA, void *CODELOC) + Prepare a closure function. + + CLOSURE is the address of a 'ffi_closure' object; this is the + writable address returned by 'ffi_closure_alloc'. + + CIF is the 'ffi_cif' describing the function parameters. + + USER_DATA is an arbitrary datum that is passed, uninterpreted, to + your closure function. + + CODELOC is the executable address returned by 'ffi_closure_alloc'. + + FUN is the function which will be called when the closure is + invoked. It is called with the arguments: + CIF + The 'ffi_cif' passed to 'ffi_prep_closure_loc'. + + RET + A pointer to the memory used for the function's return value. + FUN must fill this, unless the function is declared as + returning 'void'. + + ARGS + A vector of pointers to memory holding the arguments to the + function. + + USER_DATA + The same USER_DATA that was passed to 'ffi_prep_closure_loc'. + + 'ffi_prep_closure_loc' will return 'FFI_OK' if everything went ok, + and something else on error. + + After calling 'ffi_prep_closure_loc', you can cast CODELOC to the + appropriate pointer-to-function type. + + You may see old code referring to 'ffi_prep_closure'. This function +is deprecated, as it cannot handle the need for separate writable and +executable addresses. + + +File: libffi.info, Node: Closure Example, Prev: The Closure API, Up: Using libffi + +2.6 Closure Example +=================== + +A trivial example that creates a new 'puts' by binding 'fputs' with +'stdout'. + + #include + #include + + /* Acts like puts with the file given at time of enclosure. */ + void puts_binding(ffi_cif *cif, void *ret, void* args[], + void *stream) + { + *(ffi_arg *)ret = fputs(*(char **)args[0], (FILE *)stream); + } + + typedef int (*puts_t)(char *); + + int main() + { + ffi_cif cif; + ffi_type *args[1]; + ffi_closure *closure; + + void *bound_puts; + int rc; + + /* Allocate closure and bound_puts */ + closure = ffi_closure_alloc(sizeof(ffi_closure), &bound_puts); + + if (closure) + { + /* Initialize the argument info vectors */ + args[0] = &ffi_type_pointer; + + /* Initialize the cif */ + if (ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 1, + &ffi_type_sint, args) == FFI_OK) + { + /* Initialize the closure, setting stream to stdout */ + if (ffi_prep_closure_loc(closure, &cif, puts_binding, + stdout, bound_puts) == FFI_OK) + { + rc = ((puts_t)bound_puts)("Hello World!"); + /* rc now holds the result of the call to fputs */ + } + } + } + + /* Deallocate both closure, and bound_puts */ + ffi_closure_free(closure); + + return 0; + } + + +File: libffi.info, Node: Missing Features, Next: Index, Prev: Using libffi, Up: Top + +3 Missing Features +****************** + +'libffi' is missing a few features. We welcome patches to add support +for these. + + * Variadic closures. + + * There is no support for bit fields in structures. + + * The closure API is + + * The "raw" API is undocumented. + + Note that variadic support is very new and tested on a relatively +small number of platforms. + + +File: libffi.info, Node: Index, Prev: Missing Features, Up: Top + +Index +***** + +[index] +* Menu: + +* ABI: Introduction. (line 13) +* Application Binary Interface: Introduction. (line 13) +* calling convention: Introduction. (line 13) +* cif: The Basics. (line 14) +* closure API: The Closure API. (line 13) +* closures: The Closure API. (line 13) +* FFI: Introduction. (line 31) +* ffi_call: The Basics. (line 62) +* FFI_CLOSURES: The Closure API. (line 13) +* ffi_closure_alloc: The Closure API. (line 19) +* ffi_closure_free: The Closure API. (line 26) +* ffi_prep_cif: The Basics. (line 16) +* ffi_prep_cif_var: The Basics. (line 39) +* ffi_prep_closure_loc: The Closure API. (line 34) +* ffi_status: The Basics. (line 16) +* ffi_status <1>: The Basics. (line 39) +* ffi_status <2>: The Closure API. (line 34) +* ffi_type: Structures. (line 11) +* ffi_type <1>: Structures. (line 11) +* ffi_type_double: Primitive Types. (line 41) +* ffi_type_float: Primitive Types. (line 38) +* ffi_type_longdouble: Primitive Types. (line 71) +* ffi_type_pointer: Primitive Types. (line 75) +* ffi_type_schar: Primitive Types. (line 47) +* ffi_type_sint: Primitive Types. (line 62) +* ffi_type_sint16: Primitive Types. (line 23) +* ffi_type_sint32: Primitive Types. (line 29) +* ffi_type_sint64: Primitive Types. (line 35) +* ffi_type_sint8: Primitive Types. (line 17) +* ffi_type_slong: Primitive Types. (line 68) +* ffi_type_sshort: Primitive Types. (line 56) +* ffi_type_uchar: Primitive Types. (line 44) +* ffi_type_uint: Primitive Types. (line 59) +* ffi_type_uint16: Primitive Types. (line 20) +* ffi_type_uint32: Primitive Types. (line 26) +* ffi_type_uint64: Primitive Types. (line 32) +* ffi_type_uint8: Primitive Types. (line 14) +* ffi_type_ulong: Primitive Types. (line 65) +* ffi_type_ushort: Primitive Types. (line 53) +* ffi_type_void: Primitive Types. (line 10) +* Foreign Function Interface: Introduction. (line 31) +* void: The Basics. (line 62) +* void <1>: The Closure API. (line 19) +* void <2>: The Closure API. (line 26) + + + +Tag Table: +Node: Top682 +Node: Introduction1429 +Node: Using libffi3061 +Node: The Basics3547 +Node: Simple Example7198 +Node: Types8229 +Node: Primitive Types8512 +Node: Structures10333 +Node: Type Example11207 +Node: Multiple ABIs12473 +Node: The Closure API12844 +Node: Closure Example15788 +Node: Missing Features17397 +Node: Index17850 + +End Tag Table diff -Nru mozjs52-52.3.1/js/src/devtools/rootAnalysis/analyzeRoots.js mozjs52-52.8.1/js/src/devtools/rootAnalysis/analyzeRoots.js --- mozjs52-52.3.1/js/src/devtools/rootAnalysis/analyzeRoots.js 2017-08-08 10:25:50.000000000 +0000 +++ mozjs52-52.8.1/js/src/devtools/rootAnalysis/analyzeRoots.js 2018-06-08 12:27:10.000000000 +0000 @@ -15,7 +15,7 @@ throw "Usage: analyzeRoots.js [-f function_name] [start end [tmpfile]]"; var theFunctionNameToFind; -if (scriptArgs[0] == '--function') { +if (scriptArgs[0] == '--function' || scriptArgs[0] == '-f') { theFunctionNameToFind = scriptArgs[1]; scriptArgs = scriptArgs.slice(2); } @@ -131,16 +131,26 @@ return false; } -// If the edge uses the given variable, return the earliest point at which the -// use is definite. Usually, that means the source of the edge (anything that -// reaches that source point will end up using the variable, but there may be -// other ways to reach the destination of the edge.) +// If the edge uses the given variable's value, return the earliest point at +// which the use is definite. Usually, that means the source of the edge +// (anything that reaches that source point will end up using the variable, but +// there may be other ways to reach the destination of the edge.) // // Return values are implicitly used at the very last point in the function. // This makes a difference: if an RAII class GCs in its destructor, we need to // start looking at the final point in the function, not one point back from // that, since that would skip over the GCing call. // +// Note that this returns true only if the variable's incoming value is used. +// So this would return false for 'obj': +// +// obj = someFunction(); +// +// but these would return true: +// +// obj = someFunction(obj); +// obj->foo = someFunction(); +// function edgeUsesVariable(edge, variable, body) { if (ignoreEdgeUse(edge, variable, body)) @@ -153,24 +163,39 @@ switch (edge.Kind) { - case "Assign": + case "Assign": { if (isReturningImmobileValue(edge, variable)) return 0; - if (expressionUsesVariable(edge.Exp[0], variable)) + const [lhs, rhs] = edge.Exp; + if (expressionUsesVariable(rhs, variable)) + return src; + if (expressionUsesVariable(lhs, variable) && !expressionIsVariable(lhs, variable)) return src; - return expressionUsesVariable(edge.Exp[1], variable) ? src : 0; + return 0; + } case "Assume": return expressionUsesVariableContents(edge.Exp[0], variable) ? src : 0; - case "Call": - if (expressionUsesVariable(edge.Exp[0], variable)) - return src; - if (1 in edge.Exp && expressionUsesVariable(edge.Exp[1], variable)) + case "Call": { + const callee = edge.Exp[0]; + if (expressionUsesVariable(callee, variable)) return src; if ("PEdgeCallInstance" in edge) { - if (expressionUsesVariable(edge.PEdgeCallInstance.Exp, variable)) - return src; + if (expressionUsesVariable(edge.PEdgeCallInstance.Exp, variable)) { + if (edgeKillsVariable(edge, variable)) { + // If the variable is being constructed, then the incoming + // value is not used here; it didn't exist before + // construction. (The analysis doesn't get told where + // variables are defined, so must infer it from + // construction. If the variable does not have a + // constructor, its live range may be larger than it really + // ought to be if it is defined within a loop body, but + // that is conservative.) + } else { + return src; + } + } } if ("PEdgeCallArguments" in edge) { for (var exp of edge.PEdgeCallArguments.Exp) { @@ -178,7 +203,15 @@ return src; } } + if (edge.Exp.length == 1) + return 0; + + // Assigning call result to a variable. + const lhs = edge.Exp[1]; + if (expressionUsesVariable(lhs, variable) && !expressionIsVariable(lhs, variable)) + return src; return 0; + } case "Loop": return 0; @@ -217,13 +250,26 @@ } } +function expressionIsVariable(exp, variable) +{ + return exp.Kind == "Var" && sameVariable(exp.Variable, variable); +} + +// Return whether the edge kills (overwrites) the variable's incoming value. +// Examples of killing 'obj': +// +// obj = foo; +// obj = foo(); +// obj = foo(obj); // uses previous value but then kills it +// SomeClass obj(true, 1); // constructor +// function edgeKillsVariable(edge, variable) { // Direct assignments kill their lhs: var = value if (edge.Kind == "Assign") { - var lhs = edge.Exp[0]; - if (lhs.Kind == "Var" && sameVariable(lhs.Variable, variable)) - return !isReturningImmobileValue(edge, variable); + const [lhs] = edge.Exp; + return (expressionIsVariable(lhs, variable) && + !isReturningImmobileValue(edge, variable)); } if (edge.Kind != "Call") @@ -232,48 +278,46 @@ // Assignments of call results kill their lhs. if (1 in edge.Exp) { var lhs = edge.Exp[1]; - if (lhs.Kind == "Var" && sameVariable(lhs.Variable, variable)) + if (expressionIsVariable(lhs, variable)) return true; } // Constructor calls kill their 'this' value. if ("PEdgeCallInstance" in edge) { - do { - var instance = edge.PEdgeCallInstance.Exp; - - // Kludge around incorrect dereference on some constructor calls. - if (instance.Kind == "Drf") - instance = instance.Exp[0]; + var instance = edge.PEdgeCallInstance.Exp; - if (instance.Kind != "Var" || !sameVariable(instance.Variable, variable)) - break; - - var callee = edge.Exp[0]; - if (callee.Kind != "Var") - break; - - assert(callee.Variable.Kind == "Func"); - var calleeName = readable(callee.Variable.Name[0]); - - // Constructor calls include the text 'Name::Name(' or 'Name<...>::Name('. - var openParen = calleeName.indexOf('('); - if (openParen < 0) - break; - calleeName = calleeName.substring(0, openParen); + // Kludge around incorrect dereference on some constructor calls. + if (instance.Kind == "Drf") + instance = instance.Exp[0]; + + if (!expressionIsVariable(instance, variable)) + return false; + + var callee = edge.Exp[0]; + if (callee.Kind != "Var") + return false; + + assert(callee.Variable.Kind == "Func"); + var calleeName = readable(callee.Variable.Name[0]); + + // Constructor calls include the text 'Name::Name(' or 'Name<...>::Name('. + var openParen = calleeName.indexOf('('); + if (openParen < 0) + return false; + calleeName = calleeName.substring(0, openParen); + + var lastColon = calleeName.lastIndexOf('::'); + if (lastColon < 0) + return false; + var constructorName = calleeName.substr(lastColon + 2); + calleeName = calleeName.substr(0, lastColon); + + var lastTemplateOpen = calleeName.lastIndexOf('<'); + if (lastTemplateOpen >= 0) + calleeName = calleeName.substr(0, lastTemplateOpen); - var lastColon = calleeName.lastIndexOf('::'); - if (lastColon < 0) - break; - var constructorName = calleeName.substr(lastColon + 2); - calleeName = calleeName.substr(0, lastColon); - - var lastTemplateOpen = calleeName.lastIndexOf('<'); - if (lastTemplateOpen >= 0) - calleeName = calleeName.substr(0, lastTemplateOpen); - - if (calleeName.endsWith(constructorName)) - return true; - } while (false); + if (calleeName.endsWith(constructorName)) + return true; } return false; @@ -313,14 +357,14 @@ } } -// Search recursively through predecessors from a variable use, returning -// whether a GC call is reachable (in the reverse direction; this means that -// the variable use is reachable from the GC call, and therefore the variable -// is live after the GC call), along with some additional information. What -// info we want depends on whether the variable turns out to be live across any -// GC call. We are looking for both hazards (unrooted variables live across GC -// calls) and unnecessary roots (rooted variables that have no GC calls in -// their live ranges.) +// Search recursively through predecessors from the use of a variable's value, +// returning whether a GC call is reachable (in the reverse direction; this +// means that the variable use is reachable from the GC call, and therefore the +// variable is live after the GC call), along with some additional information. +// What info we want depends on whether the variable turns out to be live +// across a GC call. We are looking for both hazards (unrooted variables live +// across GC calls) and unnecessary roots (rooted variables that have no GC +// calls in their live ranges.) // // If not: // @@ -334,7 +378,7 @@ // // - 'gcInfo': a direct pointer to the GC call edge // -function findGCBeforeVariableUse(start_body, start_point, suppressed, variable) +function findGCBeforeValueUse(start_body, start_point, suppressed, variable) { // Scan through all edges preceding an unrooted variable use, using an // explicit worklist, looking for a GC call. A worklist contains an @@ -399,6 +443,11 @@ assert(found); } } + + // Also propagate to the *end* of this loop, for the previous + // iteration. + worklist.push({body: body, ppoint: body.Index[1], + gcInfo: gcInfo, why: entry}); } else if (variable.Kind == "Arg" && gcInfo) { // The scope of arguments starts at the beginning of the // function @@ -473,7 +522,8 @@ // will only return here if edge.Kind is Assign; otherwise, // we'll pass a "preGCLive" value up through the worklist to // remember that the variable *is* alive before the GC and so - // this function should be returning a true value. + // this function should be returning a true value even if we + // don't find an assignment. if (src_gcInfo) { src_preGCLive = true; @@ -496,6 +546,9 @@ } } assert(found); + // Don't continue to predecessors here without going through + // the loop. (The points in this body that enter the loop will + // be traversed when we reach the entry point of the loop.) break; } @@ -522,16 +575,33 @@ if (!("PEdge" in body)) continue; for (var edge of body.PEdge) { - var usePoint = edgeUsesVariable(edge, variable, body); - // Example for !edgeKillsVariable: + // Examples: + // + // JSObject* obj = NewObject(); + // cangc(); + // obj = NewObject(); <-- mentions 'obj' but kills previous value + // + // This is not a hazard. Contrast this with: // // JSObject* obj = NewObject(); // cangc(); - // obj = NewObject(); <-- uses 'obj', but kills previous value + // obj = LookAt(obj); <-- uses 'obj' and kills previous value + // + // This is a hazard; the initial value of obj is live across + // cangc(). And a third possibility: // - if (usePoint && !edgeKillsVariable(edge, variable)) { - // Found a use, possibly after a GC. - var call = findGCBeforeVariableUse(body, usePoint, suppressed, variable); + // JSObject* obj = NewObject(); + // obj = CopyObject(obj); + // + // This is not a hazard, because even though CopyObject can GC, obj + // is not live across it. (obj is live before CopyObject, and + // probably after, but not across.) There may be a hazard within + // CopyObject, of course. + // + + var usePoint = edgeUsesVariable(edge, variable, body); + if (usePoint) { + var call = findGCBeforeValueUse(body, usePoint, suppressed, variable); if (!call) continue; @@ -645,9 +715,13 @@ var table = {}; entry.body.edgeTable = table; for (var line of entry.body.lines) { - if (match = /\((\d+,\d+),/.exec(line)) + if (match = /^\w+\((\d+,\d+),/.exec(line)) table[match[1]] = line; // May be multiple? } + if (entry.body.BlockId.Kind == 'Loop') { + const [startPoint, endPoint] = entry.body.Index; + table[`${endPoint},${startPoint}`] = '(loop to next iteration)'; + } } edgeText = entry.body.edgeTable[ppoint + "," + next]; diff -Nru mozjs52-52.3.1/js/src/devtools/rootAnalysis/annotations.js mozjs52-52.8.1/js/src/devtools/rootAnalysis/annotations.js --- mozjs52-52.3.1/js/src/devtools/rootAnalysis/annotations.js 2017-08-08 10:25:50.000000000 +0000 +++ mozjs52-52.8.1/js/src/devtools/rootAnalysis/annotations.js 2018-06-08 12:27:10.000000000 +0000 @@ -228,6 +228,9 @@ "calloc" : true, }; +function extraGCFunctions() { + return ["ffi_call"].filter(f => f in readableNames); +} function isProtobuf(name) { return name.match(/\bgoogle::protobuf\b/) || @@ -247,7 +250,7 @@ function ignoreGCFunction(mangled) { - assert(mangled in readableNames); + assert(mangled in readableNames, mangled + " not in readableNames"); var fun = readableNames[mangled][0]; if (fun in ignoreFunctions) @@ -363,6 +366,9 @@ { if (csu != 'nsISupports') return false; + + // Now that binary XPCOM is dead, all these annotations should be replaced + // with something based on bug 1347999. if (field == 'GetCurrentJSContext') return false; if (field == 'IsOnCurrentThread') @@ -377,6 +383,12 @@ return false; if (initialCSU == 'nsIXPConnect' && field == 'GetSafeJSContext') return false; + + // nsIScriptSecurityManager is not [builtinclass], but smaug says "the + // interface definitely should be builtinclass", which is good enough. + if (initialCSU == 'nsIScriptSecurityManager' && field == 'IsSystemPrincipal') + return false; + if (initialCSU == 'nsIScriptContext') { if (field == 'GetWindowProxy' || field == 'GetWindowProxyPreserveColor') return false; diff -Nru mozjs52-52.3.1/js/src/devtools/rootAnalysis/loadCallgraph.js mozjs52-52.8.1/js/src/devtools/rootAnalysis/loadCallgraph.js --- mozjs52-52.3.1/js/src/devtools/rootAnalysis/loadCallgraph.js 2017-08-08 10:25:50.000000000 +0000 +++ mozjs52-52.8.1/js/src/devtools/rootAnalysis/loadCallgraph.js 2018-06-08 12:27:10.000000000 +0000 @@ -126,6 +126,12 @@ } } + // mess up the id <-> name correspondence. Also, we need to know if the + // functions even exist in the first place.) + for (var func of extraGCFunctions()) { + addGCFunction(func, "annotation"); + } + // Initialize suppressedFunctions to the set of all functions, and the // worklist to all toplevel callers. var worklist = []; diff -Nru mozjs52-52.3.1/js/src/devtools/rootAnalysis/t/hazards/source.cpp mozjs52-52.8.1/js/src/devtools/rootAnalysis/t/hazards/source.cpp --- mozjs52-52.3.1/js/src/devtools/rootAnalysis/t/hazards/source.cpp 2017-08-08 10:25:50.000000000 +0000 +++ mozjs52-52.8.1/js/src/devtools/rootAnalysis/t/hazards/source.cpp 2018-06-08 12:27:10.000000000 +0000 @@ -2,6 +2,8 @@ struct Cell { int f; } ANNOTATE("GC Thing"); +struct RootedCell { RootedCell(Cell*) {} } ANNOTATE("Rooted Pointer"); + class AutoSuppressGC_Base { public: AutoSuppressGC_Base() {} @@ -30,7 +32,7 @@ invisible(); } -extern void foo(Cell*); +extern void usecell(Cell*); void suppressedFunction() { GC(); // Calls GC, but is always called within AutoSuppressGC @@ -70,20 +72,115 @@ suppressedFunction(); halfSuppressedFunction(); } - foo(cell1); + usecell(cell1); halfSuppressedFunction(); - foo(cell2); + usecell(cell2); unsuppressedFunction(); { // Old bug: it would look from the first AutoSuppressGC constructor it // found to the last destructor. This statement *should* have no effect. AutoSuppressGC nogc; } - foo(cell3); + usecell(cell3); Cell* cell5 = &cell; - foo(cell5); + usecell(cell5); // Hazard in return value due to ~GCInDestructor Cell* cell6 = &cell; return cell6; } + +Cell* copy_and_gc(Cell* src) +{ + GC(); + return reinterpret_cast(88); +} + +void use(Cell* cell) +{ + static int x = 0; + if (cell) + x++; +} + +struct CellContainer { + Cell* cell; + CellContainer() { + asm(""); + } +}; + +void loopy() +{ + Cell cell; + + // No hazard: haz1 is not live during call to copy_and_gc. + Cell* haz1; + for (int i = 0; i < 10; i++) { + haz1 = copy_and_gc(haz1); + } + + // No hazard: haz2 is live up to just before the GC, and starting at the + // next statement after it, but not across the GC. + Cell* haz2 = &cell; + for (int j = 0; j < 10; j++) { + use(haz2); + GC(); + haz2 = &cell; + } + + // Hazard: haz3 is live from the final statement in one iteration, across + // the GC in the next, to the use in the 2nd statement. + Cell* haz3; + for (int k = 0; k < 10; k++) { + GC(); + use(haz3); + haz3 = &cell; + } + + // Hazard: haz4 is live across a GC hidden in a loop. + Cell* haz4 = &cell; + for (int i2 = 0; i2 < 10; i2++) { + GC(); + } + use(haz4); + + // Hazard: haz5 is live from within a loop across a GC. + Cell* haz5; + for (int i3 = 0; i3 < 10; i3++) { + haz5 = &cell; + } + GC(); + use(haz5); + + // No hazard: similar to the haz3 case, but verifying that we do not get + // into an infinite loop. + Cell* haz6; + for (int i4 = 0; i4 < 10; i4++) { + GC(); + haz6 = &cell; + } + + // No hazard: haz7 is constructed within the body, so it can't make a + // hazard across iterations. Note that this requires CellContainer to have + // a constructor, because otherwise the analysis doesn't see where + // variables are declared. (With the constructor, it knows that + // construction of haz7 obliterates any previous value it might have had. + // Not that that's possible given its scope, but the analysis doesn't get + // that information.) + for (int i5 = 0; i5 < 10; i5++) { + GC(); + CellContainer haz7; + use(haz7.cell); + haz7.cell = &cell; + } + + // Hazard: make sure we *can* see hazards across iterations involving + // CellContainer; + CellContainer haz8; + for (int i6 = 0; i6 < 10; i6++) { + GC(); + use(haz8.cell); + haz8.cell = &cell; + } +} diff -Nru mozjs52-52.3.1/js/src/devtools/rootAnalysis/t/hazards/test.py mozjs52-52.8.1/js/src/devtools/rootAnalysis/t/hazards/test.py --- mozjs52-52.3.1/js/src/devtools/rootAnalysis/t/hazards/test.py 2017-08-08 10:25:50.000000000 +0000 +++ mozjs52-52.8.1/js/src/devtools/rootAnalysis/t/hazards/test.py 2018-06-08 12:27:10.000000000 +0000 @@ -20,9 +20,10 @@ assert('cell6' not in hazmap) assert('' in hazmap) -# All hazards should be in f() +# All hazards should be in f() and loopy() assert(hazmap['cell2'].function == 'Cell* f()') -assert(len(set(haz.function for haz in hazards)) == 1) +print(len(set(haz.function for haz in hazards))) +assert(len(set(haz.function for haz in hazards)) == 2) # Check that the correct GC call is reported for each hazard. (cell3 has a # hazard from two different GC calls; it doesn't really matter which is @@ -34,3 +35,13 @@ # Type names are handy to have in the report. assert(hazmap['cell2'].type == 'Cell*') assert(hazmap[''].type == 'Cell*') + +# loopy hazards. See comments in source. +assert('haz1' not in hazmap); +assert('haz2' not in hazmap); +assert('haz3' in hazmap); +assert('haz4' in hazmap); +assert('haz5' in hazmap); +assert('haz6' not in hazmap); +assert('haz7' not in hazmap); +assert('haz8' in hazmap); diff -Nru mozjs52-52.3.1/js/src/gc/Barrier.cpp mozjs52-52.8.1/js/src/gc/Barrier.cpp --- mozjs52-52.3.1/js/src/gc/Barrier.cpp 2017-08-08 10:25:50.000000000 +0000 +++ mozjs52-52.8.1/js/src/gc/Barrier.cpp 2018-06-08 12:27:10.000000000 +0000 @@ -37,10 +37,8 @@ return true; gc::TenuredCell& tenured = obj->asTenured(); - if (tenured.isMarked(gc::BLACK) || tenured.arena()->allocatedDuringIncremental) - return true; - - return false; + return (tenured.isMarked(gc::BLACK) && !tenured.isMarked(gc::GRAY)) || + tenured.arena()->allocatedDuringIncremental; } bool diff -Nru mozjs52-52.3.1/js/src/gc/Barrier.h mozjs52-52.8.1/js/src/gc/Barrier.h --- mozjs52-52.3.1/js/src/gc/Barrier.h 2017-08-08 10:25:50.000000000 +0000 +++ mozjs52-52.8.1/js/src/gc/Barrier.h 2018-06-08 12:27:10.000000000 +0000 @@ -332,8 +332,11 @@ class BarrieredBaseMixins {}; // Base class of all barrier types. +// +// This is marked non-memmovable since post barriers added by derived classes +// can add pointers to class instances to the store buffer. template -class BarrieredBase : public BarrieredBaseMixins +class MOZ_NON_MEMMOVABLE BarrieredBase : public BarrieredBaseMixins { protected: // BarrieredBase is not directly instantiable. diff -Nru mozjs52-52.3.1/js/src/irregexp/NativeRegExpMacroAssembler.cpp mozjs52-52.8.1/js/src/irregexp/NativeRegExpMacroAssembler.cpp --- mozjs52-52.3.1/js/src/irregexp/NativeRegExpMacroAssembler.cpp 2017-08-08 10:25:50.000000000 +0000 +++ mozjs52-52.8.1/js/src/irregexp/NativeRegExpMacroAssembler.cpp 2018-06-08 12:27:10.000000000 +0000 @@ -447,7 +447,7 @@ masm.setupUnalignedABICall(temp0); masm.passABIArg(temp1); masm.callWithABI(JS_FUNC_TO_DATA_PTR(void*, GrowBacktrackStack)); - masm.storeCallWordResult(temp0); + masm.storeCallBoolResult(temp0); masm.PopRegsInMask(volatileRegs); @@ -866,7 +866,7 @@ int (*fun)(const char16_t*, const char16_t*, size_t) = CaseInsensitiveCompareUCStrings; masm.callWithABI(JS_FUNC_TO_DATA_PTR(void*, fun)); } - masm.storeCallWordResult(temp0); + masm.storeCallInt32Result(temp0); masm.PopRegsInMask(volatileRegs); diff -Nru mozjs52-52.3.1/js/src/irregexp/RegExpStack.cpp mozjs52-52.8.1/js/src/irregexp/RegExpStack.cpp --- mozjs52-52.3.1/js/src/irregexp/RegExpStack.cpp 2017-08-08 10:25:50.000000000 +0000 +++ mozjs52-52.8.1/js/src/irregexp/RegExpStack.cpp 2018-06-08 12:27:10.000000000 +0000 @@ -44,7 +44,7 @@ regexp_stack->reset(); } -int +bool irregexp::GrowBacktrackStack(JSRuntime* rt) { return rt->regexpStack.grow(); diff -Nru mozjs52-52.3.1/js/src/irregexp/RegExpStack.h mozjs52-52.8.1/js/src/irregexp/RegExpStack.h --- mozjs52-52.3.1/js/src/irregexp/RegExpStack.h 2017-08-08 10:25:50.000000000 +0000 +++ mozjs52-52.8.1/js/src/irregexp/RegExpStack.h 2018-06-08 12:27:10.000000000 +0000 @@ -114,7 +114,7 @@ } }; -int +bool GrowBacktrackStack(JSRuntime* rt); }} // namespace js::irregexp diff -Nru mozjs52-52.3.1/js/src/jit/BaselineFrameInfo.h mozjs52-52.8.1/js/src/jit/BaselineFrameInfo.h --- mozjs52-52.3.1/js/src/jit/BaselineFrameInfo.h 2017-08-08 10:25:50.000000000 +0000 +++ mozjs52-52.8.1/js/src/jit/BaselineFrameInfo.h 2018-06-08 12:27:10.000000000 +0000 @@ -67,7 +67,7 @@ union { struct { - Value v; + JS::UninitializedValue v; } constant; struct { mozilla::AlignedStorage2 reg; @@ -112,7 +112,7 @@ } Value constant() const { MOZ_ASSERT(kind_ == Constant); - return data.constant.v; + return data.constant.v.asValueRef(); } ValueOperand reg() const { MOZ_ASSERT(kind_ == Register); diff -Nru mozjs52-52.3.1/js/src/jit/CodeGenerator.cpp mozjs52-52.8.1/js/src/jit/CodeGenerator.cpp --- mozjs52-52.3.1/js/src/jit/CodeGenerator.cpp 2017-08-08 10:25:50.000000000 +0000 +++ mozjs52-52.8.1/js/src/jit/CodeGenerator.cpp 2018-06-11 16:38:18.000000000 +0000 @@ -1408,7 +1408,7 @@ masm.callWithABI(kind == FallbackKind::FatInlineString ? JS_FUNC_TO_DATA_PTR(void*, AllocateFatInlineString) : JS_FUNC_TO_DATA_PTR(void*, AllocateString)); - masm.storeCallWordResult(string_); + masm.storeCallPointerResult(string_); masm.PopRegsInMask(regsToSave); @@ -1446,7 +1446,7 @@ masm.move32(Imm32(int32_t(templateObj->as().numDynamicSlots())), temp5); masm.passABIArg(temp5); masm.callWithABI(JS_FUNC_TO_DATA_PTR(void*, CreateMatchResultFallbackFunc)); - masm.storeCallWordResult(object); + masm.storeCallPointerResult(object); masm.PopRegsInMask(regsToSave); @@ -7572,7 +7572,7 @@ masm.passABIArg(regRuntime); masm.passABIArg(regNBytes); masm.callWithABI(JS_FUNC_TO_DATA_PTR(void*, MallocWrapper)); - masm.storeCallWordResult(regReturn); + masm.storeCallPointerResult(regReturn); masm.PopRegsInMask(save); masm.ret(); @@ -9215,7 +9215,7 @@ callVM(InitRestParameterInfo, lir); if (saveAndRestore) { - storeResultTo(resultreg); + storePointerResultTo(resultreg); restoreLive(lir); } } @@ -10453,7 +10453,7 @@ masm.movePtr(ImmPtr(GetJitContext()->runtime), output); masm.passABIArg(output); masm.callWithABI(JS_FUNC_TO_DATA_PTR(void*, js::TypeOfObjectOperation)); - masm.storeCallWordResult(output); + masm.storeCallPointerResult(output); restoreVolatile(output); masm.jump(ool->rejoin()); diff -Nru mozjs52-52.3.1/js/src/jit/IonAnalysis.cpp mozjs52-52.8.1/js/src/jit/IonAnalysis.cpp --- mozjs52-52.3.1/js/src/jit/IonAnalysis.cpp 2017-08-08 10:25:50.000000000 +0000 +++ mozjs52-52.8.1/js/src/jit/IonAnalysis.cpp 2018-06-08 12:27:10.000000000 +0000 @@ -2188,6 +2188,12 @@ bool jit::MakeMRegExpHoistable(MIRGenerator* mir, MIRGraph& graph) { + // If we are compiling try blocks, regular expressions may be observable + // from catch blocks (which Ion does not compile). For now just disable the + // pass in this case. + if (graph.hasTryBlock()) + return true; + MDefinitionVector worklist(graph.alloc()); for (ReversePostorderIterator block(graph.rpoBegin()); block != graph.rpoEnd(); block++) { diff -Nru mozjs52-52.3.1/js/src/jit/IonBuilder.cpp mozjs52-52.8.1/js/src/jit/IonBuilder.cpp --- mozjs52-52.3.1/js/src/jit/IonBuilder.cpp 2017-08-08 10:25:50.000000000 +0000 +++ mozjs52-52.8.1/js/src/jit/IonBuilder.cpp 2018-06-08 12:27:10.000000000 +0000 @@ -9116,9 +9116,6 @@ MOZ_CRASH("Bad kind"); } -static MIRType -MIRTypeForTypedArrayRead(Scalar::Type arrayType, bool observedDouble); - bool IonBuilder::checkTypedObjectIndexInBounds(uint32_t elemSize, MDefinition* obj, @@ -10031,29 +10028,6 @@ return ptr; } -static MIRType -MIRTypeForTypedArrayRead(Scalar::Type arrayType, bool observedDouble) -{ - switch (arrayType) { - case Scalar::Int8: - case Scalar::Uint8: - case Scalar::Uint8Clamped: - case Scalar::Int16: - case Scalar::Uint16: - case Scalar::Int32: - return MIRType::Int32; - case Scalar::Uint32: - return observedDouble ? MIRType::Double : MIRType::Int32; - case Scalar::Float32: - return MIRType::Float32; - case Scalar::Float64: - return MIRType::Double; - default: - break; - } - MOZ_CRASH("Unknown typed array type"); -} - bool IonBuilder::jsop_getelem_typed(MDefinition* obj, MDefinition* index, Scalar::Type arrayType) diff -Nru mozjs52-52.3.1/js/src/jit/MacroAssembler.cpp mozjs52-52.8.1/js/src/jit/MacroAssembler.cpp --- mozjs52-52.3.1/js/src/jit/MacroAssembler.cpp 2017-08-08 10:25:50.000000000 +0000 +++ mozjs52-52.8.1/js/src/jit/MacroAssembler.cpp 2018-06-08 12:27:10.000000000 +0000 @@ -1976,7 +1976,7 @@ callWithABI(wasm::SymbolicAddress::ToInt32); else callWithABI(mozilla::BitwiseCast(JS::ToInt32)); - storeCallWordResult(dest); + storeCallInt32Result(dest); #if defined(JS_CODEGEN_ARM) || defined(JS_CODEGEN_ARM64) || \ defined(JS_CODEGEN_MIPS32) || defined(JS_CODEGEN_MIPS64) @@ -2214,6 +2214,12 @@ } MacroAssemblerSpecific::finish(); + + MOZ_RELEASE_ASSERT(size() <= MaxCodeBytesPerProcess, + "AssemblerBuffer should ensure we don't exceed MaxCodeBytesPerProcess"); + + if (bytesNeeded() > MaxCodeBytesPerProcess) + setOOM(); } void diff -Nru mozjs52-52.3.1/js/src/jit/MacroAssembler.h mozjs52-52.8.1/js/src/jit/MacroAssembler.h --- mozjs52-52.3.1/js/src/jit/MacroAssembler.h 2017-08-08 10:25:50.000000000 +0000 +++ mozjs52-52.8.1/js/src/jit/MacroAssembler.h 2018-06-08 12:27:10.000000000 +0000 @@ -1499,12 +1499,13 @@ storeTypedOrValue(src.reg(), dest); } - void storeCallWordResult(Register reg) { + void storeCallPointerResult(Register reg) { if (reg != ReturnReg) mov(ReturnReg, reg); } inline void storeCallBoolResult(Register reg); + inline void storeCallInt32Result(Register reg); void storeCallFloatResult(FloatRegister reg) { if (reg != ReturnDoubleReg) diff -Nru mozjs52-52.3.1/js/src/jit/MacroAssembler-inl.h mozjs52-52.8.1/js/src/jit/MacroAssembler-inl.h --- mozjs52-52.3.1/js/src/jit/MacroAssembler-inl.h 2017-08-08 10:25:50.000000000 +0000 +++ mozjs52-52.8.1/js/src/jit/MacroAssembler-inl.h 2018-06-08 12:27:10.000000000 +0000 @@ -788,6 +788,17 @@ } void +MacroAssembler::storeCallInt32Result(Register reg) +{ +#if JS_BITS_PER_WORD == 32 + storeCallPointerResult(reg); +#else + // Ensure the upper 32 bits are cleared. + move32(ReturnReg, reg); +#endif +} + +void MacroAssembler::storeCallResultValue(AnyRegister dest) { unboxValue(JSReturnOperand, dest); diff -Nru mozjs52-52.3.1/js/src/jit/MIR.cpp mozjs52-52.8.1/js/src/jit/MIR.cpp --- mozjs52-52.3.1/js/src/jit/MIR.cpp 2017-08-08 10:25:50.000000000 +0000 +++ mozjs52-52.8.1/js/src/jit/MIR.cpp 2018-06-08 12:27:10.000000000 +0000 @@ -6052,6 +6052,14 @@ return BarrierKind::TypeSet; } + if (!name && IsTypedArrayClass(key->clasp())) { + Scalar::Type arrayType = Scalar::Type(key->clasp() - &TypedArrayObject::classes[0]); + MIRType type = MIRTypeForTypedArrayRead(arrayType, true); + if (observed->mightBeMIRType(type)) + return BarrierKind::NoBarrier; + return BarrierKind::TypeSet; + } + jsid id = name ? NameToId(name) : JSID_VOID; HeapTypeSetKey property = key->property(id); if (property.maybeTypes()) { diff -Nru mozjs52-52.3.1/js/src/jit/MIR.h mozjs52-52.8.1/js/src/jit/MIR.h --- mozjs52-52.3.1/js/src/jit/MIR.h 2017-08-08 10:25:50.000000000 +0000 +++ mozjs52-52.8.1/js/src/jit/MIR.h 2018-06-11 16:38:18.000000000 +0000 @@ -14238,6 +14238,29 @@ bool ArrayPrototypeHasIndexedProperty(IonBuilder* builder, JSScript* script); bool TypeCanHaveExtraIndexedProperties(IonBuilder* builder, TemporaryTypeSet* types); +inline MIRType +MIRTypeForTypedArrayRead(Scalar::Type arrayType, bool observedDouble) +{ + switch (arrayType) { + case Scalar::Int8: + case Scalar::Uint8: + case Scalar::Uint8Clamped: + case Scalar::Int16: + case Scalar::Uint16: + case Scalar::Int32: + return MIRType::Int32; + case Scalar::Uint32: + return observedDouble ? MIRType::Double : MIRType::Int32; + case Scalar::Float32: + return MIRType::Float32; + case Scalar::Float64: + return MIRType::Double; + default: + break; + } + MOZ_CRASH("Unknown typed array type"); +} + } // namespace jit } // namespace js diff -Nru mozjs52-52.3.1/js/src/jit/ProcessExecutableMemory.cpp mozjs52-52.8.1/js/src/jit/ProcessExecutableMemory.cpp --- mozjs52-52.3.1/js/src/jit/ProcessExecutableMemory.cpp 2017-08-08 10:25:50.000000000 +0000 +++ mozjs52-52.8.1/js/src/jit/ProcessExecutableMemory.cpp 2018-06-08 12:27:10.000000000 +0000 @@ -385,14 +385,6 @@ #endif }; -// Limit on the number of bytes of executable memory to prevent JIT spraying -// attacks. -#if JS_BITS_PER_WORD == 32 -static const size_t MaxCodeBytesPerProcess = 128 * 1024 * 1024; -#else -static const size_t MaxCodeBytesPerProcess = 1 * 1024 * 1024 * 1024; -#endif - // Per-process executable memory allocator. It reserves a block of memory of // MaxCodeBytesPerProcess bytes, then allocates/deallocates pages from that. // diff -Nru mozjs52-52.3.1/js/src/jit/ProcessExecutableMemory.h mozjs52-52.8.1/js/src/jit/ProcessExecutableMemory.h --- mozjs52-52.3.1/js/src/jit/ProcessExecutableMemory.h 2017-08-08 10:25:50.000000000 +0000 +++ mozjs52-52.8.1/js/src/jit/ProcessExecutableMemory.h 2018-06-08 12:27:10.000000000 +0000 @@ -17,6 +17,14 @@ // alignment though. static const size_t ExecutableCodePageSize = 64 * 1024; +// Limit on the number of bytes of executable memory to prevent JIT spraying +// attacks. +#if JS_BITS_PER_WORD == 32 +static const size_t MaxCodeBytesPerProcess = 128 * 1024 * 1024; +#else +static const size_t MaxCodeBytesPerProcess = 1 * 1024 * 1024 * 1024; +#endif + enum class ProtectionSetting { Protected, // Not readable, writable, or executable. Writable, diff -Nru mozjs52-52.3.1/js/src/jit/RangeAnalysis.cpp mozjs52-52.8.1/js/src/jit/RangeAnalysis.cpp --- mozjs52-52.3.1/js/src/jit/RangeAnalysis.cpp 2017-08-08 10:25:50.000000000 +0000 +++ mozjs52-52.8.1/js/src/jit/RangeAnalysis.cpp 2018-06-08 12:27:10.000000000 +0000 @@ -15,6 +15,7 @@ #include "jit/MIRGenerator.h" #include "jit/MIRGraph.h" #include "js/Conversions.h" +#include "vm/ArgumentsObject.h" #include "vm/TypedArrayCommon.h" #include "jsopcodeinlines.h" @@ -1845,9 +1846,9 @@ { // This is is a conservative upper bound on what |TooManyActualArguments| // checks. If exceeded, Ion will not be entered in the first place. - MOZ_ASSERT(JitOptions.maxStackArgs <= UINT32_MAX, - "NewUInt32Range requires a uint32 value"); - setRange(Range::NewUInt32Range(alloc, 0, JitOptions.maxStackArgs)); + static_assert(ARGS_LENGTH_MAX <= UINT32_MAX, + "NewUInt32Range requires a uint32 value"); + setRange(Range::NewUInt32Range(alloc, 0, ARGS_LENGTH_MAX)); } void diff -Nru mozjs52-52.3.1/js/src/jit/RegisterSets.h mozjs52-52.8.1/js/src/jit/RegisterSets.h --- mozjs52-52.3.1/js/src/jit/RegisterSets.h 2017-08-08 10:25:50.000000000 +0000 +++ mozjs52-52.8.1/js/src/jit/RegisterSets.h 2018-06-08 12:27:10.000000000 +0000 @@ -226,13 +226,13 @@ // Space to hold either a Value or a TypedOrValueRegister. union U { - Value constant; + JS::UninitializedValue constant; TypedOrValueRegister reg; } data; - const Value& dataValue() const { + Value dataValue() const { MOZ_ASSERT(constant()); - return data.constant; + return data.constant.asValueRef(); } void setDataValue(const Value& value) { MOZ_ASSERT(constant()); @@ -268,7 +268,7 @@ return constant_; } - const Value& value() const { + Value value() const { return dataValue(); } diff -Nru mozjs52-52.3.1/js/src/jit/RematerializedFrame.cpp mozjs52-52.8.1/js/src/jit/RematerializedFrame.cpp --- mozjs52-52.3.1/js/src/jit/RematerializedFrame.cpp 2017-08-08 10:25:50.000000000 +0000 +++ mozjs52-52.8.1/js/src/jit/RematerializedFrame.cpp 2018-06-08 12:27:10.000000000 +0000 @@ -61,9 +61,17 @@ { unsigned numFormals = iter.isFunctionFrame() ? iter.calleeTemplate()->nargs() : 0; unsigned argSlots = Max(numFormals, iter.numActualArgs()); - size_t numBytes = sizeof(RematerializedFrame) + - (argSlots + iter.script()->nfixed()) * sizeof(Value) - - sizeof(Value); // 1 Value included in sizeof(RematerializedFrame) + unsigned extraSlots = argSlots + iter.script()->nfixed(); + + // One Value slot is included in sizeof(RematerializedFrame), so we can + // reduce the extra slot count by one. However, if there are zero slot + // allocations total, then reducing the slots by one will lead to + // the memory allocation being smaller than sizeof(RematerializedFrame). + if (extraSlots > 0) + extraSlots -= 1; + + size_t numBytes = sizeof(RematerializedFrame) + (extraSlots * sizeof(Value)); + MOZ_ASSERT(numBytes >= sizeof(RematerializedFrame)); void* buf = cx->pod_calloc(numBytes); if (!buf) diff -Nru mozjs52-52.3.1/js/src/jit/shared/CodeGenerator-shared.h mozjs52-52.8.1/js/src/jit/shared/CodeGenerator-shared.h --- mozjs52-52.3.1/js/src/jit/shared/CodeGenerator-shared.h 2017-08-08 10:25:50.000000000 +0000 +++ mozjs52-52.8.1/js/src/jit/shared/CodeGenerator-shared.h 2018-06-08 12:27:10.000000000 +0000 @@ -437,8 +437,8 @@ #endif } - void storeResultTo(Register reg) { - masm.storeCallWordResult(reg); + void storePointerResultTo(Register reg) { + masm.storeCallPointerResult(reg); } void storeFloatResultTo(FloatRegister reg) { @@ -701,7 +701,9 @@ { } inline void generate(CodeGeneratorShared* codegen) const { - codegen->storeResultTo(out_); + // It's okay to use storePointerResultTo here - the VMFunction wrapper + // ensures the upper bytes are zero for bool/int32 return values. + codegen->storePointerResultTo(out_); } inline LiveRegisterSet clobbered() const { LiveRegisterSet set; diff -Nru mozjs52-52.3.1/js/src/jit/shared/IonAssemblerBuffer.h mozjs52-52.8.1/js/src/jit/shared/IonAssemblerBuffer.h --- mozjs52-52.3.1/js/src/jit/shared/IonAssemblerBuffer.h 2017-08-08 10:25:50.000000000 +0000 +++ mozjs52-52.8.1/js/src/jit/shared/IonAssemblerBuffer.h 2018-06-08 12:27:10.000000000 +0000 @@ -181,6 +181,10 @@ protected: virtual Slice* newSlice(LifoAlloc& a) { + if (size() > MaxCodeBytesPerProcess - sizeof(Slice)) { + fail_oom(); + return nullptr; + } Slice* tmp = static_cast(a.alloc(sizeof(Slice))); if (!tmp) { fail_oom(); diff -Nru mozjs52-52.3.1/js/src/jit/SharedIC.cpp mozjs52-52.8.1/js/src/jit/SharedIC.cpp --- mozjs52-52.3.1/js/src/jit/SharedIC.cpp 2017-08-08 10:25:50.000000000 +0000 +++ mozjs52-52.8.1/js/src/jit/SharedIC.cpp 2018-06-08 12:27:10.000000000 +0000 @@ -1364,19 +1364,19 @@ break; } case JSOP_BITOR: { - masm.orPtr(rhsReg, lhsReg); + masm.or32(rhsReg, lhsReg); masm.tagValue(JSVAL_TYPE_INT32, lhsReg, R0); EmitReturnFromIC(masm); break; } case JSOP_BITXOR: { - masm.xorPtr(rhsReg, lhsReg); + masm.xor32(rhsReg, lhsReg); masm.tagValue(JSVAL_TYPE_INT32, lhsReg, R0); EmitReturnFromIC(masm); break; } case JSOP_BITAND: { - masm.andPtr(rhsReg, lhsReg); + masm.and32(rhsReg, lhsReg); masm.tagValue(JSVAL_TYPE_INT32, lhsReg, R0); EmitReturnFromIC(masm); break; @@ -1425,7 +1425,7 @@ masm.setupUnalignedABICall(scratchReg); masm.passABIArg(FloatReg0, MoveOp::DOUBLE); masm.callWithABI(mozilla::BitwiseCast(JS::ToInt32)); - masm.storeCallWordResult(scratchReg); + masm.storeCallInt32Result(scratchReg); masm.pop(intReg); masm.bind(&doneTruncate); @@ -1435,13 +1435,13 @@ // All handled ops commute, so no need to worry about ordering. switch(op) { case JSOP_BITOR: - masm.orPtr(intReg, intReg2); + masm.or32(intReg, intReg2); break; case JSOP_BITXOR: - masm.xorPtr(intReg, intReg2); + masm.xor32(intReg, intReg2); break; case JSOP_BITAND: - masm.andPtr(intReg, intReg2); + masm.and32(intReg, intReg2); break; default: MOZ_CRASH("Unhandled op for BinaryArith_DoubleWithInt32."); @@ -1578,7 +1578,7 @@ masm.setupUnalignedABICall(scratchReg); masm.passABIArg(FloatReg0, MoveOp::DOUBLE); masm.callWithABI(BitwiseCast(JS::ToInt32)); - masm.storeCallWordResult(scratchReg); + masm.storeCallInt32Result(scratchReg); masm.bind(&doneTruncate); masm.not32(scratchReg); diff -Nru mozjs52-52.3.1/js/src/jit/x86/CodeGenerator-x86.cpp mozjs52-52.8.1/js/src/jit/x86/CodeGenerator-x86.cpp --- mozjs52-52.3.1/js/src/jit/x86/CodeGenerator-x86.cpp 2017-08-08 10:25:50.000000000 +0000 +++ mozjs52-52.8.1/js/src/jit/x86/CodeGenerator-x86.cpp 2018-06-08 12:27:10.000000000 +0000 @@ -866,7 +866,7 @@ masm.callWithABI(wasm::SymbolicAddress::ToInt32); else masm.callWithABI(BitwiseCast(JS::ToInt32)); - masm.storeCallWordResult(output); + masm.storeCallInt32Result(output); restoreVolatile(output); } @@ -951,7 +951,7 @@ else masm.callWithABI(BitwiseCast(JS::ToInt32)); - masm.storeCallWordResult(output); + masm.storeCallInt32Result(output); masm.pop(input); restoreVolatile(output); diff -Nru mozjs52-52.3.1/js/src/jit/x86-shared/AssemblerBuffer-x86-shared.h mozjs52-52.8.1/js/src/jit/x86-shared/AssemblerBuffer-x86-shared.h --- mozjs52-52.3.1/js/src/jit/x86-shared/AssemblerBuffer-x86-shared.h 2017-08-08 10:25:50.000000000 +0000 +++ mozjs52-52.8.1/js/src/jit/x86-shared/AssemblerBuffer-x86-shared.h 2018-06-08 12:27:10.000000000 +0000 @@ -68,6 +68,33 @@ namespace jit { + // AllocPolicy for AssemblerBuffer. OOMs when trying to allocate more than + // MaxCodeBytesPerProcess bytes. Use private inheritance to make sure we + // explicitly have to expose SystemAllocPolicy methods. + class AssemblerBufferAllocPolicy : private SystemAllocPolicy + { + public: + using SystemAllocPolicy::checkSimulatedOOM; + using SystemAllocPolicy::reportAllocOverflow; + using SystemAllocPolicy::free_; + + template T* pod_realloc(T* p, size_t oldSize, size_t newSize) { + static_assert(sizeof(T) == 1, + "AssemblerBufferAllocPolicy should only be used with byte vectors"); + MOZ_ASSERT(oldSize <= MaxCodeBytesPerProcess); + if (MOZ_UNLIKELY(newSize > MaxCodeBytesPerProcess)) + return nullptr; + return SystemAllocPolicy::pod_realloc(p, oldSize, newSize); + } + template T* pod_malloc(size_t numElems) { + static_assert(sizeof(T) == 1, + "AssemblerBufferAllocPolicy should only be used with byte vectors"); + if (MOZ_UNLIKELY(numElems > MaxCodeBytesPerProcess)) + return nullptr; + return SystemAllocPolicy::pod_malloc(numElems); + } + }; + class AssemblerBuffer { template @@ -93,6 +120,9 @@ void ensureSpace(size_t space) { + // This should only be called with small |space| values to ensure + // we don't overflow below. + MOZ_ASSERT(space <= 16); if (MOZ_UNLIKELY(!m_buffer.reserve(m_buffer.length() + space))) oomDetected(); } @@ -168,7 +198,7 @@ m_buffer.clear(); } - PageProtectingVector m_buffer; + PageProtectingVector m_buffer; bool m_oom; }; diff -Nru mozjs52-52.3.1/js/src/jit-test/tests/sunspider/check-string-unpack-code.js mozjs52-52.8.1/js/src/jit-test/tests/sunspider/check-string-unpack-code.js --- mozjs52-52.3.1/js/src/jit-test/tests/sunspider/check-string-unpack-code.js 1970-01-01 00:00:00.000000000 +0000 +++ mozjs52-52.8.1/js/src/jit-test/tests/sunspider/check-string-unpack-code.js 2018-06-08 12:27:10.000000000 +0000 @@ -0,0 +1,73 @@ +// This test case unpacks the compressed code for the MochiKit, +// jQuery, Dojo and Prototype JavaScript libraries. + +/*** + MochiKit.MochiKit 1.3.1 : PACKED VERSION + THIS FILE IS AUTOMATICALLY GENERATED. If creating patches, please + diff against the source tree, not this file. + + See for documentation, downloads, license, etc. + + (c) 2005 Bob Ippolito. All rights Reserved. +***/ + +for (var i = 0; i < 2; i++) { + +var decompressedMochiKit = function(p,a,c,k,e,d){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)d[e(c)]=k[c]||e(c);k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('if(H(1q)!="L"){1q.2X("B.J")}if(H(B)=="L"){B={}}if(H(B.J)=="L"){B.J={}}B.J.1Y="1.3.1";B.J.1r="B.J";B.J.2l=G(7V,vR){if(7V===O){7V={}}R(u i=1;i=0;i--){aw.e9(o[i])}}N{X.1c(o)}}F X},1R:G(7U,1i,av){if(!av){av=0}if(1i){u l=1i.K;if(H(l)!="2y"){if(H(B.15)!="L"){1i=B.15.2G(1i);l=1i.K}N{14 Y 3p("au 2E an at-as 3W B.15 2E ar")}}if(!7U){7U=[]}R(u i=av;i>b},vG:G(a,b){F a>>>b},eq:G(a,b){F a==b},ne:G(a,b){F a!=b},gt:G(a,b){F a>b},ge:G(a,b){F a>=b},lt:G(a,b){F al){7T=l}}69=[];R(i=0;i<7T;i++){u fa=[];R(u j=1;j0){ap=m.2o(me.am,ap)}u 4o=me.f7;if(!4o){4o=D}F me.f5.1w(4o,ap)};7Q.f7=f6;7Q.f5=ao;7Q.am=5f;F 7Q},lF:G(7P){u mp=B.J.1O;R(u k in 7P){u f4=7P[k];if(H(f4)=="G"){7P[k]=mp(f4,7P)}}},5u:G(mo,mn,ml,mk){B.J.ae.5M(mo,mn,ml,mk)},mj:{"5L":1h,"1n":1h,"2y":1h},2f:G(a,b){if(a==b){F 0}u f3=(H(a)=="L"||a===O);u f2=(H(b)=="L"||b===O);if(f3&&f2){F 0}N{if(f3){F-1}N{if(f2){F 1}}}u m=B.J;u f1=m.mj;if(!(H(a)in f1&&H(b)in f1)){1f{F m.ae.3C(a,b)}1e(e){if(e!=m.4d){14 e}}}if(ab){F 1}}u f0=m.U;14 Y 3p(f0(a)+" 3W "+f0(b)+" 9v 2E be vv")},eM:G(a,b){F B.J.2f(a.9P(),b.9P())},eL:G(a,b){u mi=B.J.2f;u 7O=a.K;u al=0;if(7O>b.K){al=1;7O=b.K}N{if(7O0))){u kv=B.S.d5(3s);3s=kv[0];68=kv[1]}N{if(M.K==1){u o=3s;3s=[];68=[];R(u k in o){u v=o[k];if(H(v)!="G"){3s.1c(k);68.1c(v)}}}}u W=[];u lT=28.2a(3s.K,68.K);u eT=B.J.af;R(u i=0;i=2J){14 I.25}5c+=3a;F W}}},4c:G(aa,p,q){u m=B.J;u I=B.15;u lb=m.2r(I.1Q,m.1R(O,M,1));u 2r=m.2r;u 1a=I.1a;F{U:G(){F"4c(...)"},1l:m.24("U"),1a:G(){F aa.1w(D,2r(1a,lb))}}},ep:G(aa,1V,I){1V=B.15.1Q(1V);u m=B.J;F{U:G(){F"ep(...)"},1l:m.24("U"),1a:G(){F aa.1w(I,1V.1a())}}},55:G(p,q){u I=B.15;u m=B.J;if(M.K==1){F I.1Q(M[0])}u 64=m.2r(I.1Q,M);F{U:G(){F"55(...)"},1l:m.24("U"),1a:G(){1M(64.K>1){1f{F 64[0].1a()}1e(e){if(e!=I.25){14 e}64.2P()}}if(64.K==1){u a9=64.2P();D.1a=m.1O("1a",a9);F D.1a()}14 I.25}}},9Z:G(3b,1V){u I=B.15;1V=I.1Q(1V);F{U:G(){F"9Z(...)"},1l:B.J.24("U"),1a:G(){u W=1V.1a();if(!3b(W)){D.1a=G(){14 I.25};D.1a()}F W}}},eo:G(3b,1V){1V=B.15.1Q(1V);u m=B.J;u 1O=m.1O;F{"U":G(){F"eo(...)"},"1l":m.24("U"),"1a":G(){1M(1h){u W=1V.1a();if(!3b(W)){2K}}D.1a=1O("1a",1V);F W}}},a7:G(63,2u,la){2u.62[63]=-1;u m=B.J;u l9=m.eI;F{U:G(){F"en("+63+", ...)"},1l:m.24("U"),1a:G(){u W;u i=2u.62[63];if(i==2u.29){W=la.1a();2u.a8.1c(W);2u.29+=1;2u.62[63]+=1}N{W=2u.a8[i-2u.2a];2u.62[63]+=1;if(i==2u.2a&&l9(2u.62)!=2u.2a){2u.2a+=1;2u.a8.2P()}}F W}}},en:G(a6,n){u W=[];u 2u={"62":[],"a8":[],"29":-1,"2a":-1};if(M.K==1){n=2}u I=B.15;a6=I.1Q(a6);u a7=I.a7;R(u i=0;i0&&4k>=2J)||(3a<0&&4k<=2J)){14 B.15.25}u W=4k;4k+=3a;F W},U:G(){F"7I("+[4k,2J,3a].2b(", ")+")"},1l:B.J.24("U")}},l0:G(a5,l7){u x=l7||0;u I=B.15;a5=I.1Q(a5);1f{1M(1h){x+=a5.1a()}}1e(e){if(e!=I.25){14 e}}F x},em:G(a4){u I=B.15;a4=I.1Q(a4);1f{1M(1h){a4.1a()}}1e(e){if(e!=I.25){14 e}}},9a:G(7J,1A,I){u m=B.J;if(M.K>2){1A=m.1O(1A,I)}if(m.3A(7J)){1f{R(u i=0;i<7J.K;i++){1A(7J[i])}}1e(e){if(e!=B.15.25){14 e}}}N{I=B.15;I.em(I.4c(1A,7J))}},kZ:G(l6,1A){u I=B.15;1f{I.a0(1A,l6).1a();F 1m}1e(e){if(e!=I.25){14 e}F 1h}},kY:G(l5,4j){u W=B.15.2G(l5);if(M.K==1){4j=B.J.2f}W.iz(4j);F W},kX:G(l4){u W=B.15.2G(l4);W.vg();F W},kW:G(l3,1A){u I=B.15;1f{I.a1(1A,l3).1a();F 1h}1e(e){if(e!=I.25){14 e}F 1m}},kV:G(1g,5b){if(B.J.3A(5b)){R(u i=0;i<5b.K;i++){1g.1c(5b[i])}}N{u I=B.15;5b=I.1Q(5b);1f{1M(1h){1g.1c(5b.1a())}}1e(e){if(e!=I.25){14 e}}}F 1g},ek:G(a3,eH){u m=B.J;u I=B.15;if(M.K<2){eH=m.4i.eE}a3=I.1Q(a3);u pk=L;u k=L;u v;G eF(){v=a3.1a();k=eH(v)}G l2(){u 7j=v;v=L;F 7j}u eG=1h;F{U:G(){F"ek(...)"},1a:G(){1M(k==pk){eF();if(eG){eG=1m;2K}}pk=k;F[k,{1a:G(){if(v==L){eF()}if(k!=pk){14 I.25}F l2()}}]}}},kU:G(a2,eD){u m=B.J;u I=B.15;if(M.K<2){eD=m.4i.eE}a2=I.1Q(a2);u ey=[];u eA=1h;u ez;1M(1h){1f{u eB=a2.1a();u 2h=eD(eB)}1e(e){if(e==I.25){2K}14 e}if(eA||2h!=ez){u eC=[];ey.1c([2h,eC])}eC.1c(eB);eA=1m;ez=2h}F ey},9X:G(ex){u i=0;F{U:G(){F"9X(...)"},1l:B.J.24("U"),1a:G(){if(i>=ex.K){14 B.15.25}F ex[i++]}}},eh:G(ew){F(ew&&H(ew.ei)=="G")},9V:G(l1){F{U:G(){F"9V(...)"},1l:B.J.24("U"),1a:G(){u W=l1.ei();if(W===O||W===L){14 B.15.25}F W}}}});B.15.1W=["9Y","9X","eh","9V",];B.15.1z=["25","9W","1Q","eu","et","7b","1a","es","a1","a0","er","4c","ep","55","9Z","eo","en","2G","7H","7I","l0","em","9a","kZ","kY","kX","kW","kV","ek","kU"];B.15.2d=G(){u m=B.J;D.25=Y m.5a("25");D.9Y=Y m.4a();D.9W("ej",m.3A,D.9X);D.9W("ei",D.eh,D.9V);D.2k={":3e":D.1z,":1p":m.2o(D.1z,D.1W)};m.3f(D)};B.15.2d();if(!B.3d){7H=B.15.7H}B.J.2Y(D,B.15);if(H(1q)!="L"){1q.2X("B.1H");1q.2M("B.J")}if(H(1x)!="L"){1x.26("B.J",[])}1f{if(H(B.J)=="L"){14""}}1e(e){14"B.1H 3F on B.J!"}if(H(B.1H)=="L"){B.1H={}}B.1H.1r="B.1H";B.1H.1Y="1.3.1";B.1H.1K=G(){F"["+D.1r+" "+D.1Y+"]"};B.1H.1l=G(){F D.1K()};B.1H.1z=["5C","49","7A","kR","2L","5Z","kG","ch","kE","kC"];B.1H.1W=["ef","e8","e7"];B.1H.49=G(1P,kT,3z){D.1P=1P;D.3N=kT;D.3z=3z;D.vf=Y 3Q()};B.1H.49.1U={U:G(){u m=B.J;F"49("+m.2r(m.U,[D.1P,D.3N,D.3z]).2b(", ")+")"},1l:B.J.24("U")};B.J.2l(B.1H,{ef:G(7F){u I=B.1H;if(H(7F)=="1n"){7F=I.5C[7F]}F G(1t){u 7G=1t.3N;if(H(7G)=="1n"){7G=I.5C[7G]}F 7G>=7F}},e8:G(){u kS=B.1H.49;R(u i=0;i=0&&D.4h.K>D.ec){D.4h.2P()}},c8:G(9U){u ea=0;if(!(H(9U)=="L"||9U===O)){ea=28.29(0,D.4h.K-9U)}F D.4h.9T(ea)},kJ:G(7B){if(H(7B)=="L"||7B===O){7B=30}u 9S=D.c8(7B);if(9S.K){u 1g=2r(G(m){F"\\n ["+m.1P+"] "+m.3N+": "+m.3z.2b(" ")},9S);1g.e9("va "+9S.K+" v9:");F 1g.2b("")}F""},v8:G(kI){if(H(B.1I)=="L"){cq(D.kJ())}N{B.1I.bY(kI||1m)}}};B.1H.2d=G(){D.5C={8M:40,8L:50,8K:30,8J:20,8I:10};u m=B.J;m.5u("49",D.e8,D.e7);u 61=m.2z;u e6=D.7A;u 60=e6.1U.kH;m.2l(D.7A.1U,{kF:61(60,"8I"),5Z:61(60,"8J"),dE:61(60,"8M"),kD:61(60,"8L"),kB:61(60,"8K")});u I=D;u 5Y=G(1b){F G(){I.2L[1b].1w(I.2L,M)}};D.5Z=5Y("5Z");D.kG=5Y("dE");D.ch=5Y("kF");D.kE=5Y("kD");D.kC=5Y("kB");D.2L=Y e6();D.2L.e5=1h;D.2k={":3e":D.1z,":1p":m.2o(D.1z,D.1W)};m.3f(D)};if(H(5X)=="L"&&H(2v)!="L"&&2v.kA&&H(kz)!="L"){5X=G(){5X.3G=M;u ev=2v.kA("v7");ev.v6("5X",1m,1h);kz(ev)}}B.1H.2d();B.J.2Y(D,B.1H);if(H(1q)!="L"){1q.2X("B.1D")}if(H(B)=="L"){B={}}if(H(B.1D)=="L"){B.1D={}}B.1D.1r="B.1D";B.1D.1Y="1.3.1";B.1D.1K=G(){F"["+D.1r+" "+D.1Y+"]"};B.1D.1l=G(){F D.1K()};B.1D.ks=G(1y){1y=1y+"";if(H(1y)!="1n"||1y.K===0){F O}u 7z=1y.2R("-");if(7z.K===0){F O}F Y 3Q(7z[0],7z[1]-1,7z[2])};B.1D.ky=/(\\d{4,})(?:-(\\d{1,2})(?:-(\\d{1,2})(?:[T ](\\d{1,2}):(\\d{1,2})(?::(\\d{1,2})(?:\\.(\\d+))?)?(?:(Z)|([+-])(\\d{1,2})(?::(\\d{1,2}))?)?)?)?)?/;B.1D.kr=G(1y){1y=1y+"";if(H(1y)!="1n"||1y.K===0){F O}u X=1y.3C(B.1D.ky);if(H(X)=="L"||X===O){F O}u 5W,7y,7x,9R,2a,9Q,7w;5W=3w(X[1],10);if(H(X[2])=="L"||X[2]===""){F Y 3Q(5W)}7y=3w(X[2],10)-1;7x=3w(X[3],10);if(H(X[4])=="L"||X[4]===""){F Y 3Q(5W,7y,7x)}9R=3w(X[4],10);2a=3w(X[5],10);9Q=(H(X[6])!="L"&&X[6]!=="")?3w(X[6],10):0;if(H(X[7])!="L"&&X[7]!==""){7w=28.ha(c5*4M("0."+X[7]))}N{7w=0}if((H(X[8])=="L"||X[8]==="")&&(H(X[9])=="L"||X[9]==="")){F Y 3Q(5W,7y,7x,9R,2a,9Q,7w)}u 58;if(H(X[9])!="L"&&X[9]!==""){58=3w(X[10],10)*v5;if(H(X[11])!="L"&&X[11]!==""){58+=3w(X[11],10)*kw}if(X[9]=="-"){58=-58}}N{58=0}F Y 3Q(3Q.v4(5W,7y,7x,9R,2a,9Q,7w)-58)};B.1D.dY=G(2g,kx){if(H(2g)=="L"||2g===O){F O}u hh=2g.v3();u mm=2g.v2();u ss=2g.v1();u 1g=[((kx&&(hh<10))?"0"+hh:hh),((mm<10)?"0"+mm:mm),((ss<10)?"0"+ss:ss)];F 1g.2b(":")};B.1D.kq=G(2g,7v){if(H(2g)=="L"||2g===O){F O}u ku=7v?"T":" ";u kt=7v?"Z":"";if(7v){2g=Y 3Q(2g.9P()+(2g.v0()*kw))}F B.1D.dX(2g)+ku+B.1D.dY(2g,7v)+kt};B.1D.dX=G(2g){if(H(2g)=="L"||2g===O){F O}u e4=B.1D.e3;F[2g.dZ(),e4(2g.e1()+1),e4(2g.e0())].2b("-")};B.1D.kp=G(d){d=d+"";if(H(d)!="1n"||d.K===0){F O}u a=d.2R("/");F Y 3Q(a[2],a[0]-1,a[1])};B.1D.e3=G(n){F(n>9)?n:"0"+n};B.1D.ko=G(d){if(H(d)=="L"||d===O){F O}u e2=B.1D.e3;F[e2(d.e1()+1),e2(d.e0()),d.dZ()].2b("/")};B.1D.kn=G(d){if(H(d)=="L"||d===O){F O}F[d.e1()+1,d.e0(),d.dZ()].2b("/")};B.1D.1z=["ks","kr","dY","kq","dX","kp","ko","kn"];B.1D.1W=[];B.1D.2k={":3e":B.1D.1z,":1p":B.1D.1z};B.1D.2d=G(){u 2w=D.1r+".";R(u k in D){u o=D[k];if(H(o)=="G"&&H(o.1r)=="L"){1f{o.1r=2w+k}1e(e){}}}};B.1D.2d();if(H(B.J)!="L"){B.J.2Y(D,B.1D)}N{(G(km,dW){if((H(1x)=="L"&&H(1q)=="L")||(H(B.3d)=="5L"&&B.3d)){u 1p=dW.2k[":1p"];R(u i=0;i<1p.K;i++){km[1p[i]]=dW[1p[i]]}}})(D,B.1D)}if(H(1q)!="L"){1q.2X("B.1s")}if(H(B)=="L"){B={}}if(H(B.1s)=="L"){B.1s={}}B.1s.1r="B.1s";B.1s.1Y="1.3.1";B.1s.1K=G(){F"["+D.1r+" "+D.1Y+"]"};B.1s.1l=G(){F D.1K()};B.1s.ke=G(kl,kk,kj,ki,kh,dV,kg,9N,kf){F G(1P){1P=4M(1P);if(H(1P)=="L"||1P===O||k8(1P)){F kl}u 9L=kk;u 9K=kj;if(1P<0){1P=-1P}N{9L=9L.23(/-/,"")}u me=M.2U;u 9M=B.1s.dJ(ki);if(kh){1P=1P*3k;9K=9M.9y+9K}1P=B.1s.dK(1P,dV);u 9O=1P.2R(/\\./);u 3r=9O[0];u 3P=(9O.K==1)?"":9O[1];u X="";1M(3r.K9N){u i=3r.K-9N;X=9M.9A+3r.2W(i,3r.K)+X;3r=3r.2W(0,i)}}X=3r+X;if(dV>0){1M(3P.K=0)){D.9u()}},jR:G(X){D.9x(X);D.jX()},9x:G(X){D.2H=((X 2C 2x)?1:0);D.53[D.2H]=X;D.9u()},dD:G(){if(D.2H!=-1){if(!D.7l){14 Y B.1k.dj(D)}D.7l=1m;F}},3o:G(X){D.dD();if(X 2C B.1k.2t){14 Y 2x("2t jW 9v aB be 7r if jV jU jT jS of a 3o")}D.9x(X)},52:G(X){D.dD();u I=B.1k;if(X 2C I.2t){14 Y 2x("2t jW 9v aB be 7r if jV jU jT jS of a 3o")}if(!(X 2C 2x)){X=Y I.9p(X)}D.9x(X)},jP:G(fn){if(M.K>1){fn=B.J.2z.1w(O,M)}F D.9w(fn,fn)},5Q:G(fn){if(M.K>1){fn=B.J.2z.1w(O,M)}F D.9w(fn,O)},jA:G(fn){if(M.K>1){fn=B.J.2z.1w(O,M)}F D.9w(O,fn)},9w:G(cb,eb){if(D.7r){14 Y 2x("uQ uP 9v 2E be re-uO")}D.55.1c([cb,eb]);if(D.2H>=0){D.9u()}F D},9u:G(){u dC=D.55;u 56=D.2H;u X=D.53[56];u I=D;u cb=O;1M(dC.K>0&&D.54===0){u 2n=dC.2P();u f=2n[56];if(f===O){2V}1f{X=f(X);56=((X 2C 2x)?1:0);if(X 2C B.1k.2t){cb=G(X){I.jR(X)};D.jQ()}}1e(3O){56=1;if(!(3O 2C 2x)){3O=Y B.1k.9p(3O)}X=3O}}D.2H=56;D.53[56]=X;if(cb&&D.54){X.jP(cb);X.7r=1h}}};B.J.2l(B.1k,{dk:G(){F dB("("+M[0].jN+")")},dp:G(uN){u d=Y B.1k.2t();d.3o.1w(d,M);F d},9q:G(uM){u d=Y B.1k.2t();d.52.1w(d,M);F d},do:G(){u I=M.2U;if(!I.7q){u dy=[G(){F Y 7q()},G(){F Y dA("jO.dz")},G(){F Y dA("uL.dz")},G(){F Y dA("jO.dz.4.0")},G(){14 Y B.1k.dh("uK uJ 2E uI 7q")}];R(u i=0;i1){u m=B.J;u qs=m.dw.1w(O,m.1R(O,M,1));if(qs){5F+="?"+qs}}2s.cp("uB",5F,1h);F I.dl(2s)},jv:G(5F){u I=B.1k;u d=I.dn.1w(I,M);d=d.5Q(I.dk);F d},dm:G(jJ,dv){u d=Y B.1k.2t();u m=B.J;if(H(dv)!="L"){d.5Q(G(){F dv})}u jI=uA(m.1O("3o",d),28.8B(jJ*c5));d.7m=G(){1f{uz(jI)}1e(e){}};F d},ju:G(jH,1A){u m=B.J;u jG=m.2z.1w(m,m.1R(O,M,1));F B.1k.dm(jH).5Q(G(X){F jG()})}});B.1k.5O=G(){D.5S=[];D.4e=1m;D.id=D.7n()};B.1k.5O.1U={bX:B.1k.5O,uy:G(){d=Y B.1k.2t();if(D.4e){D.5S.1c(d)}N{D.4e=1h;d.3o(D)}F d},jF:G(){if(!D.4e){14 3p("ux to jF an jE 5O")}D.4e=1m;if(D.5S.K>0){D.4e=1h;D.5S.2P().3o(D)}},7n:B.J.4f(),U:G(){u 9t;if(D.4e){9t="4e, "+D.5S.K+" 5S"}N{9t="jE"}F"5O("+D.id+", "+9t+")"},1l:B.J.24("U")};B.1k.7i=G(2G,du,jC,jB,jD){D.2G=2G;D.9r=Y 7o(D.2G.K);D.55=[];D.id=D.7n();D.2H=-1;D.54=0;D.53=[O,O];D.7m=jD;D.7l=1m;if(D.2G.K===0&&!du){D.3o(D.9r)}D.dr=0;D.jz=du;D.jy=jC;D.jx=jB;u 9s=0;B.J.2r(B.J.1O(G(d){d.5Q(B.J.1O(D.dt,D),9s,1h);d.jA(B.J.1O(D.dt,D),9s,1m);9s+=1},D),D.2G)};B.J.2l(B.1k.7i.1U,B.1k.2t.1U);B.J.2l(B.1k.7i.1U,{dt:G(ds,7k,5R){D.9r[ds]=[7k,5R];D.dr+=1;if(D.2H!==0){if(7k&&D.jz){D.3o([ds,5R])}N{if(!7k&&D.jy){D.52(5R)}N{if(D.dr==D.2G.K){D.3o(D.9r)}}}}if(!7k&&D.jx){5R=O}F 5R}});B.1k.jt=G(jw){u d=Y B.1k.7i(jw,1m,1h,1m);d.5Q(G(dq){u 7j=[];R(u i=0;i=0){u 9m=Q.1S[Q.j4];7d.1c(1b);7c.1c((9m.3m)?9m.3m:9m.7X);F O}7d.1c(1b);7c.1c("");F O}if(4Y=="cu"||4Y=="P"||4Y=="8d"||4Y=="6m"){F Q.5h}7d.1c(1b);7c.1c(Q.3m||"");F O}F Q.5h});F[7d,7c]},94:G(1N,1A){u I=B.S;u d3=I.1Z;u W;1f{I.1Z=1N;W=1A()}1e(e){I.1Z=d3;14 e}I.1Z=d3;F W},j3:G(1b,j2,3y,j1){B.S.9b.5M(1b,j2,3y,j1)},9k:G(1j,7a){u im=B.15;u I=B.S;u 1Q=im.1Q;u iY=im.7b;u 4c=im.4c;u iX=I.9b;u iZ=I.9k;u iW=B.J.4d;1M(1h){if(H(1j)=="L"||1j===O){F O}if(H(1j.3T)!="L"&&1j.3T>0){F 1j}if(H(1j)=="2y"||H(1j)=="5L"){1j=1j.1l()}if(H(1j)=="1n"){F I.1Z.4S(1j)}if(H(1j.j0)=="G"){1j=1j.j0(7a);2V}if(H(1j)=="G"){1j=1j(7a);2V}u 9l=O;1f{9l=1Q(1j)}1e(e){}if(9l){F 4c(iZ,9l,iY(7a))}1f{1j=iX.3C(1j,7a);2V}1e(e){if(e!=iW){14 e}}F I.1Z.4S(1j.1l())}F L},iV:G(1j,79,iU){u o={};o[79]=iU;1f{F B.S.4X(1j,o)}1e(e){}F O},iT:G(1j,79){u I=B.S;u d2=I.4U.99[79];1j=I.1E(1j);1f{if(d2){F 1j[d2]}F 1j.fm(79)}1e(e){}F O},4X:G(1j,5K){u Q=1j;u I=B.S;if(H(1j)=="1n"){Q=I.1E(1j)}if(5K){u d0=B.J.8Z;if(I.4U.6X){R(u k in 5K){u v=5K[k];if(H(v)=="3n"&&H(Q[k])=="3n"){d0(Q[k],v)}N{if(k.2W(0,2)=="on"){if(H(v)=="1n"){v=Y cZ(v)}Q[k]=v}N{Q.4p(k,v)}}}}N{u iS=I.4U.99;R(k in 5K){v=5K[k];u d1=iS[k];if(k=="1T"&&H(v)=="1n"){Q.1T.3x=v}N{if(H(d1)=="1n"){Q[d1]=v}N{if(H(Q[k])=="3n"&&H(v)=="3n"){d0(Q[k],v)}N{if(k.2W(0,2)=="on"){if(H(v)=="1n"){v=Y cZ(v)}Q[k]=v}N{Q.4p(k,v)}}}}}}}F Q},9j:G(1j){u Q=1j;u I=B.S;if(H(1j)=="1n"){Q=I.1E(1j)}u 78=[I.9k(B.J.1R(O,M,1),Q)];u iR=B.J.2o;1M(78.K){u n=78.2P();if(H(n)=="L"||n===O){}N{if(H(n.3T)=="2y"){Q.2c(n)}N{78=iR(n,78)}}}F Q},iQ:G(1j){u Q=1j;u I=B.S;if(H(1j)=="1n"){Q=I.1E(1j);M[0]=Q}u cY;1M((cY=Q.6n)){Q.6S(cY)}if(M.K<2){F Q}N{F I.9j.1w(D,M)}},cX:G(1b,4b){u Q;u I=B.S;u m=B.J;if(H(4b)=="1n"||H(4b)=="2y"){u 3G=m.1R([1b,O],M,1);F M.2U.1w(D,3G)}if(H(1b)=="1n"){if(4b&&"1b"in 4b&&!I.4U.6X){1b=("<"+1b+" 1b=\\""+I.9c(4b.1b)+"\\">")}Q=I.1Z.2S(1b)}N{Q=1b}if(4b){I.4X(Q,4b)}if(M.K<=2){F Q}N{u 3G=m.1R([Q],M,2);F I.9j.1w(D,3G)}},cw:G(){u m=B.J;F m.2z.1w(D,m.1R([B.S.cX],M))},cs:G(5J,1d){u I=B.S;5J=I.1E(5J);u cW=5J.3t;if(1d){1d=I.1E(1d);cW.uj(1d,5J)}N{cW.6S(5J)}F 1d},1E:G(id){u I=B.S;if(M.K==1){F((H(id)=="1n")?I.1Z.hN(id):id)}N{F B.J.2r(I.1E,M)}},4q:G(iP,cV,cU){if(M.K==2){cU=cV}u I=B.S;u el=I.1E(iP);u 77=I.1Z;if(!el||el==77){F L}if(el.iO){F el.iO[cV]}if(H(77.5k)=="L"){F L}if(77.5k===O){F L}u 9i=77.5k.g4(el,O);if(H(9i)=="L"||9i===O){F L}F 9i.6q(cU)},aH:G(76,9g,4W){u I=B.S;if(H(76)=="L"||76===O){76="*"}if(H(4W)=="L"||4W===O){4W=I.1Z}4W=I.1E(4W);u 9h=(4W.fr(76)||I.1Z.1p);if(H(9g)=="L"||9g===O){F B.J.1R(O,9h)}u cR=[];R(u i=0;i<9h.K;i++){u cS=9h[i];u cT=cS.3M.2R(" ");R(u j=0;j/g,">")},iB:G(2q){F B.S.cG(2q).2b("")},cG:G(2q,1g){if(H(1g)=="L"||1g===O){1g=[]}u 70=[2q];u I=B.S;u cB=I.9c;u iA=I.4U;1M(70.K){2q=70.hP();if(H(2q)=="1n"){1g.1c(2q)}N{if(2q.3T==1){1g.1c("<"+2q.cD.8G());u 71=[];u cF=iA(2q);R(u i=0;i");70.1c("");u cC=2q.5h;R(i=cC.K-1;i>=0;i--){70.1c(cC[i])}}N{1g.1c("/>")}}N{if(2q.3T==3){1g.1c(cB(2q.iv))}}}}F 1g},97:G(ix,cA){u m=B.J;u iy=m.1R(O,M,1);B.15.9a(m.47(O,m.2r(B.S.1E,iy)),G(cA){cA.1T.3u=ix})},iw:G(1j,iu){u W=[];(G(1j){u cn=1j.5h;if(cn){R(u i=0;i0){u it=m.47;2T=G(1j){F it(2T.ir,1j.6Y)};2T.cx={};B.15.9a(6Z.6Y,G(a){2T.cx[a.1b]=a.3m});2T.ir=G(a){F(2T.cx[a.1b]!=a.3m)};2T.6X=1m;2T.99={"iq":"3M","ip":"ud","uc":"ub","R":"u9"}}N{2T=G(1j){F 1j.6Y};2T.6X=1h;2T.99={}}D.4U=2T;u 1C=D.cw;D.io=1C("ul");D.il=1C("ol");D.ik=1C("li");D.ij=1C("td");D.cm=1C("tr");D.ii=1C("u8");D.ih=1C("u7");D.ig=1C("u6");D.ie=1C("u5");D.ic=1C("th");D.cv=1C("ck");D.8d=1C("cj");D.A=1C("a");D.6m=1C("4u");D.ib=1C("u4");D.ia=1C("2e");D.i9=1C("tt");D.i8=1C("4O");D.i7=1C("h1");D.i6=1C("h2");D.i5=1C("h3");D.i4=1C("br");D.i3=1C("hr");D.i2=1C("u3");D.i1=1C("u2");D.cu=1C("u1");D.P=1C("p");D.ct=1C("u0");D.i0=1C("hJ");D.hZ=1C("tZ");D.hY=1C("tY");D.hX=1C("tX");D.hW=1C("tW");D.hV=1C("tV");D.hU=m.2z(D.97,"98");D.hT=m.2z(D.97,"8c");D.hS=D.cs;D.$=D.1E;D.2k={":3e":D.1z,":1p":m.2o(D.1z,D.1W)};m.3f(D)}});B.S.2d(((H(2O)=="L")?D:2O));if(!B.3d){95=B.S.95;94=B.S.94}B.J.2Y(D,B.S);if(H(1q)!="L"){1q.2X("B.1I");1q.2M("B.1H");1q.2M("B.J")}if(H(1x)!="L"){1x.26("B.1H",[]);1x.26("B.J",[])}1f{if(H(B.J)=="L"||H(B.1H)=="L"){14""}}1e(e){14"B.1I 3F on B.J 3W B.1H!"}if(H(B.1I)=="L"){B.1I={}}B.1I.1r="B.1I";B.1I.1Y="1.3.1";B.1I.1K=G(){F"["+D.1r+" "+D.1Y+"]"};B.1I.1l=G(){F D.1K()};B.1I.bY=G(6W){u m=B.1I;6W=!(!6W);if(m.3l&&m.3l.8Q!=6W){m.3l.hA();m.3l=O}if(!m.3l||m.3l.8P){m.3l=Y m.1I(6W,B.1H.2L)}F m.3l};B.1I.1I=G(4R,6V){if(H(6V)=="L"||6V===O){6V=B.1H.2L}D.2L=6V;u tU=B.J.2l;u c3=B.J.8Z;u 1O=B.J.1O;u hM=B.J.4L;u 2m=2O;u 6U="tT";if(H(B.S)!="L"){2m=B.S.cr()}if(!4R){u 5F=2m.tS.tR.2R("?")[0].23(/[:\\/.><&]/g,"hR");u 1b=6U+"hR"+5F;u 5D=2m.cp("",1b,"tQ,tP,3V=hQ");if(!5D){cq("tO tN to cp tM 2O tL to hP-up tK.");F L}5D.2v.fl(""+"<5E><8Y>[B.1I]"+"<5s>");5D.2v.hG();5D.2v.8Y+=" "+2m.2v.8Y;2m=5D}u 1N=2m.2v;D.1N=1N;u 21=1N.hN(6U);u c4=!!21;if(21&&H(21.5B)!="L"){21.5B.2L=D.2L;21.5B.6K();F 21.5B}if(c4){u cl;1M((cl=21.6n)){21.6S(cl)}}N{21=1N.2S("4u");21.id=6U}21.5B=D;u 8T=1N.2S("ck");u 8S=1N.2S("ck");u 6O=1N.2S("2e");u 6N=1N.2S("2e");u 6M=1N.2S("2e");u 6L=1N.2S("2e");u 3L=1N.2S("4u");u 42=1N.2S("4u");u 8U=6U+"tz";D.8N=hM(D.8N);u 4T=[];u 6R=O;u cf=G(1t){u 6T=1t.3N;if(H(6T)=="2y"){6T=B.1H.5C[6T]}F 6T};u cd=G(1t){F 1t.3z.2b(" ")};u ca=1O(G(1t){u 8W=cf(1t);u 7X=cd(1t);u c=D.8N[8W];u p=1N.2S("cj");p.3M="B-49 B-5C-"+8W;p.1T.3x="ty: 2N; 4F-8X: -hL-4O-3y; 4F-8X: -o-4O-3y; 4F-8X: 4O-3y; 4F-8X: 4O-tx; hK-3y: 2K-hK; 3y-hJ: tw; 3U: "+c;p.2c(1N.4S(8W+": "+7X));42.2c(p);42.2c(1N.2S("br"));if(3L.ci>3L.hI){3L.4C=0}N{3L.4C=3L.hI}},D);u hD=G(1t){4T[4T.K]=1t;ca(1t)};u hF=G(){u cg,ce;1f{cg=Y 8V(8T.3m);ce=Y 8V(8S.3m)}1e(e){ch("2x in 47 tv: "+e.43);F O}F G(1t){F(cg.hH(cf(1t))&&ce.hH(cd(1t)))}};u cc=G(){1M(42.6n){42.6S(42.6n)}};u hB=G(){4T=[];cc()};u bZ=1O(G(){if(D.8P){F}D.8P=1h;if(B.1I.3l==D){B.1I.3l=O}D.2L.c9(8U);21.5B=O;if(4R){21.3t.6S(21)}N{D.2m.hG()}},D);u c7=G(){cc();R(u i=0;i<4T.K;i++){u 1t=4T[i];if(6R===O||6R(1t)){ca(1t)}}};D.6K=G(){6R=hF();c7();D.2L.c9(8U);D.2L.hE(8U,6R,hD)};u c0=1O(G(){4T=D.2L.c8();c7()},D);u c2=1O(G(6Q){6Q=6Q||2O.6D;2h=6Q.6w||6Q.8t;if(2h==13){D.6K()}},D);u 31="3u: 8c; z-c6: c5; 2I: 2N; 6f: 2N; 6P: tu; 5A: 3k%; he-3U: 4F; c1: "+D.8O;if(4R){31+="; 3V: ts; 3E-3D: fO 8a 8y"}N{31+="; 3V: 3k%;"}21.1T.3x=31;if(!c4){1N.5s.2c(21)}31={"3x":"5A: 33%; 3u: 8Q; c1: "+D.8O};c3(8T,{"3m":"8L|8M|8K|8J|8I","hC":c2,"1T":31});21.2c(8T);c3(8S,{"3m":".*","hC":c2,"1T":31});21.2c(8S);31="5A: 8%; 3u:8Q; c1: "+D.8O;6O.2c(1N.4S("tq"));6O.8R=1O("6K",D);6O.1T.3x=31;21.2c(6O);6N.2c(1N.4S("tp"));6N.8R=c0;6N.1T.3x=31;21.2c(6N);6M.2c(1N.4S("tn"));6M.8R=hB;6M.1T.3x=31;21.2c(6M);6L.2c(1N.4S("tm"));6L.8R=bZ;6L.1T.3x=31;21.2c(6L);3L.1T.3x="fS: tk; 5A: 3k%";42.1T.3x="5A: 3k%; 3V: "+(4R?"tj":"3k%");3L.2c(42);21.2c(3L);D.6K();c0();if(4R){D.2m=L}N{D.2m=2m}D.8Q=4R;D.hA=bZ;D.8P=1m;F D};B.1I.1I.1U={"8O":"ti tg,tf-te","8N":{"8M":"1v","8L":"gU","8K":"1F","8J":"8y","8I":"bx"}};B.1I.1W=["1I"];B.1I.1z=["bY"];B.1I.2d=G(){D.2k={":3e":D.1z,":1p":B.J.2o(D.1z,D.1W)};B.J.3f(D);B.1I.3l=O};B.1I.2d();B.J.2Y(D,B.1I);if(H(1q)!="L"){1q.2X("B.V");1q.2M("B.J")}if(H(1x)!="L"){1x.26("B.J",[])}1f{if(H(B.J)=="L"){14""}}1e(e){14"B.V 3F on B.J"}if(H(B.V)=="L"){B.V={}}B.V.1r="B.V";B.V.1Y="1.3.1";B.V.1K=G(){F"["+D.1r+" "+D.1Y+"]"};B.V.1l=G(){F D.1K()};B.V.V=G(1v,hz,1F,6J){if(H(6J)=="L"||6J===O){6J=1}D.1B={r:1v,g:hz,b:1F,a:6J}};B.V.V.1U={bX:B.V.V,tc:G(hy){u 1B=D.1B;u m=B.V;F m.V.3Y(1B.r,1B.g,1B.b,hy)},tb:G(1o){u 1G=D.41();1G.h=1o;u m=B.V;F m.V.4H(1G)},ta:G(hx){u 1G=D.41();1G.s=hx;u m=B.V;F m.V.4H(1G)},t9:G(hw){u 1G=D.41();1G.l=hw;u m=B.V;F m.V.4H(1G)},t8:G(hv){u 1G=D.41();1G.l=28.29(1G.l-hv,0);u m=B.V;F m.V.4H(1G)},t7:G(hu){u 1G=D.41();1G.l=28.2a(1G.l+hu,1);u m=B.V;F m.V.4H(1G)},fJ:G(ht,5z){if(H(5z)=="L"||5z===O){5z=0.5}u sf=1-5z;u s=D.1B;u d=ht.1B;u df=5z;F B.V.V.3Y((s.r*sf)+(d.r*df),(s.g*sf)+(d.g*df),(s.b*sf)+(d.b*df),(s.a*sf)+(d.a*df))},h4:G(hs){u a=D.6r();u b=hs.6r();F B.J.2f([a.r,a.g,a.b,a.a],[b.r,b.g,b.b,b.a])},hq:G(){F D.41().b>0.5},t6:G(){F(!D.hq())},t5:G(){u c=D.41();u 2Z=B.V.6F;u W=D.ho;if(!W){u 5y=(2Z(c.h,bF).6I(0)+","+2Z(c.s,3k).hp(4)+"%"+","+2Z(c.l,3k).hp(4)+"%");u a=c.a;if(a>=1){a=1;W="1G("+5y+")"}N{if(a<=0){a=0}W="t4("+5y+","+a+")"}D.ho=W}F W},hl:G(){u c=D.1B;u 2Z=B.V.6F;u W=D.hn;if(!W){u 5y=(2Z(c.r,3h).6I(0)+","+2Z(c.g,3h).6I(0)+","+2Z(c.b,3h).6I(0));if(c.a!=1){W="t3("+5y+","+c.a+")"}N{W="1B("+5y+")"}D.hn=W}F W},6r:G(){F B.J.4L(D.1B)},t2:G(){u m=B.V;u c=D.1B;u 2Z=B.V.6F;u W=D.hm;if(!W){W=("#"+m.6E(2Z(c.r,3h))+m.6E(2Z(c.g,3h))+m.6E(2Z(c.b,3h)));D.hm=W}F W},t1:G(){u 2Q=D.2Q;u c=D.1B;if(H(2Q)=="L"||2Q===O){2Q=B.V.bA(D.1B);D.2Q=2Q}F B.J.4L(2Q)},41:G(){u 1G=D.1G;u c=D.1B;if(H(1G)=="L"||1G===O){1G=B.V.bC(D.1B);D.1G=1G}F B.J.4L(1G)},1l:G(){F D.hl()},U:G(){u c=D.1B;u hk=[c.r,c.g,c.b,c.a];F D.bX.1r+"("+hk.2b(", ")+")"}};B.J.2l(B.V.V,{3Y:G(1v,bW,1F,8H){u hj=B.V.V;if(M.K==1){u 1B=1v;1v=1B.r;bW=1B.g;1F=1B.b;if(H(1B.a)=="L"){8H=L}N{8H=1B.a}}F Y hj(1v,bW,1F,8H)},4H:G(1o,t0,sZ,sY){u m=B.V;F m.V.3Y(m.bB.1w(m,M))},sX:G(1o,sW,sV,sU){u m=B.V;F m.V.3Y(m.bz.1w(m,M))},hi:G(1b){u 8F=B.V.V;if(1b.3Z(0)=="\\""){1b=1b.3H(1,1b.K-2)}u bV=8F.by[1b.8G()];if(H(bV)=="1n"){F 8F.bT(bV)}N{if(1b=="aP"){F 8F.sT()}}F O},8f:G(4Q){u I=B.V.V;u bU=4Q.3H(0,3);if(bU=="1B"){F I.h9(4Q)}N{if(bU=="1G"){F I.h8(4Q)}N{if(4Q.3Z(0)=="#"){F I.bT(4Q)}}}F I.hi(4Q)},bT:G(4P){if(4P.3Z(0)=="#"){4P=4P.2W(1)}u 8E=[];u i,5x;if(4P.K==3){R(i=0;i<3;i++){5x=4P.3H(i,1);8E.1c(3w(5x+5x,16)/3h)}}N{R(i=0;i<6;i+=2){5x=4P.3H(i,2);8E.1c(3w(5x,16)/3h)}}u bS=B.V.V;F bS.3Y.1w(bS,8E)},bG:G(4O,hf,hg,4N){if(4N.2A(4O)===0){4N=4N.2W(4N.2A("(",3)+1,4N.K-1)}u bR=4N.2R(/\\s*,\\s*/);u bP=[];R(u i=0;i0){F 8D}}F O},ba:G(Q){u 2F=B.V.V;F 2F.bN(Q,"aZ","he-3U")||2F.sN()},sM:G(Q){u 2F=B.V.V;F 2F.bN(Q,"3U","3U")||2F.sL()},sK:G(){F B.J.4L(B.V.V.by)}});B.J.2l(B.V,{6F:G(v,8C){v*=8C;if(v<0){F 0}N{if(v>8C){F 8C}N{F v}}},hc:G(n1,n2,1o){if(1o>6){1o-=6}N{if(1o<0){1o+=6}}u 2i;if(1o<1){2i=n1+(n2-n1)*1o}N{if(1o<3){2i=n2}N{if(1o<4){2i=n1+(n2-n1)*(4-1o)}N{2i=n1}}}F 2i},bz:G(1o,5w,3i,bM){if(M.K==1){u 2Q=1o;1o=2Q.h;5w=2Q.s;3i=2Q.v;bM=2Q.a}u 1v;u 3K;u 1F;if(5w===0){1v=0;3K=0;1F=0}N{u i=28.8B(1o*6);u f=(1o*6)-i;u p=3i*(1-5w);u q=3i*(1-(5w*f));u t=3i*(1-(5w*(1-f)));hd(i){3j 1:1v=q;3K=3i;1F=p;2K;3j 2:1v=p;3K=3i;1F=t;2K;3j 3:1v=p;3K=q;1F=3i;2K;3j 4:1v=t;3K=p;1F=3i;2K;3j 5:1v=3i;3K=p;1F=q;2K;3j 6:3j 0:1v=3i;3K=t;1F=p;2K}}F{r:1v,g:3K,b:1F,a:bM}},bB:G(1o,5v,3v,bL){if(M.K==1){u 1G=1o;1o=1G.h;5v=1G.s;3v=1G.l;bL=1G.a}u 1v;u 8A;u 1F;if(5v===0){1v=3v;8A=3v;1F=3v}N{u m2;if(3v<=0.5){m2=3v*(1+5v)}N{m2=3v+5v-(3v*5v)}u m1=(2*3v)-m2;u f=B.V.hc;u h6=1o*6;1v=f(m1,m2,h6+2);8A=f(m1,m2,h6);1F=f(m1,m2,h6-2)}F{r:1v,g:8A,b:1F,a:bL}},bA:G(1v,4K,1F,bK){if(M.K==1){u 1B=1v;1v=1B.r;4K=1B.g;1F=1B.b;bK=1B.a}u 29=28.29(28.29(1v,4K),1F);u 2a=28.2a(28.2a(1v,4K),1F);u 1o;u 8z;u hb=29;if(2a==29){1o=0;8z=0}N{u 6H=(29-2a);8z=6H/29;if(1v==29){1o=(4K-1F)/6H}N{if(4K==29){1o=2+((1F-1v)/6H)}N{1o=4+((1v-4K)/6H)}}1o/=6;if(1o<0){1o+=1}if(1o>1){1o-=1}}F{h:1o,s:8z,v:hb,a:bK}},bC:G(1v,4J,1F,bI){if(M.K==1){u 1B=1v;1v=1B.r;4J=1B.g;1F=1B.b;bI=1B.a}u 29=28.29(1v,28.29(4J,1F));u 2a=28.2a(1v,28.2a(4J,1F));u 1o;u 6G;u bJ=(29+2a)/2;u 4I=29-2a;if(4I===0){1o=0;6G=0}N{if(bJ<=0.5){6G=4I/(29+2a)}N{6G=4I/(2-29-2a)}if(1v==29){1o=(4J-1F)/4I}N{if(4J==29){1o=2+((1F-1v)/4I)}N{1o=4+((1v-4J)/4I)}}1o/=6;if(1o<0){1o+=1}if(1o>1){1o-=1}}F{h:1o,s:6G,l:bJ,a:bI}},6E:G(1P){1P=28.ha(1P);u bH=1P.1l(16);if(1P<16){F"0"+bH}F bH},2d:G(){u m=B.J;D.V.h9=m.1O(D.V.bG,D.V,"1B","3Y",[1/3h,1/3h,1/3h,1]);D.V.h8=m.1O(D.V.bG,D.V,"1G","4H",[1/bF,0.bE,0.bE,1]);u 4G=1/3;u bD={8y:[0,0,0],1F:[0,0,1],gY:[0.6,0.4,0.2],gX:[0,1,1],sJ:[4G,4G,4G],gR:[0.5,0.5,0.5],bx:[0,1,0],sI:[2*4G,2*4G,2*4G],gN:[1,0,1],gL:[1,0.5,0],gK:[0.5,0,0.5],1v:[1,0,0],aP:[0,0,0,0],4F:[1,1,1],gI:[1,1,0]};u h7=G(1b,r,g,b,a){u W=D.3Y(r,g,b,a);D[1b]=G(){F W};F W};R(u k in bD){u 1b=k+"V";u h5=m.2o([h7,D.V,1b],bD[k]);D.V[1b]=m.1O.1w(O,h5)}u h0=G(){R(u i=0;i1){u 1d=B.S.1E(M[0]);u 2D=M[1];u 1i=M[2];u 1A=M[3];R(u i=5o.K-1;i>=0;i--){u o=5o[i];if(o[0]===1d&&o[1]===2D&&o[4]===1i&&o[5]===1A){I.6t(o);5o.4y(i,1);F 1h}}}N{u 5n=m.bi(5o,bh);if(5n>=0){I.6t(bh);5o.4y(5n,1);F 1h}}F 1m},8i:G(1d,2D){1d=B.S.1E(1d);u m=B.J;u 8l=m.bg(m.1R(O,M,1));u I=B.1u;u bd=I.6t;u 4z=I.4x;if(8l.K===0){R(u i=4z.K-1;i>=0;i--){u 4A=4z[i];if(4A[0]===1d){bd(4A);4z.4y(i,1)}}}N{u bf={};R(u i=0;i<8l.K;i++){bf[8l[i]]=1h}R(u i=4z.K-1;i>=0;i--){u 4A=4z[i];if(4A[0]===1d&&4A[1]in bf){bd(4A);4z.4y(i,1)}}}},8h:G(1d,2D){u bc=B.1u.4x;1d=B.S.1E(1d);u 3G=B.J.1R(O,M,2);u 5m=[];R(u i=0;i1){u e=Y 2x("mZ bb mY in mX \'2D\', mW bb mV");e.bb=5m;14 e}}}});B.1u.1W=[];B.1u.1z=["6s","8j","8h","8i"];B.1u.2d=G(2m){u m=B.J;D.1Z=2v;D.3X=2m;1f{D.6s(2O,"g8",D.g7)}1e(e){}D.2k={":3e":D.1z,":1p":m.2o(D.1z,D.1W)};m.3f(D)};B.1u.2d(D);if(!B.3d){6s=B.1u.6s;8j=B.1u.8j;8i=B.1u.8i;8h=B.1u.8h}B.J.2Y(D,B.1u);if(H(1q)!="L"){1q.2X("B.1X");1q.2M("B.J");1q.2M("B.S");1q.2M("B.V")}if(H(1x)!="L"){1x.26("B.J",[]);1x.26("B.S",[]);1x.26("B.V",[])}1f{if(H(B.J)=="L"||H(B.S)=="L"||H(B.V)=="L"){14""}}1e(e){14"B.1X 3F on B.J, B.S 3W B.V!"}if(H(B.1X)=="L"){B.1X={}}B.1X.1r="B.1X";B.1X.1Y="1.3.1";B.1X.1K=G(){F"["+D.1r+" "+D.1Y+"]"};B.1X.1l=G(){F D.1K()};B.1X.aI=G(e,g6){e=B.S.1E(e);D.fN(g6);if(D.1S.fL){e=D.g5(e)}u 4w=D.1S.3U;u C=B.V.V;if(D.1S.3U=="aW"){4w=C.ba(e)}N{if(!(4w 2C C)){4w=C.8f(4w)}}D.82=(4w.6r().a<=0);u 5l=D.1S.aV;if(D.1S.aV=="fM"){5l=C.ba(e.8g)}N{if(!(5l 2C C)){5l=C.8f(5l)}}D.g3(e,4w,5l)};B.1X.aI.1U={g5:G(e){u mU=e.3t;u 1N=B.S.b9();if(H(1N.5k)=="L"||1N.5k===O){F e}u 4v=1N.5k.g4(e,O);if(H(4v)=="L"||4v===O){F e}u b8=B.S.6m({"1T":{3u:"8c",mT:4v.6q("6p-3D"),85:4v.6q("6p-3g"),mS:4v.6q("6p-6f"),86:4v.6q("6p-2I"),6p:"2N"}});b8.6o=e.6o;e.6o="";e.2c(b8);F e},g3:G(e,b7,8e){if(D.1S.3E){D.g2(e,8e)}if(D.fy()){D.fX(e,b7,8e)}if(D.fx()){D.fV(e,b7,8e)}},g2:G(el,g1){u b6="6l 8a "+D.aQ(g1);u g0="3E-2I: "+b6;u fZ="3E-3g: "+b6;u fY="1T=\'"+g0+";"+fZ+"\'";el.6o="<4u "+fY+">"+el.6o+""},fX:G(el,fW,b5){u b4=D.b1(b5);R(u i=0;i=0;i--){b2.2c(D.b0(fU,b3,i,"6f"))}el.1T.mP=0;el.2c(b2)},b1:G(fT){u 2q=B.S;F 2q.6m({1T:{aZ:fT.1l()}})},b0:G(aY,fQ,n,aX){u 6k=B.S.8d();u 2p=6k.1T;2p.aZ=aY.1l();2p.3u="8c";2p.3V="6l";2p.fS="fR";2p.mO="6l";u 8b=D.aQ(aY,fQ);if(D.1S.3E&&n===0){2p.mN="8a";2p.mM="6l";2p.84="2N";2p.83="2N";2p.mL="2N";2p.3V="2N";2p.fP=8b.1l()}N{if(8b){2p.fP=8b.1l();2p.mK="8a";2p.mJ="2N 6l"}}if(!D.1S.4r&&(n==(D.1S.89-1))){2p.3V="fO"}D.fI(6k,n,aX);D.fG(6k,n,aX);F 6k},fN:G(fK){D.1S={6g:"1p",3U:"aW",aV:"fM",5j:1h,3E:1m,4r:1m,fL:1m};B.J.2l(D.1S,fK);D.1S.89=(D.1S.4r?2:4)},aL:G(){u 88=D.1S.6g;if(D.6h(88,"1p","3D")){F""}u aU=(88.2A("tl")!=-1);u aT=(88.2A("tr")!=-1);if(aU&&aT){F""}if(aU){F"2I"}if(aT){F"3g"}F""},aK:G(){u 87=D.1S.6g;if(D.6h(87,"1p","6f")){F""}u aS=(87.2A("bl")!=-1);u aR=(87.2A("br")!=-1);if(aS&&aR){F""}if(aS){F"2I"}if(aR){F"3g"}F""},aQ:G(aN,aO){if(aN=="aP"){F aO}N{if(D.1S.3E){F D.1S.3E}N{if(D.1S.5j){F aO.fJ(aN)}}}F""},fI:G(el,n,fH){u 6j=D.fE(n)+"px";u aM=(fH=="3D"?D.aL():D.aK());u 4t=el.1T;if(aM=="2I"){4t.86=6j;4t.85="2N"}N{if(aM=="3g"){4t.85=6j;4t.86="2N"}N{4t.86=6j;4t.85=6j}}},fG:G(el,n,fF){u 6i=D.fz(n)+"px";u aJ=(fF=="3D"?D.aL():D.aK());u 4s=el.1T;if(aJ=="2I"){4s.84=6i;4s.83="2N"}N{if(aJ=="3g"){4s.83=6i;4s.84="2N"}N{4s.84=6i;4s.83=6i}}},fE:G(n){if(D.82){F 0}u o=D.1S;if(o.4r&&o.5j){u fD=[1,0];F fD[n]}N{if(o.4r){u fC=[2,1];F fC[n]}N{if(o.5j){u fB=[3,2,1,0];F fB[n]}N{u fA=[5,3,2,1];F fA[n]}}}},fz:G(n){u o=D.1S;u 5i;if(o.4r&&(o.5j||D.82)){F 1}N{if(o.4r){5i=[1,0]}N{if(o.5j){5i=[2,1,1,1]}N{if(o.3E){5i=[0,2,0,0]}N{if(D.82){5i=[5,3,2,1]}N{F 0}}}}}F 5i[n]},6h:G(1y){R(u i=1;i")}}})()}',62,1976,'||||||||||||||||||||||||||||||var|||||||MochiKit||this||return|function|typeof|self|Base|length|undefined|arguments|else|null||elem|for|DOM||repr|Color|rval|res|new||||||throw|Iter|||||next|name|push|src|catch|try|lst|true|obj|node|Async|toString|false|string|hue|all|dojo|NAME|Format|msg|Signal|red|apply|JSAN|str|EXPORT|func|rgb|_425|DateTime|getElement|blue|hsl|Logging|LoggingPane|type|__repr__|_event|while|doc|bind|num|iter|extend|options|style|prototype|seq|EXPORT_OK|Visual|VERSION|_document||_434||replace|forwardCall|StopIteration|use||Math|max|min|join|appendChild|__new__|button|compare|date|key|val|_329|EXPORT_TAGS|update|win|pair|concat|_596|dom|map|req|Deferred|sync|document|base|Error|number|partial|indexOf||instanceof|sig|not|cls|list|fired|left|stop|break|logger|require|0px|window|shift|hsv|split|createElement|_423|callee|continue|substring|provide|_exportSymbols|ccc||_464|||||||||step|pred|_51|__compat__|common|nameFunctions|right|255|_517|case|100|_loggingPane|value|object|callback|TypeError|_251|_246|_113|parentNode|display|_522|parseInt|cssText|wrap|info|isArrayLike|end|match|top|border|depends|args|substr|mouse|code|_519|_443|className|level|err|frac|Date|_135|_85|nodeType|color|height|and|_window|fromRGB|charAt||asHSL|_444|message||||filter||LogMessage|AdapterRegistry|_366|imap|NotFound|locked|counter|_262|_messages|operator|cmp|_165|_161|pairs|arr|_52|setAttribute|computedStyle|compact|_614|_610|div|_576|_572|_observers|splice|_565|_566|_555|scrollTop|page|modifier|white|_541|fromHSL|_539|_535|_528|clone|parseFloat|_505|pre|_499|_497|_427|createTextNode|_446|attributeArray|_388|_379|updateNodeAttributes|_341|_326||box|errback|results|paused|chain|_285||ofs||NamedError|_175|_147|_122|_83|_54|_17|childNodes|_619|blend|defaultView|_574|_569|idx|_562|must|_554|_specialKeys|body|Coordinates|registerComparator|_521|_516|hex|mid|_478|width|loggingPane|LogLevel|nwin|head|url|setElementClass|callStack|path|dest|_359|boolean|register|Dimensions|DeferredLock|_313|addCallback|_310|waiting|onreadystatechange|_290|LOCALE|year|printfire|_214|log|_213|_211|pos|_155|_153||typeMatcher|listMinMax|_114|_40|itr|typ|_19|_634|_625|bottom|corners|_hasString|_612|_608|_595|1px|DIV|firstChild|innerHTML|padding|getPropertyValue|asRGB|connect|_disconnect|_559|middle|which|clientY|scrollLeft|clientX|client|charCode|relatedTarget|event|toColorPart|clampColorComponent|_537|_534|toFixed|_468|buildAndApplyFilter|_442|_441|_440|_439|position|_463|_447|removeChild|_449|uid|_428|_426|compliant|attributes|_422|_409|_412|_400|_395|_390|_389|_377|_375|_363|attr|ctx|repeat|_340|_339|isNotEmpty|_335|_333|opera|DeferredList|ret|_309|silentlyCancelled|canceller|_nextId|Array|_293|XMLHttpRequest|chained|_281|tail|_252|_225|msec|day|month|iso|Logger|_208|listeners|_200|_198|_194|_196|reduce|range|_169|_162|truth|registerRepr|_121|_70|_58|_56|_47|_45|_41|_13|_1|script|text|uri|documentElement|_630|_629|isTransparent|borderRightWidth|borderLeftWidth|marginRight|marginLeft|_602|_599|numSlices|solid|_597|block|SPAN|_579|fromString|offsetParent|signal|disconnectAll|disconnect|_570|_563|_557|preventDefault|stopPropagation|clientTop|clientLeft|pageY|pageX|keyCode|meta|ctrl|alt|target|black|_532|_524|floor|_513|_512|_500|_495|toLowerCase|_487|DEBUG|INFO|WARNING|FATAL|ERROR|colorTable|logFont|closed|inline|onclick|_438|_437|_445|RegExp|_452|space|title|updatetree|||||withDocument|withWindow||setDisplayForElement|none|renames|forEach|domConverters|escapeHTML|addElementClass|removeElementClass|once|_378|_380|_376|appendChildNodes|coerceToDOM|_355|opt|clientWidth|opacity|GenericError|fail|resultList|_307|_301|_fire|can|addCallbacks|_resback|percent|decimal|separator|twoDigitFloat|_274|_273|_264|_257|_250|_249|_254|_248|_243|_242|fmt|_240|_245|getTime|sec|hour|_209|slice|_206|iterateNextIter|registerIteratorFactory|arrayLikeIter|iteratorRegistry|takewhile|ifilterfalse|ifilter|_181|_176|_168|_166|_159|_tee|deque|arg|fun|jsonRegistry|reprString|reprRegistry|comparatorRegistry|urlEncode|_110|_108|cur|_95|_87|_71|im_preargs||_53|_57|_46|present|like|array|Argument|_15|_12|_632|_631|_633|SUBMODULES|only|_628|_627|_626|roundElement|_624|getElementsByTagAndClassName|_RoundCorners|_613|_whichSideBottom|_whichSideTop|_609|_605|_606|transparent|_borderColor|_604|_603|_601|_600|bgColor|fromElement|_594|_592|backgroundColor|_createCornerSlice|_createCorner|_590|_589|_587|_586|_581|_578|_577|currentDocument|fromBackground|errors|_568|_564||sigs|flattenArguments|_561|findIdentical|_560|_558||_556|attachEvent|addEventListener|funcOrStr|Event||_548|fromCharCode|String|_specialMacKeys|any|green|_namedColors|hsvToRGB|rgbToHSV|hslToRGB|rgbToHSL|_542|01|360|_fromColorString|_540|_536|_538|_529|_523|_518|fromComputedStyle|_511|_507|_508|_506|_501|fromHexString|_498|_496|_486|__class__|createLoggingPane|_459|_461|font|_462|_430|_435|1000|index|_460|getMessages|removeListener|_451||_457|_450|infore|_448|_456|logDebug|offsetHeight|span|input|_436|TR||HTML|open|alert|currentWindow|swapDOM|SELECT|FORM|INPUT|createDOMFunc|ignoreAttr|_421|call|_417|_410|_415|nodeName|_414|_413|emitHTML|good|_406|_399|_397|_393|_392|addLoadEvent|addToCallStack|_387|_386|_381|_382|_383|_373|_372|_369|createDOM|_365|Function|_360|_362|_358|_344|nodeWalk|formContents|_337|_338|_334|_332|offsetTop|offsetLeft|visibility|parentElement|||XMLHttpRequestError|BrowserComplianceError|CancelledError|AlreadyCalledError|evalJSONRequest|sendXMLHttpRequest|wait|doSimpleXMLHttpRequest|getXMLHttpRequest|succeed|_312|finishedCount|_308|_cbDeferred|_303|_297|queryString|_nothing|_289|XMLHTTP|ActiveXObject|eval|_284|_check|error|_279|default|rstrip|lstrip|formatLocale|roundToFixed|truncToFixed|_276|pow|_272|_271|_270|sign|_265|_263|tmp|_238|_232|toISODate|toISOTime|getFullYear|getDate|getMonth|_230|_padTwo|_228|useNativeConsole|_212|compareLogMessage|isLogMessage|unshift|_207||maxSize|_202|_199|logLevelAtLeast|console|hasIterateNext|iterateNext|arrayLike|groupby||exhaust|tee|dropwhile|applymap||islice|izip|cycle|count||_189|_188|_183|_185|_184|_186|_187|_182|identity|fetch|_180|_177|listMin|reprNumber|reprArrayLike|compareArrayLike|compareDateLike|isDateLike|findValue|_128|__export__|keyComparator|_124|_118|_93|_94|_90|_88|_84|_77|_68|_67|_66|_65|_60|im_func|_55|im_self|_48|_44|_42|_39|_36|_33|_27|_26|_25|_22|_24|_20|javascript|write|getAttribute||org|www|http|getElementsByTagName|roundClass|_623|_622|_621|_620|_isBottomRounded|_isTopRounded|_borderSize|_618|_617|_616|_615|_marginSize|_611|_setBorder|_607|_setMargin|blendedColor|_598|__unstable__wrapElement|fromParent|_setOptions|2px|borderColor|_593|hidden|overflow|_591|_588|_roundBottomCorners|_585|_roundTopCorners|_584|_583|_582|_580|_renderBorder|_roundCornersImpl|getComputedStyle|_doWrap|_571|_unloadCache|onunload|detachEvent|removeEventListener|_listener|objOrFunc|_552||_551|_549|onload|delete|112|KEY_F|KEY_|MINUS|KEY_SEMICOLON|KEY_DELETE|KEY_INSERT|KEY_ARROW_DOWN|KEY_ARROW_RIGHT|KEY_ARROW_UP||KEY_ARROW_LEFT|KEY_HOME|KEY_END|KEY_PAGE_DOWN|KEY_PAGE_UP|KEY_ENTER|KEY_NUM_PAD_CLEAR|63236|mousemove|contextmenu|click|mouseout|mouseover|_src|yellow|708090|purple|orange|ff00ff|magenta|778899|d3d3d3|808080|gray|696969|2f4f4f|darkred|a9a9a9|00ffff|cyan|brown|_547|_546||||compareRGB|_545||_543|fromHSLString|fromRGBString|round|_533|_hslValue|switch|background|_503|_504||fromName|_488|col|toRGBString|_hexString|_rgbString|_hslString|toPrecision|isLight||_481|_477|_476|_475|_474|_473|_469|_466|closePane|_458|onkeypress|_454|addListener|_455|close|test|scrollHeight|option|word|moz|_431|getElementById|html|pop|200|_|removeElement|showElement|hideElement|CANVAS|STRONG|FIELDSET|LEGEND|OPTGROUP|OPTION|TEXTAREA|LABEL|HR|BR|H3|H2|H1|PRE|TT|BUTTON|IMG|TH||TABLE||TFOOT|THEAD|TBODY|TD|LI|OL|||UL|checked|class|ignoreAttrFilter||_424|_419|nodeValue|scrapeText|_416|_418|sort|_411|toHTML|_404|hasElementClass|_403|_402|_401|swapElementClass|_398|_394|toggleElementClass|_391|focusOnLoad|_newCallStack|currentStyle|_371|replaceChildNodes|_364|_361|getNodeAttribute|_357|setNodeAttribute|_354|_352|_350|_353|toDOM|_346|_345|registerDOMConverter|selectedIndex|setElementPosition|setElementDimensions|tagName|absolute|getBoxObjectFor|getBoundingClientRect|elementPosition|_325|_324|_322|_323|offsetWidth|elementDimensions|clientHeight|innerWidth|getViewportDimensions|setOpacity|status|_317|deferred|_316|_newNamedError|maybeDeferred||gatherResults|callLater|loadJSONDoc|_311|consumeErrors|fireOnOneErrback|fireOnOneCallback|addErrback|_305|_304|_306|unlocked|release|_300|_299|_298|_296|_xhr_onreadystatechange|_xhr_canceller|304|responseText|Msxml2|addBoth|_pause|_continue|result|the|are|they|instances|_unpause|cancel|_280|_278|en_US|strip|percentFormat|twoDigitAverage|numberFormatter|_277|_275|isNaN|_259|_258|_260|_255|_253|_numberFormatter|_241|_239|_237|_236|_235|_234|_233|_231|toAmericanDate|toPaddedAmericanDate|americanDate|toISOTimestamp|isoTimestamp|isoDate|foot|sep||60000|_221|_isoRegexp|dispatchEvent|createEvent|warning|logWarning|fatal|logFatal|debug|logError|baseLog|_210|getMessageText|logToConsole|dispatchListeners|_204|_203|ident|_201|postError|alertListener|_197|_192|groupby_as_array|iextend|some|reversed|sorted|every|sum|_190|eat|_174|_173|_172|_171|_167|_163|_158|_157|_151|_144|_141||_139|_136|_134||_133|_132|zip|merge|isUndefined|isCallable|listMax|_131|_130|encodeURIComponent||_127|method|parseQueryString|evalJSON|registerJSON|serializeJSON|objMin|objMax|reverseKeyComparator|arrayEqual|objEqual|bindMethods|xfilter|xmap|isEmpty|isNull|isUndefinedOrNull|itemgetter|items|keys|setdefault|_126|_120|decodeURIComponent|_119|len|_109|_107|_104|_105|_101|_102|_98|||_100|_97|_96|_91|json|__json__|_82|_81|_80|_79|_76||_75|_74|_73|_69|_primitives|_64|_63||_62|_61|_59|_wrapDumbFunction|_49|_50|_31|_30|_21|_7|application|MochiKit_|createElementNS|namespaceURI|lastIndexOf|xul|there|gatekeeper|keymaster|mozilla|getElementsComputedStyle|_hasSingleTextChild|borderWidth|borderStyle|borderBottomWidth|borderTopWidth|borderTopStyle|fontSize|paddingBottom|insertBefore|paddingTop|marginBottom|marginTop|_575|property|see|handling|thrown|Multiple|element|||given|123|KEY_NUM_PAD_|105|KEY_APOSTROPHE|222|KEY_RIGHT_SQUARE_BRACKET|221|KEY_REVERSE_SOLIDUS|220|KEY_LEFT_SQUARE_BRACKET||219|KEY_GRAVE_ACCENT|192|KEY_SOLIDUS|191|KEY_FULL_STOP|190|KEY_HYPHEN|189||KEY_COMMA|188|KEY_EQUALS_SIGN|187|186|KEY_SCROLL_LOCK|145|KEY_NUM_LOCK|144|KEY_NUM_PAD_SOLIDUS|111|KEY_NUM_PAD_FULL_STOP|110|KEY_NUM_PAD_HYPHEN|109|KEY_NUM_PAD_PLUS_SIGN|107|KEY_NUM_PAD_ASTERISK|106|KEY_SELECT|KEY_WINDOWS_RIGHT|KEY_WINDOWS_LEFT|KEY_PRINT_SCREEN|KEY_SPACEBAR|KEY_ESCAPE|KEY_CAPS_LOCK|KEY_PAUSE|KEY_ALT|KEY_CTRL|KEY_SHIFT|KEY_TAB|KEY_BACKSPACE|63242|63272|63302|63233|63235|63232|63234|63273|63275|63277|63276|63289|returnValue|cancelBubble|keypress|KEY_UNKNOWN|keyup|keydown|shiftKey|metaKey||ctrlKey|altKey|toElement|srcElement|9acd32||yellowgreen||ffff00|f5f5f5|whitesmoke||ffffff|f5deb3|wheat|ee82ee|violet|40e0d0|turquoise|ff6347|tomato|d8bfd8|thistle|008080|teal|d2b48c|tan|4682b4|steelblue|00ff7f|springgreen|fffafa|snow|slategrey|slategray|6a5acd|slateblue|87ceeb|skyblue|c0c0c0|silver|a0522d|sienna|fff5ee|seashell|2e8b57|seagreen|f4a460|sandybrown|fa8072|salmon|8b4513|saddlebrown|4169e1|royalblue|bc8f8f|rosybrown|ff0000|800080|b0e0e6|powderblue|dda0dd|plum|ffc0cb|pink|cd853f||peru|ffdab9|peachpuff|ffefd5|papayawhip|db7093|palevioletred|afeeee|paleturquoise|98fb98|palegreen|eee8aa||palegoldenrod|da70d6|orchid|ff4500|orangered|ffa500|6b8e23|olivedrab|808000|olive|fdf5e6|oldlace|000080|navy|ffdead|navajowhite|ffe4b5|moccasin|ffe4e1|mistyrose|f5fffa|mintcream|191970|midnightblue|c71585|mediumvioletred|48d1cc|mediumturquoise|00fa9a|mediumspringgreen|7b68ee|mediumslateblue|3cb371|mediumseagreen|9370db|mediumpurple|ba55d3|mediumorchid|0000cd|mediumblue|66cdaa|mediumaquamarine|800000|maroon|faf0e6|linen|32cd32|limegreen|00ff00|lime|ffffe0|lightyellow|b0c4de|lightsteelblue|lightslategrey|lightslategray||87cefa|lightskyblue|20b2aa|lightseagreen|ffa07a|lightsalmon|ffb6c1|lightpink|lightgrey|90ee90|lightgreen|lightgray|fafad2|lightgoldenrodyellow|e0ffff|lightcyan|f08080|lightcoral|add8e6|lightblue|fffacd|lemonchiffon|7cfc00|lawngreen|fff0f5|lavenderblush|e6e6fa|lavender|f0e68c|khaki|fffff0|ivory|4b0082|indigo|cd5c5c|indianred|ff69b4|hotpink|f0fff0|honeydew|grey|adff2f|greenyellow|008000|daa520|goldenrod|ffd700||gold|f8f8ff|ghostwhite|dcdcdc|gainsboro|fuchsia|228b22|forestgreen|fffaf0|floralwhite|b22222|firebrick|1e90ff|dodgerblue|dimgrey|dimgray|00bfff|deepskyblue|ff1493|deeppink|9400d3|darkviolet|00ced1|darkturquoise|darkslategrey|darkslategray|483d8b|darkslateblue|8fbc8f|darkseagreen|e9967a|darksalmon|8b0000|9932cc|darkorchid|ff8c00|darkorange|556b2f|darkolivegreen|8b008b|darkmagenta|bdb76b|darkkhaki|darkgrey|006400|darkgreen|darkgray|b8860b|darkgoldenrod|008b8b|darkcyan|00008b|darkblue|dc143c|crimson|fff8dc|cornsilk|6495ed|cornflowerblue|ff7f50|coral|d2691e||chocolate|7fff00|chartreuse|5f9ea0|cadetblue|deb887|burlywood|a52a2a|8a2be2|blueviolet|0000ff|ffebcd||blanchedalmond|000000|ffe4c4|bisque|f5f5dc|beige|f0ffff|azure|7fffd4|aquamarine|aqua|faebd7|antiquewhite|f0f8ff|aliceblue|lightGray|darkGray|namedColors|blackColor|fromText|whiteColor|_510|_509|PI|rad|deg|transparentColor|_494|_493|_492|fromHSV|_491|_490|_489|asHSV|toHexString|rgba|hsla|toHSLString|isDark|lighterColorWithLevel|darkerColorWithLevel|colorWithLightness|colorWithSaturation|colorWithHue|colorWithAlpha||serif|sans|Verdana||8pt|8em|auto||Close|Clear||Load|Filter||10em||fixed|regex|emergency|line|margin|_Listener|dtd|loose|html4|w3|EN|Transitional|DTD|W3C|PUBLIC|DOCTYPE|blocking|due|debugging|able|Not|resizable|dependent|href|location|_MochiKit_LoggingPane|_429|canvas|strong|fieldset|legend|optgroup|select|form|textarea|label|img|table|tfoot|thead|tbody|htmlFor||useMap|usemap|defaultChecked|hasChildNodes|quot|amp|_405|focus|replaceChild|checkbox||radio|_win|BODY||safari|version|userAgent|navigator|innerHeight|alpha|khtml|Tried|acquire|clearTimeout|setTimeout|GET|ignore|send|abort|failed|Request|readyState|support|does|Browser|Microsoft|_288|_287|used|Deferreds|Chained|success|unfired|fr_FR|de_DE|00|abs|search|pattern|Invalid|getTimezoneOffset|getSeconds|getMinutes|getHours|UTC|3600000|initEvent|Events|debuggingBookmarklet|MESSAGES|LAST|_205|clear|ninfo|nlevel|timestamp|reverse|takes|initial|with|sequence|empty|iterable|numbers|dateLike|escape|find|forward|unregister|unescape|Object|compared|item|contains|logor|logand|cle|clt|cge|cgt|cne|ceq|zrshift|rshift|lshift|xor|mul|mod|sub|add|neg|lognot|_9|_2'.split('|'),0,{}) + + +/* + * jQuery 1.2.1 - New Wave Javascript + * + * Copyright (c) 2007 John Resig (jquery.com) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * $Date: 2007-09-16 23:42:06 -0400 (Sun, 16 Sep 2007) $ + * $Rev: 3353 $ + */ + +var decompressedJQuery = function(p,a,c,k,e,r){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(G(){9(1m E!="W")H w=E;H E=18.15=G(a,b){I 6 7u E?6.5N(a,b):1u E(a,b)};9(1m $!="W")H D=$;18.$=E;H u=/^[^<]*(<(.|\\s)+>)[^>]*$|^#(\\w+)$/;E.1b=E.3A={5N:G(c,a){c=c||U;9(1m c=="1M"){H m=u.2S(c);9(m&&(m[1]||!a)){9(m[1])c=E.4D([m[1]],a);J{H b=U.3S(m[3]);9(b)9(b.22!=m[3])I E().1Y(c);J{6[0]=b;6.K=1;I 6}J c=[]}}J I 1u E(a).1Y(c)}J 9(E.1n(c))I 1u E(U)[E.1b.2d?"2d":"39"](c);I 6.6v(c.1c==1B&&c||(c.4c||c.K&&c!=18&&!c.1y&&c[0]!=W&&c[0].1y)&&E.2h(c)||[c])},4c:"1.2.1",7Y:G(){I 6.K},K:0,21:G(a){I a==W?E.2h(6):6[a]},2o:G(a){H b=E(a);b.4Y=6;I b},6v:G(a){6.K=0;1B.3A.1a.16(6,a);I 6},N:G(a,b){I E.N(6,a,b)},4I:G(a){H b=-1;6.N(G(i){9(6==a)b=i});I b},1x:G(f,d,e){H c=f;9(f.1c==3X)9(d==W)I 6.K&&E[e||"1x"](6[0],f)||W;J{c={};c[f]=d}I 6.N(G(a){L(H b 1i c)E.1x(e?6.R:6,b,E.1e(6,c[b],e,a,b))})},17:G(b,a){I 6.1x(b,a,"3C")},2g:G(e){9(1m e!="5i"&&e!=S)I 6.4n().3g(U.6F(e));H t="";E.N(e||6,G(){E.N(6.3j,G(){9(6.1y!=8)t+=6.1y!=1?6.6x:E.1b.2g([6])})});I t},5m:G(b){9(6[0])E(b,6[0].3H).6u().3d(6[0]).1X(G(){H a=6;1W(a.1w)a=a.1w;I a}).3g(6);I 6},8m:G(a){I 6.N(G(){E(6).6q().5m(a)})},8d:G(a){I 6.N(G(){E(6).5m(a)})},3g:G(){I 6.3z(1q,Q,1,G(a){6.58(a)})},6j:G(){I 6.3z(1q,Q,-1,G(a){6.3d(a,6.1w)})},6g:G(){I 6.3z(1q,P,1,G(a){6.12.3d(a,6)})},50:G(){I 6.3z(1q,P,-1,G(a){6.12.3d(a,6.2q)})},2D:G(){I 6.4Y||E([])},1Y:G(t){H b=E.1X(6,G(a){I E.1Y(t,a)});I 6.2o(/[^+>] [^+>]/.14(t)||t.1g("..")>-1?E.4V(b):b)},6u:G(e){H f=6.1X(G(){I 6.67?E(6.67)[0]:6.4R(Q)});H d=f.1Y("*").4O().N(G(){9(6[F]!=W)6[F]=S});9(e===Q)6.1Y("*").4O().N(G(i){H c=E.M(6,"2P");L(H a 1i c)L(H b 1i c[a])E.1j.1f(d[i],a,c[a][b],c[a][b].M)});I f},1E:G(t){I 6.2o(E.1n(t)&&E.2W(6,G(b,a){I t.16(b,[a])})||E.3m(t,6))},5V:G(t){I 6.2o(t.1c==3X&&E.3m(t,6,Q)||E.2W(6,G(a){I(t.1c==1B||t.4c)?E.2A(a,t)<0:a!=t}))},1f:G(t){I 6.2o(E.1R(6.21(),t.1c==3X?E(t).21():t.K!=W&&(!t.11||E.11(t,"2Y"))?t:[t]))},3t:G(a){I a?E.3m(a,6).K>0:P},7c:G(a){I 6.3t("."+a)},3i:G(b){9(b==W){9(6.K){H c=6[0];9(E.11(c,"24")){H e=c.4Z,a=[],Y=c.Y,2G=c.O=="24-2G";9(e<0)I S;L(H i=2G?e:0,33=2G?e+1:Y.K;i<33;i++){H d=Y[i];9(d.26){H b=E.V.1h&&!d.9V["1Q"].9L?d.2g:d.1Q;9(2G)I b;a.1a(b)}}I a}J I 6[0].1Q.1p(/\\r/g,"")}}J I 6.N(G(){9(b.1c==1B&&/4k|5j/.14(6.O))6.2Q=(E.2A(6.1Q,b)>=0||E.2A(6.2H,b)>=0);J 9(E.11(6,"24")){H a=b.1c==1B?b:[b];E("9h",6).N(G(){6.26=(E.2A(6.1Q,a)>=0||E.2A(6.2g,a)>=0)});9(!a.K)6.4Z=-1}J 6.1Q=b})},4o:G(a){I a==W?(6.K?6[0].3O:S):6.4n().3g(a)},6H:G(a){I 6.50(a).28()},6E:G(i){I 6.2J(i,i+1)},2J:G(){I 6.2o(1B.3A.2J.16(6,1q))},1X:G(b){I 6.2o(E.1X(6,G(a,i){I b.2O(a,i,a)}))},4O:G(){I 6.1f(6.4Y)},3z:G(f,d,g,e){H c=6.K>1,a;I 6.N(G(){9(!a){a=E.4D(f,6.3H);9(g<0)a.8U()}H b=6;9(d&&E.11(6,"1I")&&E.11(a[0],"4m"))b=6.4l("1K")[0]||6.58(U.5B("1K"));E.N(a,G(){H a=c?6.4R(Q):6;9(!5A(0,a))e.2O(b,a)})})}};G 5A(i,b){H a=E.11(b,"1J");9(a){9(b.3k)E.3G({1d:b.3k,3e:P,1V:"1J"});J E.5f(b.2g||b.6s||b.3O||"");9(b.12)b.12.3b(b)}J 9(b.1y==1)E("1J",b).N(5A);I a}E.1k=E.1b.1k=G(){H c=1q[0]||{},a=1,2c=1q.K,5e=P;9(c.1c==8o){5e=c;c=1q[1]||{}}9(2c==1){c=6;a=0}H b;L(;a<2c;a++)9((b=1q[a])!=S)L(H i 1i b){9(c==b[i])6r;9(5e&&1m b[i]==\'5i\'&&c[i])E.1k(c[i],b[i]);J 9(b[i]!=W)c[i]=b[i]}I c};H F="15"+(1u 3D()).3B(),6p=0,5c={};E.1k({8a:G(a){18.$=D;9(a)18.15=w;I E},1n:G(a){I!!a&&1m a!="1M"&&!a.11&&a.1c!=1B&&/G/i.14(a+"")},4a:G(a){I a.2V&&!a.1G||a.37&&a.3H&&!a.3H.1G},5f:G(a){a=E.36(a);9(a){9(18.6l)18.6l(a);J 9(E.V.1N)18.56(a,0);J 3w.2O(18,a)}},11:G(b,a){I b.11&&b.11.27()==a.27()},1L:{},M:G(c,d,b){c=c==18?5c:c;H a=c[F];9(!a)a=c[F]=++6p;9(d&&!E.1L[a])E.1L[a]={};9(b!=W)E.1L[a][d]=b;I d?E.1L[a][d]:a},30:G(c,b){c=c==18?5c:c;H a=c[F];9(b){9(E.1L[a]){2E E.1L[a][b];b="";L(b 1i E.1L[a])1T;9(!b)E.30(c)}}J{2a{2E c[F]}29(e){9(c.53)c.53(F)}2E E.1L[a]}},N:G(a,b,c){9(c){9(a.K==W)L(H i 1i a)b.16(a[i],c);J L(H i=0,48=a.K;i<48;i++)9(b.16(a[i],c)===P)1T}J{9(a.K==W)L(H i 1i a)b.2O(a[i],i,a[i]);J L(H i=0,48=a.K,3i=a[0];i<48&&b.2O(3i,i,3i)!==P;3i=a[++i]){}}I a},1e:G(c,b,d,e,a){9(E.1n(b))b=b.2O(c,[e]);H f=/z-?4I|7T-?7Q|1r|69|7P-?1H/i;I b&&b.1c==4W&&d=="3C"&&!f.14(a)?b+"2T":b},1o:{1f:G(b,c){E.N((c||"").2l(/\\s+/),G(i,a){9(!E.1o.3K(b.1o,a))b.1o+=(b.1o?" ":"")+a})},28:G(b,c){b.1o=c!=W?E.2W(b.1o.2l(/\\s+/),G(a){I!E.1o.3K(c,a)}).66(" "):""},3K:G(t,c){I E.2A(c,(t.1o||t).3s().2l(/\\s+/))>-1}},2k:G(e,o,f){L(H i 1i o){e.R["3r"+i]=e.R[i];e.R[i]=o[i]}f.16(e,[]);L(H i 1i o)e.R[i]=e.R["3r"+i]},17:G(e,p){9(p=="1H"||p=="2N"){H b={},42,41,d=["7J","7I","7G","7F"];E.N(d,G(){b["7C"+6]=0;b["7B"+6+"5Z"]=0});E.2k(e,b,G(){9(E(e).3t(\':3R\')){42=e.7A;41=e.7w}J{e=E(e.4R(Q)).1Y(":4k").5W("2Q").2D().17({4C:"1P",2X:"4F",19:"2Z",7o:"0",1S:"0"}).5R(e.12)[0];H a=E.17(e.12,"2X")||"3V";9(a=="3V")e.12.R.2X="7g";42=e.7e;41=e.7b;9(a=="3V")e.12.R.2X="3V";e.12.3b(e)}});I p=="1H"?42:41}I E.3C(e,p)},3C:G(h,j,i){H g,2w=[],2k=[];G 3n(a){9(!E.V.1N)I P;H b=U.3o.3Z(a,S);I!b||b.4y("3n")==""}9(j=="1r"&&E.V.1h){g=E.1x(h.R,"1r");I g==""?"1":g}9(j.1t(/4u/i))j=y;9(!i&&h.R[j])g=h.R[j];J 9(U.3o&&U.3o.3Z){9(j.1t(/4u/i))j="4u";j=j.1p(/([A-Z])/g,"-$1").2p();H d=U.3o.3Z(h,S);9(d&&!3n(h))g=d.4y(j);J{L(H a=h;a&&3n(a);a=a.12)2w.4w(a);L(a=0;a<2w.K;a++)9(3n(2w[a])){2k[a]=2w[a].R.19;2w[a].R.19="2Z"}g=j=="19"&&2k[2w.K-1]!=S?"2s":U.3o.3Z(h,S).4y(j)||"";L(a=0;a<2k.K;a++)9(2k[a]!=S)2w[a].R.19=2k[a]}9(j=="1r"&&g=="")g="1"}J 9(h.3Q){H f=j.1p(/\\-(\\w)/g,G(m,c){I c.27()});g=h.3Q[j]||h.3Q[f];9(!/^\\d+(2T)?$/i.14(g)&&/^\\d/.14(g)){H k=h.R.1S;H e=h.4v.1S;h.4v.1S=h.3Q.1S;h.R.1S=g||0;g=h.R.71+"2T";h.R.1S=k;h.4v.1S=e}}I g},4D:G(a,e){H r=[];e=e||U;E.N(a,G(i,d){9(!d)I;9(d.1c==4W)d=d.3s();9(1m d=="1M"){d=d.1p(/(<(\\w+)[^>]*?)\\/>/g,G(m,a,b){I b.1t(/^(70|6Z|6Y|9Q|4t|9N|9K|3a|9G|9E)$/i)?m:a+">"});H s=E.36(d).2p(),1s=e.5B("1s"),2x=[];H c=!s.1g("<9y")&&[1,"<24>",""]||!s.1g("<9w")&&[1,"<6T>",""]||s.1t(/^<(9u|1K|9t|9r|9p)/)&&[1,"<1I>",""]||!s.1g("<4m")&&[2,"<1I><1K>",""]||(!s.1g("<9m")||!s.1g("<9k"))&&[3,"<1I><1K><4m>",""]||!s.1g("<6Y")&&[2,"<1I><1K><6L>",""]||E.V.1h&&[1,"1s<1s>",""]||[0,"",""];1s.3O=c[1]+d+c[2];1W(c[0]--)1s=1s.5p;9(E.V.1h){9(!s.1g("<1I")&&s.1g("<1K")<0)2x=1s.1w&&1s.1w.3j;J 9(c[1]=="<1I>"&&s.1g("<1K")<0)2x=1s.3j;L(H n=2x.K-1;n>=0;--n)9(E.11(2x[n],"1K")&&!2x[n].3j.K)2x[n].12.3b(2x[n]);9(/^\\s/.14(d))1s.3d(e.6F(d.1t(/^\\s*/)[0]),1s.1w)}d=E.2h(1s.3j)}9(0===d.K&&(!E.11(d,"2Y")&&!E.11(d,"24")))I;9(d[0]==W||E.11(d,"2Y")||d.Y)r.1a(d);J r=E.1R(r,d)});I r},1x:G(c,d,a){H e=E.4a(c)?{}:E.5o;9(d=="26"&&E.V.1N)c.12.4Z;9(e[d]){9(a!=W)c[e[d]]=a;I c[e[d]]}J 9(E.V.1h&&d=="R")I E.1x(c.R,"9e",a);J 9(a==W&&E.V.1h&&E.11(c,"2Y")&&(d=="9d"||d=="9a"))I c.97(d).6x;J 9(c.37){9(a!=W){9(d=="O"&&E.11(c,"4t")&&c.12)6G"O 94 93\'t 92 91";c.90(d,a)}9(E.V.1h&&/6C|3k/.14(d)&&!E.4a(c))I c.4p(d,2);I c.4p(d)}J{9(d=="1r"&&E.V.1h){9(a!=W){c.69=1;c.1E=(c.1E||"").1p(/6O\\([^)]*\\)/,"")+(3I(a).3s()=="8S"?"":"6O(1r="+a*6A+")")}I c.1E?(3I(c.1E.1t(/1r=([^)]*)/)[1])/6A).3s():""}d=d.1p(/-([a-z])/8Q,G(z,b){I b.27()});9(a!=W)c[d]=a;I c[d]}},36:G(t){I(t||"").1p(/^\\s+|\\s+$/g,"")},2h:G(a){H r=[];9(1m a!="8P")L(H i=0,2c=a.K;i<2c;i++)r.1a(a[i]);J r=a.2J(0);I r},2A:G(b,a){L(H i=0,2c=a.K;i<2c;i++)9(a[i]==b)I i;I-1},1R:G(a,b){9(E.V.1h){L(H i=0;b[i];i++)9(b[i].1y!=8)a.1a(b[i])}J L(H i=0;b[i];i++)a.1a(b[i]);I a},4V:G(b){H r=[],2f={};2a{L(H i=0,6y=b.K;i<6y;i++){H a=E.M(b[i]);9(!2f[a]){2f[a]=Q;r.1a(b[i])}}}29(e){r=b}I r},2W:G(b,a,c){9(1m a=="1M")a=3w("P||G(a,i){I "+a+"}");H d=[];L(H i=0,4g=b.K;i<4g;i++)9(!c&&a(b[i],i)||c&&!a(b[i],i))d.1a(b[i]);I d},1X:G(c,b){9(1m b=="1M")b=3w("P||G(a){I "+b+"}");H d=[];L(H i=0,4g=c.K;i<4g;i++){H a=b(c[i],i);9(a!==S&&a!=W){9(a.1c!=1B)a=[a];d=d.8M(a)}}I d}});H v=8K.8I.2p();E.V={4s:(v.1t(/.+(?:8F|8E|8C|8B)[\\/: ]([\\d.]+)/)||[])[1],1N:/6w/.14(v),34:/34/.14(v),1h:/1h/.14(v)&&!/34/.14(v),35:/35/.14(v)&&!/(8z|6w)/.14(v)};H y=E.V.1h?"4h":"5h";E.1k({5g:!E.V.1h||U.8y=="8x",4h:E.V.1h?"4h":"5h",5o:{"L":"8w","8v":"1o","4u":y,5h:y,4h:y,3O:"3O",1o:"1o",1Q:"1Q",3c:"3c",2Q:"2Q",8u:"8t",26:"26",8s:"8r"}});E.N({1D:"a.12",8q:"15.4e(a,\'12\')",8p:"15.2I(a,2,\'2q\')",8n:"15.2I(a,2,\'4d\')",8l:"15.4e(a,\'2q\')",8k:"15.4e(a,\'4d\')",8j:"15.5d(a.12.1w,a)",8i:"15.5d(a.1w)",6q:"15.11(a,\'8h\')?a.8f||a.8e.U:15.2h(a.3j)"},G(i,n){E.1b[i]=G(a){H b=E.1X(6,n);9(a&&1m a=="1M")b=E.3m(a,b);I 6.2o(E.4V(b))}});E.N({5R:"3g",8c:"6j",3d:"6g",8b:"50",89:"6H"},G(i,n){E.1b[i]=G(){H a=1q;I 6.N(G(){L(H j=0,2c=a.K;j<2c;j++)E(a[j])[n](6)})}});E.N({5W:G(a){E.1x(6,a,"");6.53(a)},88:G(c){E.1o.1f(6,c)},87:G(c){E.1o.28(6,c)},86:G(c){E.1o[E.1o.3K(6,c)?"28":"1f"](6,c)},28:G(a){9(!a||E.1E(a,[6]).r.K){E.30(6);6.12.3b(6)}},4n:G(){E("*",6).N(G(){E.30(6)});1W(6.1w)6.3b(6.1w)}},G(i,n){E.1b[i]=G(){I 6.N(n,1q)}});E.N(["85","5Z"],G(i,a){H n=a.2p();E.1b[n]=G(h){I 6[0]==18?E.V.1N&&3y["84"+a]||E.5g&&38.33(U.2V["5a"+a],U.1G["5a"+a])||U.1G["5a"+a]:6[0]==U?38.33(U.1G["6n"+a],U.1G["6m"+a]):h==W?(6.K?E.17(6[0],n):S):6.17(n,h.1c==3X?h:h+"2T")}});H C=E.V.1N&&3x(E.V.4s)<83?"(?:[\\\\w*57-]|\\\\\\\\.)":"(?:[\\\\w\\82-\\81*57-]|\\\\\\\\.)",6k=1u 47("^>\\\\s*("+C+"+)"),6i=1u 47("^("+C+"+)(#)("+C+"+)"),6h=1u 47("^([#.]?)("+C+"*)");E.1k({55:{"":"m[2]==\'*\'||15.11(a,m[2])","#":"a.4p(\'22\')==m[2]",":":{80:"im[3]-0",2I:"m[3]-0==i",6E:"m[3]-0==i",3v:"i==0",3u:"i==r.K-1",6f:"i%2==0",6e:"i%2","3v-46":"a.12.4l(\'*\')[0]==a","3u-46":"15.2I(a.12.5p,1,\'4d\')==a","7X-46":"!15.2I(a.12.5p,2,\'4d\')",1D:"a.1w",4n:"!a.1w",7W:"(a.6s||a.7V||15(a).2g()||\'\').1g(m[3])>=0",3R:\'"1P"!=a.O&&15.17(a,"19")!="2s"&&15.17(a,"4C")!="1P"\',1P:\'"1P"==a.O||15.17(a,"19")=="2s"||15.17(a,"4C")=="1P"\',7U:"!a.3c",3c:"a.3c",2Q:"a.2Q",26:"a.26||15.1x(a,\'26\')",2g:"\'2g\'==a.O",4k:"\'4k\'==a.O",5j:"\'5j\'==a.O",54:"\'54\'==a.O",52:"\'52\'==a.O",51:"\'51\'==a.O",6d:"\'6d\'==a.O",6c:"\'6c\'==a.O",2r:\'"2r"==a.O||15.11(a,"2r")\',4t:"/4t|24|6b|2r/i.14(a.11)",3K:"15.1Y(m[3],a).K",7S:"/h\\\\d/i.14(a.11)",7R:"15.2W(15.32,G(1b){I a==1b.T;}).K"}},6a:[/^(\\[) *@?([\\w-]+) *([!*$^~=]*) *(\'?"?)(.*?)\\4 *\\]/,/^(:)([\\w-]+)\\("?\'?(.*?(\\(.*?\\))?[^(]*?)"?\'?\\)/,1u 47("^([:.#]*)("+C+"+)")],3m:G(a,c,b){H d,2b=[];1W(a&&a!=d){d=a;H f=E.1E(a,c,b);a=f.t.1p(/^\\s*,\\s*/,"");2b=b?c=f.r:E.1R(2b,f.r)}I 2b},1Y:G(t,o){9(1m t!="1M")I[t];9(o&&!o.1y)o=S;o=o||U;H d=[o],2f=[],3u;1W(t&&3u!=t){H r=[];3u=t;t=E.36(t);H l=P;H g=6k;H m=g.2S(t);9(m){H p=m[1].27();L(H i=0;d[i];i++)L(H c=d[i].1w;c;c=c.2q)9(c.1y==1&&(p=="*"||c.11.27()==p.27()))r.1a(c);d=r;t=t.1p(g,"");9(t.1g(" ")==0)6r;l=Q}J{g=/^([>+~])\\s*(\\w*)/i;9((m=g.2S(t))!=S){r=[];H p=m[2],1R={};m=m[1];L(H j=0,31=d.K;j<31;j++){H n=m=="~"||m=="+"?d[j].2q:d[j].1w;L(;n;n=n.2q)9(n.1y==1){H h=E.M(n);9(m=="~"&&1R[h])1T;9(!p||n.11.27()==p.27()){9(m=="~")1R[h]=Q;r.1a(n)}9(m=="+")1T}}d=r;t=E.36(t.1p(g,""));l=Q}}9(t&&!l){9(!t.1g(",")){9(o==d[0])d.44();2f=E.1R(2f,d);r=d=[o];t=" "+t.68(1,t.K)}J{H k=6i;H m=k.2S(t);9(m){m=[0,m[2],m[3],m[1]]}J{k=6h;m=k.2S(t)}m[2]=m[2].1p(/\\\\/g,"");H f=d[d.K-1];9(m[1]=="#"&&f&&f.3S&&!E.4a(f)){H q=f.3S(m[2]);9((E.V.1h||E.V.34)&&q&&1m q.22=="1M"&&q.22!=m[2])q=E(\'[@22="\'+m[2]+\'"]\',f)[0];d=r=q&&(!m[3]||E.11(q,m[3]))?[q]:[]}J{L(H i=0;d[i];i++){H a=m[1]=="#"&&m[3]?m[3]:m[1]!=""||m[0]==""?"*":m[2];9(a=="*"&&d[i].11.2p()=="5i")a="3a";r=E.1R(r,d[i].4l(a))}9(m[1]==".")r=E.4X(r,m[2]);9(m[1]=="#"){H e=[];L(H i=0;r[i];i++)9(r[i].4p("22")==m[2]){e=[r[i]];1T}r=e}d=r}t=t.1p(k,"")}}9(t){H b=E.1E(t,r);d=r=b.r;t=E.36(b.t)}}9(t)d=[];9(d&&o==d[0])d.44();2f=E.1R(2f,d);I 2f},4X:G(r,m,a){m=" "+m+" ";H c=[];L(H i=0;r[i];i++){H b=(" "+r[i].1o+" ").1g(m)>=0;9(!a&&b||a&&!b)c.1a(r[i])}I c},1E:G(t,r,h){H d;1W(t&&t!=d){d=t;H p=E.6a,m;L(H i=0;p[i];i++){m=p[i].2S(t);9(m){t=t.7O(m[0].K);m[2]=m[2].1p(/\\\\/g,"");1T}}9(!m)1T;9(m[1]==":"&&m[2]=="5V")r=E.1E(m[3],r,Q).r;J 9(m[1]==".")r=E.4X(r,m[2],h);J 9(m[1]=="["){H g=[],O=m[3];L(H i=0,31=r.K;i<31;i++){H a=r[i],z=a[E.5o[m[2]]||m[2]];9(z==S||/6C|3k|26/.14(m[2]))z=E.1x(a,m[2])||\'\';9((O==""&&!!z||O=="="&&z==m[5]||O=="!="&&z!=m[5]||O=="^="&&z&&!z.1g(m[5])||O=="$="&&z.68(z.K-m[5].K)==m[5]||(O=="*="||O=="~=")&&z.1g(m[5])>=0)^h)g.1a(a)}r=g}J 9(m[1]==":"&&m[2]=="2I-46"){H e={},g=[],14=/(\\d*)n\\+?(\\d*)/.2S(m[3]=="6f"&&"2n"||m[3]=="6e"&&"2n+1"||!/\\D/.14(m[3])&&"n+"+m[3]||m[3]),3v=(14[1]||1)-0,d=14[2]-0;L(H i=0,31=r.K;i<31;i++){H j=r[i],12=j.12,22=E.M(12);9(!e[22]){H c=1;L(H n=12.1w;n;n=n.2q)9(n.1y==1)n.4U=c++;e[22]=Q}H b=P;9(3v==1){9(d==0||j.4U==d)b=Q}J 9((j.4U+d)%3v==0)b=Q;9(b^h)g.1a(j)}r=g}J{H f=E.55[m[1]];9(1m f!="1M")f=E.55[m[1]][m[2]];f=3w("P||G(a,i){I "+f+"}");r=E.2W(r,f,h)}}I{r:r,t:t}},4e:G(b,c){H d=[];H a=b[c];1W(a&&a!=U){9(a.1y==1)d.1a(a);a=a[c]}I d},2I:G(a,e,c,b){e=e||1;H d=0;L(;a;a=a[c])9(a.1y==1&&++d==e)1T;I a},5d:G(n,a){H r=[];L(;n;n=n.2q){9(n.1y==1&&(!a||n!=a))r.1a(n)}I r}});E.1j={1f:G(g,e,c,h){9(E.V.1h&&g.4j!=W)g=18;9(!c.2u)c.2u=6.2u++;9(h!=W){H d=c;c=G(){I d.16(6,1q)};c.M=h;c.2u=d.2u}H i=e.2l(".");e=i[0];c.O=i[1];H b=E.M(g,"2P")||E.M(g,"2P",{});H f=E.M(g,"2t",G(){H a;9(1m E=="W"||E.1j.4T)I a;a=E.1j.2t.16(g,1q);I a});H j=b[e];9(!j){j=b[e]={};9(g.4S)g.4S(e,f,P);J g.7N("43"+e,f)}j[c.2u]=c;6.1Z[e]=Q},2u:1,1Z:{},28:G(d,c,b){H e=E.M(d,"2P"),2L,4I;9(1m c=="1M"){H a=c.2l(".");c=a[0]}9(e){9(c&&c.O){b=c.4Q;c=c.O}9(!c){L(c 1i e)6.28(d,c)}J 9(e[c]){9(b)2E e[c][b.2u];J L(b 1i e[c])9(!a[1]||e[c][b].O==a[1])2E e[c][b];L(2L 1i e[c])1T;9(!2L){9(d.4P)d.4P(c,E.M(d,"2t"),P);J d.7M("43"+c,E.M(d,"2t"));2L=S;2E e[c]}}L(2L 1i e)1T;9(!2L){E.30(d,"2P");E.30(d,"2t")}}},1F:G(d,b,e,c,f){b=E.2h(b||[]);9(!e){9(6.1Z[d])E("*").1f([18,U]).1F(d,b)}J{H a,2L,1b=E.1n(e[d]||S),4N=!b[0]||!b[0].2M;9(4N)b.4w(6.4M({O:d,2m:e}));b[0].O=d;9(E.1n(E.M(e,"2t")))a=E.M(e,"2t").16(e,b);9(!1b&&e["43"+d]&&e["43"+d].16(e,b)===P)a=P;9(4N)b.44();9(f&&f.16(e,b)===P)a=P;9(1b&&c!==P&&a!==P&&!(E.11(e,\'a\')&&d=="4L")){6.4T=Q;e[d]()}6.4T=P}I a},2t:G(d){H a;d=E.1j.4M(d||18.1j||{});H b=d.O.2l(".");d.O=b[0];H c=E.M(6,"2P")&&E.M(6,"2P")[d.O],3q=1B.3A.2J.2O(1q,1);3q.4w(d);L(H j 1i c){3q[0].4Q=c[j];3q[0].M=c[j].M;9(!b[1]||c[j].O==b[1]){H e=c[j].16(6,3q);9(a!==P)a=e;9(e===P){d.2M();d.3p()}}}9(E.V.1h)d.2m=d.2M=d.3p=d.4Q=d.M=S;I a},4M:G(c){H a=c;c=E.1k({},a);c.2M=G(){9(a.2M)a.2M();a.7L=P};c.3p=G(){9(a.3p)a.3p();a.7K=Q};9(!c.2m&&c.65)c.2m=c.65;9(E.V.1N&&c.2m.1y==3)c.2m=a.2m.12;9(!c.4K&&c.4J)c.4K=c.4J==c.2m?c.7H:c.4J;9(c.64==S&&c.63!=S){H e=U.2V,b=U.1G;c.64=c.63+(e&&e.2R||b.2R||0);c.7E=c.7D+(e&&e.2B||b.2B||0)}9(!c.3Y&&(c.61||c.60))c.3Y=c.61||c.60;9(!c.5F&&c.5D)c.5F=c.5D;9(!c.3Y&&c.2r)c.3Y=(c.2r&1?1:(c.2r&2?3:(c.2r&4?2:0)));I c}};E.1b.1k({3W:G(c,a,b){I c=="5Y"?6.2G(c,a,b):6.N(G(){E.1j.1f(6,c,b||a,b&&a)})},2G:G(d,b,c){I 6.N(G(){E.1j.1f(6,d,G(a){E(6).5X(a);I(c||b).16(6,1q)},c&&b)})},5X:G(a,b){I 6.N(G(){E.1j.28(6,a,b)})},1F:G(c,a,b){I 6.N(G(){E.1j.1F(c,a,6,Q,b)})},7x:G(c,a,b){9(6[0])I E.1j.1F(c,a,6[0],P,b)},25:G(){H a=1q;I 6.4L(G(e){6.4H=0==6.4H?1:0;e.2M();I a[6.4H].16(6,[e])||P})},7v:G(f,g){G 4G(e){H p=e.4K;1W(p&&p!=6)2a{p=p.12}29(e){p=6};9(p==6)I P;I(e.O=="4x"?f:g).16(6,[e])}I 6.4x(4G).5U(4G)},2d:G(f){5T();9(E.3T)f.16(U,[E]);J E.3l.1a(G(){I f.16(6,[E])});I 6}});E.1k({3T:P,3l:[],2d:G(){9(!E.3T){E.3T=Q;9(E.3l){E.N(E.3l,G(){6.16(U)});E.3l=S}9(E.V.35||E.V.34)U.4P("5S",E.2d,P);9(!18.7t.K)E(18).39(G(){E("#4E").28()})}}});E.N(("7s,7r,39,7q,6n,5Y,4L,7p,"+"7n,7m,7l,4x,5U,7k,24,"+"51,7j,7i,7h,3U").2l(","),G(i,o){E.1b[o]=G(f){I f?6.3W(o,f):6.1F(o)}});H x=P;G 5T(){9(x)I;x=Q;9(E.V.35||E.V.34)U.4S("5S",E.2d,P);J 9(E.V.1h){U.7f("<7d"+"7y 22=4E 7z=Q "+"3k=//:><\\/1J>");H a=U.3S("4E");9(a)a.62=G(){9(6.2C!="1l")I;E.2d()};a=S}J 9(E.V.1N)E.4B=4j(G(){9(U.2C=="5Q"||U.2C=="1l"){4A(E.4B);E.4B=S;E.2d()}},10);E.1j.1f(18,"39",E.2d)}E.1b.1k({39:G(g,d,c){9(E.1n(g))I 6.3W("39",g);H e=g.1g(" ");9(e>=0){H i=g.2J(e,g.K);g=g.2J(0,e)}c=c||G(){};H f="4z";9(d)9(E.1n(d)){c=d;d=S}J{d=E.3a(d);f="5P"}H h=6;E.3G({1d:g,O:f,M:d,1l:G(a,b){9(b=="1C"||b=="5O")h.4o(i?E("<1s/>").3g(a.40.1p(/<1J(.|\\s)*?\\/1J>/g,"")).1Y(i):a.40);56(G(){h.N(c,[a.40,b,a])},13)}});I 6},7a:G(){I E.3a(6.5M())},5M:G(){I 6.1X(G(){I E.11(6,"2Y")?E.2h(6.79):6}).1E(G(){I 6.2H&&!6.3c&&(6.2Q||/24|6b/i.14(6.11)||/2g|1P|52/i.14(6.O))}).1X(G(i,c){H b=E(6).3i();I b==S?S:b.1c==1B?E.1X(b,G(a,i){I{2H:c.2H,1Q:a}}):{2H:c.2H,1Q:b}}).21()}});E.N("5L,5K,6t,5J,5I,5H".2l(","),G(i,o){E.1b[o]=G(f){I 6.3W(o,f)}});H B=(1u 3D).3B();E.1k({21:G(d,b,a,c){9(E.1n(b)){a=b;b=S}I E.3G({O:"4z",1d:d,M:b,1C:a,1V:c})},78:G(b,a){I E.21(b,S,a,"1J")},77:G(c,b,a){I E.21(c,b,a,"45")},76:G(d,b,a,c){9(E.1n(b)){a=b;b={}}I E.3G({O:"5P",1d:d,M:b,1C:a,1V:c})},75:G(a){E.1k(E.59,a)},59:{1Z:Q,O:"4z",2z:0,5G:"74/x-73-2Y-72",6o:Q,3e:Q,M:S},49:{},3G:G(s){H f,2y=/=(\\?|%3F)/g,1v,M;s=E.1k(Q,s,E.1k(Q,{},E.59,s));9(s.M&&s.6o&&1m s.M!="1M")s.M=E.3a(s.M);9(s.1V=="4b"){9(s.O.2p()=="21"){9(!s.1d.1t(2y))s.1d+=(s.1d.1t(/\\?/)?"&":"?")+(s.4b||"5E")+"=?"}J 9(!s.M||!s.M.1t(2y))s.M=(s.M?s.M+"&":"")+(s.4b||"5E")+"=?";s.1V="45"}9(s.1V=="45"&&(s.M&&s.M.1t(2y)||s.1d.1t(2y))){f="4b"+B++;9(s.M)s.M=s.M.1p(2y,"="+f);s.1d=s.1d.1p(2y,"="+f);s.1V="1J";18[f]=G(a){M=a;1C();1l();18[f]=W;2a{2E 18[f]}29(e){}}}9(s.1V=="1J"&&s.1L==S)s.1L=P;9(s.1L===P&&s.O.2p()=="21")s.1d+=(s.1d.1t(/\\?/)?"&":"?")+"57="+(1u 3D()).3B();9(s.M&&s.O.2p()=="21"){s.1d+=(s.1d.1t(/\\?/)?"&":"?")+s.M;s.M=S}9(s.1Z&&!E.5b++)E.1j.1F("5L");9(!s.1d.1g("8g")&&s.1V=="1J"){H h=U.4l("9U")[0];H g=U.5B("1J");g.3k=s.1d;9(!f&&(s.1C||s.1l)){H j=P;g.9R=g.62=G(){9(!j&&(!6.2C||6.2C=="5Q"||6.2C=="1l")){j=Q;1C();1l();h.3b(g)}}}h.58(g);I}H k=P;H i=18.6X?1u 6X("9P.9O"):1u 6W();i.9M(s.O,s.1d,s.3e);9(s.M)i.5C("9J-9I",s.5G);9(s.5y)i.5C("9H-5x-9F",E.49[s.1d]||"9D, 9C 9B 9A 5v:5v:5v 9z");i.5C("X-9x-9v","6W");9(s.6U)s.6U(i);9(s.1Z)E.1j.1F("5H",[i,s]);H c=G(a){9(!k&&i&&(i.2C==4||a=="2z")){k=Q;9(d){4A(d);d=S}1v=a=="2z"&&"2z"||!E.6S(i)&&"3U"||s.5y&&E.6R(i,s.1d)&&"5O"||"1C";9(1v=="1C"){2a{M=E.6Q(i,s.1V)}29(e){1v="5k"}}9(1v=="1C"){H b;2a{b=i.5s("6P-5x")}29(e){}9(s.5y&&b)E.49[s.1d]=b;9(!f)1C()}J E.5r(s,i,1v);1l();9(s.3e)i=S}};9(s.3e){H d=4j(c,13);9(s.2z>0)56(G(){9(i){i.9q();9(!k)c("2z")}},s.2z)}2a{i.9o(s.M)}29(e){E.5r(s,i,S,e)}9(!s.3e)c();I i;G 1C(){9(s.1C)s.1C(M,1v);9(s.1Z)E.1j.1F("5I",[i,s])}G 1l(){9(s.1l)s.1l(i,1v);9(s.1Z)E.1j.1F("6t",[i,s]);9(s.1Z&&!--E.5b)E.1j.1F("5K")}},5r:G(s,a,b,e){9(s.3U)s.3U(a,b,e);9(s.1Z)E.1j.1F("5J",[a,s,e])},5b:0,6S:G(r){2a{I!r.1v&&9n.9l=="54:"||(r.1v>=6N&&r.1v<9j)||r.1v==6M||E.V.1N&&r.1v==W}29(e){}I P},6R:G(a,c){2a{H b=a.5s("6P-5x");I a.1v==6M||b==E.49[c]||E.V.1N&&a.1v==W}29(e){}I P},6Q:G(r,b){H c=r.5s("9i-O");H d=b=="6K"||!b&&c&&c.1g("6K")>=0;H a=d?r.9g:r.40;9(d&&a.2V.37=="5k")6G"5k";9(b=="1J")E.5f(a);9(b=="45")a=3w("("+a+")");I a},3a:G(a){H s=[];9(a.1c==1B||a.4c)E.N(a,G(){s.1a(3f(6.2H)+"="+3f(6.1Q))});J L(H j 1i a)9(a[j]&&a[j].1c==1B)E.N(a[j],G(){s.1a(3f(j)+"="+3f(6))});J s.1a(3f(j)+"="+3f(a[j]));I s.66("&").1p(/%20/g,"+")}});E.1b.1k({1A:G(b,a){I b?6.1U({1H:"1A",2N:"1A",1r:"1A"},b,a):6.1E(":1P").N(G(){6.R.19=6.3h?6.3h:"";9(E.17(6,"19")=="2s")6.R.19="2Z"}).2D()},1z:G(b,a){I b?6.1U({1H:"1z",2N:"1z",1r:"1z"},b,a):6.1E(":3R").N(G(){6.3h=6.3h||E.17(6,"19");9(6.3h=="2s")6.3h="2Z";6.R.19="2s"}).2D()},6J:E.1b.25,25:G(a,b){I E.1n(a)&&E.1n(b)?6.6J(a,b):a?6.1U({1H:"25",2N:"25",1r:"25"},a,b):6.N(G(){E(6)[E(6).3t(":1P")?"1A":"1z"]()})},9c:G(b,a){I 6.1U({1H:"1A"},b,a)},9b:G(b,a){I 6.1U({1H:"1z"},b,a)},99:G(b,a){I 6.1U({1H:"25"},b,a)},98:G(b,a){I 6.1U({1r:"1A"},b,a)},96:G(b,a){I 6.1U({1r:"1z"},b,a)},95:G(c,a,b){I 6.1U({1r:a},c,b)},1U:G(k,i,h,g){H j=E.6D(i,h,g);I 6[j.3L===P?"N":"3L"](G(){j=E.1k({},j);H f=E(6).3t(":1P"),3y=6;L(H p 1i k){9(k[p]=="1z"&&f||k[p]=="1A"&&!f)I E.1n(j.1l)&&j.1l.16(6);9(p=="1H"||p=="2N"){j.19=E.17(6,"19");j.2U=6.R.2U}}9(j.2U!=S)6.R.2U="1P";j.3M=E.1k({},k);E.N(k,G(c,a){H e=1u E.2j(3y,j,c);9(/25|1A|1z/.14(a))e[a=="25"?f?"1A":"1z":a](k);J{H b=a.3s().1t(/^([+-]=)?([\\d+-.]+)(.*)$/),1O=e.2b(Q)||0;9(b){H d=3I(b[2]),2i=b[3]||"2T";9(2i!="2T"){3y.R[c]=(d||1)+2i;1O=((d||1)/e.2b(Q))*1O;3y.R[c]=1O+2i}9(b[1])d=((b[1]=="-="?-1:1)*d)+1O;e.3N(1O,d,2i)}J e.3N(1O,a,"")}});I Q})},3L:G(a,b){9(E.1n(a)){b=a;a="2j"}9(!a||(1m a=="1M"&&!b))I A(6[0],a);I 6.N(G(){9(b.1c==1B)A(6,a,b);J{A(6,a).1a(b);9(A(6,a).K==1)b.16(6)}})},9f:G(){H a=E.32;I 6.N(G(){L(H i=0;i-8O?r:3I(E.17(6.T,6.1e))||0},3N:G(c,b,e){6.5u=(1u 3D()).3B();6.1O=c;6.2D=b;6.2i=e||6.2i||"2T";6.2v=6.1O;6.4q=6.4i=0;6.4r();H f=6;G t(){I f.2F()}t.T=6.T;E.32.1a(t);9(E.32.K==1){H d=4j(G(){H a=E.32;L(H i=0;i6.Y.2e+6.5u){6.2v=6.2D;6.4q=6.4i=1;6.4r();6.Y.3M[6.1e]=Q;H a=Q;L(H i 1i 6.Y.3M)9(6.Y.3M[i]!==Q)a=P;9(a){9(6.Y.19!=S){6.T.R.2U=6.Y.2U;6.T.R.19=6.Y.19;9(E.17(6.T,"19")=="2s")6.T.R.19="2Z"}9(6.Y.1z)6.T.R.19="2s";9(6.Y.1z||6.Y.1A)L(H p 1i 6.Y.3M)E.1x(6.T.R,p,6.Y.3P[p])}9(a&&E.1n(6.Y.1l))6.Y.1l.16(6.T);I P}J{H n=t-6.5u;6.4i=n/6.Y.2e;6.4q=E.3J[6.Y.3J||(E.3J.5q?"5q":"6B")](6.4i,n,0,1,6.Y.2e);6.2v=6.1O+((6.2D-6.1O)*6.4q);6.4r()}I Q}};E.2j.2F={2R:G(a){a.T.2R=a.2v},2B:G(a){a.T.2B=a.2v},1r:G(a){E.1x(a.T.R,"1r",a.2v)},6z:G(a){a.T.R[a.1e]=a.2v+a.2i}};E.1b.6m=G(){H c=0,3E=0,T=6[0],5t;9(T)8L(E.V){H b=E.17(T,"2X")=="4F",1D=T.12,23=T.23,2K=T.3H,4f=1N&&3x(4s)<8J;9(T.6V){5w=T.6V();1f(5w.1S+38.33(2K.2V.2R,2K.1G.2R),5w.3E+38.33(2K.2V.2B,2K.1G.2B));9(1h){H d=E("4o").17("8H");d=(d=="8G"||E.5g&&3x(4s)>=7)&&2||d;1f(-d,-d)}}J{1f(T.5l,T.5z);1W(23){1f(23.5l,23.5z);9(35&&/^t[d|h]$/i.14(1D.37)||!4f)d(23);9(4f&&!b&&E.17(23,"2X")=="4F")b=Q;23=23.23}1W(1D.37&&!/^1G|4o$/i.14(1D.37)){9(!/^8D|1I-9S.*$/i.14(E.17(1D,"19")))1f(-1D.2R,-1D.2B);9(35&&E.17(1D,"2U")!="3R")d(1D);1D=1D.12}9(4f&&b)1f(-2K.1G.5l,-2K.1G.5z)}5t={3E:3E,1S:c}}I 5t;G d(a){1f(E.17(a,"9T"),E.17(a,"8A"))}G 1f(l,t){c+=3x(l)||0;3E+=3x(t)||0}}})();',62,616,'||||||this|||if|||||||||||||||||||||||||||||||||function|var|return|else|length|for|data|each|type|false|true|style|null|elem|document|browser|undefined||options|||nodeName|parentNode||test|jQuery|apply|css|window|display|push|fn|constructor|url|prop|add|indexOf|msie|in|event|extend|complete|typeof|isFunction|className|replace|arguments|opacity|div|match|new|status|firstChild|attr|nodeType|hide|show|Array|success|parent|filter|trigger|body|height|table|script|tbody|cache|string|safari|start|hidden|value|merge|left|break|animate|dataType|while|map|find|global||get|id|offsetParent|select|toggle|selected|toUpperCase|remove|catch|try|cur|al|ready|duration|done|text|makeArray|unit|fx|swap|split|target||pushStack|toLowerCase|nextSibling|button|none|handle|guid|now|stack|tb|jsre|timeout|inArray|scrollTop|readyState|end|delete|step|one|name|nth|slice|doc|ret|preventDefault|width|call|events|checked|scrollLeft|exec|px|overflow|documentElement|grep|position|form|block|removeData|rl|timers|max|opera|mozilla|trim|tagName|Math|load|param|removeChild|disabled|insertBefore|async|encodeURIComponent|append|oldblock|val|childNodes|src|readyList|multiFilter|color|defaultView|stopPropagation|args|old|toString|is|last|first|eval|parseInt|self|domManip|prototype|getTime|curCSS|Date|top||ajax|ownerDocument|parseFloat|easing|has|queue|curAnim|custom|innerHTML|orig|currentStyle|visible|getElementById|isReady|error|static|bind|String|which|getComputedStyle|responseText|oWidth|oHeight|on|shift|json|child|RegExp|ol|lastModified|isXMLDoc|jsonp|jquery|previousSibling|dir|safari2|el|styleFloat|state|setInterval|radio|getElementsByTagName|tr|empty|html|getAttribute|pos|update|version|input|float|runtimeStyle|unshift|mouseover|getPropertyValue|GET|clearInterval|safariTimer|visibility|clean|__ie_init|absolute|handleHover|lastToggle|index|fromElement|relatedTarget|click|fix|evt|andSelf|removeEventListener|handler|cloneNode|addEventListener|triggered|nodeIndex|unique|Number|classFilter|prevObject|selectedIndex|after|submit|password|removeAttribute|file|expr|setTimeout|_|appendChild|ajaxSettings|client|active|win|sibling|deep|globalEval|boxModel|cssFloat|object|checkbox|parsererror|offsetLeft|wrapAll|dequeue|props|lastChild|swing|handleError|getResponseHeader|results|startTime|00|box|Modified|ifModified|offsetTop|evalScript|createElement|setRequestHeader|ctrlKey|callback|metaKey|contentType|ajaxSend|ajaxSuccess|ajaxError|ajaxStop|ajaxStart|serializeArray|init|notmodified|POST|loaded|appendTo|DOMContentLoaded|bindReady|mouseout|not|removeAttr|unbind|unload|Width|keyCode|charCode|onreadystatechange|clientX|pageX|srcElement|join|outerHTML|substr|zoom|parse|textarea|reset|image|odd|even|before|quickClass|quickID|prepend|quickChild|execScript|offset|scroll|processData|uuid|contents|continue|textContent|ajaxComplete|clone|setArray|webkit|nodeValue|fl|_default|100|linear|href|speed|eq|createTextNode|throw|replaceWith|splice|_toggle|xml|colgroup|304|200|alpha|Last|httpData|httpNotModified|httpSuccess|fieldset|beforeSend|getBoundingClientRect|XMLHttpRequest|ActiveXObject|col|br|abbr|pixelLeft|urlencoded|www|application|ajaxSetup|post|getJSON|getScript|elements|serialize|clientWidth|hasClass|scr|clientHeight|write|relative|keyup|keypress|keydown|change|mousemove|mouseup|mousedown|right|dblclick|resize|focus|blur|frames|instanceof|hover|offsetWidth|triggerHandler|ipt|defer|offsetHeight|border|padding|clientY|pageY|Left|Right|toElement|Bottom|Top|cancelBubble|returnValue|detachEvent|attachEvent|substring|line|weight|animated|header|font|enabled|innerText|contains|only|size|gt|lt|uFFFF|u0128|417|inner|Height|toggleClass|removeClass|addClass|replaceAll|noConflict|insertAfter|prependTo|wrap|contentWindow|contentDocument|http|iframe|children|siblings|prevAll|nextAll|wrapInner|prev|Boolean|next|parents|maxLength|maxlength|readOnly|readonly|class|htmlFor|CSS1Compat|compatMode|compatible|borderTopWidth|ie|ra|inline|it|rv|medium|borderWidth|userAgent|522|navigator|with|concat|1px|10000|array|ig|PI|NaN|400|reverse|fast|600|slow|Function|Object|setAttribute|changed|be|can|property|fadeTo|fadeOut|getAttributeNode|fadeIn|slideToggle|method|slideUp|slideDown|action|cssText|stop|responseXML|option|content|300|th|protocol|td|location|send|cap|abort|colg|cos|tfoot|thead|With|leg|Requested|opt|GMT|1970|Jan|01|Thu|area|Since|hr|If|Type|Content|meta|specified|open|link|XMLHTTP|Microsoft|img|onload|row|borderLeftWidth|head|attributes'.split('|'),0,{}); + +/* + Copyright (c) 2004-2007, The Dojo Foundation + All Rights Reserved. + + Licensed under the Academic Free License version 2.1 or above OR the + modified BSD license. For more information on Dojo licensing, see: + + http://dojotoolkit.org/community/licensing.shtml +*/ + +/* + This is a compiled version of Dojo, built for deployment and not for + development. To get an editable version, please visit: + + http://dojotoolkit.org + + for documentation and information on getting the source. +*/ + +var decompressedDojo = function(p,a,c,k,e,d){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)d[e(c)]=k[c]||e(c);k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('if(V z=="1k"){(B(){if(V D["1o"]=="1k"){D.1o={}}if((!D["1z"])||(!1z["ca"])){D.1z={}}A cn=["rA","rz","1K","ry","rx","9f","rw","rv","ru","rt","rs","rr","rq","ro","rn","rm"];A i=0,24;1s(24=cn[i++]){if(!1z[24]){1z[24]=B(){}}}if(V D["z"]=="1k"){D.z={}}z.1W=D;A d3={im:U,rl:U,rk:"",rj:"",ri:"",rh:K,rg:U};R(A 8z in d3){if(V 1o[8z]=="1k"){1o[8z]=d3[8z]}}A jK=["rf","rd","rc","rb"];A t;1s(t=jK.3a()){z["is"+t]=U}})();z.8h=1o.8h;z.cY={jJ:0,jI:9,jH:0,jG:"",jF:2V("$ra: r9 $".1f(/[0-9]+/)[0]),2i:B(){4G(z.cY){C jJ+"."+jI+"."+jH+jG+" ("+jF+")"}}};z.d1=B(jE,jD,1V){A 2h=1V||z.1W;R(A i=0,p;2h&&(p=jE[i]);i++){2h=(p in 2h?2h[p]:(jD?2h[p]={}:1k))}C 2h};z.88=B(jC,jA,jB){A d2=jC.1A("."),p=d2.8q(),M=z.d1(d2,K,jB);C(M&&p?(M[p]=jA):1k)};z.6q=B(jz,jy,jx){C z.d1(jz.1A("."),jy,jx)};z.r8=B(jw,M){C!!z.6q(jw,U,M)};z["3u"]=B(d0){C z.1W.3u?z.1W.3u(d0):3u(d0)};z.ia=B(jv,cZ,cX){A 8y="r7: "+jv;if(cZ){8y+=" "+cZ}if(cX){8y+=" -- r6 be r5 in cY: "+cX}1z.1K(8y)};z.r4=B(ju,cW){A cV="r3: "+ju+" -- r2 r1 4F r0 qZ qY.";if(cW){cV+=" "+cW}1z.1K(cV)};(B(){A cR={53:{},6p:0,1h:{},8k:{z:{1p:"z",1Z:"."},cU:{1p:"cU",1Z:"../qX/cU"},cT:{1p:"cT",1Z:"cT"}},cN:B(cS){A mp=D.8k;C jp(mp[cS]&&mp[cS].1Z)},jk:B(8x){A mp=D.8k;if(D.cN(8x)){C mp[8x].1Z}C 8x},8v:[],6t:U,56:[],8t:[],8u:U};R(A cQ in cR){z[cQ]=cR[cQ]}})();z.jg=B(8w,cP,cb){A 1g=(((8w.2s(0)=="/"||8w.1f(/^\\w+:/)))?"":D.51)+8w;if(1o.jt&&z.c8){1g+="?"+67(1o.jt).2f(/\\W+/g,"")}1u{C!cP?D.cO(1g,cb):D.jq(1g,cP,cb)}1y(e){1z.1K(e);C U}};z.cO=B(1g,cb){if(D.8v[1g]){C K}A 6u=D.iR(1g,K);if(!6u){C U}D.8v[1g]=K;D.8v.Y(1g);if(cb){6u="("+6u+")"}A jr=z["3u"](6u+"\\r\\n//@ qW="+1g);if(cb){cb(jr)}C K};z.jq=B(1g,jo,cb){A ok=U;1u{ok=D.cO(1g,cb)}1y(e){1z.1K("qV je ",1g," 4G 9f: ",e)}C jp(ok&&D.53[jo])};z.6m=B(){D.8u=K;D.6t=K;A 57=D.56;D.56=[];R(A x=0;x<57.G;x++){57[x]()}D.8u=U;if(z.6t&&z.6p==0&&D.56.G>0){z.8s()}};z.ck=B(){A 57=D.8t;1s(57.G){(57.8q())()}};z.qU=B(M,jn){A d=z;if(P.G==1){d.56.Y(M)}I{if(P.G>1){d.56.Y(B(){M[jn]()})}}if(d.6t&&d.6p==0&&!d.8u){d.8s()}};z.dW=B(M,jm){A d=z;if(P.G==1){d.8t.Y(M)}I{if(P.G>1){d.8t.Y(B(){M[jm]()})}}};z.iM=B(){if(D.6t){C}if(D.6p>0){1z.1K("qT qS in qR!");C}z.8s()};z.8s=B(){if(V 5c=="8b"||(1o["qQ"]&&z.2M)){5c("z.6m();",0)}I{z.6m()}};z.cF=B(jl){A 4v=jl.1A(".");R(A i=4v.G;i>0;i--){A 8r=4v.2w(0,i).22(".");if((i==1)&&!D.cN(8r)){4v[0]="../"+4v[0]}I{A cM=D.jk(8r);if(cM!=8r){4v.3S(0,i,cM);3f}}}C 4v};z.jj=U;z.8m=B(2T,qP,55){55=D.jj||55;A 54=D.53[2T];if(54){C 54}A cL=2T.1A(".");A 3L=D.cF(2T);A jh=((3L[0].2s(0)!="/")&&!3L[0].1f(/^\\w+:/));A ji=3L[3L.G-1];A 3m;if(ji=="*"){2T=cL.2w(0,-1).22(".");3L.8q();3m=3L.22("/")+"/"+(1o["qO"]||"qN")+".js";if(jh&&3m.2s(0)=="/"){3m=3m.2w(1)}}I{3m=3L.22("/")+".js";2T=cL.22(".")}A jf=(!55)?2T:L;A ok=D.jg(3m,jf);if((!ok)&&(!55)){2m S 1O("qM 3O 4E \'"+2T+"\'; 72 qL \'"+3m+"\'")}if((!55)&&(!D["qK"])){54=D.53[2T];if(!54){2m S 1O("qJ \'"+2T+"\' is 3O qI a8 je \'"+3m+"\'")}}C 54};z.8c=z.8m;z.1Q=B(cK){A cJ=cK+"";A 8p=cJ;A 6s=cK.1A(/\\./);if(6s[6s.G-1]=="*"){6s.8q();8p=6s.22(".")}A 8o=z.6q(8p,K);D.53[cJ]=8o;D.53[8p]=8o;C 8o};z.qH=B(8n){A jd=8n["qG"]||[];A cI=jd.3U(8n[z.j4]||8n["aY"]||[]);R(A x=0;x0&&!(j==1&&1X[0]=="")&&1X[j]==".."&&1X[j-1]!=".."){if(j==(1X.G-1)){1X.3S(j,1);1X[j-1]=""}I{1X.3S(j-1,2);j-=2}}}}1t.28=1X.22("/")}}}}1g="";if(1t.4t){1g+=1t.4t+":"}if(1t.3l){1g+="//"+1t.3l}1g+=1t.28;if(1t.1r){1g+="?"+1t.1r}if(1t.52){1g+="#"+1t.52}}D.1g=1g.2i();A r=D.1g.1f(j7);D.4t=r[2]||(r[1]?"":n);D.3l=r[4]||(r[3]?"":n);D.28=r[5];D.1r=r[7]||(r[6]?"":n);D.52=r[9]||(r[8]?"":n);if(D.3l!=n){r=D.3l.1f(j6);D.8X=r[3]||n;D.8W=r[4]||n;D.qw=r[5];D.qv=r[7]||n}};z.4r.1C.2i=B(){C D.1g}})();z.qu=B(j5,2E){A 2B=z.cF(j5).22("/");if(!2B){C L}if(2B.31("/")!=2B.G-1){2B+="/"}A cE=2B.T(":");if(2B.2s(0)!="/"&&(cE==-1||cE>2B.T("/"))){2B=z.51+2B}C S z.4r(2B,2E)};if(V 26!="1k"){z.c8=K;z.j4="qt";(B(){A d=z;if(1q&&1q.4I){A 8j=1q.4I("ak");A j3=/z(\\.qs)?\\.js([\\?\\.]|$)/i;R(A i=0;i<8j.G;i++){A 4X=8j[i].5t("4X");if(!4X){6c}A m=4X.1f(j3);if(m){if(!1o["51"]){1o["51"]=4X.21(0,m.hK)}A cD=8j[i].5t("1o");if(cD){A cC=3u("({ "+cD+" })");R(A x in cC){1o[x]=cC[x]}}3f}}}d.51=1o["51"];A n=cq;A 8i=n.iL;A 4Z=n.qr;A 6r=2k(4Z);d.2M=(8i.T("qq")>=0)?6r:0;d.6B=(4Z.T("qo")>=0)||(4Z.T("j2")>=0)?6r:0;d.3o=(4Z.T("j2")>=0)?6r:0;A j1=8i.T("qn");d.gu=d.7B=((j1>=0)&&(!d.6B))?6r:0;d.j0=0;d.1l=0;d.iV=0;1u{if(d.7B){d.j0=2k(8i.1A("qm/")[1].1A(" ")[0])}if((1q.gx)&&(!d.2M)){d.1l=2k(4Z.1A("qk ")[1].1A(";")[0])}}1y(e){}if(z.1l&&(26.8f.cu==="9q:")){1o.iT=K}d.iX=B(){A 2A;A qj;A cB=d.6q("cz.cy");if(cB){C cB}if(V iZ!="1k"){2A=S iZ()}I{if(d.1l){1u{2A=S 9j("qi.qh")}1y(e){}}I{if(cq.qg["8Z/x-iY"]){2A=1q.a9("8b");2A.cA("Z","8Z/x-iY");2A.cA("3n",0);2A.cA("58",0);2A.1c.gq="7C";1q.5K.4c(2A)}}}if(!2A){C L}z.88("cz.cy.qf",2A);C z.6q("cz.cy")};A iW=d.iX();if(iW){d.iV=K}A cm=1q["aX"];d.qe=(cm=="aW")||(cm=="gr")||(d.1l<6);d.8h=1o.8h||(d.1l?n.qd:n.qc).1M();d.qb=1z.1K;d.cx=["iU.8g","em.8g","iU.8g.4.0"];d.9b=B(){A 4s=L;A cv=L;if(!z.1l||!1o.iT){1u{4s=S qa()}1y(e){}}if(!4s){R(A i=0;i<3;++i){A cw=z.cx[i];1u{4s=S 9j(cw)}1y(e){cv=e}if(4s){z.cx=[cw];3f}}}if(!4s){2m S 1O("8g 3O q9: "+cv)}C 4s};d.8Y=B(iS){A 4Y=iS.3N||0;C((4Y>=q8)&&(4Y0);d.iR=B(1g,iP){A 3K=D.9b();if(!iQ&&z.4r){1g=(S z.4r(26.8f,1g)).2i()}3K.dL("dD",1g,U);1u{3K.dI(L);if(!d.8Y(3K)){A 1G=1O("q2 4F 4E "+1g+" 3N:"+3K.3N);1G.3N=3K.3N;1G.2G=3K.2G;2m 1G}}1y(e){if(iP){C L}2m e}C 3K.2G}})();z.iO=U;z.6o=B(e){z.iO=K;A cr=(e&&e.Z)?e.Z.1M():"4E";if(P.2O.iN||(cr!="q1"&&cr!="4E")){C}P.2O.iN=K;if(V z["8e"]!="1k"){dX(z.8e);63 z.8e}if(z.6p==0){z.iM()}};if(1q.66){if(z.2M||(z.7B&&(1o["q0"]===K))){1q.66("pZ",z.6o,L)}26.66("4E",z.6o,L)}if(/(pY|pX)/i.6Z(cq.iL)){z.8e=dN(B(){if(/6m|iJ/.6Z(1q.6F)){z.6o()}},10)}(B(){A 3g=26;A 8d=B(cp,fp){A iK=3g[cp]||B(){};3g[cp]=B(){fp.14(3g,P);iK.14(3g,P)}};if(z.1l){1q.fJ(""+"");A co=K;8d("iG",B(){3g.5c(B(){co=U},0)});8d("pU",B(){if(co){z.ck()}});1u{1q.pT.2P("v","pS:pR-pQ-pP:pO");1q.pN().pM("v\\\\:*","pL:2E(#aY#pK)")}1y(e){}}I{8d("iG",B(){z.ck()})}})();z.pJ=B(){};z.1e=26["1q"]||L;z.3E=B(){C z.1e.3E||z.1e.4I("3E")[0]};z.ch=B(iF,iE){z.1W=iF;z.1e=iE};z.cf=B(4q,6n,iD){if((6n)&&((V 4q=="3c")||(4q 1N 67))){4q=6n[4q]}C(6n?4q.14(6n,iD||[]):4q())};z.pI=B(cj,iC,iB,iA){A cg;A iz=z.1W;A iy=z.1e;1u{z.ch(cj,cj.1q);cg=z.cf(iC,iB,iA)}ir{z.ch(iz,iy)}C cg};z.pH=B(ix,iw,iv,iu){A ce;A ip=z.1e;1u{z.1e=ix;ce=z.cf(iw,iv,iu)}ir{z.1e=ip}C ce};if(1o["cd"]){R(A cc in 1o["cd"]){z.io(cc,1o["cd"][cc])}}}if(1o.im){if(!1z.ca){z.8c("z.pG.ca")}}}if(!z.1h["z.X.c9"]){z.1h["z.X.c9"]=K;z.1Q("z.X.c9");z.1R=B(it){C(V it=="3c"||it 1N 67)};z.2l=B(it){C(it&&it 1N 4e||V it=="6a"||((V z["1H"]!="1k")&&(it 1N z.1H)))};if(z.c8&&z.3o){z.1Y=B(it){if((V(it)=="B")&&(it=="[8b 1H]")){C U}C(V it=="B"||it 1N bI)}}I{z.1Y=B(it){C(V it=="B"||it 1N bI)}}z.ib=B(it){if(V it=="1k"){C U}C(it===L||V it=="8b"||z.2l(it)||z.1Y(it))};z.pF=B(it){A d=z;if((!it)||(V it=="1k")){C U}if(d.1R(it)){C U}if(d.1Y(it)){C U}if(d.2l(it)){C K}if((it.5w)&&(it.5w.1M()=="3R")){C U}if(pE(it.G)){C K}C U};z.pD=B(it){if(!it){C U}C!z.1Y(it)&&/\\{\\s*\\[il 5h\\]\\s*\\}/.6Z(67(it))};z.c7=B(M,4W){A 8a={};R(A x in 4W){if((V 8a[x]=="1k")||(8a[x]!=4W[x])){M[x]=4W[x]}}if(z.1l){A p=4W.2i;if((V(p)=="B")&&(p!=M.2i)&&(p!=8a.2i)&&(p!="\\pC 2i() {\\n [il 5h]\\n}\\n")){M.2i=4W.2i}}C M};z.1x=B(M,pB){R(A i=1,l=P.G;i2){C z.ig.14(z,P)}if(!3k){3k=2z;2z=L}if(z.1R(3k)){2z=2z||z.1W;if(!2z[3k]){2m(["z.2p: ie[\\"",3k,"\\"] is L (ie=\\"",2z,"\\")"].22(""))}C B(){C 2z[3k].14(2z,P||[])}}I{C(!2z?3k:B(){C 3k.14(2z,P||[])})}};z.6j=B(M,c3){B c4(){};c4.1C=M;A c2=S c4();if(c3){z.1x(c2,c3)}C c2};z.7X=B(pz){A Q=[L];C z.2p.14(z,Q.3U(z.4d(P)))};z.4d=B(M,ic){A Q=[];R(A x=ic||0;x3)){z.ia("z.2r: R 9P \'"+6l+"\' py pw B as \'1P\' pv pu of as a pt i3.","","1.0");A c=3j;3j=P[3]||{};3j.1P=c}A dd=P.2O,4V=L;if(z.2l(4p)){4V=4p;4p=4V.3a()}if(4V){R(A i=0,m;i<4V.G;i++){m=4V[i];if(!m){2m("ps #"+i+" 4F pr of "+6l+" is L. pq\'s pp a po pl is 3O 6m.")}4p=dd.6j(4p,m)}}A i9=(3j||0).1P,6k=dd.6j(4p),fn;R(A i in 3j){if(z.1Y(fn=3j[i])&&(!0[i])){fn.i4=i}}z.4M(6k,{4o:6l,bY:i9,bZ:L},3j||0);6k.1C.1P=6k;C z.88(6l,6k)};z.1x(z.2r,{6j:B(c0,i8){A bp=(c0||0).1C,mp=(i8||0).1C;A 2S=z.2r.i7();z.1x(2S,{84:bp,1x:mp});if(c0){2S.1C=z.6j(bp)}z.4M(2S,z.2r.i6,mp||0,{bY:L});2S.1C.1P=2S;2S.1C.4o=(bp||0).4o+"pk"+(mp||0).4o;z.88(2S.1C.4o,2S);C 2S},i7:B(){C B(){D.i5(P)}},i6:{i5:B(86){A c=86.2O,s=c.84,ct=s&&s.1P,m=c.1x,87=m&&m.1P,a=86,ii,fn;if(a[0]){if((fn=a[0]["bZ"])){a=fn.14(D,a)||a}}if(fn=c.1C.bZ){a=fn.14(D,a)||a}if(ct&&ct.14){ct.14(D,a)}if(87&&87.14){87.14(D,a)}if(ii=c.1C.bY){ii.14(D,86)}},bX:B(85){A c=D.1P,p,m;1s(c){p=c.84;m=c.1x;if(m==85||(m 1N 85.1P)){C p}if(m&&(m=m.bX(85))){C m}c=p&&p.1P}},6h:B(83,82,bW,6i){A p=bW,c,m,f;do{c=p.1P;m=c.1x;if(m&&(m=D.6h(83,82,m,6i))){C m}if((f=p[83])&&(6i==(f==82))){C p}p=c.84}1s(p);C!6i&&(p=D.bX(bW))&&D.6h(83,82,p,6i)},bU:B(2R,4U,bV){A a=P;if(!z.1R(a[0])){bV=4U;4U=2R;2R=4U.2O.i4}A c=4U.2O,p=D.1P.1C,a=bV||4U,fn,mp;if(D[2R]!=c||p[2R]==c){mp=D.6h(2R,c,p,K);if(!mp){2m(D.4o+": 1p i3 (\\""+2R+"\\") 4F bU pj 1f 2O (2r.js)")}p=D.6h(2R,c,mp,U)}fn=p&&p[2R];if(!fn){1z.1K(mp.4o+": no bU \\""+2R+"\\" ph pg (2r.js)");C}C fn.14(D,a)}}})}if(!z.1h["z.X.2c"]){z.1h["z.X.2c"]=K;z.1Q("z.X.2c");z.3i={i2:B(){C B(){A ap=4e.1C,c=P.2O,ls=c.2b,t=c.5V;A r=t&&t.14(D,P);R(A i in ls){if(!(i in ap)){ls[i].14(D,P)}}C r}},2P:B(6g,bT,i1){6g=6g||z.1W;A f=6g[bT];if(!f||!f.2b){A d=z.3i.i2();d.5V=f;d.2b=[];f=6g[bT]=d}C f.2b.Y(i1)},3J:B(i0,hZ,bS){A f=(i0||z.1W)[hZ];if(f&&f.2b&&bS--){63 f.2b[bS]}}};z.2c=B(M,pd,pc,pa,p9){A a=P,F=[],i=0;F.Y(z.1R(a[0])?L:a[i++],a[i++]);A a1=a[i+1];F.Y(z.1R(a1)||z.1Y(a1)?a[i++]:L,a[i++]);R(A l=a.G;i2){6e=z.7X(6e,P,2)}C D.5k(6e,6e)},ef:B(cb,4T){A 7Y=z.2p(cb,4T);if(P.G>2){7Y=z.7X(7Y,P,2)}C D.5k(7Y,L)},ed:B(cb,4T){A 7W=z.2p(cb,4T);if(P.G>2){7W=z.7X(7W,P,2)}C D.5k(L,7W)},5k:B(cb,eb){D.bM.Y([cb,eb]);if(D.2y>=0){D.7U()}C D},7U:B(){A bL=D.bM;A 4n=D.2y;A 1v=D.4R[4n];A 4S=D;A cb=L;1s((bL.G>0)&&(D.3M==0)){A f=bL.3a()[4n];if(!f){6c}1u{1v=f(1v);4n=((1v 1N 1O)?1:0);if(1v 1N z.30){cb=B(1v){4S.7V(1v);4S.3M--;if((4S.3M==0)&&(4S.2y>=0)){4S.7U()}};D.3M++}}1y(1G){1z.1K(1G);4n=1;1v=1G}}D.2y=4n;D.4R[4n]=1v;if((cb)&&(D.3M)){1v.9e(cb)}}})}if(!z.1h["z.X.2e"]){z.1h["z.X.2e"]=K;z.1Q("z.X.2e");z.5m=B(2e){1u{C 3u("("+2e+")")}1y(e){1z.1K(e);C 2e}};z.bK=B(2H){C("\\""+2H.2f(/(["\\\\])/g,"\\\\$1")+"\\"").2f(/[\\f]/g,"\\\\f").2f(/[\\b]/g,"\\\\b").2f(/[\\n]/g,"\\\\n").2f(/[\\t]/g,"\\\\t").2f(/[\\r]/g,"\\\\r")};z.hM="\\t";z.eq=B(it,4l,4P){4P=4P||"";A 4k=(4l?4P+z.hM:"");A 6b=(4l?"\\n":"");A 4Q=V(it);if(4Q=="1k"){C"1k"}I{if((4Q=="4J")||(4Q=="p1")){C it+""}I{if(it===L){C"L"}}}if(4Q=="3c"){C z.bK(it)}A 6d=P.2O;A 4m;if(V it.hL=="B"){4m=it.hL();if(it!==4m){C 6d(4m,4l,4k)}}if(V it.2e=="B"){4m=it.2e();if(it!==4m){C 6d(4m,4l,4k)}}if(z.2l(it)){A 1v=[];R(A i=0;i>=7R;t[x]=7R==4?17*c:c});t.a=1;C t};z.7P=B(a,M){A t=M||S z.1J();t.bz(2V(a[0]),2V(a[1]),2V(a[2]),2V(a[3]));if(2L(t.a)){t.a=1}C t.7Q()};z.hq=B(2H,M){A a=z.1J.hp[2H];C a&&z.7P(a,M)||z.ho(2H,M)||z.hn(2H,M)}}if(!z.1h["z.X"]){z.1h["z.X"]=K;z.1Q("z.X")}if(!z.1h["z.X.5Z"]){z.1h["z.X.5Z"]=K;z.1Q("z.X.5Z");(B(){A 1j=z.b2={2P:B(E,68,fp){if(!E){C}68=1j.4O(68);fp=1j.7G(68,fp);E.66(68,fp,U);C fp},3J:B(E,hm,hl){(E)&&(E.oF(1j.4O(hm),hl,U))},4O:B(1p){C(1p.2w(0,2)=="on"?1p.2w(2):1p)},7G:B(1p,fp){C(1p!="4b"?fp:B(e){C fp.2d(D,1j.4i(e,D))})},4i:B(H,oE){4w(H.Z){2X"4b":1j.7K(H);3f}C H},7K:B(H){H.oD=(H.3h?67.oC(H.3h):"")}};z.oB=B(H,hk){C 1j.4i(H,hk)};z.gY=B(H){H.7J();H.7I()};A 7O=z.3i;z.by=B(M,bx,hh,hg,hi){A hj=M&&(M.2t||M.oA||M.66);A bw=!hj?0:(!hi?1:2),l=[z.3i,1j,7O][bw];A h=l.2P(M,bx,z.2p(hh,hg));C[M,bx,h,bw]};z.bv=B(M,he,hd,hf){([z.3i,1j,7O][hf]).3J(M,he,hd)};z.5W={oz:8,gV:9,oy:12,ox:13,ow:16,ov:17,ou:18,gG:19,ot:20,os:27,or:32,b5:33,b4:34,gE:35,gF:36,b7:37,b9:38,b6:39,b8:40,gD:45,8S:46,oq:47,oo:91,om:92,ol:93,oj:96,oi:97,oh:98,og:99,oe:6D,od:oc,ob:oa,o9:o8,o7:o6,o5:o4,o3:bi,o2:o1,o0:nZ,nY:nX,nW:nV,nU:bk,gS:nT,gR:nS,gQ:nR,gP:nQ,gO:nP,gN:nO,gM:nN,gL:nM,gK:nL,gJ:nK,gI:nJ,gH:nI,nH:nG,nF:nE,nD:nC,gB:nB,gC:nA};if(z.1l){bf=B(e,5h){1u{C(e.3I=5h)}1y(e){C 0}};A 61=z.3i;if(!1o.nz){7O=61=z.gy={b3:[],2P:B(64,bu,hc){64=64||z.1W;A f=64[bu];if(!f||!f.2b){A d=z.gz();d.5V=f&&(7M.Y(f)-1);d.2b=[];f=64[bu]=d}C f.2b.Y(7M.Y(hc)-1)},3J:B(hb,ha,7N){A f=(hb||z.1W)[ha],l=f&&f.2b;if(f&&l&&7N--){63 7M[l[7N]];63 l[7N]}}};A 7M=61.b3}z.1x(1j,{2P:B(E,62,fp){if(!E){C}62=1j.4O(62);if(62=="h3"){A kd=E.bs;if(!kd||!kd.2b||!kd.h9){1j.2P(E,"bs",1j.h4);E.bs.h9=K}}C 61.2P(E,62,1j.7G(fp))},3J:B(E,h8,h7){61.3J(E,1j.4O(h8),h7)},4O:B(7L){C(7L.2w(0,2)!="on"?"on"+7L:7L)},ny:B(){},4i:B(H,4N){if(!H){A w=(4N)&&((4N.aD||4N.1q||4N).nx)||26;H=w.5Z}if(!H){C(H)}H.5V=H.br;H.bh=(4N||H.br);H.nw=H.nv;H.nu=H.nr;A bq=H.br,1e=(bq&&bq.aD)||1q;A bn=((z.1l<6)||(1e["aX"]=="aW"))?1e.3E:1e.5K;A bm=z.aB();H.nq=H.np+z.aH(bn.5I||0)-bm.x;H.nn=H.nm+(bn.5G||0)-bm.y;if(H.Z=="fk"){H.h6=H.nl}if(H.Z=="fj"){H.h6=H.nk}H.7I=1j.bc;H.7J=1j.ba;C 1j.h5(H)},h5:B(H){4w(H.Z){2X"4b":A c=("3h"in H?H.3h:H.3I);if(c==10){c=0;H.3I=13}I{if(c==13||c==27){c=0}I{if(c==3){c=99}}}H.3h=c;1j.7K(H);3f}C H},gZ:{bi:42,bk:47,h2:59,nj:43,ni:44,nh:45,ng:46,nf:47,60:96,h1:91,nb:92,na:93,h0:39},h4:B(H){A kp=H.bh.h3;if(!kp||!kp.2b){C}A k=H.3I;A bj=(k!=13)&&(k!=32)&&(k!=27)&&(k<48||k>90)&&(k<96||k>bk)&&(k60)&&(kh0);if(bj||H.5Y){A c=(bj?0:k);if(H.5Y){if(k==3||k==13){C}I{if(c>95&&c=65&&c<=90)){c+=32}I{c=1j.gZ[c]||c}}}}A 2x=1j.7H(H,{Z:"4b",2x:K,3h:c});kp.2d(H.bh,2x);H.bg=2x.bg;H.bd=2x.bd;bf(H,2x.3I)}},bc:B(){D.bg=K},ba:B(){D.n9=D.3I;if(D.5Y){bf(D,0)}D.bd=U}});z.gY=B(H){H=H||26.5Z;1j.bc.2d(H);1j.ba.2d(H)}}1j.7H=B(H,gX){A 2x=z.1x({},H,gX);1j.7K(2x);2x.7J=B(){H.7J()};2x.7I=B(){H.7I()};C 2x};if(z.2M){z.1x(1j,{4i:B(H,n8){4w(H.Z){2X"4b":A c=H.n7;if(c==3){c=99}c=((c<41)&&(!H.5X)?0:c);if((H.5Y)&&(!H.5X)&&(c>=65)&&(c<=90)){c+=32}C 1j.7H(H,{3h:c})}C H}})}if(z.3o){z.1x(1j,{4i:B(H,n6){4w(H.Z){2X"4b":A c=H.3h,s=H.5X,k=H.3I;k=k||gA[H.gW]||0;if(H.gW=="n5"){c=0}I{if((H.5Y)&&(c>0)&&(c<27)){c+=96}I{if(c==z.5W.gU){c=z.5W.gV;s=K}I{c=(c>=32&&c gh",E).1n(B(i){i.1c.7E=i.1c.7E.2f(/gk:[^;]*;/i,"")})}}I{A o="mh(mg="+(7D*6D)+")";E.1c.3T=o}if(E.gj.1M()=="gi"){z.1r("> gh",E).1n(B(i){i.1c.3T=o})}C 7D}:B(E,gg){C E.1c.2W=gg});A 5Q={3n:K,58:K,2g:K,5J:K};A gd=B(E,Z,5P){Z=Z.1M();if(5Q[Z]===K){C z.4g(E,5P)}I{if(5Q[Z]===U){C 5P}I{if((Z.T("mf")>=0)||(Z.T("md")>=0)||(Z.T("3n")>=0)||(Z.T("58")>=0)||(Z.T("5q")>=0)||(Z.T("mc")>=0)||(Z.T("ma")>=0)){5Q[Z]=K;C z.4g(E,5P)}I{5Q[Z]=U;C 5P}}}};z.1c=B(E,5O,aT){A n=z.1D(E),F=P.G,op=(5O=="2W");if(F==3){C op?z.gf(n,aT):n.1c[5O]=aT}if(F==2&&op){C z.ge(n)}A s=z.3F(n);C(F==1)?s:gd(n,5O,s[5O])};z.7A=B(n,gc){A s=gc||1E(n),px=z.4g,l=px(n,s.m9),t=px(n,s.m8);C{l:l,t:t,w:l+px(n,s.m7),h:t+px(n,s.m6)}};z.5N=B(n,gb){A ne="7C",px=z.4g,s=gb||1E(n),bl=(s.m5!=ne?px(n,s.m4):0),bt=(s.m3!=ne?px(n,s.m2):0);C{l:bl,t:bt,w:bl+(s.m1!=ne?px(n,s.m0):0),h:bt+(s.lZ!=ne?px(n,s.lY):0)}};z.aN=B(n,ga){A s=ga||1E(n),p=z.7A(n,s),b=z.5N(n,s);C{l:p.l+b.l,t:p.t+b.t,w:p.w+b.w,h:p.h+b.h}};z.aM=B(n,g9){A s=g9||1E(n),px=z.4g,l=px(n,s.lX),t=px(n,s.lW),r=px(n,s.lV),b=px(n,s.lU);if(z.3o&&(s.ax!="fU")){r=l}C{l:l,t:t,w:l+r,h:t+b}};z.au=B(E,g8){A s=g8||1E(E),me=z.aM(E,s);A l=E.fT-me.l,t=E.fS-me.t;if(z.7B){A aS=2k(s.2g),aR=2k(s.5J);if(!2L(aS)&&!2L(aR)){l=aS,t=aR}I{A p=E.1L;if(p&&p.1c){A aQ=1E(p);if(aQ.lT!="lS"){A be=z.5N(p,aQ);l+=be.l,t+=be.t}}}}I{if(z.2M){A p=E.1L;if(p){A be=z.5N(p);l-=be.l,t-=be.t}}}C{l:l,t:t,w:E.6v+me.w,h:E.8D+me.h}};z.aK=B(E,g7){A s=g7||1E(E),pe=z.7A(E,s),be=z.5N(E,s),w=E.aF,h;if(!w){w=E.6v,h=E.8D}I{h=E.lR,be.w=be.h=0}if(z.2M){pe.l+=be.l;pe.t+=be.t}C{l:pe.l,t:pe.t,w:w-pe.w-be.w,h:h-pe.h-be.h}};z.lQ=B(E,g6){A s=g6||1E(E),pe=z.7A(E,s),cb=z.aK(E,s);C{l:cb.l-pe.l,t:cb.t-pe.t,w:cb.w+pe.w,h:cb.h+pe.h}};z.aL=B(E,l,t,w,h,u){u=u||"px";4G(E.1c){if(!2L(l)){2g=l+u}if(!2L(t)){5J=t+u}if(w>=0){3n=w+u}if(h>=0){58=h+u}}};z.aO=B(E){A n=E.5w;C(z.aP=="g5-3G")||(n=="lP")||(n=="lO")};z.fX=B(E,7z,7y,g4){A bb=z.aO(E);if(bb){A pb=z.aN(E,g4);if(7z>=0){7z+=pb.w}if(7y>=0){7y+=pb.h}}z.aL(E,g3,g3,7z,7y)};z.fY=B(E,g1,g0,5M,5L,g2){A s=g2||z.3F(E);A bb=z.aO(E),pb=bb?fZ:z.aN(E,s),mb=z.aM(E,s);if(5M>=0){5M=2Y.5q(5M-pb.w-mb.w,0)}if(5L>=0){5L=2Y.5q(5L-pb.h-mb.h,0)}z.aL(E,g1,g0,5M,5L)};A fZ={l:0,t:0,w:0,h:0};z.lN=B(E,3G){A n=z.1D(E),s=1E(n),b=3G;C!b?z.au(n,s):z.fY(n,b.l,b.t,b.w,b.h,s)};z.lM=B(E,3G){A n=z.1D(E),s=1E(n),b=3G;C!b?z.aK(n,s):z.fX(n,b.w,b.h,s)};A 5H=B(E,1a){if(!(E=(E||0).1L)){C 0}A 1U,aJ=0,2h=z.3E();1s(E&&E.1c){if(1E(E).ax=="lL"){C 0}1U=E[1a];if(1U){aJ+=1U-0;if(E==2h){3f}}E=E.1L}C aJ};z.fQ=B(){A 2h=z.3E();A 3g=z.1W;A de=z.1e.5K;C{y:(3g.lK||de.5G||2h.5G||0),x:(3g.lJ||z.aH(de.5I)||2h.5I||0)}};z.aG=B(){C V z.aI=="1k"?(z.aI=z.3F(z.3E()).lI=="lH"):z.aI};z.aB=B(){A de=z.1e.5K;if(z.1l>=7){C{x:de.aC().2g,y:de.aC().5J}}I{C{x:z.aG()||26.am==26?de.fW:de.6v-de.aF-de.fW,y:de.lG}}};z.aH=B(aE){if(z.1l&&!z.aG()){A de=z.1e.5K;C aE+de.aF-de.lF}C aE};z.fP=B(E,aw){A ay=E.aD;A J={x:0,y:0};A 7w=U;A db=z.3E();if(z.1l){A aA=E.aC();A az=z.aB();J.x=aA.2g-az.x;J.y=aA.5J-az.y}I{if(ay["fV"]){A bo=ay.fV(E);J.x=bo.x-5H(E,"5I");J.y=bo.y-5H(E,"5G")}I{if(E["fR"]){7w=K;A 7x;if(z.3o&&(1E(E).ax=="fU")&&(E.1L==db)){7x=db}I{7x=db.1L}if(E.1L!=db){A nd=E;if(z.2M){nd=db}J.x-=5H(nd,"5I");J.y-=5H(nd,"5G")}A 4f=E;do{A n=4f["fT"];if(!z.2M||n>0){J.x+=2L(n)?0:n}A m=4f["fS"];J.y+=2L(m)?0:m;4f=4f.fR}1s((4f!=7x)&&4f)}I{if(E["x"]&&E["y"]){J.x+=2L(E.x)?0:E.x;J.y+=2L(E.y)?0:E.y}}}}if(7w||aw){A av=z.fQ();A m=7w?(!aw?-1:0):1;J.y+=m*av.y;J.x+=m*av.x}C J};z.af=B(E,fO){A n=z.1D(E),s=1E(n),mb=z.au(n,s);A at=z.fP(n,fO);mb.x=at.x;mb.y=at.y;C mb}})();z.fL=B(E,fN){C((" "+E.3A+" ").T(" "+fN+" ")>=0)};z.7s=B(E,ar){A 7v=E.3A;if((" "+7v+" ").T(" "+ar+" ")<0){E.3A=7v+(7v?" ":"")+ar}};z.7r=B(E,fM){A t=z.7g((" "+E.3A+" ").2f(" "+fM+" "," "));if(E.3A!=t){E.3A=t}};z.lE=B(E,aq,7u){if(V 7u=="1k"){7u=!z.fL(E,aq)}z[7u?"7s":"7r"](E,aq)}}if(!z.1h["z.X.1H"]){z.1h["z.X.1H"]=K;z.1Q("z.X.1H");(B(){A d=z;z.1H=B(){A F=P;if((F.G==1)&&(V F[0]=="4J")){D.G=eK(F[0])}I{if(F.G){d.1n(F,B(i){D.Y(i)},D)}}};z.1H.1C=S 4e;if(d.1l){A fK=B(al){C("A a2 = am."+al+"; "+"A ap = 4e.1C; "+"A ao = a2.1C; "+"R(A x in ao){ ap[x] = ao[x]; } "+"am."+al+" = 4e; ")};A fI=fK("z.1H");A aj=26.lD();aj.1q.fJ(""+fI+"");aj.lC(1,1,1,1)}z.4M(z.1H,{T:B(fH,fG){C d.T(D,fH,fG)},31:B(lB,lA){A aa=d.4d(P);aa.ae(D);C d.31.14(d,aa)},ah:B(fF,fE){C d.ah(D,fF,fE)},ag:B(fD,fC){C d.ag(D,fD,fC)},1n:B(fB,fA){d.1n(D,fB,fA);C D},23:B(7t,M){C d.23(D,7t,M,d.1H)},af:B(){C d.23(D,d.af)},1c:B(lz,ly){A aa=d.4d(P);aa.ae(D[0]);A s=d.1c.14(d,aa);C(P.G>1)?D:s},lx:B(lw,lv){A aa=d.4d(P);aa.ae(L);A s=D.23(B(i){aa[0]=i;C d.1c.14(d,aa)});C(P.G>1)?D:s},7s:B(fz){C D.1n(B(i){z.7s(i,fz)})},7r:B(fy){C D.1n(B(i){z.7r(i,fy)})},5E:B(fw,7q){A 1m=d.1r(fw)[0];7q=7q||"72";R(A x=0;x=0){if(i[x]<1d){1d=i[x]}}}C(1d<0)?ql:1d};A 6X=B(7l){A i=2I(7l);if(i[0]!=-1){C 7l.21(i[0]+1,a0(7l,1))}I{C""}};A 5r=B(7k){A 5D;A i=2I(7k);if((i[0]==0)||(i[1]==0)){5D=0}I{5D=a0(7k,0)}C((5D>0)?7k.3b(0,5D).1M():"*")};A fg=B(Q){A J=-1;R(A x=0;x=0){if((1S>J)||(J==-1)){J=1S}}}C J};A 9H=B(7i){A i=2I(7i);if(-1==i[1]){C""}A di=i[1]+1;A 7j=fg(i.2w(2));if(di<7j){C 7i.21(di,7j)}I{if(-1==7j){C 7i.3b(di)}I{C""}}};A f3=[{1i:"|=",1f:B(15,fe){C"[5z(3U(\' \',@"+15+",\' \'), \' "+fe+"-\')]"}},{1i:"~=",1f:B(15,fd){C"[5z(3U(\' \',@"+15+",\' \'), \' "+fd+" \')]"}},{1i:"^=",1f:B(15,fb){C"[li-4G(@"+15+", \'"+fb+"\')]"}},{1i:"*=",1f:B(15,fa){C"[5z(@"+15+", \'"+fa+"\')]"}},{1i:"$=",1f:B(15,9Z){C"[21(@"+15+", 3c-G(@"+15+")-"+(9Z.G-1)+")=\'"+9Z+"\']"}},{1i:"!=",1f:B(15,f9){C"[3O(@"+15+"=\'"+f9+"\')]"}},{1i:"=",1f:B(15,f8){C"[@"+15+"=\'"+f8+"\']"}}];A 9C=B(9Y,3Z,f7,f6){A 49;A i=2I(3Z);if(i[2]>=0){A 4L=3Z.T("]",i[2]);A 29=3Z.21(i[2]+1,4L);1s(29&&29.G){if(29.2s(0)=="@"){29=29.2w(1)}49=L;R(A x=0;x<9Y.G;x++){A 1S=9Y[x];A 7h=29.T(1S.1i);if(7h>=0){A 15=29.21(0,7h);A 4a=29.21(7h+1S.1i.G);if((4a.2s(0)=="\\"")||(4a.2s(0)=="\'")){4a=4a.21(1,4a.G-1)}49=1S.1f(d.7g(15),d.7g(4a));3f}}if((!49)&&(29.G)){49=f7(29)}if(49){f6(49)}29=L;A 7f=3Z.T("[",4L);if(0<=7f){4L=3Z.T("]",7f);if(0<=4L){29=3Z.21(7f+1,4L)}}}}};A f0=B(f5){A 4K=".";A 7e=f5.1A(" ");1s(7e.G){A 2K=7e.3a();A 7d;if(2K==">"){7d="/";2K=7e.3a()}I{7d="//"}A f4=5r(2K);4K+=7d+f4;A id=6X(2K);if(id.G){4K+="[@id=\'"+id+"\'][1]"}A cn=9H(2K);if(cn.G){A 9X=" ";if(cn.2s(cn.G-1)=="*"){9X="";cn=cn.3b(0,cn.G-1)}4K+="[5z(3U(\' \',@9P,\' \'), \' "+cn+9X+"\')]"}9C(f3,2K,B(f2){C"[@"+f2+"]"},B(f1){4K+=f1})}C 4K};A 7a={};A eC=B(28){if(7a[28]){C 7a[28]}A 1e=d.1e;A 9W=f0(28);A 4H=B(9V){A J=[];A 7b;1u{7b=1e.9x(9W,9V,L,lh.lg,L)}1y(e){1z.1K("lf in le:",9W,"lc:",9V);1z.1K(e)}A 7c=7b.eZ();1s(7c){J.Y(7c);7c=7b.eZ()}C J};C 7a[28]=4H};A 5x={};A 9B={};A 3y=B(79,78){if(!79){C 78}if(!78){C 79}C B(){C 79.14(26,P)&&78.14(26,P)}};A 75=B(9U,3Y,5B,2J){A 2v=2J+1;A 76=(3Y.G==2v);A 2K=3Y[2J];if(2K==">"){A 77=9U.3W;if(!77.G){C}2v++;76=(3Y.G==2v);A 4H=6O(3Y[2J+1]);R(A x=0,11;x<77.G,11=77[x];x++){if(4H(11)){if(76){5B.Y(11)}I{75(11,3Y,5B,2v)}}}}A 5C=6U(2K)(9U);if(76){1s(5C.G){5B.Y(5C.3a())}}I{1s(5C.G){75(5C.3a(),3Y,5B,2v)}}};A eE=B(9T,eY){A J=[];A x=9T.G-1,11;1s(11=9T[x--]){75(11,eY,J,0)}C J};A 6O=B(3D){if(5x[3D]){C 5x[3D]}A ff=L;A 9S=5r(3D);if(9S!="*"){ff=3y(ff,B(N){C((N.2t==1)&&(9S==N.5w.1M()))})}A 9R=6X(3D);if(9R.G){ff=3y(ff,B(N){C((N.2t==1)&&(N.id==9R))})}if(2Y.5q.14(D,2I(3D).2w(1))>=0){ff=3y(ff,9z(3D))}C 5x[3D]=ff};A 5y=B(E){A pn=E.1L;A 9Q=pn.3W;A 2v=-1;A 3C=pn.5A;if(!3C){C 2v}A ci=E["eW"];A cl=pn["eX"];if(((V cl=="4J")&&(cl!=9Q.G))||(V ci!="4J")){pn["eX"]=9Q.G;A 2J=1;do{if(3C===E){2v=2J}if(3C.2t==1){3C["eW"]=2J;2J++}3C=3C.71}1s(3C)}I{2v=ci}C 2v};A lb=0;A 3X=B(N,15){A 74="";if(15=="9P"){C N.3A||74}if(15=="R"){C N.la||74}C N.5t(15,2)||74};A eH=[{1i:"|=",1f:B(15,9O){A eV=" "+9O+"-";C B(N){A ea=" "+(N.5t(15,2)||"");C((ea==9O)||(ea.T(eV)==0))}}},{1i:"^=",1f:B(15,eU){C B(N){C(3X(N,15).T(eU)==0)}}},{1i:"*=",1f:B(15,eT){C B(N){C(3X(N,15).T(eT)>=0)}}},{1i:"~=",1f:B(15,eS){A 9N=" "+eS+" ";C B(N){A ea=" "+3X(N,15)+" ";C(ea.T(9N)>=0)}}},{1i:"$=",1f:B(15,73){A 9N=" "+73;C B(N){A ea=" "+3X(N,15);C(ea.31(73)==(ea.G-73.G))}}},{1i:"!=",1f:B(15,eR){C B(N){C(3X(N,15)!=eR)}}},{1i:"=",1f:B(15,eQ){C B(N){C(3X(N,15)==eQ)}}}];A 9E=[{1i:"9M-9K",1f:B(1p,l9){C B(N){if(N.2t!=1){C U}A fc=N.eP;1s(fc&&(fc.2t!=1)){fc=fc.eP}C(!fc)}}},{1i:"72-9K",1f:B(1p,l8){C B(N){if(N.2t!=1){C U}A nc=N.71;1s(nc&&(nc.2t!=1)){nc=nc.71}C(!nc)}}},{1i:"l7",1f:B(1p,l6){C B(N){A cn=N.3W;A eO=N.3W.G;R(A x=eO-1;x>=0;x--){A nt=cn[x].2t;if((nt==1)||(nt==3)){C U}}C K}}},{1i:"5z",1f:B(1p,eN){C B(N){C(N.9L.T(eN)>=0)}}},{1i:"3O",1f:B(1p,eM){A eL=6O(eM);C B(N){C(!eL(N))}}},{1i:"l5-9K",1f:B(1p,2u){A pi=eK;if(2u=="l4"){C B(N){C(((5y(N))%2)==1)}}I{if((2u=="2n")||(2u=="l3")){C B(N){C((5y(N)%2)==0)}}I{if(2u.T("l2+")==0){A 70=pi(2u.3b(3));C B(N){C(N.1L.3W[70-1]===N)}}I{if((2u.T("n+")>0)&&(2u.G>3)){A 9J=2u.1A("n+",2);A eJ=pi(9J[0]);A 2J=pi(9J[1]);C B(N){C((5y(N)%eJ)==2J)}}I{if(2u.T("n")==-1){A 70=pi(2u);C B(N){C(5y(N)==70)}}}}}}}}];A 9z=B(3e){A 9I=(9B[3e]||5x[3e]);if(9I){C 9I}A ff=L;A i=2I(3e);if(i[0]>=0){A 24=5r(3e);if(24!="*"){ff=3y(ff,B(N){C(N.5w.1M()==24)})}}A 5u;A 3B=9H(3e);if(3B.G){A 9F=3B.2s(3B.G-1)=="*";if(9F){3B=3B.3b(0,3B.G-1)}A re=S 9G("(?:^|\\\\s)"+3B+(9F?".*":"")+"(?:\\\\s|$)");ff=3y(ff,B(N){C re.6Z(N.3A)})}if(i[3]>=0){A 3z=3e.3b(i[3]+1);A 9D="";A 5v=3z.T("(");A 6Y=3z.31(")");if((0<=5v)&&(0<=6Y)&&(6Y>5v)){9D=3z.21(5v+1,6Y);3z=3z.3b(0,5v)}5u=L;R(A x=0;x<9E.G;x++){A 1S=9E[x];if(1S.1i==3z){5u=1S.1f(3z,9D);3f}}if(5u){ff=3y(ff,5u)}}A eG=(d.1l)?B(5s){A eI=5s.1M();C B(N){C N[5s]||N[eI]}}:B(5s){C B(N){C(N&&N.5t&&N.l1(5s))}};9C(eH,3e,eG,B(eF){ff=3y(ff,eF)});if(!ff){ff=B(){C K}}C 9B[3e]=ff};A 6W={};A 6U=B(3d,1B){A 9A=6W[3d];if(9A){C 9A}A i=2I(3d);A id=6X(3d);if(i[0]==0){C 6W[3d]=B(1B){C[d.1D(id)]}}A 9y=9z(3d);A 5p;if(i[0]>=0){5p=B(1B){A 11=d.1D(id);if(9y(11)){C[11]}}}I{A 3V;A 24=5r(3d);if(2Y.5q.14(D,2I(3d))==-1){5p=B(1B){A J=[];A 11,x=0,3V=1B.4I(24);1s(11=3V[x++]){J.Y(11)}C J}}I{5p=B(1B){A J=[];A 11,x=0,3V=1B.4I(24);1s(11=3V[x++]){if(9y(11)){J.Y(11)}}C J}}}C 6W[3d]=5p};A l0={};A 5o={">":B(1B){A J=[];A 11,x=0,3V=1B.3W;1s(11=3V[x++]){if(11.2t==1){J.Y(11)}}C J}};A 9w=B(6V){if(0>6V.T(" ")){C 6U(6V)}A eD=B(1B){A 6S=6V.1A(" ");A 6T;if(6S[0]==">"){6T=[1B]}I{6T=6U(6S.3a())(1B)}C eE(6T,6S)};C eD};A 9v=((1q["9x"]&&!d.3o)?B(3x){A 6R=3x.1A(" ");if((1q["9x"])&&(3x.T(":")==-1)&&((K))){if(((6R.G>2)&&(3x.T(">")==-1))||(6R.G>3)||(3x.T("[")>=0)||((1==6R.G)&&(0<=3x.T(".")))){C eC(3x)}}C 9w(3x)}:9w);A ey=B(3w){if(5o[3w]){C 5o[3w]}if(0>3w.T(",")){C 5o[3w]=9v(3w)}I{A eB=3w.1A(/\\s*,\\s*/);A 4H=B(1B){A eA=0;A J=[];A 6Q;1s(6Q=eB[eA++]){J=J.3U(9v(6Q,6Q.T(" "))(1B))}C J};C 5o[3w]=4H}};A 5n=0;A ez=B(Q){A J=S d.1H();if(!Q){C J}if(Q[0]){J.Y(Q[0])}if(Q.G<2){C J}5n++;Q[0]["9u"]=5n;R(A x=1,11;11=Q[x];x++){if(Q[x]["9u"]!=5n){J.Y(11)}11["9u"]=5n}C J};d.1r=B(6P,1B){if(V 6P!="3c"){C S d.1H(6P)}if(V 1B=="3c"){1B=d.1D(1B)}C ez(ey(6P)(1B||d.1e))};d.9t=B(ex,9s){A 9r=S d.1H();A ff=(9s)?6O(9s):B(){C K};R(A x=0,11;11=ex[x];x++){if(ff(11)){9r.Y(11)}}C 9r}})()}if(!z.1h["z.X.1b"]){z.1h["z.X.1b"]=K;z.1Q("z.X.1b");z.6K=B(ew){A J={};A iq="kZ[Z!=9q][Z!=kY][Z!=et][Z!=kX][Z!=kW], kV, kU";z.1r(iq,ew).3T(B(E){C(!E.kT)}).1n(B(1m){A 3v=1m.1p;A Z=(1m.Z||"").1M();if((Z=="kS")||(Z=="kR")){if(1m.kQ){J[3v]=1m.1Z}}I{if(1m.kP){A ev=J[3v]=[];z.1r("kO[kN]",1m).1n(B(eu){ev.Y(eu.1Z)})}I{J[3v]=1m.1Z;if(Z=="et"){J[3v+".x"]=J[3v+".y"]=J[3v].x=J[3v].y=0}}}});C J};z.9h=B(23){A ec=kM;A J="";A es={};R(A x in 23){if(23[x]!=es[x]){if(z.2l(23[x])){R(A y=0;y<23[x].G;y++){J+=ec(x)+"="+ec(23[x][y])+"&"}}I{J+=ec(x)+"="+ec(23[x])+"&"}}}if((J.G)&&(J.2s(J.G-1)=="&")){J=J.3b(0,J.G-1)}C J};z.kL=B(er){C z.9h(z.6K(er))};z.kK=B(ep){C z.eq(z.6K(ep))};z.kJ=B(2H){A J={};A qp=2H.1A("&");A dc=kI;z.1n(qp,B(1m){if(1m.G){A 9p=1m.1A("=");A 1p=dc(9p.3a());A 1U=dc(9p.22("="));if(z.1R(J[1p])){J[1p]=[J[1p]]}if(z.2l(J[1p])){J[1p].Y(1U)}I{J[1p]=1U}}});C J};z.e1=U;z.e6={"9g":B(1b){C 1b.2G},"2e":B(1b){if(!1o.eo){1z.1K("kH kG kF a kE of 9g/2e-6M-9m"+" 4F kD kC kB kA 4G en kz"+" (ky 1o.eo=K 4F kx kw D kv)")}C z.5m(1b.2G)},"2e-6M-ku":B(1b){A 6N=1b.2G;A 9o=6N.T("/*");A 9n=6N.31("*/");if((9o==-1)||(9n==-1)){C z.5m(1b.2G)}C z.5m(6N.21(9o+2,9n))},"2e-6M-9m":B(1b){A 6L=1b.2G;A 9l=6L.T("/*");A 9k=6L.31("*/");if((9l==-1)||(9k==-1)){1z.1K("kt en ks\'t 6M 9m!");C""}C z.5m(6L.21(9l+2,9k))},"kr":B(1b){C z.3u(1b.2G)},"kq":B(1b){if(z.1l&&!1b.el){z.1n(["ko","em","kn","km"],B(i){1u{A 1e=S 9j(kl[i]+".kk");1e.kj=U;1e.ki(1b.2G);C 1e}1y(e){}})}I{C 1b.el}}};(B(){z.e5=B(F,ej,ei,eh){A 2F={};2F.F=F;A 6J=L;if(F.3R){A 3R=z.1D(F.3R);A 9i=3R.kh("kg");2F.2E=F.2E||(9i?9i.1Z:L);6J=z.6K(3R)}I{2F.2E=F.2E}A 5l=[{}];if(6J){5l.Y(6J)}if(F.5g){5l.Y(F.5g)}if(F.ek){5l.Y({"z.ek":S 5d().8O()})}2F.1r=z.9h(z.1x.14(L,5l));2F.9d=F.9d||"9g";A d=S z.30(ej);d.5k(ei,B(eg){C eh(eg,d)});A ld=F.4E;if(ld&&z.1Y(ld)){d.ef(B(ee){C ld.2d(F,ee,2F)})}A 1G=F.9f;if(1G&&z.1Y(1G)){d.ed(B(e9){C 1G.2d(F,e9,2F)})}A 6I=F.kf;if(6I&&z.1Y(6I)){d.9e(B(e8){C 6I.2d(F,e8,2F)})}d.1F=2F;C d};A e4=B(O){O.e0=K;A 1b=O.1F.1b;if(V 1b.e7=="B"){1b.e7()}};A e3=B(O){C z.e6[O.1F.9d](O.1F.1b)};A e2=B(9c,O){1z.1K(9c);C 9c};A 3Q=B(F){A O=z.e5(F,e4,e3,e2);O.1F.1b=z.9b(O.1F.F);C O};A 5j=L;A 3t=[];A 94=B(){A dZ=(S 5d()).dU();if(!z.e1){z.1n(3t,B(4D,6H){if(!4D){C}A O=4D.O;1u{if(!O||O.e0||!4D.dT(O)){3t.3S(6H,1);C}if(4D.dR(O)){3t.3S(6H,1);4D.dP(O)}I{if(O.9a){if(O.9a+(O.1F.F.6G||0)0){5c(z.2p(D,B(){D.5b(L,8R)}),d);C D}D.4A=S 5d().8O();if(D.2Z){D.4A-=D.8Q*D.2o}D.8N=D.4A+D.8Q;D.2D=K;D.2Z=U;A 8P=D.2C.4x(D.2o);if(!D.2o){if(!D.4y){D.4y=D.4z}D.3q("dt",[8P])}D.3q("ds",[8P]);D.8M();C D},jS:B(){5e(D.3r);if(!D.2D){C D}D.2Z=K;D.3q("dr",[D.2C.4x(D.2o)]);C D},jR:B(dq,dp){5e(D.3r);D.2D=D.2Z=K;D.2o=dq*6D;if(dp){D.5b()}C D},jQ:B(dn){if(!D.3r){C}5e(D.3r);if(dn){D.2o=1}D.3q("dm",[D.2C.4x(D.2o)]);D.2D=D.2Z=U;C D},3N:B(){if(D.2D){C D.2Z?"3M":"jP"}C"jO"},8M:B(){5e(D.3r);if(D.2D){A dl=S 5d().8O();A 2q=(dl-D.4A)/(D.8N-D.4A);if(2q>=1){2q=1}D.2o=2q;if(D.5a){2q=D.5a(2q)}D.3q("8B",[D.2C.4x(2q)]);if(2q<1){D.3r=5c(z.2p(D,"8M"),D.dj)}I{D.2D=U;if(D.4z>0){D.4z--;D.5b(L,K)}I{if(D.4z==-1){D.5b(L,K)}I{if(D.4y){D.4z=D.4y;D.4y=0}}}D.2o=0;D.3q("dh")}}C D}});(B(){A df=B(E){if(z.1l){A ns=E.1c;if(!ns.8L.G&&z.1c(E,"8L")=="dg"){ns.8L="1"}if(!ns.3n.G&&z.1c(E,"3n")=="8K"){ns.3n="8K"}}};z.6C=B(F){if(V F.1d=="1k"){2m S 1O("z.6C jN an 1d 1Z")}F.E=z.1D(F.E);A 3p=z.1x({6w:{}},F);A 8J=(3p.6w.2W={});8J.1w=(V 3p.1w=="1k")?B(){C 2V(z.1c(3p.E,"2W"))}:3p.1w;8J.1d=3p.1d;A 2U=z.6y(3p);z.2c(2U,"6x",L,B(){df(3p.E)});C 2U};z.8I=B(F){C z.6C(z.1x({1d:1},F))};z.8H=B(F){C z.6C(z.1x({1d:0},F))};if(z.6B&&!z.3o){z.8E=B(n){C 2k("0.5")+((2Y.da((n+2k("1.5"))*2Y.d9))/2)}}I{z.8E=B(n){C 0.5+((2Y.da((n+1.5)*2Y.d9))/2)}}A d4=B(6A){D.8G=6A;R(A p in 6A){A 1a=6A[p];if(1a.1w 1N z.1J){1a.d7=S z.1J()}}D.4x=B(r){A J={};R(A p in D.8G){A 1a=D.8G[p];A 6z=L;if(1a.1w 1N z.1J){6z=z.d8(1a.1w,1a.1d,r,1a.d7).8F()}I{if(!z.2l(1a.1w)){6z=((1a.1d-1a.1w)*r)+1a.1w+(p!="2W"?1a.jM||"px":"")}}J[p]=6z}C J}};z.6y=B(F){F.E=z.1D(F.E);if(!F.5a){F.5a=z.8E}A 2U=S z.d6(F);z.2c(2U,"6x",2U,B(){A pm={};R(A p in D.6w){A 1a=pm[p]=z.1x({},D.6w[p]);if(z.1Y(1a.1w)){1a.1w=1a.1w()}if(z.1Y(1a.1d)){1a.1d=1a.1d()}A d5=(p.1M().T("jL")>=0);B 8C(E,p){4w(p){2X"58":C E.8D;2X"3n":C E.6v}A v=z.1c(E,p);C(p=="2W")?2V(v):2k(v)};if(V 1a.1d=="1k"){1a.1d=8C(D.E,p)}I{if(V 1a.1w=="1k"){1a.1w=8C(D.E,p)}}if(d5){1a.1w=S z.1J(1a.1w);1a.1d=S z.1J(1a.1d)}I{1a.1w=(p=="2W")?2V(1a.1w):2k(1a.1w)}}D.2C=S d4(pm)});z.2c(2U,"8B",2U,B(8A){R(A s in 8A){z.1c(D.E,s,8A[s])}});C 2U}})()}',62,1711,'|||||||||||||||||||||||||||||||||||dojo|var|function|return|this|node|args|length|evt|else|ret|true|null|obj|elem|dfd|arguments|arr|for|new|indexOf|false|typeof||_base|push|type||te|||apply|attr|||||prop|xhr|style|end|doc|match|uri|_hasResource|key|del|undefined|isIE|item|forEach|djConfig|name|document|query|while|_66|try|res|start|mixin|catch|console|split|root|prototype|byId|gcs|ioArgs|err|NodeList|_p|Color|debug|parentNode|toLowerCase|instanceof|Error|constructor|provide|isString|ta|255|val|_a|global|_69|isFunction|value||substring|join|map|tn||window||path|_343|_220|_listeners|connect|call|json|replace|left|_b|toString|128|parseFloat|isArray|throw||_percent|hitch|step|declare|charAt|nodeType|_3c3|nidx|slice|faux|fired|_c4|_7e|loc|curve|_active|url|_44c|responseText|str|_312|idx|tqp|isNaN|isOpera|_22d|callee|add|_18b|_f8|_e2|_41|anim|Number|opacity|case|Math|_paused|Deferred|lastIndexOf|||||||||shift|substr|string|_3e7|_3ce|break|_w|charCode|_listener|_d5|_c5|authority|_49|width|isSafari|_49e|fire|_timer|_47b|_465|eval|_in|_40c|_409|_362|_3d9|className|_3d5|_386|_37a|body|getComputedStyle|box|_221|keyCode|remove|_8d|_46|paused|status|not|_478|_461|form|splice|filter|concat|tret|childNodes|_38b|_367|_33d||||||||||_340|_348|keypress|appendChild|_toArray|Array|_2b0|_toPixelValue|ref|_fixEvent|_19f|_14c|_14a|_150|_141|declaredClass|_d4|_99|_Url|_83|scheme|_67|_3d|switch|getValue|_startRepeatCount|repeat|_startTime|_47e|cancel|tif|load|to|with|tf|getElementsByTagName|number|_34c|_342|extend|_1e3|_normalizeEventName|_14b|_14e|results|self|cbfn|_f9|_d8|_b2|src|_88|dav||baseUrl|fragment|_loadedModules|_44|_43|_loaders|mll|height||easing|play|setTimeout|Date|clearTimeout|hdr|content|code|errback|_464|addCallbacks|_450|fromJson|_413|_3fc|_3ee|max|_31e|cond|getAttribute|_3d4|obi|tagName|_360|_381|contains|firstChild|_368|_372|_320|place|_2fa|scrollTop|_299|scrollLeft|top|documentElement|_288|_287|_getBorderExtents|_23f|_23d|_239|_218|_216|_211|eles|target|keys|shiftKey|ctrlKey|event|192|iel|_1db|delete|_1cf||addEventListener|String|_1af|_157|array|_14d|continue|_14f|_137|_11f|_106|_findMethod|has|_delegate|_dc|_d3|loaded|_9a|_loadInit|_inFlightCount|getObject|tv|_4f|_postLoad|_2d|offsetWidth|properties|beforeBegin|animateProperty|_4ad|_4a6|isKhtml|_fade|100|headers|readyState|timeout|_469|_457|_44d|formToObject|_441|comment|_43d|_36f|_419|tp|_40a|_406|_407|_373|_403|_3e6|_31b|cbi|test|_3c7|nextSibling|last|_3a1|_38e|_365|_36b|ecn|_364|_363|_356|_35e|_35f|_34f|_34d|_349|trim|tci|_328|_32b|_31f|_31c|_anim|_300|_2ff|_2f5|_2e7|removeClass|addClass|func|_2c4|cls|_2a9|_2ae|_280|_27f|_getPadExtents|isMoz|none|_233|cssText|_214|_fixCallback|_synthesizeEvent|stopPropagation|preventDefault|_setKeyChar|_1e1|ieh|_1d7|_1be|colorFromArray|sanitize|bits|rgb|_156|_fire|_resback|_13d|partial|_13a|silentlyCancelled|_topics|_127|_f1|_f0|superclass|_ec|_e3|mct|setObject|_bf|_b3|object|require|_92|_khtmlTimer|location|XMLHTTP|locale|dua|_71|_modulePrefixes|_55|_loadModule|_51|_50|_4e|pop|_3f|_callLoaded|_unloaders|_loadNotifying|_loadedUrls|_27|_24|_1d|_5|_4b7|onAnimate|getStyle|offsetHeight|_defaultEasing|toCss|_properties|fadeOut|fadeIn|_49f|auto|zoom|_cycle|_endTime|valueOf|_494|duration|_492|DELETE|_ioAddQueryToUrl|putData|contentType|password|user|_isDocumentOk|application|||||_466||||||startTime|_xhrObj|_45f|handleAs|addBoth|error|text|objectToQuery|_44f|ActiveXObject|_443|_442|filtered|_43f|_43e|_437|file|tnl|_41c|_filterQueryResult|_zipIdx|_408|_402|evaluate|_3ed|_380|fHit|_361|_33b|_3da|_3ab|_3d6|RegExp|_327|_3cf|_3c9|child|innerHTML|first|tval|_391|class|pnc|_37e|_37c|_375|_366|_35c|_35a|_353|_33c|_336|_314|||_315|_oe|_307|_309|cloneNode|after|createElement||_2f8|_2ef|_2ee|unshift|coords|some|every||_2cb|script|_2c9|parent||a2p||_2c3|_2bd||abs|_getMarginBox|_2b3|_2a6|position|_2a7|_2ac|_2ab|_getIeDocumentElementOffset|getBoundingClientRect|ownerDocument|_2a3|clientWidth|_isBodyLtr|_fixIeBiDiScrollLeft|_bodyLtr|_29d|_getContentBox|_setBox|_getMarginExtents|_getPadBorderExtents|_usesBorderBox|boxModel|pcs|st|sl|_240|runtimeStyle|_dcm|BackCompat|compatMode|default|_21b|_d|html|_event_listener|handlers|PAGE_DOWN|PAGE_UP|RIGHT_ARROW|LEFT_ARROW|DOWN_ARROW|UP_ARROW|_preventDefault||_stopPropagation|returnValue||_trySetKeyCode|cancelBubble|currentTarget|106|_1ee|111||_1e8|_1e7|||se|srcElement|onkeydown||_1d0|_disconnect|lid|_1c0|_connect|_set|_195|_185|_183|_17d|_everyOrSome|_16b|_172|_15b|Function|_154|_escapeString|_140|chain|_check|canceller|_12d|_124|_11a|_10d|_107|inherited|_fa|_f2|_findMixin|_constructor|preamble|_de|clone|tmp|_c7|TMP|_be|_ba|_mixin|isBrowser|lang|firebug||param|modulePaths|_a7|_fireCallback|_a0|setContext||_9c|unloaded||||_96|_93|navigator|_90|_89||protocol|_84|_86|_XMLHTTP_PROGIDS|gears|google|setAttribute|_80|_77|cfg|_6f|_getModuleSymbols|_5a|_58|_53|_4d|_4c|_45|_40|_moduleHasPrefix|_loadUri|_28|_26|_21|_22|tests|doh|_20|_1f|_1c|version|_1b|_19|_getProp|_11|_4|_4a5|_4b3|_Animation|tempColor|blendColors|PI|sin|||||_49a|normal|onEnd||rate||curr|onStop|_497||_496|pct|onPause|onPlay|onBegin|delay||_491|_Line|_48b|wrapForm|PUT|_487|POST|GET|_476|_474|_472|_ioWatch|send|_471|setRequestHeader|open|callback|setInterval|_470|resHandle|_46f|ioCheck|_46e|validCheck|getTime|_ioCancelAll|addOnUnload|clearInterval|dojoType|now|canceled|_blockAsync|_45e|_45c|_459|_ioSetArgs|_contentHandlers|abort|_458|_456||||addErrback|_454|addCallback|_452|_44b|_44a|_449|preventCache|responseXML|Microsoft|JSON|usePlainJson|_431|toJson|_430|_42d|image|opt|ria|_421|_41b|_40b|_zip|_410|_40d|_357|sqf|_374|_3e5|_3df|_38f|clc|pred|parseInt|ntf|_3bf|_3bc|cnl|previousSibling|_3a9|_3a6|_39c|_399|_396|_392|__cachedIndex|__cachedLength|_376|iterateNext|_34a|_355|_354|_32c|_350|_34b|_33f|_33e|_33a|_338|_334|_332||_330|_32e||_322|_316|mousemove|mouseout|mouseover|_305|lastChild||_2f9||_2f2|_2f1|removeChild|_2ec|_2eb|_2ea|_2e6||_2e4|_2e2|_2d6|_2d5|_2d4|_2d3|_2d2|_2d1|_2cd|_2cc|scs|write|_2c8|hasClass|_2c0|_2bb|_2b5|_abs|_docScroll|offsetParent|offsetTop|offsetLeft|absolute|getBoxObjectFor|clientLeft|_setContentSize|_setMarginBox|_28d|_286|_285|_289|NaN|_281|border|_272|_26b|_260|_258|_253|_24c|_246|_23a|_getOpacity|_setOpacity|_238|td|tr|nodeName|FILTER|_22f|_22e|currentStyle|_22c|_22b|display|QuirksMode|unselectable|_217|isMozilla|getElementById|attributes|all|_ie_listener|_getIeDispatcher|_1fd|NUM_LOCK|SCROLL_LOCK|INSERT|END|HOME|PAUSE|F12|F11|F10|F9|F8|F7|F6|F5|F4|F3|F2|F1|63232|SHIFT_TAB|TAB|keyIdentifier|_1f3|stopEvent|_punctMap|222|219|186|onkeypress|_stealthKeyDown|_fixKeys|relatedTarget|_1e0|_1df|_stealthKeydown|_1d6|_1d5|_1d1|_1ca|_1c9|_1cb|_1c2|_1c1|_1c3|_1c4|_1bc|_1b3|_1b2|colorFromHex|colorFromRgb|named|colorFromString|mask|rgba|_19c|_197|_192|setColor|_180|_178|_177|_175|_174|_16d|_166|_164|_163|_162|_15c|_15d|_15e|index|__json__|toJsonIndentStr|_nextId|_12f|_12b|publish|_128|_126|_125|_122|_121|_123|_11c|_11b|_10c|_10b|_108|getDispatcher|argument|nom|_construct|_core|_makeCtor|_df|_db|deprecated|isObject|_cc||scope||_hitchArgs|_c2||pre|_c1|native|isDebug||registerModulePath|_a8||finally|||_a6|_a5|_a4|_a3|_a2|_a1|_9f|_9e|_9d|_9b|_98|_97|onbeforeunload|ipt|scr|complete|_95|userAgent|_modulesLoaded|initialized|_initFired|_8c|_8a|_getText|_87|ieForceActiveXXhr|Msxml2|isGears|_81|_gearsObject|googlegears|GearsFactory|isFF|_7d|Safari|_72|_name|_6c|ire|ore|_68|i18n|_5b|requireIf|_56|_52|loading|_4a|_loadPath|_47|_48|_global_omit_module_check|_getModulePrefix|_3c|_3a|_37|_30|Boolean|_loadUriAndCheck|_2e||cacheBust|_1e|_1a|_17|_16|_15|_14|_f|_10|_e|_9|_8|revision|flag|patch|minor|major|_6|color|units|needs|stopped|playing|stop|gotoPercent|pause|1000|implemented|yet|_48a|xhrDelete|rawXhrPut|xhrPut|postData|rawXhrPost|xhrPost|xhrGet|Type|Content|sync|response|http|bad|urlencoded|www|_watchInFlightError||exceeded|handle|action|getAttributeNode|loadXML|async|XMLDOM|prefixes|MSXML3|MSXML|MSXML2||xml|javascript|wasn|your|optional|message|off|turn|use|endpoints|issues|security|potential|avoid|mimetype|using|consider|please|decodeURIComponent|queryToObject|formToJson|formToQuery|encodeURIComponent|selected|option|multiple|checked|checkbox|radio|disabled|textarea|select|button|reset|submit|input|_3fb|hasAttribute|0n|even|odd|nth|_3b5|empty|_3b1|_3ad|htmlFor|_38a|under||exprssion|failure|ANY_TYPE|XPathResult|starts|keyup|keydown|mouseup|mousedown|blur|click|combine|span|addContent||adopt|orphan|_2de|_2dd|styles|_2da|_2d9|_2cf|_2ce|show|createPopup|toggleClass|scrollWidth|clientTop|ltr|direction|pageXOffset|pageYOffset|fixed|contentBox|marginBox|BUTTON|TABLE|_getBorderBox|clientHeight|visible|overflow|marginBottom|marginRight|marginTop|marginLeft|borderBottomWidth|borderBottomStyle|borderRightWidth|borderRightStyle|borderTopWidth|borderTopStyle|borderLeftWidth|borderLeftStyle|paddingBottom|paddingRight|paddingTop|paddingLeft|offset||min|padding||margin|Opacity|Alpha|alpha|filters|pixelLeft|medium|_22a|defaultView|before||insertBefore|KhtmlUserSelect|MozUserSelect|setSelectable|isDescendant|div|_destroyElement|BackgroundImageCache|execCommand|PageDown|PageUp|Right|Left|Down|Up|63289|63249|63248|PRINT_SCREEN|63302|63277|63276|63275|63273|63272|63250|63247|63246|63245|63244|63243|63242|63241|63240|63239|63238|63237|63236|63235|63234|63233|Enter|_1f9|which|_1f6|bubbledKeyCode|221|220||||191|190|189|188|187|toElement|fromElement|clientY|pageY||clientX|pageX|offsetY|||layerY|offsetX|layerX|parentWindow|_nop|_allow_leaks|145|144|126|F15|125|F14|124|F13|123|122|121|120|119|118|117|116|115|114|113|112|NUMPAD_DIVIDE|110|NUMPAD_PERIOD|109|NUMPAD_MINUS|108|NUMPAD_ENTER|107|NUMPAD_PLUS|NUMPAD_MULTIPLY|105|NUMPAD_9|104|NUMPAD_8|103|NUMPAD_7|102|NUMPAD_6|101|NUMPAD_5|NUMPAD_4||NUMPAD_3|NUMPAD_2|NUMPAD_1|NUMPAD_0||SELECT|RIGHT_WINDOW||LEFT_WINDOW||HELP|SPACE|ESCAPE|CAPS_LOCK|ALT|CTRL|SHIFT|ENTER|CLEAR|BACKSPACE|attachEvent|fixEvent|fromCharCode|keyChar|_1b9|removeEventListener|0x|round|toHex|toRgba|toRgb|aqua|teal|blue|navy|yellow|olive|lime|green|fuchsia|purple|red|maroon|white|gray|silver|black|boolean|called|already|Cancelled|connectPublisher|unsubscribe|subscribe|disconnect|_113|_112||_111|_110|||found|was||must|_|module|||required|likely|It|declaration|Mixin|separate|instead|property|initializer||pass|_c9|_bb|_b7|nfunction|isAlien|isFinite|isArrayLike|_firebug|withDoc|withGlobal|_writeIncludes|VML|behavior|addRule|createStyleSheet|vml|com|microsoft|schemas|urn|namespaces|onunload|onreadystatechange|defer|khtml|WebKit|DOMContentLoaded|enableMozDomContentLoaded|domcontentloaded|Unable|base|chrome|1223|304|300|200|available|XMLHttpRequest|_println|language|userLanguage|isQuirks|factory|mimeTypes|Factory|Gears|_7f|MSIE||Firefox|Gecko|Konqueror||Opera|appVersion|xd|browser|moduleUrl|port|host|hostenv|_requireLocalization|_5f|_5e|_5d|_5c|requireLocalization|requireAfterIf|_57|common|platformRequire|defined|symbol|_isXDomain|tried|Could|__package__|packageFileName|_42|useXDomain|flight|still|files|addOnLoad|failed|sourceURL|util|notice|without|change|subject|APIs|EXPERIMENTAL|experimental|removed|will|DEPRECATED|exists|10315|Rev|Mobile|Spidermonkey|Rhino||Browser|delayMozLoadingFix|preventBackButtonFix|libraryScriptUri|baseRelativePath|baseScriptUri|allowQueryConfig|warn|trace|timeEnd||time|profileEnd|profile|log|info|groupEnd|group|dirxml|dir|count|assert'.split('|'),0,{}); + + +/* + +Prototype 1.5 rc0 + - Adapted from Ruby on Rails - http://dev.rubyonrails.org/browser/spinoffs/prototype/src + - By Lunarmedia, 06 August, 2006 + - Available at (and packed with) JavascriptCompressor.com + +Please note this version is missing the selector.js component of the full Prototype library. +You can get the compressed version of selector at JavascriptCompressor.com + +*/ + +var decompressedPrototype = function(p,a,c,k,e,d){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[(function(e){return d[e]})];e=(function(){return'\\w+'});c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('d T={4l:\'1.5.8P\',3E:\'(?:<3G.*?>)((\\n|\\r|.)*?)(?:<\\/3G>)\',2v:7(){},K:7(x){c x}};d 1b={17:7(){c 7(){6.1I.2n(6,N)}}};d 1e=z q();q.u=7(5d,O){G(d 1G 2M O){5d[1G]=O[1G]}c 5d};q.1U=7(U){1j{f(U==1v)c\'1v\';f(U==1L)c\'1L\';c U.1U?U.1U():U.2C()}1s(e){f(e 8R 9l)c\'...\';25 e}};7j.v.1d=7(){d 43=6,23=$A(N),U=23.8S();c 7(){c 43.2n(U,23.3s($A(N)))}};7j.v.8U=7(U){d 43=6;c 7(C){c 43.8V(U,C||1W.C)}};q.u(8Q.v,{8W:7(){d 4Z=6.2C(16);f(6<16)c\'0\'+4Z;c 4Z},5j:7(){c 6+1},8Y:7(o){$R(0,6,11).V(o);c 6}});d 6s={6j:7(){d 48;G(d i=0;i0){f(I=O.I(1A)){L+=O.47(0,I.w);L+=(1z(I)||\'\').2C();O=O.47(I.w+I[0].t)}1D{L+=O,O=\'\'}}c L},92:7(1A,1z,3i){1z=6.2T.52(1z);3i=3i===1v?1:3i;c 6.2T(1A,7(I){f(--3i<0)c I[0];c 1z(I)})},93:7(1A,o){6.2T(1A,o);c 6},94:7(t,2S){t=t||30;2S=2S===1v?\'...\':2S;c 6.t>t?6.47(0,t-2S.t)+2S:6},9F:7(){c 6.2y(/^\\s+/,\'\').2y(/\\s+$/,\'\')},71:7(){c 6.2y(/<\\/?[^>]+>/7Y,\'\')},2Q:7(){c 6.2y(z 3O(T.3E,\'5P\'),\'\')},70:7(){d 6Y=z 3O(T.3E,\'5P\');d 5p=z 3O(T.3E,\'98\');c(6.I(6Y)||[]).1C(7(5o){c(5o.I(5p)||[\'\',\'\'])[1]})},3q:7(){c 6.70().1C(7(3G){c 4q(3G)})},9E:7(){d 1q=J.4Y(\'1q\');d 1Y=J.9D(6);1q.75(1Y);c 1q.3h},9c:7(){d 1q=J.4Y(\'1q\');1q.3h=6.71();c 1q.2z[0]?1q.2z[0].6q:\'\'},78:7(){d 7i=6.I(/^\\??(.*)$/)[1].3j(\'&\');c 7i.36({},7(5b,72){d 1i=72.3j(\'=\');5b[1i[0]]=1i[1];c 5b})},1Z:7(){c 6.3j(\'\')},3P:7(){d 2l=6.3j(\'-\');f(2l.t==1)c 2l[0];d 54=6.5g(\'-\')==0?2l[0].7e(0).3Y()+2l[0].7g(1):2l[0];G(d i=1,73=2l.t;i<73;i++){d s=2l[i];54+=s.7e(0).3Y()+s.7g(1)}c 54},1U:7(){c"\'"+6.2y(/\\\\/g,\'\\\\\\\\\').2y(/\'/g,\'\\\\\\\'\')+"\'"}});4b.v.2T.52=7(1z){f(2i 1z==\'7\')c 1z;d 2U=z 3n(1z);c 7(I){c 2U.7a(I)}};4b.v.9h=4b.v.78;d 3n=1b.17();3n.79=/(^|.|\\r|\\n)(#\\{(.*?)\\})/;3n.v={1I:7(2U,1A){6.2U=2U.2C();6.1A=1A||3n.79},7a:7(U){c 6.2U.2T(6.1A,7(I){d 53=I[1];f(53==\'\\\\\')c I[2];c 53+(U[I[3]]||\'\').2C()})}};d $1y=z q();d $49=z q();d 1p={V:7(o){d w=0;1j{6.2m(7(h){1j{o(h,w++)}1s(e){f(e!=$49)25 e}})}1s(e){f(e!=$1y)25 e}},9n:7(o){d L=11;6.V(7(h,w){L=L&&!!(o||T.K)(h,w);f(!L)25 $1y});c L},9o:7(o){d L=11;6.V(7(h,w){f(L=!!(o||T.K)(h,w))25 $1y});c L},3e:7(o){d P=[];6.V(7(h,w){P.W(o(h,w))});c P},7n:7(o){d L;6.V(7(h,w){f(o(h,w)){L=h;25 $1y}});c L},7o:7(o){d P=[];6.V(7(h,w){f(o(h,w))P.W(h)});c P},9p:7(1A,o){d P=[];6.V(7(h,w){d 7c=h.2C();f(7c.I(1A))P.W((o||T.K)(h,w))});c P},1M:7(U){d 51=Y;6.V(7(h){f(h==U){51=11;25 $1y}});c 51},36:7(45,o){6.V(7(h,w){45=o(45,h,w)});c 45},9q:7(1F){d 23=$A(N).47(1);c 6.3e(7(h){c h[1F].2n(h,23)})},9s:7(o){d L;6.V(7(h,w){h=(o||T.K)(h,w);f(L==1v||h>=L)L=h});c L},9u:7(o){d L;6.V(7(h,w){h=(o||T.K)(h,w);f(L==1v||hb?1:0}).3r(\'h\')},1Z:7(){c 6.3e(T.K)},9B:7(){d o=T.K,23=$A(N);f(2i 23.5e()==\'7\')o=23.9C();d 7l=[6].3s(23).1C($A);c 6.1C(7(h,w){c o(7l.3r(w))})},1U:7(){c\'#<1p:\'+6.1Z().1U()+\'>\'}};q.u(1p,{1C:1p.3e,5v:1p.7n,1k:1p.7o,8M:1p.1M,7p:1p.1Z});d $A=1E.7q=7(2R){f(!2R)c[];f(2R.1Z){c 2R.1Z()}1D{d P=[];G(d i=0;i<2R.t;i++)P.W(2R[i]);c P}};q.u(1E.v,1p);f(!1E.v.4d)1E.v.4d=1E.v.4m;q.u(1E.v,{2m:7(o){G(d i=0;i<6.t;i++)o(6[i])},5i:7(){6.t=0;c 6},7r:7(){c 6[0]},5e:7(){c 6[6.t-1]},7s:7(){c 6.1k(7(h){c h!=1v||h!=1L})},6J:7(){c 6.36([],7(6H,h){c 6H.3s(h&&h.5D==1E?h.6J():[h])})},5s:7(){d 4N=$A(N);c 6.1k(7(h){c!4N.1M(h)})},5g:7(U){G(d i=0;i<6.t;i++)f(6[i]==U)c i;c-1},4m:7(5h){c(5h!==Y?6:6.1Z()).4d()},1U:7(){c\'[\'+6.1C(q.1U).1N(\', \')+\']\'}});d 4h={2m:7(o){G(d 1O 2M 6){d h=6[1O];f(2i h==\'7\')49;d 1i=[1O,h];1i.1O=1O;1i.h=h;o(1i)}},7t:7(){c 6.3r(\'1O\')},4N:7(){c 6.3r(\'h\')},7u:7(2N){c $H(2N).36($H(6),7(4Q,1i){4Q[1i.1O]=1i.h;c 4Q})},7w:7(){c 6.1C(7(1i){c 1i.1C(4n).1N(\'=\')}).1N(\'&\')},1U:7(){c\'#<4h:{\'+6.1C(7(1i){c 1i.1C(q.1U).1N(\': \')}).1N(\', \')+\'}>\'}};7 $H(U){d 2N=q.u({},U||{});q.u(2N,1p);q.u(2N,4h);c 2N};3L=1b.17();q.u(3L.v,1p);q.u(3L.v,{1I:7(22,2x,2H){6.22=22;6.2x=2x;6.2H=2H},2m:7(o){d h=6.22;2q{o(h);h=h.5j()}1H(6.1M(h))},1M:7(h){f(h<6.22)c Y;f(6.2H)c h<6.2x;c h<=6.2x}});d $R=7(22,2x,2H){c z 3L(22,2x,2H)};d M={4w:7(){c 6s.6j(7(){c z 5C()},7(){c z 5n(\'7y.6d\')},7(){c z 5n(\'7z.6d\')})||Y},4s:0};M.2W={3b:[],2m:7(o){6.3b.2m(o)},69:7(4F){f(!6.1M(4F))6.3b.W(4F)},7A:7(5t){6.3b=6.3b.5s(5t)},3y:7(1a,26,E,2Z){6.V(7(3o){f(3o[1a]&&2i 3o[1a]==\'7\'){1j{3o[1a].2n(3o,[26,E,2Z])}1s(e){}}})}};q.u(M.2W,1p);M.2W.69({5G:7(){M.4s++},1B:7(){M.4s--}});M.44=7(){};M.44.v={4a:7(m){6.m={1F:\'4j\',4p:11,5H:\'5E/x-86-Q-7C\',28:\'\'};q.u(6.m,m||{})},3l:7(){c 6.E.32==1v||6.E.32==0||(6.E.32>=84&&6.E.32<7E)},7G:7(){c!6.3l()}};M.3t=1b.17();M.3t.5L=[\'7H\',\'80\',\'7I\',\'7J\',\'4t\'];M.3t.v=q.u(z M.44(),{1I:7(1l,m){6.E=M.4w();6.4a(m);6.26(1l)},26:7(1l){d 28=6.m.28||\'\';f(28.t>0)28+=\'&7K=\';1j{6.1l=1l;f(6.m.1F==\'7L\'&&28.t>0)6.1l+=(6.1l.I(/\\?/)?\'&\':\'?\')+28;M.2W.3y(\'5G\',6,6.E);6.E.7N(6.m.1F,6.1l,6.m.4p);f(6.m.4p){6.E.5T=6.5J.1d(6);2Y((7(){6.4r(1)}).1d(6),10)}6.5A();d 1c=6.m.5V?6.m.5V:28;6.E.7O(6.m.1F==\'4j\'?1c:1L)}1s(e){6.3p(e)}},5A:7(){d 1P=[\'X-7P-7Q\',\'5C\',\'X-T-4l\',T.4l,\'7R\',\'1Y/7m, 1Y/2e, 5E/5F, 1Y/5F, */*\'];f(6.m.1F==\'4j\'){1P.W(\'5Q-2g\',6.m.5H);f(6.E.7S)1P.W(\'7T\',\'7U\')}f(6.m.1P)1P.W.2n(1P,6.m.1P);G(d i=0;i<1P.t;i+=2)6.E.7V(1P[i],1P[i+1])},5J:7(){d 2F=6.E.2F;f(2F!=1)6.4r(6.E.2F)},4A:7(B){1j{c 6.E.7W(B)}1s(e){}},5M:7(){1j{c 4q(\'(\'+6.4A(\'X-7X\')+\')\')}1s(e){}},5R:7(){1j{c 4q(6.E.3F)}1s(e){6.3p(e)}},4r:7(2F){d C=M.3t.5L[2F];d E=6.E,2Z=6.5M();f(C==\'4t\'){1j{(6.m[\'2I\'+6.E.32]||6.m[\'2I\'+(6.3l()?\'81\':\'82\')]||T.2v)(E,2Z)}1s(e){6.3p(e)}f((6.4A(\'5Q-2g\')||\'\').I(/^1Y\\/7m/i))6.5R()}1j{(6.m[\'2I\'+C]||T.2v)(E,2Z);M.2W.3y(\'2I\'+C,6,E,2Z)}1s(e){6.3p(e)}f(C==\'4t\')6.E.5T=T.2v},3p:7(57){(6.m.5W||T.2v)(6,57);M.2W.3y(\'5W\',6,57)}});M.4C=1b.17();q.u(q.u(M.4C.v,M.3t.v),{1I:7(1w,1l,m){6.4x={3m:1w.3m?$(1w.3m):$(1w),3z:1w.3z?$(1w.3z):(1w.3m?1L:$(1w))};6.E=M.4w();6.4a(m);d 1B=6.m.1B||T.2v;6.m.1B=(7(E,U){6.5Y();1B(E,U)}).1d(6);6.26(1l)},5Y:7(){d 3A=6.3l()?6.4x.3m:6.4x.3z;d 3k=6.E.3F;f(!6.m.3q)3k=3k.2Q();f(3A){f(6.m.60){z 6.m.60(3A,3k)}1D{k.6h(3A,3k)}}f(6.3l()){f(6.1B)2Y(6.1B.1d(6),10)}}});M.61=1b.17();M.61.v=q.u(z M.44(),{1I:7(1w,1l,m){6.4a(m);6.1B=6.m.1B;6.1J=(6.m.1J||2);6.2s=(6.m.2s||1);6.4B={};6.1w=1w;6.1l=1l;6.22()},22:7(){6.m.1B=6.63.1d(6);6.2D()},7b:7(){6.4B.1B=1v;89(6.65);(6.1B||T.2v).2n(6,N)},63:7(26){f(6.m.2s){6.2s=(26.3F==6.64?6.2s*6.m.2s:1);6.64=26.3F}6.65=2Y(6.2D.1d(6),6.2s*6.1J*4z)},2D:7(){6.4B=z M.4C(6.1w,6.1l,6.m)}});7 $(){d P=[],4;G(d i=0;i<4V>\'+6.2t+\'\';c $A(1q.2z[0].2z[0].2z)}};d 1g=z q();1g.6W=1b.17();1g.6W.v=q.u(z 1e.1g(\'96\'),{2V:7(){6.1K.97(6.4)},2X:7(2h){2h.V((7(2j){6.4.1X.55(2j,6.4)}).1d(6))}});1g.5m=1b.17();1g.5m.v=q.u(z 1e.1g(\'99\'),{2V:7(){6.1K.56(6.4);6.1K.74(11)},2X:7(2h){2h.4m(Y).V((7(2j){6.4.55(2j,6.4.9a)}).1d(6))}});1g.7h=1b.17();1g.7h.v=q.u(z 1e.1g(\'9d\'),{2V:7(){6.1K.56(6.4);6.1K.74(6.4)},2X:7(2h){2h.V((7(2j){6.4.75(2j)}).1d(6))}});1g.76=1b.17();1g.76.v=q.u(z 1e.1g(\'9i\'),{2V:7(){6.1K.9m(6.4)},2X:7(2h){2h.V((7(2j){6.4.1X.55(2j,6.4.9t)}).1d(6))}});k.3S=1b.17();k.3S.v={1I:7(4){6.4=$(4)},2m:7(o){6.4.1f.3j(/\\s+/).1k(7(B){c B.t>0}).2m(o)},5c:7(1f){6.4.1f=1f},7k:7(5a){f(6.1M(5a))c;6.5c(6.1Z().3s(5a).1N(\' \'))},42:7(4c){f(!6.1M(4c))c;6.5c(6.1k(7(1f){c 1f!=4c}).1N(\' \'))},2C:7(){c 6.1Z().1N(\' \')}};q.u(k.3S.v,1p);d 5I={5i:7(){G(d i=0;i=0){2b=4.m[w];h=2b.h||2b.1Y}c[4.B,h]},5X:7(4){d h=[];G(d i=0;i<4.t;i++){d 2b=4.m[i];f(2b.87)h.W(2b.h||2b.1Y)}c[4.B,h]}};d $F=D.k.1x;1e.3D=7(){};1e.3D.v={1I:7(4,1J,1a){6.1J=1J;6.4=$(4);6.1a=1a;6.2K=6.1x();6.2A()},2A:7(){5Z(6.2D.1d(6),6.1J*4z)},2D:7(){d h=6.1x();f(6.2K!=h){6.1a(6.4,h);6.2K=h}}};D.k.3C=1b.17();D.k.3C.v=q.u(z 1e.3D(),{1x:7(){c D.k.1x(6.4)}});D.3C=1b.17();D.3C.v=q.u(z 1e.3D(),{1x:7(){c D.3a(6.4)}});1e.2c=7(){};1e.2c.v={1I:7(4,1a){6.4=$(4);6.1a=1a;6.2K=6.1x();f(6.4.1h.2w()==\'Q\')6.67();1D 6.2A(6.4)},4K:7(){d h=6.1x();f(6.2K!=h){6.1a(6.4,h);6.2K=h}},67:7(){d 12=D.2L(6.4);G(d i=0;i<12.t;i++)6.2A(12[i])},2A:7(4){f(4.2g){6c(4.2g.2w()){1r\'6g\':1r\'6i\':1o.3B(4,\'8j\',6.4K.1d(6));1y;1r\'6l\':1r\'1Y\':1r\'3J\':1r\'1k-6n\':1r\'1k-8t\':1o.3B(4,\'8u\',6.4K.1d(6));1y}}}};D.k.2c=1b.17();D.k.2c.v=q.u(z 1e.2c(),{1x:7(){c D.k.1x(6.4)}});D.2c=1b.17();D.2c.v=q.u(z 1e.2c(),{1x:7(){c D.3a(6.4)}});f(!1W.1o){d 1o=z q()}q.u(1o,{8C:8,8F:9,8H:13,8I:27,8J:37,8L:38,8O:39,8T:40,8X:46,4:7(C){c C.Z||C.91},95:7(C){c(((C.6X)&&(C.6X==1))||((C.6Z)&&(C.6Z==1)))},9b:7(C){c C.9e||(C.9f+(J.3R.2G||J.1c.2G))},9g:7(C){c C.9j||(C.9k+(J.3R.2O||J.1c.2O))},7b:7(C){f(C.7d){C.7d();C.9r()}1D{C.48=Y;C.9w=11}},9A:7(C,1h){d 4=1o.4(C);1H(4.1X&&(!4.1h||(4.1h.3Y()!=1h.3Y())))4=4.1X;c 4},1T:Y,5u:7(4,B,1V,1u){f(!6.1T)6.1T=[];f(4.5f){6.1T.W([4,B,1V,1u]);4.5f(B,1V,1u)}1D f(4.4i){6.1T.W([4,B,1V,1u]);4.4i(\'2I\'+B,1V)}},66:7(){f(!1o.1T)c;G(d i=0;i<1o.1T.t;i++){1o.5N.2n(6,1o.1T[i]);1o.1T[i][0]=1L}1o.1T=Y},3B:7(4,B,1V,1u){d 4=$(4);1u=1u||Y;f(B==\'5U\'&&(33.4u.I(/3x|3w|3u/)||4.4i))B=\'5K\';6.5u(4,B,1V,1u)},5N:7(4,B,1V,1u){d 4=$(4);1u=1u||Y;f(B==\'5U\'&&(33.4u.I(/3x|3w|3u/)||4.4k))B=\'5K\';f(4.5x){4.5x(B,1V,1u)}1D f(4.4k){1j{4.4k(\'2I\'+B,1V)}1s(e){}}}});f(33.4u.I(/\\88\\b/))1o.3B(1W,\'8a\',1o.66,Y);d 2d={6o:Y,4P:7(){6.6z=1W.8e||J.3R.2G||J.1c.2G||0;6.6F=1W.8g||J.3R.2O||J.1c.2O||0},6u:7(4){d 19=0,15=0;2q{19+=4.2O||0;15+=4.2G||0;4=4.1X}1H(4);c[15,19]},35:7(4){d 19=0,15=0;2q{19+=4.29||0;15+=4.2f||0;4=4.1Q}1H(4);c[15,19]},68:7(4){d 19=0,15=0;2q{19+=4.29||0;15+=4.2f||0;4=4.1Q;f(4){p=k.1R(4,\'14\');f(p==\'3T\'||p==\'2o\')1y}}1H(4);c[15,19]},1Q:7(4){f(4.1Q)c 4.1Q;f(4==J.1c)c 4;1H((4=4.1X)&&4!=J.1c)f(k.1R(4,\'14\')!=\'4G\')c 4;c J.1c},8o:7(4,x,y){f(6.6o)c 6.6r(4,x,y);6.3g=x;6.34=y;6.1t=6.35(4);c(y>=6.1t[1]&&y<6.1t[1]+4.2k&&x>=6.1t[0]&&x<6.1t[0]+4.2p)},6r:7(4,x,y){d 4S=6.6u(4);6.3g=x+4S[0]-6.6z;6.34=y+4S[1]-6.6F;6.1t=6.35(4);c(6.34>=6.1t[1]&&6.34<6.1t[1]+4.2k&&6.3g>=6.1t[0]&&6.3g<6.1t[0]+4.2p)},8E:7(3Z,4){f(!3Z)c 0;f(3Z==\'8G\')c((6.1t[1]+4.2k)-6.34)/4.2k;f(3Z==\'8K\')c((6.1t[0]+4.2p)-6.3g)/4.2p},77:7(O,Z){O=$(O);Z=$(Z);Z.l.14=\'2o\';d 2P=6.35(O);Z.l.1n=2P[1]+\'1m\';Z.l.18=2P[0]+\'1m\';Z.l.21=O.2p+\'1m\';Z.l.24=O.2k+\'1m\'},4e:7(4M){d 19=0,15=0;d 4=4M;2q{19+=4.29||0;15+=4.2f||0;f(4.1Q==J.1c)f(k.1R(4,\'14\')==\'2o\')1y}1H(4=4.1Q);4=4M;2q{19-=4.2O||0;15-=4.2G||0}1H(4=4.1X);c[15,19]},77:7(O,Z){d m=q.u({5l:11,5r:11,5B:11,5q:11,29:0,2f:0},N[2]||{});O=$(O);d p=2d.4e(O);Z=$(Z);d 2J=[0,0];d 3v=1L;f(k.1R(Z,\'14\')==\'2o\'){3v=2d.1Q(Z);2J=2d.4e(3v)}f(3v==J.1c){2J[0]-=J.1c.2f;2J[1]-=J.1c.29}f(m.5l)Z.l.18=(p[0]-2J[0]+m.2f)+\'1m\';f(m.5r)Z.l.1n=(p[1]-2J[1]+m.29)+\'1m\';f(m.5B)Z.l.21=O.2p+\'1m\';f(m.5q)Z.l.24=O.2k+\'1m\'},8b:7(4){4=$(4);f(4.l.14==\'2o\')c;2d.4P();d 2P=2d.68(4);d 1n=2P[1];d 18=2P[0];d 21=4.6m;d 24=4.6p;4.6P=18-3X(4.l.18||0);4.6I=1n-3X(4.l.1n||0);4.5k=4.l.21;4.7f=4.l.24;4.l.14=\'2o\';4.l.1n=1n+\'1m\';4.l.18=18+\'1m\';4.l.21=21+\'1m\';4.l.24=24+\'1m\'},8w:7(4){4=$(4);f(4.l.14==\'3T\')c;2d.4P();4.l.14=\'3T\';d 1n=3X(4.l.1n||0)-(4.6I||0);d 18=3X(4.l.18||0)-(4.6P||0);4.l.1n=1n+\'1m\';4.l.18=18+\'1m\';4.l.24=4.7f;4.l.21=4.5k}};f(/3x|3w|3u/.4v(33.62)){2d.35=7(4){d 19=0,15=0;2q{19+=4.29||0;15+=4.2f||0;f(4.1Q==J.1c)f(k.1R(4,\'14\')==\'2o\')1y;4=4.1Q}1H(4);c[15,19]}};',62,600,'||||element||this|function|||||return|var||if||value|||Element|style|options||iterator||Object|||length|extend|prototype|index|||new||name|event|Form|transport||for||match|document||result|Ajax|arguments|source|results|form|||Prototype|object|each|push||false|target||true|elements||position|valueL||create|left|valueT|callback|Class|body|bind|Abstract|className|Insertion|tagName|pair|try|select|url|px|top|Event|Enumerable|div|case|catch|offset|useCapture|undefined|container|getValue|break|replacement|pattern|onComplete|map|else|Array|method|property|while|initialize|frequency|range|null|include|join|key|requestHeaders|offsetParent|getStyle|parameter|observers|inspect|observer|window|parentNode|text|toArray|els|width|start|args|height|throw|request||parameters|offsetTop|methods|opt|EventObserver|Position|html|offsetLeft|type|fragments|typeof|fragment|offsetHeight|oStringList|_each|apply|absolute|offsetWidth|do|cache|decay|content|input|emptyFunction|toLowerCase|end|replace|childNodes|registerCallback|display|toString|onTimerEvent|Serializers|readyState|scrollLeft|exclusive|on|delta|lastValue|getElements|in|hash|scrollTop|offsets|stripScripts|iterable|truncation|gsub|template|initializeRange|Responders|insertContent|setTimeout|json||hidden|status|navigator|ycomp|cumulativeOffset|inject||||serialize|responders|_overflow|Methods|collect|adjacency|xcomp|innerHTML|count|split|response|responseIsSuccess|success|Template|responder|dispatchException|evalScripts|pluck|concat|Request|KHTML|parent|Safari|Konqueror|dispatch|failure|receiver|observe|Observer|TimedObserver|ScriptFragment|responseText|script|inputs|ancestor|textarea|classNames|ObjectRange|node|typeName|RegExp|camelize|none|documentElement|ClassNames|relative|right|overflow|HTMLElement|parseFloat|toUpperCase|mode||currentlyExecuting|remove|__method|Base|memo||slice|returnValue|continue|setOptions|String|classNameToRemove|_reverse|page|focus|queryComponent|Hash|attachEvent|post|detachEvent|Version|reverse|encodeURIComponent|disabled|asynchronous|eval|respondToReadyState|activeRequestCount|Complete|appVersion|test|getTransport|containers|matchingInputs|1000|header|updater|Updater|getElementsByTagName|child|responderToAdd|static|tagElements|queryComponents|defaultView|onElementEvent|css|forElement|values|visibility|prepare|mergedHash|pos|offsetcache|_madePositioned|visible|tbody|findOrStore|_nativeExtensions|createElement|digits|trues|found|prepareReplacement|before|camelizedString|insertBefore|selectNodeContents|exception|falses|criteria|classNameToAdd|params|set|destination|last|addEventListener|indexOf|inline|clear|succ|_originalWidth|setLeft|Top|ActiveXObject|scriptTag|matchOne|setHeight|setTop|without|responderToRemove|_observeAndCache|find|reset|removeEventListener|activate|findFirstElement|setRequestHeaders|setWidth|XMLHttpRequest|constructor|application|xml|onCreate|contentType|Field|onStateChange|keydown|Events|evalJSON|stopObserving|inputSelector|img|Content|evalResponse|selectOne|onreadystatechange|keypress|postBody|onException|selectMany|updateContent|setInterval|insertion|PeriodicalUpdater|userAgent|updateComplete|lastText|timer|unloadCache|registerFormCallbacks|positionedOffset|register|parentElement|children|switch|XMLHTTP|_extended|hide|checkbox|update|radio|these|outerHTML|password|clientWidth|one|includeScrollOffsets|clientHeight|nodeValue|withinIncludingScrolloffsets|Try|scrollTo|realOffset|getComputedStyle|show|currentStyle|auto|deltaX|originalPosition|originalVisibility|originalWidth|originalHeight|opera|deltaY|bottom|array|_originalTop|flatten|addMethods|lambda|Toggle|toggle|insertAdjacentHTML|_originalLeft|PeriodicalExecuter|ownerDocument|createRange|createContextualFragment|contentFromAnonymousTable|table|Before|which|matchAll|button|extractScripts|stripTags|pairString|len|collapse|appendChild|After|clone|toQueryParams|Pattern|evaluate|stop|stringValue|preventDefault|charAt|_originalHeight|substring|Bottom|pairs|Function|add|collections|javascript|detect|findAll|entries|from|first|compact|keys|merge|present|toQueryString|getInputs|Msxml2|Microsoft|unregister|disable|urlencoded|blur|300|enable|responseIsFailure|Uninitialized|Loaded|Interactive|_|get|focusFirstElement|open|send|Requested|With|Accept|overrideMimeType|Connection|close|setRequestHeader|getResponseHeader|JSON|gi|submit|Loading|Success|Failure|checked|200|selectedIndex|www|selected|bMSIE|clearTimeout|unload|absolutize|string|getElementById|pageXOffset|getElementsByClassName|pageYOffset|removeChild|replaceChild|click|getHeight|hasClassName|addClassName|removeClassName|within|cleanWhitespace|nodeType|empty|childOf|multiple|change|getPropertyValue|relativize|setStyle|getDimensions|makePositioned|undoPositioned|makeClipping|KEY_BACKSPACE|undoClipping|overlap|KEY_TAB|vertical|KEY_RETURN|KEY_ESC|KEY_LEFT|horizontal|KEY_UP|member|tr|KEY_RIGHT|0_RC_0|Number|instanceof|shift|KEY_DOWN|bindAsEventListener|call|toColorPart|KEY_DELETE|times|finally|callee|srcElement|sub|scan|truncate|isLeftClick|beforeBegin|setStartBefore|im|afterBegin|firstChild|pointerX|unescapeHTML|beforeEnd|pageX|clientX|pointerY|parseQuery|afterEnd|pageY|clientY|RangeError|setStartAfter|all|any|grep|invoke|stopPropagation|max|nextSibling|min|partition|cancelBubble|reject|sortBy|sort|findElement|zip|pop|createTextNode|escapeHTML|strip'.split('|'),0,{}) + +} + +assertEq(decompressedMochiKit.length, 106415) +assertEq(decompressedMochiKit[2000], '5') +assertEq(decompressedMochiKit[12000], '_') +assertEq(decompressedMochiKit[82556], '>') diff -Nru mozjs52-52.3.1/js/src/jsalloc.h mozjs52-52.8.1/js/src/jsalloc.h --- mozjs52-52.3.1/js/src/jsalloc.h 2017-08-08 10:25:50.000000000 +0000 +++ mozjs52-52.8.1/js/src/jsalloc.h 2018-06-08 12:27:10.000000000 +0000 @@ -51,7 +51,7 @@ }; class ExclusiveContext; -void ReportOutOfMemory(ExclusiveContext* cxArg); +JS_FRIEND_API(void) ReportOutOfMemory(ExclusiveContext* cxArg); /* * Allocation policy that calls the system memory functions and reports errors diff -Nru mozjs52-52.3.1/js/src/jsapi.h mozjs52-52.8.1/js/src/jsapi.h --- mozjs52-52.3.1/js/src/jsapi.h 2017-08-08 10:25:50.000000000 +0000 +++ mozjs52-52.8.1/js/src/jsapi.h 2018-06-08 12:27:10.000000000 +0000 @@ -6009,6 +6009,7 @@ AsmJSCache_Disabled_JitInspector, AsmJSCache_InternalError, AsmJSCache_Disabled_PrivateBrowsing, + AsmJSCache_ESR52, AsmJSCache_LIMIT }; diff -Nru mozjs52-52.3.1/js/src/jsarray.cpp mozjs52-52.8.1/js/src/jsarray.cpp --- mozjs52-52.3.1/js/src/jsarray.cpp 2017-08-08 10:25:50.000000000 +0000 +++ mozjs52-52.8.1/js/src/jsarray.cpp 2018-06-08 12:27:10.000000000 +0000 @@ -1078,7 +1078,7 @@ if (!CheckForInterrupt(cx)) return DenseElementResult::Failure; - const Value& elem = GetBoxedOrUnboxedDenseElement(obj, *numProcessed); + Value elem = GetBoxedOrUnboxedDenseElement(obj, *numProcessed); if (elem.isString()) { if (!sb.append(elem.toString())) @@ -3774,10 +3774,10 @@ js::ArrayInfo(JSContext* cx, unsigned argc, Value* vp) { CallArgs args = CallArgsFromVp(argc, vp); - JSObject* obj; + RootedObject obj(cx); for (unsigned i = 0; i < args.length(); i++) { - RootedValue arg(cx, args[i]); + HandleValue arg = args[i]; UniqueChars bytes = DecompileValueGenerator(cx, JSDVG_SEARCH_STACK, arg, nullptr); if (!bytes) diff -Nru mozjs52-52.3.1/js/src/jscntxt.cpp mozjs52-52.8.1/js/src/jscntxt.cpp --- mozjs52-52.3.1/js/src/jscntxt.cpp 2017-08-08 10:25:50.000000000 +0000 +++ mozjs52-52.8.1/js/src/jscntxt.cpp 2018-06-08 12:27:10.000000000 +0000 @@ -220,7 +220,7 @@ * Furthermore, callers of ReportOutOfMemory (viz., malloc) assume a GC does * not occur, so GC must be avoided or suppressed. */ -void +JS_FRIEND_API(void) js::ReportOutOfMemory(ExclusiveContext* cxArg) { #ifdef JS_MORE_DETERMINISTIC diff -Nru mozjs52-52.3.1/js/src/jscompartment.cpp mozjs52-52.8.1/js/src/jscompartment.cpp --- mozjs52-52.3.1/js/src/jscompartment.cpp 2017-08-08 10:25:50.000000000 +0000 +++ mozjs52-52.8.1/js/src/jscompartment.cpp 2018-06-08 12:27:10.000000000 +0000 @@ -418,6 +418,10 @@ return true; } + // Ensure that the wrappee is exposed in case we are creating a new wrapper + // for a gray object. + ExposeObjectToActiveJS(obj); + // Create a new wrapper for the object. auto wrap = cx->runtime()->wrapObjectCallbacks->wrap; RootedObject wrapper(cx, wrap(cx, existing, obj)); diff -Nru mozjs52-52.3.1/js/src/jsdate.cpp mozjs52-52.8.1/js/src/jsdate.cpp --- mozjs52-52.3.1/js/src/jsdate.cpp 2017-08-08 10:25:50.000000000 +0000 +++ mozjs52-52.8.1/js/src/jsdate.cpp 2018-06-08 12:27:10.000000000 +0000 @@ -1232,7 +1232,10 @@ static ClippedTime NowAsMillis() { - return TimeClip(static_cast(PRMJ_Now()) / PRMJ_USEC_PER_MSEC); + const double maxResolutionMs = 2; + double timestamp = static_cast(PRMJ_Now()) / PRMJ_USEC_PER_MSEC; + timestamp = floor(timestamp / maxResolutionMs) * maxResolutionMs; + return TimeClip(timestamp); } bool diff -Nru mozjs52-52.3.1/js/src/js.pc.in mozjs52-52.8.1/js/src/js.pc.in --- mozjs52-52.3.1/js/src/js.pc.in 2017-08-08 10:25:50.000000000 +0000 +++ mozjs52-52.8.1/js/src/js.pc.in 2018-06-08 12:27:10.000000000 +0000 @@ -6,6 +6,6 @@ Name: SpiderMonkey @MOZILLA_VERSION@ Description: The Mozilla library for JavaScript Version: @MOZILLA_VERSION@ -Requires.private: @NSPR_PKGCONF_CHECK@ +@PKGCONF_REQUIRES_PRIVATE@ Libs: -L${libdir} -l@JS_LIBRARY_NAME@ Cflags: -include ${includedir}/@JS_LIBRARY_NAME@/js/RequiredDefines.h -I${includedir}/@JS_LIBRARY_NAME@ diff -Nru mozjs52-52.3.1/js/src/jsstr.h mozjs52-52.8.1/js/src/jsstr.h --- mozjs52-52.3.1/js/src/jsstr.h 2017-08-08 10:25:50.000000000 +0000 +++ mozjs52-52.8.1/js/src/jsstr.h 2018-06-08 12:27:10.000000000 +0000 @@ -9,6 +9,7 @@ #include "mozilla/HashFunctions.h" #include "mozilla/PodOperations.h" +#include "mozilla/TextUtils.h" #include @@ -95,7 +96,7 @@ #define JS7_UNOCT(c) (JS7_UNDEC(c)) #define JS7_ISHEX(c) ((c) < 128 && isxdigit(c)) #define JS7_UNHEX(c) (unsigned)(JS7_ISDEC(c) ? (c) - '0' : 10 + tolower(c) - 'a') -#define JS7_ISLET(c) ((c) < 128 && isalpha(c)) +#define JS7_ISLET(c) (mozilla::IsAsciiAlpha(c)) extern size_t js_strlen(const char16_t* s); diff -Nru mozjs52-52.3.1/js/src/Makefile.in mozjs52-52.8.1/js/src/Makefile.in --- mozjs52-52.3.1/js/src/Makefile.in 2017-08-08 10:25:50.000000000 +0000 +++ mozjs52-52.8.1/js/src/Makefile.in 2018-06-08 12:27:10.000000000 +0000 @@ -213,6 +213,8 @@ cp $^ js$(MOZJS_MAJOR_VERSION)-config $(SYSINSTALL) js$(MOZJS_MAJOR_VERSION)-config $(DESTDIR)$(bindir) +# Use install_name_tool to set the install_name properly for standalone +# installed libraries on macOS install:: $(REAL_LIBRARY) $(SHARED_LIBRARY) $(IMPORT_LIBRARY) ifneq (,$(REAL_LIBRARY)) $(SYSINSTALL) $(REAL_LIBRARY) $(DESTDIR)$(libdir) @@ -220,10 +222,15 @@ endif ifneq (,$(SHARED_LIBRARY)) $(SYSINSTALL) $(SHARED_LIBRARY) $(DESTDIR)$(libdir) +ifeq ($(OS_ARCH),Darwin) + install_name_tool -id $(abspath $(libdir)/$(SHARED_LIBRARY)) $(DESTDIR)$(libdir)/$(SHARED_LIBRARY) +endif endif ifneq (,$(IMPORT_LIBRARY)) +ifneq ($(IMPORT_LIBRARY),$(SHARED_LIBRARY)) $(SYSINSTALL) $(IMPORT_LIBRARY) $(DESTDIR)$(libdir) endif +endif $(MAKE) -C shell install ifdef HAVE_DTRACE @@ -248,6 +255,7 @@ DIST=$(DIST) \ MKDIR=$(MKDIR) \ TAR=$(TAR) \ + AUTOCONF=$(AUTOCONF) \ MOZJS_MAJOR_VERSION=$(MOZJS_MAJOR_VERSION) \ MOZJS_MINOR_VERSION=$(MOZJS_MINOR_VERSION) \ MOZJS_PATCH_VERSION=$(MOZJS_PATCH_VERSION) \ diff -Nru mozjs52-52.3.1/js/src/make-source-package.sh mozjs52-52.8.1/js/src/make-source-package.sh --- mozjs52-52.3.1/js/src/make-source-package.sh 2017-08-08 10:25:50.000000000 +0000 +++ mozjs52-52.8.1/js/src/make-source-package.sh 2018-06-08 12:27:10.000000000 +0000 @@ -7,6 +7,7 @@ : ${MKDIR:=mkdir} : ${TAR:=tar} +: ${AUTOCONF:=autoconf-2.13} : ${SRCDIR:=$(cd $(dirname $0); pwd 2>/dev/null)} : ${MOZJS_NAME:=mozjs} # The place to gather files to be added to the tarball. @@ -34,6 +35,7 @@ echo " MAKE = $MAKE" echo " MKDIR = $MKDIR" echo " TAR = $TAR" +echo " AUTOCONF = $AUTOCONF" echo " STAGING = $STAGING" echo " DIST = $DIST" echo " SRCDIR = $SRCDIR" @@ -97,6 +99,12 @@ ${MKDIR} -p ${tgtpath}/.cargo cp -pPR ${TOPSRCDIR}/.cargo/config.in ${tgtpath}/.cargo + # generate configure files to avoid build dependency on autoconf-2.13 + cp -PR ${TOPSRCDIR}/js/src/configure.in ${tgtpath}/js/src/configure + chmod a+x ${tgtpath}/js/src/configure + ${AUTOCONF} --localdir=${TOPSRCDIR}/js/src \ + ${TOPSRCDIR}/js/src/old-configure.in >${tgtpath}/js/src/old-configure + # put in js itself cp -pPR ${TOPSRCDIR}/mfbt ${tgtpath} cp -p ${SRCDIR}/../moz.configure ${tgtpath}/js diff -Nru mozjs52-52.3.1/js/src/old-configure mozjs52-52.8.1/js/src/old-configure --- mozjs52-52.3.1/js/src/old-configure 1970-01-01 00:00:00.000000000 +0000 +++ mozjs52-52.8.1/js/src/old-configure 2018-06-11 16:42:43.000000000 +0000 @@ -0,0 +1,10942 @@ +#! /bin/sh + +if test `uname -s | grep -c MINGW 2>/dev/null` != "0"; then + msyshost=1 +fi + + +# Read the user's .mozconfig script. We can't do this in +# configure.in: autoconf puts the argument parsing code above anything +# expanded from configure.in, and we need to get the configure options +# from .mozconfig in place before that argument parsing code. +. ./old-configure.vars + +# 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 + --enable-release Build with more conservative, release engineering-oriented options. + This may slow down builds." +ac_help="$ac_help + --with-android-cxx-stl=VALUE + use the specified C++ STL (libstdc++, libc++)" +ac_help="$ac_help + --with-ios-sdk=TYPE + Type of iOS SDK to use (iphonesimulator, iphoneos) + and optionally version (like iphoneos8.2)" +ac_help="$ac_help + --enable-ios-target=VER (default=8.0) + Set the minimum iOS version needed at runtime" +ac_help="$ac_help + --with-macos-sdk=dir Location of platform SDK to use (Mac OS X only)" +ac_help="$ac_help + --with-x use the X Window System" +ac_help="$ac_help + --with-arch=[[type|toolchain-default]] + Use specific CPU features (-march=type). Resets + thumb, fpu, float-abi, etc. defaults when set" +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-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 + --enable-address-sanitizer Enable Address Sanitizer (default=no)" +ac_help="$ac_help + --enable-memory-sanitizer Enable Memory Sanitizer (default=no)" +ac_help="$ac_help + --enable-thread-sanitizer Enable Thread Sanitizer (default=no)" +ac_help="$ac_help + --enable-llvm-hacks Enable workarounds required for several LLVM instrumentations (default=no)" +ac_help="$ac_help + --disable-ion Disable use of the IonMonkey JIT" +ac_help="$ac_help + --with-debug-label=LABELS + Define DEBUG_ for each comma-separated + value given." +ac_help="$ac_help + --enable-cpp-rtti Enable C++ RTTI " +ac_help="$ac_help + --enable-gold Enable GNU Gold Linker when it is not already the default" +ac_help="$ac_help + --disable-icf Disable Identical Code Folding" +ac_help="$ac_help + --enable-pie Enable Position Independent Executables" +ac_help="$ac_help + --enable-dtrace build with dtrace support if available (default=no)" +ac_help="$ac_help + --with-pthreads Force use of system pthread library with NSPR " +ac_help="$ac_help + --with-nspr-cflags=FLAGS + Pass FLAGS to CC when building code that uses NSPR. + Use this when there's no accurate nspr-config + script available. This is the case when building + SpiderMonkey as part of the Mozilla tree: the + top-level configure script computes NSPR flags + that accomodate the quirks of that environment." +ac_help="$ac_help + --with-nspr-libs=LIBS Pass LIBS to LD when linking code that uses NSPR. + See --with-nspr-cflags for more details." +ac_help="$ac_help + --enable-nspr-build Build NSPR from source tree" +ac_help="$ac_help + --with-system-nspr Use an NSPR that is already built and installed. + Use the 'nspr-config' script in the current path, + or look for the script in the directories given with + --with-nspr-exec-prefix or --with-nspr-prefix. + (Those flags are only checked if you specify + --with-system-nspr.)" +ac_help="$ac_help + --enable-posix-nspr-emulation + Enable emulation of NSPR for POSIX systems" +ac_help="$ac_help + --with-nspr-prefix=PFX Prefix where NSPR is installed" +ac_help="$ac_help + --with-nspr-exec-prefix=PFX + Exec prefix where NSPR is installed" +ac_help="$ac_help + --with-system-zlib[=PFX] + Use system libz [installed at prefix PFX]" +ac_help="$ac_help + --enable-ui-locale=ab-CD + Select the user interface locale (default: en-US)" +ac_help="$ac_help + --disable-optimize Disable compiler optimization + --enable-optimize=[OPT] Specify compiler optimization flags [OPT=-O]" +ac_help="$ac_help + --disable-trace-logging Disable trace logging" +ac_help="$ac_help + --enable-small-chunk-size Allocate memory for JS GC things in smaller chunks" +ac_help="$ac_help + --enable-valgrind Enable Valgrind integration hooks (default=no)" +ac_help="$ac_help + --enable-simulator=ARCH + Enable a JIT code simulator for the specified arch. + (arm, arm64, mips32, mips64)." +ac_help="$ac_help + --enable-jitspew Enable the Jit spew and IONFLAGS." +ac_help="$ac_help + --enable-gczeal Enable zealous GCing" +ac_help="$ac_help + --enable-oom-breakpoint + Enable a breakpoint function for artificial OOMs" +ac_help="$ac_help + --enable-clang-plugin Enable building with the mozilla clang plugin " +ac_help="$ac_help + --with-sixgill=path/to/sixgill + Enable static checking of code using sixgill" +ac_help="$ac_help + --enable-strip Enable stripping of libs & executables " +ac_help="$ac_help + --enable-install-strip Enable stripping of libs & executables when packaging " +ac_help="$ac_help + --jitreport-granularity=N + Default granularity at which to report JIT code + to external tools + 0 - no info + 1 - code ranges for whole functions only + 2 - per-line information + 3 - per-op information" +ac_help="$ac_help + --enable-readline Link js shell to system readline library" +ac_help="$ac_help + --with-qemu-exe=path Use path as an arm emulator on host platforms" +ac_help="$ac_help + --with-cross-lib=dir Use dir as the location for arm libraries" +ac_help="$ac_help + --with-system-icu + Use system ICU (located with pkgconfig)" +ac_help="$ac_help + --with-intl-api, --with-intl-api=build, --without-intl-api + Determine the status of the ECMAScript Internationalization API. The first + (or lack of any of these) builds and exposes the API. The second builds it + but doesn't use ICU or expose the API to script. The third doesn't build + ICU at all." + +# 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; echo "configure: error: $ac_feature: invalid feature name" 1>&5; 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; echo "configure: error: $ac_feature: invalid feature name" 1>&5; 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; echo "configure: error: $ac_package: invalid package name" 1>&5; 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; echo "configure: error: $ac_package: invalid package name" 1>&5; 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; echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&5; 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; echo "configure: error: can only configure for one host and one target at a time" 1>&5; 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; echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&5; 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=js/src/jsapi.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; echo "configure: error: can not find sources in $ac_confdir or .." 1>&5; exit 1; } + else + { echo "configure: error: can not find sources in $srcdir" 1>&2; echo "configure: error: can not find sources in $srcdir" 1>&5; 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 + + + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +> subconfigures +> skip_subconfigures + +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; echo "configure: error: can not find install-sh or install.sh in ${srcdir}/build/autoconf $srcdir/${srcdir}/build/autoconf" 1>&5; 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; echo "configure: error: can only configure for one host and one target at a time" 1>&5; 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; echo "configure: error: can not run $ac_config_sub" 1>&5; exit 1; } +fi + +echo $ac_n "checking host system type""... $ac_c" 1>&6 +echo "configure:739: 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; echo "configure: error: can not guess host type; you must specify one" 1>&5; 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:760: 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:778: 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}- + + +CFLAGS="${CFLAGS=}" +CPPFLAGS="${CPPFLAGS=}" +CXXFLAGS="${CXXFLAGS=}" +LDFLAGS="${LDFLAGS=}" +HOST_CFLAGS="${HOST_CFLAGS=}" +HOST_CXXFLAGS="${HOST_CXXFLAGS=}" +HOST_LDFLAGS="${HOST_LDFLAGS=}" + +_SUBDIR_CC="$CC" +_SUBDIR_CXX="$CXX" +_SUBDIR_CFLAGS="$CFLAGS" +_SUBDIR_CPPFLAGS="$CPPFLAGS" +_SUBDIR_CXXFLAGS="$CXXFLAGS" +_SUBDIR_LDFLAGS="$LDFLAGS" +_SUBDIR_HOST_CC="$HOST_CC" +_SUBDIR_HOST_CFLAGS="$HOST_CFLAGS" +_SUBDIR_HOST_CXXFLAGS="$HOST_CXXFLAGS" +_SUBDIR_HOST_LDFLAGS="$HOST_LDFLAGS" +_SUBDIR_CONFIG_ARGS="$ac_configure_args" + +NSPR_VERSION=4 +NSPR_MINVER=4.9.2 + +WINDRES_VERSION=2.14.90 +W32API_VERSION=3.14 + +MISSING_X= + +USE_PTHREADS= +_PTHREAD_LDFLAGS="" + +_topsrcdir=`cd $srcdir; pwd -W 2>/dev/null || pwd -P` +_objdir=`pwd -P` + +MOZ_BUILD_ROOT=`pwd -W 2>/dev/null || pwd -P` + + + if test -z "$MOZILLA_OFFICIAL"; then + DEVELOPER_OPTIONS=1 + fi + # Check whether --enable-release or --disable-release was given. +if test "${enable_release+set}" = set; then + enableval="$enable_release" + if test "$enableval" = "yes"; then + DEVELOPER_OPTIONS= + elif test "$enableval" = "no"; then + DEVELOPER_OPTIONS=1 + else + { echo "configure: error: Option, release, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, release, does not take an argument ($enableval)." 1>&5; exit 1; } + fi +fi + + +if test -z "$CROSS_COMPILE"; then +case "$target" in +*-mingw*) + if test -z "$CPP"; then CPP="$CC -E -nologo"; fi + if test -z "$CXXCPP"; then CXXCPP="$CXX -TP -E -nologo"; ac_cv_prog_CXXCPP="$CXXCPP"; fi + if test -z "$AS"; then + case "${target_cpu}" in + i*86) + AS=ml; + ;; + x86_64) + AS=ml64; + ;; + esac + fi + if test -z "$MIDL"; then MIDL=midl; fi + + # need override this flag since we don't use $(LDFLAGS) for this. + if test -z "$HOST_LDFLAGS" ; then + HOST_LDFLAGS=" " + fi + ;; +esac +fi + + +if test -z "$JS_STANDALONE"; then + autoconfmk=autoconf-js.mk + #DIST is exported from top-level configure +else + DIST="$MOZ_BUILD_ROOT/dist" +fi + + + + +# Check whether --with-android-cxx-stl or --without-android-cxx-stl was given. +if test "${with_android_cxx_stl+set}" = set; then + withval="$with_android_cxx_stl" + android_cxx_stl=$withval +else + android_cxx_stl=libc++ +fi + + +case "$target" in +*-android*|*-linuxandroid*) + CPPFLAGS="-idirafter $android_platform/usr/include $CPPFLAGS" + CFLAGS="-fno-short-enums -fno-exceptions $CFLAGS" + CXXFLAGS="-fno-short-enums -fno-exceptions $CXXFLAGS" + ASFLAGS="-idirafter $android_platform/usr/include -DANDROID $ASFLAGS" + + LDFLAGS="-L$android_platform/usr/lib -Wl,-rpath-link=$android_platform/usr/lib --sysroot=$android_platform -Wl,--allow-shlib-undefined $LDFLAGS" + LIBS="-llog $LIBS" + ANDROID_PLATFORM="${android_platform}" + + cat >> confdefs.pytmp <<\EOF + (''' ANDROID ''', ' 1 ') +EOF +cat >> confdefs.h <<\EOF +#define ANDROID 1 +EOF + + + + ;; +esac + + + +if test -n "$gonkdir" ; then + LDFLAGS="-L$gonkdir/out/target/product/$GONK_PRODUCT/obj/lib -Wl,-rpath-link=$gonkdir/out/target/product/$GONK_PRODUCT/obj/lib --sysroot=$gonkdir/out/target/product/$GONK_PRODUCT/obj/ -llog $LDFLAGS" +fi + +case "$target" in +*-apple-darwin*) + + +# Check whether --with-ios-sdk or --without-ios-sdk was given. +if test "${with_ios_sdk+set}" = set; then + withval="$with_ios_sdk" + ios_sdk=$withval +fi + + +# Check whether --enable-ios-target or --disable-ios-target was given. +if test "${enable_ios_target+set}" = set; then + enableval="$enable_ios_target" + _IOS_TARGET=$enableval +fi + +_IOS_TARGET_DEFAULT=8.0 + +case "$target" in +arm*-apple-darwin*) + if test -z "$ios_sdk" -o "$ios_sdk" = "yes"; then + ios_sdk=iphoneos + fi + case "$ios_sdk" in + iphoneos*) + ios_target_arg="-miphoneos-version-min" + ;; + *) + { echo "configure: error: Only 'iphoneos' SDKs are valid when targeting iOS device, don't know what to do with '$ios_sdk'." 1>&2; echo "configure: error: Only 'iphoneos' SDKs are valid when targeting iOS device, don't know what to do with '$ios_sdk'." 1>&5; exit 1; } + ;; + esac + ;; +*-apple-darwin*) + ios_target_arg="-mios-simulator-version-min" + case "$ios_sdk" in + # Empty SDK is okay, this might be an OS X desktop build. + ""|iphonesimulator*) + ;; + # Default to iphonesimulator + yes) + ios_sdk=iphonesimulator + ;; + *) + { echo "configure: error: Only 'iphonesimulator' SDKs are valid when targeting iOS simulator." 1>&2; echo "configure: error: Only 'iphonesimulator' SDKs are valid when targeting iOS simulator." 1>&5; exit 1; } + ;; + esac + ;; +esac + + +if test -n "$ios_sdk"; then + if test -z "$_IOS_TARGET"; then + _IOS_TARGET=$_IOS_TARGET_DEFAULT + ios_target_arg="${ios_target_arg}=${_IOS_TARGET}" + fi + # Ensure that xcrun knows where this SDK is. + ios_sdk_path=`xcrun --sdk $ios_sdk --show-sdk-path 2>/dev/null` + _ret=$? + if test $_ret -ne 0; then + { echo "configure: error: iOS SDK '$ios_sdk' could not be found." 1>&2; echo "configure: error: iOS SDK '$ios_sdk' could not be found." 1>&5; exit 1; } + fi + MOZ_IOS=1 + export HOST_CC=clang + export HOST_CXX=clang++ + # Add isysroot, arch, and ios target arguments + case "$target_cpu" in + arm*) + ARGS="-arch armv7" + ;; + *) + # Unfortunately simulator builds need this. + export CROSS_COMPILE=1 + ;; + esac + ARGS=" $ARGS -isysroot $ios_sdk_path $ios_target_arg" + # Now find our tools + + +_prog_name=clang + +echo $ac_n "checking for $_prog_name in iOS SDK""... $ac_c" 1>&6 +echo "configure:1010: checking for $_prog_name in iOS SDK" >&5 +if eval "test \"`echo '$''{'ac_cv_ios_path_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +_path=`xcrun --sdk $ios_sdk --find $_prog_name 2>/dev/null` +_res=$? +if test $_res -ne 0; then + { echo "configure: error: Could not find '$_prog_name' in the iOS SDK" 1>&2; echo "configure: error: Could not find '$_prog_name' in the iOS SDK" 1>&5; exit 1; } +fi +ac_cv_ios_path_CC=$_path + +fi + +echo "$ac_t""$ac_cv_ios_path_CC" 1>&6 +CC="${ac_cv_ios_path_CC}$ARGS" + + + +_prog_name=clang++ + +echo $ac_n "checking for $_prog_name in iOS SDK""... $ac_c" 1>&6 +echo "configure:1032: checking for $_prog_name in iOS SDK" >&5 +if eval "test \"`echo '$''{'ac_cv_ios_path_CXX'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +_path=`xcrun --sdk $ios_sdk --find $_prog_name 2>/dev/null` +_res=$? +if test $_res -ne 0; then + { echo "configure: error: Could not find '$_prog_name' in the iOS SDK" 1>&2; echo "configure: error: Could not find '$_prog_name' in the iOS SDK" 1>&5; exit 1; } +fi +ac_cv_ios_path_CXX=$_path + +fi + +echo "$ac_t""$ac_cv_ios_path_CXX" 1>&6 +CXX="${ac_cv_ios_path_CXX}$ARGS" + + export CPP="$CC -E" + export LD="$CXX" + + +_prog_name=`echo AR | tr "[:upper:]" "[:lower:]"` + +echo $ac_n "checking for $_prog_name in iOS SDK""... $ac_c" 1>&6 +echo "configure:1056: checking for $_prog_name in iOS SDK" >&5 +if eval "test \"`echo '$''{'ac_cv_ios_path_AR'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +_path=`xcrun --sdk $ios_sdk --find $_prog_name 2>/dev/null` +_res=$? +if test $_res -ne 0; then + { echo "configure: error: Could not find '$_prog_name' in the iOS SDK" 1>&2; echo "configure: error: Could not find '$_prog_name' in the iOS SDK" 1>&5; exit 1; } +fi +ac_cv_ios_path_AR=$_path + +fi + +echo "$ac_t""$ac_cv_ios_path_AR" 1>&6 +AR="${ac_cv_ios_path_AR}" + + + +_prog_name=as + +echo $ac_n "checking for $_prog_name in iOS SDK""... $ac_c" 1>&6 +echo "configure:1078: checking for $_prog_name in iOS SDK" >&5 +if eval "test \"`echo '$''{'ac_cv_ios_path_AS'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +_path=`xcrun --sdk $ios_sdk --find $_prog_name 2>/dev/null` +_res=$? +if test $_res -ne 0; then + { echo "configure: error: Could not find '$_prog_name' in the iOS SDK" 1>&2; echo "configure: error: Could not find '$_prog_name' in the iOS SDK" 1>&5; exit 1; } +fi +ac_cv_ios_path_AS=$_path + +fi + +echo "$ac_t""$ac_cv_ios_path_AS" 1>&6 +AS="${ac_cv_ios_path_AS}$ARGS" + + + +_prog_name=`echo OTOOL | tr "[:upper:]" "[:lower:]"` + +echo $ac_n "checking for $_prog_name in iOS SDK""... $ac_c" 1>&6 +echo "configure:1100: checking for $_prog_name in iOS SDK" >&5 +if eval "test \"`echo '$''{'ac_cv_ios_path_OTOOL'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +_path=`xcrun --sdk $ios_sdk --find $_prog_name 2>/dev/null` +_res=$? +if test $_res -ne 0; then + { echo "configure: error: Could not find '$_prog_name' in the iOS SDK" 1>&2; echo "configure: error: Could not find '$_prog_name' in the iOS SDK" 1>&5; exit 1; } +fi +ac_cv_ios_path_OTOOL=$_path + +fi + +echo "$ac_t""$ac_cv_ios_path_OTOOL" 1>&6 +OTOOL="${ac_cv_ios_path_OTOOL}" + + + +_prog_name=`echo STRIP | tr "[:upper:]" "[:lower:]"` + +echo $ac_n "checking for $_prog_name in iOS SDK""... $ac_c" 1>&6 +echo "configure:1122: checking for $_prog_name in iOS SDK" >&5 +if eval "test \"`echo '$''{'ac_cv_ios_path_STRIP'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +_path=`xcrun --sdk $ios_sdk --find $_prog_name 2>/dev/null` +_res=$? +if test $_res -ne 0; then + { echo "configure: error: Could not find '$_prog_name' in the iOS SDK" 1>&2; echo "configure: error: Could not find '$_prog_name' in the iOS SDK" 1>&5; exit 1; } +fi +ac_cv_ios_path_STRIP=$_path + +fi + +echo "$ac_t""$ac_cv_ios_path_STRIP" 1>&6 +STRIP="${ac_cv_ios_path_STRIP}" + + export PKG_CONFIG_PATH=${ios_sdk_path}/usr/lib/pkgconfig/ +fi + + + + ;; +esac + + +AR_FLAGS='crs $@' + +if test "$COMPILE_ENVIRONMENT"; then + +# Note: +# In Mozilla, we use the names $target, $host and $build incorrectly, but are +# too far gone to back out now. See Bug 475488: +# - When we say $target, we mean $host, that is, the system on which +# Mozilla will be run. +# - When we say $host, we mean $build, that is, the system on which Mozilla +# is built. +# - $target (in its correct usage) is for compilers who generate code for a +# different platform than $host, so it would not be used by Mozilla. +if test "$target" != "$host"; then + +echo "cross compiling from $host to $target" + +if test -z "$HOST_AR_FLAGS"; then + HOST_AR_FLAGS="$AR_FLAGS" +fi +for ac_prog in $HOST_RANLIB 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:1173: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_HOST_RANLIB'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$HOST_RANLIB"; then + ac_cv_prog_HOST_RANLIB="$HOST_RANLIB" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy=":" + 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_RANLIB="$ac_prog" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +HOST_RANLIB="$ac_cv_prog_HOST_RANLIB" +if test -n "$HOST_RANLIB"; then + echo "$ac_t""$HOST_RANLIB" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +test -n "$HOST_RANLIB" && break +done +test -n "$HOST_RANLIB" || HOST_RANLIB="ranlib" + +for ac_prog in $HOST_AR 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:1208: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_HOST_AR'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$HOST_AR"; then + ac_cv_prog_HOST_AR="$HOST_AR" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy=":" + 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_AR="$ac_prog" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +HOST_AR="$ac_cv_prog_HOST_AR" +if test -n "$HOST_AR"; then + echo "$ac_t""$HOST_AR" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +test -n "$HOST_AR" && break +done +test -n "$HOST_AR" || HOST_AR="ar" + + +_SAVE_PATH=$PATH +case "${TOOLCHAIN_PREFIX}" in +/*) + PATH="/:$PATH" + ;; +esac +# 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:1248: 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:1278: 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:1329: 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; echo "configure: error: no acceptable cc found in \$PATH" 1>&5; exit 1; } +fi + +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 +echo "configure:1361: 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 1372 "configure" +#include "confdefs.h" + +main(){return(0);} +EOF +if { (eval echo configure:1377: \"$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; echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&5; exit 1; } +fi +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 +echo "configure:1403: 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:1408: 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 <&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:1436: checking whether ${CC-cc} accepts -g" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + echo 'void f(){}' > conftest.c +if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then + ac_cv_prog_cc_g=yes +else + ac_cv_prog_cc_g=no +fi +rm -f conftest* + +fi + +echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 +if test "$ac_test_CFLAGS" = set; then + CFLAGS="$ac_save_CFLAGS" +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi + +for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl +do +# Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1472: 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:1504: 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 1515 "configure" +#include "confdefs.h" + +int main(){return(0);} +EOF +if { (eval echo configure:1520: \"$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; echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&5; exit 1; } +fi +echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 +echo "configure:1546: 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:1551: 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 <&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:1579: 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 + + +for ac_prog in "${TOOLCHAIN_PREFIX}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:1616: 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=":" + +for ac_prog in "${TOOLCHAIN_PREFIX}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:1651: 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=":" + +for ac_prog in "${TOOLCHAIN_PREFIX}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:1686: 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=":" + +for ac_prog in "${TOOLCHAIN_PREFIX}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:1721: 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=":" + +for ac_prog in "${TOOLCHAIN_PREFIX}lipo" +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:1756: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_LIPO'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$LIPO"; then + ac_cv_prog_LIPO="$LIPO" # 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_LIPO="$ac_prog" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +LIPO="$ac_cv_prog_LIPO" +if test -n "$LIPO"; then + echo "$ac_t""$LIPO" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +test -n "$LIPO" && break +done +test -n "$LIPO" || LIPO=":" + +for ac_prog in "${TOOLCHAIN_PREFIX}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:1791: 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=":" + +for ac_prog in "${TOOLCHAIN_PREFIX}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:1826: 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=":" + +for ac_prog in "${TOOLCHAIN_PREFIX}otool" +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:1861: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_OTOOL'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$OTOOL"; then + ac_cv_prog_OTOOL="$OTOOL" # 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_OTOOL="$ac_prog" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +OTOOL="$ac_cv_prog_OTOOL" +if test -n "$OTOOL"; then + echo "$ac_t""$OTOOL" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +test -n "$OTOOL" && break +done +test -n "$OTOOL" || OTOOL=":" + +for ac_prog in "${TOOLCHAIN_PREFIX}objcopy" +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:1896: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_OBJCOPY'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$OBJCOPY"; then + ac_cv_prog_OBJCOPY="$OBJCOPY" # 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_OBJCOPY="$ac_prog" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +OBJCOPY="$ac_cv_prog_OBJCOPY" +if test -n "$OBJCOPY"; then + echo "$ac_t""$OBJCOPY" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +test -n "$OBJCOPY" && break +done +test -n "$OBJCOPY" || OBJCOPY=":" + +PATH=$_SAVE_PATH + +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:1932: 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:1962: 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:2013: 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; echo "configure: error: no acceptable cc found in \$PATH" 1>&5; exit 1; } +fi + +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 +echo "configure:2045: 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 2056 "configure" +#include "confdefs.h" + +main(){return(0);} +EOF +if { (eval echo configure:2061: \"$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; echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&5; exit 1; } +fi +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 +echo "configure:2087: 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:2092: 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 <&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:2120: checking whether ${CC-cc} accepts -g" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + echo 'void f(){}' > conftest.c +if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then + ac_cv_prog_cc_g=yes +else + ac_cv_prog_cc_g=no +fi +rm -f conftest* + +fi + +echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 +if test "$ac_test_CFLAGS" = set; then + CFLAGS="$ac_save_CFLAGS" +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi + + for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl +do +# Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:2156: 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:2188: 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 2199 "configure" +#include "confdefs.h" + +int main(){return(0);} +EOF +if { (eval echo configure:2204: \"$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; echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&5; exit 1; } +fi +echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 +echo "configure:2230: 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:2235: 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 <&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:2263: 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 + + # 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:2297: 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 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:2329: 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" + + if test "$msyshost"; then + case "$AS" in + /*) + tmp_DIRNAME=`dirname "$AS"` + tmp_BASENAME=`basename "$AS"` + tmp_PWD=`cd "$tmp_DIRNAME" && pwd -W` + AS="$tmp_PWD/$tmp_BASENAME" + if test -e "$AS.exe"; then + AS="$AS.exe" + fi + esac + fi + + 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:2383: 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=":" + + for ac_prog in 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:2418: 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=":" + + 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:2453: 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=":" + + 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:2488: 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=":" + + if test -z "$HOST_CC"; then + HOST_CC='$(CC)' + fi + if test -z "$HOST_CXX"; then + HOST_CXX='$(CXX)' + fi + if test -z "$HOST_RANLIB"; then + HOST_RANLIB='$(RANLIB)' + fi + if test -z "$HOST_AR"; then + HOST_AR='$(AR)' + fi + if test -z "$HOST_AR_FLAGS"; then + HOST_AR_FLAGS='$(AR_FLAGS)' + fi +fi + + +GNU_AS= +GNU_LD= + +GNU_CC= +GNU_CXX= +if test "$CC_TYPE" = "gcc"; then + GNU_CC=1 + GNU_CXX=1 +fi + +if test "`echo | $AS -o conftest.out -v 2>&1 | grep -c GNU`" != "0"; then + GNU_AS=1 +fi +rm -f conftest.out +if test "`echo | $LD -v 2>&1 | grep -c GNU`" != "0"; then + GNU_LD=1 +fi + +CLANG_CC= +CLANG_CXX= +CLANG_CL= +if test "$CC_TYPE" = "clang"; then + GNU_CC=1 + GNU_CXX=1 + CLANG_CC=1 + CLANG_CXX=1 +fi +if test "$CC_TYPE" = "clang-cl"; then + CLANG_CL=1 +fi + +if test "$GNU_CC"; then + if `$CC -print-prog-name=ld` -v 2>&1 | grep -c GNU >/dev/null; then + GCC_USE_GNU_LD=1 + fi +fi + + + + + + +# Target the Windows 8.1 SDK by default +WINVER=502 + +case "$target" in +*-mingw*) + if test "$GCC" != "yes"; then + # Check to see if we are really running in a msvc environemnt + _WIN32_MSVC=1 + + # Make sure compilers are valid + CFLAGS="$CFLAGS -TC -nologo" + CXXFLAGS="$CXXFLAGS -TP -nologo" + if test -z "$CLANG_CL"; then + CFLAGS="$CFLAGS -utf-8" + CXXFLAGS="$CXXFLAGS -utf-8" + fi + # MSVC warning C4345 warns of newly conformant behavior as of VS2003. + # MSVC warning C4351 warns of newly conformant behavior as of VS2005. + # MSVC warning C4800 warns when a value is implicitly cast to bool, + # because this also forces narrowing to a single byte, which can be a + # perf hit. But this matters so little in practice (and often we want + # that behavior) that it's better to turn it off. + # _CRT_SECURE_NO_WARNINGS disables warnings about using MSVC-specific + # secure CRT functions. + # MSVC warning wd4595 warns non-member operator new or delete functions + # may not be declared inline, as of VS2015 Update 2. + CXXFLAGS="$CXXFLAGS -wd4345 -wd4351 -wd4800 -wd4595 -D_CRT_SECURE_NO_WARNINGS" + + 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 < +int main() { + printf("Hello World\n"); +; return 0; } +EOF +if { (eval echo configure:2621: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + : +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + { echo "configure: error: \$(CC) test failed. You must have MS VC++ in your path to build." 1>&2; echo "configure: error: \$(CC) test failed. You must have MS VC++ in your path to build." 1>&5; exit 1; } +fi +rm -f conftest* + + 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 < +int main() { + unsigned *test = new unsigned(42); +; return 0; } +EOF +if { (eval echo configure:2646: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + : +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + { echo "configure: error: \$(CXX) test failed. You must have MS VC++ in your path to build." 1>&2; echo "configure: error: \$(CXX) test failed. You must have MS VC++ in your path to build." 1>&5; exit 1; } +fi +rm -f 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 + + + + _MSVC_VER_FILTER='s|.*[^!-~]([0-9]+\.[0-9]+\.[0-9]+(\.[0-9]+)?).*|\1|p' + + + _MSC_VER=`echo ${CC_VERSION} | cut -c 1-2,4-5` + + cat >> confdefs.pytmp <<\EOF + (''' _CRT_SECURE_NO_WARNINGS ''', ' 1 ') +EOF +cat >> confdefs.h <<\EOF +#define _CRT_SECURE_NO_WARNINGS 1 +EOF + + cat >> confdefs.pytmp <<\EOF + (''' _CRT_NONSTDC_NO_WARNINGS ''', ' 1 ') +EOF +cat >> confdefs.h <<\EOF +#define _CRT_NONSTDC_NO_WARNINGS 1 +EOF + + cat >> confdefs.pytmp <<\EOF + (''' _USE_MATH_DEFINES ''', ' 1 ') +EOF +cat >> confdefs.h <<\EOF +#define _USE_MATH_DEFINES 1 +EOF + # Otherwise MSVC's math.h doesn't #define M_PI. + + case "$CC_VERSION" in + 19*) + _CC_SUITE=14 + MSVS_VERSION=2015 + MSVC_C_RUNTIME_DLL=vcruntime140.dll + MSVC_CXX_RUNTIME_DLL=msvcp140.dll + + # C5026: move constructor was implicitly defined as deleted + CXXFLAGS="$CXXFLAGS -wd5026" + + # C5027: move assignment operator was implicitly defined as deleted + CXXFLAGS="$CXXFLAGS -wd5027" + + # -Zc:sizedDealloc- disables C++14 global sized deallocation (see bug 1160146) + CXXFLAGS="$CXXFLAGS -Zc:sizedDealloc-" + + # Disable C++11 thread-safe statics due to crashes on XP (bug 1204752) + # See https://connect.microsoft.com/VisualStudio/feedback/details/1789709/visual-c-2015-runtime-broken-on-windows-server-2003-c-11-magic-statics + CXXFLAGS="$CXXFLAGS -Zc:threadSafeInit-" + ;; + esac + + + + + # Check linker version + _LD_FULL_VERSION=`"${LD}" -v 2>&1 | sed -nre "$_MSVC_VER_FILTER"` + _LD_MAJOR_VERSION=`echo ${_LD_FULL_VERSION} | $AWK -F\. '{ print $1 }'` + if test "$_LD_MAJOR_VERSION" != "$_CC_SUITE"; then + { echo "configure: error: The linker major version, $_LD_FULL_VERSION, does not match the compiler suite version, $_CC_SUITE." 1>&2; echo "configure: error: The linker major version, $_LD_FULL_VERSION, does not match the compiler suite version, $_CC_SUITE." 1>&5; exit 1; } + fi + + INCREMENTAL_LINKER=1 + + unset _MSVC_VER_FILTER + + CFLAGS="$CFLAGS -D_HAS_EXCEPTIONS=0" + CXXFLAGS="$CXXFLAGS -D_HAS_EXCEPTIONS=0" + else + # Check w32api version + _W32API_MAJOR_VERSION=`echo $W32API_VERSION | $AWK -F\. '{ print $1 }'` + _W32API_MINOR_VERSION=`echo $W32API_VERSION | $AWK -F\. '{ print $2 }'` + echo $ac_n "checking for w32api version >= $W32API_VERSION""... $ac_c" 1>&6 +echo "configure:2734: checking for w32api version >= $W32API_VERSION" >&5 + cat > conftest.$ac_ext < +int main() { +#if (__W32API_MAJOR_VERSION < $_W32API_MAJOR_VERSION) || \ + (__W32API_MAJOR_VERSION == $_W32API_MAJOR_VERSION && \ + __W32API_MINOR_VERSION < $_W32API_MINOR_VERSION) + #error "test failed." + #endif + +; return 0; } +EOF +if { (eval echo configure:2748: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + res=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + res=no +fi +rm -f conftest* + echo "$ac_t""$res" 1>&6 + if test "$res" != "yes"; then + { echo "configure: error: w32api version $W32API_VERSION or higher required." 1>&2; echo "configure: error: w32api version $W32API_VERSION or higher required." 1>&5; exit 1; } + fi + # Check windres version + echo $ac_n "checking for windres version >= $WINDRES_VERSION""... $ac_c" 1>&6 +echo "configure:2764: checking for windres version >= $WINDRES_VERSION" >&5 + _WINDRES_VERSION=`${WINDRES} --version 2>&1 | grep -i windres 2>/dev/null | $AWK '{ print $3 }'` + echo "$ac_t""$_WINDRES_VERSION" 1>&6 + _WINDRES_MAJOR_VERSION=`echo $_WINDRES_VERSION | $AWK -F\. '{ print $1 }'` + _WINDRES_MINOR_VERSION=`echo $_WINDRES_VERSION | $AWK -F\. '{ print $2 }'` + _WINDRES_RELEASE_VERSION=`echo $_WINDRES_VERSION | $AWK -F\. '{ print $3 }'` + WINDRES_MAJOR_VERSION=`echo $WINDRES_VERSION | $AWK -F\. '{ print $1 }'` + WINDRES_MINOR_VERSION=`echo $WINDRES_VERSION | $AWK -F\. '{ print $2 }'` + WINDRES_RELEASE_VERSION=`echo $WINDRES_VERSION | $AWK -F\. '{ print $3 }'` + if test "$_WINDRES_MAJOR_VERSION" -lt "$WINDRES_MAJOR_VERSION" -o \ + "$_WINDRES_MAJOR_VERSION" -eq "$WINDRES_MAJOR_VERSION" -a \ + "$_WINDRES_MINOR_VERSION" -lt "$WINDRES_MINOR_VERSION" -o \ + "$_WINDRES_MAJOR_VERSION" -eq "$WINDRES_MAJOR_VERSION" -a \ + "$_WINDRES_MINOR_VERSION" -eq "$WINDRES_MINOR_VERSION" -a \ + "$_WINDRES_RELEASE_VERSION" -lt "$WINDRES_RELEASE_VERSION" + then + { echo "configure: error: windres version $WINDRES_VERSION or higher is required to build." 1>&2; echo "configure: error: windres version $WINDRES_VERSION or higher is required to build." 1>&5; exit 1; } + fi + fi # !GNU_CC + + cat >> confdefs.pytmp <> confdefs.h <> confdefs.pytmp <> confdefs.h <> confdefs.pytmp <> confdefs.h <> confdefs.pytmp <<\EOF + (''' HAVE_LOCALECONV ''', ' 1 ') +EOF +cat >> confdefs.h <<\EOF +#define HAVE_LOCALECONV 1 +EOF + + cat >> confdefs.pytmp <<\EOF + (''' HAVE_HYPOT ''', ' 1 ') +EOF +cat >> confdefs.h <<\EOF +#define HAVE_HYPOT 1 +EOF + + for ac_func in _getc_nolock +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:2837: 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 < +#undef $ac_func +/* 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:2869: \"$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.pytmp <> confdefs.h <&6 +fi +done + +fi + +fi # COMPILE_ENVIRONMENT + +# Check to see if we are running in a broken QEMU scratchbox. +# We know that anything below 1.0.16 is broken. +for ac_prog in sb-conf ve +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:2907: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_SBCONF'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$SBCONF"; then + ac_cv_prog_SBCONF="$SBCONF" # 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_SBCONF="$ac_prog" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +SBCONF="$ac_cv_prog_SBCONF" +if test -n "$SBCONF"; then + echo "$ac_t""$SBCONF" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +test -n "$SBCONF" && break +done +test -n "$SBCONF" || SBCONF="""" + +if test -n "$SBCONF"; then + _sb_version=`$SBCONF ve` + _sb_version_major=`echo $_sb_version | cut -f1 -d.` + _sb_version_minor=`echo $_sb_version | cut -f2 -d.` + _sb_version_point=`echo $_sb_version | cut -f3 -d.` + if test $_sb_version_major -eq 1 -a $_sb_version_minor -eq 0 -a $_sb_version_point -le 16; then + QEMU_CANT_RUN_JS_SHELL=1 + fi +fi + + + + + + + + + +if test "$COMPILE_ENVIRONMENT"; then + + + + +MACOS_SDK_DIR= +# 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 + + + + +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; 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>&5; exit 1; } + fi + + CFLAGS="$CFLAGS -isysroot ${MACOS_SDK_DIR}" + CXXFLAGS="$CXXFLAGS -isysroot ${MACOS_SDK_DIR}" + + CPP="$CPP -isysroot ${MACOS_SDK_DIR}" + CXXCPP="$CXXCPP -isysroot ${MACOS_SDK_DIR}" + + + echo $ac_n "checking for valid compiler/Mac OS X SDK combination""... $ac_c" 1>&6 +echo "configure:2988: checking for valid compiler/Mac OS X SDK combination" >&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 < + int main() { return 0; } +int main() { +result=yes +; return 0; } +EOF +if { (eval echo configure:3005: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + result=no +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -f 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""$result" 1>&6 + + if test "$result" = "no" ; then + { echo "configure: error: The selected compiler and Mac OS X SDK are incompatible." 1>&2; echo "configure: error: The selected compiler and Mac OS X SDK are incompatible." 1>&5; exit 1; } + fi +fi + + + +# If we find X, set shell vars x_includes and x_libraries to the +# paths, otherwise set no_x=yes. +# Uses ac_ vars as temps to allow command line to override cache and checks. +# --without-x overrides everything else, but does not touch the cache. +echo $ac_n "checking for X""... $ac_c" 1>&6 +echo "configure:3034: checking for X" >&5 + +# Check whether --with-x or --without-x was given. +if test "${with_x+set}" = set; then + withval="$with_x" + : +fi + +# $have_x is `yes', `no', `disabled', or empty when we do not yet know. +if test "x$with_x" = xno; then + # The user explicitly disabled X. + have_x=disabled +else + if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then + # Both variables are already set. + have_x=yes + else +if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # One or both of the vars are not set, and there is no cached value. +ac_x_includes=NO ac_x_libraries=NO +rm -fr conftestdir +if mkdir conftestdir; then + cd conftestdir + # Make sure to not put "make" in the Imakefile rules, since we grep it out. + cat > Imakefile <<'EOF' +acfindx: + @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"' +EOF + if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then + # GNU make sometimes prints "make[1]: Entering...", which would confuse us. + eval `${MAKE-make} acfindx 2>/dev/null | grep -v make` + # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. + for ac_extension in a so sl; do + if test ! -f $ac_im_usrlibdir/libX11.$ac_extension && + test -f $ac_im_libdir/libX11.$ac_extension; then + ac_im_usrlibdir=$ac_im_libdir; break + fi + done + # Screen out bogus values from the imake configuration. They are + # bogus both because they are the default anyway, and because + # using them would break gcc on systems where it needs fixed includes. + case "$ac_im_incroot" in + /usr/include) ;; + *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;; + esac + case "$ac_im_usrlibdir" in + /usr/lib | /lib) ;; + *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;; + esac + fi + cd .. + rm -fr conftestdir +fi + +if test "$ac_x_includes" = NO; then + # Guess where to find include files, by looking for this one X11 .h file. + test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h + + # First, try using that file with no special directory specified. +cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:3101: \"$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* + # We can compile using X headers with no special include directory. +ac_x_includes= +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + # Look for the header file in a standard set of common directories. +# Check X11 before X11Rn because it is often a symlink to the current release. + for ac_dir in \ + /usr/X11/include \ + /usr/X11R6/include \ + /usr/X11R5/include \ + /usr/X11R4/include \ + \ + /usr/include/X11 \ + /usr/include/X11R6 \ + /usr/include/X11R5 \ + /usr/include/X11R4 \ + \ + /usr/local/X11/include \ + /usr/local/X11R6/include \ + /usr/local/X11R5/include \ + /usr/local/X11R4/include \ + \ + /usr/local/include/X11 \ + /usr/local/include/X11R6 \ + /usr/local/include/X11R5 \ + /usr/local/include/X11R4 \ + \ + /usr/X386/include \ + /usr/x386/include \ + /usr/XFree86/include/X11 \ + \ + /usr/include \ + /usr/local/include \ + /usr/unsupported/include \ + /usr/athena/include \ + /usr/local/x11r5/include \ + /usr/lpp/Xamples/include \ + \ + /usr/openwin/include \ + /usr/openwin/share/include \ + ; \ + do + if test -r "$ac_dir/$x_direct_test_include"; then + ac_x_includes=$ac_dir + break + fi + done +fi +rm -f conftest* +fi # $ac_x_includes = NO + +if test "$ac_x_libraries" = NO; then + # Check for the libraries. + + test -z "$x_direct_test_library" && x_direct_test_library=Xt + test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc + + # See if we find them without any special options. + # Don't add to $LIBS permanently. + ac_save_LIBS="$LIBS" + LIBS="-l$x_direct_test_library $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + LIBS="$ac_save_LIBS" +# We can link X programs with no special library path. +ac_x_libraries= +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + LIBS="$ac_save_LIBS" +# First see if replacing the include by lib works. +# Check X11 before X11Rn because it is often a symlink to the current release. +for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \ + /usr/X11/lib \ + /usr/X11R6/lib \ + /usr/X11R5/lib \ + /usr/X11R4/lib \ + \ + /usr/lib/X11 \ + /usr/lib/X11R6 \ + /usr/lib/X11R5 \ + /usr/lib/X11R4 \ + \ + /usr/local/X11/lib \ + /usr/local/X11R6/lib \ + /usr/local/X11R5/lib \ + /usr/local/X11R4/lib \ + \ + /usr/local/lib/X11 \ + /usr/local/lib/X11R6 \ + /usr/local/lib/X11R5 \ + /usr/local/lib/X11R4 \ + \ + /usr/X386/lib \ + /usr/x386/lib \ + /usr/XFree86/lib/X11 \ + \ + /usr/lib \ + /usr/local/lib \ + /usr/unsupported/lib \ + /usr/athena/lib \ + /usr/local/x11r5/lib \ + /usr/lpp/Xamples/lib \ + /lib/usr/lib/X11 \ + \ + /usr/openwin/lib \ + /usr/openwin/share/lib \ + ; \ +do + for ac_extension in a so sl; do + if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then + ac_x_libraries=$ac_dir + break 2 + fi + done +done +fi +rm -f conftest* +fi # $ac_x_libraries = NO + +if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then + # Didn't find X anywhere. Cache the known absence of X. + ac_cv_have_x="have_x=no" +else + # Record where we found X for the cache. + ac_cv_have_x="have_x=yes \ + ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries" +fi +fi + fi + eval "$ac_cv_have_x" +fi # $with_x != no + +if test "$have_x" != yes; then + echo "$ac_t""$have_x" 1>&6 + no_x=yes +else + # If each of the values was on the command line, it overrides each guess. + test "x$x_includes" = xNONE && x_includes=$ac_x_includes + test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries + # Update the cache value to reflect the command line values. + ac_cv_have_x="have_x=yes \ + ac_x_includes=$x_includes ac_x_libraries=$x_libraries" + echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6 +fi + +if test "$no_x" = yes; then + # Not all programs may use this symbol, but it does not hurt to define it. + cat >> confdefs.pytmp <<\EOF + (''' X_DISPLAY_MISSING ''', ' 1 ') +EOF +cat >> confdefs.h <<\EOF +#define X_DISPLAY_MISSING 1 +EOF + + X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS= +else + if test -n "$x_includes"; then + X_CFLAGS="$X_CFLAGS -I$x_includes" + fi + + # It would also be nice to do this for all -L options, not just this one. + if test -n "$x_libraries"; then + X_LIBS="$X_LIBS -L$x_libraries" + # For Solaris; some versions of Sun CC require a space after -R and + # others require no space. Words are not sufficient . . . . + case "`(uname -sr) 2>/dev/null`" in + "SunOS 5"*) + echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6 +echo "configure:3286: checking whether -R must be followed by a space" >&5 + ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ac_R_nospace=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_R_nospace=no +fi +rm -f conftest* + if test $ac_R_nospace = yes; then + echo "$ac_t""no" 1>&6 + X_LIBS="$X_LIBS -R$x_libraries" + else + LIBS="$ac_xsave_LIBS -R $x_libraries" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ac_R_space=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_R_space=no +fi +rm -f conftest* + if test $ac_R_space = yes; then + echo "$ac_t""yes" 1>&6 + X_LIBS="$X_LIBS -R $x_libraries" + else + echo "$ac_t""neither works" 1>&6 + fi + fi + LIBS="$ac_xsave_LIBS" + esac + fi + + # Check for system-dependent libraries X programs must link with. + # Do this before checking for the system-independent R6 libraries + # (-lICE), since we may need -lsocket or whatever for X linking. + + if test "$ISC" = yes; then + X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet" + else + # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X + # libraries were built with DECnet support. And karl@cs.umb.edu says + # the Alpha needs dnet_stub (dnet does not exist). + echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6 +echo "configure:3351: checking for dnet_ntoa in -ldnet" >&5 +ac_lib_var=`echo dnet'_'dnet_ntoa | 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="-ldnet $LIBS" +cat > conftest.$ac_ext <&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 + X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet" +else + echo "$ac_t""no" 1>&6 +fi + + if test $ac_cv_lib_dnet_dnet_ntoa = no; then + echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6 +echo "configure:3392: checking for dnet_ntoa in -ldnet_stub" >&5 +ac_lib_var=`echo dnet_stub'_'dnet_ntoa | 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="-ldnet_stub $LIBS" +cat > conftest.$ac_ext <&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 + X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub" +else + echo "$ac_t""no" 1>&6 +fi + + fi + + # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT, + # to get the SysV transport functions. + # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4) + # needs -lnsl. + # The nsl library prevents programs from opening the X display + # on Irix 5.2, according to dickey@clark.net. + echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6 +echo "configure:3440: checking for gethostbyname" >&5 +if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#undef gethostbyname +/* 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 gethostbyname(); + +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_gethostbyname) || defined (__stub___gethostbyname) +choke me +#else +gethostbyname(); +#endif + +; return 0; } +EOF +if { (eval echo configure:3472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_gethostbyname=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_gethostbyname=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then + echo "$ac_t""yes" 1>&6 + : +else + echo "$ac_t""no" 1>&6 +fi + + if test $ac_cv_func_gethostbyname = no; then + echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 +echo "configure:3493: checking for gethostbyname in -lnsl" >&5 +ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lnsl $LIBS" +cat > conftest.$ac_ext <&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 + X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl" +else + echo "$ac_t""no" 1>&6 +fi + + fi + + # lieder@skyler.mavd.honeywell.com says without -lsocket, + # socket/setsockopt and other routines are undefined under SCO ODT + # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary + # on later versions), says simon@lia.di.epfl.ch: it contains + # gethostby* variants that don't use the nameserver (or something). + # -lsocket must be given before -lnsl if both are needed. + # We assume that if connect needs -lnsl, so does gethostbyname. + echo $ac_n "checking for connect""... $ac_c" 1>&6 +echo "configure:3542: checking for connect" >&5 +if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#undef connect +/* 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 connect(); + +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_connect) || defined (__stub___connect) +choke me +#else +connect(); +#endif + +; return 0; } +EOF +if { (eval echo configure:3574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_connect=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_connect=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then + echo "$ac_t""yes" 1>&6 + : +else + echo "$ac_t""no" 1>&6 +fi + + if test $ac_cv_func_connect = no; then + echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6 +echo "configure:3595: checking for connect in -lsocket" >&5 +ac_lib_var=`echo socket'_'connect | 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="-lsocket $X_EXTRA_LIBS $LIBS" +cat > conftest.$ac_ext <&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 + X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS" +else + echo "$ac_t""no" 1>&6 +fi + + fi + + # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX. + echo $ac_n "checking for remove""... $ac_c" 1>&6 +echo "configure:3638: checking for remove" >&5 +if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#undef remove +/* 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 remove(); + +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_remove) || defined (__stub___remove) +choke me +#else +remove(); +#endif + +; return 0; } +EOF +if { (eval echo configure:3670: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_remove=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_remove=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then + echo "$ac_t""yes" 1>&6 + : +else + echo "$ac_t""no" 1>&6 +fi + + if test $ac_cv_func_remove = no; then + echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6 +echo "configure:3691: checking for remove in -lposix" >&5 +ac_lib_var=`echo posix'_'remove | 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="-lposix $LIBS" +cat > conftest.$ac_ext <&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 + X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix" +else + echo "$ac_t""no" 1>&6 +fi + + fi + + # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. + echo $ac_n "checking for shmat""... $ac_c" 1>&6 +echo "configure:3734: checking for shmat" >&5 +if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#undef shmat +/* 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 shmat(); + +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_shmat) || defined (__stub___shmat) +choke me +#else +shmat(); +#endif + +; return 0; } +EOF +if { (eval echo configure:3766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_shmat=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_shmat=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then + echo "$ac_t""yes" 1>&6 + : +else + echo "$ac_t""no" 1>&6 +fi + + if test $ac_cv_func_shmat = no; then + echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6 +echo "configure:3787: checking for shmat in -lipc" >&5 +ac_lib_var=`echo ipc'_'shmat | 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="-lipc $LIBS" +cat > conftest.$ac_ext <&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 + X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc" +else + echo "$ac_t""no" 1>&6 +fi + + fi + fi + + # Check for libraries that X11R6 Xt/Xaw programs need. + ac_save_LDFLAGS="$LDFLAGS" + test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries" + # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to + # check for ICE first), but we must link in the order -lSM -lICE or + # we get undefined symbols. So assume we have SM if we have ICE. + # These have to be linked with before -lX11, unlike the other + # libraries we check for below, so use a different variable. + # --interran@uluru.Stanford.EDU, kb@cs.umb.edu. + echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6 +echo "configure:3839: checking for IceConnectionNumber in -lICE" >&5 +ac_lib_var=`echo ICE'_'IceConnectionNumber | 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="-lICE $X_EXTRA_LIBS $LIBS" +cat > conftest.$ac_ext <&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 + X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE" +else + echo "$ac_t""no" 1>&6 +fi + + LDFLAGS="$ac_save_LDFLAGS" + +fi + + +XCFLAGS="$X_CFLAGS" + +fi # COMPILE_ENVIRONMENT + +MOZILLA_VERSION=`$PYTHON $srcdir/python/mozbuild/mozbuild/milestone.py --topsrcdir $srcdir` +MOZILLA_UAVERSION=`$PYTHON $srcdir/python/mozbuild/mozbuild/milestone.py --topsrcdir $srcdir --uaversion` +MOZILLA_SYMBOLVERSION=`$PYTHON $srcdir/python/mozbuild/mozbuild/milestone.py --topsrcdir $srcdir --symbolversion` +if test -z "$MOZILLA_VERSION"; then + { echo "configure: error: failed to read version info from milestone file" 1>&2; echo "configure: error: failed to read version info from milestone file" 1>&5; exit 1; } +fi + +cat >> confdefs.pytmp <> confdefs.h <> confdefs.pytmp <> confdefs.h <> confdefs.pytmp <> confdefs.h <> confdefs.pytmp <> confdefs.h <> confdefs.pytmp <> confdefs.h <&2; echo "configure: error: --with-arch is not supported on non-GNU toolchains" 1>&5; exit 1; } + fi + MOZ_ARCH=$withval +fi + + +if test -z "$MOZ_ARCH"; then + case "${CPU_ARCH}-${OS_TARGET}" in + arm-Android) + MOZ_THUMB=yes + MOZ_ARCH=armv7-a + MOZ_FPU=vfp + MOZ_FLOAT_ABI=softfp + MOZ_ALIGN=no + ;; + arm-Darwin) + MOZ_ARCH=toolchain-default + ;; + esac +fi + +if test "$MOZ_ARCH" = "armv6" -a "$OS_TARGET" = "Android"; then + MOZ_FPU=vfp + MOZ_FLOAT_ABI=softfp +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 toolchains" 1>&2; echo "configure: error: --with-thumb is not supported on non-GNU toolchains" 1>&5; 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 toolchains" 1>&2; echo "configure: error: --with-thumb-interwork is not supported on non-GNU toolchains" 1>&5; exit 1; } + fi + MOZ_THUMB_INTERWORK=$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 toolchains" 1>&2; echo "configure: error: --with-fpu is not supported on non-GNU toolchains" 1>&5; 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 toolchains" 1>&2; echo "configure: error: --with-float-abi is not supported on non-GNU toolchains" 1>&5; 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 toolchains" 1>&2; echo "configure: error: --with-soft-float is not supported on non-GNU toolchains" 1>&5; 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 <&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 + +if test "$MOZ_THUMB2" = 1; then + cat >> confdefs.pytmp <<\EOF + (''' MOZ_THUMB2 ''', ' 1 ') +EOF +cat >> confdefs.h <<\EOF +#define MOZ_THUMB2 1 +EOF + +fi + +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 +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" + echo $ac_n "checking whether alignment flag ($align_flag) is supported""... $ac_c" 1>&6 +echo "configure:4172: checking whether alignment flag ($align_flag) is supported" >&5 + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then + : +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + align_flag="" +fi +rm -f conftest* + 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" + echo $ac_n "checking whether the chosen combination of compiler flags ($all_flags) works""... $ac_c" 1>&6 +echo "configure:4198: checking whether the chosen combination of compiler flags ($all_flags) works" >&5 + cat > conftest.$ac_ext <&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; echo "configure: error: no" 1>&5; 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 + + + +if test "$CPU_ARCH" = "arm"; then + NEON_FLAGS="-mfpu=neon" + echo $ac_n "checking for ARM SIMD support in compiler""... $ac_c" 1>&6 +echo "configure:4231: checking for ARM SIMD support in compiler" >&5 + # We try to link so that this also fails when + # building with LTO. + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + 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 + cat >> confdefs.pytmp <<\EOF + (''' HAVE_ARM_SIMD ''', ' 1 ') +EOF +cat >> confdefs.h <<\EOF +#define HAVE_ARM_SIMD 1 +EOF + + HAVE_ARM_SIMD=1 + fi + + echo $ac_n "checking ARM version support in compiler""... $ac_c" 1>&6 +echo "configure:4265: checking ARM version support in compiler" >&5 + ARM_ARCH=`${CC-cc} ${CFLAGS} -dM -E - < /dev/null | sed -n 's/.*__ARM_ARCH_\([0-9][0-9]*\).*/\1/p'` + echo "$ac_t"""$ARM_ARCH"" 1>&6 + + echo $ac_n "checking for ARM NEON support in compiler""... $ac_c" 1>&6 +echo "configure:4270: checking for ARM NEON support in compiler" >&5 + # We try to link so that this also fails when + # building with LTO. + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + 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 + cat >> confdefs.pytmp <<\EOF + (''' HAVE_ARM_NEON ''', ' 1 ') +EOF +cat >> confdefs.h <<\EOF +#define HAVE_ARM_NEON 1 +EOF + + HAVE_ARM_NEON=1 + + if test -n "$ARM_ARCH"; then + if test "$ARM_ARCH" -lt 7; then + BUILD_ARM_NEON= + else + cat >> confdefs.pytmp <<\EOF + (''' BUILD_ARM_NEON ''', ' 1 ') +EOF +cat >> confdefs.h <<\EOF +#define BUILD_ARM_NEON 1 +EOF + + BUILD_ARM_NEON=1 + fi + fi + fi + +fi # CPU_ARCH = arm + + + + + + + + + + + + +if test "$OS_TARGET" = "Android"; then + case "${CPU_ARCH}-${MOZ_ARCH}" in + arm-armv7*) + ANDROID_CPU_ARCH=armeabi-v7a + ;; + arm-*) + ANDROID_CPU_ARCH=armeabi + ;; + x86-*) + ANDROID_CPU_ARCH=x86 + ;; + mips32-*) # When target_cpu is mipsel, CPU_ARCH is mips32 + ANDROID_CPU_ARCH=mips + ;; + aarch64-*) + ANDROID_CPU_ARCH=arm64-v8a + ;; + esac + + +fi + + + +if test "$OS_TARGET" = "Android"; then + cpu_arch_dir="$ANDROID_CPU_ARCH" + # NDK r12 removed the arm/thumb library split and just made everything + # thumb by default. Attempt to compensate. + if test "$MOZ_THUMB2" = 1 -a -d "$cpu_arch_dir/thumb"; then + cpu_arch_dir="$cpu_arch_dir/thumb" + fi + + if test -z "$STLPORT_CPPFLAGS$STLPORT_LIBS"; then + case "$android_cxx_stl" in + libstdc++) + # android-ndk-r8b and later + ndk_base="$android_ndk/sources/cxx-stl/gnu-libstdc++/$android_gnu_compiler_version" + ndk_libs_include="$ndk_base/libs/$ANDROID_CPU_ARCH" + ndk_libs="$ndk_base/libs/$cpu_arch_dir" + ndk_include="$ndk_base/include" + + if ! test -e "$ndk_libs/libgnustl_static.a"; then + { echo "configure: error: Couldn't find path to gnu-libstdc++ in the android ndk" 1>&2; echo "configure: error: Couldn't find path to gnu-libstdc++ in the android ndk" 1>&5; exit 1; } + fi + + STLPORT_LIBS="-L$ndk_libs -lgnustl_static" + STLPORT_CPPFLAGS="-I$ndk_include -I$ndk_include/backward -I$ndk_libs_include/include" + ;; + libc++) + # android-ndk-r8b and later + ndk_base="$android_ndk/sources/cxx-stl" + cxx_base="$ndk_base/llvm-libc++" + cxx_libs="$cxx_base/libs/$cpu_arch_dir" + cxx_include="$cxx_base/libcxx/include" + cxxabi_base="$ndk_base/llvm-libc++abi" + cxxabi_include="$cxxabi_base/libcxxabi/include" + + if ! test -e "$cxx_libs/libc++_static.a"; then + { echo "configure: error: Couldn't find path to llvm-libc++ in the android ndk" 1>&2; echo "configure: error: Couldn't find path to llvm-libc++ in the android ndk" 1>&5; exit 1; } + fi + + STLPORT_LIBS="-L$cxx_libs -lc++_static" + # NDK r12 split the libc++ runtime libraries into pieces. + for lib in c++abi unwind android_support; do + if test -e "$cxx_libs/lib${lib}.a"; then + STLPORT_LIBS="$STLPORT_LIBS -l${lib}" + fi + done + # Add android/support/include/ for prototyping long double math + # functions, locale-specific C library functions, multibyte support, + # etc. + STLPORT_CPPFLAGS="-I$android_ndk/sources/android/support/include -I$cxx_include -I$cxxabi_include" + ;; + *) + { echo "configure: error: Bad value for --enable-android-cxx-stl" 1>&2; echo "configure: error: Bad value for --enable-android-cxx-stl" 1>&5; exit 1; } + ;; + esac + fi + CXXFLAGS="$CXXFLAGS $STLPORT_CPPFLAGS" +fi +MOZ_ANDROID_CXX_STL=$android_cxx_stl + + + + + +if test -n "${CLANG_CC}${CLANG_CL}"; then + _WARNINGS_CFLAGS="-Qunused-arguments ${_WARNINGS_CFLAGS}" + CPPFLAGS="-Qunused-arguments ${CPPFLAGS}" +fi +if test -n "${CLANG_CXX}${CLANG_CL}"; then + _WARNINGS_CXXFLAGS="-Qunused-arguments ${_WARNINGS_CXXFLAGS}" +fi + + + +# Check whether --enable-address-sanitizer or --disable-address-sanitizer was given. +if test "${enable_address_sanitizer+set}" = set; then + enableval="$enable_address_sanitizer" + if test "$enableval" = "yes"; then + MOZ_ASAN=1 + elif test "$enableval" = "no"; then + MOZ_ASAN= + else + { echo "configure: error: Option, address-sanitizer, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, address-sanitizer, does not take an argument ($enableval)." 1>&5; exit 1; } + fi +fi + +if test -n "$MOZ_ASAN"; then + MOZ_LLVM_HACKS=1 + if test -n "$CLANG_CL"; then + # Look for the ASan runtime binary + if test "$CPU_ARCH" = "x86_64"; then + MOZ_CLANG_RT_ASAN_LIB=clang_rt.asan_dynamic-x86_64.dll + else + MOZ_CLANG_RT_ASAN_LIB=clang_rt.asan_dynamic-i386.dll + fi + # We use MOZ_PATH_PROG in order to get a Windows style path. + # Extract the first word of "$MOZ_CLANG_RT_ASAN_LIB", so it can be a program name with args. +set dummy $MOZ_CLANG_RT_ASAN_LIB; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:4452: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_MOZ_CLANG_RT_ASAN_LIB_PATH'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$MOZ_CLANG_RT_ASAN_LIB_PATH" in + /*) + ac_cv_path_MOZ_CLANG_RT_ASAN_LIB_PATH="$MOZ_CLANG_RT_ASAN_LIB_PATH" # Let the user override the test with a path. + ;; + ?:/*) + ac_cv_path_MOZ_CLANG_RT_ASAN_LIB_PATH="$MOZ_CLANG_RT_ASAN_LIB_PATH" # 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_MOZ_CLANG_RT_ASAN_LIB_PATH="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + ;; +esac +fi +MOZ_CLANG_RT_ASAN_LIB_PATH="$ac_cv_path_MOZ_CLANG_RT_ASAN_LIB_PATH" +if test -n "$MOZ_CLANG_RT_ASAN_LIB_PATH"; then + echo "$ac_t""$MOZ_CLANG_RT_ASAN_LIB_PATH" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + if test "$msyshost"; then + case "$MOZ_CLANG_RT_ASAN_LIB_PATH" in + /*) + tmp_DIRNAME=`dirname "$MOZ_CLANG_RT_ASAN_LIB_PATH"` + tmp_BASENAME=`basename "$MOZ_CLANG_RT_ASAN_LIB_PATH"` + tmp_PWD=`cd "$tmp_DIRNAME" && pwd -W` + MOZ_CLANG_RT_ASAN_LIB_PATH="$tmp_PWD/$tmp_BASENAME" + if test -e "$MOZ_CLANG_RT_ASAN_LIB_PATH.exe"; then + MOZ_CLANG_RT_ASAN_LIB_PATH="$MOZ_CLANG_RT_ASAN_LIB_PATH.exe" + fi + esac + fi + + if test -z "$MOZ_CLANG_RT_ASAN_LIB_PATH"; then + { echo "configure: error: Couldn't find $MOZ_CLANG_RT_ASAN_LIB. It should be available in the same location as clang-cl." 1>&2; echo "configure: error: Couldn't find $MOZ_CLANG_RT_ASAN_LIB. It should be available in the same location as clang-cl." 1>&5; exit 1; } + fi + + # Suppressing errors in recompiled code. + if test "$OS_ARCH" = "WINNT"; then + CFLAGS="-fsanitize-blacklist=$_topsrcdir/build/sanitizers/asan_blacklist_win.txt $CFLAGS" + CXXFLAGS="-fsanitize-blacklist=$_topsrcdir/build/sanitizers/asan_blacklist_win.txt $CXXFLAGS" + fi + fi + CFLAGS="-fsanitize=address $CFLAGS" + CXXFLAGS="-fsanitize=address $CXXFLAGS" + if test -z "$CLANG_CL"; then + LDFLAGS="-fsanitize=address $LDFLAGS" + fi + cat >> confdefs.pytmp <<\EOF + (''' MOZ_ASAN ''', ' 1 ') +EOF +cat >> confdefs.h <<\EOF +#define MOZ_ASAN 1 +EOF + + # Extract the first word of "llvm-symbolizer", so it can be a program name with args. +set dummy llvm-symbolizer; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:4522: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_LLVM_SYMBOLIZER'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$LLVM_SYMBOLIZER" in + /*) + ac_cv_path_LLVM_SYMBOLIZER="$LLVM_SYMBOLIZER" # Let the user override the test with a path. + ;; + ?:/*) + ac_cv_path_LLVM_SYMBOLIZER="$LLVM_SYMBOLIZER" # 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_LLVM_SYMBOLIZER="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + ;; +esac +fi +LLVM_SYMBOLIZER="$ac_cv_path_LLVM_SYMBOLIZER" +if test -n "$LLVM_SYMBOLIZER"; then + echo "$ac_t""$LLVM_SYMBOLIZER" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + if test "$msyshost"; then + case "$LLVM_SYMBOLIZER" in + /*) + tmp_DIRNAME=`dirname "$LLVM_SYMBOLIZER"` + tmp_BASENAME=`basename "$LLVM_SYMBOLIZER"` + tmp_PWD=`cd "$tmp_DIRNAME" && pwd -W` + LLVM_SYMBOLIZER="$tmp_PWD/$tmp_BASENAME" + if test -e "$LLVM_SYMBOLIZER.exe"; then + LLVM_SYMBOLIZER="$LLVM_SYMBOLIZER.exe" + fi + esac + fi + +fi + + +# Check whether --enable-memory-sanitizer or --disable-memory-sanitizer was given. +if test "${enable_memory_sanitizer+set}" = set; then + enableval="$enable_memory_sanitizer" + if test "$enableval" = "yes"; then + MOZ_MSAN=1 + elif test "$enableval" = "no"; then + MOZ_MSAN= + else + { echo "configure: error: Option, memory-sanitizer, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, memory-sanitizer, does not take an argument ($enableval)." 1>&5; exit 1; } + fi +fi + +if test -n "$MOZ_MSAN"; then + MOZ_LLVM_HACKS=1 + CFLAGS="-fsanitize=memory -fsanitize-memory-track-origins $CFLAGS" + CXXFLAGS="-fsanitize=memory -fsanitize-memory-track-origins $CXXFLAGS" + if test -z "$CLANG_CL"; then + LDFLAGS="-fsanitize=memory -fsanitize-memory-track-origins $LDFLAGS" + fi + cat >> confdefs.pytmp <<\EOF + (''' MOZ_MSAN ''', ' 1 ') +EOF +cat >> confdefs.h <<\EOF +#define MOZ_MSAN 1 +EOF + + # Extract the first word of "llvm-symbolizer", so it can be a program name with args. +set dummy llvm-symbolizer; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:4599: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_LLVM_SYMBOLIZER'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$LLVM_SYMBOLIZER" in + /*) + ac_cv_path_LLVM_SYMBOLIZER="$LLVM_SYMBOLIZER" # Let the user override the test with a path. + ;; + ?:/*) + ac_cv_path_LLVM_SYMBOLIZER="$LLVM_SYMBOLIZER" # 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_LLVM_SYMBOLIZER="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + ;; +esac +fi +LLVM_SYMBOLIZER="$ac_cv_path_LLVM_SYMBOLIZER" +if test -n "$LLVM_SYMBOLIZER"; then + echo "$ac_t""$LLVM_SYMBOLIZER" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + if test "$msyshost"; then + case "$LLVM_SYMBOLIZER" in + /*) + tmp_DIRNAME=`dirname "$LLVM_SYMBOLIZER"` + tmp_BASENAME=`basename "$LLVM_SYMBOLIZER"` + tmp_PWD=`cd "$tmp_DIRNAME" && pwd -W` + LLVM_SYMBOLIZER="$tmp_PWD/$tmp_BASENAME" + if test -e "$LLVM_SYMBOLIZER.exe"; then + LLVM_SYMBOLIZER="$LLVM_SYMBOLIZER.exe" + fi + esac + fi + +fi + + +# Check whether --enable-thread-sanitizer or --disable-thread-sanitizer was given. +if test "${enable_thread_sanitizer+set}" = set; then + enableval="$enable_thread_sanitizer" + if test "$enableval" = "yes"; then + MOZ_TSAN=1 + elif test "$enableval" = "no"; then + MOZ_TSAN= + else + { echo "configure: error: Option, thread-sanitizer, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, thread-sanitizer, does not take an argument ($enableval)." 1>&5; exit 1; } + fi +fi + +if test -n "$MOZ_TSAN"; then + MOZ_LLVM_HACKS=1 + CFLAGS="-fsanitize=thread $CFLAGS" + CXXFLAGS="-fsanitize=thread $CXXFLAGS" + if test -z "$CLANG_CL"; then + LDFLAGS="-fsanitize=thread $LDFLAGS" + fi + cat >> confdefs.pytmp <<\EOF + (''' MOZ_TSAN ''', ' 1 ') +EOF +cat >> confdefs.h <<\EOF +#define MOZ_TSAN 1 +EOF + + # Extract the first word of "llvm-symbolizer", so it can be a program name with args. +set dummy llvm-symbolizer; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:4676: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_LLVM_SYMBOLIZER'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$LLVM_SYMBOLIZER" in + /*) + ac_cv_path_LLVM_SYMBOLIZER="$LLVM_SYMBOLIZER" # Let the user override the test with a path. + ;; + ?:/*) + ac_cv_path_LLVM_SYMBOLIZER="$LLVM_SYMBOLIZER" # 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_LLVM_SYMBOLIZER="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + ;; +esac +fi +LLVM_SYMBOLIZER="$ac_cv_path_LLVM_SYMBOLIZER" +if test -n "$LLVM_SYMBOLIZER"; then + echo "$ac_t""$LLVM_SYMBOLIZER" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + if test "$msyshost"; then + case "$LLVM_SYMBOLIZER" in + /*) + tmp_DIRNAME=`dirname "$LLVM_SYMBOLIZER"` + tmp_BASENAME=`basename "$LLVM_SYMBOLIZER"` + tmp_PWD=`cd "$tmp_DIRNAME" && pwd -W` + LLVM_SYMBOLIZER="$tmp_PWD/$tmp_BASENAME" + if test -e "$LLVM_SYMBOLIZER.exe"; then + LLVM_SYMBOLIZER="$LLVM_SYMBOLIZER.exe" + fi + esac + fi + +fi + + +# The LLVM symbolizer is used by all sanitizers + + +# Check whether --enable-llvm-hacks or --disable-llvm-hacks was given. +if test "${enable_llvm_hacks+set}" = set; then + enableval="$enable_llvm_hacks" + if test "$enableval" = "yes"; then + MOZ_LLVM_HACKS=1 + elif test "$enableval" = "no"; then + MOZ_LLVM_HACKS= + else + { echo "configure: error: Option, llvm-hacks, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, llvm-hacks, does not take an argument ($enableval)." 1>&5; exit 1; } + fi +fi + +if test -n "$MOZ_LLVM_HACKS"; then + MOZ_NO_WLZDEFS=1 + MOZ_CFLAGS_NSS=1 +fi + + + +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + : +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + { echo "configure: error: compiler is incompatible with sanitize options" 1>&2; echo "configure: error: compiler is incompatible with sanitize options" 1>&5; exit 1; } +fi +rm -f conftest* + + + +if test "$GNU_CC"; then + MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -Wl,-h,$(DSO_SONAME) -o $@' + MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -Wl,-h,$(DSO_SONAME) -o $@' + DSO_LDOPTS='-shared' + if test "$GCC_USE_GNU_LD"; then + # Some tools like ASan use a runtime library that is only + # linked against executables, so we must allow undefined + # symbols for shared objects in some cases. + if test -z "$MOZ_NO_WLZDEFS"; then + # Don't allow undefined symbols in libraries + DSO_LDOPTS="$DSO_LDOPTS -Wl,-z,defs" + fi + fi + WARNINGS_AS_ERRORS='-Werror' + DSO_CFLAGS='' + DSO_PIC_CFLAGS='-fPIC' + ASFLAGS="$ASFLAGS -fPIC" + echo $ac_n "checking for --noexecstack option to as""... $ac_c" 1>&6 +echo "configure:4784: checking for --noexecstack option to as" >&5 + _SAVE_CFLAGS=$CFLAGS + CFLAGS="$CFLAGS -Wa,--noexecstack" + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6 + ASFLAGS="$ASFLAGS -Wa,--noexecstack" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + echo "$ac_t""no" 1>&6 +fi +rm -f conftest* + CFLAGS=$_SAVE_CFLAGS + echo $ac_n "checking for -z noexecstack option to ld""... $ac_c" 1>&6 +echo "configure:4808: checking for -z noexecstack option to ld" >&5 + _SAVE_LDFLAGS=$LDFLAGS + LDFLAGS="$LDFLAGS -Wl,-z,noexecstack" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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 "$ac_t""no" 1>&6 + LDFLAGS=$_SAVE_LDFLAGS +fi +rm -f conftest* + + echo $ac_n "checking for -z text option to ld""... $ac_c" 1>&6 +echo "configure:4832: checking for -z text option to ld" >&5 + _SAVE_LDFLAGS=$LDFLAGS + LDFLAGS="$LDFLAGS -Wl,-z,text" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6 + NSPR_LDFLAGS="$NSPR_LDFLAGS -Wl,-z,text" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + echo "$ac_t""no" 1>&6 + LDFLAGS=$_SAVE_LDFLAGS +fi +rm -f conftest* + + echo $ac_n "checking for --build-id option to ld""... $ac_c" 1>&6 +echo "configure:4857: checking for --build-id option to ld" >&5 + _SAVE_LDFLAGS=$LDFLAGS + LDFLAGS="$LDFLAGS -Wl,--build-id" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6 + NSPR_LDFLAGS="$NSPR_LDFLAGS -Wl,--build-id" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + echo "$ac_t""no" 1>&6 + LDFLAGS=$_SAVE_LDFLAGS +fi +rm -f conftest* + + _DEFINES_CFLAGS='-include $(topobjdir)/js/src/js-confdefs.h -DMOZILLA_CLIENT' + _USE_CPP_INCLUDE_FLAG=1 + +else + MKSHLIB='$(LD) $(DSO_LDOPTS) -h $(DSO_SONAME) -o $@' + MKCSHLIB='$(LD) $(DSO_LDOPTS) -h $(DSO_SONAME) -o $@' + + DSO_LDOPTS='-shared' + if test "$GNU_LD"; then + # Don't allow undefined symbols in libraries + DSO_LDOPTS="$DSO_LDOPTS -z defs" + fi + + DSO_CFLAGS='' + DSO_PIC_CFLAGS='-KPIC' + _DEFINES_CFLAGS='$(ACDEFINES) -D_JS_CONFDEFS_H_ -DMOZILLA_CLIENT' +fi + +if test "$GNU_CXX"; then + _DEFINES_CXXFLAGS='-DMOZILLA_CLIENT -include $(topobjdir)/js/src/js-confdefs.h' + _USE_CPP_INCLUDE_FLAG=1 + +else + _DEFINES_CXXFLAGS='-DMOZILLA_CLIENT -D_JS_CONFDEFS_H_ $(ACDEFINES)' +fi + +case "$host" in +*mingw*) + if test -n "$_WIN32_MSVC"; then + HOST_AR=lib + HOST_AR_FLAGS='-NOLOGO -OUT:$@' + HOST_CFLAGS="$HOST_CFLAGS -TC -nologo" + HOST_RANLIB='echo ranlib' + else + HOST_CFLAGS="$HOST_CFLAGS -mwindows" + fi + HOST_CFLAGS="$HOST_CFLAGS -DXP_WIN32 -DXP_WIN -DWIN32 -D_WIN32 -D_CRT_SECURE_NO_WARNINGS" + HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O2}" + HOST_BIN_SUFFIX=.exe + + case "${host_cpu}" in + i*86) + if test -n "$_WIN32_MSVC"; then + HOST_LDFLAGS="$HOST_LDFLAGS -MACHINE:X86" + fi + ;; + x86_64) + if test -n "$_WIN32_MSVC"; then + HOST_LDFLAGS="$HOST_LDFLAGS -MACHINE:X64" + fi + HOST_CFLAGS="$HOST_CFLAGS -D_AMD64_" + ;; + esac + ;; + +*-darwin*) + HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX -DXP_MACOSX" + HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O3}" + ;; + +*-linux*|*-kfreebsd*-gnu|*-gnu*) + HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX" + HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O3}" + ;; + +*) + HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX" + HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O2}" + ;; +esac + + + cat > conftest.c </dev/null 2>&1; then + if grep '^target triple =' conftest.s; then + lto_is_enabled=yes + fi + fi + rm -f conftest.cs + + + +case "$target" in +*-darwin*) + MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -o $@' + MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -o $@' + MOZ_OPTIMIZE_FLAGS="-O3 -fno-stack-protector" + CFLAGS="$CFLAGS -fno-common" + CXXFLAGS="$CXXFLAGS -fno-common -stdlib=libc++" + DLL_SUFFIX=".dylib" + DSO_LDOPTS='' + STRIP="$STRIP -x -S" + LDFLAGS="$LDFLAGS -lobjc" + # The ExceptionHandling framework is needed for Objective-C exception + # logging code in nsObjCExceptions.h. Currently we only use that in debug + # builds. + _SAVE_LDFLAGS=$LDFLAGS + echo $ac_n "checking for -framework ExceptionHandling""... $ac_c" 1>&6 +echo "configure:4982: checking for -framework ExceptionHandling" >&5 + LDFLAGS="$LDFLAGS -framework ExceptionHandling" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ac_cv_have_framework_exceptionhandling="yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_have_framework_exceptionhandling="no" +fi +rm -f conftest* + echo "$ac_t""$ac_cv_have_framework_exceptionhandling" 1>&6 + if test "$ac_cv_have_framework_exceptionhandling" = "yes"; then + MOZ_DEBUG_LDFLAGS="$MOZ_DEBUG_LDFLAGS -framework ExceptionHandling"; + fi + LDFLAGS=$_SAVE_LDFLAGS + + if test "x$lto_is_enabled" = "xyes"; then + echo "Skipping -dead_strip because lto is enabled." + elif test "x$enable_dtrace" = "xyes"; then + echo "Skipping -dead_strip because DTrace is enabled. See bug 403132." + else + echo $ac_n "checking for -dead_strip option to ld""... $ac_c" 1>&6 +echo "configure:5014: checking for -dead_strip option to ld" >&5 + _SAVE_LDFLAGS=$LDFLAGS + LDFLAGS="$LDFLAGS -Wl,-dead_strip" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + _HAVE_DEAD_STRIP=1 +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + _HAVE_DEAD_STRIP= +fi +rm -f conftest* + if test -n "$_HAVE_DEAD_STRIP" ; then + echo "$ac_t""yes" 1>&6 + MOZ_OPTIMIZE_LDFLAGS="-Wl,-dead_strip" + else + echo "$ac_t""no" 1>&6 + fi + + LDFLAGS=$_SAVE_LDFLAGS + fi + MOZ_FIX_LINK_PATHS="-Wl,-executable_path,${DIST}/bin" + ;; + +*-android*|*-linuxandroid*) + cat >> confdefs.pytmp <<\EOF + (''' NO_PW_GECOS ''', ' 1 ') +EOF +cat >> confdefs.h <<\EOF +#define NO_PW_GECOS 1 +EOF + + MOZ_GFX_OPTIMIZE_MOBILE=1 + MOZ_OPTIMIZE_FLAGS="-O3" + if test -z "$CLANG_CC"; then + MOZ_OPTIMIZE_FLAGS="-freorder-blocks -fno-reorder-functions $MOZ_OPTIMIZE_FLAGS" + fi + ;; + +*-*linux*) + if test "$GNU_CC" -o "$GNU_CXX"; then + MOZ_PGO_OPTIMIZE_FLAGS="-O3" + MOZ_OPTIMIZE_FLAGS="-O3" + if test -z "$CLANG_CC"; then + MOZ_OPTIMIZE_FLAGS="-freorder-blocks $MOZ_OPTIMIZE_FLAGS" + fi + fi + + case "${target_cpu}" in + alpha*) + CFLAGS="$CFLAGS -mieee" + CXXFLAGS="$CXXFLAGS -mieee" + ;; + esac + ;; + +*-mingw*) + DSO_CFLAGS= + DSO_PIC_CFLAGS= + DLL_SUFFIX=.dll + RC=rc.exe + if test -n "$GNU_CC" -o -n "$CLANG_CC"; then + CC="$CC -mwindows" + CXX="$CXX -mwindows" + CPP="$CPP -mwindows" + CFLAGS="$CFLAGS -mms-bitfields" + CXXFLAGS="$CXXFLAGS -mms-bitfields" + DSO_LDOPTS='-shared' + MKSHLIB='$(CXX) $(DSO_LDOPTS) -o $@' + MKCSHLIB='$(CC) $(DSO_LDOPTS) -o $@' + RC='$(WINDRES)' + # Use static libgcc and libstdc++ + LDFLAGS="$LDFLAGS -static" + # Use temp file for windres (bug 213281) + RCFLAGS='-O coff --use-temp-file' + # mingw doesn't require kernel32, user32, and advapi32 explicitly + LIBS="$LIBS -lgdi32 -lwinmm -lwsock32 -lpsapi" + MOZ_FIX_LINK_PATHS= + DLL_PREFIX= + IMPORT_LIB_SUFFIX=a + + WIN32_CONSOLE_EXE_LDFLAGS=-mconsole + WIN32_GUI_EXE_LDFLAGS=-mwindows + else + TARGET_COMPILER_ABI=msvc + HOST_CC='$(CC)' + HOST_CXX='$(CXX)' + HOST_LD='$(LD)' + if test "$AS_BIN"; then + AS="$(basename "$AS_BIN")" + fi + AR='lib' + AR_FLAGS='-NOLOGO -OUT:$@' + AR_EXTRACT= + RANLIB='echo not_ranlib' + STRIP='echo not_strip' + PKG_SKIP_STRIP=1 + OBJ_SUFFIX=obj + LIB_SUFFIX=lib + DLL_PREFIX= + LIB_PREFIX= + IMPORT_LIB_SUFFIX=lib + MKSHLIB='$(LD) -NOLOGO -DLL -OUT:$@ -PDB:$(LINK_PDBFILE) $(DSO_LDOPTS)' + MKCSHLIB='$(LD) -NOLOGO -DLL -OUT:$@ -PDB:$(LINK_PDBFILE) $(DSO_LDOPTS)' + if test "$CPU_ARCH" = "x86"; then + WIN32_SUBSYSTEM_VERSION=5.01 + else + WIN32_SUBSYSTEM_VERSION=6.01 + fi + WIN32_CONSOLE_EXE_LDFLAGS=-SUBSYSTEM:CONSOLE,$WIN32_SUBSYSTEM_VERSION + WIN32_GUI_EXE_LDFLAGS=-SUBSYSTEM:WINDOWS,$WIN32_SUBSYSTEM_VERSION + DSO_LDOPTS=-SUBSYSTEM:WINDOWS,$WIN32_SUBSYSTEM_VERSION + _USE_CPP_INCLUDE_FLAG=1 + _DEFINES_CFLAGS='-FI $(topobjdir)/js/src/js-confdefs.h -DMOZILLA_CLIENT' + _DEFINES_CXXFLAGS='-FI $(topobjdir)/js/src/js-confdefs.h -DMOZILLA_CLIENT' + CFLAGS="$CFLAGS -W3 -Gy -Zc:inline" + CXXFLAGS="$CXXFLAGS -W3 -Gy -Zc:inline" + if test "$CPU_ARCH" = "x86";then + if test -z `echo $CFLAGS | grep -i -/arch:` ; then + CFLAGS="$CFLAGS -arch:SSE2" + fi + if test -z `echo $CXXFLAGS | grep -i -/arch:` ; then + CXXFLAGS="$CXXFLAGS -arch:SSE2" + fi + fi + CFLAGS="$CFLAGS -FS" + CXXFLAGS="$CXXFLAGS -FS" + if test -z "$MOZ_ASAN"; then + CFLAGS="$CFLAGS -Gw" + CXXFLAGS="$CXXFLAGS -Gw" + fi + # khuey says we can safely ignore MSVC warning C4251 + # MSVC warning C4244 (implicit type conversion may lose data) warns + # and requires workarounds for perfectly valid code. Also, GCC/clang + # don't warn about it by default. So for consistency/sanity, we turn + # it off on MSVC, too. + # MSVC warning C4267 warns for narrowing type conversions from size_t + # to 32-bit integer types on 64-bit platforms. Since this is virtually + # the same thing as C4244, we disable C4267, too. + CFLAGS="$CFLAGS -wd4244 -wd4267" + CXXFLAGS="$CXXFLAGS -wd4244 -wd4267 -wd4251" + if test -n "$CLANG_CL"; then + # XXX We should combine some of these with our generic GCC-style + # warning checks. + # + # Suppress the clang-cl warning for the inline 'new' and 'delete' in mozalloc + CXXFLAGS="$CXXFLAGS -Wno-inline-new-delete" + # We use offsetof on non-POD objects all the time. + # We also suppress this warning on other platforms. + CXXFLAGS="$CXXFLAGS -Wno-invalid-offsetof" + # MFBT thinks clang-cl supports constexpr, which it does, but + # not everything in Windows C++ headers supports constexpr + # as we might expect until MSVC 2015, so turn off this warning + # for now. + CXXFLAGS="$CXXFLAGS -Wno-invalid-constexpr" + # This warns for reasonable things like: + # enum { X = 0xffffffffU }; + # which is annoying for IDL headers. + CXXFLAGS="$CXXFLAGS -Wno-microsoft-enum-value" + # This warns for cases that would be reached by the Microsoft + # #include rules, but also currently warns on cases that would + # *also* be reached by standard C++ include rules. That + # behavior doesn't seem useful, so we turn it off. + CXXFLAGS="$CXXFLAGS -Wno-microsoft-include" + # We normally error out on unknown pragmas, but since clang-cl + # claims to be MSVC, it would be difficult to add + # #if defined(_MSC_VER) && !defined(__clang__) everywhere we + # use such pragmas, so just ignore them. + CFLAGS="$CFLAGS -Wno-unknown-pragmas" + CXXFLAGS="$CXXFLAGS -Wno-unknown-pragmas" + # We get errors about various #pragma intrinsic directives from + # clang-cl, and we don't need to hear about those. + CFLAGS="$CFLAGS -Wno-ignored-pragmas" + CXXFLAGS="$CXXFLAGS -Wno-ignored-pragmas" + # clang-cl's Intrin.h marks things like _ReadWriteBarrier + # as __attribute((__deprecated__)). This is nice to know, + # but since we don't get the equivalent warning from MSVC, + # let's just ignore it. + CFLAGS="$CFLAGS -Wno-deprecated-declarations" + CXXFLAGS="$CXXFLAGS -Wno-deprecated-declarations" + # We use a function like: + # __declspec(noreturn) __inline void f() {} + # which -Winvalid-noreturn complains about. Again, MSVC seems + # OK with it, so let's silence the warning. + CFLAGS="$CFLAGS -Wno-invalid-noreturn" + CXXFLAGS="$CXXFLAGS -Wno-invalid-noreturn" + # Missing |override| on virtual function declarations isn't + # something that MSVC currently warns about. + CXXFLAGS="$CXXFLAGS -Wno-inconsistent-missing-override" + # We use -DHAS_EXCEPTIONS=0, which removes the |throw()| + # declaration on |operator delete(void*)|. However, clang-cl + # must internally declare |operator delete(void*)| differently, + # which causes this warning for virtually every file in the + # tree. clang-cl doesn't support -fno-exceptions or equivalent, + # so there doesn't seem to be any way to convince clang-cl to + # declare |delete| differently. Therefore, suppress this + # warning. + CXXFLAGS="$CXXFLAGS -Wno-implicit-exception-spec-mismatch" + # At least one MSVC header and several headers in-tree have + # unused typedefs, so turn this on. + CXXFLAGS="$CXXFLAGS -Wno-unused-local-typedef" + # Several JS engine header files use __declspec(dllimport) on + # classes, and clang-cl helpfully warns about its non-support + # for such cases. We're not particularly worried about that, + # so ignore that warning. + CXXFLAGS="$CXXFLAGS -Wno-ignored-attributes" + fi + # make 'foo == bar;' error out + CFLAGS="$CFLAGS -we4553" + CXXFLAGS="$CXXFLAGS -we4553" + LIBS="$LIBS kernel32.lib user32.lib gdi32.lib winmm.lib wsock32.lib advapi32.lib psapi.lib" + MOZ_DEBUG_LDFLAGS='-DEBUG -DEBUGTYPE:CV' + WARNINGS_AS_ERRORS='-WX' + MOZ_OPTIMIZE_FLAGS="-O2" + MOZ_FIX_LINK_PATHS= + LDFLAGS="$LDFLAGS -LARGEADDRESSAWARE -NXCOMPAT" + if test -z "$DEVELOPER_OPTIONS"; then + LDFLAGS="$LDFLAGS -RELEASE" + fi + PROFILE_GEN_CFLAGS="-GL" + PROFILE_GEN_LDFLAGS="-LTCG:PGINSTRUMENT" + PROFILE_USE_CFLAGS="-GL -wd4624 -wd4952" + PROFILE_USE_LDFLAGS="-LTCG:PGUPDATE" + LDFLAGS="$LDFLAGS -DYNAMICBASE" + RCFLAGS="-nologo" + fi + cat >> confdefs.pytmp <<\EOF + (''' HAVE__MSIZE ''', ' 1 ') +EOF +cat >> confdefs.h <<\EOF +#define HAVE__MSIZE 1 +EOF + + cat >> confdefs.pytmp <<\EOF + (''' WIN32_LEAN_AND_MEAN ''', ' 1 ') +EOF +cat >> confdefs.h <<\EOF +#define WIN32_LEAN_AND_MEAN 1 +EOF + + BIN_SUFFIX='.exe' + MOZ_USER_DIR="Mozilla" + + case "$host_os" in + cygwin*|msvc*|mks*) + { echo "configure: error: Using a Cygwin build environment is unsupported. Configure cannot check for presence of necessary headers. Please upgrade to MozillaBuild; see https://developer.mozilla.org/en/Windows_Build_Prerequisites." 1>&2; echo "configure: error: Using a Cygwin build environment is unsupported. Configure cannot check for presence of necessary headers. Please upgrade to MozillaBuild; see https://developer.mozilla.org/en/Windows_Build_Prerequisites." 1>&5; exit 1; } + ;; + esac + + case "$target" in + i*86-*) + if test -n "$GNU_CC"; then + CFLAGS="$CFLAGS -mstackrealign -fno-keep-inline-dllexport" + CXXFLAGS="$CXXFLAGS -mstackrealign -fno-keep-inline-dllexport" + LDFLAGS="$LDFLAGS -Wl,--large-address-aware" + else + DSO_LDOPTS="$DSO_LDOPTS -MACHINE:X86" + LDFLAGS="$LDFLAGS -SAFESEH" + fi + + cat >> confdefs.pytmp <<\EOF + (''' _X86_ ''', ' 1 ') +EOF +cat >> confdefs.h <<\EOF +#define _X86_ 1 +EOF + + ;; + x86_64-*) + if test -n "$_WIN32_MSVC"; then + DSO_LDOPTS="$DSO_LDOPTS -MACHINE:X64" + fi + cat >> confdefs.pytmp <<\EOF + (''' _AMD64_ ''', ' 1 ') +EOF +cat >> confdefs.h <<\EOF +#define _AMD64_ 1 +EOF + + ;; + *) + cat >> confdefs.pytmp <<\EOF + (''' _CPU_ARCH_NOT_DEFINED ''', ' 1 ') +EOF +cat >> confdefs.h <<\EOF +#define _CPU_ARCH_NOT_DEFINED 1 +EOF + + ;; + esac + ;; + +*-netbsd*) + DSO_CFLAGS='' + CFLAGS="$CFLAGS -Dunix" + CXXFLAGS="$CXXFLAGS -Dunix" + if $CC -E - -dM /dev/null; then + DLL_SUFFIX=".so" + DSO_PIC_CFLAGS='-fPIC -DPIC' + DSO_LDOPTS='-shared' + BIN_FLAGS='-Wl,--export-dynamic' + else + DSO_PIC_CFLAGS='-fPIC -DPIC' + DLL_SUFFIX=".so.1.0" + DSO_LDOPTS='-shared' + fi + # This will fail on a.out systems prior to 1.5.1_ALPHA. + if test "$LIBRUNPATH"; then + DSO_LDOPTS="-Wl,-R$LIBRUNPATH $DSO_LDOPTS" + fi + MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -Wl,-soname,$(DSO_SONAME) -o $@' + MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -Wl,-soname,$(DSO_SONAME) -o $@' + ;; + +*-openbsd*) + DLL_SUFFIX=".so.1.0" + DSO_CFLAGS='' + DSO_PIC_CFLAGS='-fPIC' + DSO_LDOPTS='-shared -fPIC' + if test "$LIBRUNPATH"; then + DSO_LDOPTS="-R$LIBRUNPATH $DSO_LDOPTS" + fi + ;; + +esac + +cat >> confdefs.pytmp <> confdefs.h <> confdefs.pytmp <<\EOF + (''' JS_CPU_X86 ''', ' 1 ') +EOF +cat >> confdefs.h <<\EOF +#define JS_CPU_X86 1 +EOF + + ;; +x86_64*-*) + ENABLE_ION=1 + cat >> confdefs.pytmp <<\EOF + (''' JS_CPU_X64 ''', ' 1 ') +EOF +cat >> confdefs.h <<\EOF +#define JS_CPU_X64 1 +EOF + + ;; +arm*-*) + ENABLE_ION=1 + cat >> confdefs.pytmp <<\EOF + (''' JS_CPU_ARM ''', ' 1 ') +EOF +cat >> confdefs.h <<\EOF +#define JS_CPU_ARM 1 +EOF + + ;; +sparc-*) + cat >> confdefs.pytmp <<\EOF + (''' JS_CPU_SPARC ''', ' 1 ') +EOF +cat >> confdefs.h <<\EOF +#define JS_CPU_SPARC 1 +EOF + + ;; +mips*-*) + ENABLE_ION=1 + cat >> confdefs.pytmp <<\EOF + (''' JS_CPU_MIPS ''', ' 1 ') +EOF +cat >> confdefs.h <<\EOF +#define JS_CPU_MIPS 1 +EOF + + ;; +esac + +if test "$HAVE_64BIT_BUILD" ; then + cat >> confdefs.pytmp <<\EOF + (''' JS_PUNBOX64 ''', ' 1 ') +EOF +cat >> confdefs.h <<\EOF +#define JS_PUNBOX64 1 +EOF + +else + cat >> confdefs.pytmp <<\EOF + (''' JS_NUNBOX32 ''', ' 1 ') +EOF +cat >> confdefs.h <<\EOF +#define JS_NUNBOX32 1 +EOF + +fi + +# Check whether --enable-ion or --disable-ion was given. +if test "${enable_ion+set}" = set; then + enableval="$enable_ion" + if test "$enableval" = "no"; then + ENABLE_ION= + elif test "$enableval" = "yes"; then + : + else + { echo "configure: error: Option, ion, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, ion, does not take an argument ($enableval)." 1>&5; exit 1; } + fi +fi + + + + +if test -n "$COMPILE_ENVIRONMENT"; then + + + +if test -z "$MOZ_DEBUG" -o -n "$MOZ_ASAN"; then + MOZ_NO_DEBUG_RTL=1 +fi + + + +MOZ_DEBUG_ENABLE_DEFS="DEBUG TRACING" +# Check whether --with-debug-label or --without-debug-label was given. +if test "${with_debug_label+set}" = set; then + withval="$with_debug_label" + for option in `echo $withval | sed 's/,/ /g'`; do + MOZ_DEBUG_ENABLE_DEFS="$MOZ_DEBUG_ENABLE_DEFS DEBUG_${option}" +done +fi + + +if test -n "$MOZ_DEBUG"; then + if test -n "$COMPILE_ENVIRONMENT"; then + echo $ac_n "checking for valid debug flags""... $ac_c" 1>&6 +echo "configure:5471: checking for valid debug flags" >&5 + _SAVE_CFLAGS=$CFLAGS + CFLAGS="$CFLAGS $MOZ_DEBUG_FLAGS" + cat > conftest.$ac_ext < +int main() { +printf("Hello World\n"); +; return 0; } +EOF +if { (eval echo configure:5482: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + _results=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + _results=no +fi +rm -f conftest* + echo "$ac_t""$_results" 1>&6 + if test "$_results" = "no"; then + { echo "configure: error: These compiler flags are invalid: $MOZ_DEBUG_FLAGS" 1>&2; echo "configure: error: These compiler flags are invalid: $MOZ_DEBUG_FLAGS" 1>&5; exit 1; } + fi + CFLAGS=$_SAVE_CFLAGS + fi + + MOZ_DEBUG_DEFINES="$MOZ_DEBUG_ENABLE_DEFS" +else + MOZ_DEBUG_DEFINES="NDEBUG TRIMMED" +fi + + + + + +# Check whether --enable-cpp-rtti or --disable-cpp-rtti was given. +if test "${enable_cpp_rtti+set}" = set; then + enableval="$enable_cpp_rtti" + if test "$enableval" = "yes"; then + _MOZ_USE_RTTI=1 + elif test "$enableval" = "no"; then + _MOZ_USE_RTTI= + else + { echo "configure: error: Option, cpp-rtti, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, cpp-rtti, does not take an argument ($enableval)." 1>&5; exit 1; } + fi +fi + + +if test -z "$_MOZ_USE_RTTI"; then + if test "$GNU_CC"; then + CXXFLAGS="$CXXFLAGS -fno-rtti" + else + case "$target" in + *-mingw*) + CXXFLAGS="$CXXFLAGS -GR-" + esac + fi +fi + +if test "$CLANG_CXX"; then + ## We disable return-type-c-linkage because jsval is defined as a C++ type but is + ## returned by C functions. This is possible because we use knowledge about the ABI + ## to typedef it to a C type with the same layout when the headers are included + ## from C. + _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wno-unknown-warning-option -Wno-return-type-c-linkage" +fi + +if test -n "$DEVELOPER_OPTIONS"; then + MOZ_FORCE_GOLD=1 +fi + +# Check whether --enable-gold or --disable-gold was given. +if test "${enable_gold+set}" = set; then + enableval="$enable_gold" + if test "$enableval" = "yes"; then + MOZ_FORCE_GOLD=1 + elif test "$enableval" = "no"; then + MOZ_FORCE_GOLD= + + else + { echo "configure: error: Option, gold, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, gold, does not take an argument ($enableval)." 1>&5; exit 1; } + fi +fi + + +if test "$GNU_CC" -a -n "$MOZ_FORCE_GOLD"; then + if $CC -Wl,--version 2>&1 | grep -q "GNU ld"; then + GOLD=$($CC -print-prog-name=ld.gold) + case "$GOLD" in + /*) + ;; + *) + GOLD=$(which $GOLD) + ;; + esac + if test -n "$GOLD"; then + mkdir -p $_objdir/build/unix/gold + rm -f $_objdir/build/unix/gold/ld + ln -s "$GOLD" $_objdir/build/unix/gold/ld + if $CC -B $_objdir/build/unix/gold -Wl,--version 2>&1 | grep -q "GNU gold"; then + LDFLAGS="$LDFLAGS -B $_objdir/build/unix/gold" + else + rm -rf $_objdir/build/unix/gold + fi + fi + fi +fi +if test "$GNU_CC"; then + if $CC $LDFLAGS -Wl,--version 2>&1 | grep -q "GNU ld"; then + LD_IS_BFD=1 + fi +fi + + + +if test "$GNU_CC"; then + if test -z "$DEVELOPER_OPTIONS"; then + CFLAGS="$CFLAGS -ffunction-sections -fdata-sections" + CXXFLAGS="$CXXFLAGS -ffunction-sections -fdata-sections" + fi + CFLAGS="$CFLAGS -fno-math-errno" + CXXFLAGS="$CXXFLAGS -fno-exceptions -fno-math-errno" + + if test -z "$CLANG_CC"; then + case "$CC_VERSION" in + 4.*) + ;; + *) + # Lifetime Dead Store Elimination level 2 (default in GCC6+) breaks Gecko. + # Ideally, we'd use -flifetime-dse=1, but that means we'd forcefully + # enable it on optimization levels where it would otherwise not be enabled. + # So we disable it entirely. But since that would mean inconsistency with + # GCC5, which has level 1 depending on optimization level, disable it on + # GCC5 as well, because better safe than sorry. + # Add it first so that a mozconfig can override by setting CFLAGS/CXXFLAGS. + CFLAGS="-fno-lifetime-dse $CFLAGS" + CXXFLAGS="-fno-lifetime-dse $CXXFLAGS" + ;; + esac + fi +fi + + +# Check whether --enable-icf or --disable-icf was given. +if test "${enable_icf+set}" = set; then + enableval="$enable_icf" + if test "$enableval" = "no"; then + MOZ_DISABLE_ICF=1 + elif test "$enableval" = "yes"; then + MOZ_DISABLE_ICF= + else + { echo "configure: error: Option, icf, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, icf, does not take an argument ($enableval)." 1>&5; exit 1; } + fi +fi + + +if test "$GNU_CC" -a "$GCC_USE_GNU_LD" -a -z "$MOZ_DISABLE_ICF" -a -z "$DEVELOPER_OPTIONS"; then + echo $ac_n "checking whether the linker supports Identical Code Folding""... $ac_c" 1>&6 +echo "configure:5631: checking whether the linker supports Identical Code Folding" >&5 +if eval "test \"`echo '$''{'LD_SUPPORTS_ICF'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + echo 'int foo() {return 42;}' \ + 'int bar() {return 42;}' \ + 'int main() {return foo() - bar();}' > conftest.${ac_ext} + # If the linker supports ICF, foo and bar symbols will have + # the same address + if { ac_try='${CC-cc} -o conftest${ac_exeext} $LDFLAGS -Wl,--icf=safe -ffunction-sections conftest.${ac_ext} $LIBS 1>&2'; { (eval echo configure:5640: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && + test -s conftest${ac_exeext} && + objdump -t conftest${ac_exeext} | awk '{a[$6] = $1} END {if (a["foo"] && (a["foo"] != a["bar"])) { exit 1 }}'; then + LD_SUPPORTS_ICF=yes + else + LD_SUPPORTS_ICF=no + fi + rm -rf conftest* +fi + +echo "$ac_t""$LD_SUPPORTS_ICF" 1>&6 + if test "$LD_SUPPORTS_ICF" = yes; then + _SAVE_LDFLAGS="$LDFLAGS -Wl,--icf=safe" + LDFLAGS="$LDFLAGS -Wl,--icf=safe -Wl,--print-icf-sections" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + LD_PRINT_ICF_SECTIONS=-Wl,--print-icf-sections +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + LD_PRINT_ICF_SECTIONS= +fi +rm -f conftest* + + LDFLAGS="$_SAVE_LDFLAGS" + fi +fi + + +if test "$GNU_CC" -a "$GCC_USE_GNU_LD" -a -z "$DEVELOPER_OPTIONS"; then + if test -n "$MOZ_DEBUG_FLAGS"; then + echo $ac_n "checking whether removing dead symbols breaks debugging""... $ac_c" 1>&6 +echo "configure:5681: checking whether removing dead symbols breaks debugging" >&5 +if eval "test \"`echo '$''{'GC_SECTIONS_BREAKS_DEBUG_RANGES'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + echo 'int foo() {return 42;}' \ + 'int bar() {return 1;}' \ + 'int main() {return foo();}' > conftest.${ac_ext} + if { ac_try='${CC-cc} -o conftest.${ac_objext} $CFLAGS $MOZ_DEBUG_FLAGS -c conftest.${ac_ext} 1>&2'; { (eval echo configure:5688: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && + { ac_try='${CC-cc} -o conftest${ac_exeext} $LDFLAGS $MOZ_DEBUG_FLAGS -Wl,--gc-sections conftest.${ac_objext} $LIBS 1>&2'; { (eval echo configure:5689: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && + test -s conftest${ac_exeext} -a -s conftest.${ac_objext}; then + if test "`$PYTHON -m mozbuild.configure.check_debug_ranges conftest.${ac_objext} conftest.${ac_ext}`" = \ + "`$PYTHON -m mozbuild.configure.check_debug_ranges conftest${ac_exeext} conftest.${ac_ext}`"; then + GC_SECTIONS_BREAKS_DEBUG_RANGES=no + else + GC_SECTIONS_BREAKS_DEBUG_RANGES=yes + fi + else + GC_SECTIONS_BREAKS_DEBUG_RANGES="no, but it's broken in some other way" + fi + rm -rf conftest* +fi + +echo "$ac_t""$GC_SECTIONS_BREAKS_DEBUG_RANGES" 1>&6 + if test "$GC_SECTIONS_BREAKS_DEBUG_RANGES" = no; then + DSO_LDOPTS="$DSO_LDOPTS -Wl,--gc-sections" + fi + else + DSO_LDOPTS="$DSO_LDOPTS -Wl,--gc-sections" + fi +fi + +# bionic in Android < 4.1 doesn't support PIE +# On OSX, the linker defaults to building PIE programs when targetting OSX 10.7+, +# but not when targetting OSX < 10.7. OSX < 10.7 doesn't support running PIE +# programs, so as long as support for OSX 10.6 is kept, we can't build PIE. +# Even after dropping 10.6 support, MOZ_PIE would not be useful since it's the +# default (and clang says the -pie option is not used). +# On other Unix systems, some file managers (Nautilus) can't start PIE programs +if test -n "$gonkdir" && test "$ANDROID_VERSION" -ge 16; then + MOZ_PIE=1 +else + MOZ_PIE= +fi + +# Check whether --enable-pie or --disable-pie was given. +if test "${enable_pie+set}" = set; then + enableval="$enable_pie" + if test "$enableval" = "yes"; then + MOZ_PIE=1 + elif test "$enableval" = "no"; then + MOZ_PIE= + else + { echo "configure: error: Option, pie, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, pie, does not take an argument ($enableval)." 1>&5; exit 1; } + fi +fi + + +if test "$GNU_CC" -a -n "$MOZ_PIE"; then + echo $ac_n "checking for PIE support""... $ac_c" 1>&6 +echo "configure:5740: checking for PIE support" >&5 + _SAVE_LDFLAGS=$LDFLAGS + LDFLAGS="$LDFLAGS $DSO_PIC_CFLAGS -pie" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6 + MOZ_PROGRAM_LDFLAGS="$MOZ_PROGRAM_LDFLAGS -pie" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + echo "$ac_t""no" 1>&6 + { echo "configure: error: --enable-pie requires PIE support from the linker." 1>&2; echo "configure: error: --enable-pie requires PIE support from the linker." 1>&5; exit 1; } +fi +rm -f conftest* + LDFLAGS=$_SAVE_LDFLAGS +fi + + + +if test -n "$GCC_USE_GNU_LD"; then + case "$LDFLAGS" in + *-fsanitize=address*) + LDFLAGS="$LDFLAGS -Wl,-Bsymbolic" + ;; + esac +fi + + +fi + +if test -z "$SKIP_COMPILER_CHECKS"; then +echo $ac_n "checking for working const""... $ac_c" 1>&6 +echo "configure:5781: checking for working const" >&5 +if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <j = 5; +} +{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ + const int foo = 10; +} + +; return 0; } +EOF +if { (eval echo configure:5835: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_c_const=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_c_const=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_c_const" 1>&6 +if test $ac_cv_c_const = no; then + cat >> confdefs.pytmp <<\EOF + (''' const ''', r''' ''') +EOF +cat >> confdefs.h <<\EOF +#define const +EOF + +fi + + + +echo $ac_n "checking for mode_t""... $ac_c" 1>&6 +echo "configure:5861: checking for mode_t" >&5 +if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#if STDC_HEADERS +#include +#include +#endif +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_mode_t=yes +else + rm -rf conftest* + ac_cv_type_mode_t=no +fi +rm -f conftest* + +fi +echo "$ac_t""$ac_cv_type_mode_t" 1>&6 +if test $ac_cv_type_mode_t = no; then + cat >> confdefs.pytmp <<\EOF + (''' mode_t ''', r''' int ''') +EOF +cat >> confdefs.h <<\EOF +#define mode_t int +EOF + +fi + + + +echo $ac_n "checking for off_t""... $ac_c" 1>&6 +echo "configure:5899: checking for off_t" >&5 +if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#if STDC_HEADERS +#include +#include +#endif +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_off_t=yes +else + rm -rf conftest* + ac_cv_type_off_t=no +fi +rm -f conftest* + +fi +echo "$ac_t""$ac_cv_type_off_t" 1>&6 +if test $ac_cv_type_off_t = no; then + cat >> confdefs.pytmp <<\EOF + (''' off_t ''', r''' long ''') +EOF +cat >> confdefs.h <<\EOF +#define off_t long +EOF + +fi + + + +echo $ac_n "checking for pid_t""... $ac_c" 1>&6 +echo "configure:5937: checking for pid_t" >&5 +if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#if STDC_HEADERS +#include +#include +#endif +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_pid_t=yes +else + rm -rf conftest* + ac_cv_type_pid_t=no +fi +rm -f conftest* + +fi +echo "$ac_t""$ac_cv_type_pid_t" 1>&6 +if test $ac_cv_type_pid_t = no; then + cat >> confdefs.pytmp <<\EOF + (''' pid_t ''', r''' int ''') +EOF +cat >> confdefs.h <<\EOF +#define pid_t int +EOF + +fi + + + +echo $ac_n "checking for size_t""... $ac_c" 1>&6 +echo "configure:5975: checking for size_t" >&5 +if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#if STDC_HEADERS +#include +#include +#endif +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_size_t=yes +else + rm -rf conftest* + ac_cv_type_size_t=no +fi +rm -f conftest* + +fi +echo "$ac_t""$ac_cv_type_size_t" 1>&6 +if test $ac_cv_type_size_t = no; then + cat >> confdefs.pytmp <<\EOF + (''' size_t ''', r''' unsigned ''') +EOF +cat >> confdefs.h <<\EOF +#define size_t unsigned +EOF + +fi + +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 + +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_n "checking for ssize_t""... $ac_c" 1>&6 +echo "configure:6025: checking for ssize_t" >&5 +if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < + #include +int main() { +ssize_t foo = 0; +; return 0; } +EOF +if { (eval echo configure:6038: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_type_ssize_t=true +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_type_ssize_t=false +fi +rm -f conftest* +fi + +if test "$ac_cv_type_ssize_t" = true ; then + cat >> confdefs.pytmp <<\EOF + (''' HAVE_SSIZE_T ''', ' 1 ') +EOF +cat >> confdefs.h <<\EOF +#define HAVE_SSIZE_T 1 +EOF + + echo "$ac_t""yes" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +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 + + + +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 + +if test "$GNU_CXX"; then + echo $ac_n "checking whether 64-bits std::atomic requires -latomic""... $ac_c" 1>&6 +echo "configure:6081: checking whether 64-bits std::atomic requires -latomic" >&5 +if eval "test \"`echo '$''{'ac_cv_needs_atomic'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < + #include +int main() { + std::atomic foo; foo = 1; +; return 0; } +EOF +if { (eval echo configure:6094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ac_cv_needs_atomic=no +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + _SAVE_LIBS="$LIBS" + LIBS="$LIBS -latomic" + cat > conftest.$ac_ext < + #include +int main() { + std::atomic foo; foo = 1; +; return 0; } +EOF +if { (eval echo configure:6112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ac_cv_needs_atomic=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_needs_atomic="do not know; assuming no" +fi +rm -f conftest* + LIBS="$_SAVE_LIBS" + +fi +rm -f conftest* + +fi + +echo "$ac_t""$ac_cv_needs_atomic" 1>&6 + if test "$ac_cv_needs_atomic" = yes; then + MOZ_NEEDS_LIBATOMIC=1 + else + MOZ_NEEDS_LIBATOMIC= + fi + +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 + + + +case "${OS_TARGET}" in +WINNT|Darwin|Android) + ;; +*) + STL_FLAGS="-I${DIST}/stl_wrappers" + WRAP_STL_INCLUDES=1 + ;; +esac + +ac_header_dirent=no +for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 +echo "configure:6160: checking for $ac_hdr that defines DIR" >&5 +if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include <$ac_hdr> +int main() { +DIR *dirp = 0; +; return 0; } +EOF +if { (eval echo configure:6173: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + eval "ac_cv_header_dirent_$ac_safe=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_dirent_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.pytmp <> confdefs.h <&6 +fi +done +# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. +if test $ac_header_dirent = dirent.h; then +echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 +echo "configure:6201: checking for opendir in -ldir" >&5 +ac_lib_var=`echo dir'_'opendir | 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="-ldir $LIBS" +cat > conftest.$ac_ext <&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 + LIBS="$LIBS -ldir" +else + echo "$ac_t""no" 1>&6 +fi + +else +echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 +echo "configure:6242: checking for opendir in -lx" >&5 +ac_lib_var=`echo x'_'opendir | 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="-lx $LIBS" +cat > conftest.$ac_ext <&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 + LIBS="$LIBS -lx" +else + echo "$ac_t""no" 1>&6 +fi + +fi + +case "$target_os" in +freebsd*) +# for stuff like -lXshm + CPPFLAGS="${CPPFLAGS} ${X_CFLAGS}" + ;; +esac + +# Check whether --enable-dtrace or --disable-dtrace was given. +if test "${enable_dtrace+set}" = set; then + enableval="$enable_dtrace" + if test "$enableval" = "yes"; then + enable_dtrace="yes" + elif test "$enableval" = "no"; then + : + else + { echo "configure: error: Option, dtrace, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, dtrace, does not take an argument ($enableval)." 1>&5; exit 1; } + fi +fi + +if test "x$enable_dtrace" = "xyes"; then + ac_safe=`echo "sys/sdt.h" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for sys/sdt.h""... $ac_c" 1>&6 +echo "configure:6305: checking for sys/sdt.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 < +int main() { + +; return 0; } +EOF +if { (eval echo configure:6318: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + 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 + HAVE_DTRACE=1 + else + echo "$ac_t""no" 1>&6 + + fi + + if test -n "$HAVE_DTRACE"; then + cat >> confdefs.pytmp <<\EOF + (''' INCLUDE_MOZILLA_DTRACE ''', ' 1 ') +EOF +cat >> confdefs.h <<\EOF +#define INCLUDE_MOZILLA_DTRACE 1 +EOF + + else + { echo "configure: error: dtrace enabled but sys/sdt.h not found" 1>&2; echo "configure: error: dtrace enabled but sys/sdt.h not found" 1>&5; exit 1; }; + fi +fi + + +echo $ac_n "checking for gethostbyname_r in -lc_r""... $ac_c" 1>&6 +echo "configure:6353: checking for gethostbyname_r in -lc_r" >&5 +ac_lib_var=`echo c_r'_'gethostbyname_r | 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="-lc_r $LIBS" +cat > conftest.$ac_ext <&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_tr_lib=HAVE_LIB`echo c_r | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.pytmp <> confdefs.h <&6 +fi + + +case $target in +*-darwin*) + ;; +*) + +echo $ac_n "checking for library containing dlopen""... $ac_c" 1>&6 +echo "configure:6409: checking for library containing dlopen" >&5 +if eval "test \"`echo '$''{'ac_cv_search_dlopen'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_func_search_save_LIBS="$LIBS" +ac_cv_search_dlopen="no" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ac_cv_search_dlopen="none required" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -f conftest* +test "$ac_cv_search_dlopen" = "no" && for i in dl; do +LIBS="-l$i $ac_func_search_save_LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ac_cv_search_dlopen="-l$i" +break +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -f conftest* +done +LIBS="$ac_func_search_save_LIBS" +fi + +echo "$ac_t""$ac_cv_search_dlopen" 1>&6 +if test "$ac_cv_search_dlopen" != "no"; then + test "$ac_cv_search_dlopen" = "none required" || LIBS="$ac_cv_search_dlopen $LIBS" + ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6 +echo "configure:6467: 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 < +int main() { + +; return 0; } +EOF +if { (eval echo configure:6480: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + 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.pytmp <<\EOF + (''' HAVE_DLOPEN ''', ' 1 ') +EOF +cat >> confdefs.h <<\EOF +#define HAVE_DLOPEN 1 +EOF + + else + echo "$ac_t""no" 1>&6 + + fi + +else : + +fi + ;; +esac + +if test ! "$GNU_CXX"; then + echo $ac_n "checking for demangle in -lC""... $ac_c" 1>&6 +echo "configure:6514: checking for demangle in -lC" >&5 +ac_lib_var=`echo C'_'demangle | 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="-lC $LIBS" +cat > conftest.$ac_ext <&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_tr_lib=HAVE_LIB`echo C | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.pytmp <> confdefs.h <&6 +fi + +fi + +echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 +echo "configure:6566: checking for socket in -lsocket" >&5 +ac_lib_var=`echo socket'_'socket | 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="-lsocket $LIBS" +cat > conftest.$ac_ext <&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_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.pytmp <> confdefs.h <&6 +fi + + +case "$target_os" in +darwin*) + USE_PTHREADS=1 + ;; +*) + echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6 +echo "configure:6622: checking for pthread_create in -lpthreads" >&5 +ac_lib_var=`echo pthreads'_'pthread_create | 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="-lpthreads $LIBS" +cat > conftest.$ac_ext <&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 + USE_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:6660: checking for pthread_create in -lpthread" >&5 +ac_lib_var=`echo pthread'_'pthread_create | 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="-lpthread $LIBS" +cat > conftest.$ac_ext <&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 + USE_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:6698: checking for pthread_create in -lc_r" >&5 +ac_lib_var=`echo c_r'_'pthread_create | 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="-lc_r $LIBS" +cat > conftest.$ac_ext <&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 + USE_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:6736: checking for pthread_create in -lc" >&5 +ac_lib_var=`echo c'_'pthread_create | 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="-lc $LIBS" +cat > conftest.$ac_ext <&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 + USE_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 "$USE_PTHREADS"x = x; then + { echo "configure: error: --with-pthreads specified for a system without pthread support " 1>&2; echo "configure: error: --with-pthreads specified for a system without pthread support " 1>&5; exit 1; }; +fi + elif test "$withval" = "no"; then + USE_PTHREADS= + _PTHREAD_LDFLAGS= + + else + { echo "configure: error: Option, pthreads, does not take an argument ($withval)." 1>&2; echo "configure: error: Option, pthreads, does not take an argument ($withval)." 1>&5; exit 1; } + fi +fi + + +if test "$USE_PTHREADS"x != x +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:6810: 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`" -a -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:6833: 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`" -a -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 + *-*-freebsd*) + cat >> confdefs.pytmp <<\EOF + (''' _REENTRANT ''', ' 1 ') +EOF +cat >> confdefs.h <<\EOF +#define _REENTRANT 1 +EOF + + cat >> confdefs.pytmp <<\EOF + (''' _THREAD_SAFE ''', ' 1 ') +EOF +cat >> confdefs.h <<\EOF +#define _THREAD_SAFE 1 +EOF + + if test "$ac_cv_have_dash_pthread" = "yes"; then + _PTHREAD_LDFLAGS="-pthread" + fi + ;; + + *-*-openbsd*|*-*-bsdi*) + cat >> confdefs.pytmp <<\EOF + (''' _REENTRANT ''', ' 1 ') +EOF +cat >> confdefs.h <<\EOF +#define _REENTRANT 1 +EOF + + cat >> confdefs.pytmp <<\EOF + (''' _THREAD_SAFE ''', ' 1 ') +EOF +cat >> confdefs.h <<\EOF +#define _THREAD_SAFE 1 +EOF + + if test "$ac_cv_have_dash_pthread" = "yes"; then + _PTHREAD_LDFLAGS="-pthread" + fi + ;; + + *-*-linux*|*-*-kfreebsd*-gnu|*-*-gnu*) + cat >> confdefs.pytmp <<\EOF + (''' _REENTRANT ''', ' 1 ') +EOF +cat >> confdefs.h <<\EOF +#define _REENTRANT 1 +EOF + + ;; + + esac + LDFLAGS="${_PTHREAD_LDFLAGS} ${LDFLAGS}" +fi + + + + + +if test $ac_cv_prog_gcc = yes; then + echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6 +echo "configure:6908: 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 < +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 < +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 + +echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 +echo "configure:6954: checking for 8-bit clean memcmp" >&5 +if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + ac_cv_func_memcmp_clean=no +else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + ac_cv_func_memcmp_clean=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_func_memcmp_clean=no +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6 +test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}" + +for ac_func in getc_unlocked _getc_nolock gmtime_r localtime_r pthread_getname_np +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:6992: 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 < +#undef $ac_func +/* 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:7024: \"$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.pytmp <> confdefs.h <&6 +fi +done + + +case "$OS_TARGET" in +Darwin) + ;; +*) + echo $ac_n "checking for clock_gettime(CLOCK_MONOTONIC)""... $ac_c" 1>&6 +echo "configure:7057: checking for clock_gettime(CLOCK_MONOTONIC)" >&5 +if eval "test \"`echo '$''{'ac_cv_clock_monotonic'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + for libs in "" -lrt; do + _SAVE_LIBS="$LIBS" + LIBS="$LIBS $libs" + cat > conftest.$ac_ext < +int main() { + struct timespec ts; + clock_gettime(CLOCK_MONOTONIC, &ts); +; return 0; } +EOF +if { (eval echo configure:7073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ac_cv_clock_monotonic=$libs + LIBS="$_SAVE_LIBS" + break +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_clock_monotonic=no +fi +rm -f conftest* + LIBS="$_SAVE_LIBS" + done +fi + +echo "$ac_t""$ac_cv_clock_monotonic" 1>&6 + if test "$ac_cv_clock_monotonic" != "no"; then + HAVE_CLOCK_MONOTONIC=1 + REALTIME_LIBS=$ac_cv_clock_monotonic + cat >> confdefs.pytmp <<\EOF + (''' HAVE_CLOCK_MONOTONIC ''', ' 1 ') +EOF +cat >> confdefs.h <<\EOF +#define HAVE_CLOCK_MONOTONIC 1 +EOF + + + + fi + ;; +esac + +echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6 +echo "configure:7107: checking for sin in -lm" >&5 +ac_lib_var=`echo m'_'sin | 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="-lm $LIBS" +cat > conftest.$ac_ext <&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_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.pytmp <> confdefs.h <&6 +fi + +echo $ac_n "checking for sincos in -lm""... $ac_c" 1>&6 +echo "configure:7157: checking for sincos in -lm" >&5 +ac_lib_var=`echo m'_'sincos | 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="-lm $LIBS" +cat > conftest.$ac_ext <&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 + cat >> confdefs.pytmp <<\EOF + (''' HAVE_SINCOS ''', ' 1 ') +EOF +cat >> confdefs.h <<\EOF +#define HAVE_SINCOS 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi + +echo $ac_n "checking for __sincos in -lm""... $ac_c" 1>&6 +echo "configure:7203: checking for __sincos in -lm" >&5 +ac_lib_var=`echo m'_'__sincos | 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="-lm $LIBS" +cat > conftest.$ac_ext <&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 + cat >> confdefs.pytmp <<\EOF + (''' HAVE___SINCOS ''', ' 1 ') +EOF +cat >> confdefs.h <<\EOF +#define HAVE___SINCOS 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi + + + +if test -z "$MACOS_DEPLOYMENT_TARGET" || test "$MACOS_DEPLOYMENT_TARGET" -ge "100300"; then + +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 + +echo $ac_n "checking for wcrtomb""... $ac_c" 1>&6 +echo "configure:7260: checking for wcrtomb" >&5 +if eval "test \"`echo '$''{'ac_cv_have_wcrtomb'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +int main() { +mbstate_t ps={0};wcrtomb(0,'f',&ps); +; return 0; } +EOF +if { (eval echo configure:7272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ac_cv_have_wcrtomb="yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_have_wcrtomb="no" +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_have_wcrtomb" 1>&6 +if test "$ac_cv_have_wcrtomb" = "yes"; then + cat >> confdefs.pytmp <<\EOF + (''' HAVE_WCRTOMB ''', ' 1 ') +EOF +cat >> confdefs.h <<\EOF +#define HAVE_WCRTOMB 1 +EOF + +fi +echo $ac_n "checking for mbrtowc""... $ac_c" 1>&6 +echo "configure:7295: checking for mbrtowc" >&5 +if eval "test \"`echo '$''{'ac_cv_have_mbrtowc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +int main() { +mbstate_t ps={0};mbrtowc(0,0,0,&ps); +; return 0; } +EOF +if { (eval echo configure:7307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ac_cv_have_mbrtowc="yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_have_mbrtowc="no" +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_have_mbrtowc" 1>&6 +if test "$ac_cv_have_mbrtowc" = "yes"; then + cat >> confdefs.pytmp <<\EOF + (''' HAVE_MBRTOWC ''', ' 1 ') +EOF +cat >> confdefs.h <<\EOF +#define HAVE_MBRTOWC 1 +EOF + +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 + +fi + +echo $ac_n "checking for res_ninit()""... $ac_c" 1>&6 +echo "configure:7339: checking for res_ninit()" >&5 +if eval "test \"`echo '$''{'ac_cv_func_res_ninit'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$OS_TARGET" = NetBSD -o "$OS_TARGET" = OpenBSD; then + ac_cv_func_res_ninit=no + else + cat > conftest.$ac_ext < + #include + #include + #include + +int main() { +int foo = res_ninit(&_res); +; return 0; } +EOF +if { (eval echo configure:7362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ac_cv_func_res_ninit=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_func_res_ninit=no +fi +rm -f conftest* + fi + +fi + +echo "$ac_t""$ac_cv_func_res_ninit" 1>&6 + +if test "$ac_cv_func_res_ninit" = "yes"; then + cat >> confdefs.pytmp <<\EOF + (''' HAVE_RES_NINIT ''', ' 1 ') +EOF +cat >> confdefs.h <<\EOF +#define HAVE_RES_NINIT 1 +EOF + +fi + + + echo $ac_n "checking for nl_langinfo and CODESET""... $ac_c" 1>&6 +echo "configure:7390: checking for nl_langinfo and CODESET" >&5 +if eval "test \"`echo '$''{'am_cv_langinfo_codeset'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +int main() { +char* cs = nl_langinfo(CODESET); +; return 0; } +EOF +if { (eval echo configure:7402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + am_cv_langinfo_codeset=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + am_cv_langinfo_codeset=no +fi +rm -f conftest* + +fi + +echo "$ac_t""$am_cv_langinfo_codeset" 1>&6 + if test $am_cv_langinfo_codeset = yes; then + cat >> confdefs.pytmp <<\EOF + (''' HAVE_LANGINFO_CODESET ''', r''' 1 ''') +EOF +cat >> confdefs.h <<\EOF +#define HAVE_LANGINFO_CODESET 1 +EOF + + HAVE_LANGINFO_CODESET=1 + 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 + + +echo $ac_n "checking for an implementation of va_copy()""... $ac_c" 1>&6 +echo "configure:7438: checking for an implementation of va_copy()" >&5 +if eval "test \"`echo '$''{'ac_cv_va_copy'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < + #include + void f (int i, ...) { + va_list args1, args2; + va_start (args1, i); + va_copy (args2, args1); + if (va_arg (args2, int) != 42 || va_arg (args1, int) != 42) + exit (1); + va_end (args1); va_end (args2); + } +int main() { +f(0, 42); return 0 +; return 0; } +EOF +if { (eval echo configure:7459: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_va_copy=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_va_copy=no + +fi +rm -f conftest* + +fi + +echo "$ac_t""$ac_cv_va_copy" 1>&6 +echo $ac_n "checking whether va_list can be copied by value""... $ac_c" 1>&6 +echo "configure:7475: checking whether va_list can be copied by value" >&5 +if eval "test \"`echo '$''{'ac_cv_va_val_copy'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < + #include + void f (int i, ...) { + va_list args1, args2; + va_start (args1, i); + args2 = args1; + if (va_arg (args2, int) != 42 || va_arg (args1, int) != 42) + exit (1); + va_end (args1); va_end (args2); + } +int main() { +f(0, 42); return 0 +; return 0; } +EOF +if { (eval echo configure:7496: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_va_val_copy=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_va_val_copy=no +fi +rm -f conftest* + +fi + +echo "$ac_t""$ac_cv_va_val_copy" 1>&6 +if test "x$ac_cv_va_copy" = "xyes"; then + cat >> confdefs.pytmp <<\EOF + (''' VA_COPY ''', r''' va_copy ''') +EOF +cat >> confdefs.h <<\EOF +#define VA_COPY va_copy +EOF + + cat >> confdefs.pytmp <<\EOF + (''' HAVE_VA_COPY ''', ' 1 ') +EOF +cat >> confdefs.h <<\EOF +#define HAVE_VA_COPY 1 +EOF + +fi + +if test "x$ac_cv_va_val_copy" = "xno"; then + cat >> confdefs.pytmp <<\EOF + (''' HAVE_VA_LIST_AS_ARRAY ''', ' 1 ') +EOF +cat >> confdefs.h <<\EOF +#define HAVE_VA_LIST_AS_ARRAY 1 +EOF + +fi + +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 + + +ARM_ABI_PREFIX= +if test "$GNU_CC"; then + if test "$CPU_ARCH" = "arm" ; then + echo $ac_n "checking for ARM EABI""... $ac_c" 1>&6 +echo "configure:7549: checking for ARM EABI" >&5 +if eval "test \"`echo '$''{'ac_cv_gcc_arm_eabi'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_gcc_arm_eabi="yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_gcc_arm_eabi="no" +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_gcc_arm_eabi" 1>&6 + if test "$ac_cv_gcc_arm_eabi" = "yes"; then + HAVE_ARM_EABI=1 + ARM_ABI_PREFIX=eabi- + else + ARM_ABI_PREFIX=oabi- + fi + fi + + TARGET_COMPILER_ABI="${TARGET_COMPILER_ABI-${ARM_ABI_PREFIX}gcc3}" +fi + +echo $ac_n "checking whether the C++ \"using\" keyword resolves ambiguity""... $ac_c" 1>&6 +echo "configure:7592: checking whether the C++ \"using\" keyword resolves ambiguity" >&5 +if eval "test \"`echo '$''{'ac_cv_cpp_ambiguity_resolving_using'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_cpp_ambiguity_resolving_using=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_cpp_ambiguity_resolving_using=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_cpp_ambiguity_resolving_using" 1>&6 +if test "$ac_cv_cpp_ambiguity_resolving_using" = yes ; then + cat >> confdefs.pytmp <<\EOF + (''' HAVE_CPP_AMBIGUITY_RESOLVING_USING ''', ' 1 ') +EOF +cat >> confdefs.h <<\EOF +#define HAVE_CPP_AMBIGUITY_RESOLVING_USING 1 +EOF + +fi + +echo $ac_n "checking for C++ dynamic_cast to void*""... $ac_c" 1>&6 +echo "configure:7637: checking for C++ dynamic_cast to void*" >&5 +if eval "test \"`echo '$''{'ac_cv_cpp_dynamic_cast_void_ptr'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + ac_cv_cpp_dynamic_cast_void_ptr=no +else + cat > conftest.$ac_ext <(subx))) || + (((void*)&mdo != (void*)suby) && + ((void*)&mdo == dynamic_cast(suby)))); + } +EOF +if { (eval echo configure:7664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + ac_cv_cpp_dynamic_cast_void_ptr=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_cpp_dynamic_cast_void_ptr=no +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$ac_cv_cpp_dynamic_cast_void_ptr" 1>&6 +if test "$ac_cv_cpp_dynamic_cast_void_ptr" = yes ; then + cat >> confdefs.pytmp <<\EOF + (''' HAVE_CPP_DYNAMIC_CAST_TO_VOID_PTR ''', ' 1 ') +EOF +cat >> confdefs.h <<\EOF +#define HAVE_CPP_DYNAMIC_CAST_TO_VOID_PTR 1 +EOF + +fi + + +# try harder, when checking for __thread support, see bug 521750 comment #33 and below +# We pass MOZ_OPTIMIZE_LDFLAGS to the linker because if dead_strip is +# enabled, the linker in xcode 4.1 will crash. Without this it would crash when +# linking XUL. +_SAVE_LDFLAGS=$LDFLAGS +LDFLAGS="$LDFLAGS $DSO_PIC_CFLAGS $DSO_LDOPTS $MOZ_OPTIMIZE_LDFLAGS" +echo $ac_n "checking for __thread keyword for TLS variables""... $ac_c" 1>&6 +echo "configure:7697: checking for __thread keyword for TLS variables" >&5 +if eval "test \"`echo '$''{'ac_cv_thread_keyword'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ac_cv_thread_keyword=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_thread_keyword=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_thread_keyword" 1>&6 +LDFLAGS=$_SAVE_LDFLAGS +if test "$ac_cv_thread_keyword" = yes; then + # mips builds fail with TLS variables because of a binutils bug. + # See bug 528687 + case "${target}" in + mips*-*) + : + ;; + *-android*|*-linuxandroid*) + : + ;; + *) + cat >> confdefs.pytmp <<\EOF + (''' HAVE_THREAD_TLS_KEYWORD ''', ' 1 ') +EOF +cat >> confdefs.h <<\EOF +#define HAVE_THREAD_TLS_KEYWORD 1 +EOF + + ;; + esac +fi + + +echo $ac_n "checking for __attribute__((always_inline))""... $ac_c" 1>&6 +echo "configure:7747: checking for __attribute__((always_inline))" >&5 +if eval "test \"`echo '$''{'ac_cv_attribute_always_inline'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_attribute_always_inline=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_attribute_always_inline=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_attribute_always_inline" 1>&6 + +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_n "checking for LC_MESSAGES""... $ac_c" 1>&6 +echo "configure:7783: checking for LC_MESSAGES" >&5 +if eval "test \"`echo '$''{'ac_cv_i18n_lc_messages'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +int main() { +int category = LC_MESSAGES; +; return 0; } +EOF +if { (eval echo configure:7795: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_i18n_lc_messages=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_i18n_lc_messages=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_i18n_lc_messages" 1>&6 +if test "$ac_cv_i18n_lc_messages" = yes; then + cat >> confdefs.pytmp <<\EOF + (''' HAVE_I18N_LC_MESSAGES ''', ' 1 ') +EOF +cat >> confdefs.h <<\EOF +#define HAVE_I18N_LC_MESSAGES 1 +EOF + +fi + +for ac_func in localeconv +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:7821: 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 < +#undef $ac_func +/* 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:7853: \"$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.pytmp <> confdefs.h <&6 +fi +done + +fi # ! SKIP_COMPILER_CHECKS + +TARGET_XPCOM_ABI= +if test -n "${CPU_ARCH}" -a -n "${TARGET_COMPILER_ABI}"; then + TARGET_XPCOM_ABI="${CPU_ARCH}-${TARGET_COMPILER_ABI}" +fi + + +if test -n "$SKIP_COMPILER_CHECKS"; then + cat >> confdefs.pytmp <<\EOF + (''' MALLOC_H ''', r''' ''') +EOF +cat >> confdefs.h <<\EOF +#define MALLOC_H +EOF + + cat >> confdefs.pytmp <<\EOF + (''' HAVE_FORCEINLINE ''', ' 1 ') +EOF +cat >> confdefs.h <<\EOF +#define HAVE_FORCEINLINE 1 +EOF + + cat >> confdefs.pytmp <<\EOF + (''' HAVE_LOCALECONV ''', ' 1 ') +EOF +cat >> confdefs.h <<\EOF +#define HAVE_LOCALECONV 1 +EOF + +fi # SKIP_COMPILER_CHECKS + + +# External Packages + + + + + + +# Check whether --with-nspr-cflags or --without-nspr-cflags was given. +if test "${with_nspr_cflags+set}" = set; then + withval="$with_nspr_cflags" + NSPR_CFLAGS=$withval +fi + +# Check whether --with-nspr-libs or --without-nspr-libs was given. +if test "${with_nspr_libs+set}" = set; then + withval="$with_nspr_libs" + NSPR_LIBS=$withval +fi + + + + # Check whether --enable-nspr-build or --disable-nspr-build was given. +if test "${enable_nspr_build+set}" = set; then + enableval="$enable_nspr_build" + if test "$enableval" = "yes"; then + MOZ_BUILD_NSPR=1 + elif test "$enableval" = "no"; then + MOZ_BUILD_NSPR= + else + { echo "configure: error: Option, nspr-build, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, nspr-build, does not take an argument ($enableval)." 1>&5; exit 1; } + fi +fi + + + +if test "$MOZ_BUILD_APP" != js || test -n "$JS_STANDALONE"; then + _IS_OUTER_CONFIGURE=1 +fi + +# Check whether --with-system-nspr or --without-system-nspr was given. +if test "${with_system_nspr+set}" = set; then + withval="$with_system_nspr" + if test "$withval" = "yes"; then + _USE_SYSTEM_NSPR=1 + elif test "$withval" = "no"; then + : + else + { echo "configure: error: Option, system-nspr, does not take an argument ($withval)." 1>&2; echo "configure: error: Option, system-nspr, does not take an argument ($withval)." 1>&5; exit 1; } + fi +fi + + +JS_POSIX_NSPR=unset + + if test -n "$JS_STANDALONE"; then + case "$target" in + *linux*|*darwin*|*dragonfly*|*freebsd*|*netbsd*|*openbsd*) + if test -z "$_HAS_NSPR"; then + JS_POSIX_NSPR_DEFAULT=1 + fi + ;; + esac + fi + + # Check whether --enable-posix-nspr-emulation or --disable-posix-nspr-emulation was given. +if test "${enable_posix_nspr_emulation+set}" = set; then + enableval="$enable_posix_nspr_emulation" + if test "$enableval" = "yes"; then + JS_POSIX_NSPR=1 + elif test "$enableval" = "no"; then + JS_POSIX_NSPR= + else + { echo "configure: error: Option, posix-nspr-emulation, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, posix-nspr-emulation, does not take an argument ($enableval)." 1>&5; exit 1; } + fi +fi + + + + +echo $ac_n "checking NSPR selection""... $ac_c" 1>&6 +echo "configure:7993: checking NSPR selection" >&5 +nspr_opts= +which_nspr=default +if test -n "$_USE_SYSTEM_NSPR"; then + nspr_opts="x$nspr_opts" + which_nspr="system" +fi +if test -n "$NSPR_CFLAGS" -o -n "$NSPR_LIBS"; then + nspr_opts="x$nspr_opts" + which_nspr="command-line" +fi +if test -n "$MOZ_BUILD_NSPR"; then + nspr_opts="x$nspr_opts" + which_nspr="source-tree" +fi +if test "$JS_POSIX_NSPR" = unset; then + JS_POSIX_NSPR= +else + nspr_opts="x$nspr_opts" + which_nspr="posix-wrapper" +fi + +if test -z "$nspr_opts"; then + if test "$MOZ_BUILD_APP" != js; then + MOZ_BUILD_NSPR=1 + which_nspr="source-tree" + else + JS_POSIX_NSPR="$JS_POSIX_NSPR_DEFAULT" + if test -z "$JS_POSIX_NSPR"; then + MOZ_BUILD_NSPR=1 + which_nspr="source-tree" + else + which_nspr="posix-wrapper" + fi + fi +fi + +if test -z "$nspr_opts" || test "$nspr_opts" = x; then + echo "$ac_t""$which_nspr" 1>&6 +else + { echo "configure: error: only one way of using NSPR may be selected. See 'configure --help'." 1>&2; echo "configure: error: only one way of using NSPR may be selected. See 'configure --help'." 1>&5; exit 1; } +fi + + + +if test "$MOZ_BUILD_APP" = js; then + if test "$JS_POSIX_NSPR" = 1; then + cat >> confdefs.pytmp <<\EOF + (''' JS_POSIX_NSPR ''', ' 1 ') +EOF +cat >> confdefs.h <<\EOF +#define JS_POSIX_NSPR 1 +EOF + + fi + +fi + +# A (sub)configure invoked by the toplevel configure will always receive +# --with-nspr-libs on the command line. It will never need to figure out +# anything itself. +if test -n "$_IS_OUTER_CONFIGURE"; then + +if test -n "$_USE_SYSTEM_NSPR"; then + +# Check whether --with-nspr-prefix or --without-nspr-prefix was given. +if test "${with_nspr_prefix+set}" = set; then + withval="$with_nspr_prefix" + nspr_config_prefix="$withval" +else + nspr_config_prefix="" +fi + + +# Check whether --with-nspr-exec-prefix or --without-nspr-exec-prefix was given. +if test "${with_nspr_exec_prefix+set}" = set; then + withval="$with_nspr_exec_prefix" + nspr_config_exec_prefix="$withval" +else + nspr_config_exec_prefix="" +fi + + + if test -n "$nspr_config_exec_prefix"; then + nspr_config_args="$nspr_config_args --exec-prefix=$nspr_config_exec_prefix" + if test -z "$NSPR_CONFIG"; then + NSPR_CONFIG=$nspr_config_exec_prefix/bin/nspr-config + fi + fi + if test -n "$nspr_config_prefix"; then + nspr_config_args="$nspr_config_args --prefix=$nspr_config_prefix" + if test -z "$NSPR_CONFIG"; then + NSPR_CONFIG=$nspr_config_prefix/bin/nspr-config + fi + fi + + unset ac_cv_path_NSPR_CONFIG + # Extract the first word of "nspr-config", so it can be a program name with args. +set dummy nspr-config; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:8093: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_NSPR_CONFIG'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$NSPR_CONFIG" in + /*) + ac_cv_path_NSPR_CONFIG="$NSPR_CONFIG" # Let the user override the test with a path. + ;; + ?:/*) + ac_cv_path_NSPR_CONFIG="$NSPR_CONFIG" # 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_NSPR_CONFIG="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_NSPR_CONFIG" && ac_cv_path_NSPR_CONFIG="no" + ;; +esac +fi +NSPR_CONFIG="$ac_cv_path_NSPR_CONFIG" +if test -n "$NSPR_CONFIG"; then + echo "$ac_t""$NSPR_CONFIG" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + min_nspr_version=$NSPR_MINVER + echo $ac_n "checking for NSPR - version >= $min_nspr_version""... $ac_c" 1>&6 +echo "configure:8128: checking for NSPR - version >= $min_nspr_version" >&5 + + no_nspr="" + if test "$NSPR_CONFIG" != "no"; then + NSPR_CFLAGS=`$NSPR_CONFIG $nspr_config_args --cflags` + NSPR_LIBS=`$NSPR_CONFIG $nspr_config_args --libs` + NSPR_VERSION_STRING=`$NSPR_CONFIG $nspr_config_args --version` + elif test -n "${NO_NSPR_CONFIG_SYSTEM_VERSION}"; then + NSPR_CFLAGS="${NO_NSPR_CONFIG_SYSTEM_CFLAGS}" + NSPR_LIBS="${NO_NSPR_CONFIG_SYSTEM_LDFLAGS}" + NSPR_VERSION_STRING="$NO_NSPR_CONFIG_SYSTEM_VERSION" + else + no_nspr="yes" + fi + + if test -z "$no_nspr"; then + nspr_config_major_version=`echo $NSPR_VERSION_STRING | \ + sed 's/\([0-9]*\)\.\([0-9]*\)\(\.\([0-9]*\)\)\{0,1\}/\1/'` + nspr_config_minor_version=`echo $NSPR_VERSION_STRING | \ + sed 's/\([0-9]*\)\.\([0-9]*\)\(\.\([0-9]*\)\)\{0,1\}/\2/'` + nspr_config_micro_version=`echo $NSPR_VERSION_STRING | \ + sed 's/\([0-9]*\)\.\([0-9]*\)\(\.\([0-9]*\)\)\{0,1\}/\4/'` + if test -z "$nspr_config_micro_version"; then + nspr_config_micro_version="0" + fi + + min_nspr_major_version=`echo $min_nspr_version | \ + sed 's/\([0-9]*\)\.\([0-9]*\)\(\.\([0-9]*\)\)\{0,1\}/\1/'` + min_nspr_minor_version=`echo $min_nspr_version | \ + sed 's/\([0-9]*\)\.\([0-9]*\)\(\.\([0-9]*\)\)\{0,1\}/\2/'` + min_nspr_micro_version=`echo $min_nspr_version | \ + sed 's/\([0-9]*\)\.\([0-9]*\)\(\.\([0-9]*\)\)\{0,1\}/\4/'` + if test -z "$min_nspr_micro_version"; then + min_nspr_micro_version="0" + fi + + if test "$nspr_config_major_version" -ne "$min_nspr_major_version"; then + no_nspr="yes" + elif test "$nspr_config_major_version" -eq "$min_nspr_major_version" && + test "$nspr_config_minor_version" -lt "$min_nspr_minor_version"; then + no_nspr="yes" + elif test "$nspr_config_major_version" -eq "$min_nspr_major_version" && + test "$nspr_config_minor_version" -eq "$min_nspr_minor_version" && + test "$nspr_config_micro_version" -lt "$min_nspr_micro_version"; then + no_nspr="yes" + fi + fi + + if test -z "$no_nspr"; then + echo "$ac_t""yes" 1>&6 + MOZ_SYSTEM_NSPR=1 + else + echo "$ac_t""no" 1>&6 + { echo "configure: error: you do not have NSPR installed or your version is older than $NSPR_MINVER." 1>&2; echo "configure: error: you do not have NSPR installed or your version is older than $NSPR_MINVER." 1>&5; exit 1; } + fi + + + + + + +fi + +if test -n "$MOZ_SYSTEM_NSPR" -o -n "$NSPR_CFLAGS" -o -n "$NSPR_LIBS"; then + _SAVE_CFLAGS=$CFLAGS + CFLAGS="$CFLAGS $NSPR_CFLAGS" + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then + : +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + { echo "configure: error: system NSPR does not support PR_STATIC_ASSERT or including prtypes.h does not provide it" 1>&2; echo "configure: error: system NSPR does not support PR_STATIC_ASSERT or including prtypes.h does not provide it" 1>&5; exit 1; } +fi +rm -f conftest* + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then + : +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + { echo "configure: error: system NSPR does not support PR_UINT64 or including prtypes.h does not provide it" 1>&2; echo "configure: error: system NSPR does not support PR_UINT64 or including prtypes.h does not provide it" 1>&5; exit 1; } +fi +rm -f conftest* + CFLAGS=$_SAVE_CFLAGS +elif test -z "$JS_POSIX_NSPR"; then + NSPR_INCLUDE_DIR="${DIST}/include/nspr" + NSPR_CFLAGS="-I${NSPR_INCLUDE_DIR}" + if test -n "$GNU_CC"; then + if test -n "$MOZ_FOLD_LIBS"; then + NSPR_LIB_DIR=${DIST}/lib + else + NSPR_LIB_DIR=${DIST}/bin + fi + NSPR_LIBS="-L${NSPR_LIB_DIR} -lnspr${NSPR_VERSION} -lplc${NSPR_VERSION} -lplds${NSPR_VERSION}" + else + # NSS needs actual static libs to link to, and this is where they are. + NSPR_LIBS="${DIST}/lib/nspr${NSPR_VERSION}.lib ${DIST}/lib/plc${NSPR_VERSION}.lib ${DIST}/lib/plds${NSPR_VERSION}.lib " + NSPR_LIB_DIR="${DIST}/lib" + fi +fi + + + + + +PKGCONF_REQUIRES_PRIVATE="Requires.private: nspr" +if test -n "$MOZ_SYSTEM_NSPR"; then + _SAVE_CFLAGS=$CFLAGS + CFLAGS="$CFLAGS $NSPR_CFLAGS" + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then + : +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + { echo "configure: error: system NSPR does not support PR_STATIC_ASSERT" 1>&2; echo "configure: error: system NSPR does not support PR_STATIC_ASSERT" 1>&5; exit 1; } +fi +rm -f conftest* + CFLAGS=$_SAVE_CFLAGS + # piggy back on $MOZ_SYSTEM_NSPR to set a variable for the nspr check for js.pc + PKGCONF_REQUIRES_PRIVATE="Requires.private: nspr >= $NSPR_MINVER" +elif test -n "$JS_POSIX_NSPR"; then + PKGCONF_REQUIRES_PRIVATE= +fi + + +fi # _IS_OUTER_CONFIGURE + + + +if test -n "$JS_STANDALONE"; then + ZLIB_DIR=yes +fi + + + +MOZZLIB=1.2.3 + +# Check whether --with-system-zlib or --without-system-zlib was given. +if test "${with_system_zlib+set}" = set; then + withval="$with_system_zlib" + ZLIB_DIR=$withval +fi + + +if test -z "$MOZ_ZLIB_LIBS$MOZ_ZLIB_CFLAGS$SKIP_LIBRARY_CHECKS"; then + _SAVE_CFLAGS=$CFLAGS + _SAVE_LDFLAGS=$LDFLAGS + _SAVE_LIBS=$LIBS + + if test -n "${ZLIB_DIR}" -a "${ZLIB_DIR}" != "yes"; then + MOZ_ZLIB_CFLAGS="-I${ZLIB_DIR}/include" + MOZ_ZLIB_LIBS="-L${ZLIB_DIR}/lib" + CFLAGS="$MOZ_ZLIB_CFLAGS $CFLAGS" + LDFLAGS="$MOZ_ZLIB_LIBS $LDFLAGS" + fi + if test -z "$ZLIB_DIR" -o "$ZLIB_DIR" = no; then + MOZ_SYSTEM_ZLIB= + else + echo $ac_n "checking for gzread in -lz""... $ac_c" 1>&6 +echo "configure:8319: checking for gzread in -lz" >&5 +ac_lib_var=`echo z'_'gzread | 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="-lz $LIBS" +cat > conftest.$ac_ext <&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 + MOZ_SYSTEM_ZLIB=1 MOZ_ZLIB_LIBS="$MOZ_ZLIB_LIBS -lz" +else + echo "$ac_t""no" 1>&6 +MOZ_SYSTEM_ZLIB= +fi + + if test "$MOZ_SYSTEM_ZLIB" = 1; then + MOZZLIBNUM=`echo $MOZZLIB | awk -F. '{printf "0x%x\n", ((($1 * 16 + $2) * 16) + $3) * 16 + $4}'` + cat > conftest.$ac_ext < + #include + #include +int main() { + #if ZLIB_VERNUM < $MOZZLIBNUM + #error "Insufficient zlib version ($MOZZLIBNUM required)." + #endif +; return 0; } +EOF +if { (eval echo configure:8373: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + MOZ_SYSTEM_ZLIB=1 +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + { echo "configure: error: Insufficient zlib version for --with-system-zlib ($MOZZLIB required)" 1>&2; echo "configure: error: Insufficient zlib version for --with-system-zlib ($MOZZLIB required)" 1>&5; exit 1; } +fi +rm -f conftest* + fi + fi + CFLAGS=$_SAVE_CFLAGS + LDFLAGS=$_SAVE_LDFLAGS + LIBS=$_SAVE_LIBS +fi + + + + + + + +if test -n "$ZLIB_IN_MOZGLUE"; then + cat >> confdefs.pytmp <<\EOF + (''' ZLIB_IN_MOZGLUE ''', ' 1 ') +EOF +cat >> confdefs.h <<\EOF +#define ZLIB_IN_MOZGLUE 1 +EOF + +fi + + + +# Application + +# Components and Features + +# Check whether --enable-ui-locale or --disable-ui-locale was given. +if test "${enable_ui_locale+set}" = set; then + enableval="$enable_ui_locale" + MOZ_UI_LOCALE=$enableval +fi + + + +# Individual module options + +# Debugging and Optimizations + +if test -z "$MOZ_OPTIMIZE_FLAGS"; then + MOZ_OPTIMIZE_FLAGS="-O" +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 + MOZ_OPTIMIZE_FLAGS=`echo "$enableval" | sed -e 's|\\\ | |g'` + MOZ_OPTIMIZE=2 + fi +else + MOZ_OPTIMIZE= +fi +else + MOZ_OPTIMIZE=1 +fi + + + + case "$target" in + *android*) + unwind_tables="-funwind-tables" + ;; + esac + if test "$GNU_CC"; then + MOZ_ENABLE_FRAME_PTR="-fno-omit-frame-pointer $unwind_tables" + MOZ_DISABLE_FRAME_PTR="-fomit-frame-pointer" + if test "$CPU_ARCH" = arm; then + # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54398 + MOZ_ENABLE_FRAME_PTR="$unwind_tables" + fi + else + case "$target" in + *-mingw32*) + MOZ_ENABLE_FRAME_PTR="-Oy-" + MOZ_DISABLE_FRAME_PTR="-Oy" + ;; + esac + fi + + # If we are debugging, profiling, using sanitizers, or on win32 we want a + # frame pointer. + if test -z "$MOZ_OPTIMIZE" -o \ + -n "$MOZ_PROFILING" -o \ + -n "$MOZ_DEBUG" -o \ + -n "$MOZ_MSAN" -o \ + -n "$MOZ_ASAN" -o \ + "$OS_ARCH:$CPU_ARCH" = "WINNT:x86"; then + MOZ_FRAMEPTR_FLAGS="$MOZ_ENABLE_FRAME_PTR" + else + MOZ_FRAMEPTR_FLAGS="$MOZ_DISABLE_FRAME_PTR" + fi + + +if test "$COMPILE_ENVIRONMENT"; then +if test -n "$MOZ_OPTIMIZE"; then + echo $ac_n "checking for valid optimization flags""... $ac_c" 1>&6 +echo "configure:8484: checking for valid optimization flags" >&5 + _SAVE_CFLAGS=$CFLAGS + CFLAGS="$CFLAGS $MOZ_OPTIMIZE_FLAGS" + cat > conftest.$ac_ext < +int main() { +printf("Hello World\n"); +; return 0; } +EOF +if { (eval echo configure:8495: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + _results=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + _results=no +fi +rm -f conftest* + echo "$ac_t""$_results" 1>&6 + if test "$_results" = "no"; then + { echo "configure: error: These compiler flags are invalid: $MOZ_OPTIMIZE_FLAGS" 1>&2; echo "configure: error: These compiler flags are invalid: $MOZ_OPTIMIZE_FLAGS" 1>&5; exit 1; } + fi + CFLAGS=$_SAVE_CFLAGS +fi +fi # COMPILE_ENVIRONMENT + + + + + + + +ENABLE_TRACE_LOGGING=1 +# Check whether --enable-trace-logging or --disable-trace-logging was given. +if test "${enable_trace_logging+set}" = set; then + enableval="$enable_trace_logging" + if test "$enableval" = "no"; then + ENABLE_TRACE_LOGGING= + elif test "$enableval" = "yes"; then + : + else + { echo "configure: error: Option, trace-logging, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, trace-logging, does not take an argument ($enableval)." 1>&5; exit 1; } + fi +fi + + + + +if test -n "$ENABLE_TRACE_LOGGING"; then + cat >> confdefs.pytmp <<\EOF + (''' JS_TRACE_LOGGING ''', ' 1 ') +EOF +cat >> confdefs.h <<\EOF +#define JS_TRACE_LOGGING 1 +EOF + +fi + +if test -z "$MOZ_ENABLE_WARNINGS_AS_ERRORS"; then + WARNINGS_AS_ERRORS='' +fi + + +case "${OS_TARGET}" in +Android|WINNT|Darwin) + MOZ_GLUE_IN_PROGRAM= + ;; +*) + MOZ_GLUE_IN_PROGRAM=1 + cat >> confdefs.pytmp <<\EOF + (''' MOZ_GLUE_IN_PROGRAM ''', ' 1 ') +EOF +cat >> confdefs.h <<\EOF +#define MOZ_GLUE_IN_PROGRAM 1 +EOF + + ;; +esac + +if test "$MOZ_MEMORY"; then + if test "x$MOZ_DEBUG" = "x1"; then + cat >> confdefs.pytmp <<\EOF + (''' MOZ_MEMORY_DEBUG ''', ' 1 ') +EOF +cat >> confdefs.h <<\EOF +#define MOZ_MEMORY_DEBUG 1 +EOF + + fi + case "${target}" in + *-mingw*) + export MOZ_NO_DEBUG_RTL=1 + ;; + esac +fi + + + +# Check whether --enable-small-chunk-size or --disable-small-chunk-size was given. +if test "${enable_small_chunk_size+set}" = set; then + enableval="$enable_small_chunk_size" + if test "$enableval" = "yes"; then + JS_GC_SMALL_CHUNK_SIZE=1 + elif test "$enableval" = "no"; then + JS_GC_SMALL_CHUNK_SIZE= + else + { echo "configure: error: Option, small-chunk-size, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, small-chunk-size, does not take an argument ($enableval)." 1>&5; exit 1; } + fi +fi + +if test -n "$JS_GC_SMALL_CHUNK_SIZE"; then + cat >> confdefs.pytmp <<\EOF + (''' JS_GC_SMALL_CHUNK_SIZE ''', ' 1 ') +EOF +cat >> confdefs.h <<\EOF +#define JS_GC_SMALL_CHUNK_SIZE 1 +EOF + +fi + +# Check whether --enable-valgrind or --disable-valgrind was given. +if test "${enable_valgrind+set}" = set; then + enableval="$enable_valgrind" + if test "$enableval" = "yes"; then + MOZ_VALGRIND=1 + elif test "$enableval" = "no"; then + MOZ_VALGRIND= + else + { echo "configure: error: Option, valgrind, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, valgrind, does not take an argument ($enableval)." 1>&5; exit 1; } + fi +fi + +if test -n "$MOZ_VALGRIND"; then + ac_safe=`echo "valgrind/valgrind.h" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for valgrind/valgrind.h""... $ac_c" 1>&6 +echo "configure:8622: checking for valgrind/valgrind.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 < +int main() { + +; return 0; } +EOF +if { (eval echo configure:8635: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + 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 + { echo "configure: error: --enable-valgrind specified but Valgrind is not installed" 1>&2; echo "configure: error: --enable-valgrind specified but Valgrind is not installed" 1>&5; exit 1; } + fi + + cat >> confdefs.pytmp <<\EOF + (''' MOZ_VALGRIND ''', ' 1 ') +EOF +cat >> confdefs.h <<\EOF +#define MOZ_VALGRIND 1 +EOF + + MOZ_VALGRIND=1 +fi + + +# Check whether --enable-simulator or --disable-simulator was given. +if test "${enable_simulator+set}" = set; then + enableval="$enable_simulator" + JS_SIMULATOR="$enableval" +fi + + +if test -n "$JS_SIMULATOR"; then + case "$JS_SIMULATOR" in + arm|arm64|mips32|mips64) ;; + no) + JS_SIMULATOR= + ;; + *) { echo "configure: error: Invalid simulator. Valid simulators are: arm, arm64, mips32, mips64." 1>&2; echo "configure: error: Invalid simulator. Valid simulators are: arm, arm64, mips32, mips64." 1>&5; exit 1; } ;; + esac +fi + +if test -z "$ENABLE_ION"; then + cat >> confdefs.pytmp <<\EOF + (''' JS_CODEGEN_NONE ''', ' 1 ') +EOF +cat >> confdefs.h <<\EOF +#define JS_CODEGEN_NONE 1 +EOF + + JS_CODEGEN_NONE=1 +elif test "$JS_SIMULATOR" = arm; then + if test "$CPU_ARCH" != "x86"; then + { echo "configure: error: The ARM simulator only works on x86." 1>&2; echo "configure: error: The ARM simulator only works on x86." 1>&5; exit 1; } + fi + cat >> confdefs.pytmp <<\EOF + (''' JS_SIMULATOR ''', ' 1 ') +EOF +cat >> confdefs.h <<\EOF +#define JS_SIMULATOR 1 +EOF + + cat >> confdefs.pytmp <<\EOF + (''' JS_SIMULATOR_ARM ''', ' 1 ') +EOF +cat >> confdefs.h <<\EOF +#define JS_SIMULATOR_ARM 1 +EOF + + cat >> confdefs.pytmp <<\EOF + (''' JS_DISASM_ARM ''', ' 1 ') +EOF +cat >> confdefs.h <<\EOF +#define JS_DISASM_ARM 1 +EOF + + cat >> confdefs.pytmp <<\EOF + (''' JS_CODEGEN_ARM ''', ' 1 ') +EOF +cat >> confdefs.h <<\EOF +#define JS_CODEGEN_ARM 1 +EOF + + JS_SIMULATOR_ARM=1 + JS_DISASM_ARM=1 + JS_CODEGEN_ARM=1 +elif test "$JS_SIMULATOR" = arm64; then + if test "$CPU_ARCH" != "x86_64"; then + { echo "configure: error: The ARM64 simulator only works on x86_64." 1>&2; echo "configure: error: The ARM64 simulator only works on x86_64." 1>&5; exit 1; } + fi + cat >> confdefs.pytmp <<\EOF + (''' JS_SIMULATOR ''', ' 1 ') +EOF +cat >> confdefs.h <<\EOF +#define JS_SIMULATOR 1 +EOF + + cat >> confdefs.pytmp <<\EOF + (''' JS_SIMULATOR_ARM64 ''', ' 1 ') +EOF +cat >> confdefs.h <<\EOF +#define JS_SIMULATOR_ARM64 1 +EOF + + cat >> confdefs.pytmp <<\EOF + (''' JS_CODEGEN_ARM64 ''', ' 1 ') +EOF +cat >> confdefs.h <<\EOF +#define JS_CODEGEN_ARM64 1 +EOF + + JS_SIMULATOR_ARM64=1 + JS_CODEGEN_ARM64=1 +elif test "$JS_SIMULATOR" = mips32; then + if test "$CPU_ARCH" != "x86"; then + { echo "configure: error: The MIPS32 simulator only works on x86." 1>&2; echo "configure: error: The MIPS32 simulator only works on x86." 1>&5; exit 1; } + fi + cat >> confdefs.pytmp <<\EOF + (''' JS_SIMULATOR ''', ' 1 ') +EOF +cat >> confdefs.h <<\EOF +#define JS_SIMULATOR 1 +EOF + + cat >> confdefs.pytmp <<\EOF + (''' JS_SIMULATOR_MIPS32 ''', ' 1 ') +EOF +cat >> confdefs.h <<\EOF +#define JS_SIMULATOR_MIPS32 1 +EOF + + cat >> confdefs.pytmp <<\EOF + (''' JS_CODEGEN_MIPS32 ''', ' 1 ') +EOF +cat >> confdefs.h <<\EOF +#define JS_CODEGEN_MIPS32 1 +EOF + + JS_SIMULATOR_MIPS32=1 + JS_CODEGEN_MIPS32=1 +elif test "$JS_SIMULATOR" = mips64; then + if test "$CPU_ARCH" != "x86_64"; then + { echo "configure: error: The MIPS64 simulator only works on x86_64." 1>&2; echo "configure: error: The MIPS64 simulator only works on x86_64." 1>&5; exit 1; } + fi + cat >> confdefs.pytmp <<\EOF + (''' JS_SIMULATOR ''', ' 1 ') +EOF +cat >> confdefs.h <<\EOF +#define JS_SIMULATOR 1 +EOF + + cat >> confdefs.pytmp <<\EOF + (''' JS_SIMULATOR_MIPS64 ''', ' 1 ') +EOF +cat >> confdefs.h <<\EOF +#define JS_SIMULATOR_MIPS64 1 +EOF + + cat >> confdefs.pytmp <<\EOF + (''' JS_CODEGEN_MIPS64 ''', ' 1 ') +EOF +cat >> confdefs.h <<\EOF +#define JS_CODEGEN_MIPS64 1 +EOF + + JS_SIMULATOR_MIPS64=1 + JS_CODEGEN_MIPS64=1 +elif test "$CPU_ARCH" = "x86"; then + cat >> confdefs.pytmp <<\EOF + (''' JS_CODEGEN_X86 ''', ' 1 ') +EOF +cat >> confdefs.h <<\EOF +#define JS_CODEGEN_X86 1 +EOF + + JS_CODEGEN_X86=1 +elif test "$CPU_ARCH" = "x86_64"; then + cat >> confdefs.pytmp <<\EOF + (''' JS_CODEGEN_X64 ''', ' 1 ') +EOF +cat >> confdefs.h <<\EOF +#define JS_CODEGEN_X64 1 +EOF + + JS_CODEGEN_X64=1 +elif test "$CPU_ARCH" = "arm"; then + cat >> confdefs.pytmp <<\EOF + (''' JS_CODEGEN_ARM ''', ' 1 ') +EOF +cat >> confdefs.h <<\EOF +#define JS_CODEGEN_ARM 1 +EOF + + JS_CODEGEN_ARM=1 + if test -n "$MOZ_DEBUG"; then + cat >> confdefs.pytmp <<\EOF + (''' JS_DISASM_ARM ''', ' 1 ') +EOF +cat >> confdefs.h <<\EOF +#define JS_DISASM_ARM 1 +EOF + + JS_DISASM_ARM=1 + fi + + elif test "$CPU_ARCH" = "mips32"; then + cat >> confdefs.pytmp <<\EOF + (''' JS_CODEGEN_MIPS32 ''', ' 1 ') +EOF +cat >> confdefs.h <<\EOF +#define JS_CODEGEN_MIPS32 1 +EOF + + JS_CODEGEN_MIPS32=1 +elif test "$CPU_ARCH" = "mips64"; then + cat >> confdefs.pytmp <<\EOF + (''' JS_CODEGEN_MIPS64 ''', ' 1 ') +EOF +cat >> confdefs.h <<\EOF +#define JS_CODEGEN_MIPS64 1 +EOF + + JS_CODEGEN_MIPS64=1 +fi + + + + + + + + + + + + + + + +if test -n "$MOZ_INSTRUMENTS"; then + LIBS="$LIBS -framework CoreFoundation" +fi + +# Check whether --enable-jitspew or --disable-jitspew was given. +if test "${enable_jitspew+set}" = set; then + enableval="$enable_jitspew" + if test "$enableval" = "yes"; then + JS_JITSPEW=1 + elif test "$enableval" = "no"; then + JS_JITSPEW= + else + { echo "configure: error: Option, jitspew, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, jitspew, does not take an argument ($enableval)." 1>&5; exit 1; } + fi +fi + + +if test -n "$JS_JITSPEW" -o -n "$MOZ_DEBUG"; then + cat >> confdefs.pytmp <<\EOF + (''' JS_JITSPEW ''', ' 1 ') +EOF +cat >> confdefs.h <<\EOF +#define JS_JITSPEW 1 +EOF + +fi + + + +if test -n "$MOZ_DEBUG"; then + cat >> confdefs.pytmp <<\EOF + (''' JS_DEBUG ''', ' 1 ') +EOF +cat >> confdefs.h <<\EOF +#define JS_DEBUG 1 +EOF + +fi + +# Check whether --enable-gczeal or --disable-gczeal was given. +if test "${enable_gczeal+set}" = set; then + enableval="$enable_gczeal" + if test "$enableval" = "yes"; then + JS_GC_ZEAL=1 + elif test "$enableval" = "no"; then + JS_GC_ZEAL= + else + { echo "configure: error: Option, gczeal, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, gczeal, does not take an argument ($enableval)." 1>&5; exit 1; } + fi +fi + +if test -n "$JS_GC_ZEAL" -o -n "$MOZ_DEBUG"; then + cat >> confdefs.pytmp <<\EOF + (''' JS_GC_ZEAL ''', ' 1 ') +EOF +cat >> confdefs.h <<\EOF +#define JS_GC_ZEAL 1 +EOF + +fi + +# Check whether --enable-oom-breakpoint or --disable-oom-breakpoint was given. +if test "${enable_oom_breakpoint+set}" = set; then + enableval="$enable_oom_breakpoint" + if test "$enableval" = "yes"; then + JS_OOM_BREAKPOINT=1 + elif test "$enableval" = "no"; then + JS_OOM_BREAKPOINT= + else + { echo "configure: error: Option, oom-breakpoint, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, oom-breakpoint, does not take an argument ($enableval)." 1>&5; exit 1; } + fi +fi + +if test -n "$JS_OOM_BREAKPOINT"; then + cat >> confdefs.pytmp <<\EOF + (''' JS_OOM_BREAKPOINT ''', ' 1 ') +EOF +cat >> confdefs.h <<\EOF +#define JS_OOM_BREAKPOINT 1 +EOF + +fi + + + + +# Check whether --enable-clang-plugin or --disable-clang-plugin was given. +if test "${enable_clang_plugin+set}" = set; then + enableval="$enable_clang_plugin" + if test "$enableval" = "yes"; then + ENABLE_CLANG_PLUGIN=1 + elif test "$enableval" = "no"; then + ENABLE_CLANG_PLUGIN= + else + { echo "configure: error: Option, clang-plugin, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, clang-plugin, does not take an argument ($enableval)." 1>&5; exit 1; } + fi +fi + +if test -n "$ENABLE_CLANG_PLUGIN"; then + if test -z "${CLANG_CC}${CLANG_CL}"; then + { echo "configure: error: Can't use clang plugin without clang." 1>&2; echo "configure: error: Can't use clang plugin without clang." 1>&5; exit 1; } + fi + + echo $ac_n "checking for llvm-config""... $ac_c" 1>&6 +echo "configure:8984: checking for llvm-config" >&5 + if test -z "$LLVMCONFIG"; then + if test -n "$CLANG_CL"; then + CXX_COMPILER="$(dirname "$CXX")/clang" + else + CXX_COMPILER="${CXX}" + fi + LLVMCONFIG=`$CXX_COMPILER -print-prog-name=llvm-config` + fi + + if test -z "$LLVMCONFIG"; then + LLVMCONFIG=`which llvm-config` + fi + + if test ! -x "$LLVMCONFIG"; then + echo "$ac_t""not found" 1>&6 + { echo "configure: error: Cannot find an llvm-config binary for building a clang plugin" 1>&2; echo "configure: error: Cannot find an llvm-config binary for building a clang plugin" 1>&5; exit 1; } + fi + + echo "$ac_t""$LLVMCONFIG" 1>&6 + + if test -z "$LLVMCONFIG"; then + { echo "configure: error: Cannot find an llvm-config binary for building a clang plugin" 1>&2; echo "configure: error: Cannot find an llvm-config binary for building a clang plugin" 1>&5; exit 1; } + fi + LLVM_CXXFLAGS=`$LLVMCONFIG --cxxflags | sed -e 's/-isysroot [^ ]*//'` + + LLVM_LDFLAGS=`$LLVMCONFIG --ldflags | tr '\n' ' '` + + if test "${HOST_OS_ARCH}" = "Darwin"; then + CLANG_LDFLAGS="-Wl,-flat_namespace -Wl,-undefined,suppress -lclangASTMatchers" + elif test "${HOST_OS_ARCH}" = "WINNT"; then + CLANG_LDFLAGS="clangASTMatchers.lib" + else + CLANG_LDFLAGS="-lclangASTMatchers" + fi + + if test -n "$CLANG_CL"; then + LLVM_REPLACE_CXXFLAGS='' + for arg in $LLVM_CXXFLAGS; do + arg=`echo "$arg"|sed -e 's/^\//-/' -e 's/\\\\/\//g'` + LLVM_REPLACE_CXXFLAGS="$LLVM_REPLACE_CXXFLAGS $arg" + done + LLVM_CXXFLAGS="$LLVM_REPLACE_CXXFLAGS" + + LLVM_REPLACE_LDFLAGS='' + for arg in $LLVM_LDFLAGS; do + arg=`echo "$arg"|sed -e 's/^\//-/' -e 's/\\\\/\//g'` + LLVM_REPLACE_LDFLAGS="$LLVM_REPLACE_LDFLAGS $arg" + done + LLVM_LDFLAGS="$LLVM_REPLACE_LDFLAGS" + + CLANG_REPLACE_LDFLAGS='' + for arg in $CLANG_LDFLAGS; do + arg=`echo "$arg"|sed -e 's/^\//-/' -e 's/\\\\/\//g'` + CLANG_REPLACE_LDFLAGS="$CLANG_REPLACE_LDFLAGS $arg" + done + CLANG_LDFLAGS="$CLANG_REPLACE_LDFLAGS" + fi + + echo $ac_n "checking for new ASTMatcher API""... $ac_c" 1>&6 +echo "configure:9044: checking for new ASTMatcher API" >&5 +if eval "test \"`echo '$''{'ac_cv_have_new_ASTMatcher_api'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + + 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 + + _SAVE_CXXFLAGS="$CXXFLAGS" + _SAVE_CXX="$CXX" + _SAVE_MACOSX_DEPLOYMENT_TARGET="$MACOSX_DEPLOYMENT_TARGET" + unset MACOSX_DEPLOYMENT_TARGET + CXXFLAGS="${LLVM_CXXFLAGS}" + CXX="${HOST_CXX}" + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_have_new_ASTMatcher_names="yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_have_new_ASTMatcher_names="no" +fi +rm -f conftest* + CXX="$_SAVE_CXX" + CXXFLAGS="$_SAVE_CXXFLAGS" + export MACOSX_DEPLOYMENT_TARGET="$_SAVE_MACOSX_DEPLOYMENT_TARGET" + 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 + + +fi + +echo "$ac_t""$ac_cv_have_new_ASTMatcher_api" 1>&6 + if test "$ac_cv_have_new_ASTMatcher_names" = "yes"; then + LLVM_CXXFLAGS="$LLVM_CXXFLAGS -DHAVE_NEW_ASTMATCHER_NAMES" + fi + + echo $ac_n "checking for has with ignoringParenImpCasts""... $ac_c" 1>&6 +echo "configure:9100: checking for has with ignoringParenImpCasts" >&5 +if eval "test \"`echo '$''{'ac_cv_has_accepts_ignoringParenImpCasts'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + + 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 + + _SAVE_CXXFLAGS="$CXXFLAGS" + _SAVE_CXX="$CXX" + _SAVE_MACOSX_DEPLOYMENT_TARGET="$MACOSX_DEPLOYMENT_TARGET" + unset MACOSX_DEPLOYMENT_TARGET + CXXFLAGS="${LLVM_CXXFLAGS}" + CXX="${HOST_CXX}" + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_has_accepts_ignoringParenImpCasts="yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_has_accepts_ignoringParenImpCasts="no" +fi +rm -f conftest* + CXX="$_SAVE_CXX" + CXXFLAGS="$_SAVE_CXXFLAGS" + export MACOSX_DEPLOYMENT_TARGET="$_SAVE_MACOSX_DEPLOYMENT_TARGET" + 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 + + +fi + +echo "$ac_t""$ac_cv_has_accepts_ignoringParenImpCasts" 1>&6 + if test "$ac_cv_has_accepts_ignoringParenImpCasts" = "yes"; then + LLVM_CXXFLAGS="$LLVM_CXXFLAGS -DHAS_ACCEPTS_IGNORINGPARENIMPCASTS" + fi + + cat >> confdefs.pytmp <<\EOF + (''' MOZ_CLANG_PLUGIN ''', ' 1 ') +EOF +cat >> confdefs.h <<\EOF +#define MOZ_CLANG_PLUGIN 1 +EOF + +fi + + + + + + + + + + +# Check whether --with-sixgill or --without-sixgill was given. +if test "${with_sixgill+set}" = set; then + withval="$with_sixgill" + SIXGILL_PATH=$withval +else + SIXGILL_PATH= +fi + + +if test -n "$SIXGILL_PATH"; then + if test ! -x "$SIXGILL_PATH/bin/xdbfind" || test ! -f "$SIXGILL_PATH/gcc/xgill.so" || test ! -x "$SIXGILL_PATH/scripts/wrap_gcc/g++"; then + { echo "configure: error: The sixgill plugin and binaries are not at the specified path." 1>&2; echo "configure: error: The sixgill plugin and binaries are not at the specified path." 1>&5; 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 + elif test "$enableval" = "no"; then + ENABLE_STRIP= + else + { echo "configure: error: Option, strip, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, strip, does not take an argument ($enableval)." 1>&5; exit 1; } + fi +fi + + +# Check whether --enable-install-strip or --disable-install-strip was given. +if test "${enable_install_strip+set}" = set; then + enableval="$enable_install_strip" + if test "$enableval" = "yes"; then + PKG_SKIP_STRIP= + elif test "$enableval" = "no"; then + PKG_SKIP_STRIP=1 + else + { echo "configure: error: Option, install-strip, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, install-strip, does not take an argument ($enableval)." 1>&5; exit 1; } + fi +fi + + +# Profiling and Instrumenting + +if test -z "$SKIP_LIBRARY_CHECKS"; then + + 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 + + for ac_func in __cxa_demangle +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:9231: 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 < +#undef $ac_func +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* 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:9266: \"$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.pytmp <> confdefs.h <&6 +HAVE_DEMANGLE= +fi +done + + 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 + +fi + + +# Check whether --with-jitreport-granularity or --without-jitreport-granularity was given. +if test "${with_jitreport_granularity+set}" = set; then + withval="$with_jitreport_granularity" + JITREPORT_GRANULARITY=$withval +else + JITREPORT_GRANULARITY=3 +fi + + +cat >> confdefs.pytmp <> confdefs.h <&6 +echo "configure:9327: checking for -pipe support" >&5 +if test -n "$GNU_CC" -a -n "$GNU_CXX"; then + CFLAGS="$CFLAGS -pipe" + CXXFLAGS="$CXXFLAGS -pipe" + echo "$ac_t""yes" 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:9341: checking whether C compiler supports -fprofile-generate" >&5 +cat > conftest.$ac_ext <&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" + + + + + + +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 + + +echo $ac_n "checking for tm_zone tm_gmtoff in struct tm""... $ac_c" 1>&6 +echo "configure:9385: checking for tm_zone tm_gmtoff in struct tm" >&5 +if eval "test \"`echo '$''{'ac_cv_struct_tm_zone_tm_gmtoff'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +int main() { +struct tm tm; tm.tm_zone = 0; tm.tm_gmtoff = 1; +; return 0; } +EOF +if { (eval echo configure:9397: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_struct_tm_zone_tm_gmtoff="yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_struct_tm_zone_tm_gmtoff="no" +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_struct_tm_zone_tm_gmtoff" 1>&6 +if test "$ac_cv_struct_tm_zone_tm_gmtoff" = "yes" ; then + cat >> confdefs.pytmp <<\EOF + (''' HAVE_TM_ZONE_TM_GMTOFF ''', ' 1 ') +EOF +cat >> confdefs.h <<\EOF +#define HAVE_TM_ZONE_TM_GMTOFF 1 +EOF + +fi +fi # ! SKIP_COMPILER_CHECKS + +cat >> confdefs.pytmp <<\EOF + (''' CPP_THROW_NEW ''', r''' throw() ''') +EOF +cat >> confdefs.h <<\EOF +#define CPP_THROW_NEW throw() +EOF + +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_n "checking what kind of list files are supported by the linker""... $ac_c" 1>&6 +echo "configure:9439: checking what kind of list files are supported by the linker" >&5 +if eval "test \"`echo '$''{'EXPAND_LIBS_LIST_STYLE'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + echo "int main() {return 0;}" > conftest.${ac_ext} + if { ac_try='${CC-cc} -o conftest.${OBJ_SUFFIX} -c $CFLAGS $CPPFLAGS conftest.${ac_ext} 1>&5'; { (eval echo configure:9444: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest.${OBJ_SUFFIX}; then + echo "INPUT(conftest.${OBJ_SUFFIX})" > conftest.list + if { ac_try='${CC-cc} -o conftest${ac_exeext} $LDFLAGS conftest.list $LIBS 1>&5'; { (eval echo configure:9446: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest${ac_exeext}; then + EXPAND_LIBS_LIST_STYLE=linkerscript + else + echo "conftest.${OBJ_SUFFIX}" > conftest.list + if { ac_try='${CC-cc} -o conftest${ac_exeext} $LDFLAGS -Wl,-filelist,conftest.list $LIBS 1>&5'; { (eval echo configure:9450: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest${ac_exeext}; then + EXPAND_LIBS_LIST_STYLE=filelist + elif { ac_try='${CC-cc} -o conftest${ac_exeext} $LDFLAGS @conftest.list $LIBS 1>&5'; { (eval echo configure:9452: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest${ac_exeext}; then + EXPAND_LIBS_LIST_STYLE=list + else + EXPAND_LIBS_LIST_STYLE=none + fi + fi + else + { echo "configure: error: couldn't compile a simple C file" 1>&2; echo "configure: error: couldn't compile a simple C file" 1>&5; exit 1; } + fi + rm -rf conftest* +fi + +echo "$ac_t""$EXPAND_LIBS_LIST_STYLE" 1>&6 + +LIBS_DESC_SUFFIX=desc + + + +if test "$GCC_USE_GNU_LD"; then + echo $ac_n "checking what kind of ordering can be done with the linker""... $ac_c" 1>&6 +echo "configure:9472: checking what kind of ordering can be done with the linker" >&5 +if eval "test \"`echo '$''{'EXPAND_LIBS_ORDER_STYLE'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + > conftest.order + _SAVE_LDFLAGS="$LDFLAGS" + LDFLAGS="${LDFLAGS} -Wl,--section-ordering-file,conftest.order" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + EXPAND_LIBS_ORDER_STYLE=section-ordering-file +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + EXPAND_LIBS_ORDER_STYLE= +fi +rm -f conftest* + LDFLAGS="$_SAVE_LDFLAGS" + if test -z "$EXPAND_LIBS_ORDER_STYLE"; then + if { ac_try='${CC-cc} ${DSO_LDOPTS} ${LDFLAGS} -o ${DLL_PREFIX}conftest${DLL_SUFFIX} -Wl'; { (eval echo configure:9499: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then + EXPAND_LIBS_ORDER_STYLE=linkerscript + else + EXPAND_LIBS_ORDER_STYLE=none + fi + rm -f ${DLL_PREFIX}conftest${DLL_SUFFIX} + fi +fi + +echo "$ac_t""$EXPAND_LIBS_ORDER_STYLE" 1>&6 +fi + + + + +# Build dependencies + +if test "$GNU_CC" -a "$GNU_CXX"; then + _DEPEND_CFLAGS='-MD -MP -MF $(MDDEPDIR)/$(@F).pp' +else + if test -z "$_WIN32_MSVC"; then + _USE_CPP_INCLUDE_FLAG= + _DEFINES_CFLAGS='$(ACDEFINES) -D_JS_CONFDEFS_H_ -DMOZILLA_CLIENT' + _DEFINES_CXXFLAGS='$(ACDEFINES) -D_JS_CONFDEFS_H_ -DMOZILLA_CLIENT' + else + echo '#include ' > dummy-hello.c + + _CL_PREFIX_REGEX="^\([^:]*:.*[ :] \)\(.*\\\stdio.h\)$" + CL_INCLUDES_PREFIX=`${CC} -showIncludes -c -Fonul dummy-hello.c 2>&1 | sed -ne 's/'"$_CL_PREFIX_REGEX"'/\1/p'` + _CL_STDIO_PATH=`${CC} -showIncludes -c -Fonul dummy-hello.c 2>&1 | sed -ne 's/'"$_CL_PREFIX_REGEX"'/\2/p'` + + if ! test -e "$_CL_STDIO_PATH"; then + { echo "configure: error: Unable to parse cl -showIncludes prefix. This compiler's locale has an unsupported formatting." 1>&2; echo "configure: error: Unable to parse cl -showIncludes prefix. This compiler's locale has an unsupported formatting." 1>&5; exit 1; } + fi + if test -z "$CL_INCLUDES_PREFIX"; then + { echo "configure: error: Cannot find cl -showIncludes prefix." 1>&2; echo "configure: error: Cannot find cl -showIncludes prefix." 1>&5; exit 1; } + fi + + rm -f dummy-hello.c + + NONASCII=$'\241\241' + + fi +fi + +# Check whether --enable-readline or --disable-readline was given. +if test "${enable_readline+set}" = set; then + enableval="$enable_readline" + if test "$enableval" = "yes"; then + JS_WANT_READLINE=1 + elif test "$enableval" = "no"; then + JS_WANT_READLINE= + else + { echo "configure: error: Option, readline, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, readline, does not take an argument ($enableval)." 1>&5; exit 1; } + fi +fi + + +JS_BUNDLED_EDITLINE= +EDITLINE_LIBS= + +case "$target" in +*-mingw*) + NO_EDITLINE=1 + ;; +*) + ;; +esac + +if test -z "$SKIP_LIBRARY_CHECKS" -a -z "$NO_EDITLINE"; then + if test -n "$JS_WANT_READLINE"; then + echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6 +echo "configure:9571: checking for readline in -lreadline" >&5 +ac_lib_var=`echo readline'_'readline | 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="-lreadline $LIBS" +cat > conftest.$ac_ext <&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 + EDITLINE_LIBS="-lreadline" +else + echo "$ac_t""no" 1>&6 +{ echo "configure: error: No system readline library found." 1>&2; echo "configure: error: No system readline library found." 1>&5; exit 1; } +fi + + else + JS_BUNDLED_EDITLINE=1 + fi + + cat >> confdefs.pytmp <<\EOF + (''' EDITLINE ''', ' 1 ') +EOF +cat >> confdefs.h <<\EOF +#define EDITLINE 1 +EOF + +fi + + + +# Standalone module options (Not for building Mozilla) + +if test "$JS_HAS_CTYPES"; then + if test -n "$_MSC_VER" -a \( "$AS" != "ml.exe" -a "$AS" != "ml64.exe" \); then + { echo "configure: error: \"$AS\" is not a suitable assembler to build js-ctypes. If you are building with MS Visual Studio 8 Express, you may download the MASM 8.0 package, upgrade to Visual Studio 9 Express, or install the Vista SDK. Or do not use --enable-ctypes." 1>&2; echo "configure: error: \"$AS\" is not a suitable assembler to build js-ctypes. If you are building with MS Visual Studio 8 Express, you may download the MASM 8.0 package, upgrade to Visual Studio 9 Express, or install the Vista SDK. Or do not use --enable-ctypes." 1>&5; exit 1; } + fi +fi + + +# Check whether --with-qemu-exe or --without-qemu-exe was given. +if test "${with_qemu_exe+set}" = set; then + withval="$with_qemu_exe" + QEMU_EXE=$withval +fi + + +# Check whether --with-cross-lib or --without-cross-lib was given. +if test "${with_cross_lib+set}" = set; then + withval="$with_cross_lib" + CROSS_LIB=$withval +else + CROSS_LIB=/usr/$target +fi + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +_INTL_API=yes + + + +ICU_LIB_NAMES= +MOZ_SYSTEM_ICU= +# Check whether --with-system-icu or --without-system-icu was given. +if test "${with_system_icu+set}" = set; then + withval="$with_system_icu" + if test "$withval" = "yes"; then + MOZ_SYSTEM_ICU=1 + elif test "$withval" = "no"; then + : + else + { echo "configure: error: Option, system-icu, does not take an argument ($withval)." 1>&2; echo "configure: error: Option, system-icu, does not take an argument ($withval)." 1>&5; exit 1; } + fi +fi + + +if test -n "$MOZ_SYSTEM_ICU"; then + succeeded=no + + if test -z "$PKG_CONFIG"; then + echo "*** The pkg-config script could not be found. Make sure it is" + echo "*** in your path, or set the PKG_CONFIG environment variable" + echo "*** to the full path to pkg-config." + echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." + else + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + echo $ac_n "checking for icu-i18n >= 58.1""... $ac_c" 1>&6 +echo "configure:9718: checking for icu-i18n >= 58.1" >&5 + + if $PKG_CONFIG --exists "icu-i18n >= 58.1" ; then + echo "$ac_t""yes" 1>&6 + succeeded=yes + + echo $ac_n "checking MOZ_ICU_CFLAGS""... $ac_c" 1>&6 +echo "configure:9725: checking MOZ_ICU_CFLAGS" >&5 + MOZ_ICU_CFLAGS=`$PKG_CONFIG --cflags "icu-i18n >= 58.1"` + echo "$ac_t""$MOZ_ICU_CFLAGS" 1>&6 + + echo $ac_n "checking MOZ_ICU_LIBS""... $ac_c" 1>&6 +echo "configure:9730: checking MOZ_ICU_LIBS" >&5 + ## Remove evil flags like -Wl,--export-dynamic + MOZ_ICU_LIBS="`$PKG_CONFIG --libs \"icu-i18n >= 58.1\" |sed s/-Wl,--export-dynamic//g`" + echo "$ac_t""$MOZ_ICU_LIBS" 1>&6 + else + MOZ_ICU_CFLAGS="" + MOZ_ICU_LIBS="" + ## If we have a custom action on failure, don't print errors, but + ## do set a variable so people can do so. + MOZ_ICU_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "icu-i18n >= 58.1"` + echo $MOZ_ICU_PKG_ERRORS + fi + + + + else + echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." + echo "*** See http://www.freedesktop.org/software/pkgconfig" + fi + fi + + if test $succeeded = yes; then + : + else + if test "$COMPILE_ENVIRONMENT"; then + { echo "configure: error: Library requirements (icu-i18n >= 58.1) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." 1>&2; echo "configure: error: Library requirements (icu-i18n >= 58.1) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." 1>&5; exit 1; } + fi + fi + + CFLAGS="$CFLAGS $MOZ_ICU_CFLAGS" + CXXFLAGS="$CXXFLAGS $MOZ_ICU_CFLAGS" +fi + + + +# Check whether --with-intl-api or --without-intl-api was given. +if test "${with_intl_api+set}" = set; then + withval="$with_intl_api" + _INTL_API=$withval +fi + + +ENABLE_INTL_API= +EXPOSE_INTL_API= +case "$_INTL_API" in +no) + ;; +build) + ENABLE_INTL_API=1 + ;; +yes) + ENABLE_INTL_API=1 + EXPOSE_INTL_API=1 + ;; +*) + { echo "configure: error: Invalid value passed to --with-intl-api: $_INTL_API" 1>&2; echo "configure: error: Invalid value passed to --with-intl-api: $_INTL_API" 1>&5; exit 1; } + ;; +esac + +if test -n "$ENABLE_INTL_API"; then + USE_ICU=1 +fi + +if test -n "$EXPOSE_INTL_API"; then + cat >> confdefs.pytmp <<\EOF + (''' EXPOSE_INTL_API ''', ' 1 ') +EOF +cat >> confdefs.h <<\EOF +#define EXPOSE_INTL_API 1 +EOF + +fi + +if test -n "$ENABLE_INTL_API"; then + cat >> confdefs.pytmp <<\EOF + (''' ENABLE_INTL_API ''', ' 1 ') +EOF +cat >> confdefs.h <<\EOF +#define ENABLE_INTL_API 1 +EOF + +fi + +if test -n "$USE_ICU"; then + icudir="$_topsrcdir/intl/icu/source" + if test ! -d "$icudir"; then + icudir="$_topsrcdir/../../intl/icu/source" + if test ! -d "$icudir"; then + { echo "configure: error: Cannot find the ICU directory" 1>&2; echo "configure: error: Cannot find the ICU directory" 1>&5; exit 1; } + fi + fi + + version=`sed -n 's/^[[:space:]]*#[[:space:]]*define[[:space:]][[:space:]]*U_ICU_VERSION_MAJOR_NUM[[:space:]][[:space:]]*\([0-9][0-9]*\)[[:space:]]*$/\1/p' "$icudir/common/unicode/uvernum.h"` + if test x"$version" = x; then + { echo "configure: error: cannot determine icu version number from uvernum.h header file $lineno" 1>&2; echo "configure: error: cannot determine icu version number from uvernum.h header file $lineno" 1>&5; exit 1; } + fi + MOZ_ICU_VERSION="$version" + + # TODO: the l is actually endian-dependent + # We could make this set as 'l' or 'b' for little or big, respectively, + # but we'd need to check in a big-endian version of the file. + ICU_DATA_FILE="icudt${version}l.dat" + + if test -z "$JS_STANDALONE" -a -z "$MOZ_SYSTEM_ICU" -a "$OS_TARGET" != WINNT -a "$MOZ_WIDGET_TOOLKIT" != "android"; then + MOZ_ICU_DATA_ARCHIVE=1 + else + MOZ_ICU_DATA_ARCHIVE= + fi +fi + + + + + + + +if test -n "$USE_ICU" -a -z "$MOZ_SYSTEM_ICU"; then + if test -z "$YASM" -a -z "$GNU_AS" -a "$COMPILE_ENVIRONMENT"; then + { echo "configure: error: Building ICU requires either yasm or a GNU assembler. If you do not have either of those available for this platform you must use --without-intl-api" 1>&2; echo "configure: error: Building ICU requires either yasm or a GNU assembler. If you do not have either of those available for this platform you must use --without-intl-api" 1>&5; exit 1; } + fi + cat >> confdefs.pytmp <<\EOF + (''' U_STATIC_IMPLEMENTATION ''', ' 1 ') +EOF +cat >> confdefs.h <<\EOF +#define U_STATIC_IMPLEMENTATION 1 +EOF + + cat >> confdefs.pytmp <<\EOF + (''' U_USING_ICU_NAMESPACE ''', r''' 0 ''') +EOF +cat >> confdefs.h <<\EOF +#define U_USING_ICU_NAMESPACE 0 +EOF + +fi + + +CFLAGS=`echo \ + $_WARNINGS_CFLAGS \ + $CFLAGS` + +CXXFLAGS=`echo \ + $_WARNINGS_CXXFLAGS \ + $CXXFLAGS` + +COMPILE_CFLAGS=`echo \ + $_DEFINES_CFLAGS \ + $COMPILE_CFLAGS` + +COMPILE_CXXFLAGS=`echo \ + $_DEFINES_CXXFLAGS \ + $COMPILE_CXXFLAGS` + +HOST_CFLAGS=`echo \ + $HOST_CFLAGS` + +HOST_CXXFLAGS=`echo \ + $HOST_CXXFLAGS` + + + + +OS_CFLAGS="$CFLAGS" +OS_CXXFLAGS="$CXXFLAGS" +OS_CPPFLAGS="$CPPFLAGS" +OS_COMPILE_CFLAGS="$COMPILE_CFLAGS" +OS_COMPILE_CXXFLAGS="$COMPILE_CXXFLAGS" +OS_LDFLAGS="$LDFLAGS" +OS_LIBS="$LIBS" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +cat >> confdefs.pytmp <> confdefs.h <&6 +echo "configure:9951: 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 < +#undef $ac_func +/* 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:9983: \"$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.pytmp <> confdefs.h <&6 +fi +done + + + +if test "$MOZ_DEBUG"; then + cat >> confdefs.pytmp <<\EOF + (''' MOZ_REFLOW_PERF ''', ' 1 ') +EOF +cat >> confdefs.h <<\EOF +#define MOZ_REFLOW_PERF 1 +EOF + + cat >> confdefs.pytmp <<\EOF + (''' MOZ_REFLOW_PERF_DSP ''', ' 1 ') +EOF +cat >> confdefs.h <<\EOF +#define MOZ_REFLOW_PERF_DSP 1 +EOF + +fi + + +if test -z "$GNU_CC" -a "$OS_ARCH" = "WINNT"; then + PREPROCESS_OPTION="-P -Fi" +else + PREPROCESS_OPTION="-E -o " +fi + + + + + + + + +MALLOC_HEADERS="malloc.h malloc_np.h malloc/malloc.h sys/malloc.h" +MALLOC_H= + +for file in $MALLOC_HEADERS; do + ac_safe=`echo "$file" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $file""... $ac_c" 1>&6 +echo "configure:10049: checking for $file" >&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 < +int main() { + +; return 0; } +EOF +if { (eval echo configure:10062: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + 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 + MALLOC_H=$file + else + echo "$ac_t""no" 1>&6 + + fi + + if test "$MALLOC_H" != ""; then + cat >> confdefs.pytmp < ''') +EOF +cat >> confdefs.h < +EOF + + break + fi +done + +for ac_func in strndup posix_memalign memalign +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:10097: 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 < +#undef $ac_func +/* 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:10129: \"$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.pytmp <> confdefs.h <&6 +fi +done + + +for ac_func in malloc_usable_size +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:10160: 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 < +#undef $ac_func +/* 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:10192: \"$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.pytmp <> confdefs.h <&6 +fi +done + +MALLOC_USABLE_SIZE_CONST_PTR=const +if test -n "$HAVE_MALLOC_H"; then + echo $ac_n "checking whether malloc_usable_size definition can use const argument""... $ac_c" 1>&6 +echo "configure:10222: checking whether malloc_usable_size definition can use const argument" >&5 + cat > conftest.$ac_ext < + #include + size_t malloc_usable_size(const void *ptr); +int main() { +return malloc_usable_size(0); +; return 0; } +EOF +if { (eval echo configure:10233: \"$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 "$ac_t""no" 1>&6 + MALLOC_USABLE_SIZE_CONST_PTR= +fi +rm -f conftest* +fi +cat >> confdefs.pytmp <> confdefs.h <&6 +echo "configure:10255: checking for valloc in malloc.h" >&5 +cat > conftest.$ac_ext < +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "valloc" >/dev/null 2>&1; then + rm -rf conftest* + cat >> confdefs.pytmp <<\EOF + (''' HAVE_VALLOC ''', ' 1 ') +EOF +cat >> confdefs.h <<\EOF +#define HAVE_VALLOC 1 +EOF + + echo "$ac_t""yes" 1>&6 +else + rm -rf conftest* + echo "$ac_t""no" 1>&6 +fi +rm -f conftest* + + +echo $ac_n "checking for valloc in unistd.h""... $ac_c" 1>&6 +echo "configure:10280: checking for valloc in unistd.h" >&5 +cat > conftest.$ac_ext < +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "valloc" >/dev/null 2>&1; then + rm -rf conftest* + cat >> confdefs.pytmp <<\EOF + (''' HAVE_VALLOC ''', ' 1 ') +EOF +cat >> confdefs.h <<\EOF +#define HAVE_VALLOC 1 +EOF + + echo "$ac_t""yes" 1>&6 +else + rm -rf conftest* + echo "$ac_t""no" 1>&6 +fi +rm -f conftest* + + + + + +for ac_func in setlocale localeconv +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:10310: 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 < +#undef $ac_func +/* 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:10342: \"$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.pytmp <> confdefs.h <&6 +fi +done + + + + + + +if test -n "$JS_STANDALONE"; then +MOZ_APP_NAME="mozjs" +MOZ_APP_VERSION="$MOZILLA_SYMBOLVERSION" +JS_LIBRARY_NAME="mozjs-$MOZILLA_SYMBOLVERSION" +else +JS_LIBRARY_NAME="mozjs" +fi +JS_CONFIG_LIBS="$NSPR_LIBS $LIBS" +if test -n "$GNU_CC"; then +JS_CONFIG_MOZ_JS_LIBS='-L${libdir} -l${JS_LIBRARY_NAME}' +else +JS_CONFIG_MOZ_JS_LIBS='${libdir}/${JS_LIBRARY_NAME}.lib' +fi + + + + + + +if test "$MOZ_BUILD_APP" != js -o -n "$JS_STANDALONE"; then + + # Run jemalloc configure script + + if test -z "$MOZ_SYSTEM_JEMALLOC" -a "$MOZ_MEMORY" && test -n "$MOZ_JEMALLOC4" -o -n "$MOZ_REPLACE_MALLOC"; then + ac_configure_args="--build=$build --host=$target --enable-stats --with-jemalloc-prefix=je_ --disable-valgrind" + # We're using memalign for _aligned_malloc in memory/build/mozmemory_wrap.c + # on Windows, so just export memalign on all platforms. + ac_configure_args="$ac_configure_args ac_cv_func_memalign=yes" + if test -n "$MOZ_REPLACE_MALLOC"; then + # When using replace_malloc, we always want valloc exported from jemalloc. + ac_configure_args="$ac_configure_args ac_cv_func_valloc=yes" + if test "${OS_ARCH}" = Darwin; then + # We also need to enable pointer validation on Mac because jemalloc's + # zone allocator is not used. + ac_configure_args="$ac_configure_args --enable-ivsalloc" + fi + fi + if test -n "$MOZ_JEMALLOC4"; then + case "${OS_ARCH}" in + WINNT|Darwin) + # We want jemalloc functions to be kept hidden on both Mac and Windows + # See memory/build/mozmemory_wrap.h for details. + ac_configure_args="$ac_configure_args --without-export" + ;; + esac + if test "${OS_ARCH}" = WINNT; then + # Lazy lock initialization doesn't play well with lazy linking of + # mozglue.dll on Windows XP (leads to startup crash), so disable it. + ac_configure_args="$ac_configure_args --disable-lazy-lock" + + # 64-bit Windows builds require a minimum 16-byte alignment. + if test -n "$HAVE_64BIT_BUILD"; then + ac_configure_args="$ac_configure_args --with-lg-tiny-min=4" + fi + fi + elif test "${OS_ARCH}" = Darwin; then + # When building as a replace-malloc lib, disabling the zone allocator + # forces to use pthread_atfork. + ac_configure_args="$ac_configure_args --disable-zone-allocator" + fi + _MANGLE="malloc posix_memalign aligned_alloc calloc realloc free memalign valloc malloc_usable_size" + JEMALLOC_WRAPPER= + if test -z "$MOZ_REPLACE_MALLOC"; then + case "$OS_ARCH" in + Linux|DragonFly|FreeBSD|NetBSD|OpenBSD) + MANGLE=$_MANGLE + ;; + esac + elif test -z "$MOZ_JEMALLOC4"; then + MANGLE=$_MANGLE + JEMALLOC_WRAPPER=replace_ + fi + if test -n "$MANGLE"; then + MANGLED= + for mangle in ${MANGLE}; do + if test -n "$MANGLED"; then + MANGLED="$mangle:$JEMALLOC_WRAPPER$mangle,$MANGLED" + else + MANGLED="$mangle:$JEMALLOC_WRAPPER$mangle" + fi + done + ac_configure_args="$ac_configure_args --with-mangling=$MANGLED" + fi + unset CONFIG_FILES + if test -z "$MOZ_TLS"; then + ac_configure_args="$ac_configure_args --disable-tls" + fi + EXTRA_CFLAGS="$CFLAGS" + for var in AS CC CXX CPP LD AR RANLIB STRIP CPPFLAGS EXTRA_CFLAGS LDFLAGS; do + ac_configure_args="$ac_configure_args $var='`eval echo \\${${var}}`'" + done + + # jemalloc's configure assumes that if you have CFLAGS set at all, you set + # all the flags necessary to configure jemalloc, which is not likely to be + # the case on Windows if someone is building Firefox with flags set in + # their mozconfig. + if test "$_MSC_VER"; then + ac_configure_args="$ac_configure_args CFLAGS=" + fi + + # Force disable DSS support in jemalloc. + ac_configure_args="$ac_configure_args ac_cv_func_sbrk=false" + + # Make Linux builds munmap freed chunks instead of recycling them. + ac_configure_args="$ac_configure_args --enable-munmap" + + # Disable cache oblivious behavior that appears to have a performance + # impact on Firefox. + ac_configure_args="$ac_configure_args --disable-cache-oblivious" + + if ! test -e memory/jemalloc; then + mkdir -p memory/jemalloc + fi + + # jemalloc's configure runs git to determine the version. But when building + # from a gecko git clone, the git commands it uses is going to pick gecko's + # information, not jemalloc's, which is useless. So pretend we don't have git + # at all. That will make jemalloc's configure pick the in-tree VERSION file. + (PATH="$srcdir/memory/jemalloc/helper:$PATH"; + for moz_config_dir in memory/jemalloc/src; do + _CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} + case "$moz_config_dir" in + *:*) + objdir=$(echo $moz_config_dir | awk -F: '{print $2}') + ;; + *) + objdir=$moz_config_dir + ;; + esac + echo $objdir >> subconfigures + + dumpenv="true | " + case "$host" in + *-mingw*) + _CONFIG_SHELL=$(cd $(dirname $_CONFIG_SHELL); pwd -W)/$(basename $_CONFIG_SHELL) + if test ! -e "$_CONFIG_SHELL" -a -e "${_CONFIG_SHELL}.exe"; then + _CONFIG_SHELL="${_CONFIG_SHELL}.exe" + fi + dumpenv="$PERL $_topsrcdir/build/win32/dumpenv4python.pl $ac_configure_args | " + ;; + esac + + eval $dumpenv $PYTHON $_topsrcdir/build/subconfigure.py --prepare "$srcdir" "$moz_config_dir" "$_CONFIG_SHELL" $ac_configure_args + + done + + ) || exit 1 + ac_configure_args="$_SUBDIR_CONFIG_ARGS" + fi + +fi + + + +# Avoid using obsolete NSPR features +cat >> confdefs.pytmp <<\EOF + (''' NO_NSPR_10_SUPPORT ''', ' 1 ') +EOF +cat >> confdefs.h <<\EOF +#define NO_NSPR_10_SUPPORT 1 +EOF + + +WIN_TOP_SRC= +case "$host_os" in +mingw*) + WIN_TOP_SRC=`cd $srcdir; pwd -W` + ;; +esac + + +top_srcdir=$srcdir + + +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 -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 +: ${CONFIG_STATUS=./config.data} + +echo creating $CONFIG_STATUS + +cat > $CONFIG_STATUS <> $CONFIG_STATUS +rm confdefs.pytmp confdefs.h + +cat >> $CONFIG_STATUS <<\EOF +] + +substs = [ +EOF + +sed 's/$/,/' >> $CONFIG_STATUS <> $CONFIG_STATUS +done + +cat >> $CONFIG_STATUS <<\EOF +] + +non_global_defines = [ +EOF + +if test -n "$_NON_GLOBAL_ACDEFINES"; then + for var in $_NON_GLOBAL_ACDEFINES; do + echo " '$var'," >> $CONFIG_STATUS + done +fi + +cat >> $CONFIG_STATUS < MAX_TIMEOUT_INTERVAL) { JS_ReportErrorASCII(cx, "Excessive sleep interval"); return false; @@ -3680,6 +3681,7 @@ JS_ReportErrorASCII(cx, "timeout is not a number"); return false; } + const TimeDuration MAX_TIMEOUT_INTERVAL = TimeDuration::FromSeconds(MAX_TIMEOUT_SECONDS); if (TimeDuration::FromSeconds(t) > MAX_TIMEOUT_INTERVAL) { JS_ReportErrorASCII(cx, "Excessive timeout value"); return false; diff -Nru mozjs52-52.3.1/js/src/tests/Intl/DateTimeFormat/timeZone_backward_links.js mozjs52-52.8.1/js/src/tests/Intl/DateTimeFormat/timeZone_backward_links.js --- mozjs52-52.3.1/js/src/tests/Intl/DateTimeFormat/timeZone_backward_links.js 2017-08-08 10:25:50.000000000 +0000 +++ mozjs52-52.8.1/js/src/tests/Intl/DateTimeFormat/timeZone_backward_links.js 2018-06-11 16:38:18.000000000 +0000 @@ -1,7 +1,7 @@ // |reftest| skip-if(!this.hasOwnProperty("Intl")) // Generated by make_intl_data.py. DO NOT EDIT. -// tzdata version = 2017b +// tzdata version = 2018d const tzMapper = [ x => x, @@ -56,7 +56,6 @@ "Brazil/West": "America/Manaus", "Canada/Atlantic": "America/Halifax", "Canada/Central": "America/Winnipeg", - "Canada/East-Saskatchewan": "America/Regina", "Canada/Eastern": "America/Toronto", "Canada/Mountain": "America/Edmonton", "Canada/Newfoundland": "America/St_Johns", diff -Nru mozjs52-52.3.1/js/src/tests/Intl/DateTimeFormat/timeZone_backzone.js mozjs52-52.8.1/js/src/tests/Intl/DateTimeFormat/timeZone_backzone.js --- mozjs52-52.3.1/js/src/tests/Intl/DateTimeFormat/timeZone_backzone.js 2017-08-08 10:25:50.000000000 +0000 +++ mozjs52-52.8.1/js/src/tests/Intl/DateTimeFormat/timeZone_backzone.js 2018-06-11 16:38:18.000000000 +0000 @@ -1,7 +1,7 @@ // |reftest| skip-if(!this.hasOwnProperty("Intl")) // Generated by make_intl_data.py. DO NOT EDIT. -// tzdata version = 2017b +// tzdata version = 2018d const tzMapper = [ x => x, @@ -31,7 +31,6 @@ "Africa/Freetown": "Africa/Freetown", "Africa/Gaborone": "Africa/Gaborone", "Africa/Harare": "Africa/Harare", - "Africa/Juba": "Africa/Juba", "Africa/Kampala": "Africa/Kampala", "Africa/Kigali": "Africa/Kigali", "Africa/Kinshasa": "Africa/Kinshasa", @@ -48,7 +47,6 @@ "Africa/Nouakchott": "Africa/Nouakchott", "Africa/Ouagadougou": "Africa/Ouagadougou", "Africa/Porto-Novo": "Africa/Porto-Novo", - "Africa/Sao_Tome": "Africa/Sao_Tome", "Africa/Timbuktu": "Africa/Timbuktu", "America/Anguilla": "America/Anguilla", "America/Antigua": "America/Antigua", diff -Nru mozjs52-52.3.1/js/src/tests/Intl/DateTimeFormat/timeZone_backzone_links.js mozjs52-52.8.1/js/src/tests/Intl/DateTimeFormat/timeZone_backzone_links.js --- mozjs52-52.3.1/js/src/tests/Intl/DateTimeFormat/timeZone_backzone_links.js 2017-08-08 10:25:50.000000000 +0000 +++ mozjs52-52.8.1/js/src/tests/Intl/DateTimeFormat/timeZone_backzone_links.js 2018-06-11 16:38:18.000000000 +0000 @@ -1,7 +1,7 @@ // |reftest| skip-if(!this.hasOwnProperty("Intl")) // Generated by make_intl_data.py. DO NOT EDIT. -// tzdata version = 2017b +// tzdata version = 2018d const tzMapper = [ x => x, diff -Nru mozjs52-52.3.1/js/src/tests/Intl/DateTimeFormat/timeZone_notbackward_links.js mozjs52-52.8.1/js/src/tests/Intl/DateTimeFormat/timeZone_notbackward_links.js --- mozjs52-52.3.1/js/src/tests/Intl/DateTimeFormat/timeZone_notbackward_links.js 2017-08-08 10:25:50.000000000 +0000 +++ mozjs52-52.8.1/js/src/tests/Intl/DateTimeFormat/timeZone_notbackward_links.js 2018-06-11 16:38:18.000000000 +0000 @@ -1,7 +1,7 @@ // |reftest| skip-if(!this.hasOwnProperty("Intl")) // Generated by make_intl_data.py. DO NOT EDIT. -// tzdata version = 2017b +// tzdata version = 2018d const tzMapper = [ x => x, diff -Nru mozjs52-52.3.1/js/src/tests/js1_5/Array/regress-157652.js mozjs52-52.8.1/js/src/tests/js1_5/Array/regress-157652.js --- mozjs52-52.3.1/js/src/tests/js1_5/Array/regress-157652.js 2017-08-08 10:25:50.000000000 +0000 +++ mozjs52-52.8.1/js/src/tests/js1_5/Array/regress-157652.js 2018-06-08 12:27:11.000000000 +0000 @@ -1,4 +1,4 @@ -// |reftest| skip-if(xulRuntime.XPCOMABI.match(/x86_64/)||Android) -- No test results +// |reftest| skip-if(xulRuntime.XPCOMABI.match(/x86_64|aarch64|ppc64|ppc64le|s390x/)||Android) -- No test results /* -*- Mode: C++; tab-width: 2; 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 diff -Nru mozjs52-52.3.1/js/src/tests/js1_5/Array/regress-330812.js mozjs52-52.8.1/js/src/tests/js1_5/Array/regress-330812.js --- mozjs52-52.3.1/js/src/tests/js1_5/Array/regress-330812.js 2017-08-08 10:25:50.000000000 +0000 +++ mozjs52-52.8.1/js/src/tests/js1_5/Array/regress-330812.js 2018-06-08 12:27:10.000000000 +0000 @@ -1,4 +1,4 @@ -// |reftest| skip-if(xulRuntime.XPCOMABI.match(/x86_64/)||Android) -- No test results +// |reftest| skip-if(xulRuntime.XPCOMABI.match(/x86_64|aarch64|ppc64|ppc64le|s390x/)||Android) -- No test results /* -*- Mode: C++; tab-width: 2; 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 diff -Nru mozjs52-52.3.1/js/src/tests/js1_5/Regress/regress-422348.js mozjs52-52.8.1/js/src/tests/js1_5/Regress/regress-422348.js --- mozjs52-52.3.1/js/src/tests/js1_5/Regress/regress-422348.js 2017-08-08 10:25:50.000000000 +0000 +++ mozjs52-52.8.1/js/src/tests/js1_5/Regress/regress-422348.js 2018-06-08 12:27:10.000000000 +0000 @@ -1,4 +1,4 @@ -// |reftest| skip-if(xulRuntime.XPCOMABI.match(/x86_64/)) -- On 64-bit, takes forever rather than throwing +// |reftest| skip-if(xulRuntime.XPCOMABI.match(/x86_64|aarch64|ppc64|ppc64le|s390x/)) -- On 64-bit, takes forever rather than throwing /* -*- Mode: C++; tab-width: 2; 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 diff -Nru mozjs52-52.3.1/js/src/vm/Shape.cpp mozjs52-52.8.1/js/src/vm/Shape.cpp --- mozjs52-52.3.1/js/src/vm/Shape.cpp 2017-08-08 10:25:51.000000000 +0000 +++ mozjs52-52.8.1/js/src/vm/Shape.cpp 2018-06-08 12:27:11.000000000 +0000 @@ -1214,6 +1214,10 @@ RootedObject self(cx, this); + Shape* existingShape = self->ensureShape(cx); + if (!existingShape) + return false; + if (isNative() && as().inDictionaryMode()) { if (generateShape == GENERATE_SHAPE && !as().generateOwnShape(cx)) return false; @@ -1227,10 +1231,6 @@ return true; } - Shape* existingShape = self->ensureShape(cx); - if (!existingShape) - return false; - Shape* newShape = Shape::setObjectFlags(cx, flags, self->taggedProto(), existingShape); if (!newShape) return false; diff -Nru mozjs52-52.3.1/js/src/vm/StructuredClone.cpp mozjs52-52.8.1/js/src/vm/StructuredClone.cpp --- mozjs52-52.3.1/js/src/vm/StructuredClone.cpp 2017-08-08 10:25:51.000000000 +0000 +++ mozjs52-52.8.1/js/src/vm/StructuredClone.cpp 2018-06-11 16:38:18.000000000 +0000 @@ -29,6 +29,7 @@ #include "js/StructuredClone.h" +#include "mozilla/CheckedInt.h" #include "mozilla/EndianUtils.h" #include "mozilla/FloatingPoint.h" @@ -223,6 +224,10 @@ return *reinterpret_cast(mIter.Data()); } + bool canPeek() const { + return mIter.HasRoomFor(sizeof(T)); + } + BufferList& mBuffer; typename BufferList::IterImpl mIter; }; @@ -563,6 +568,7 @@ return; // Empty buffer uint32_t tag, data; + MOZ_RELEASE_ASSERT(point.canPeek()); SCInput::getPair(point.peek(), &tag, &data); point.next(); @@ -570,6 +576,7 @@ if (point.done()) return; + MOZ_RELEASE_ASSERT(point.canPeek()); SCInput::getPair(point.peek(), &tag, &data); point.next(); } @@ -589,20 +596,20 @@ uint64_t numTransferables = NativeEndian::swapFromLittleEndian(point.peek()); point.next(); while (numTransferables--) { - if (point.done()) + if (!point.canPeek()) return; uint32_t ownership; SCInput::getPair(point.peek(), &tag, &ownership); point.next(); MOZ_ASSERT(tag >= SCTAG_TRANSFER_MAP_PENDING_ENTRY); - if (point.done()) + if (!point.canPeek()) return; void* content; SCInput::getPtr(point.peek(), &content); point.next(); - if (point.done()) + if (!point.canPeek()) return; uint64_t extraData = NativeEndian::swapFromLittleEndian(point.peek()); @@ -651,7 +658,7 @@ bool SCInput::read(uint64_t* p) { - if (point.done()) { + if (!point.canPeek()) { *p = 0; /* initialize to shut GCC up */ return reportTruncated(); } @@ -663,7 +670,7 @@ bool SCInput::readNativeEndian(uint64_t* p) { - if (point.done()) { + if (!point.canPeek()) { *p = 0; /* initialize to shut GCC up */ return reportTruncated(); } @@ -687,7 +694,7 @@ bool SCInput::get(uint64_t* p) { - if (point.done()) + if (!point.canPeek()) return reportTruncated(); *p = NativeEndian::swapFromLittleEndian(point.peek()); return true; @@ -1504,10 +1511,13 @@ // grabbing out pointers from the transferables and stuffing them into the // transfer map. auto point = out.iter(); + MOZ_RELEASE_ASSERT(point.canPeek()); MOZ_ASSERT(uint32_t(NativeEndian::swapFromLittleEndian(point.peek()) >> 32) == SCTAG_HEADER); point++; + MOZ_RELEASE_ASSERT(point.canPeek()); MOZ_ASSERT(uint32_t(NativeEndian::swapFromLittleEndian(point.peek()) >> 32) == SCTAG_TRANSFER_MAP_HEADER); point++; + MOZ_RELEASE_ASSERT(point.canPeek()); MOZ_ASSERT(NativeEndian::swapFromLittleEndian(point.peek()) == transferableObjects.count()); point++; @@ -1777,6 +1787,12 @@ return false; byteOffset = n; } + if (!v.isObject() || !v.toObject().is()) { + JS_ReportErrorNumberASCII(context(), GetErrorMessage, nullptr, JSMSG_SC_BAD_SERIALIZED_DATA, + "typed array must be backed by an ArrayBuffer"); + return false; + } + RootedObject buffer(context(), &v.toObject()); RootedObject obj(context(), nullptr); @@ -1834,6 +1850,11 @@ RootedValue v(context()); if (!startRead(&v)) return false; + if (!v.isObject() || !v.toObject().is()) { + JS_ReportErrorNumberASCII(context(), GetErrorMessage, nullptr, JSMSG_SC_BAD_SERIALIZED_DATA, + "DataView must be backed by an ArrayBuffer"); + return false; + } // Read byteOffset. uint64_t n; @@ -1902,10 +1923,23 @@ JSStructuredCloneReader::readV1ArrayBuffer(uint32_t arrayType, uint32_t nelems, MutableHandleValue vp) { - MOZ_ASSERT(arrayType <= Scalar::Uint8Clamped); + if (arrayType > Scalar::Uint8Clamped) { + JS_ReportErrorNumberASCII(context(), GetErrorMessage, nullptr, JSMSG_SC_BAD_SERIALIZED_DATA, + "invalid TypedArray type"); + return false; + } - uint32_t nbytes = nelems << TypedArrayShift(static_cast(arrayType)); - JSObject* obj = ArrayBufferObject::create(context(), nbytes); + mozilla::CheckedInt nbytes = + mozilla::CheckedInt(nelems) * + TypedArrayElemSize(static_cast(arrayType)); + if (!nbytes.isValid() || nbytes.value() > UINT32_MAX) { + JS_ReportErrorNumberASCII(context(), GetErrorMessage, nullptr, + JSMSG_SC_BAD_SERIALIZED_DATA, + "invalid typed array size"); + return false; + } + + JSObject* obj = ArrayBufferObject::create(context(), nbytes.value()); if (!obj) return false; vp.setObject(*obj); @@ -2154,13 +2188,22 @@ return in.reportTruncated(); if (tag != SCTAG_HEADER) { - // Old structured clone buffer. We must have read it from disk or - // somewhere, so we can assume it's scope-compatible. + // Old structured clone buffer. We must have read it from disk. + storedScope = JS::StructuredCloneScope::DifferentProcess; return true; } MOZ_ALWAYS_TRUE(in.readPair(&tag, &data)); storedScope = JS::StructuredCloneScope(data); + + if (data != uint32_t(JS::StructuredCloneScope::SameProcessSameThread) && + data != uint32_t(JS::StructuredCloneScope::SameProcessDifferentThread) && + data != uint32_t(JS::StructuredCloneScope::DifferentProcess)) + { + JS_ReportErrorNumberASCII(context(), GetErrorMessage, nullptr, JSMSG_SC_BAD_SERIALIZED_DATA, + "invalid structured clone scope"); + return false; + } if (storedScope < allowedScope) { JS_ReportErrorNumberASCII(context(), GetErrorMessage, nullptr, JSMSG_SC_BAD_SERIALIZED_DATA, "incompatible structured clone scope"); diff -Nru mozjs52-52.3.1/js/src/wasm/AsmJS.cpp mozjs52-52.8.1/js/src/wasm/AsmJS.cpp --- mozjs52-52.3.1/js/src/wasm/AsmJS.cpp 2017-08-08 10:25:51.000000000 +0000 +++ mozjs52-52.8.1/js/src/wasm/AsmJS.cpp 2018-06-08 12:27:11.000000000 +0000 @@ -856,7 +856,7 @@ private: Which which_; union { - Value scalar_; + JS::UninitializedValue scalar_; SimdConstant simd_; } u; @@ -879,7 +879,7 @@ int32_t toInt32() const { MOZ_ASSERT(which_ == Fixnum || which_ == NegativeInt || which_ == BigUnsigned); - return u.scalar_.toInt32(); + return u.scalar_.asValueRef().toInt32(); } uint32_t toUint32() const { @@ -888,17 +888,17 @@ RawF64 toDouble() const { MOZ_ASSERT(which_ == Double); - return RawF64(u.scalar_.toDouble()); + return RawF64(u.scalar_.asValueRef().toDouble()); } RawF32 toFloat() const { MOZ_ASSERT(which_ == Float); - return RawF32(float(u.scalar_.toDouble())); + return RawF32(float(u.scalar_.asValueRef().toDouble())); } Value scalarValue() const { MOZ_ASSERT(which_ != OutOfRangeInt); - return u.scalar_; + return u.scalar_.asValueRef(); } bool isSimd() const @@ -8661,6 +8661,9 @@ case JS::AsmJSCache_Disabled_PrivateBrowsing: cacheString = "caching disabled by private browsing mode"; break; + case JS::AsmJSCache_ESR52: + cacheString = "caching disabled in Firefox ESR52"; + break; case JS::AsmJSCache_LIMIT: MOZ_CRASH("bad AsmJSCacheResult"); break; diff -Nru mozjs52-52.3.1/memory/build/replace_malloc.c mozjs52-52.8.1/memory/build/replace_malloc.c --- mozjs52-52.3.1/memory/build/replace_malloc.c 2017-08-08 10:25:53.000000000 +0000 +++ mozjs52-52.8.1/memory/build/replace_malloc.c 2018-06-08 12:27:13.000000000 +0000 @@ -513,6 +513,12 @@ */ malloc_zone_t *purgeable_zone = malloc_default_purgeable_zone(); + // There is a problem related to the above with the system nano zone, which + // is hard to work around from here, and that is instead worked around by + // disabling the nano zone through an environment variable + // (MallocNanoZone=0). In Firefox, we do that through + // browser/app/macbuild/Contents/Info.plist.in. + /* Register the custom zone. At this point it won't be the default. */ malloc_zone_register(&zone); diff -Nru mozjs52-52.3.1/mfbt/Compression.cpp mozjs52-52.8.1/mfbt/Compression.cpp --- mozjs52-52.3.1/mfbt/Compression.cpp 2017-08-08 10:25:53.000000000 +0000 +++ mozjs52-52.8.1/mfbt/Compression.cpp 2018-06-08 12:27:13.000000000 +0000 @@ -16,8 +16,12 @@ namespace { +extern "C" { + #include "lz4.c" +} + }/* anonymous namespace */ /* Our wrappers */ @@ -27,7 +31,8 @@ { CheckedInt inputSizeChecked = aInputSize; MOZ_ASSERT(inputSizeChecked.isValid()); - return LZ4_compress(aSource, aDest, inputSizeChecked.value()); + return LZ4_compress_default(aSource, aDest, inputSizeChecked.value(), + LZ4_compressBound(inputSizeChecked.value())); } size_t @@ -38,8 +43,8 @@ MOZ_ASSERT(inputSizeChecked.isValid()); CheckedInt maxOutputSizeChecked = aMaxOutputSize; MOZ_ASSERT(maxOutputSizeChecked.isValid()); - return LZ4_compress_limitedOutput(aSource, aDest, inputSizeChecked.value(), - maxOutputSizeChecked.value()); + return LZ4_compress_default(aSource, aDest, inputSizeChecked.value(), + maxOutputSizeChecked.value()); } bool diff -Nru mozjs52-52.3.1/mfbt/lz4.c mozjs52-52.8.1/mfbt/lz4.c --- mozjs52-52.3.1/mfbt/lz4.c 2017-08-08 10:25:53.000000000 +0000 +++ mozjs52-52.8.1/mfbt/lz4.c 2018-06-08 12:27:13.000000000 +0000 @@ -1,6 +1,7 @@ /* LZ4 - Fast LZ compression algorithm - Copyright (C) 2011-2014, Yann Collet. + Copyright (C) 2011-2017, Yann Collet. + BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php) Redistribution and use in source and binary forms, with or without @@ -27,118 +28,96 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. You can contact the author at : - - LZ4 source repository : http://code.google.com/p/lz4/ - - LZ4 public forum : https://groups.google.com/forum/#!forum/lz4c + - LZ4 homepage : http://www.lz4.org + - LZ4 source repository : https://github.com/lz4/lz4 */ -/************************************** - Tuning parameters + +/*-************************************ +* Tuning parameters **************************************/ /* - * HEAPMODE : + * LZ4_HEAPMODE : * Select how default compression functions will allocate memory for their hash table, - * in memory stack (0:default, fastest), or in memory heap (1:requires memory allocation (malloc)). + * in memory stack (0:default, fastest), or in memory heap (1:requires malloc()). */ -#define HEAPMODE 0 - - -/************************************** - CPU Feature Detection -**************************************/ -/* 32 or 64 bits ? */ -#if (defined(__x86_64__) || defined(_M_X64) || defined(_WIN64) \ - || defined(__powerpc64__) || defined(__powerpc64le__) \ - || defined(__ppc64__) || defined(__ppc64le__) \ - || defined(__PPC64__) || defined(__PPC64LE__) \ - || defined(__ia64) || defined(__itanium__) || defined(_M_IA64) \ - || (defined(__mips64) && defined(_ABI64))) /* Detects 64 bits mode */ -# define LZ4_ARCH64 1 -#else -# define LZ4_ARCH64 0 +#ifndef LZ4_HEAPMODE +# define LZ4_HEAPMODE 0 #endif /* - * Little Endian or Big Endian ? - * Overwrite the #define below if you know your architecture endianess + * ACCELERATION_DEFAULT : + * Select "acceleration" for LZ4_compress_fast() when parameter value <= 0 */ -#include /* Apparently required to detect endianess */ -#if defined (__GLIBC__) -# include -# if (__BYTE_ORDER == __BIG_ENDIAN) -# define LZ4_BIG_ENDIAN 1 +#define ACCELERATION_DEFAULT 1 + + +/*-************************************ +* CPU Feature Detection +**************************************/ +/* LZ4_FORCE_MEMORY_ACCESS + * By default, access to unaligned memory is controlled by `memcpy()`, which is safe and portable. + * Unfortunately, on some target/compiler combinations, the generated assembly is sub-optimal. + * The below switch allow to select different access method for improved performance. + * Method 0 (default) : use `memcpy()`. Safe and portable. + * Method 1 : `__packed` statement. It depends on compiler extension (ie, not portable). + * This method is safe if your compiler supports it, and *generally* as fast or faster than `memcpy`. + * Method 2 : direct access. This method is portable but violate C standard. + * It can generate buggy code on targets which assembly generation depends on alignment. + * But in some circumstances, it's the only known way to get the most performance (ie GCC + ARMv6) + * See https://fastcompression.blogspot.fr/2015/08/accessing-unaligned-memory.html for details. + * Prefer these methods in priority order (0 > 1 > 2) + */ +#ifndef LZ4_FORCE_MEMORY_ACCESS /* can be defined externally */ +# if defined(__GNUC__) && ( defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__) || defined(__ARM_ARCH_6T2__) ) +# define LZ4_FORCE_MEMORY_ACCESS 2 +# elif defined(__INTEL_COMPILER) || defined(__GNUC__) +# define LZ4_FORCE_MEMORY_ACCESS 1 # endif -#elif (defined(__BIG_ENDIAN__) || defined(__BIG_ENDIAN) || defined(_BIG_ENDIAN)) && !(defined(__LITTLE_ENDIAN__) || defined(__LITTLE_ENDIAN) || defined(_LITTLE_ENDIAN)) -# define LZ4_BIG_ENDIAN 1 -#elif defined(__sparc) || defined(__sparc__) \ - || defined(__powerpc__) || defined(__ppc__) || defined(__PPC__) \ - || defined(__hpux) || defined(__hppa) \ - || defined(_MIPSEB) || defined(__s390__) -# define LZ4_BIG_ENDIAN 1 -#else -/* Little Endian assumed. PDP Endian and other very rare endian format are unsupported. */ #endif /* - * Unaligned memory access is automatically enabled for "common" CPU, such as x86. - * For others CPU, such as ARM, the compiler may be more cautious, inserting unnecessary extra code to ensure aligned access property - * If you know your target CPU supports unaligned memory access, you want to force this option manually to improve performance + * LZ4_FORCE_SW_BITCOUNT + * Define this parameter if your target system or compiler does not support hardware bit count */ -#if defined(__ARM_FEATURE_UNALIGNED) -# define LZ4_FORCE_UNALIGNED_ACCESS 1 -#endif - -/* Define this parameter if your target system or compiler does not support hardware bit count */ #if defined(_MSC_VER) && defined(_WIN32_WCE) /* Visual Studio for Windows CE does not support Hardware bit count */ # define LZ4_FORCE_SW_BITCOUNT #endif -/* - * BIG_ENDIAN_NATIVE_BUT_INCOMPATIBLE : - * This option may provide a small boost to performance for some big endian cpu, although probably modest. - * You may set this option to 1 if data will remain within closed environment. - * This option is useless on Little_Endian CPU (such as x86) - */ -/* #define BIG_ENDIAN_NATIVE_BUT_INCOMPATIBLE 1 */ +/*-************************************ +* Dependency +**************************************/ +#include "lz4.h" +/* see also "memory routines" below */ -/************************************** - Compiler Options +/*-************************************ +* Compiler Options **************************************/ -#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */ -/* "restrict" is a known keyword */ -#else -# define restrict /* Disable restrict */ -#endif - #ifdef _MSC_VER /* Visual Studio */ -# define FORCE_INLINE static __forceinline -# include /* For Visual 2005 */ -# if LZ4_ARCH64 /* 64-bits */ -# pragma intrinsic(_BitScanForward64) /* For Visual 2005 */ -# pragma intrinsic(_BitScanReverse64) /* For Visual 2005 */ -# else /* 32-bits */ -# pragma intrinsic(_BitScanForward) /* For Visual 2005 */ -# pragma intrinsic(_BitScanReverse) /* For Visual 2005 */ -# endif +# include # pragma warning(disable : 4127) /* disable: C4127: conditional expression is constant */ -#else -# ifdef __GNUC__ -# define FORCE_INLINE static inline __attribute__((always_inline)) -# else -# define FORCE_INLINE static inline -# endif -#endif - -#ifdef _MSC_VER /* Visual Studio */ -# define lz4_bswap16(x) _byteswap_ushort(x) -#else -# define lz4_bswap16(x) ((unsigned short int) ((((x) >> 8) & 0xffu) | (((x) & 0xffu) << 8))) -#endif +# pragma warning(disable : 4293) /* disable: C4293: too large shift (32-bits) */ +#endif /* _MSC_VER */ -#define GCC_VERSION (__GNUC__ * 100 + __GNUC_MINOR__) +#ifndef FORCE_INLINE +# ifdef _MSC_VER /* Visual Studio */ +# define FORCE_INLINE static __forceinline +# else +# if defined (__cplusplus) || defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 */ +# ifdef __GNUC__ +# define FORCE_INLINE static inline __attribute__((always_inline)) +# else +# define FORCE_INLINE static inline +# endif +# else +# define FORCE_INLINE static +# endif /* __STDC_VERSION__ */ +# endif /* _MSC_VER */ +#endif /* FORCE_INLINE */ -#if (GCC_VERSION >= 302) || (__INTEL_COMPILER >= 800) || defined(__clang__) +#if (defined(__GNUC__) && (__GNUC__ >= 3)) || (defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 800)) || defined(__clang__) # define expect(expr,value) (__builtin_expect ((expr),(value)) ) #else # define expect(expr,value) (expr) @@ -148,8 +127,8 @@ #define unlikely(expr) expect((expr) != 0, 0) -/************************************** - Memory routines +/*-************************************ +* Memory routines **************************************/ #include /* malloc, calloc, free */ #define ALLOCATOR(n,s) calloc(n,s) @@ -158,84 +137,146 @@ #define MEM_INIT memset -/************************************** - Includes -**************************************/ -#include "lz4.h" - - -/************************************** - Basic Types +/*-************************************ +* Basic Types **************************************/ -#if defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */ +#if defined(__cplusplus) || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */) # include typedef uint8_t BYTE; typedef uint16_t U16; typedef uint32_t U32; typedef int32_t S32; typedef uint64_t U64; + typedef uintptr_t uptrval; #else typedef unsigned char BYTE; typedef unsigned short U16; typedef unsigned int U32; typedef signed int S32; typedef unsigned long long U64; + typedef size_t uptrval; /* generally true, except OpenVMS-64 */ #endif -#if defined(__GNUC__) && !defined(LZ4_FORCE_UNALIGNED_ACCESS) -# define _PACKED __attribute__ ((packed)) +#if defined(__x86_64__) + typedef U64 reg_t; /* 64-bits in x32 mode */ #else -# define _PACKED + typedef size_t reg_t; /* 32-bits in x32 mode */ #endif -#if !defined(LZ4_FORCE_UNALIGNED_ACCESS) && !defined(__GNUC__) -# if defined(__IBMC__) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) -# pragma pack(1) -# else -# pragma pack(push, 1) -# endif -#endif +/*-************************************ +* Reading and writing into memory +**************************************/ +static unsigned LZ4_isLittleEndian(void) +{ + const union { U32 u; BYTE c[4]; } one = { 1 }; /* don't use static : performance detrimental */ + return one.c[0]; +} -typedef struct { U16 v; } _PACKED U16_S; -typedef struct { U32 v; } _PACKED U32_S; -typedef struct { U64 v; } _PACKED U64_S; -typedef struct {size_t v;} _PACKED size_t_S; - -#if !defined(LZ4_FORCE_UNALIGNED_ACCESS) && !defined(__GNUC__) -# if defined(__SUNPRO_C) || defined(__SUNPRO_CC) -# pragma pack(0) -# else -# pragma pack(pop) -# endif -#endif -#define A16(x) (((U16_S *)(x))->v) -#define A32(x) (((U32_S *)(x))->v) -#define A64(x) (((U64_S *)(x))->v) -#define AARCH(x) (((size_t_S *)(x))->v) +#if defined(LZ4_FORCE_MEMORY_ACCESS) && (LZ4_FORCE_MEMORY_ACCESS==2) +/* lie to the compiler about data alignment; use with caution */ +static U16 LZ4_read16(const void* memPtr) { return *(const U16*) memPtr; } +static U32 LZ4_read32(const void* memPtr) { return *(const U32*) memPtr; } +static reg_t LZ4_read_ARCH(const void* memPtr) { return *(const reg_t*) memPtr; } -/************************************** - Constants -**************************************/ -#define LZ4_HASHLOG (LZ4_MEMORY_USAGE-2) -#define HASHTABLESIZE (1 << LZ4_MEMORY_USAGE) -#define HASH_SIZE_U32 (1 << LZ4_HASHLOG) +static void LZ4_write16(void* memPtr, U16 value) { *(U16*)memPtr = value; } +static void LZ4_write32(void* memPtr, U32 value) { *(U32*)memPtr = value; } + +#elif defined(LZ4_FORCE_MEMORY_ACCESS) && (LZ4_FORCE_MEMORY_ACCESS==1) + +/* __pack instructions are safer, but compiler specific, hence potentially problematic for some compilers */ +/* currently only defined for gcc and icc */ +typedef union { U16 u16; U32 u32; reg_t uArch; } __attribute__((packed)) unalign; + +static U16 LZ4_read16(const void* ptr) { return ((const unalign*)ptr)->u16; } +static U32 LZ4_read32(const void* ptr) { return ((const unalign*)ptr)->u32; } +static reg_t LZ4_read_ARCH(const void* ptr) { return ((const unalign*)ptr)->uArch; } + +static void LZ4_write16(void* memPtr, U16 value) { ((unalign*)memPtr)->u16 = value; } +static void LZ4_write32(void* memPtr, U32 value) { ((unalign*)memPtr)->u32 = value; } + +#else /* safe and portable access through memcpy() */ +static U16 LZ4_read16(const void* memPtr) +{ + U16 val; memcpy(&val, memPtr, sizeof(val)); return val; +} + +static U32 LZ4_read32(const void* memPtr) +{ + U32 val; memcpy(&val, memPtr, sizeof(val)); return val; +} + +static reg_t LZ4_read_ARCH(const void* memPtr) +{ + reg_t val; memcpy(&val, memPtr, sizeof(val)); return val; +} + +static void LZ4_write16(void* memPtr, U16 value) +{ + memcpy(memPtr, &value, sizeof(value)); +} + +static void LZ4_write32(void* memPtr, U32 value) +{ + memcpy(memPtr, &value, sizeof(value)); +} + +#endif /* LZ4_FORCE_MEMORY_ACCESS */ + + +static U16 LZ4_readLE16(const void* memPtr) +{ + if (LZ4_isLittleEndian()) { + return LZ4_read16(memPtr); + } else { + const BYTE* p = (const BYTE*)memPtr; + return (U16)((U16)p[0] + (p[1]<<8)); + } +} + +static void LZ4_writeLE16(void* memPtr, U16 value) +{ + if (LZ4_isLittleEndian()) { + LZ4_write16(memPtr, value); + } else { + BYTE* p = (BYTE*)memPtr; + p[0] = (BYTE) value; + p[1] = (BYTE)(value>>8); + } +} + +static void LZ4_copy8(void* dst, const void* src) +{ + memcpy(dst,src,8); +} + +/* customized variant of memcpy, which can overwrite up to 8 bytes beyond dstEnd */ +static void LZ4_wildCopy(void* dstPtr, const void* srcPtr, void* dstEnd) +{ + BYTE* d = (BYTE*)dstPtr; + const BYTE* s = (const BYTE*)srcPtr; + BYTE* const e = (BYTE*)dstEnd; + + do { LZ4_copy8(d,s); d+=8; s+=8; } while (d=2) +# include +# define DEBUGLOG(l, ...) { \ + if (l<=LZ4_DEBUG) { \ + fprintf(stderr, __FILE__ ": "); \ + fprintf(stderr, __VA_ARGS__); \ + fprintf(stderr, " \n"); \ + } } +#else +# define DEBUGLOG(l, ...) {} /* disabled */ +#endif -typedef enum { noDict = 0, withPrefix64k, usingExtDict } dict_directive; -typedef enum { noDictIssue = 0, dictSmall } dictIssue_directive; -typedef enum { endOnOutputSize = 0, endOnInputSize = 1 } endCondition_directive; -typedef enum { full = 0, partial = 1 } earlyEnd_directive; +/*-************************************ +* Common functions +**************************************/ +static unsigned LZ4_NbCommonBytes (register reg_t val) +{ + if (LZ4_isLittleEndian()) { + if (sizeof(val)==8) { +# if defined(_MSC_VER) && defined(_WIN64) && !defined(LZ4_FORCE_SW_BITCOUNT) + unsigned long r = 0; + _BitScanForward64( &r, (U64)val ); + return (int)(r>>3); +# elif (defined(__clang__) || (defined(__GNUC__) && (__GNUC__>=3))) && !defined(LZ4_FORCE_SW_BITCOUNT) + return (__builtin_ctzll((U64)val) >> 3); +# else + static const int DeBruijnBytePos[64] = { 0, 0, 0, 0, 0, 1, 1, 2, 0, 3, 1, 3, 1, 4, 2, 7, 0, 2, 3, 6, 1, 5, 3, 5, 1, 3, 4, 4, 2, 5, 6, 7, 7, 0, 1, 2, 3, 3, 4, 6, 2, 6, 5, 5, 3, 4, 5, 6, 7, 1, 2, 4, 6, 4, 4, 5, 7, 2, 6, 5, 7, 6, 7, 7 }; + return DeBruijnBytePos[((U64)((val & -(long long)val) * 0x0218A392CDABBD3FULL)) >> 58]; +# endif + } else /* 32 bits */ { +# if defined(_MSC_VER) && !defined(LZ4_FORCE_SW_BITCOUNT) + unsigned long r; + _BitScanForward( &r, (U32)val ); + return (int)(r>>3); +# elif (defined(__clang__) || (defined(__GNUC__) && (__GNUC__>=3))) && !defined(LZ4_FORCE_SW_BITCOUNT) + return (__builtin_ctz((U32)val) >> 3); +# else + static const int DeBruijnBytePos[32] = { 0, 0, 3, 0, 3, 1, 3, 0, 3, 2, 2, 1, 3, 2, 0, 1, 3, 3, 1, 2, 2, 2, 2, 0, 3, 1, 2, 0, 1, 0, 1, 1 }; + return DeBruijnBytePos[((U32)((val & -(S32)val) * 0x077CB531U)) >> 27]; +# endif + } + } else /* Big Endian CPU */ { + if (sizeof(val)==8) { +# if defined(_MSC_VER) && defined(_WIN64) && !defined(LZ4_FORCE_SW_BITCOUNT) + unsigned long r = 0; + _BitScanReverse64( &r, val ); + return (unsigned)(r>>3); +# elif (defined(__clang__) || (defined(__GNUC__) && (__GNUC__>=3))) && !defined(LZ4_FORCE_SW_BITCOUNT) + return (__builtin_clzll((U64)val) >> 3); +# else + unsigned r; + if (!(val>>32)) { r=4; } else { r=0; val>>=32; } + if (!(val>>16)) { r+=2; val>>=8; } else { val>>=24; } + r += (!val); + return r; +# endif + } else /* 32 bits */ { +# if defined(_MSC_VER) && !defined(LZ4_FORCE_SW_BITCOUNT) + unsigned long r = 0; + _BitScanReverse( &r, (unsigned long)val ); + return (unsigned)(r>>3); +# elif (defined(__clang__) || (defined(__GNUC__) && (__GNUC__>=3))) && !defined(LZ4_FORCE_SW_BITCOUNT) + return (__builtin_clz((U32)val) >> 3); +# else + unsigned r; + if (!(val>>16)) { r=2; val>>=8; } else { r=0; val>>=24; } + r += (!val); + return r; +# endif + } + } +} +#define STEPSIZE sizeof(reg_t) +static unsigned LZ4_count(const BYTE* pIn, const BYTE* pMatch, const BYTE* pInLimit) +{ + const BYTE* const pStart = pIn; -/************************************** - Architecture-specific macros -**************************************/ -#define STEPSIZE sizeof(size_t) -#define LZ4_COPYSTEP(d,s) { AARCH(d) = AARCH(s); d+=STEPSIZE; s+=STEPSIZE; } -#define LZ4_COPY8(d,s) { LZ4_COPYSTEP(d,s); if (STEPSIZE<8) LZ4_COPYSTEP(d,s); } - -#if (defined(LZ4_BIG_ENDIAN) && !defined(BIG_ENDIAN_NATIVE_BUT_INCOMPATIBLE)) -# define LZ4_READ_LITTLEENDIAN_16(d,s,p) { U16 v = A16(p); v = lz4_bswap16(v); d = (s) - v; } -# define LZ4_WRITE_LITTLEENDIAN_16(p,i) { U16 v = (U16)(i); v = lz4_bswap16(v); A16(p) = v; p+=2; } -#else /* Little Endian */ -# define LZ4_READ_LITTLEENDIAN_16(d,s,p) { d = (s) - A16(p); } -# define LZ4_WRITE_LITTLEENDIAN_16(p,v) { A16(p) = v; p+=2; } -#endif + while (likely(pIn=e; */ -#else -# define LZ4_WILDCOPY(d,s,e) { if (likely(e-d <= 8)) LZ4_COPY8(d,s) else do { LZ4_COPY8(d,s) } while (d compression run slower on incompressible data */ -/**************************** - Private local functions -****************************/ -#if LZ4_ARCH64 - -int LZ4_NbCommonBytes (register U64 val) -{ -# if defined(LZ4_BIG_ENDIAN) -# if defined(_MSC_VER) && !defined(LZ4_FORCE_SW_BITCOUNT) - unsigned long r = 0; - _BitScanReverse64( &r, val ); - return (int)(r>>3); -# elif defined(__GNUC__) && (GCC_VERSION >= 304) && !defined(LZ4_FORCE_SW_BITCOUNT) - return (__builtin_clzll(val) >> 3); -# else - int r; - if (!(val>>32)) { r=4; } else { r=0; val>>=32; } - if (!(val>>16)) { r+=2; val>>=8; } else { val>>=24; } - r += (!val); - return r; -# endif -# else -# if defined(_MSC_VER) && !defined(LZ4_FORCE_SW_BITCOUNT) - unsigned long r = 0; - _BitScanForward64( &r, val ); - return (int)(r>>3); -# elif defined(__GNUC__) && (GCC_VERSION >= 304) && !defined(LZ4_FORCE_SW_BITCOUNT) - return (__builtin_ctzll(val) >> 3); -# else - static const int DeBruijnBytePos[64] = { 0, 0, 0, 0, 0, 1, 1, 2, 0, 3, 1, 3, 1, 4, 2, 7, 0, 2, 3, 6, 1, 5, 3, 5, 1, 3, 4, 4, 2, 5, 6, 7, 7, 0, 1, 2, 3, 3, 4, 6, 2, 6, 5, 5, 3, 4, 5, 6, 7, 1, 2, 4, 6, 4, 4, 5, 7, 2, 6, 5, 7, 6, 7, 7 }; - return DeBruijnBytePos[((U64)((val & -(long long)val) * 0x0218A392CDABBD3FULL)) >> 58]; -# endif -# endif -} -#else +/*-************************************ +* Local Structures and types +**************************************/ +typedef enum { notLimited = 0, limitedOutput = 1 } limitedOutput_directive; +typedef enum { byPtr, byU32, byU16 } tableType_t; -int LZ4_NbCommonBytes (register U32 val) -{ -# if defined(LZ4_BIG_ENDIAN) -# if defined(_MSC_VER) && !defined(LZ4_FORCE_SW_BITCOUNT) - unsigned long r = 0; - _BitScanReverse( &r, val ); - return (int)(r>>3); -# elif defined(__GNUC__) && (GCC_VERSION >= 304) && !defined(LZ4_FORCE_SW_BITCOUNT) - return (__builtin_clz(val) >> 3); -# else - int r; - if (!(val>>16)) { r=2; val>>=8; } else { r=0; val>>=24; } - r += (!val); - return r; -# endif -# else -# if defined(_MSC_VER) && !defined(LZ4_FORCE_SW_BITCOUNT) - unsigned long r; - _BitScanForward( &r, val ); - return (int)(r>>3); -# elif defined(__GNUC__) && (GCC_VERSION >= 304) && !defined(LZ4_FORCE_SW_BITCOUNT) - return (__builtin_ctz(val) >> 3); -# else - static const int DeBruijnBytePos[32] = { 0, 0, 3, 0, 3, 1, 3, 0, 3, 2, 2, 1, 3, 2, 0, 1, 3, 3, 1, 2, 2, 2, 2, 0, 3, 1, 2, 0, 1, 0, 1, 1 }; - return DeBruijnBytePos[((U32)((val & -(S32)val) * 0x077CB531U)) >> 27]; -# endif -# endif -} +typedef enum { noDict = 0, withPrefix64k, usingExtDict } dict_directive; +typedef enum { noDictIssue = 0, dictSmall } dictIssue_directive; -#endif +typedef enum { endOnOutputSize = 0, endOnInputSize = 1 } endCondition_directive; +typedef enum { full = 0, partial = 1 } earlyEnd_directive; -/******************************** - Compression functions -********************************/ +/*-************************************ +* Local Utils +**************************************/ +int LZ4_versionNumber (void) { return LZ4_VERSION_NUMBER; } +const char* LZ4_versionString(void) { return LZ4_VERSION_STRING; } int LZ4_compressBound(int isize) { return LZ4_COMPRESSBOUND(isize); } +int LZ4_sizeofState() { return LZ4_STREAMSIZE; } + -static int LZ4_hashSequence(U32 sequence, tableType_t tableType) +/*-****************************** +* Compression functions +********************************/ +static U32 LZ4_hash4(U32 sequence, tableType_t const tableType) { if (tableType == byU16) - return (((sequence) * 2654435761U) >> ((MINMATCH*8)-(LZ4_HASHLOG+1))); + return ((sequence * 2654435761U) >> ((MINMATCH*8)-(LZ4_HASHLOG+1))); else - return (((sequence) * 2654435761U) >> ((MINMATCH*8)-LZ4_HASHLOG)); + return ((sequence * 2654435761U) >> ((MINMATCH*8)-LZ4_HASHLOG)); } -static int LZ4_hashPosition(const BYTE* p, tableType_t tableType) { return LZ4_hashSequence(A32(p), tableType); } +static U32 LZ4_hash5(U64 sequence, tableType_t const tableType) +{ + static const U64 prime5bytes = 889523592379ULL; + static const U64 prime8bytes = 11400714785074694791ULL; + const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; + if (LZ4_isLittleEndian()) + return (U32)(((sequence << 24) * prime5bytes) >> (64 - hashLog)); + else + return (U32)(((sequence >> 24) * prime8bytes) >> (64 - hashLog)); +} -static void LZ4_putPositionOnHash(const BYTE* p, U32 h, void* tableBase, tableType_t tableType, const BYTE* srcBase) +FORCE_INLINE U32 LZ4_hashPosition(const void* const p, tableType_t const tableType) +{ + if ((sizeof(reg_t)==8) && (tableType != byU16)) return LZ4_hash5(LZ4_read_ARCH(p), tableType); + return LZ4_hash4(LZ4_read32(p), tableType); +} + +static void LZ4_putPositionOnHash(const BYTE* p, U32 h, void* tableBase, tableType_t const tableType, const BYTE* srcBase) { switch (tableType) { - case byPtr: { const BYTE** hashTable = (const BYTE**) tableBase; hashTable[h] = p; break; } - case byU32: { U32* hashTable = (U32*) tableBase; hashTable[h] = (U32)(p-srcBase); break; } - case byU16: { U16* hashTable = (U16*) tableBase; hashTable[h] = (U16)(p-srcBase); break; } + case byPtr: { const BYTE** hashTable = (const BYTE**)tableBase; hashTable[h] = p; return; } + case byU32: { U32* hashTable = (U32*) tableBase; hashTable[h] = (U32)(p-srcBase); return; } + case byU16: { U16* hashTable = (U16*) tableBase; hashTable[h] = (U16)(p-srcBase); return; } } } -static void LZ4_putPosition(const BYTE* p, void* tableBase, tableType_t tableType, const BYTE* srcBase) +FORCE_INLINE void LZ4_putPosition(const BYTE* p, void* tableBase, tableType_t tableType, const BYTE* srcBase) { - U32 h = LZ4_hashPosition(p, tableType); + U32 const h = LZ4_hashPosition(p, tableType); LZ4_putPositionOnHash(p, h, tableBase, tableType, srcBase); } static const BYTE* LZ4_getPositionOnHash(U32 h, void* tableBase, tableType_t tableType, const BYTE* srcBase) { if (tableType == byPtr) { const BYTE** hashTable = (const BYTE**) tableBase; return hashTable[h]; } - if (tableType == byU32) { U32* hashTable = (U32*) tableBase; return hashTable[h] + srcBase; } - { U16* hashTable = (U16*) tableBase; return hashTable[h] + srcBase; } /* default, to ensure a return */ + if (tableType == byU32) { const U32* const hashTable = (U32*) tableBase; return hashTable[h] + srcBase; } + { const U16* const hashTable = (U16*) tableBase; return hashTable[h] + srcBase; } /* default, to ensure a return */ } -static const BYTE* LZ4_getPosition(const BYTE* p, void* tableBase, tableType_t tableType, const BYTE* srcBase) +FORCE_INLINE const BYTE* LZ4_getPosition(const BYTE* p, void* tableBase, tableType_t tableType, const BYTE* srcBase) { - U32 h = LZ4_hashPosition(p, tableType); + U32 const h = LZ4_hashPosition(p, tableType); return LZ4_getPositionOnHash(h, tableBase, tableType, srcBase); } -static unsigned LZ4_count(const BYTE* pIn, const BYTE* pRef, const BYTE* pInLimit) -{ - const BYTE* const pStart = pIn; - - while (likely(pIndictSize; - const BYTE* const dictionary = dictPtr->dictionary; - const BYTE* const dictEnd = dictionary + dictPtr->dictSize; - const size_t dictDelta = dictEnd - (const BYTE*)source; + const BYTE* const lowRefLimit = ip - cctx->dictSize; + const BYTE* const dictionary = cctx->dictionary; + const BYTE* const dictEnd = dictionary + cctx->dictSize; + const ptrdiff_t dictDelta = dictEnd - (const BYTE*)source; const BYTE* anchor = (const BYTE*) source; const BYTE* const iend = ip + inputSize; const BYTE* const mflimit = iend - MFLIMIT; @@ -455,12 +501,10 @@ BYTE* op = (BYTE*) dest; BYTE* const olimit = op + maxOutputSize; - const int skipStrength = SKIPSTRENGTH; U32 forwardH; - size_t refDelta=0; /* Init conditions */ - if ((U32)inputSize > (U32)LZ4_MAX_INPUT_SIZE) return 0; /* Unsupported input size, too large (or negative) */ + if ((U32)inputSize > (U32)LZ4_MAX_INPUT_SIZE) return 0; /* Unsupported inputSize, too large (or negative) */ switch(dict) { case noDict: @@ -469,125 +513,118 @@ lowLimit = (const BYTE*)source; break; case withPrefix64k: - base = (const BYTE*)source - dictPtr->currentOffset; - lowLimit = (const BYTE*)source - dictPtr->dictSize; + base = (const BYTE*)source - cctx->currentOffset; + lowLimit = (const BYTE*)source - cctx->dictSize; break; case usingExtDict: - base = (const BYTE*)source - dictPtr->currentOffset; + base = (const BYTE*)source - cctx->currentOffset; lowLimit = (const BYTE*)source; break; } - if ((tableType == byU16) && (inputSize>=(int)LZ4_64KLIMIT)) return 0; /* Size too large (not within 64K limit) */ - if (inputSize=LZ4_64Klimit)) return 0; /* Size too large (not within 64K limit) */ + if (inputSizehashTable, tableType, base); ip++; forwardH = LZ4_hashPosition(ip, tableType); /* Main Loop */ - for ( ; ; ) - { - const BYTE* ref; + for ( ; ; ) { + ptrdiff_t refDelta = 0; + const BYTE* match; BYTE* token; - { - const BYTE* forwardIp = ip; - unsigned step=1; - unsigned searchMatchNb = (1U << skipStrength); - /* Find a match */ + /* Find a match */ + { const BYTE* forwardIp = ip; + unsigned step = 1; + unsigned searchMatchNb = acceleration << LZ4_skipTrigger; do { - U32 h = forwardH; + U32 const h = forwardH; ip = forwardIp; forwardIp += step; - step = searchMatchNb++ >> skipStrength; - //if (step>8) step=8; // required for valid forwardIp ; slows down uncompressible data a bit + step = (searchMatchNb++ >> LZ4_skipTrigger); if (unlikely(forwardIp > mflimit)) goto _last_literals; - ref = LZ4_getPositionOnHash(h, ctx, tableType, base); - if (dict==usingExtDict) - { - if (ref<(const BYTE*)source) - { + match = LZ4_getPositionOnHash(h, cctx->hashTable, tableType, base); + if (dict==usingExtDict) { + if (match < (const BYTE*)source) { refDelta = dictDelta; lowLimit = dictionary; - } - else - { + } else { refDelta = 0; lowLimit = (const BYTE*)source; - } - } + } } forwardH = LZ4_hashPosition(forwardIp, tableType); - LZ4_putPositionOnHash(ip, h, ctx, tableType, base); + LZ4_putPositionOnHash(ip, h, cctx->hashTable, tableType, base); - } while ( ((dictIssue==dictSmall) ? (ref < lowRefLimit) : 0) - || ((tableType==byU16) ? 0 : (ref + MAX_DISTANCE < ip)) - || (A32(ref+refDelta) != A32(ip)) ); + } while ( ((dictIssue==dictSmall) ? (match < lowRefLimit) : 0) + || ((tableType==byU16) ? 0 : (match + MAX_DISTANCE < ip)) + || (LZ4_read32(match+refDelta) != LZ4_read32(ip)) ); } /* Catch up */ - while ((ip>anchor) && (ref+refDelta > lowLimit) && (unlikely(ip[-1]==ref[refDelta-1]))) { ip--; ref--; } + while (((ip>anchor) & (match+refDelta > lowLimit)) && (unlikely(ip[-1]==match[refDelta-1]))) { ip--; match--; } - { - /* Encode Literal length */ - unsigned litLength = (unsigned)(ip - anchor); + /* Encode Literals */ + { unsigned const litLength = (unsigned)(ip - anchor); token = op++; - if ((outputLimited) && (unlikely(op + litLength + (2 + 1 + LASTLITERALS) + (litLength/255) > olimit))) - return 0; /* Check output limit */ - if (litLength>=RUN_MASK) - { + if ((outputLimited) && /* Check output buffer overflow */ + (unlikely(op + litLength + (2 + 1 + LASTLITERALS) + (litLength/255) > olimit))) + return 0; + if (litLength >= RUN_MASK) { int len = (int)litLength-RUN_MASK; - *token=(RUN_MASK<= 255 ; len-=255) *op++ = 255; *op++ = (BYTE)len; } else *token = (BYTE)(litLength< matchlimit) limit = matchlimit; - matchLength = LZ4_count(ip+MINMATCH, ref+MINMATCH, limit); - ip += MINMATCH + matchLength; - if (ip==limit) - { - unsigned more = LZ4_count(ip, (const BYTE*)source, matchlimit); - matchLength += more; + matchCode = LZ4_count(ip+MINMATCH, match+MINMATCH, limit); + ip += MINMATCH + matchCode; + if (ip==limit) { + unsigned const more = LZ4_count(ip, (const BYTE*)source, matchlimit); + matchCode += more; ip += more; } - } - else - { - matchLength = LZ4_count(ip+MINMATCH, ref+MINMATCH, matchlimit); - ip += MINMATCH + matchLength; + } else { + matchCode = LZ4_count(ip+MINMATCH, match+MINMATCH, matchlimit); + ip += MINMATCH + matchCode; } - if (matchLength>=ML_MASK) - { - if ((outputLimited) && (unlikely(op + (1 + LASTLITERALS) + (matchLength>>8) > olimit))) - return 0; /* Check output limit */ + if ( outputLimited && /* Check output buffer overflow */ + (unlikely(op + (1 + LASTLITERALS) + (matchCode>>8) > olimit)) ) + return 0; + if (matchCode >= ML_MASK) { *token += ML_MASK; - matchLength -= ML_MASK; - for (; matchLength >= 510 ; matchLength-=510) { *op++ = 255; *op++ = 255; } - if (matchLength >= 255) { matchLength-=255; *op++ = 255; } - *op++ = (BYTE)matchLength; - } - else *token += (BYTE)(matchLength); + matchCode -= ML_MASK; + LZ4_write32(op, 0xFFFFFFFF); + while (matchCode >= 4*255) { + op+=4; + LZ4_write32(op, 0xFFFFFFFF); + matchCode -= 4*255; + } + op += matchCode / 255; + *op++ = (BYTE)(matchCode % 255); + } else + *token += (BYTE)(matchCode); } anchor = ip; @@ -596,27 +633,22 @@ if (ip > mflimit) break; /* Fill table */ - LZ4_putPosition(ip-2, ctx, tableType, base); + LZ4_putPosition(ip-2, cctx->hashTable, tableType, base); /* Test next position */ - ref = LZ4_getPosition(ip, ctx, tableType, base); - if (dict==usingExtDict) - { - if (ref<(const BYTE*)source) - { + match = LZ4_getPosition(ip, cctx->hashTable, tableType, base); + if (dict==usingExtDict) { + if (match < (const BYTE*)source) { refDelta = dictDelta; lowLimit = dictionary; - } - else - { + } else { refDelta = 0; lowLimit = (const BYTE*)source; - } - } - LZ4_putPosition(ip, ctx, tableType, base); - if ( ((dictIssue==dictSmall) ? (ref>=lowRefLimit) : 1) - && (ref+MAX_DISTANCE>=ip) - && (A32(ref+refDelta)==A32(ip)) ) + } } + LZ4_putPosition(ip, cctx->hashTable, tableType, base); + if ( ((dictIssue==dictSmall) ? (match>=lowRefLimit) : 1) + && (match+MAX_DISTANCE>=ip) + && (LZ4_read32(match+refDelta)==LZ4_read32(ip)) ) { token=op++; *token=0; goto _next_match; } /* Prepare next loop */ @@ -625,14 +657,20 @@ _last_literals: /* Encode Last Literals */ - { - int lastRun = (int)(iend - anchor); - if ((outputLimited) && (((char*)op - dest) + lastRun + 1 + ((lastRun+255-RUN_MASK)/255) > (U32)maxOutputSize)) - return 0; /* Check output limit */ - if (lastRun>=(int)RUN_MASK) { *op++=(RUN_MASK<= 255 ; lastRun-=255) *op++ = 255; *op++ = (BYTE) lastRun; } - else *op++ = (BYTE)(lastRun< (U32)maxOutputSize) ) + return 0; + if (lastRun >= RUN_MASK) { + size_t accumulator = lastRun - RUN_MASK; + *op++ = RUN_MASK << ML_BITS; + for(; accumulator >= 255 ; accumulator-=255) *op++ = 255; + *op++ = (BYTE) accumulator; + } else { + *op++ = (BYTE)(lastRun<internal_donotuse; + LZ4_resetStream((LZ4_stream_t*)state); + if (acceleration < 1) acceleration = ACCELERATION_DEFAULT; + + if (maxOutputSize >= LZ4_compressBound(inputSize)) { + if (inputSize < LZ4_64Klimit) + return LZ4_compress_generic(ctx, source, dest, inputSize, 0, notLimited, byU16, noDict, noDictIssue, acceleration); + else + return LZ4_compress_generic(ctx, source, dest, inputSize, 0, notLimited, (sizeof(void*)==8) ? byU32 : byPtr, noDict, noDictIssue, acceleration); + } else { + if (inputSize < LZ4_64Klimit) + return LZ4_compress_generic(ctx, source, dest, inputSize, maxOutputSize, limitedOutput, byU16, noDict, noDictIssue, acceleration); + else + return LZ4_compress_generic(ctx, source, dest, inputSize, maxOutputSize, limitedOutput, (sizeof(void*)==8) ? byU32 : byPtr, noDict, noDictIssue, acceleration); + } +} + + +int LZ4_compress_fast(const char* source, char* dest, int inputSize, int maxOutputSize, int acceleration) +{ +#if (LZ4_HEAPMODE) + void* ctxPtr = ALLOCATOR(1, sizeof(LZ4_stream_t)); /* malloc-calloc always properly aligned */ #else - U32 ctx[LZ4_STREAMSIZE_U32] = {0}; /* Ensure data is aligned on 4-bytes boundaries */ + LZ4_stream_t ctx; + void* const ctxPtr = &ctx; #endif - int result; - if (inputSize < (int)LZ4_64KLIMIT) - result = LZ4_compress_generic((void*)ctx, source, dest, inputSize, 0, notLimited, byU16, noDict, noDictIssue); - else - result = LZ4_compress_generic((void*)ctx, source, dest, inputSize, 0, notLimited, (sizeof(void*)==8) ? byU32 : byPtr, noDict, noDictIssue); + int const result = LZ4_compress_fast_extState(ctxPtr, source, dest, inputSize, maxOutputSize, acceleration); -#if (HEAPMODE) - FREEMEM(ctx); +#if (LZ4_HEAPMODE) + FREEMEM(ctxPtr); #endif return result; } -int LZ4_compress_limitedOutput(const char* source, char* dest, int inputSize, int maxOutputSize) + +int LZ4_compress_default(const char* source, char* dest, int inputSize, int maxOutputSize) +{ + return LZ4_compress_fast(source, dest, inputSize, maxOutputSize, 1); +} + + +/* hidden debug function */ +/* strangely enough, gcc generates faster code when this function is uncommented, even if unused */ +int LZ4_compress_fast_force(const char* source, char* dest, int inputSize, int maxOutputSize, int acceleration) +{ + LZ4_stream_t ctx; + LZ4_resetStream(&ctx); + + if (inputSize < LZ4_64Klimit) + return LZ4_compress_generic(&ctx.internal_donotuse, source, dest, inputSize, maxOutputSize, limitedOutput, byU16, noDict, noDictIssue, acceleration); + else + return LZ4_compress_generic(&ctx.internal_donotuse, source, dest, inputSize, maxOutputSize, limitedOutput, sizeof(void*)==8 ? byU32 : byPtr, noDict, noDictIssue, acceleration); +} + + +/*-****************************** +* *_destSize() variant +********************************/ + +static int LZ4_compress_destSize_generic( + LZ4_stream_t_internal* const ctx, + const char* const src, + char* const dst, + int* const srcSizePtr, + const int targetDstSize, + const tableType_t tableType) +{ + const BYTE* ip = (const BYTE*) src; + const BYTE* base = (const BYTE*) src; + const BYTE* lowLimit = (const BYTE*) src; + const BYTE* anchor = ip; + const BYTE* const iend = ip + *srcSizePtr; + const BYTE* const mflimit = iend - MFLIMIT; + const BYTE* const matchlimit = iend - LASTLITERALS; + + BYTE* op = (BYTE*) dst; + BYTE* const oend = op + targetDstSize; + BYTE* const oMaxLit = op + targetDstSize - 2 /* offset */ - 8 /* because 8+MINMATCH==MFLIMIT */ - 1 /* token */; + BYTE* const oMaxMatch = op + targetDstSize - (LASTLITERALS + 1 /* token */); + BYTE* const oMaxSeq = oMaxLit - 1 /* token */; + + U32 forwardH; + + + /* Init conditions */ + if (targetDstSize < 1) return 0; /* Impossible to store anything */ + if ((U32)*srcSizePtr > (U32)LZ4_MAX_INPUT_SIZE) return 0; /* Unsupported input size, too large (or negative) */ + if ((tableType == byU16) && (*srcSizePtr>=LZ4_64Klimit)) return 0; /* Size too large (not within 64K limit) */ + if (*srcSizePtrhashTable, tableType, base); + ip++; forwardH = LZ4_hashPosition(ip, tableType); + + /* Main Loop */ + for ( ; ; ) { + const BYTE* match; + BYTE* token; + + /* Find a match */ + { const BYTE* forwardIp = ip; + unsigned step = 1; + unsigned searchMatchNb = 1 << LZ4_skipTrigger; + + do { + U32 h = forwardH; + ip = forwardIp; + forwardIp += step; + step = (searchMatchNb++ >> LZ4_skipTrigger); + + if (unlikely(forwardIp > mflimit)) goto _last_literals; + + match = LZ4_getPositionOnHash(h, ctx->hashTable, tableType, base); + forwardH = LZ4_hashPosition(forwardIp, tableType); + LZ4_putPositionOnHash(ip, h, ctx->hashTable, tableType, base); + + } while ( ((tableType==byU16) ? 0 : (match + MAX_DISTANCE < ip)) + || (LZ4_read32(match) != LZ4_read32(ip)) ); + } + + /* Catch up */ + while ((ip>anchor) && (match > lowLimit) && (unlikely(ip[-1]==match[-1]))) { ip--; match--; } + + /* Encode Literal length */ + { unsigned litLength = (unsigned)(ip - anchor); + token = op++; + if (op + ((litLength+240)/255) + litLength > oMaxLit) { + /* Not enough space for a last match */ + op--; + goto _last_literals; + } + if (litLength>=RUN_MASK) { + unsigned len = litLength - RUN_MASK; + *token=(RUN_MASK<= 255 ; len-=255) *op++ = 255; + *op++ = (BYTE)len; + } + else *token = (BYTE)(litLength< oMaxMatch) { + /* Match description too long : reduce it */ + matchLength = (15-1) + (oMaxMatch-op) * 255; + } + ip += MINMATCH + matchLength; + + if (matchLength>=ML_MASK) { + *token += ML_MASK; + matchLength -= ML_MASK; + while (matchLength >= 255) { matchLength-=255; *op++ = 255; } + *op++ = (BYTE)matchLength; + } + else *token += (BYTE)(matchLength); + } + + anchor = ip; + + /* Test end of block */ + if (ip > mflimit) break; + if (op > oMaxSeq) break; + + /* Fill table */ + LZ4_putPosition(ip-2, ctx->hashTable, tableType, base); + + /* Test next position */ + match = LZ4_getPosition(ip, ctx->hashTable, tableType, base); + LZ4_putPosition(ip, ctx->hashTable, tableType, base); + if ( (match+MAX_DISTANCE>=ip) + && (LZ4_read32(match)==LZ4_read32(ip)) ) + { token=op++; *token=0; goto _next_match; } + + /* Prepare next loop */ + forwardH = LZ4_hashPosition(++ip, tableType); + } + +_last_literals: + /* Encode Last Literals */ + { size_t lastRunSize = (size_t)(iend - anchor); + if (op + 1 /* token */ + ((lastRunSize+240)/255) /* litLength */ + lastRunSize /* literals */ > oend) { + /* adapt lastRunSize to fill 'dst' */ + lastRunSize = (oend-op) - 1; + lastRunSize -= (lastRunSize+240)/255; + } + ip = anchor + lastRunSize; + + if (lastRunSize >= RUN_MASK) { + size_t accumulator = lastRunSize - RUN_MASK; + *op++ = RUN_MASK << ML_BITS; + for(; accumulator >= 255 ; accumulator-=255) *op++ = 255; + *op++ = (BYTE) accumulator; + } else { + *op++ = (BYTE)(lastRunSize<= LZ4_compressBound(*srcSizePtr)) { /* compression success is guaranteed */ + return LZ4_compress_fast_extState(state, src, dst, *srcSizePtr, targetDstSize, 1); + } else { + if (*srcSizePtr < LZ4_64Klimit) + return LZ4_compress_destSize_generic(&state->internal_donotuse, src, dst, srcSizePtr, targetDstSize, byU16); + else + return LZ4_compress_destSize_generic(&state->internal_donotuse, src, dst, srcSizePtr, targetDstSize, sizeof(void*)==8 ? byU32 : byPtr); + } +} + + +int LZ4_compress_destSize(const char* src, char* dst, int* srcSizePtr, int targetDstSize) { -#if (HEAPMODE) - void* ctx = ALLOCATOR(LZ4_STREAMSIZE_U32, 4); /* Aligned on 4-bytes boundaries */ +#if (LZ4_HEAPMODE) + LZ4_stream_t* ctx = (LZ4_stream_t*)ALLOCATOR(1, sizeof(LZ4_stream_t)); /* malloc-calloc always properly aligned */ #else - U32 ctx[LZ4_STREAMSIZE_U32] = {0}; /* Ensure data is aligned on 4-bytes boundaries */ + LZ4_stream_t ctxBody; + LZ4_stream_t* ctx = &ctxBody; #endif - int result; - if (inputSize < (int)LZ4_64KLIMIT) - result = LZ4_compress_generic((void*)ctx, source, dest, inputSize, maxOutputSize, limitedOutput, byU16, noDict, noDictIssue); - else - result = LZ4_compress_generic((void*)ctx, source, dest, inputSize, maxOutputSize, limitedOutput, (sizeof(void*)==8) ? byU32 : byPtr, noDict, noDictIssue); + int result = LZ4_compress_destSize_extState(ctx, src, dst, srcSizePtr, targetDstSize); -#if (HEAPMODE) +#if (LZ4_HEAPMODE) FREEMEM(ctx); #endif return result; } -/***************************************** - Experimental : Streaming functions -*****************************************/ -void* LZ4_createStream() +/*-****************************** +* Streaming functions +********************************/ + +LZ4_stream_t* LZ4_createStream(void) { - void* lz4s = ALLOCATOR(4, LZ4_STREAMSIZE_U32); - MEM_INIT(lz4s, 0, LZ4_STREAMSIZE); + LZ4_stream_t* lz4s = (LZ4_stream_t*)ALLOCATOR(8, LZ4_STREAMSIZE_U64); + LZ4_STATIC_ASSERT(LZ4_STREAMSIZE >= sizeof(LZ4_stream_t_internal)); /* A compilation error here means LZ4_STREAMSIZE is not large enough */ + LZ4_resetStream(lz4s); return lz4s; } -int LZ4_free (void* LZ4_stream) +void LZ4_resetStream (LZ4_stream_t* LZ4_stream) { + MEM_INIT(LZ4_stream, 0, sizeof(LZ4_stream_t)); +} + +int LZ4_freeStream (LZ4_stream_t* LZ4_stream) +{ + if (!LZ4_stream) return 0; /* support free on NULL */ FREEMEM(LZ4_stream); return (0); } -int LZ4_loadDict (void* LZ4_dict, const char* dictionary, int dictSize) +#define HASH_UNIT sizeof(reg_t) +int LZ4_loadDict (LZ4_stream_t* LZ4_dict, const char* dictionary, int dictSize) { - LZ4_stream_t_internal* dict = (LZ4_stream_t_internal*) LZ4_dict; + LZ4_stream_t_internal* dict = &LZ4_dict->internal_donotuse; const BYTE* p = (const BYTE*)dictionary; const BYTE* const dictEnd = p + dictSize; const BYTE* base; - LZ4_STATIC_ASSERT(LZ4_STREAMSIZE >= sizeof(LZ4_stream_t_internal)); /* A compilation error here means LZ4_STREAMSIZE is not large enough */ - if (dict->initCheck) MEM_INIT(dict, 0, sizeof(LZ4_stream_t_internal)); /* Uninitialized structure detected */ + if ((dict->initCheck) || (dict->currentOffset > 1 GB)) /* Uninitialized structure, or reuse overflow */ + LZ4_resetStream(LZ4_dict); - if (dictSize < MINMATCH) - { + if (dictSize < (int)HASH_UNIT) { dict->dictionary = NULL; dict->dictSize = 0; - return 1; + return 0; } - if (p <= dictEnd - 64 KB) p = dictEnd - 64 KB; + if ((dictEnd - p) > 64 KB) p = dictEnd - 64 KB; + dict->currentOffset += 64 KB; base = p - dict->currentOffset; dict->dictionary = p; dict->dictSize = (U32)(dictEnd - p); dict->currentOffset += dict->dictSize; - while (p <= dictEnd-MINMATCH) - { - LZ4_putPosition(p, dict, byU32, base); + while (p <= dictEnd-HASH_UNIT) { + LZ4_putPosition(p, dict->hashTable, byU32, base); p+=3; } - return 1; + return dict->dictSize; } -void LZ4_renormDictT(LZ4_stream_t_internal* LZ4_dict, const BYTE* src) +static void LZ4_renormDictT(LZ4_stream_t_internal* LZ4_dict, const BYTE* src) { if ((LZ4_dict->currentOffset > 0x80000000) || - ((size_t)LZ4_dict->currentOffset > (size_t)src)) /* address space overflow */ - { + ((uptrval)LZ4_dict->currentOffset > (uptrval)src)) { /* address space overflow */ /* rescale hash table */ - U32 delta = LZ4_dict->currentOffset - 64 KB; + U32 const delta = LZ4_dict->currentOffset - 64 KB; const BYTE* dictEnd = LZ4_dict->dictionary + LZ4_dict->dictSize; int i; - for (i=0; ihashTable[i] < delta) LZ4_dict->hashTable[i]=0; else LZ4_dict->hashTable[i] -= delta; } @@ -753,22 +1007,20 @@ } -FORCE_INLINE int LZ4_compress_continue_generic (void* LZ4_stream, const char* source, char* dest, int inputSize, - int maxOutputSize, limitedOutput_directive limit) +int LZ4_compress_fast_continue (LZ4_stream_t* LZ4_stream, const char* source, char* dest, int inputSize, int maxOutputSize, int acceleration) { - LZ4_stream_t_internal* streamPtr = (LZ4_stream_t_internal*)LZ4_stream; + LZ4_stream_t_internal* streamPtr = &LZ4_stream->internal_donotuse; const BYTE* const dictEnd = streamPtr->dictionary + streamPtr->dictSize; const BYTE* smallest = (const BYTE*) source; if (streamPtr->initCheck) return 0; /* Uninitialized structure detected */ if ((streamPtr->dictSize>0) && (smallest>dictEnd)) smallest = dictEnd; LZ4_renormDictT(streamPtr, smallest); + if (acceleration < 1) acceleration = ACCELERATION_DEFAULT; /* Check overlapping input/dictionary space */ - { - const BYTE* sourceEnd = (const BYTE*) source + inputSize; - if ((sourceEnd > streamPtr->dictionary) && (sourceEnd < dictEnd)) - { + { const BYTE* sourceEnd = (const BYTE*) source + inputSize; + if ((sourceEnd > streamPtr->dictionary) && (sourceEnd < dictEnd)) { streamPtr->dictSize = (U32)(dictEnd - sourceEnd); if (streamPtr->dictSize > 64 KB) streamPtr->dictSize = 64 KB; if (streamPtr->dictSize < 4) streamPtr->dictSize = 0; @@ -777,25 +1029,23 @@ } /* prefix mode : source data follows dictionary */ - if (dictEnd == (const BYTE*)source) - { + if (dictEnd == (const BYTE*)source) { int result; if ((streamPtr->dictSize < 64 KB) && (streamPtr->dictSize < streamPtr->currentOffset)) - result = LZ4_compress_generic(LZ4_stream, source, dest, inputSize, maxOutputSize, limit, byU32, withPrefix64k, dictSmall); + result = LZ4_compress_generic(streamPtr, source, dest, inputSize, maxOutputSize, limitedOutput, byU32, withPrefix64k, dictSmall, acceleration); else - result = LZ4_compress_generic(LZ4_stream, source, dest, inputSize, maxOutputSize, limit, byU32, withPrefix64k, noDictIssue); + result = LZ4_compress_generic(streamPtr, source, dest, inputSize, maxOutputSize, limitedOutput, byU32, withPrefix64k, noDictIssue, acceleration); streamPtr->dictSize += (U32)inputSize; streamPtr->currentOffset += (U32)inputSize; return result; } /* external dictionary mode */ - { - int result; + { int result; if ((streamPtr->dictSize < 64 KB) && (streamPtr->dictSize < streamPtr->currentOffset)) - result = LZ4_compress_generic(LZ4_stream, source, dest, inputSize, maxOutputSize, limit, byU32, usingExtDict, dictSmall); + result = LZ4_compress_generic(streamPtr, source, dest, inputSize, maxOutputSize, limitedOutput, byU32, usingExtDict, dictSmall, acceleration); else - result = LZ4_compress_generic(LZ4_stream, source, dest, inputSize, maxOutputSize, limit, byU32, usingExtDict, noDictIssue); + result = LZ4_compress_generic(streamPtr, source, dest, inputSize, maxOutputSize, limitedOutput, byU32, usingExtDict, noDictIssue, acceleration); streamPtr->dictionary = (const BYTE*)source; streamPtr->dictSize = (U32)inputSize; streamPtr->currentOffset += (U32)inputSize; @@ -804,29 +1054,18 @@ } -int LZ4_compress_continue (void* LZ4_stream, const char* source, char* dest, int inputSize) -{ - return LZ4_compress_continue_generic(LZ4_stream, source, dest, inputSize, 0, notLimited); -} - -int LZ4_compress_limitedOutput_continue (void* LZ4_stream, const char* source, char* dest, int inputSize, int maxOutputSize) -{ - return LZ4_compress_continue_generic(LZ4_stream, source, dest, inputSize, maxOutputSize, limitedOutput); -} - - -// Hidden debug function, to force separate dictionary mode +/* Hidden debug function, to force external dictionary mode */ int LZ4_compress_forceExtDict (LZ4_stream_t* LZ4_dict, const char* source, char* dest, int inputSize) { - LZ4_stream_t_internal* streamPtr = (LZ4_stream_t_internal*)LZ4_dict; + LZ4_stream_t_internal* streamPtr = &LZ4_dict->internal_donotuse; int result; const BYTE* const dictEnd = streamPtr->dictionary + streamPtr->dictSize; const BYTE* smallest = dictEnd; if (smallest > (const BYTE*) source) smallest = (const BYTE*) source; - LZ4_renormDictT((LZ4_stream_t_internal*)LZ4_dict, smallest); + LZ4_renormDictT(streamPtr, smallest); - result = LZ4_compress_generic(LZ4_dict, source, dest, inputSize, 0, notLimited, byU32, usingExtDict, noDictIssue); + result = LZ4_compress_generic(streamPtr, source, dest, inputSize, 0, notLimited, byU32, usingExtDict, noDictIssue, 1); streamPtr->dictionary = (const BYTE*)source; streamPtr->dictSize = (U32)inputSize; @@ -836,36 +1075,43 @@ } -int LZ4_saveDict (void* LZ4_dict, char* safeBuffer, int dictSize) +/*! LZ4_saveDict() : + * If previously compressed data block is not guaranteed to remain available at its memory location, + * save it into a safer place (char* safeBuffer). + * Note : you don't need to call LZ4_loadDict() afterwards, + * dictionary is immediately usable, you can therefore call LZ4_compress_fast_continue(). + * Return : saved dictionary size in bytes (necessarily <= dictSize), or 0 if error. + */ +int LZ4_saveDict (LZ4_stream_t* LZ4_dict, char* safeBuffer, int dictSize) { - LZ4_stream_t_internal* dict = (LZ4_stream_t_internal*) LZ4_dict; - const BYTE* previousDictEnd = dict->dictionary + dict->dictSize; + LZ4_stream_t_internal* const dict = &LZ4_dict->internal_donotuse; + const BYTE* const previousDictEnd = dict->dictionary + dict->dictSize; if ((U32)dictSize > 64 KB) dictSize = 64 KB; /* useless to define a dictionary > 64 KB */ if ((U32)dictSize > dict->dictSize) dictSize = dict->dictSize; - memcpy(safeBuffer, previousDictEnd - dictSize, dictSize); + memmove(safeBuffer, previousDictEnd - dictSize, dictSize); dict->dictionary = (const BYTE*)safeBuffer; dict->dictSize = (U32)dictSize; - return 1; + return dictSize; } -/**************************** - Decompression functions -****************************/ -/* - * This generic decompression function cover all use cases. - * It shall be instanciated several times, using different sets of directives - * Note that it is essential this generic function is really inlined, - * in order to remove useless branches during compilation optimisation. +/*-***************************** +* Decompression functions +*******************************/ +/*! LZ4_decompress_generic() : + * This generic decompression function cover all use cases. + * It shall be instantiated several times, using different sets of directives + * Note that it is important this generic function is really inlined, + * in order to remove useless branches during compilation optimization. */ FORCE_INLINE int LZ4_decompress_generic( - const char* source, - char* dest, + const char* const source, + char* const dest, int inputSize, int outputSize, /* If endOnInput==endOnInputSize, this value is the max size of Output Buffer. */ @@ -873,162 +1119,143 @@ int partialDecoding, /* full, partial */ int targetOutputSize, /* only used if partialDecoding==partial */ int dict, /* noDict, withPrefix64k, usingExtDict */ - const char* dictStart, /* only if dict==usingExtDict */ - int dictSize /* note : = 0 if noDict */ + const BYTE* const lowPrefix, /* == dest when no prefix */ + const BYTE* const dictStart, /* only if dict==usingExtDict */ + const size_t dictSize /* note : = 0 if noDict */ ) { /* Local Variables */ - const BYTE* restrict ip = (const BYTE*) source; - const BYTE* ref; + const BYTE* ip = (const BYTE*) source; const BYTE* const iend = ip + inputSize; BYTE* op = (BYTE*) dest; BYTE* const oend = op + outputSize; BYTE* cpy; BYTE* oexit = op + targetOutputSize; - const BYTE* const lowLimit = (const BYTE*)dest - dictSize; + const BYTE* const lowLimit = lowPrefix - dictSize; const BYTE* const dictEnd = (const BYTE*)dictStart + dictSize; -//#define OLD -#ifdef OLD - const size_t dec32table[] = {0, 3, 2, 3, 0, 0, 0, 0}; /* static reduces speed for LZ4_decompress_safe() on GCC64 */ -#else - const size_t dec32table[] = {4-0, 4-3, 4-2, 4-3, 4-0, 4-0, 4-0, 4-0}; /* static reduces speed for LZ4_decompress_safe() on GCC64 */ -#endif - static const size_t dec64table[] = {0, 0, 0, (size_t)-1, 0, 1, 2, 3}; + const unsigned dec32table[] = {0, 1, 2, 1, 4, 4, 4, 4}; + const int dec64table[] = {0, 0, 0, -1, 0, 1, 2, 3}; - const int checkOffset = (endOnInput) && (dictSize < (int)(64 KB)); + const int safeDecode = (endOnInput==endOnInputSize); + const int checkOffset = ((safeDecode) && (dictSize < (int)(64 KB))); /* Special cases */ - if ((partialDecoding) && (oexit> oend-MFLIMIT)) oexit = oend-MFLIMIT; /* targetOutputSize too high => decode everything */ - if ((endOnInput) && (unlikely(outputSize==0))) return ((inputSize==1) && (*ip==0)) ? 0 : -1; /* Empty output buffer */ + if ((partialDecoding) && (oexit > oend-MFLIMIT)) oexit = oend-MFLIMIT; /* targetOutputSize too high => decode everything */ + if ((endOnInput) && (unlikely(outputSize==0))) return ((inputSize==1) && (*ip==0)) ? 0 : -1; /* Empty output buffer */ if ((!endOnInput) && (unlikely(outputSize==0))) return (*ip==0?1:-1); - - /* Main Loop */ - while (1) - { - unsigned token; + /* Main Loop : decode sequences */ + while (1) { size_t length; + const BYTE* match; + size_t offset; - /* get runlength */ - token = *ip++; - if ((length=(token>>ML_BITS)) == RUN_MASK) - { + /* get literal length */ + unsigned const token = *ip++; + if ((length=(token>>ML_BITS)) == RUN_MASK) { unsigned s; - do - { + do { s = *ip++; length += s; - } - while (likely((endOnInput)?ipLZ4_MAX_INPUT_SIZE)) goto _output_error; /* overflow detection */ - if ((sizeof(void*)==4) && unlikely((size_t)(op+length)<(size_t)(op))) goto _output_error; /* quickfix issue 134 */ - if ((endOnInput) && (sizeof(void*)==4) && unlikely((size_t)(ip+length)<(size_t)(ip))) goto _output_error; /* quickfix issue 134 */ + } while ( likely(endOnInput ? ip(partialDecoding?oexit:oend-MFLIMIT)) || (ip+length>iend-(2+1+LASTLITERALS))) ) - || ((!endOnInput) && (cpy>oend-COPYLENGTH))) + if ( ((endOnInput) && ((cpy>(partialDecoding?oexit:oend-MFLIMIT)) || (ip+length>iend-(2+1+LASTLITERALS))) ) + || ((!endOnInput) && (cpy>oend-WILDCOPYLENGTH)) ) { - if (partialDecoding) - { + if (partialDecoding) { if (cpy > oend) goto _output_error; /* Error : write attempt beyond end of output buffer */ if ((endOnInput) && (ip+length > iend)) goto _output_error; /* Error : read attempt beyond end of input buffer */ - } - else - { + } else { if ((!endOnInput) && (cpy != oend)) goto _output_error; /* Error : block decoding must stop exactly there */ if ((endOnInput) && ((ip+length != iend) || (cpy > oend))) goto _output_error; /* Error : input must be consumed */ } memcpy(op, ip, length); ip += length; op += length; - break; /* Necessarily EOF, due to parsing restrictions */ + break; /* Necessarily EOF, due to parsing restrictions */ } - LZ4_WILDCOPY(op, ip, cpy); ip -= (op-cpy); op = cpy; + LZ4_wildCopy(op, ip, cpy); + ip += length; op = cpy; /* get offset */ - LZ4_READ_LITTLEENDIAN_16(ref,cpy,ip); ip+=2; - if ((checkOffset) && (unlikely(ref < lowLimit))) goto _output_error; /* Error : offset outside destination buffer */ + offset = LZ4_readLE16(ip); ip+=2; + match = op - offset; + if ((checkOffset) && (unlikely(match < lowLimit))) goto _output_error; /* Error : offset outside buffers */ + LZ4_write32(op, (U32)offset); /* costs ~1%; silence an msan warning when offset==0 */ /* get matchlength */ - if ((length=(token&ML_MASK)) == ML_MASK) - { + length = token & ML_MASK; + if (length == ML_MASK) { unsigned s; - do - { - if ((endOnInput) && (ip > iend-LASTLITERALS)) goto _output_error; + do { s = *ip++; + if ((endOnInput) && (ip > iend-LASTLITERALS)) goto _output_error; length += s; } while (s==255); - //if ((sizeof(void*)==4) && unlikely(length>LZ4_MAX_INPUT_SIZE)) goto _output_error; /* overflow detection */ - if ((sizeof(void*)==4) && unlikely((size_t)(op+length)<(size_t)op)) goto _output_error; /* quickfix issue 134 */ + if ((safeDecode) && unlikely((uptrval)(op)+length<(uptrval)op)) goto _output_error; /* overflow detection */ } + length += MINMATCH; /* check external dictionary */ - if ((dict==usingExtDict) && (ref < (BYTE* const)dest)) - { - if (unlikely(op+length+MINMATCH > oend-LASTLITERALS)) goto _output_error; + if ((dict==usingExtDict) && (match < lowPrefix)) { + if (unlikely(op+length > oend-LASTLITERALS)) goto _output_error; /* doesn't respect parsing restriction */ - if (length+MINMATCH <= (size_t)(dest-(char*)ref)) - { - ref = dictEnd - (dest-(char*)ref); - memcpy(op, ref, length+MINMATCH); - op += length+MINMATCH; - } - else - { - size_t copySize = (size_t)(dest-(char*)ref); + if (length <= (size_t)(lowPrefix-match)) { + /* match can be copied as a single segment from external dictionary */ + memmove(op, dictEnd - (lowPrefix-match), length); + op += length; + } else { + /* match encompass external dictionary and current block */ + size_t const copySize = (size_t)(lowPrefix-match); + size_t const restSize = length - copySize; memcpy(op, dictEnd - copySize, copySize); op += copySize; - copySize = length+MINMATCH - copySize; - if (copySize > (size_t)((char*)op-dest)) /* overlap */ - { - BYTE* const cpy = op + copySize; - const BYTE* ref = (BYTE*)dest; - while (op < cpy) *op++ = *ref++; - } - else - { - memcpy(op, dest, copySize); - op += copySize; - } - } + if (restSize > (size_t)(op-lowPrefix)) { /* overlap copy */ + BYTE* const endOfMatch = op + restSize; + const BYTE* copyFrom = lowPrefix; + while (op < endOfMatch) *op++ = *copyFrom++; + } else { + memcpy(op, lowPrefix, restSize); + op += restSize; + } } continue; } - /* copy repeated sequence */ - if (unlikely((op-ref)<(int)STEPSIZE)) - { - const size_t dec64 = dec64table[(sizeof(void*)==4) ? 0 : op-ref]; - op[0] = ref[0]; - op[1] = ref[1]; - op[2] = ref[2]; - op[3] = ref[3]; -#ifdef OLD - op += 4, ref += 4; ref -= dec32table[op-ref]; - A32(op) = A32(ref); - op += STEPSIZE-4; ref -= dec64; -#else - ref += dec32table[op-ref]; - A32(op+4) = A32(ref); - op += STEPSIZE; ref -= dec64; -#endif - } else { LZ4_COPYSTEP(op,ref); } - cpy = op + length - (STEPSIZE-4); - - if (unlikely(cpy>oend-COPYLENGTH-(STEPSIZE-4))) - { - if (cpy > oend-LASTLITERALS) goto _output_error; /* Error : last 5 bytes must be literals */ - if (opoend-12)) { + BYTE* const oCopyLimit = oend-(WILDCOPYLENGTH-1); + if (cpy > oend-LASTLITERALS) goto _output_error; /* Error : last LASTLITERALS bytes must be literals (uncompressed) */ + if (op < oCopyLimit) { + LZ4_wildCopy(op, match, oCopyLimit); + match += oCopyLimit - op; + op = oCopyLimit; + } + while (op16) LZ4_wildCopy(op+8, match+8, cpy); } - LZ4_WILDCOPY(op, ref, cpy); op=cpy; /* correction */ } @@ -1036,64 +1263,59 @@ if (endOnInput) return (int) (((char*)op)-dest); /* Nb of output bytes decoded */ else - return (int) (((char*)ip)-source); /* Nb of input bytes read */ + return (int) (((const char*)ip)-source); /* Nb of input bytes read */ /* Overflow error detected */ _output_error: - return (int) (-(((char*)ip)-source))-1; + return (int) (-(((const char*)ip)-source))-1; } -int LZ4_decompress_safe(const char* source, char* dest, int compressedSize, int maxOutputSize) +int LZ4_decompress_safe(const char* source, char* dest, int compressedSize, int maxDecompressedSize) { - return LZ4_decompress_generic(source, dest, compressedSize, maxOutputSize, endOnInputSize, full, 0, noDict, NULL, 0); + return LZ4_decompress_generic(source, dest, compressedSize, maxDecompressedSize, endOnInputSize, full, 0, noDict, (BYTE*)dest, NULL, 0); } -int LZ4_decompress_safe_partial(const char* source, char* dest, int compressedSize, int targetOutputSize, int maxOutputSize) +int LZ4_decompress_safe_partial(const char* source, char* dest, int compressedSize, int targetOutputSize, int maxDecompressedSize) { - return LZ4_decompress_generic(source, dest, compressedSize, maxOutputSize, endOnInputSize, partial, targetOutputSize, noDict, NULL, 0); + return LZ4_decompress_generic(source, dest, compressedSize, maxDecompressedSize, endOnInputSize, partial, targetOutputSize, noDict, (BYTE*)dest, NULL, 0); } int LZ4_decompress_fast(const char* source, char* dest, int originalSize) { - return LZ4_decompress_generic(source, dest, 0, originalSize, endOnOutputSize, full, 0, withPrefix64k, NULL, 0); + return LZ4_decompress_generic(source, dest, 0, originalSize, endOnOutputSize, full, 0, withPrefix64k, (BYTE*)(dest - 64 KB), NULL, 64 KB); } -/* streaming decompression functions */ -//#define LZ4_STREAMDECODESIZE_U32 4 -//#define LZ4_STREAMDECODESIZE (LZ4_STREAMDECODESIZE_U32 * sizeof(unsigned int)) -//typedef struct { unsigned int table[LZ4_STREAMDECODESIZE_U32]; } LZ4_streamDecode_t; -typedef struct -{ - const char* dictionary; - int dictSize; -} LZ4_streamDecode_t_internal; +/*===== streaming decompression functions =====*/ -/* - * If you prefer dynamic allocation methods, - * LZ4_createStreamDecode() - * provides a pointer (void*) towards an initialized LZ4_streamDecode_t structure. - */ -void* LZ4_createStreamDecode() +LZ4_streamDecode_t* LZ4_createStreamDecode(void) { - void* lz4s = ALLOCATOR(sizeof(U32), LZ4_STREAMDECODESIZE_U32); - MEM_INIT(lz4s, 0, LZ4_STREAMDECODESIZE); + LZ4_streamDecode_t* lz4s = (LZ4_streamDecode_t*) ALLOCATOR(1, sizeof(LZ4_streamDecode_t)); return lz4s; } -/* - * LZ4_setDictDecode - * Use this function to instruct where to find the dictionary +int LZ4_freeStreamDecode (LZ4_streamDecode_t* LZ4_stream) +{ + if (!LZ4_stream) return 0; /* support free on NULL */ + FREEMEM(LZ4_stream); + return 0; +} + +/*! + * LZ4_setStreamDecode() : + * Use this function to instruct where to find the dictionary. * This function is not necessary if previous data is still available where it was decoded. * Loading a size of 0 is allowed (same effect as no dictionary). * Return : 1 if OK, 0 if error */ -int LZ4_setDictDecode (void* LZ4_streamDecode, const char* dictionary, int dictSize) +int LZ4_setStreamDecode (LZ4_streamDecode_t* LZ4_streamDecode, const char* dictionary, int dictSize) { - LZ4_streamDecode_t_internal* lz4sd = (LZ4_streamDecode_t_internal*) LZ4_streamDecode; - lz4sd->dictionary = dictionary; - lz4sd->dictSize = dictSize; + LZ4_streamDecode_t_internal* lz4sd = &LZ4_streamDecode->internal_donotuse; + lz4sd->prefixSize = (size_t) dictSize; + lz4sd->prefixEnd = (const BYTE*) dictionary + dictSize; + lz4sd->externalDict = NULL; + lz4sd->extDictSize = 0; return 1; } @@ -1102,43 +1324,55 @@ These decoding functions allow decompression of multiple blocks in "streaming" mode. Previously decoded blocks must still be available at the memory position where they were decoded. If it's not possible, save the relevant part of decoded data into a safe buffer, - and indicate where it stands using LZ4_setDictDecode() + and indicate where it stands using LZ4_setStreamDecode() */ -int LZ4_decompress_safe_continue (void* LZ4_streamDecode, const char* source, char* dest, int compressedSize, int maxOutputSize) +int LZ4_decompress_safe_continue (LZ4_streamDecode_t* LZ4_streamDecode, const char* source, char* dest, int compressedSize, int maxOutputSize) { - LZ4_streamDecode_t_internal* lz4sd = (LZ4_streamDecode_t_internal*) LZ4_streamDecode; + LZ4_streamDecode_t_internal* lz4sd = &LZ4_streamDecode->internal_donotuse; int result; - result = LZ4_decompress_generic(source, dest, compressedSize, maxOutputSize, endOnInputSize, full, 0, usingExtDict, lz4sd->dictionary, lz4sd->dictSize); - if (result <= 0) return result; - if (lz4sd->dictionary + lz4sd->dictSize == dest) - { - lz4sd->dictSize += result; - } - else - { - lz4sd->dictionary = dest; - lz4sd->dictSize = result; + if (lz4sd->prefixEnd == (BYTE*)dest) { + result = LZ4_decompress_generic(source, dest, compressedSize, maxOutputSize, + endOnInputSize, full, 0, + usingExtDict, lz4sd->prefixEnd - lz4sd->prefixSize, lz4sd->externalDict, lz4sd->extDictSize); + if (result <= 0) return result; + lz4sd->prefixSize += result; + lz4sd->prefixEnd += result; + } else { + lz4sd->extDictSize = lz4sd->prefixSize; + lz4sd->externalDict = lz4sd->prefixEnd - lz4sd->extDictSize; + result = LZ4_decompress_generic(source, dest, compressedSize, maxOutputSize, + endOnInputSize, full, 0, + usingExtDict, (BYTE*)dest, lz4sd->externalDict, lz4sd->extDictSize); + if (result <= 0) return result; + lz4sd->prefixSize = result; + lz4sd->prefixEnd = (BYTE*)dest + result; } return result; } -int LZ4_decompress_fast_continue (void* LZ4_streamDecode, const char* source, char* dest, int originalSize) +int LZ4_decompress_fast_continue (LZ4_streamDecode_t* LZ4_streamDecode, const char* source, char* dest, int originalSize) { - LZ4_streamDecode_t_internal* lz4sd = (LZ4_streamDecode_t_internal*) LZ4_streamDecode; + LZ4_streamDecode_t_internal* lz4sd = &LZ4_streamDecode->internal_donotuse; int result; - result = LZ4_decompress_generic(source, dest, 0, originalSize, endOnOutputSize, full, 0, usingExtDict, lz4sd->dictionary, lz4sd->dictSize); - if (result <= 0) return result; - if (lz4sd->dictionary + lz4sd->dictSize == dest) - { - lz4sd->dictSize += result; - } - else - { - lz4sd->dictionary = dest; - lz4sd->dictSize = result; + if (lz4sd->prefixEnd == (BYTE*)dest) { + result = LZ4_decompress_generic(source, dest, 0, originalSize, + endOnOutputSize, full, 0, + usingExtDict, lz4sd->prefixEnd - lz4sd->prefixSize, lz4sd->externalDict, lz4sd->extDictSize); + if (result <= 0) return result; + lz4sd->prefixSize += originalSize; + lz4sd->prefixEnd += originalSize; + } else { + lz4sd->extDictSize = lz4sd->prefixSize; + lz4sd->externalDict = lz4sd->prefixEnd - lz4sd->extDictSize; + result = LZ4_decompress_generic(source, dest, 0, originalSize, + endOnOutputSize, full, 0, + usingExtDict, (BYTE*)dest, lz4sd->externalDict, lz4sd->extDictSize); + if (result <= 0) return result; + lz4sd->prefixSize = originalSize; + lz4sd->prefixEnd = (BYTE*)dest + originalSize; } return result; @@ -1152,12 +1386,97 @@ the dictionary must be explicitly provided within parameters */ +FORCE_INLINE int LZ4_decompress_usingDict_generic(const char* source, char* dest, int compressedSize, int maxOutputSize, int safe, const char* dictStart, int dictSize) +{ + if (dictSize==0) + return LZ4_decompress_generic(source, dest, compressedSize, maxOutputSize, safe, full, 0, noDict, (BYTE*)dest, NULL, 0); + if (dictStart+dictSize == dest) { + if (dictSize >= (int)(64 KB - 1)) + return LZ4_decompress_generic(source, dest, compressedSize, maxOutputSize, safe, full, 0, withPrefix64k, (BYTE*)dest-64 KB, NULL, 0); + return LZ4_decompress_generic(source, dest, compressedSize, maxOutputSize, safe, full, 0, noDict, (BYTE*)dest-dictSize, NULL, 0); + } + return LZ4_decompress_generic(source, dest, compressedSize, maxOutputSize, safe, full, 0, usingExtDict, (BYTE*)dest, (const BYTE*)dictStart, dictSize); +} + int LZ4_decompress_safe_usingDict(const char* source, char* dest, int compressedSize, int maxOutputSize, const char* dictStart, int dictSize) { - return LZ4_decompress_generic(source, dest, compressedSize, maxOutputSize, endOnInputSize, full, 0, usingExtDict, dictStart, dictSize); + return LZ4_decompress_usingDict_generic(source, dest, compressedSize, maxOutputSize, 1, dictStart, dictSize); } int LZ4_decompress_fast_usingDict(const char* source, char* dest, int originalSize, const char* dictStart, int dictSize) { - return LZ4_decompress_generic(source, dest, 0, originalSize, endOnOutputSize, full, 0, usingExtDict, dictStart, dictSize); + return LZ4_decompress_usingDict_generic(source, dest, 0, originalSize, 0, dictStart, dictSize); +} + +/* debug function */ +int LZ4_decompress_safe_forceExtDict(const char* source, char* dest, int compressedSize, int maxOutputSize, const char* dictStart, int dictSize) +{ + return LZ4_decompress_generic(source, dest, compressedSize, maxOutputSize, endOnInputSize, full, 0, usingExtDict, (BYTE*)dest, (const BYTE*)dictStart, dictSize); } + + +/*=************************************************* +* Obsolete Functions +***************************************************/ +/* obsolete compression functions */ +int LZ4_compress_limitedOutput(const char* source, char* dest, int inputSize, int maxOutputSize) { return LZ4_compress_default(source, dest, inputSize, maxOutputSize); } +int LZ4_compress(const char* source, char* dest, int inputSize) { return LZ4_compress_default(source, dest, inputSize, LZ4_compressBound(inputSize)); } +int LZ4_compress_limitedOutput_withState (void* state, const char* src, char* dst, int srcSize, int dstSize) { return LZ4_compress_fast_extState(state, src, dst, srcSize, dstSize, 1); } +int LZ4_compress_withState (void* state, const char* src, char* dst, int srcSize) { return LZ4_compress_fast_extState(state, src, dst, srcSize, LZ4_compressBound(srcSize), 1); } +int LZ4_compress_limitedOutput_continue (LZ4_stream_t* LZ4_stream, const char* src, char* dst, int srcSize, int maxDstSize) { return LZ4_compress_fast_continue(LZ4_stream, src, dst, srcSize, maxDstSize, 1); } +int LZ4_compress_continue (LZ4_stream_t* LZ4_stream, const char* source, char* dest, int inputSize) { return LZ4_compress_fast_continue(LZ4_stream, source, dest, inputSize, LZ4_compressBound(inputSize), 1); } + +/* +These function names are deprecated and should no longer be used. +They are only provided here for compatibility with older user programs. +- LZ4_uncompress is totally equivalent to LZ4_decompress_fast +- LZ4_uncompress_unknownOutputSize is totally equivalent to LZ4_decompress_safe +*/ +int LZ4_uncompress (const char* source, char* dest, int outputSize) { return LZ4_decompress_fast(source, dest, outputSize); } +int LZ4_uncompress_unknownOutputSize (const char* source, char* dest, int isize, int maxOutputSize) { return LZ4_decompress_safe(source, dest, isize, maxOutputSize); } + + +/* Obsolete Streaming functions */ + +int LZ4_sizeofStreamState() { return LZ4_STREAMSIZE; } + +static void LZ4_init(LZ4_stream_t* lz4ds, BYTE* base) +{ + MEM_INIT(lz4ds, 0, sizeof(LZ4_stream_t)); + lz4ds->internal_donotuse.bufferStart = base; +} + +int LZ4_resetStreamState(void* state, char* inputBuffer) +{ + if ((((uptrval)state) & 3) != 0) return 1; /* Error : pointer is not aligned on 4-bytes boundary */ + LZ4_init((LZ4_stream_t*)state, (BYTE*)inputBuffer); + return 0; +} + +void* LZ4_create (char* inputBuffer) +{ + LZ4_stream_t* lz4ds = (LZ4_stream_t*)ALLOCATOR(8, sizeof(LZ4_stream_t)); + LZ4_init (lz4ds, (BYTE*)inputBuffer); + return lz4ds; +} + +char* LZ4_slideInputBuffer (void* LZ4_Data) +{ + LZ4_stream_t_internal* ctx = &((LZ4_stream_t*)LZ4_Data)->internal_donotuse; + int dictSize = LZ4_saveDict((LZ4_stream_t*)LZ4_Data, (char*)ctx->bufferStart, 64 KB); + return (char*)(ctx->bufferStart + dictSize); +} + +/* Obsolete streaming decompression functions */ + +int LZ4_decompress_safe_withPrefix64k(const char* source, char* dest, int compressedSize, int maxOutputSize) +{ + return LZ4_decompress_generic(source, dest, compressedSize, maxOutputSize, endOnInputSize, full, 0, withPrefix64k, (BYTE*)dest - 64 KB, NULL, 64 KB); +} + +int LZ4_decompress_fast_withPrefix64k(const char* source, char* dest, int originalSize) +{ + return LZ4_decompress_generic(source, dest, 0, originalSize, endOnOutputSize, full, 0, withPrefix64k, (BYTE*)dest - 64 KB, NULL, 64 KB); +} + +#endif /* LZ4_COMMONDEFS_ONLY */ diff -Nru mozjs52-52.3.1/mfbt/lz4.h mozjs52-52.8.1/mfbt/lz4.h --- mozjs52-52.3.1/mfbt/lz4.h 2017-08-08 10:25:53.000000000 +0000 +++ mozjs52-52.8.1/mfbt/lz4.h 2018-06-08 12:27:13.000000000 +0000 @@ -1,7 +1,8 @@ /* - LZ4 - Fast LZ compression algorithm - Header File - Copyright (C) 2011-2014, Yann Collet. + * LZ4 - Fast LZ compression algorithm + * Header File + * Copyright (C) 2011-2017, Yann Collet. + BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php) Redistribution and use in source and binary forms, with or without @@ -28,247 +29,433 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. You can contact the author at : - - LZ4 source repository : http://code.google.com/p/lz4/ - - LZ4 public forum : https://groups.google.com/forum/#!forum/lz4c + - LZ4 homepage : http://www.lz4.org + - LZ4 source repository : https://github.com/lz4/lz4 */ -#pragma once - #if defined (__cplusplus) extern "C" { #endif +#ifndef LZ4_H_2983827168210 +#define LZ4_H_2983827168210 -/************************************** - Version -**************************************/ -#define LZ4_VERSION_MAJOR 1 /* for major interface/format changes */ -#define LZ4_VERSION_MINOR 2 /* for minor interface/format changes */ +/* --- Dependency --- */ +#include /* size_t */ + + +/** + Introduction + + LZ4 is lossless compression algorithm, providing compression speed at 400 MB/s per core, + scalable with multi-cores CPU. It features an extremely fast decoder, with speed in + multiple GB/s per core, typically reaching RAM speed limits on multi-core systems. + + The LZ4 compression library provides in-memory compression and decompression functions. + Compression can be done in: + - a single step (described as Simple Functions) + - a single step, reusing a context (described in Advanced Functions) + - unbounded multiple steps (described as Streaming compression) + + lz4.h provides block compression functions. It gives full buffer control to user. + Decompressing an lz4-compressed block also requires metadata (such as compressed size). + Each application is free to encode such metadata in whichever way it wants. + + An additional format, called LZ4 frame specification (doc/lz4_Frame_format.md), + take care of encoding standard metadata alongside LZ4-compressed blocks. + If your application requires interoperability, it's recommended to use it. + A library is provided to take care of it, see lz4frame.h. +*/ + +/*^*************************************************************** +* Export parameters +*****************************************************************/ +/* +* LZ4_DLL_EXPORT : +* Enable exporting of functions when building a Windows DLL +* LZ4LIB_API : +* Control library symbols visibility. +*/ +#if defined(LZ4_DLL_EXPORT) && (LZ4_DLL_EXPORT==1) +# define LZ4LIB_API __declspec(dllexport) +#elif defined(LZ4_DLL_IMPORT) && (LZ4_DLL_IMPORT==1) +# define LZ4LIB_API __declspec(dllimport) /* It isn't required but allows to generate better code, saving a function pointer load from the IAT and an indirect jump.*/ +#elif defined(__GNUC__) && (__GNUC__ >= 4) +# define LZ4LIB_API __attribute__ ((__visibility__ ("default"))) +#else +# define LZ4LIB_API +#endif + + +/*------ Version ------*/ +#define LZ4_VERSION_MAJOR 1 /* for breaking interface changes */ +#define LZ4_VERSION_MINOR 8 /* for new (non-breaking) interface capabilities */ #define LZ4_VERSION_RELEASE 0 /* for tweaks, bug-fixes, or development */ +#define LZ4_VERSION_NUMBER (LZ4_VERSION_MAJOR *100*100 + LZ4_VERSION_MINOR *100 + LZ4_VERSION_RELEASE) + +#define LZ4_LIB_VERSION LZ4_VERSION_MAJOR.LZ4_VERSION_MINOR.LZ4_VERSION_RELEASE +#define LZ4_QUOTE(str) #str +#define LZ4_EXPAND_AND_QUOTE(str) LZ4_QUOTE(str) +#define LZ4_VERSION_STRING LZ4_EXPAND_AND_QUOTE(LZ4_LIB_VERSION) -/************************************** - Tuning parameter +LZ4LIB_API int LZ4_versionNumber (void); /**< library version number; to be used when checking dll version */ +LZ4LIB_API const char* LZ4_versionString (void); /**< library version string; to be used when checking dll version */ + + +/*-************************************ +* Tuning parameter **************************************/ -/* +/*! * LZ4_MEMORY_USAGE : * Memory usage formula : N->2^N Bytes (examples : 10 -> 1KB; 12 -> 4KB ; 16 -> 64KB; 20 -> 1MB; etc.) * Increasing memory usage improves compression ratio * Reduced memory usage can improve speed, due to cache effect * Default value is 14, for 16KB, which nicely fits into Intel x86 L1 cache */ -#define LZ4_MEMORY_USAGE 14 - +#ifndef LZ4_MEMORY_USAGE +# define LZ4_MEMORY_USAGE 14 +#endif -/************************************** - Simple Functions +/*-************************************ +* Simple Functions **************************************/ - -int LZ4_compress (const char* source, char* dest, int inputSize); -int LZ4_decompress_safe (const char* source, char* dest, int compressedSize, int maxOutputSize); - -/* -LZ4_compress() : - Compresses 'inputSize' bytes from 'source' into 'dest'. - Destination buffer must be already allocated, - and must be sized to handle worst cases situations (input data not compressible) - Worst case size evaluation is provided by function LZ4_compressBound() - inputSize : Max supported value is LZ4_MAX_INPUT_VALUE - return : the number of bytes written in buffer dest - or 0 if the compression fails - -LZ4_decompress_safe() : - compressedSize : is obviously the source size - maxOutputSize : is the size of the destination buffer, which must be already allocated. - return : the number of bytes decoded in the destination buffer (necessarily <= maxOutputSize) - If the destination buffer is not large enough, decoding will stop and output an error code (<0). +/*! LZ4_compress_default() : + Compresses 'sourceSize' bytes from buffer 'source' + into already allocated 'dest' buffer of size 'maxDestSize'. + Compression is guaranteed to succeed if 'maxDestSize' >= LZ4_compressBound(sourceSize). + It also runs faster, so it's a recommended setting. + If the function cannot compress 'source' into a more limited 'dest' budget, + compression stops *immediately*, and the function result is zero. + As a consequence, 'dest' content is not valid. + This function never writes outside 'dest' buffer, nor read outside 'source' buffer. + sourceSize : Max supported value is LZ4_MAX_INPUT_VALUE + maxDestSize : full or partial size of buffer 'dest' (which must be already allocated) + return : the number of bytes written into buffer 'dest' (necessarily <= maxOutputSize) + or 0 if compression fails */ +LZ4LIB_API int LZ4_compress_default(const char* source, char* dest, int sourceSize, int maxDestSize); + +/*! LZ4_decompress_safe() : + compressedSize : is the precise full size of the compressed block. + maxDecompressedSize : is the size of destination buffer, which must be already allocated. + return : the number of bytes decompressed into destination buffer (necessarily <= maxDecompressedSize) + If destination buffer is not large enough, decoding will stop and output an error code (<0). If the source stream is detected malformed, the function will stop decoding and return a negative result. - This function is protected against buffer overflow exploits : - it never writes outside of output buffer, and never reads outside of input buffer. - Therefore, it is protected against malicious data packets. -*/ - - -/* -Note : - Should you prefer to explicitly allocate compression-table memory using your own allocation method, - use the streaming functions provided below, simply reset the memory area between each call to LZ4_compress_continue() + This function is protected against buffer overflow exploits, including malicious data packets. + It never writes outside output buffer, nor reads outside input buffer. */ +LZ4LIB_API int LZ4_decompress_safe (const char* source, char* dest, int compressedSize, int maxDecompressedSize); -/************************************** - Advanced Functions +/*-************************************ +* Advanced Functions **************************************/ #define LZ4_MAX_INPUT_SIZE 0x7E000000 /* 2 113 929 216 bytes */ -#define LZ4_COMPRESSBOUND(isize) ((unsigned int)(isize) > (unsigned int)LZ4_MAX_INPUT_SIZE ? 0 : (isize) + ((isize)/255) + 16) +#define LZ4_COMPRESSBOUND(isize) ((unsigned)(isize) > (unsigned)LZ4_MAX_INPUT_SIZE ? 0 : (isize) + ((isize)/255) + 16) -/* +/*! LZ4_compressBound() : - Provides the maximum size that LZ4 may output in a "worst case" scenario (input data not compressible) - primarily useful for memory allocation of output buffer. - macro is also provided when result needs to be evaluated at compilation (such as stack memory allocation). - - isize : is the input size. Max supported value is LZ4_MAX_INPUT_SIZE - return : maximum output size in a "worst case" scenario - or 0, if input size is too large ( > LZ4_MAX_INPUT_SIZE) + Provides the maximum size that LZ4 compression may output in a "worst case" scenario (input data not compressible) + This function is primarily useful for memory allocation purposes (destination buffer size). + Macro LZ4_COMPRESSBOUND() is also provided for compilation-time evaluation (stack memory allocation for example). + Note that LZ4_compress_default() compress faster when dest buffer size is >= LZ4_compressBound(srcSize) + inputSize : max supported value is LZ4_MAX_INPUT_SIZE + return : maximum output size in a "worst case" scenario + or 0, if input size is too large ( > LZ4_MAX_INPUT_SIZE) +*/ +LZ4LIB_API int LZ4_compressBound(int inputSize); + +/*! +LZ4_compress_fast() : + Same as LZ4_compress_default(), but allows to select an "acceleration" factor. + The larger the acceleration value, the faster the algorithm, but also the lesser the compression. + It's a trade-off. It can be fine tuned, with each successive value providing roughly +~3% to speed. + An acceleration value of "1" is the same as regular LZ4_compress_default() + Values <= 0 will be replaced by ACCELERATION_DEFAULT (see lz4.c), which is 1. */ -int LZ4_compressBound(int isize); +LZ4LIB_API int LZ4_compress_fast (const char* source, char* dest, int sourceSize, int maxDestSize, int acceleration); -/* -LZ4_compress_limitedOutput() : - Compress 'inputSize' bytes from 'source' into an output buffer 'dest' of maximum size 'maxOutputSize'. - If it cannot achieve it, compression will stop, and result of the function will be zero. - This function never writes outside of provided output buffer. - - inputSize : Max supported value is LZ4_MAX_INPUT_VALUE - maxOutputSize : is the size of the destination buffer (which must be already allocated) - return : the number of bytes written in buffer 'dest' - or 0 if the compression fails +/*! +LZ4_compress_fast_extState() : + Same compression function, just using an externally allocated memory space to store compression state. + Use LZ4_sizeofState() to know how much memory must be allocated, + and allocate it on 8-bytes boundaries (using malloc() typically). + Then, provide it as 'void* state' to compression function. */ -int LZ4_compress_limitedOutput (const char* source, char* dest, int inputSize, int maxOutputSize); +LZ4LIB_API int LZ4_sizeofState(void); +LZ4LIB_API int LZ4_compress_fast_extState (void* state, const char* source, char* dest, int inputSize, int maxDestSize, int acceleration); -/* +/*! +LZ4_compress_destSize() : + Reverse the logic, by compressing as much data as possible from 'source' buffer + into already allocated buffer 'dest' of size 'targetDestSize'. + This function either compresses the entire 'source' content into 'dest' if it's large enough, + or fill 'dest' buffer completely with as much data as possible from 'source'. + *sourceSizePtr : will be modified to indicate how many bytes where read from 'source' to fill 'dest'. + New value is necessarily <= old value. + return : Nb bytes written into 'dest' (necessarily <= targetDestSize) + or 0 if compression fails +*/ +LZ4LIB_API int LZ4_compress_destSize (const char* source, char* dest, int* sourceSizePtr, int targetDestSize); + + +/*! LZ4_decompress_fast() : originalSize : is the original and therefore uncompressed size return : the number of bytes read from the source buffer (in other words, the compressed size) - If the source stream is malformed, the function will stop decoding and return a negative result. + If the source stream is detected malformed, the function will stop decoding and return a negative result. Destination buffer must be already allocated. Its size must be a minimum of 'originalSize' bytes. - note : This function is a bit faster than LZ4_decompress_safe() - It provides fast decompression and fully respect memory boundaries for properly formed compressed data. - It does not provide full protection against intentionnally modified data stream. - Use this function in a trusted environment (data to decode comes from a trusted source). + note : This function fully respect memory boundaries for properly formed compressed data. + It is a bit faster than LZ4_decompress_safe(). + However, it does not provide any protection against intentionally modified data stream (malicious input). + Use this function in trusted environment only (data to decode comes from a trusted source). */ -int LZ4_decompress_fast (const char* source, char* dest, int originalSize); - +LZ4LIB_API int LZ4_decompress_fast (const char* source, char* dest, int originalSize); -/* +/*! LZ4_decompress_safe_partial() : This function decompress a compressed block of size 'compressedSize' at position 'source' - into output buffer 'dest' of size 'maxOutputSize'. + into destination buffer 'dest' of size 'maxDecompressedSize'. The function tries to stop decompressing operation as soon as 'targetOutputSize' has been reached, reducing decompression time. - return : the number of bytes decoded in the destination buffer (necessarily <= maxOutputSize) + return : the number of bytes decoded in the destination buffer (necessarily <= maxDecompressedSize) Note : this number can be < 'targetOutputSize' should the compressed block to decode be smaller. Always control how many bytes were decoded. If the source stream is detected malformed, the function will stop decoding and return a negative result. This function never writes outside of output buffer, and never reads outside of input buffer. It is therefore protected against malicious data packets */ -int LZ4_decompress_safe_partial (const char* source, char* dest, int compressedSize, int targetOutputSize, int maxOutputSize); +LZ4LIB_API int LZ4_decompress_safe_partial (const char* source, char* dest, int compressedSize, int targetOutputSize, int maxDecompressedSize); -/*********************************************** - Experimental Streaming Compression Functions +/*-********************************************* +* Streaming Compression Functions ***********************************************/ +typedef union LZ4_stream_u LZ4_stream_t; /* incomplete type (defined later) */ -#define LZ4_STREAMSIZE_U32 ((1 << (LZ4_MEMORY_USAGE-2)) + 8) -#define LZ4_STREAMSIZE (LZ4_STREAMSIZE_U32 * sizeof(unsigned int)) -/* - * LZ4_stream_t - * information structure to track an LZ4 stream. - * important : set this structure content to zero before first use ! +/*! LZ4_createStream() and LZ4_freeStream() : + * LZ4_createStream() will allocate and initialize an `LZ4_stream_t` structure. + * LZ4_freeStream() releases its memory. */ -typedef struct { unsigned int table[LZ4_STREAMSIZE_U32]; } LZ4_stream_t; +LZ4LIB_API LZ4_stream_t* LZ4_createStream(void); +LZ4LIB_API int LZ4_freeStream (LZ4_stream_t* streamPtr); -/* - * If you prefer dynamic allocation methods, - * LZ4_createStream - * provides a pointer (void*) towards an initialized LZ4_stream_t structure. - * LZ4_free just frees it. +/*! LZ4_resetStream() : + * An LZ4_stream_t structure can be allocated once and re-used multiple times. + * Use this function to init an allocated `LZ4_stream_t` structure and start a new compression. */ -void* LZ4_createStream(); -int LZ4_free (void* LZ4_stream); +LZ4LIB_API void LZ4_resetStream (LZ4_stream_t* streamPtr); - -/* - * LZ4_loadDict - * Use this function to load a static dictionary into LZ4_stream. - * Any previous data will be forgotten, only 'dictionary' will remain in memory. - * Loading a size of 0 is allowed (same effect as init). - * Return : 1 if OK, 0 if error +/*! LZ4_loadDict() : + * Use this function to load a static dictionary into LZ4_stream. + * Any previous data will be forgotten, only 'dictionary' will remain in memory. + * Loading a size of 0 is allowed. + * Return : dictionary size, in bytes (necessarily <= 64 KB) */ -int LZ4_loadDict (void* LZ4_stream, const char* dictionary, int dictSize); +LZ4LIB_API int LZ4_loadDict (LZ4_stream_t* streamPtr, const char* dictionary, int dictSize); -/* - * LZ4_compress_continue - * Compress data block 'source', using blocks compressed before as dictionary to improve compression ratio - * Previous data blocks are assumed to still be present at their previous location. +/*! LZ4_compress_fast_continue() : + * Compress buffer content 'src', using data from previously compressed blocks as dictionary to improve compression ratio. + * Important : Previous data blocks are assumed to remain present and unmodified ! + * 'dst' buffer must be already allocated. + * If dstCapacity >= LZ4_compressBound(srcSize), compression is guaranteed to succeed, and runs faster. + * If not, and if compressed data cannot fit into 'dst' buffer size, compression stops, and function @return==0. + * After an error, the stream status is invalid, it can only be reset or freed. */ -int LZ4_compress_continue (void* LZ4_stream, const char* source, char* dest, int inputSize); +LZ4LIB_API int LZ4_compress_fast_continue (LZ4_stream_t* streamPtr, const char* src, char* dst, int srcSize, int dstCapacity, int acceleration); -/* - * LZ4_compress_limitedOutput_continue - * Same as before, but also specify a maximum target compressed size (maxOutputSize) - * If objective cannot be met, compression exits, and returns a zero. +/*! LZ4_saveDict() : + * If previously compressed data block is not guaranteed to remain available at its current memory location, + * save it into a safer place (char* safeBuffer). + * Note : it's not necessary to call LZ4_loadDict() after LZ4_saveDict(), dictionary is immediately usable. + * @return : saved dictionary size in bytes (necessarily <= dictSize), or 0 if error. */ -int LZ4_compress_limitedOutput_continue (void* LZ4_stream, const char* source, char* dest, int inputSize, int maxOutputSize); +LZ4LIB_API int LZ4_saveDict (LZ4_stream_t* streamPtr, char* safeBuffer, int dictSize); -/* - * LZ4_saveDict - * If previously compressed data block is not guaranteed to remain at its previous memory location - * save it into a safe place (char* safeBuffer) - * Note : you don't need to call LZ4_loadDict() afterwards, - * dictionary is immediately usable, you can therefore call again LZ4_compress_continue() - * Return : 1 if OK, 0 if error - * Note : any dictSize > 64 KB will be interpreted as 64KB. + +/*-********************************************** +* Streaming Decompression Functions +* Bufferless synchronous API +************************************************/ +typedef union LZ4_streamDecode_u LZ4_streamDecode_t; /* incomplete type (defined later) */ + +/*! LZ4_createStreamDecode() and LZ4_freeStreamDecode() : + * creation / destruction of streaming decompression tracking structure */ +LZ4LIB_API LZ4_streamDecode_t* LZ4_createStreamDecode(void); +LZ4LIB_API int LZ4_freeStreamDecode (LZ4_streamDecode_t* LZ4_stream); + +/*! LZ4_setStreamDecode() : + * Use this function to instruct where to find the dictionary. + * Setting a size of 0 is allowed (same effect as reset). + * @return : 1 if OK, 0 if error */ -int LZ4_saveDict (void* LZ4_stream, char* safeBuffer, int dictSize); +LZ4LIB_API int LZ4_setStreamDecode (LZ4_streamDecode_t* LZ4_streamDecode, const char* dictionary, int dictSize); +/*! LZ4_decompress_*_continue() : + * These decoding functions allow decompression of multiple blocks in "streaming" mode. + * Previously decoded blocks *must* remain available at the memory position where they were decoded (up to 64 KB) + * In the case of a ring buffers, decoding buffer must be either : + * - Exactly same size as encoding buffer, with same update rule (block boundaries at same positions) + * In which case, the decoding & encoding ring buffer can have any size, including very small ones ( < 64 KB). + * - Larger than encoding buffer, by a minimum of maxBlockSize more bytes. + * maxBlockSize is implementation dependent. It's the maximum size you intend to compress into a single block. + * In which case, encoding and decoding buffers do not need to be synchronized, + * and encoding ring buffer can have any size, including small ones ( < 64 KB). + * - _At least_ 64 KB + 8 bytes + maxBlockSize. + * In which case, encoding and decoding buffers do not need to be synchronized, + * and encoding ring buffer can have any size, including larger than decoding buffer. + * Whenever these conditions are not possible, save the last 64KB of decoded data into a safe buffer, + * and indicate where it is saved using LZ4_setStreamDecode() +*/ +LZ4LIB_API int LZ4_decompress_safe_continue (LZ4_streamDecode_t* LZ4_streamDecode, const char* source, char* dest, int compressedSize, int maxDecompressedSize); +LZ4LIB_API int LZ4_decompress_fast_continue (LZ4_streamDecode_t* LZ4_streamDecode, const char* source, char* dest, int originalSize); -/************************************************ - Experimental Streaming Decompression Functions -************************************************/ -#define LZ4_STREAMDECODESIZE_U32 4 -#define LZ4_STREAMDECODESIZE (LZ4_STREAMDECODESIZE_U32 * sizeof(unsigned int)) -/* - * LZ4_streamDecode_t - * information structure to track an LZ4 stream. - * important : set this structure content to zero before first use ! +/*! LZ4_decompress_*_usingDict() : + * These decoding functions work the same as + * a combination of LZ4_setStreamDecode() followed by LZ4_decompress_*_continue() + * They are stand-alone, and don't need an LZ4_streamDecode_t structure. */ -typedef struct { unsigned int table[LZ4_STREAMDECODESIZE_U32]; } LZ4_streamDecode_t; +LZ4LIB_API int LZ4_decompress_safe_usingDict (const char* source, char* dest, int compressedSize, int maxDecompressedSize, const char* dictStart, int dictSize); +LZ4LIB_API int LZ4_decompress_fast_usingDict (const char* source, char* dest, int originalSize, const char* dictStart, int dictSize); -/* - * If you prefer dynamic allocation methods, - * LZ4_createStreamDecode() - * provides a pointer (void*) towards an initialized LZ4_streamDecode_t structure. - * LZ4_free just frees it. + +/*^********************************************** + * !!!!!! STATIC LINKING ONLY !!!!!! + ***********************************************/ +/*-************************************ + * Private definitions + ************************************** + * Do not use these definitions. + * They are exposed to allow static allocation of `LZ4_stream_t` and `LZ4_streamDecode_t`. + * Using these definitions will expose code to API and/or ABI break in future versions of the library. + **************************************/ +#define LZ4_HASHLOG (LZ4_MEMORY_USAGE-2) +#define LZ4_HASHTABLESIZE (1 << LZ4_MEMORY_USAGE) +#define LZ4_HASH_SIZE_U32 (1 << LZ4_HASHLOG) /* required as macro for static allocation */ + +#if defined(__cplusplus) || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */) +#include + +typedef struct { + uint32_t hashTable[LZ4_HASH_SIZE_U32]; + uint32_t currentOffset; + uint32_t initCheck; + const uint8_t* dictionary; + uint8_t* bufferStart; /* obsolete, used for slideInputBuffer */ + uint32_t dictSize; +} LZ4_stream_t_internal; + +typedef struct { + const uint8_t* externalDict; + size_t extDictSize; + const uint8_t* prefixEnd; + size_t prefixSize; +} LZ4_streamDecode_t_internal; + +#else + +typedef struct { + unsigned int hashTable[LZ4_HASH_SIZE_U32]; + unsigned int currentOffset; + unsigned int initCheck; + const unsigned char* dictionary; + unsigned char* bufferStart; /* obsolete, used for slideInputBuffer */ + unsigned int dictSize; +} LZ4_stream_t_internal; + +typedef struct { + const unsigned char* externalDict; + size_t extDictSize; + const unsigned char* prefixEnd; + size_t prefixSize; +} LZ4_streamDecode_t_internal; + +#endif + +/*! + * LZ4_stream_t : + * information structure to track an LZ4 stream. + * init this structure before first use. + * note : only use in association with static linking ! + * this definition is not API/ABI safe, + * it may change in a future version ! */ -void* LZ4_createStreamDecode(); -int LZ4_free (void* LZ4_stream); /* yes, it's the same one as for compression */ +#define LZ4_STREAMSIZE_U64 ((1 << (LZ4_MEMORY_USAGE-3)) + 4) +#define LZ4_STREAMSIZE (LZ4_STREAMSIZE_U64 * sizeof(unsigned long long)) +union LZ4_stream_u { + unsigned long long table[LZ4_STREAMSIZE_U64]; + LZ4_stream_t_internal internal_donotuse; +} ; /* previously typedef'd to LZ4_stream_t */ -/* -*_continue() : - These decoding functions allow decompression of multiple blocks in "streaming" mode. - Previously decoded blocks must still be available at the memory position where they were decoded. - If it's not possible, save the relevant part of decoded data into a safe buffer, - and indicate where it stands using LZ4_setDictDecode() -*/ -int LZ4_decompress_safe_continue (void* LZ4_streamDecode, const char* source, char* dest, int compressedSize, int maxOutputSize); -int LZ4_decompress_fast_continue (void* LZ4_streamDecode, const char* source, char* dest, int originalSize); -/* - * LZ4_setDictDecode - * Use this function to instruct where to find the dictionary. - * This function can be used to specify a static dictionary, - * or to instruct where to find some previously decoded data saved into a different memory space. - * Setting a size of 0 is allowed (same effect as no dictionary). - * Return : 1 if OK, 0 if error +/*! + * LZ4_streamDecode_t : + * information structure to track an LZ4 stream during decompression. + * init this structure using LZ4_setStreamDecode (or memset()) before first use + * note : only use in association with static linking ! + * this definition is not API/ABI safe, + * and may change in a future version ! */ -int LZ4_setDictDecode (void* LZ4_streamDecode, const char* dictionary, int dictSize); +#define LZ4_STREAMDECODESIZE_U64 4 +#define LZ4_STREAMDECODESIZE (LZ4_STREAMDECODESIZE_U64 * sizeof(unsigned long long)) +union LZ4_streamDecode_u { + unsigned long long table[LZ4_STREAMDECODESIZE_U64]; + LZ4_streamDecode_t_internal internal_donotuse; +} ; /* previously typedef'd to LZ4_streamDecode_t */ -/* -Advanced decoding functions : -*_usingDict() : - These decoding functions work the same as - a combination of LZ4_setDictDecode() followed by LZ4_decompress_x_continue() - all together into a single function call. - It doesn't use nor update an LZ4_streamDecode_t structure. -*/ -int LZ4_decompress_safe_usingDict (const char* source, char* dest, int compressedSize, int maxOutputSize, const char* dictStart, int dictSize); -int LZ4_decompress_fast_usingDict (const char* source, char* dest, int originalSize, const char* dictStart, int dictSize); +/*-************************************ +* Obsolete Functions +**************************************/ + +/*! Deprecation warnings + Should deprecation warnings be a problem, + it is generally possible to disable them, + typically with -Wno-deprecated-declarations for gcc + or _CRT_SECURE_NO_WARNINGS in Visual. + Otherwise, it's also possible to define LZ4_DISABLE_DEPRECATE_WARNINGS */ +#ifdef LZ4_DISABLE_DEPRECATE_WARNINGS +# define LZ4_DEPRECATED(message) /* disable deprecation warnings */ +#else +# define LZ4_GCC_VERSION (__GNUC__ * 100 + __GNUC_MINOR__) +# if defined (__cplusplus) && (__cplusplus >= 201402) /* C++14 or greater */ +# define LZ4_DEPRECATED(message) [[deprecated(message)]] +# elif (LZ4_GCC_VERSION >= 405) || defined(__clang__) +# define LZ4_DEPRECATED(message) __attribute__((deprecated(message))) +# elif (LZ4_GCC_VERSION >= 301) +# define LZ4_DEPRECATED(message) __attribute__((deprecated)) +# elif defined(_MSC_VER) +# define LZ4_DEPRECATED(message) __declspec(deprecated(message)) +# else +# pragma message("WARNING: You need to implement LZ4_DEPRECATED for this compiler") +# define LZ4_DEPRECATED(message) +# endif +#endif /* LZ4_DISABLE_DEPRECATE_WARNINGS */ + +/* Obsolete compression functions */ +LZ4LIB_API LZ4_DEPRECATED("use LZ4_compress_default() instead") int LZ4_compress (const char* source, char* dest, int sourceSize); +LZ4LIB_API LZ4_DEPRECATED("use LZ4_compress_default() instead") int LZ4_compress_limitedOutput (const char* source, char* dest, int sourceSize, int maxOutputSize); +LZ4LIB_API LZ4_DEPRECATED("use LZ4_compress_fast_extState() instead") int LZ4_compress_withState (void* state, const char* source, char* dest, int inputSize); +LZ4LIB_API LZ4_DEPRECATED("use LZ4_compress_fast_extState() instead") int LZ4_compress_limitedOutput_withState (void* state, const char* source, char* dest, int inputSize, int maxOutputSize); +LZ4LIB_API LZ4_DEPRECATED("use LZ4_compress_fast_continue() instead") int LZ4_compress_continue (LZ4_stream_t* LZ4_streamPtr, const char* source, char* dest, int inputSize); +LZ4LIB_API LZ4_DEPRECATED("use LZ4_compress_fast_continue() instead") int LZ4_compress_limitedOutput_continue (LZ4_stream_t* LZ4_streamPtr, const char* source, char* dest, int inputSize, int maxOutputSize); + +/* Obsolete decompression functions */ +LZ4LIB_API LZ4_DEPRECATED("use LZ4_decompress_fast() instead") int LZ4_uncompress (const char* source, char* dest, int outputSize); +LZ4LIB_API LZ4_DEPRECATED("use LZ4_decompress_safe() instead") int LZ4_uncompress_unknownOutputSize (const char* source, char* dest, int isize, int maxOutputSize); + +/* Obsolete streaming functions; use new streaming interface whenever possible */ +LZ4LIB_API LZ4_DEPRECATED("use LZ4_createStream() instead") void* LZ4_create (char* inputBuffer); +LZ4LIB_API LZ4_DEPRECATED("use LZ4_createStream() instead") int LZ4_sizeofStreamState(void); +LZ4LIB_API LZ4_DEPRECATED("use LZ4_resetStream() instead") int LZ4_resetStreamState(void* state, char* inputBuffer); +LZ4LIB_API LZ4_DEPRECATED("use LZ4_saveDict() instead") char* LZ4_slideInputBuffer (void* state); + +/* Obsolete streaming decoding functions */ +LZ4LIB_API LZ4_DEPRECATED("use LZ4_decompress_safe_usingDict() instead") int LZ4_decompress_safe_withPrefix64k (const char* src, char* dst, int compressedSize, int maxDstSize); +LZ4LIB_API LZ4_DEPRECATED("use LZ4_decompress_fast_usingDict() instead") int LZ4_decompress_fast_withPrefix64k (const char* src, char* dst, int originalSize); +#endif /* LZ4_H_2983827168210 */ #if defined (__cplusplus) diff -Nru mozjs52-52.3.1/mfbt/moz.build mozjs52-52.8.1/mfbt/moz.build --- mozjs52-52.3.1/mfbt/moz.build 2017-08-08 10:25:53.000000000 +0000 +++ mozjs52-52.8.1/mfbt/moz.build 2018-06-08 12:27:13.000000000 +0000 @@ -87,6 +87,7 @@ 'StaticAnalysisFunctions.h', 'TaggedAnonymousMemory.h', 'TemplateLib.h', + 'TextUtils.h', 'ThreadLocal.h', 'ToString.h', 'Tuple.h', diff -Nru mozjs52-52.3.1/mfbt/tests/moz.build mozjs52-52.8.1/mfbt/tests/moz.build --- mozjs52-52.3.1/mfbt/tests/moz.build 2017-08-08 10:25:53.000000000 +0000 +++ mozjs52-52.8.1/mfbt/tests/moz.build 2018-06-08 12:27:13.000000000 +0000 @@ -42,6 +42,7 @@ 'TestSHA1', 'TestSplayTree', 'TestTemplateLib', + 'TestTextUtils', 'TestTuple', 'TestTypedEnum', 'TestTypeTraits', diff -Nru mozjs52-52.3.1/mfbt/tests/TestTextUtils.cpp mozjs52-52.8.1/mfbt/tests/TestTextUtils.cpp --- mozjs52-52.3.1/mfbt/tests/TestTextUtils.cpp 1970-01-01 00:00:00.000000000 +0000 +++ mozjs52-52.8.1/mfbt/tests/TestTextUtils.cpp 2018-06-08 12:27:13.000000000 +0000 @@ -0,0 +1,106 @@ +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim: set ts=8 sts=2 et sw=2 tw=80: */ +/* 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 "mozilla/Assertions.h" +#include "mozilla/TextUtils.h" + +using mozilla::IsAsciiAlpha; + +// char + +static_assert(!IsAsciiAlpha('@'), "'@' isn't ASCII alpha"); +static_assert('@' == 0x40, "'@' has value 0x40"); + +static_assert('A' == 0x41, "'A' has value 0x41"); +static_assert(IsAsciiAlpha('A'), "'A' is ASCII alpha"); +static_assert(IsAsciiAlpha('B'), "'B' is ASCII alpha"); +static_assert(IsAsciiAlpha('M'), "'M' is ASCII alpha"); +static_assert(IsAsciiAlpha('Y'), "'Y' is ASCII alpha"); +static_assert(IsAsciiAlpha('Z'), "'Z' is ASCII alpha"); + +static_assert('Z' == 0x5A, "'Z' has value 0x5A"); +static_assert('[' == 0x5B, "'[' has value 0x5B"); +static_assert(!IsAsciiAlpha('['), "'[' isn't ASCII alpha"); + +static_assert(!IsAsciiAlpha('`'), "'`' isn't ASCII alpha"); +static_assert('`' == 0x60, "'`' has value 0x60"); + +static_assert('a' == 0x61, "'a' has value 0x61"); +static_assert(IsAsciiAlpha('a'), "'a' is ASCII alpha"); +static_assert(IsAsciiAlpha('b'), "'b' is ASCII alpha"); +static_assert(IsAsciiAlpha('m'), "'m' is ASCII alpha"); +static_assert(IsAsciiAlpha('y'), "'y' is ASCII alpha"); +static_assert(IsAsciiAlpha('z'), "'z' is ASCII alpha"); + +static_assert('z' == 0x7A, "'z' has value 0x7A"); +static_assert('{' == 0x7B, "'{' has value 0x7B"); +static_assert(!IsAsciiAlpha('{'), "'{' isn't ASCII alpha"); + +// char16_t + +static_assert(!IsAsciiAlpha(u'@'), "u'@' isn't ASCII alpha"); +static_assert(u'@' == 0x40, "u'@' has value 0x40"); + +static_assert(u'A' == 0x41, "u'A' has value 0x41"); +static_assert(IsAsciiAlpha(u'A'), "u'A' is ASCII alpha"); +static_assert(IsAsciiAlpha(u'B'), "u'B' is ASCII alpha"); +static_assert(IsAsciiAlpha(u'M'), "u'M' is ASCII alpha"); +static_assert(IsAsciiAlpha(u'Y'), "u'Y' is ASCII alpha"); +static_assert(IsAsciiAlpha(u'Z'), "u'Z' is ASCII alpha"); + +static_assert(u'Z' == 0x5A, "u'Z' has value 0x5A"); +static_assert(u'[' == 0x5B, "u'[' has value 0x5B"); +static_assert(!IsAsciiAlpha(u'['), "u'[' isn't ASCII alpha"); + +static_assert(!IsAsciiAlpha(u'`'), "u'`' isn't ASCII alpha"); +static_assert(u'`' == 0x60, "u'`' has value 0x60"); + +static_assert(u'a' == 0x61, "u'a' has value 0x61"); +static_assert(IsAsciiAlpha(u'a'), "u'a' is ASCII alpha"); +static_assert(IsAsciiAlpha(u'b'), "u'b' is ASCII alpha"); +static_assert(IsAsciiAlpha(u'm'), "u'm' is ASCII alpha"); +static_assert(IsAsciiAlpha(u'y'), "u'y' is ASCII alpha"); +static_assert(IsAsciiAlpha(u'z'), "u'z' is ASCII alpha"); + +static_assert(u'z' == 0x7A, "u'z' has value 0x7A"); +static_assert(u'{' == 0x7B, "u'{' has value 0x7B"); +static_assert(!IsAsciiAlpha(u'{'), "u'{' isn't ASCII alpha"); + +// char32_t + +static_assert(!IsAsciiAlpha(U'@'), "U'@' isn't ASCII alpha"); +static_assert(U'@' == 0x40, "U'@' has value 0x40"); + +static_assert(U'A' == 0x41, "U'A' has value 0x41"); +static_assert(IsAsciiAlpha(U'A'), "U'A' is ASCII alpha"); +static_assert(IsAsciiAlpha(U'B'), "U'B' is ASCII alpha"); +static_assert(IsAsciiAlpha(U'M'), "U'M' is ASCII alpha"); +static_assert(IsAsciiAlpha(U'Y'), "U'Y' is ASCII alpha"); +static_assert(IsAsciiAlpha(U'Z'), "U'Z' is ASCII alpha"); + +static_assert(U'Z' == 0x5A, "U'Z' has value 0x5A"); +static_assert(U'[' == 0x5B, "U'[' has value 0x5B"); +static_assert(!IsAsciiAlpha(U'['), "U'[' isn't ASCII alpha"); + +static_assert(!IsAsciiAlpha(U'`'), "U'`' isn't ASCII alpha"); +static_assert(U'`' == 0x60, "U'`' has value 0x60"); + +static_assert(U'a' == 0x61, "U'a' has value 0x61"); +static_assert(IsAsciiAlpha(U'a'), "U'a' is ASCII alpha"); +static_assert(IsAsciiAlpha(U'b'), "U'b' is ASCII alpha"); +static_assert(IsAsciiAlpha(U'm'), "U'm' is ASCII alpha"); +static_assert(IsAsciiAlpha(U'y'), "U'y' is ASCII alpha"); +static_assert(IsAsciiAlpha(U'z'), "U'z' is ASCII alpha"); + +static_assert(U'z' == 0x7A, "U'z' has value 0x7A"); +static_assert(U'{' == 0x7B, "U'{' has value 0x7B"); +static_assert(!IsAsciiAlpha(U'{'), "U'{' isn't ASCII alpha"); + +int +main() +{ + return 0; +} diff -Nru mozjs52-52.3.1/mfbt/TextUtils.h mozjs52-52.8.1/mfbt/TextUtils.h --- mozjs52-52.3.1/mfbt/TextUtils.h 1970-01-01 00:00:00.000000000 +0000 +++ mozjs52-52.8.1/mfbt/TextUtils.h 2018-06-08 12:27:13.000000000 +0000 @@ -0,0 +1,58 @@ +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim: set ts=8 sts=2 et sw=2 tw=80: */ +/* 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/. */ + +/* Character/text operations. */ + +#ifndef mozilla_TextUtils_h +#define mozilla_TextUtils_h + +#include "mozilla/TypeTraits.h" + +namespace mozilla { + +namespace detail { + +template +class MakeUnsignedChar + : public MakeUnsigned +{}; + +template<> +class MakeUnsignedChar +{ +public: + using Type = char16_t; +}; + +template<> +class MakeUnsignedChar +{ +public: + using Type = char32_t; +}; + +} // namespace detail + +/** + * Returns true iff |aChar| matches [a-zA-Z]. + * + * This function is basically what you thought isalpha was, except its behavior + * doesn't depend on the user's current locale. + */ +template +constexpr bool +IsAsciiAlpha(Char aChar) +{ + using UnsignedChar = typename detail::MakeUnsignedChar::Type; + return ('a' <= static_cast(aChar) && + static_cast(aChar) <= 'z') || + ('A' <= static_cast(aChar) && + static_cast(aChar) <= 'Z'); +} + +} // namespace mozilla + +#endif /* mozilla_TextUtils_h */ diff -Nru mozjs52-52.3.1/mfbt/WindowsVersion.h mozjs52-52.8.1/mfbt/WindowsVersion.h --- mozjs52-52.3.1/mfbt/WindowsVersion.h 2017-08-08 10:25:53.000000000 +0000 +++ mozjs52-52.8.1/mfbt/WindowsVersion.h 2018-06-08 12:27:13.000000000 +0000 @@ -190,6 +190,41 @@ IsWindowsBuildOrLater(7600); } +MOZ_ALWAYS_INLINE bool +IsWin7AndPre2000Compatible() { + /* + * See Bug 1279171. + * We'd like to avoid using WMF on specific OS version when compatibility + * mode is in effect. The purpose of this function is to check if FF runs on + * Win7 OS with application compatibility mode being set to 95/98/ME. + * Those compatibility mode options (95/98/ME) can only display and + * be selected for 32-bit application. + * If the compatibility mode is in effect, the GetVersionEx function will + * report the OS as it identifies itself, which may not be the OS that is + * installed. + * Note : 1) We only target for Win7 build number greater than 7600. + * 2) GetVersionEx may be altered or unavailable for release after + * Win8.1. Set pragma to avoid build warning as error. + */ + bool isWin7 = IsNotWin7PreRTM() && !IsWin8OrLater(); + if (!isWin7) { + return false; + } + + OSVERSIONINFOEX info; + ZeroMemory(&info, sizeof(OSVERSIONINFOEX)); + + info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX); +#pragma warning(push) +#pragma warning(disable:4996) + bool success = GetVersionEx((LPOSVERSIONINFO) &info); +#pragma warning(pop) + if (!success) { + return false; + } + return info.dwMajorVersion < 5; +} + } // namespace mozilla #endif /* mozilla_WindowsVersion_h */