Hex Artifact Content

Artifact 6c6574463734a9bd6ebc7e8349888795a5bff1f0:


0000: 41 43 5f 44 45 46 55 4e 28 44 43 5f 53 45 54 56  AC_DEFUN(DC_SETV
0010: 45 52 53 49 4f 4e 53 43 52 49 50 54 2c 20 5b 0a  ERSIONSCRIPT, [.
0020: 09 56 45 52 53 49 4f 4e 53 43 52 49 50 54 3d 22  .VERSIONSCRIPT="
0030: 24 31 22 0a 09 53 59 4d 46 49 4c 45 3d 22 24 32  $1"..SYMFILE="$2
0040: 22 0a 0a 09 64 65 6c 65 74 65 5f 73 79 6d 66 69  "...delete_symfi
0050: 6c 65 3d 27 30 27 0a 09 69 66 20 74 65 73 74 20  le='0'..if test 
0060: 21 20 2d 66 20 22 24 7b 53 59 4d 46 49 4c 45 7d  ! -f "${SYMFILE}
0070: 22 3b 20 74 68 65 6e 0a 09 09 64 65 6c 65 74 65  "; then...delete
0080: 5f 73 79 6d 66 69 6c 65 3d 27 31 27 0a 0a 09 09  _symfile='1'....
0090: 65 63 68 6f 20 27 27 20 3e 20 22 24 7b 53 59 4d  echo '' > "${SYM
00a0: 46 49 4c 45 7d 22 0a 09 66 69 0a 0a 09 53 41 56  FILE}"..fi...SAV
00b0: 45 5f 4c 44 46 4c 41 47 53 3d 22 24 7b 4c 44 46  E_LDFLAGS="${LDF
00c0: 4c 41 47 53 7d 22 0a 0a 09 41 43 5f 4d 53 47 5f  LAGS}"...AC_MSG_
00d0: 43 48 45 43 4b 49 4e 47 28 5b 66 6f 72 20 68 6f  CHECKING([for ho
00e0: 77 20 74 6f 20 73 65 74 20 76 65 72 73 69 6f 6e  w to set version
00f0: 20 73 63 72 69 70 74 5d 29 0a 0a 09 66 6f 72 20   script])...for 
0100: 74 72 79 61 64 64 6c 64 66 6c 61 67 73 20 69 6e  tryaddldflags in
0110: 20 22 2d 57 6c 2c 2d 2d 76 65 72 73 69 6f 6e 2d   "-Wl,--version-
0120: 73 63 72 69 70 74 20 2d 57 6c 2c 24 7b 56 45 52  script -Wl,${VER
0130: 53 49 4f 4e 53 43 52 49 50 54 7d 22 20 22 2d 57  SIONSCRIPT}" "-W
0140: 6c 2c 2d 65 78 70 6f 72 74 65 64 5f 73 79 6d 62  l,-exported_symb
0150: 6f 6c 73 5f 6c 69 73 74 20 2d 57 6c 2c 24 7b 53  ols_list -Wl,${S
0160: 59 4d 46 49 4c 45 7d 22 3b 20 64 6f 0a 09 09 4c  YMFILE}"; do...L
0170: 44 46 4c 41 47 53 3d 22 24 7b 53 41 56 45 5f 4c  DFLAGS="${SAVE_L
0180: 44 46 4c 41 47 53 7d 20 24 7b 74 72 79 61 64 64  DFLAGS} ${tryadd
0190: 6c 64 66 6c 61 67 73 7d 22 0a 09 09 41 43 5f 54  ldflags}"...AC_T
01a0: 52 59 5f 4c 49 4e 4b 28 5b 5d 2c 20 5b 5d 2c 20  RY_LINK([], [], 
01b0: 5b 0a 09 09 09 61 64 64 6c 64 66 6c 61 67 73 3d  [....addldflags=
01c0: 22 24 7b 74 72 79 61 64 64 6c 64 66 6c 61 67 73  "${tryaddldflags
01d0: 7d 22 0a 0a 09 09 09 62 72 65 61 6b 0a 09 09 5d  }".....break...]
01e0: 29 0a 09 64 6f 6e 65 0a 0a 09 69 66 20 74 65 73  )..done...if tes
01f0: 74 20 22 24 7b 64 65 6c 65 74 65 5f 73 79 6d 66  t "${delete_symf
0200: 69 6c 65 7d 22 20 3d 20 22 31 22 3b 20 74 68 65  ile}" = "1"; the
0210: 6e 0a 09 09 72 6d 20 2d 66 20 22 24 7b 53 59 4d  n...rm -f "${SYM
0220: 46 49 4c 45 7d 22 0a 09 66 69 0a 0a 09 69 66 20  FILE}"..fi...if 
0230: 74 65 73 74 20 2d 6e 20 22 24 7b 61 64 64 6c 64  test -n "${addld
0240: 66 6c 61 67 73 7d 22 3b 20 74 68 65 6e 0a 09 09  flags}"; then...
0250: 4c 44 46 4c 41 47 53 3d 22 24 7b 53 41 56 45 5f  LDFLAGS="${SAVE_
0260: 4c 44 46 4c 41 47 53 7d 20 24 7b 61 64 64 6c 64  LDFLAGS} ${addld
0270: 66 6c 61 67 73 7d 22 0a 09 09 41 43 5f 4d 53 47  flags}"...AC_MSG
0280: 5f 52 45 53 55 4c 54 28 24 61 64 64 6c 64 66 6c  _RESULT($addldfl
0290: 61 67 73 29 0a 09 65 6c 73 65 0a 09 09 4c 44 46  ags)..else...LDF
02a0: 4c 41 47 53 3d 22 24 7b 53 41 56 45 5f 4c 44 46  LAGS="${SAVE_LDF
02b0: 4c 41 47 53 7d 22 0a 09 09 41 43 5f 4d 53 47 5f  LAGS}"...AC_MSG_
02c0: 52 45 53 55 4c 54 28 5b 64 6f 6e 27 74 20 6b 6e  RESULT([don't kn
02d0: 6f 77 5d 29 0a 09 66 69 0a 5d 29 0a 0a 41 43 5f  ow])..fi.])..AC_
02e0: 44 45 46 55 4e 28 44 43 5f 46 49 4e 44 5f 53 54  DEFUN(DC_FIND_ST
02f0: 52 49 50 5f 41 4e 44 5f 52 45 4d 4f 56 45 53 59  RIP_AND_REMOVESY
0300: 4d 53 2c 20 5b 0a 09 53 59 4d 46 49 4c 45 3d 22  MS, [..SYMFILE="
0310: 24 31 22 0a 0a 09 64 6e 6c 20 44 65 74 65 72 6d  $1"...dnl Determ
0320: 69 6e 65 20 68 6f 77 20 74 6f 20 73 74 72 69 70  ine how to strip
0330: 20 65 78 65 63 75 74 61 62 6c 65 73 0a 09 41 43   executables..AC
0340: 5f 43 48 45 43 4b 5f 54 4f 4f 4c 53 28 4f 42 4a  _CHECK_TOOLS(OBJ
0350: 43 4f 50 59 2c 20 6f 62 6a 63 6f 70 79 20 67 6f  COPY, objcopy go
0360: 62 6a 63 6f 70 79 2c 20 5b 66 61 6c 73 65 5d 29  bjcopy, [false])
0370: 0a 09 41 43 5f 43 48 45 43 4b 5f 54 4f 4f 4c 53  ..AC_CHECK_TOOLS
0380: 28 53 54 52 49 50 2c 20 73 74 72 69 70 20 67 73  (STRIP, strip gs
0390: 74 72 69 70 2c 20 5b 66 61 6c 73 65 5d 29 0a 0a  trip, [false])..
03a0: 09 69 66 20 74 65 73 74 20 22 78 24 7b 53 54 52  .if test "x${STR
03b0: 49 50 7d 22 20 3d 20 22 78 66 61 6c 73 65 22 3b  IP}" = "xfalse";
03c0: 20 74 68 65 6e 0a 09 09 53 54 52 49 50 3d 22 24   then...STRIP="$
03d0: 7b 4f 42 4a 43 4f 50 59 7d 22 0a 09 66 69 0a 0a  {OBJCOPY}"..fi..
03e0: 09 57 45 41 4b 45 4e 53 59 4d 53 3d 27 74 72 75  .WEAKENSYMS='tru
03f0: 65 27 0a 09 52 45 4d 4f 56 45 53 59 4d 53 3d 27  e'..REMOVESYMS='
0400: 74 72 75 65 27 0a 09 53 59 4d 50 52 45 46 49 58  true'..SYMPREFIX
0410: 3d 27 27 0a 0a 09 63 61 73 65 20 24 68 6f 73 74  =''...case $host
0420: 5f 6f 73 20 69 6e 0a 09 09 64 61 72 77 69 6e 2a  _os in...darwin*
0430: 29 0a 09 09 09 52 45 4d 4f 56 45 53 59 4d 53 3d  )....REMOVESYMS=
0440: 22 24 7b 53 54 52 49 50 7d 20 2d 69 20 2d 75 20  "${STRIP} -i -u 
0450: 2d 73 20 24 7b 53 59 4d 46 49 4c 45 7d 22 0a 09  -s ${SYMFILE}"..
0460: 09 09 53 59 4d 50 52 45 46 49 58 3d 22 5f 22 0a  ..SYMPREFIX="_".
0470: 09 09 09 3b 3b 0a 09 09 2a 29 0a 09 09 09 69 66  ...;;...*)....if
0480: 20 74 65 73 74 20 22 78 24 7b 4f 42 4a 43 4f 50   test "x${OBJCOP
0490: 59 7d 22 20 21 3d 20 22 78 66 61 6c 73 65 22 3b  Y}" != "xfalse";
04a0: 20 74 68 65 6e 0a 09 09 09 09 57 45 41 4b 45 4e   then.....WEAKEN
04b0: 53 59 4d 53 3d 22 24 7b 4f 42 4a 43 4f 50 59 7d  SYMS="${OBJCOPY}
04c0: 20 2d 2d 6b 65 65 70 2d 67 6c 6f 62 61 6c 2d 73   --keep-global-s
04d0: 79 6d 62 6f 6c 73 3d 24 7b 53 59 4d 46 49 4c 45  ymbols=${SYMFILE
04e0: 7d 22 0a 09 09 09 09 52 45 4d 4f 56 45 53 59 4d  }".....REMOVESYM
04f0: 53 3d 22 24 7b 4f 42 4a 43 4f 50 59 7d 20 2d 2d  S="${OBJCOPY} --
0500: 64 69 73 63 61 72 64 2d 61 6c 6c 22 0a 09 09 09  discard-all"....
0510: 65 6c 69 66 20 74 65 73 74 20 22 78 24 7b 53 54  elif test "x${ST
0520: 52 49 50 7d 22 20 21 3d 20 22 78 66 61 6c 73 65  RIP}" != "xfalse
0530: 22 3b 20 74 68 65 6e 0a 09 09 09 09 52 45 4d 4f  "; then.....REMO
0540: 56 45 53 59 4d 53 3d 22 24 7b 53 54 52 49 50 7d  VESYMS="${STRIP}
0550: 20 2d 78 22 0a 09 09 09 66 69 0a 09 09 09 3b 3b   -x"....fi....;;
0560: 0a 09 65 73 61 63 0a 0a 09 41 43 5f 53 55 42 53  ..esac...AC_SUBS
0570: 54 28 57 45 41 4b 45 4e 53 59 4d 53 29 0a 09 41  T(WEAKENSYMS)..A
0580: 43 5f 53 55 42 53 54 28 52 45 4d 4f 56 45 53 59  C_SUBST(REMOVESY
0590: 4d 53 29 0a 09 41 43 5f 53 55 42 53 54 28 53 59  MS)..AC_SUBST(SY
05a0: 4d 50 52 45 46 49 58 29 0a 5d 29 0a              MPREFIX).]).