Hex Artifact Content

Artifact 9a0374cc5cdd47345008788052587dd73328880b:


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 5b 44 43 5f 54 45 53 54 5f 53 48 4f 42 4a 46  ([DC_TEST_SHOBJF
0070: 4c 41 47 53 5d 2c 20 5b 0a 20 20 41 43 5f 53 55  LAGS], [.  AC_SU
0080: 42 53 54 28 53 48 4f 42 4a 46 4c 41 47 53 29 0a  BST(SHOBJFLAGS).
0090: 20 20 41 43 5f 53 55 42 53 54 28 53 48 4f 42 4a    AC_SUBST(SHOBJ
00a0: 43 50 50 46 4c 41 47 53 29 0a 20 20 41 43 5f 53  CPPFLAGS).  AC_S
00b0: 55 42 53 54 28 53 48 4f 42 4a 4c 44 46 4c 41 47  UBST(SHOBJLDFLAG
00c0: 53 29 0a 0a 20 20 4f 4c 44 5f 4c 44 46 4c 41 47  S)..  OLD_LDFLAG
00d0: 53 3d 22 24 4c 44 46 4c 41 47 53 22 0a 20 20 4f  S="$LDFLAGS".  O
00e0: 4c 44 5f 43 46 4c 41 47 53 3d 22 24 43 46 4c 41  LD_CFLAGS="$CFLA
00f0: 47 53 22 0a 20 20 4f 4c 44 5f 43 50 50 46 4c 41  GS".  OLD_CPPFLA
0100: 47 53 3d 22 24 43 50 50 46 4c 41 47 53 22 0a 0a  GS="$CPPFLAGS"..
0110: 20 20 53 48 4f 42 4a 46 4c 41 47 53 3d 22 22 0a    SHOBJFLAGS="".
0120: 20 20 53 48 4f 42 4a 43 50 50 46 4c 41 47 53 3d    SHOBJCPPFLAGS=
0130: 22 22 0a 20 20 53 48 4f 42 4a 4c 44 46 4c 41 47  "".  SHOBJLDFLAG
0140: 53 3d 22 22 0a 0a 20 20 43 46 4c 41 47 53 3d 22  S=""..  CFLAGS="
0150: 24 4f 4c 44 5f 43 46 4c 41 47 53 20 24 31 22 0a  $OLD_CFLAGS $1".
0160: 20 20 43 50 50 46 4c 41 47 53 3d 22 24 4f 4c 44    CPPFLAGS="$OLD
0170: 5f 43 50 50 46 4c 41 47 53 20 24 32 22 0a 20 20  _CPPFLAGS $2".  
0180: 4c 44 46 4c 41 47 53 3d 22 24 4f 4c 44 5f 4c 44  LDFLAGS="$OLD_LD
0190: 46 4c 41 47 53 20 24 33 22 0a 0a 20 20 41 43 5f  FLAGS $3"..  AC_
01a0: 54 52 59 5f 4c 49 4e 4b 28 5b 23 69 6e 63 6c 75  TRY_LINK([#inclu
01b0: 64 65 20 3c 73 74 64 69 6f 2e 68 3e 0a 69 6e 74  de <stdio.h>.int
01c0: 20 75 6e 72 65 73 74 73 74 28 76 6f 69 64 29 3b   unrestst(void);
01d0: 5d 2c 20 5b 20 70 72 69 6e 74 66 28 22 6f 6b 61  ], [ printf("oka
01e0: 79 5c 6e 22 29 3b 20 75 6e 72 65 73 74 73 74 28  y\n"); unrestst(
01f0: 29 3b 20 72 65 74 75 72 6e 28 30 29 3b 20 5d 2c  ); return(0); ],
0200: 20 5b 20 53 48 4f 42 4a 46 4c 41 47 53 3d 22 24   [ SHOBJFLAGS="$
0210: 31 22 3b 20 53 48 4f 42 4a 43 50 50 46 4c 41 47  1"; SHOBJCPPFLAG
0220: 53 3d 22 24 32 22 3b 20 53 48 4f 42 4a 4c 44 46  S="$2"; SHOBJLDF
0230: 4c 41 47 53 3d 22 24 33 22 20 5d 2c 20 5b 0a 20  LAGS="$3" ], [. 
0240: 20 20 20 4c 44 46 4c 41 47 53 3d 22 24 4f 4c 44     LDFLAGS="$OLD
0250: 5f 4c 44 46 4c 41 47 53 22 0a 20 20 20 20 43 46  _LDFLAGS".    CF
0260: 4c 41 47 53 3d 22 24 4f 4c 44 5f 43 46 4c 41 47  LAGS="$OLD_CFLAG
0270: 53 22 0a 20 20 20 20 43 50 50 46 4c 41 47 53 3d  S".    CPPFLAGS=
0280: 22 24 4f 4c 44 5f 43 50 50 46 4c 41 47 53 22 0a  "$OLD_CPPFLAGS".
0290: 20 20 20 20 24 34 0a 20 20 5d 29 0a 0a 20 20 4c      $4.  ])..  L
02a0: 44 46 4c 41 47 53 3d 22 24 4f 4c 44 5f 4c 44 46  DFLAGS="$OLD_LDF
02b0: 4c 41 47 53 22 0a 20 20 43 46 4c 41 47 53 3d 22  LAGS".  CFLAGS="
02c0: 24 4f 4c 44 5f 43 46 4c 41 47 53 22 0a 20 20 43  $OLD_CFLAGS".  C
02d0: 50 50 46 4c 41 47 53 3d 22 24 4f 4c 44 5f 43 50  PPFLAGS="$OLD_CP
02e0: 50 46 4c 41 47 53 22 0a 5d 29 0a 0a 41 43 5f 44  PFLAGS".])..AC_D
02f0: 45 46 55 4e 28 5b 44 43 5f 47 45 54 5f 53 48 4f  EFUN([DC_GET_SHO
0300: 42 4a 46 4c 41 47 53 5d 2c 20 5b 0a 20 20 41 43  BJFLAGS], [.  AC
0310: 5f 53 55 42 53 54 28 53 48 4f 42 4a 46 4c 41 47  _SUBST(SHOBJFLAG
0320: 53 29 0a 20 20 41 43 5f 53 55 42 53 54 28 53 48  S).  AC_SUBST(SH
0330: 4f 42 4a 43 50 50 46 4c 41 47 53 29 0a 20 20 41  OBJCPPFLAGS).  A
0340: 43 5f 53 55 42 53 54 28 53 48 4f 42 4a 4c 44 46  C_SUBST(SHOBJLDF
0350: 4c 41 47 53 29 0a 0a 20 20 44 43 5f 43 48 4b 5f  LAGS)..  DC_CHK_
0360: 4f 53 5f 49 4e 46 4f 0a 0a 20 20 41 43 5f 4d 53  OS_INFO..  AC_MS
0370: 47 5f 43 48 45 43 4b 49 4e 47 28 68 6f 77 20 74  G_CHECKING(how t
0380: 6f 20 63 72 65 61 74 65 20 73 68 61 72 65 64 20  o create shared 
0390: 6f 62 6a 65 63 74 73 29 0a 0a 20 20 69 66 20 74  objects)..  if t
03a0: 65 73 74 20 2d 7a 20 22 24 53 48 4f 42 4a 46 4c  est -z "$SHOBJFL
03b0: 41 47 53 22 20 2d 61 20 2d 7a 20 22 24 53 48 4f  AGS" -a -z "$SHO
03c0: 42 4a 4c 44 46 4c 41 47 53 22 20 2d 61 20 2d 7a  BJLDFLAGS" -a -z
03d0: 20 22 24 53 48 4f 42 4a 43 50 50 46 4c 41 47 53   "$SHOBJCPPFLAGS
03e0: 22 3b 20 74 68 65 6e 0a 20 20 20 20 44 43 5f 54  "; then.    DC_T
03f0: 45 53 54 5f 53 48 4f 42 4a 46 4c 41 47 53 28 5b  EST_SHOBJFLAGS([
0400: 2d 66 50 49 43 5d 2c 20 5b 2d 44 50 49 43 5d 2c  -fPIC], [-DPIC],
0410: 20 5b 2d 73 68 61 72 65 64 20 2d 72 64 79 6e 61   [-shared -rdyna
0420: 6d 69 63 5d 2c 20 5b 0a 20 20 20 20 20 20 44 43  mic], [.      DC
0430: 5f 54 45 53 54 5f 53 48 4f 42 4a 46 4c 41 47 53  _TEST_SHOBJFLAGS
0440: 28 5b 2d 66 50 49 43 5d 2c 20 5b 2d 44 50 49 43  ([-fPIC], [-DPIC
0450: 5d 2c 20 5b 2d 73 68 61 72 65 64 5d 2c 20 5b 0a  ], [-shared], [.
0460: 09 44 43 5f 54 45 53 54 5f 53 48 4f 42 4a 46 4c  .DC_TEST_SHOBJFL
0470: 41 47 53 28 5b 2d 66 50 49 43 5d 2c 20 5b 2d 44  AGS([-fPIC], [-D
0480: 50 49 43 5d 2c 20 5b 2d 73 68 61 72 65 64 20 2d  PIC], [-shared -
0490: 72 64 79 6e 61 6d 69 63 20 2d 6d 69 6d 70 75 72  rdynamic -mimpur
04a0: 65 2d 74 65 78 74 5d 2c 20 5b 0a 09 20 20 44 43  e-text], [..  DC
04b0: 5f 54 45 53 54 5f 53 48 4f 42 4a 46 4c 41 47 53  _TEST_SHOBJFLAGS
04c0: 28 5b 2d 66 50 49 43 5d 2c 20 5b 2d 44 50 49 43  ([-fPIC], [-DPIC
04d0: 5d 2c 20 5b 2d 73 68 61 72 65 64 20 2d 6d 69 6d  ], [-shared -mim
04e0: 70 75 72 65 2d 74 65 78 74 5d 2c 20 5b 0a 09 20  pure-text], [.. 
04f0: 20 20 20 44 43 5f 54 45 53 54 5f 53 48 4f 42 4a     DC_TEST_SHOBJ
0500: 46 4c 41 47 53 28 5b 2d 66 50 49 43 5d 2c 20 5b  FLAGS([-fPIC], [
0510: 2d 44 50 49 43 5d 2c 20 5b 2d 73 68 61 72 65 64  -DPIC], [-shared
0520: 20 2d 72 64 79 6e 61 6d 69 63 20 2d 57 6c 2c 2d   -rdynamic -Wl,-
0530: 47 2c 2d 7a 2c 74 65 78 74 6f 66 66 5d 2c 20 5b  G,-z,textoff], [
0540: 0a 09 20 20 20 20 20 20 44 43 5f 54 45 53 54 5f  ..      DC_TEST_
0550: 53 48 4f 42 4a 46 4c 41 47 53 28 5b 2d 66 50 49  SHOBJFLAGS([-fPI
0560: 43 5d 2c 20 5b 2d 44 50 49 43 5d 2c 20 5b 2d 73  C], [-DPIC], [-s
0570: 68 61 72 65 64 20 2d 57 6c 2c 2d 47 5d 2c 20 5b  hared -Wl,-G], [
0580: 0a 09 09 44 43 5f 54 45 53 54 5f 53 48 4f 42 4a  ...DC_TEST_SHOBJ
0590: 46 4c 41 47 53 28 5b 2d 66 50 49 43 5d 2c 20 5b  FLAGS([-fPIC], [
05a0: 2d 44 50 49 43 5d 2c 20 5b 2d 73 68 61 72 65 64  -DPIC], [-shared
05b0: 20 2d 64 79 6e 61 6d 69 63 6c 69 62 20 2d 66 6c   -dynamiclib -fl
05c0: 61 74 5f 6e 61 6d 65 73 70 61 63 65 20 2d 75 6e  at_namespace -un
05d0: 64 65 66 69 6e 65 64 20 73 75 70 70 72 65 73 73  defined suppress
05e0: 20 2d 62 69 6e 64 5f 61 74 5f 6c 6f 61 64 5d 2c   -bind_at_load],
05f0: 20 5b 0a 09 09 20 20 44 43 5f 54 45 53 54 5f 53   [...  DC_TEST_S
0600: 48 4f 42 4a 46 4c 41 47 53 28 5b 2d 66 50 49 43  HOBJFLAGS([-fPIC
0610: 5d 2c 20 5b 2d 44 50 49 43 5d 2c 20 5b 2d 64 79  ], [-DPIC], [-dy
0620: 6e 61 6d 69 63 6c 69 62 20 2d 66 6c 61 74 5f 6e  namiclib -flat_n
0630: 61 6d 65 73 70 61 63 65 20 2d 75 6e 64 65 66 69  amespace -undefi
0640: 6e 65 64 20 73 75 70 70 72 65 73 73 20 2d 62 69  ned suppress -bi
0650: 6e 64 5f 61 74 5f 6c 6f 61 64 5d 2c 20 5b 0a 09  nd_at_load], [..
0660: 09 20 20 20 20 44 43 5f 54 45 53 54 5f 53 48 4f  .    DC_TEST_SHO
0670: 42 4a 46 4c 41 47 53 28 5b 2d 66 50 49 43 5d 2c  BJFLAGS([-fPIC],
0680: 20 5b 2d 44 50 49 43 5d 2c 20 5b 2d 57 6c 2c 2d   [-DPIC], [-Wl,-
0690: 64 79 6e 61 6d 69 63 6c 69 62 20 2d 57 6c 2c 2d  dynamiclib -Wl,-
06a0: 66 6c 61 74 5f 6e 61 6d 65 73 70 61 63 65 20 2d  flat_namespace -
06b0: 57 6c 2c 2d 75 6e 64 65 66 69 6e 65 64 2c 73 75  Wl,-undefined,su
06c0: 70 70 72 65 73 73 20 2d 57 6c 2c 2d 62 69 6e 64  ppress -Wl,-bind
06d0: 5f 61 74 5f 6c 6f 61 64 5d 2c 20 5b 0a 09 09 20  _at_load], [... 
06e0: 20 20 20 20 20 44 43 5f 54 45 53 54 5f 53 48 4f       DC_TEST_SHO
06f0: 42 4a 46 4c 41 47 53 28 5b 2d 66 50 49 43 5d 2c  BJFLAGS([-fPIC],
0700: 20 5b 2d 44 50 49 43 5d 2c 20 5b 2d 64 79 6e 61   [-DPIC], [-dyna
0710: 6d 69 63 6c 69 62 20 2d 66 6c 61 74 5f 6e 61 6d  miclib -flat_nam
0720: 65 73 70 61 63 65 20 2d 75 6e 64 65 66 69 6e 65  espace -undefine
0730: 64 20 73 75 70 70 72 65 73 73 5d 2c 20 5b 0a 09  d suppress], [..
0740: 09 20 20 20 20 20 20 20 20 44 43 5f 54 45 53 54  .        DC_TEST
0750: 5f 53 48 4f 42 4a 46 4c 41 47 53 28 5b 2d 66 50  _SHOBJFLAGS([-fP
0760: 49 43 5d 2c 20 5b 2d 44 50 49 43 5d 2c 20 5b 2d  IC], [-DPIC], [-
0770: 64 79 6e 61 6d 69 63 6c 69 62 5d 2c 20 5b 0a 09  dynamiclib], [..
0780: 09 20 20 20 20 20 20 20 20 20 20 41 43 5f 4d 53  .          AC_MS
0790: 47 5f 52 45 53 55 4c 54 28 63 61 6e 74 29 0a 09  G_RESULT(cant)..
07a0: 09 20 20 20 20 20 20 20 20 20 20 41 43 5f 4d 53  .          AC_MS
07b0: 47 5f 45 52 52 4f 52 28 5b 57 65 20 61 72 65 20  G_ERROR([We are 
07c0: 75 6e 61 62 6c 65 20 74 6f 20 6d 61 6b 65 20 73  unable to make s
07d0: 68 61 72 65 64 20 6f 62 6a 65 63 74 73 2e 5d 29  hared objects.])
07e0: 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20  .               
07f0: 20 20 20 20 20 20 20 20 20 5d 29 0a 09 09 20 20           ])...  
0800: 20 20 20 20 5d 29 0a 09 09 20 20 20 20 5d 29 0a      ])...    ]).
0810: 09 09 20 20 5d 29 0a 09 09 5d 29 0a 09 20 20 20  ..  ])...])..   
0820: 20 20 20 5d 29 0a 09 20 20 20 20 5d 29 0a 09 20     ])..    ]).. 
0830: 20 5d 29 0a 09 5d 29 0a 20 20 20 20 20 20 5d 29   ])..]).      ])
0840: 0a 20 20 20 20 5d 29 0a 20 20 66 69 0a 0a 20 20  .    ]).  fi..  
0850: 41 43 5f 4d 53 47 5f 52 45 53 55 4c 54 28 24 53  AC_MSG_RESULT($S
0860: 48 4f 42 4a 43 50 50 46 4c 41 47 53 20 24 53 48  HOBJCPPFLAGS $SH
0870: 4f 42 4a 46 4c 41 47 53 20 24 53 48 4f 42 4a 4c  OBJFLAGS $SHOBJL
0880: 44 46 4c 41 47 53 29 0a 0a 20 20 44 43 5f 53 59  DFLAGS)..  DC_SY
0890: 4e 43 5f 53 48 4c 49 42 4f 42 4a 53 0a 5d 29 0a  NC_SHLIBOBJS.]).
08a0: 0a 41 43 5f 44 45 46 55 4e 28 5b 44 43 5f 53 59  .AC_DEFUN([DC_SY
08b0: 4e 43 5f 53 48 4c 49 42 4f 42 4a 53 5d 2c 20 5b  NC_SHLIBOBJS], [
08c0: 0a 20 20 41 43 5f 53 55 42 53 54 28 53 48 4c 49  .  AC_SUBST(SHLI
08d0: 42 4f 42 4a 53 29 0a 20 20 53 48 4c 49 42 4f 42  BOBJS).  SHLIBOB
08e0: 4a 53 3d 22 22 0a 20 20 66 6f 72 20 6f 62 6a 20  JS="".  for obj 
08f0: 69 6e 20 24 4c 49 42 40 26 74 40 4f 42 4a 53 3b  in $LIB@&t@OBJS;
0900: 20 64 6f 0a 20 20 20 20 53 48 4c 49 42 4f 42 4a   do.    SHLIBOBJ
0910: 53 3d 22 24 53 48 4c 49 42 4f 42 4a 53 20 60 65  S="$SHLIBOBJS `e
0920: 63 68 6f 20 24 6f 62 6a 20 7c 20 73 65 64 20 27  cho $obj | sed '
0930: 73 2f 5c 2e 6f 24 2f 5f 73 68 72 2e 6f 2f 67 27  s/\.o$/_shr.o/g'
0940: 60 22 0a 20 20 64 6f 6e 65 0a 5d 29 0a 0a 41 43  `".  done.])..AC
0950: 5f 44 45 46 55 4e 28 5b 44 43 5f 53 59 4e 43 5f  _DEFUN([DC_SYNC_
0960: 52 50 41 54 48 5d 2c 20 5b 0a 20 20 4f 4c 44 5f  RPATH], [.  OLD_
0970: 4c 44 46 4c 41 47 53 3d 22 24 4c 44 46 4c 41 47  LDFLAGS="$LDFLAG
0980: 53 22 0a 0a 20 20 66 6f 72 20 74 72 79 72 70 61  S"..  for tryrpa
0990: 74 68 20 69 6e 20 22 2d 57 6c 2c 2d 72 70 61 74  th in "-Wl,-rpat
09a0: 68 22 20 22 2d 57 6c 2c 2d 2d 72 70 61 74 68 22  h" "-Wl,--rpath"
09b0: 20 22 2d 57 6c 2c 2d 52 22 3b 20 64 6f 0a 20 20   "-Wl,-R"; do.  
09c0: 20 20 4c 44 46 4c 41 47 53 3d 22 24 4f 4c 44 5f    LDFLAGS="$OLD_
09d0: 4c 44 46 4c 41 47 53 20 24 74 72 79 72 70 61 74  LDFLAGS $tryrpat
09e0: 68 20 2d 57 6c 2c 2f 74 6d 70 22 0a 20 20 20 20  h -Wl,/tmp".    
09f0: 41 43 5f 4c 49 4e 4b 5f 49 46 45 4c 53 45 28 41  AC_LINK_IFELSE(A
0a00: 43 5f 4c 41 4e 47 5f 50 52 4f 47 52 41 4d 28 5b  C_LANG_PROGRAM([
0a10: 5d 2c 20 5b 20 72 65 74 75 72 6e 28 30 29 3b 20  ], [ return(0); 
0a20: 5d 29 2c 20 5b 0a 20 20 20 20 20 20 72 70 61 74  ]), [.      rpat
0a30: 68 6c 64 66 6c 61 67 73 3d 22 24 74 72 79 72 70  hldflags="$tryrp
0a40: 61 74 68 22 0a 20 20 20 20 20 20 62 72 65 61 6b  ath".      break
0a50: 0a 20 20 20 20 5d 29 0a 20 20 64 6f 6e 65 0a 20  .    ]).  done. 
0a60: 20 75 6e 73 65 74 20 74 72 79 72 70 61 74 68 0a   unset tryrpath.
0a70: 0a 20 20 4c 44 46 4c 41 47 53 3d 22 24 4f 4c 44  .  LDFLAGS="$OLD
0a80: 5f 4c 44 46 4c 41 47 53 22 0a 20 20 75 6e 73 65  _LDFLAGS".  unse
0a90: 74 20 4f 4c 44 5f 4c 44 46 4c 41 47 53 0a 0a 20  t OLD_LDFLAGS.. 
0aa0: 20 41 44 44 4c 44 46 4c 41 47 53 3d 22 22 0a 20   ADDLDFLAGS="". 
0ab0: 20 66 6f 72 20 6f 70 74 20 69 6e 20 24 4c 44 46   for opt in $LDF
0ac0: 4c 41 47 53 3b 20 64 6f 0a 20 20 20 20 69 66 20  LAGS; do.    if 
0ad0: 65 63 68 6f 20 22 24 6f 70 74 22 20 7c 20 67 72  echo "$opt" | gr
0ae0: 65 70 20 27 5e 2d 4c 27 20 3e 2f 64 65 76 2f 6e  ep '^-L' >/dev/n
0af0: 75 6c 6c 3b 20 74 68 65 6e 0a 20 20 20 20 20 20  ull; then.      
0b00: 72 70 61 74 68 64 69 72 3d 60 65 63 68 6f 20 22  rpathdir=`echo "
0b10: 24 6f 70 74 22 20 7c 20 73 65 64 20 27 73 40 5e  $opt" | sed 's@^
0b20: 2d 4c 20 2a 40 40 27 60 0a 20 20 20 20 20 20 41  -L *@@'`.      A
0b30: 44 44 4c 44 46 4c 41 47 53 3d 22 24 41 44 44 4c  DDLDFLAGS="$ADDL
0b40: 44 46 4c 41 47 53 20 24 72 70 61 74 68 6c 64 66  DFLAGS $rpathldf
0b50: 6c 61 67 73 20 2d 57 6c 2c 24 72 70 61 74 68 64  lags -Wl,$rpathd
0b60: 69 72 22 0a 20 20 20 20 66 69 0a 20 20 64 6f 6e  ir".    fi.  don
0b70: 65 0a 20 20 75 6e 73 65 74 20 6f 70 74 20 72 70  e.  unset opt rp
0b80: 61 74 68 6c 64 66 6c 61 67 73 0a 0a 20 20 4c 44  athldflags..  LD
0b90: 46 4c 41 47 53 3d 22 24 4c 44 46 4c 41 47 53 20  FLAGS="$LDFLAGS 
0ba0: 24 41 44 44 4c 44 46 4c 41 47 53 22 0a 0a 20 20  $ADDLDFLAGS"..  
0bb0: 75 6e 73 65 74 20 41 44 44 4c 44 46 4c 41 47 53  unset ADDLDFLAGS
0bc0: 0a 5d 29 0a 0a 41 43 5f 44 45 46 55 4e 28 5b 44  .])..AC_DEFUN([D
0bd0: 43 5f 43 48 4b 5f 4f 53 5f 49 4e 46 4f 5d 2c 20  C_CHK_OS_INFO], 
0be0: 5b 0a 09 41 43 5f 43 41 4e 4f 4e 49 43 41 4c 5f  [..AC_CANONICAL_
0bf0: 48 4f 53 54 0a 09 41 43 5f 53 55 42 53 54 28 53  HOST..AC_SUBST(S
0c00: 48 4f 42 4a 45 58 54 29 0a 09 41 43 5f 53 55 42  HOBJEXT)..AC_SUB
0c10: 53 54 28 53 48 4f 42 4a 46 4c 41 47 53 29 0a 09  ST(SHOBJFLAGS)..
0c20: 41 43 5f 53 55 42 53 54 28 53 48 4f 42 4a 43 50  AC_SUBST(SHOBJCP
0c30: 50 46 4c 41 47 53 29 0a 09 41 43 5f 53 55 42 53  PFLAGS)..AC_SUBS
0c40: 54 28 53 48 4f 42 4a 4c 44 46 4c 41 47 53 29 0a  T(SHOBJLDFLAGS).
0c50: 09 41 43 5f 53 55 42 53 54 28 43 46 4c 41 47 53  .AC_SUBST(CFLAGS
0c60: 29 0a 09 41 43 5f 53 55 42 53 54 28 43 50 50 46  )..AC_SUBST(CPPF
0c70: 4c 41 47 53 29 0a 09 41 43 5f 53 55 42 53 54 28  LAGS)..AC_SUBST(
0c80: 41 52 45 58 54 29 0a 0a 09 69 66 20 74 65 73 74  AREXT)...if test
0c90: 20 22 24 64 63 5f 63 76 5f 64 63 5f 63 68 6b 5f   "$dc_cv_dc_chk_
0ca0: 6f 73 5f 69 6e 66 6f 5f 63 61 6c 6c 65 64 22 20  os_info_called" 
0cb0: 21 3d 20 27 31 27 3b 20 74 68 65 6e 0a 09 09 64  != '1'; then...d
0cc0: 63 5f 63 76 5f 64 63 5f 63 68 6b 5f 6f 73 5f 69  c_cv_dc_chk_os_i
0cd0: 6e 66 6f 5f 63 61 6c 6c 65 64 3d 27 31 27 0a 0a  nfo_called='1'..
0ce0: 09 09 41 43 5f 4d 53 47 5f 43 48 45 43 4b 49 4e  ..AC_MSG_CHECKIN
0cf0: 47 28 68 6f 73 74 20 6f 70 65 72 61 74 69 6e 67  G(host operating
0d00: 20 73 79 73 74 65 6d 29 0a 09 09 41 43 5f 4d 53   system)...AC_MS
0d10: 47 5f 52 45 53 55 4c 54 28 24 68 6f 73 74 5f 6f  G_RESULT($host_o
0d20: 73 29 0a 0a 09 09 53 48 4f 42 4a 45 58 54 3d 22  s)....SHOBJEXT="
0d30: 73 6f 22 0a 09 09 41 52 45 58 54 3d 22 61 22 0a  so"...AREXT="a".
0d40: 0a 09 09 63 61 73 65 20 24 68 6f 73 74 5f 6f 73  ...case $host_os
0d50: 20 69 6e 0a 09 09 09 64 61 72 77 69 6e 2a 29 0a   in....darwin*).
0d60: 09 09 09 09 53 48 4f 42 4a 45 58 54 3d 22 64 79  ....SHOBJEXT="dy
0d70: 6c 69 62 22 0a 09 09 09 09 3b 3b 0a 09 09 09 68  lib".....;;....h
0d80: 70 75 78 2a 29 0a 09 09 09 09 63 61 73 65 20 22  pux*).....case "
0d90: 24 68 6f 73 74 5f 63 70 75 22 20 69 6e 0a 09 09  $host_cpu" in...
0da0: 09 09 09 69 61 36 34 29 0a 09 09 09 09 09 09 53  ...ia64).......S
0db0: 48 4f 42 4a 45 58 54 3d 22 73 6f 22 0a 09 09 09  HOBJEXT="so"....
0dc0: 09 09 09 3b 3b 0a 09 09 09 09 09 2a 29 0a 09 09  ...;;......*)...
0dd0: 09 09 09 09 53 48 4f 42 4a 45 58 54 3d 22 73 6c  ....SHOBJEXT="sl
0de0: 22 0a 09 09 09 09 09 09 3b 3b 0a 09 09 09 09 65  ".......;;.....e
0df0: 73 61 63 0a 09 09 09 09 3b 3b 0a 09 09 09 61 69  sac.....;;....ai
0e00: 78 5b 30 2d 39 5d 2e 2a 29 0a 09 09 09 09 53 48  x[0-9].*).....SH
0e10: 4f 42 4a 45 58 54 3d 22 61 22 0a 09 09 09 09 3b  OBJEXT="a".....;
0e20: 3b 0a 09 09 09 6d 69 6e 67 77 33 32 7c 6d 69 6e  ;....mingw32|min
0e30: 67 77 33 32 6d 73 76 63 2a 29 0a 09 09 09 09 53  gw32msvc*).....S
0e40: 48 4f 42 4a 45 58 54 3d 22 64 6c 6c 22 0a 09 09  HOBJEXT="dll"...
0e50: 09 09 43 46 4c 41 47 53 3d 22 24 43 46 4c 41 47  ..CFLAGS="$CFLAG
0e60: 53 20 2d 6d 6d 73 2d 62 69 74 66 69 65 6c 64 73  S -mms-bitfields
0e70: 22 0a 09 09 09 09 43 50 50 46 4c 41 47 53 3d 22  ".....CPPFLAGS="
0e80: 24 43 50 50 46 4c 41 47 53 20 2d 6d 6d 73 2d 62  $CPPFLAGS -mms-b
0e90: 69 74 66 69 65 6c 64 73 22 0a 09 09 09 09 53 48  itfields".....SH
0ea0: 4f 42 4a 43 50 50 46 4c 41 47 53 3d 22 2d 44 50  OBJCPPFLAGS="-DP
0eb0: 49 43 22 0a 09 09 09 09 53 48 4f 42 4a 4c 44 46  IC".....SHOBJLDF
0ec0: 4c 41 47 53 3d 27 2d 73 68 61 72 65 64 20 2d 57  LAGS='-shared -W
0ed0: 6c 2c 2d 2d 64 6c 6c 20 2d 57 6c 2c 2d 2d 65 6e  l,--dll -Wl,--en
0ee0: 61 62 6c 65 2d 61 75 74 6f 2d 69 6d 61 67 65 2d  able-auto-image-
0ef0: 62 61 73 65 20 2d 57 6c 2c 2d 2d 6f 75 74 70 75  base -Wl,--outpu
0f00: 74 2d 64 65 66 2c 24 5b 40 5d 2e 64 65 66 2c 2d  t-def,$[@].def,-
0f10: 2d 6f 75 74 2d 69 6d 70 6c 69 62 2c 24 5b 40 5d  -out-implib,$[@]
0f20: 2e 61 27 0a 09 09 09 09 3b 3b 0a 09 09 09 6d 73  .a'.....;;....ms
0f30: 76 63 29 0a 09 09 09 09 53 48 4f 42 4a 45 58 54  vc).....SHOBJEXT
0f40: 3d 22 64 6c 6c 22 0a 09 09 09 09 43 46 4c 41 47  ="dll".....CFLAG
0f50: 53 3d 22 24 43 46 4c 41 47 53 20 2d 6e 6f 6c 6f  S="$CFLAGS -nolo
0f60: 67 6f 22 0a 09 09 09 09 53 48 4f 42 4a 43 50 50  go".....SHOBJCPP
0f70: 46 4c 41 47 53 3d 27 2d 44 50 49 43 27 0a 09 09  FLAGS='-DPIC'...
0f80: 09 09 53 48 4f 42 4a 4c 44 46 4c 41 47 53 3d 27  ..SHOBJLDFLAGS='
0f90: 2f 4c 44 20 2f 4c 49 4e 4b 20 2f 4e 4f 44 45 46  /LD /LINK /NODEF
0fa0: 41 55 4c 54 4c 49 42 3a 4d 53 56 43 52 54 27 0a  AULTLIB:MSVCRT'.
0fb0: 09 09 09 09 3b 3b 0a 09 09 09 63 79 67 77 69 6e  ....;;....cygwin
0fc0: 2a 29 0a 09 09 09 09 53 48 4f 42 4a 45 58 54 3d  *).....SHOBJEXT=
0fd0: 22 64 6c 6c 22 0a 09 09 09 09 53 48 4f 42 4a 46  "dll".....SHOBJF
0fe0: 4c 41 47 53 3d 22 2d 66 50 49 43 22 0a 09 09 09  LAGS="-fPIC"....
0ff0: 09 53 48 4f 42 4a 43 50 50 46 4c 41 47 53 3d 22  .SHOBJCPPFLAGS="
1000: 2d 44 50 49 43 22 0a 09 09 09 09 43 46 4c 41 47  -DPIC".....CFLAG
1010: 53 3d 22 24 43 46 4c 41 47 53 20 2d 6d 6d 73 2d  S="$CFLAGS -mms-
1020: 62 69 74 66 69 65 6c 64 73 22 0a 09 09 09 09 43  bitfields".....C
1030: 50 50 46 4c 41 47 53 3d 22 24 43 50 50 46 4c 41  PPFLAGS="$CPPFLA
1040: 47 53 20 2d 6d 6d 73 2d 62 69 74 66 69 65 6c 64  GS -mms-bitfield
1050: 73 22 0a 09 09 09 09 53 48 4f 42 4a 4c 44 46 4c  s".....SHOBJLDFL
1060: 41 47 53 3d 27 2d 73 68 61 72 65 64 20 2d 57 6c  AGS='-shared -Wl
1070: 2c 2d 2d 65 6e 61 62 6c 65 2d 61 75 74 6f 2d 69  ,--enable-auto-i
1080: 6d 61 67 65 2d 62 61 73 65 20 2d 57 6c 2c 2d 2d  mage-base -Wl,--
1090: 6f 75 74 70 75 74 2d 64 65 66 2c 24 5b 40 5d 2e  output-def,$[@].
10a0: 64 65 66 2c 2d 2d 6f 75 74 2d 69 6d 70 6c 69 62  def,--out-implib
10b0: 2c 24 5b 40 5d 2e 61 27 0a 09 09 09 09 3b 3b 0a  ,$[@].a'.....;;.
10c0: 09 09 65 73 61 63 0a 09 66 69 0a 5d 29 0a 0a 41  ..esac..fi.])..A
10d0: 43 5f 44 45 46 55 4e 28 53 48 4f 42 4a 5f 53 45  C_DEFUN(SHOBJ_SE
10e0: 54 5f 53 4f 4e 41 4d 45 2c 20 5b 0a 09 53 41 56  T_SONAME, [..SAV
10f0: 45 5f 4c 44 46 4c 41 47 53 3d 22 24 4c 44 46 4c  E_LDFLAGS="$LDFL
1100: 41 47 53 22 0a 0a 09 41 43 5f 4d 53 47 5f 43 48  AGS"...AC_MSG_CH
1110: 45 43 4b 49 4e 47 28 5b 68 6f 77 20 74 6f 20 73  ECKING([how to s
1120: 70 65 63 69 66 79 20 73 6f 6e 61 6d 65 5d 29 0a  pecify soname]).
1130: 0a 09 66 6f 72 20 74 72 79 20 69 6e 20 22 2d 57  ..for try in "-W
1140: 6c 2c 2d 2d 73 6f 6e 61 6d 65 2c 24 31 22 20 22  l,--soname,$1" "
1150: 57 6c 2c 2d 69 6e 73 74 61 6c 6c 5f 6e 61 6d 65  Wl,-install_name
1160: 2c 24 31 22 20 27 5f 5f 66 61 69 6c 5f 5f 27 3b  ,$1" '__fail__';
1170: 20 64 6f 0a 09 09 4c 44 46 4c 41 47 53 3d 22 24   do...LDFLAGS="$
1180: 53 41 56 45 5f 4c 44 46 4c 41 47 53 22 0a 0a 09  SAVE_LDFLAGS"...
1190: 09 69 66 20 74 65 73 74 20 22 24 7b 74 72 79 7d  .if test "${try}
11a0: 22 20 3d 20 27 5f 5f 66 61 69 6c 5f 5f 27 3b 20  " = '__fail__'; 
11b0: 74 68 65 6e 0a 09 09 09 41 43 5f 4d 53 47 5f 52  then....AC_MSG_R
11c0: 45 53 55 4c 54 28 5b 63 61 6e 27 74 5d 29 0a 0a  ESULT([can't])..
11d0: 09 09 09 62 72 65 61 6b 0a 09 09 66 69 0a 0a 09  ...break...fi...
11e0: 09 4c 44 46 4c 41 47 53 3d 22 24 7b 4c 44 46 4c  .LDFLAGS="${LDFL
11f0: 41 47 53 7d 20 24 7b 74 72 79 7d 22 0a 09 09 41  AGS} ${try}"...A
1200: 43 5f 54 52 59 5f 4c 49 4e 4b 28 5b 76 6f 69 64  C_TRY_LINK([void
1210: 20 54 65 73 74 54 65 73 74 28 76 6f 69 64 29 20   TestTest(void) 
1220: 7b 20 72 65 74 75 72 6e 3b 20 7d 5d 2c 20 5b 5d  { return; }], []
1230: 2c 20 5b 0a 09 09 09 4c 44 46 4c 41 47 53 3d 22  , [....LDFLAGS="
1240: 24 7b 53 41 56 45 5f 4c 44 46 4c 41 47 53 7d 22  ${SAVE_LDFLAGS}"
1250: 0a 09 09 09 53 48 4f 42 4a 4c 44 46 4c 41 47 53  ....SHOBJLDFLAGS
1260: 3d 22 24 7b 53 48 4f 42 4a 4c 44 46 4c 41 47 53  ="${SHOBJLDFLAGS
1270: 7d 20 24 7b 74 72 79 7d 22 0a 0a 09 09 09 41 43  } ${try}".....AC
1280: 5f 4d 53 47 5f 52 45 53 55 4c 54 28 5b 24 74 72  _MSG_RESULT([$tr
1290: 79 5d 29 0a 0a 09 09 09 62 72 65 61 6b 0a 09 09  y]).....break...
12a0: 5d 29 0a 09 64 6f 6e 65 0a 0a 09 41 43 5f 53 55  ])..done...AC_SU
12b0: 42 53 54 28 53 48 4f 42 4a 4c 44 46 4c 41 47 53  BST(SHOBJLDFLAGS
12c0: 29 0a 5d 29 0a                                   ).]).