Hex Artifact Content

Artifact 9ca31dd769bb68c8e46536d69378460da5d827a2:


0000: 64 6e 6c 20 55 73 61 67 65 3a 0a 64 6e 6c 20 20  dnl Usage:.dnl  
0010: 20 20 44 43 5f 54 45 53 54 5f 53 48 4f 42 4a 46    DC_TEST_SHOBJF
0020: 4c 41 47 53 28 73 68 6f 62 6a 66 6c 61 67 73 2c  LAGS(shobjflags,
0030: 20 73 68 6f 62 6a 6c 64 66 6c 61 67 73 2c 20 61   shobjldflags, a
0040: 63 74 69 6f 6e 2d 69 66 2d 6e 6f 74 2d 66 6f 75  ction-if-not-fou
0050: 6e 64 29 0a 64 6e 6c 0a 41 43 5f 44 45 46 55 4e  nd).dnl.AC_DEFUN
0060: 28 44 43 5f 54 45 53 54 5f 53 48 4f 42 4a 46 4c  (DC_TEST_SHOBJFL
0070: 41 47 53 2c 20 5b 0a 20 20 41 43 5f 53 55 42 53  AGS, [.  AC_SUBS
0080: 54 28 53 48 4f 42 4a 46 4c 41 47 53 29 0a 20 20  T(SHOBJFLAGS).  
0090: 41 43 5f 53 55 42 53 54 28 53 48 4f 42 4a 4c 44  AC_SUBST(SHOBJLD
00a0: 46 4c 41 47 53 29 0a 0a 20 20 4f 4c 44 5f 4c 44  FLAGS)..  OLD_LD
00b0: 46 4c 41 47 53 3d 22 24 4c 44 46 4c 41 47 53 22  FLAGS="$LDFLAGS"
00c0: 0a 20 20 53 48 4f 42 4a 46 4c 41 47 53 3d 22 22  .  SHOBJFLAGS=""
00d0: 0a 0a 20 20 4c 44 46 4c 41 47 53 3d 22 24 4f 4c  ..  LDFLAGS="$OL
00e0: 44 5f 4c 44 46 4c 41 47 53 20 24 31 20 24 32 22  D_LDFLAGS $1 $2"
00f0: 0a 0a 20 20 41 43 5f 54 52 59 5f 4c 49 4e 4b 28  ..  AC_TRY_LINK(
0100: 5b 23 69 6e 63 6c 75 64 65 20 3c 73 74 64 69 6f  [#include <stdio
0110: 2e 68 3e 0a 69 6e 74 20 75 6e 72 65 73 74 73 74  .h>.int unrestst
0120: 28 76 6f 69 64 29 3b 5d 2c 20 5b 20 70 72 69 6e  (void);], [ prin
0130: 74 66 28 22 6f 6b 61 79 5c 6e 22 29 3b 20 75 6e  tf("okay\n"); un
0140: 72 65 73 74 73 74 28 29 3b 20 72 65 74 75 72 6e  restst(); return
0150: 28 30 29 3b 20 5d 2c 20 5b 20 53 48 4f 42 4a 46  (0); ], [ SHOBJF
0160: 4c 41 47 53 3d 22 24 31 22 3b 20 53 48 4f 42 4a  LAGS="$1"; SHOBJ
0170: 4c 44 46 4c 41 47 53 3d 22 24 32 22 20 5d 2c 20  LDFLAGS="$2" ], 
0180: 5b 0a 20 20 20 20 4c 44 46 4c 41 47 53 3d 22 24  [.    LDFLAGS="$
0190: 4f 4c 44 5f 4c 44 46 4c 41 47 53 22 0a 20 20 20  OLD_LDFLAGS".   
01a0: 20 24 33 0a 20 20 5d 29 0a 0a 20 20 4c 44 46 4c   $3.  ])..  LDFL
01b0: 41 47 53 3d 22 24 4f 4c 44 5f 4c 44 46 4c 41 47  AGS="$OLD_LDFLAG
01c0: 53 22 0a 5d 29 0a 0a 41 43 5f 44 45 46 55 4e 28  S".])..AC_DEFUN(
01d0: 44 43 5f 47 45 54 5f 53 48 4f 42 4a 46 4c 41 47  DC_GET_SHOBJFLAG
01e0: 53 2c 20 5b 0a 20 20 41 43 5f 53 55 42 53 54 28  S, [.  AC_SUBST(
01f0: 53 48 4f 42 4a 46 4c 41 47 53 29 0a 20 20 41 43  SHOBJFLAGS).  AC
0200: 5f 53 55 42 53 54 28 53 48 4f 42 4a 4c 44 46 4c  _SUBST(SHOBJLDFL
0210: 41 47 53 29 0a 0a 20 20 41 43 5f 4d 53 47 5f 43  AGS)..  AC_MSG_C
0220: 48 45 43 4b 49 4e 47 28 68 6f 77 20 74 6f 20 63  HECKING(how to c
0230: 72 65 61 74 65 20 73 68 61 72 65 64 20 6f 62 6a  reate shared obj
0240: 65 63 74 73 29 0a 0a 20 20 69 66 20 74 65 73 74  ects)..  if test
0250: 20 2d 7a 20 22 24 53 48 4f 42 4a 46 4c 41 47 53   -z "$SHOBJFLAGS
0260: 22 20 2d 61 20 2d 7a 20 22 24 53 48 4f 42 4a 4c  " -a -z "$SHOBJL
0270: 44 46 4c 41 47 53 22 3b 20 74 68 65 6e 0a 20 20  DFLAGS"; then.  
0280: 20 20 44 43 5f 54 45 53 54 5f 53 48 4f 42 4a 46    DC_TEST_SHOBJF
0290: 4c 41 47 53 28 5b 2d 66 50 49 43 20 2d 44 50 49  LAGS([-fPIC -DPI
02a0: 43 5d 2c 20 5b 2d 73 68 61 72 65 64 20 2d 72 64  C], [-shared -rd
02b0: 79 6e 61 6d 69 63 5d 2c 20 5b 0a 20 20 20 20 20  ynamic], [.     
02c0: 20 44 43 5f 54 45 53 54 5f 53 48 4f 42 4a 46 4c   DC_TEST_SHOBJFL
02d0: 41 47 53 28 5b 2d 66 50 49 43 20 2d 44 50 49 43  AGS([-fPIC -DPIC
02e0: 5d 2c 20 5b 2d 73 68 61 72 65 64 5d 2c 20 5b 0a  ], [-shared], [.
02f0: 09 44 43 5f 54 45 53 54 5f 53 48 4f 42 4a 46 4c  .DC_TEST_SHOBJFL
0300: 41 47 53 28 5b 2d 66 50 49 43 20 2d 44 50 49 43  AGS([-fPIC -DPIC
0310: 5d 2c 20 5b 2d 73 68 61 72 65 64 20 2d 72 64 79  ], [-shared -rdy
0320: 6e 61 6d 69 63 20 2d 6d 69 6d 70 75 72 65 2d 74  namic -mimpure-t
0330: 65 78 74 5d 2c 20 5b 0a 09 20 20 44 43 5f 54 45  ext], [..  DC_TE
0340: 53 54 5f 53 48 4f 42 4a 46 4c 41 47 53 28 5b 2d  ST_SHOBJFLAGS([-
0350: 66 50 49 43 20 2d 44 50 49 43 5d 2c 20 5b 2d 73  fPIC -DPIC], [-s
0360: 68 61 72 65 64 20 2d 6d 69 6d 70 75 72 65 2d 74  hared -mimpure-t
0370: 65 78 74 5d 2c 20 5b 0a 09 20 20 20 20 44 43 5f  ext], [..    DC_
0380: 54 45 53 54 5f 53 48 4f 42 4a 46 4c 41 47 53 28  TEST_SHOBJFLAGS(
0390: 5b 2d 66 50 49 43 20 2d 44 50 49 43 5d 2c 20 5b  [-fPIC -DPIC], [
03a0: 2d 73 68 61 72 65 64 20 2d 72 64 79 6e 61 6d 69  -shared -rdynami
03b0: 63 20 2d 57 6c 2c 2d 47 2c 2d 7a 2c 74 65 78 74  c -Wl,-G,-z,text
03c0: 6f 66 66 5d 2c 20 5b 0a 09 20 20 20 20 20 20 44  off], [..      D
03d0: 43 5f 54 45 53 54 5f 53 48 4f 42 4a 46 4c 41 47  C_TEST_SHOBJFLAG
03e0: 53 28 5b 2d 66 50 49 43 20 2d 44 50 49 43 5d 2c  S([-fPIC -DPIC],
03f0: 20 5b 2d 73 68 61 72 65 64 20 2d 57 6c 2c 2d 47   [-shared -Wl,-G
0400: 2c 2d 7a 2c 74 65 78 74 6f 66 66 5d 2c 20 5b 0a  ,-z,textoff], [.
0410: 09 09 44 43 5f 54 45 53 54 5f 53 48 4f 42 4a 46  ..DC_TEST_SHOBJF
0420: 4c 41 47 53 28 5b 2d 66 50 49 43 20 2d 44 50 49  LAGS([-fPIC -DPI
0430: 43 5d 2c 20 5b 2d 73 68 61 72 65 64 20 2d 64 79  C], [-shared -dy
0440: 6e 61 6d 69 63 6c 69 62 20 2d 66 6c 61 74 5f 6e  namiclib -flat_n
0450: 61 6d 65 73 70 61 63 65 20 2d 75 6e 64 65 66 69  amespace -undefi
0460: 6e 65 64 20 73 75 70 70 72 65 73 73 20 2d 62 69  ned suppress -bi
0470: 6e 64 5f 61 74 5f 6c 6f 61 64 5d 2c 20 5b 0a 09  nd_at_load], [..
0480: 09 20 20 44 43 5f 54 45 53 54 5f 53 48 4f 42 4a  .  DC_TEST_SHOBJ
0490: 46 4c 41 47 53 28 5b 2d 66 50 49 43 20 2d 44 50  FLAGS([-fPIC -DP
04a0: 49 43 5d 2c 20 5b 2d 64 79 6e 61 6d 69 63 6c 69  IC], [-dynamicli
04b0: 62 20 2d 66 6c 61 74 5f 6e 61 6d 65 73 70 61 63  b -flat_namespac
04c0: 65 20 2d 75 6e 64 65 66 69 6e 65 64 20 73 75 70  e -undefined sup
04d0: 70 72 65 73 73 20 2d 62 69 6e 64 5f 61 74 5f 6c  press -bind_at_l
04e0: 6f 61 64 5d 2c 20 5b 0a 09 09 20 20 20 20 44 43  oad], [...    DC
04f0: 5f 54 45 53 54 5f 53 48 4f 42 4a 46 4c 41 47 53  _TEST_SHOBJFLAGS
0500: 28 5b 2d 66 50 49 43 20 2d 44 50 49 43 5d 2c 20  ([-fPIC -DPIC], 
0510: 5b 2d 57 6c 2c 2d 64 79 6e 61 6d 69 63 6c 69 62  [-Wl,-dynamiclib
0520: 20 2d 57 6c 2c 2d 66 6c 61 74 5f 6e 61 6d 65 73   -Wl,-flat_names
0530: 70 61 63 65 20 2d 57 6c 2c 2d 75 6e 64 65 66 69  pace -Wl,-undefi
0540: 6e 65 64 2c 73 75 70 70 72 65 73 73 20 2d 57 6c  ned,suppress -Wl
0550: 2c 2d 62 69 6e 64 5f 61 74 5f 6c 6f 61 64 5d 2c  ,-bind_at_load],
0560: 20 5b 0a 09 09 20 20 20 20 20 20 44 43 5f 54 45   [...      DC_TE
0570: 53 54 5f 53 48 4f 42 4a 46 4c 41 47 53 28 5b 2d  ST_SHOBJFLAGS([-
0580: 66 50 49 43 20 2d 44 50 49 43 5d 2c 20 5b 2d 64  fPIC -DPIC], [-d
0590: 79 6e 61 6d 69 63 6c 69 62 20 2d 66 6c 61 74 5f  ynamiclib -flat_
05a0: 6e 61 6d 65 73 70 61 63 65 20 2d 75 6e 64 65 66  namespace -undef
05b0: 69 6e 65 64 20 73 75 70 70 72 65 73 73 5d 2c 20  ined suppress], 
05c0: 5b 0a 09 09 20 20 20 20 20 20 20 20 44 43 5f 54  [...        DC_T
05d0: 45 53 54 5f 53 48 4f 42 4a 46 4c 41 47 53 28 5b  EST_SHOBJFLAGS([
05e0: 2d 66 50 49 43 20 2d 44 50 49 43 5d 2c 20 5b 2d  -fPIC -DPIC], [-
05f0: 64 79 6e 61 6d 69 63 6c 69 62 5d 2c 20 5b 0a 09  dynamiclib], [..
0600: 09 20 20 20 20 20 20 20 20 20 20 41 43 5f 4d 53  .          AC_MS
0610: 47 5f 52 45 53 55 4c 54 28 63 61 6e 74 29 0a 09  G_RESULT(cant)..
0620: 09 20 20 20 20 20 20 20 20 20 20 41 43 5f 4d 53  .          AC_MS
0630: 47 5f 45 52 52 4f 52 28 5b 57 65 20 61 72 65 20  G_ERROR([We are 
0640: 75 6e 61 62 6c 65 20 74 6f 20 6d 61 6b 65 20 73  unable to make s
0650: 68 61 72 65 64 20 6f 62 6a 65 63 74 73 2e 5d 29  hared objects.])
0660: 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20  .               
0670: 20 20 20 20 20 20 20 20 20 5d 29 0a 09 09 20 20           ])...  
0680: 20 20 20 20 5d 29 0a 09 09 20 20 20 20 5d 29 0a      ])...    ]).
0690: 09 09 20 20 5d 29 0a 09 09 5d 29 0a 09 20 20 20  ..  ])...])..   
06a0: 20 20 20 5d 29 0a 09 20 20 20 20 5d 29 0a 09 20     ])..    ]).. 
06b0: 20 5d 29 0a 09 5d 29 0a 20 20 20 20 20 20 5d 29   ])..]).      ])
06c0: 0a 20 20 20 20 5d 29 0a 20 20 66 69 0a 0a 20 20  .    ]).  fi..  
06d0: 41 43 5f 4d 53 47 5f 52 45 53 55 4c 54 28 24 53  AC_MSG_RESULT($S
06e0: 48 4f 42 4a 4c 44 46 4c 41 47 53 20 24 53 48 4f  HOBJLDFLAGS $SHO
06f0: 42 4a 46 4c 41 47 53 29 0a 0a 20 20 44 43 5f 53  BJFLAGS)..  DC_S
0700: 59 4e 43 5f 53 48 4c 49 42 4f 42 4a 53 0a 5d 29  YNC_SHLIBOBJS.])
0710: 0a 0a 41 43 5f 44 45 46 55 4e 28 44 43 5f 53 59  ..AC_DEFUN(DC_SY
0720: 4e 43 5f 53 48 4c 49 42 4f 42 4a 53 2c 20 5b 0a  NC_SHLIBOBJS, [.
0730: 20 20 41 43 5f 53 55 42 53 54 28 53 48 4c 49 42    AC_SUBST(SHLIB
0740: 4f 42 4a 53 29 0a 20 20 53 48 4c 49 42 4f 42 4a  OBJS).  SHLIBOBJ
0750: 53 3d 22 22 0a 20 20 66 6f 72 20 6f 62 6a 20 69  S="".  for obj i
0760: 6e 20 24 4c 49 42 40 26 74 40 4f 42 4a 53 3b 20  n $LIB@&t@OBJS; 
0770: 64 6f 0a 20 20 20 20 53 48 4c 49 42 4f 42 4a 53  do.    SHLIBOBJS
0780: 3d 22 24 53 48 4c 49 42 4f 42 4a 53 20 60 65 63  ="$SHLIBOBJS `ec
0790: 68 6f 20 24 6f 62 6a 20 7c 20 73 65 64 20 27 73  ho $obj | sed 's
07a0: 2f 5c 2e 6f 24 2f 5f 73 68 72 2e 6f 2f 67 27 60  /\.o$/_shr.o/g'`
07b0: 22 0a 20 20 64 6f 6e 65 0a 5d 29 0a 0a 41 43 5f  ".  done.])..AC_
07c0: 44 45 46 55 4e 28 44 43 5f 53 59 4e 43 5f 52 50  DEFUN(DC_SYNC_RP
07d0: 41 54 48 2c 20 5b 0a 20 20 4f 4c 44 5f 4c 44 46  ATH, [.  OLD_LDF
07e0: 4c 41 47 53 3d 22 24 4c 44 46 4c 41 47 53 22 0a  LAGS="$LDFLAGS".
07f0: 0a 20 20 66 6f 72 20 74 72 79 72 70 61 74 68 20  .  for tryrpath 
0800: 69 6e 20 22 2d 57 6c 2c 2d 72 70 61 74 68 22 20  in "-Wl,-rpath" 
0810: 22 2d 57 6c 2c 2d 2d 72 70 61 74 68 22 20 22 2d  "-Wl,--rpath" "-
0820: 57 6c 2c 2d 52 22 3b 20 64 6f 0a 20 20 20 20 4c  Wl,-R"; do.    L
0830: 44 46 4c 41 47 53 3d 22 24 4f 4c 44 5f 4c 44 46  DFLAGS="$OLD_LDF
0840: 4c 41 47 53 20 24 74 72 79 72 70 61 74 68 20 2d  LAGS $tryrpath -
0850: 57 6c 2c 2f 74 6d 70 22 0a 20 20 20 20 41 43 5f  Wl,/tmp".    AC_
0860: 4c 49 4e 4b 5f 49 46 45 4c 53 45 28 41 43 5f 4c  LINK_IFELSE(AC_L
0870: 41 4e 47 5f 50 52 4f 47 52 41 4d 28 5b 5d 2c 20  ANG_PROGRAM([], 
0880: 5b 20 72 65 74 75 72 6e 28 30 29 3b 20 5d 29 2c  [ return(0); ]),
0890: 20 5b 0a 20 20 20 20 20 20 72 70 61 74 68 6c 64   [.      rpathld
08a0: 66 6c 61 67 73 3d 22 24 74 72 79 72 70 61 74 68  flags="$tryrpath
08b0: 22 0a 20 20 20 20 20 20 62 72 65 61 6b 0a 20 20  ".      break.  
08c0: 20 20 5d 29 0a 20 20 64 6f 6e 65 0a 20 20 75 6e    ]).  done.  un
08d0: 73 65 74 20 74 72 79 72 70 61 74 68 0a 0a 20 20  set tryrpath..  
08e0: 4c 44 46 4c 41 47 53 3d 22 24 4f 4c 44 5f 4c 44  LDFLAGS="$OLD_LD
08f0: 46 4c 41 47 53 22 0a 20 20 75 6e 73 65 74 20 4f  FLAGS".  unset O
0900: 4c 44 5f 4c 44 46 4c 41 47 53 0a 0a 20 20 41 44  LD_LDFLAGS..  AD
0910: 44 4c 44 46 4c 41 47 53 3d 22 22 0a 20 20 66 6f  DLDFLAGS="".  fo
0920: 72 20 6f 70 74 20 69 6e 20 24 4c 44 46 4c 41 47  r opt in $LDFLAG
0930: 53 3b 20 64 6f 0a 20 20 20 20 69 66 20 65 63 68  S; do.    if ech
0940: 6f 20 22 24 6f 70 74 22 20 7c 20 67 72 65 70 20  o "$opt" | grep 
0950: 27 5e 2d 4c 27 20 3e 2f 64 65 76 2f 6e 75 6c 6c  '^-L' >/dev/null
0960: 3b 20 74 68 65 6e 0a 20 20 20 20 20 20 72 70 61  ; then.      rpa
0970: 74 68 64 69 72 3d 60 65 63 68 6f 20 22 24 6f 70  thdir=`echo "$op
0980: 74 22 20 7c 20 73 65 64 20 27 73 40 5e 2d 4c 20  t" | sed 's@^-L 
0990: 2a 40 40 27 60 0a 20 20 20 20 20 20 41 44 44 4c  *@@'`.      ADDL
09a0: 44 46 4c 41 47 53 3d 22 24 41 44 44 4c 44 46 4c  DFLAGS="$ADDLDFL
09b0: 41 47 53 20 24 72 70 61 74 68 6c 64 66 6c 61 67  AGS $rpathldflag
09c0: 73 20 2d 57 6c 2c 24 72 70 61 74 68 64 69 72 22  s -Wl,$rpathdir"
09d0: 0a 20 20 20 20 66 69 0a 20 20 64 6f 6e 65 0a 20  .    fi.  done. 
09e0: 20 75 6e 73 65 74 20 6f 70 74 20 72 70 61 74 68   unset opt rpath
09f0: 6c 64 66 6c 61 67 73 0a 0a 20 20 4c 44 46 4c 41  ldflags..  LDFLA
0a00: 47 53 3d 22 24 4c 44 46 4c 41 47 53 20 24 41 44  GS="$LDFLAGS $AD
0a10: 44 4c 44 46 4c 41 47 53 22 0a 0a 20 20 75 6e 73  DLDFLAGS"..  uns
0a20: 65 74 20 41 44 44 4c 44 46 4c 41 47 53 0a 5d 29  et ADDLDFLAGS.])
0a30: 0a 0a 41 43 5f 44 45 46 55 4e 28 44 43 5f 43 48  ..AC_DEFUN(DC_CH
0a40: 4b 5f 4f 53 5f 49 4e 46 4f 2c 20 5b 0a 09 41 43  K_OS_INFO, [..AC
0a50: 5f 43 41 4e 4f 4e 49 43 41 4c 5f 48 4f 53 54 0a  _CANONICAL_HOST.
0a60: 09 41 43 5f 53 55 42 53 54 28 53 48 4f 42 4a 45  .AC_SUBST(SHOBJE
0a70: 58 54 29 0a 09 41 43 5f 53 55 42 53 54 28 53 48  XT)..AC_SUBST(SH
0a80: 4f 42 4a 46 4c 41 47 53 29 0a 09 41 43 5f 53 55  OBJFLAGS)..AC_SU
0a90: 42 53 54 28 53 48 4f 42 4a 4c 44 46 4c 41 47 53  BST(SHOBJLDFLAGS
0aa0: 29 0a 09 41 43 5f 53 55 42 53 54 28 43 46 4c 41  )..AC_SUBST(CFLA
0ab0: 47 53 29 0a 09 41 43 5f 53 55 42 53 54 28 43 50  GS)..AC_SUBST(CP
0ac0: 50 46 4c 41 47 53 29 0a 09 41 43 5f 53 55 42 53  PFLAGS)..AC_SUBS
0ad0: 54 28 41 52 45 58 54 29 0a 0a 09 41 43 5f 4d 53  T(AREXT)...AC_MS
0ae0: 47 5f 43 48 45 43 4b 49 4e 47 28 68 6f 73 74 20  G_CHECKING(host 
0af0: 6f 70 65 72 61 74 69 6e 67 20 73 79 73 74 65 6d  operating system
0b00: 29 0a 09 41 43 5f 4d 53 47 5f 52 45 53 55 4c 54  )..AC_MSG_RESULT
0b10: 28 24 68 6f 73 74 5f 6f 73 29 0a 0a 09 53 48 4f  ($host_os)...SHO
0b20: 42 4a 45 58 54 3d 22 73 6f 22 0a 09 41 52 45 58  BJEXT="so"..AREX
0b30: 54 3d 22 61 22 0a 0a 09 63 61 73 65 20 24 68 6f  T="a"...case $ho
0b40: 73 74 5f 6f 73 20 69 6e 0a 09 09 64 61 72 77 69  st_os in...darwi
0b50: 6e 2a 29 0a 09 09 09 53 48 4f 42 4a 45 58 54 3d  n*)....SHOBJEXT=
0b60: 22 64 79 6c 69 62 22 0a 09 09 09 3b 3b 0a 09 09  "dylib"....;;...
0b70: 68 70 75 78 2a 29 0a 09 09 09 53 48 4f 42 4a 45  hpux*)....SHOBJE
0b80: 58 54 3d 22 73 6c 22 0a 09 09 09 3b 3b 0a 09 09  XT="sl"....;;...
0b90: 6d 69 6e 67 77 33 32 7c 6d 69 6e 67 77 33 32 6d  mingw32|mingw32m
0ba0: 73 76 63 2a 29 0a 09 09 09 53 48 4f 42 4a 45 58  svc*)....SHOBJEX
0bb0: 54 3d 22 64 6c 6c 22 0a 09 09 09 53 48 4f 42 4a  T="dll"....SHOBJ
0bc0: 46 4c 41 47 53 3d 22 2d 44 50 49 43 22 0a 09 09  FLAGS="-DPIC"...
0bd0: 09 43 46 4c 41 47 53 3d 22 24 43 46 4c 41 47 53  .CFLAGS="$CFLAGS
0be0: 20 2d 6d 6d 73 2d 62 69 74 66 69 65 6c 64 73 22   -mms-bitfields"
0bf0: 0a 09 09 09 43 50 50 46 4c 41 47 53 3d 22 24 43  ....CPPFLAGS="$C
0c00: 50 50 46 4c 41 47 53 20 2d 6d 6d 73 2d 62 69 74  PPFLAGS -mms-bit
0c10: 66 69 65 6c 64 73 22 0a 09 09 09 53 48 4f 42 4a  fields"....SHOBJ
0c20: 4c 44 46 4c 41 47 53 3d 27 2d 73 68 61 72 65 64  LDFLAGS='-shared
0c30: 20 2d 57 6c 2c 2d 2d 64 6c 6c 20 2d 57 6c 2c 2d   -Wl,--dll -Wl,-
0c40: 2d 65 6e 61 62 6c 65 2d 61 75 74 6f 2d 69 6d 61  -enable-auto-ima
0c50: 67 65 2d 62 61 73 65 20 2d 57 6c 2c 2d 2d 6f 75  ge-base -Wl,--ou
0c60: 74 70 75 74 2d 64 65 66 2c 24 5b 40 5d 2e 64 65  tput-def,$[@].de
0c70: 66 2c 2d 2d 6f 75 74 2d 69 6d 70 6c 69 62 2c 24  f,--out-implib,$
0c80: 5b 40 5d 2e 61 27 0a 09 09 09 3b 3b 0a 09 09 63  [@].a'....;;...c
0c90: 79 67 77 69 6e 2a 29 0a 09 09 09 53 48 4f 42 4a  ygwin*)....SHOBJ
0ca0: 45 58 54 3d 22 64 6c 6c 22 0a 09 09 09 53 48 4f  EXT="dll"....SHO
0cb0: 42 4a 46 4c 41 47 53 3d 22 2d 66 50 49 43 20 2d  BJFLAGS="-fPIC -
0cc0: 44 50 49 43 22 0a 09 09 09 43 46 4c 41 47 53 3d  DPIC"....CFLAGS=
0cd0: 22 24 43 46 4c 41 47 53 20 2d 6d 6d 73 2d 62 69  "$CFLAGS -mms-bi
0ce0: 74 66 69 65 6c 64 73 22 0a 09 09 09 43 50 50 46  tfields"....CPPF
0cf0: 4c 41 47 53 3d 22 24 43 50 50 46 4c 41 47 53 20  LAGS="$CPPFLAGS 
0d00: 2d 6d 6d 73 2d 62 69 74 66 69 65 6c 64 73 22 0a  -mms-bitfields".
0d10: 09 09 09 53 48 4f 42 4a 4c 44 46 4c 41 47 53 3d  ...SHOBJLDFLAGS=
0d20: 27 2d 73 68 61 72 65 64 20 2d 57 6c 2c 2d 2d 65  '-shared -Wl,--e
0d30: 6e 61 62 6c 65 2d 61 75 74 6f 2d 69 6d 61 67 65  nable-auto-image
0d40: 2d 62 61 73 65 20 2d 57 6c 2c 2d 2d 6f 75 74 70  -base -Wl,--outp
0d50: 75 74 2d 64 65 66 2c 24 5b 40 5d 2e 64 65 66 2c  ut-def,$[@].def,
0d60: 2d 2d 6f 75 74 2d 69 6d 70 6c 69 62 2c 24 5b 40  --out-implib,$[@
0d70: 5d 2e 61 27 0a 09 09 09 3b 3b 0a 09 65 73 61 63  ].a'....;;..esac
0d80: 0a 5d 29 0a                                      .]).