| OLD | NEW |
| 1 #!/bin/bash | 1 #!/bin/bash |
| 2 # Copyright (c) 2015 The Native Client Authors. All rights reserved. | 2 # Copyright (c) 2015 The Native Client Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 # Samba doesn't seem to support building outside the source tree. | 6 # Samba doesn't seem to support building outside the source tree. |
| 7 BUILD_DIR=${SRC_DIR} | 7 BUILD_DIR=${SRC_DIR} |
| 8 | 8 |
| 9 EnableGlibcCompat | 9 EnableGlibcCompat |
| 10 | 10 |
| 11 ConfigureStep() { | 11 ConfigureStep() { |
| 12 conf_build=$(/bin/sh "${SCRIPT_DIR}/config.guess") | |
| 13 NACLPORTS_CPPFLAGS+=" -DFAKE_GET_INTERFACES=1" | 12 NACLPORTS_CPPFLAGS+=" -DFAKE_GET_INTERFACES=1" |
| 14 NACLPORTS_CPPFLAGS="${NACLPORTS_CPPFLAGS/-fdiagnostics-color=auto/}" | 13 NACLPORTS_CPPFLAGS="${NACLPORTS_CPPFLAGS/-fdiagnostics-color=auto/}" |
| 15 NACLPORTS_LDFLAGS="${NACLPORTS_CPPFLAGS/-fdiagnostics-color=auto/}" | 14 NACLPORTS_LDFLAGS="${NACLPORTS_CPPFLAGS/-fdiagnostics-color=auto/}" |
| 16 SetupCrossEnvironment | 15 SetupCrossEnvironment |
| 17 | 16 |
| 18 local CONFIGURE=${NACL_CONFIGURE_PATH:-${SRC_DIR}/configure} | |
| 19 local conf_host=${NACL_CROSS_PREFIX} | |
| 20 if [ "${NACL_ARCH}" = "pnacl" -o "${NACL_ARCH}" = "emscripten" ]; then | |
| 21 # The PNaCl tools use "pnacl-" as the prefix, but config.sub | |
| 22 # does not know about "pnacl". It only knows about "le32-nacl". | |
| 23 # Unfortunately, most of the config.subs here are so old that | |
| 24 # it doesn't know about that "le32" either. So we just say "nacl". | |
| 25 conf_host="nacl" | |
| 26 fi | |
| 27 | |
| 28 # Inject a shim that speed up pnacl invocations for configure. | 17 # Inject a shim that speed up pnacl invocations for configure. |
| 29 if [ "${NACL_ARCH}" = "pnacl" ]; then | 18 if [ "${NACL_ARCH}" = "pnacl" ]; then |
| 30 local PNACL_CONF_SHIM="${TOOLS_DIR}/pnacl-configure-shim.py" | 19 local PNACL_CONF_SHIM="${TOOLS_DIR}/pnacl-configure-shim.py" |
| 31 CC="${PNACL_CONF_SHIM} ${CC}" | 20 CC="${PNACL_CONF_SHIM} ${CC}" |
| 32 fi | 21 fi |
| 33 | 22 |
| 34 CC="${START_DIR}/cc_shim.sh ${CC}" | 23 CC="${START_DIR}/cc_shim.sh ${CC}" |
| 35 | 24 |
| 36 # Specify both --build and --host options. This forces autoconf into cross | 25 # Specify both --build and --host options. This forces autoconf into cross |
| 37 # compile mode. This is useful since the autodection doesn't always works. | 26 # compile mode. This is useful since the autodection doesn't always works. |
| 38 # For example a trivial PNaCl binary can sometimes run on the linux host if | 27 # For example a trivial PNaCl binary can sometimes run on the linux host if |
| 39 # it has the correct LLVM bimfmt support. What is more, autoconf will | 28 # it has the correct LLVM bimfmt support. What is more, autoconf will |
| 40 # generate a warning if only --host is specified. | 29 # generate a warning if only --host is specified. |
| 41 LogExecute "${CONFIGURE}" \ | 30 LogExecute "${SRC_DIR}/configure" \ |
| 42 --build=${conf_build} \ | 31 --build=${CONF_BUILD} \ |
| 43 --hostcc=gcc \ | 32 --hostcc=gcc \ |
| 44 --cross-compile \ | 33 --cross-compile \ |
| 45 --cross-answers=${START_DIR}/answers \ | 34 --cross-answers=${START_DIR}/answers \ |
| 46 --prefix=${PREFIX} | 35 --prefix=${PREFIX} |
| 47 } | 36 } |
| 48 | 37 |
| 49 BuildStep() { | 38 BuildStep() { |
| 50 WAF_ARGS="--targets=smbclient" | 39 WAF_ARGS="--targets=smbclient" |
| 51 if [ "${VERBOSE:-}" = "1" ]; then | 40 if [ "${VERBOSE:-}" = "1" ]; then |
| 52 WAF_ARGS+=" -v" | 41 WAF_ARGS+=" -v" |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 LogExecute ln -sf libwind-samba4.so libwind-samba4.so.0 | 85 LogExecute ln -sf libwind-samba4.so libwind-samba4.so.0 |
| 97 LogExecute ln -sf libtevent.so libtevent.so.0 | 86 LogExecute ln -sf libtevent.so libtevent.so.0 |
| 98 LogExecute ln -sf libgssapi-samba4.so libgssapi-samba4.so.2 | 87 LogExecute ln -sf libgssapi-samba4.so libgssapi-samba4.so.2 |
| 99 LogExecute ln -sf libhcrypto-samba4.so libhcrypto-samba4.so.5 | 88 LogExecute ln -sf libhcrypto-samba4.so libhcrypto-samba4.so.5 |
| 100 LogExecute ln -sf libheimbase-samba4.so libheimbase-samba4.so.1 | 89 LogExecute ln -sf libheimbase-samba4.so libheimbase-samba4.so.1 |
| 101 LogExecute ln -sf libndr-krb5pac.so libndr-krb5pac.so.0 | 90 LogExecute ln -sf libndr-krb5pac.so libndr-krb5pac.so.0 |
| 102 LogExecute ln -sf libtevent-util.so libtevent-util.so.0 | 91 LogExecute ln -sf libtevent-util.so libtevent-util.so.0 |
| 103 LogExecute ln -sf libsamba-credentials.so libsamba-credentials.so.0 | 92 LogExecute ln -sf libsamba-credentials.so libsamba-credentials.so.0 |
| 104 LogExecute ln -sf libsamba-hostconfig.so libsamba-hostconfig.so.0 | 93 LogExecute ln -sf libsamba-hostconfig.so libsamba-hostconfig.so.0 |
| 105 } | 94 } |
| OLD | NEW |