@@ -287,10 +287,11 @@ } function buildCACKey() { local platform local file copied + local targets platform="$1" shift if [ -z "${platform}" ]; then @@ -307,11 +308,11 @@ ./configure --with-pcsc-headers="${cackeyChromeExtPCSCLiteDir}/include/PCSC" --with-pcsc-libs="${PCSC_LIBS}" "$@" || exit 1 make || exit 1 ) || return 1 copied='0' - for file in ../../libcackey{,_g}.{so,dll,dylib}; do + for file in ../../libcackey{,_g}.{so,dll,dylib,a}; do if [ -f "${file}" ]; then mkdir -p "${outdir}/${platform}" cp "${file}" "${outdir}/${platform}" copied='1' @@ -345,22 +346,10 @@ buildPCSCLite || exit 1 buildCACKey build || exit 1 -buildOutputType="$(echo 'int main(int argc, char **argv) { return(0); }' | "${CC:-cc}" -x c - -o /dev/stdout | file -)" || exit 1 -case "${buildOutputType}" in - *x86-64*) - naclTopDir='linux_x86_glibc' - naclPlatform='x86_64-nacl' - ;; - *) - echo "error: Unrecognized platform output: \"${buildOutputType}\"" >&2 - - exit 1 - ;; -esac -PATH="${PATH}:${NACL_SDK_ROOT}/toolchain/${naclTopDir}/bin" buildCACKey "${naclPlatform}" --host="${naclPlatform}" CC=${naclPlatform}-gcc LD=${naclPlatform}-ld OBJCOPY=${naclPlatform}-objcopy STRIP=${naclPlatform}-strip || exit 1 +PATH="${PATH}:${NACL_SDK_ROOT}/toolchain/linux_pnacl/bin" buildCACKey pnacl --host="nacl" CC=pnacl-clang LD=pnacl-ld OBJCOPY=pnacl-objcopy STRIP=pnacl-strip AR=pnacl-ar RANLIB=pnacl-ranlib cackey_cv_pcsc_works=okay || exit 1 cleanup exit 0