Artifact e16a9a4f8907179f6544487fbe64f8539dab4e07:
0000: 41 43 5f 49 4e 49 54 28 63 61 63 6b 65 79 2c 20 AC_INIT(cackey,
0010: 30 2e 35 2e 35 29 20 0a 41 43 5f 43 4f 4e 46 49 0.5.5) .AC_CONFI
0020: 47 5f 48 45 41 44 45 52 53 28 63 6f 6e 66 69 67 G_HEADERS(config
0030: 2e 68 29 0a 0a 64 6e 6c 20 4c 6f 63 61 74 65 20 .h)..dnl Locate
0040: 73 74 61 6e 64 61 72 64 20 74 6f 6f 6c 73 0a 41 standard tools.A
0050: 43 5f 50 52 4f 47 5f 43 43 0a 41 43 5f 50 52 4f C_PROG_CC.AC_PRO
0060: 47 5f 4d 41 4b 45 5f 53 45 54 0a 41 43 5f 50 52 G_MAKE_SET.AC_PR
0070: 4f 47 5f 49 4e 53 54 41 4c 4c 0a 41 43 5f 41 49 OG_INSTALL.AC_AI
0080: 58 0a 0a 64 6e 6c 20 44 65 74 65 72 6d 69 6e 65 X..dnl Determine
0090: 20 74 68 69 73 20 70 6c 61 74 66 6f 72 6d 0a 44 this platform.D
00a0: 43 5f 43 48 4b 5f 4f 53 5f 49 4e 46 4f 0a 0a 64 C_CHK_OS_INFO..d
00b0: 6e 6c 20 44 65 74 65 72 6d 69 6e 65 20 68 6f 77 nl Determine how
00c0: 20 74 6f 20 63 72 65 61 74 65 20 73 68 61 72 65 to create share
00d0: 64 20 6f 62 6a 65 63 74 73 20 6f 6e 20 74 68 69 d objects on thi
00e0: 73 20 70 6c 61 74 66 6f 72 6d 0a 44 43 5f 47 45 s platform.DC_GE
00f0: 54 5f 53 48 4f 42 4a 46 4c 41 47 53 0a 0a 41 43 T_SHOBJFLAGS..AC
0100: 58 5f 50 54 48 52 45 41 44 28 2c 20 5b 0a 09 41 X_PTHREAD(, [..A
0110: 43 5f 57 41 52 4e 28 5b 43 61 6e 27 74 20 66 69 C_WARN([Can't fi
0120: 67 75 72 65 20 6f 75 74 20 68 6f 77 20 74 6f 20 gure out how to
0130: 63 6f 6d 70 69 6c 65 20 77 69 74 68 20 70 74 68 compile with pth
0140: 72 65 61 64 73 20 73 75 70 70 6f 72 74 2c 20 72 reads support, r
0150: 75 6e 2d 74 69 6d 65 20 77 69 6c 6c 20 6c 69 6b un-time will lik
0160: 65 6c 79 20 66 61 69 6c 2e 5d 29 0a 5d 29 0a 0a ely fail.]).])..
0170: 64 6e 6c 20 44 65 74 65 72 6d 69 6e 65 20 68 6f dnl Determine ho
0180: 77 20 74 6f 20 63 72 65 61 74 65 20 73 74 61 74 w to create stat
0190: 69 63 20 61 72 63 68 69 76 65 73 20 6f 6e 20 74 ic archives on t
01a0: 68 69 73 20 70 6c 61 74 66 6f 72 6d 0a 41 43 5f his platform.AC_
01b0: 43 48 45 43 4b 5f 54 4f 4f 4c 28 41 52 2c 20 61 CHECK_TOOL(AR, a
01c0: 72 29 0a 41 43 5f 43 48 45 43 4b 5f 54 4f 4f 4c r).AC_CHECK_TOOL
01d0: 28 52 41 4e 4c 49 42 2c 20 72 61 6e 6c 69 62 29 (RANLIB, ranlib)
01e0: 0a 0a 64 6e 6c 20 44 65 74 65 72 6d 69 6e 65 20 ..dnl Determine
01f0: 68 6f 77 20 74 6f 20 73 74 72 69 70 20 65 78 65 how to strip exe
0200: 63 75 74 61 62 6c 65 73 0a 41 43 5f 43 48 45 43 cutables.AC_CHEC
0210: 4b 5f 54 4f 4f 4c 28 53 54 52 49 50 2c 20 73 74 K_TOOL(STRIP, st
0220: 72 69 70 29 0a 0a 64 6e 6c 20 43 68 65 63 6b 20 rip)..dnl Check
0230: 66 6f 72 20 61 6c 6c 20 72 65 71 75 69 72 65 64 for all required
0240: 20 68 65 61 64 65 72 73 0a 41 43 5f 43 48 45 43 headers.AC_CHEC
0250: 4b 5f 48 45 41 44 45 52 53 28 61 72 70 61 2f 69 K_HEADERS(arpa/i
0260: 6e 65 74 2e 68 20 69 6e 74 74 79 70 65 73 2e 68 net.h inttypes.h
0270: 20 73 74 64 61 72 67 2e 68 20 73 74 64 69 6e 74 stdarg.h stdint
0280: 2e 68 20 73 74 64 69 6f 2e 68 20 73 74 64 6c 69 .h stdio.h stdli
0290: 62 2e 68 20 73 74 72 69 6e 67 2e 68 20 73 79 73 b.h string.h sys
02a0: 2f 73 6f 63 6b 65 74 2e 68 20 73 79 73 2f 74 79 /socket.h sys/ty
02b0: 70 65 73 2e 68 20 73 79 73 2f 75 6e 2e 68 20 75 pes.h sys/un.h u
02c0: 6e 69 73 74 64 2e 68 20 70 74 68 72 65 61 64 2e nistd.h pthread.
02d0: 68 20 7a 6c 69 62 2e 68 20 6c 69 6d 69 74 73 2e h zlib.h limits.
02e0: 68 2c 2c 5b 0a 09 41 43 5f 57 41 52 4e 28 5b 52 h,,[..AC_WARN([R
02f0: 65 71 75 69 72 65 64 20 68 65 61 64 65 72 20 6d equired header m
0300: 69 73 73 69 6e 67 2c 20 63 6f 6d 70 69 6c 61 74 issing, compilat
0310: 69 6f 6e 20 77 69 6c 6c 20 6c 69 6b 65 6c 79 20 ion will likely
0320: 66 61 69 6c 2e 5d 29 0a 5d 2c 20 5b 0a 23 69 66 fail.]).], [.#if
0330: 64 65 66 20 48 41 56 45 5f 41 52 50 41 5f 49 4e def HAVE_ARPA_IN
0340: 45 54 5f 48 0a 23 20 20 69 6e 63 6c 75 64 65 20 ET_H.# include
0350: 3c 61 72 70 61 2f 69 6e 65 74 2e 68 3e 0a 23 65 <arpa/inet.h>.#e
0360: 6e 64 69 66 0a 23 69 66 64 65 66 20 48 41 56 45 ndif.#ifdef HAVE
0370: 5f 49 4e 54 54 59 50 45 53 5f 48 0a 23 20 20 69 _INTTYPES_H.# i
0380: 6e 63 6c 75 64 65 20 3c 69 6e 74 74 79 70 65 73 nclude <inttypes
0390: 2e 68 3e 0a 23 65 6e 64 69 66 0a 23 69 66 64 65 .h>.#endif.#ifde
03a0: 66 20 48 41 56 45 5f 53 54 44 41 52 47 5f 48 0a f HAVE_STDARG_H.
03b0: 23 20 20 69 6e 63 6c 75 64 65 20 3c 73 74 64 61 # include <stda
03c0: 72 67 2e 68 3e 0a 23 65 6e 64 69 66 0a 23 69 66 rg.h>.#endif.#if
03d0: 64 65 66 20 48 41 56 45 5f 53 54 44 49 4e 54 5f def HAVE_STDINT_
03e0: 48 0a 23 20 20 69 6e 63 6c 75 64 65 20 3c 73 74 H.# include <st
03f0: 64 69 6e 74 2e 68 3e 0a 23 65 6e 64 69 66 0a 23 dint.h>.#endif.#
0400: 69 66 64 65 66 20 48 41 56 45 5f 53 54 44 49 4f ifdef HAVE_STDIO
0410: 5f 48 0a 23 20 20 69 6e 63 6c 75 64 65 20 3c 73 _H.# include <s
0420: 74 64 69 6f 2e 68 3e 0a 23 65 6e 64 69 66 0a 23 tdio.h>.#endif.#
0430: 69 66 64 65 66 20 48 41 56 45 5f 53 54 44 4c 49 ifdef HAVE_STDLI
0440: 42 5f 48 0a 23 20 20 69 6e 63 6c 75 64 65 20 3c B_H.# include <
0450: 73 74 64 6c 69 62 2e 68 3e 0a 23 65 6e 64 69 66 stdlib.h>.#endif
0460: 0a 23 69 66 64 65 66 20 48 41 56 45 5f 53 54 52 .#ifdef HAVE_STR
0470: 49 4e 47 5f 48 0a 23 20 20 69 6e 63 6c 75 64 65 ING_H.# include
0480: 20 3c 73 74 72 69 6e 67 2e 68 3e 0a 23 65 6e 64 <string.h>.#end
0490: 69 66 0a 23 69 66 64 65 66 20 48 41 56 45 5f 53 if.#ifdef HAVE_S
04a0: 59 53 5f 53 4f 43 4b 45 54 5f 48 0a 23 20 20 69 YS_SOCKET_H.# i
04b0: 6e 63 6c 75 64 65 20 3c 73 79 73 2f 73 6f 63 6b nclude <sys/sock
04c0: 65 74 2e 68 3e 0a 23 65 6e 64 69 66 0a 23 69 66 et.h>.#endif.#if
04d0: 64 65 66 20 48 41 56 45 5f 53 59 53 5f 54 59 50 def HAVE_SYS_TYP
04e0: 45 53 5f 48 0a 23 20 20 69 6e 63 6c 75 64 65 20 ES_H.# include
04f0: 3c 73 79 73 2f 74 79 70 65 73 2e 68 3e 0a 23 65 <sys/types.h>.#e
0500: 6e 64 69 66 0a 23 69 66 64 65 66 20 48 41 56 45 ndif.#ifdef HAVE
0510: 5f 53 59 53 5f 55 4e 5f 48 0a 23 20 20 69 6e 63 _SYS_UN_H.# inc
0520: 6c 75 64 65 20 3c 73 79 73 2f 75 6e 2e 68 3e 0a lude <sys/un.h>.
0530: 23 65 6e 64 69 66 0a 23 69 66 64 65 66 20 48 41 #endif.#ifdef HA
0540: 56 45 5f 55 4e 49 53 54 44 5f 48 0a 23 20 20 69 VE_UNISTD_H.# i
0550: 6e 63 6c 75 64 65 20 3c 75 6e 69 73 74 64 2e 68 nclude <unistd.h
0560: 3e 0a 23 65 6e 64 69 66 0a 23 69 66 64 65 66 20 >.#endif.#ifdef
0570: 48 41 56 45 5f 50 54 48 52 45 41 44 5f 48 0a 23 HAVE_PTHREAD_H.#
0580: 20 20 69 6e 63 6c 75 64 65 20 3c 70 74 68 72 65 include <pthre
0590: 61 64 2e 68 3e 0a 23 65 6e 64 69 66 0a 23 69 66 ad.h>.#endif.#if
05a0: 64 65 66 20 48 41 56 45 5f 4c 49 4d 49 54 53 5f def HAVE_LIMITS_
05b0: 48 0a 23 20 20 69 6e 63 6c 75 64 65 20 3c 6c 69 H.# include <li
05c0: 6d 69 74 73 2e 68 3e 0a 23 65 6e 64 69 66 0a 23 mits.h>.#endif.#
05d0: 69 66 64 65 66 20 48 41 56 45 5f 5a 4c 49 42 5f ifdef HAVE_ZLIB_
05e0: 48 0a 23 20 20 69 6e 63 6c 75 64 65 20 3c 7a 6c H.# include <zl
05f0: 69 62 2e 68 3e 0a 23 65 6e 64 69 66 0a 5d 29 0a ib.h>.#endif.]).
0600: 0a 64 6e 6c 20 43 68 65 63 6b 20 66 6f 72 20 50 .dnl Check for P
0610: 43 2f 53 43 20 68 65 61 64 65 72 73 20 61 6e 64 C/SC headers and
0620: 20 6c 69 62 72 61 72 69 65 73 0a 44 43 5f 50 43 libraries.DC_PC
0630: 53 43 0a 0a 64 6e 6c 20 43 68 65 63 6b 20 66 6f SC..dnl Check fo
0640: 72 20 5a 4c 49 42 20 6c 69 62 72 61 72 69 65 73 r ZLIB libraries
0650: 0a 41 43 5f 43 48 45 43 4b 5f 4c 49 42 28 7a 2c .AC_CHECK_LIB(z,
0660: 20 75 6e 63 6f 6d 70 72 65 73 73 29 0a 0a 64 6e uncompress)..dn
0670: 6c 20 53 65 74 20 76 65 72 73 69 6f 6e 20 73 63 l Set version sc
0680: 72 69 70 74 2c 20 74 6f 20 6c 69 6d 69 74 20 74 ript, to limit t
0690: 68 65 20 73 63 6f 70 65 20 6f 66 20 73 79 6d 62 he scope of symb
06a0: 6f 6c 73 0a 44 43 5f 53 45 54 56 45 52 53 49 4f ols.DC_SETVERSIO
06b0: 4e 53 43 52 49 50 54 28 6c 69 62 63 61 63 6b 65 NSCRIPT(libcacke
06c0: 79 2e 76 65 72 73 29 0a 0a 64 6e 6c 20 55 70 61 y.vers)..dnl Upa
06d0: 74 65 20 4c 44 46 4c 41 47 53 20 74 6f 20 69 6e te LDFLAGS to in
06e0: 63 6c 75 64 65 20 73 65 74 74 69 6e 67 20 74 68 clude setting th
06f0: 65 20 72 75 6e 2d 74 69 6d 65 20 6c 69 6e 6b 65 e run-time linke
0700: 72 20 70 61 74 68 20 74 6f 20 74 68 65 20 73 61 r path to the sa
0710: 6d 65 20 61 73 20 6f 75 72 20 63 6f 6d 70 69 6c me as our compil
0720: 65 2d 74 69 6d 65 20 6c 69 6e 6b 65 72 0a 44 43 e-time linker.DC
0730: 5f 53 59 4e 43 5f 52 50 41 54 48 0a 0a 64 6e 6c _SYNC_RPATH..dnl
0740: 20 49 66 20 77 65 20 75 70 64 61 74 65 64 20 4c If we updated L
0750: 49 42 4f 42 4a 53 2c 20 75 70 64 61 74 65 20 53 IBOBJS, update S
0760: 48 4c 49 42 4f 42 4a 53 20 2d 2d 20 6d 75 73 74 HLIBOBJS -- must
0770: 20 62 65 20 6c 61 73 74 2e 0a 44 43 5f 53 59 4e be last..DC_SYN
0780: 43 5f 53 48 4c 49 42 4f 42 4a 53 0a 0a 64 6e 6c C_SHLIBOBJS..dnl
0790: 20 50 72 6f 64 75 63 65 20 4d 61 6b 65 66 69 6c Produce Makefil
07a0: 65 0a 41 43 5f 4f 55 54 50 55 54 28 4d 61 6b 65 e.AC_OUTPUT(Make
07b0: 66 69 6c 65 29 0a file).