Artifact 373c410bf2fa63575a9895db71f0a2c8db5288fb:
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 31 30 29 20 0a 41 43 5f 43 4f 4e 46 0.5.10) .AC_CONF
0020: 49 47 5f 48 45 41 44 45 52 53 28 63 6f 6e 66 69 IG_HEADERS(confi
0030: 67 2e 68 29 0a 0a 64 6e 6c 20 4c 6f 63 61 74 65 g.h)..dnl Locate
0040: 20 73 74 61 6e 64 61 72 64 20 74 6f 6f 6c 73 0a standard tools.
0050: 41 43 5f 50 52 4f 47 5f 43 43 0a 41 43 5f 50 52 AC_PROG_CC.AC_PR
0060: 4f 47 5f 4d 41 4b 45 5f 53 45 54 0a 41 43 5f 50 OG_MAKE_SET.AC_P
0070: 52 4f 47 5f 49 4e 53 54 41 4c 4c 0a 41 43 5f 41 ROG_INSTALL.AC_A
0080: 49 58 0a 0a 64 6e 6c 20 44 65 74 65 72 6d 69 6e IX..dnl Determin
0090: 65 20 74 68 69 73 20 70 6c 61 74 66 6f 72 6d 0a e this platform.
00a0: 44 43 5f 43 48 4b 5f 4f 53 5f 49 4e 46 4f 0a 0a DC_CHK_OS_INFO..
00b0: 64 6e 6c 20 44 65 74 65 72 6d 69 6e 65 20 68 6f dnl Determine ho
00c0: 77 20 74 6f 20 63 72 65 61 74 65 20 73 68 61 72 w to create shar
00d0: 65 64 20 6f 62 6a 65 63 74 73 20 6f 6e 20 74 68 ed objects on th
00e0: 69 73 20 70 6c 61 74 66 6f 72 6d 0a 44 43 5f 47 is platform.DC_G
00f0: 45 54 5f 53 48 4f 42 4a 46 4c 41 47 53 0a 0a 41 ET_SHOBJFLAGS..A
0100: 43 58 5f 50 54 48 52 45 41 44 28 2c 20 5b 0a 09 CX_PTHREAD(, [..
0110: 41 43 5f 57 41 52 4e 28 5b 43 61 6e 27 74 20 66 AC_WARN([Can't f
0120: 69 67 75 72 65 20 6f 75 74 20 68 6f 77 20 74 6f igure out how to
0130: 20 63 6f 6d 70 69 6c 65 20 77 69 74 68 20 70 74 compile with pt
0140: 68 72 65 61 64 73 20 73 75 70 70 6f 72 74 2c 20 hreads support,
0150: 72 75 6e 2d 74 69 6d 65 20 77 69 6c 6c 20 6c 69 run-time will li
0160: 6b 65 6c 79 20 66 61 69 6c 2e 5d 29 0a 5d 29 0a kely fail.]).]).
0170: 0a 64 6e 6c 20 44 65 74 65 72 6d 69 6e 65 20 68 .dnl Determine h
0180: 6f 77 20 74 6f 20 63 72 65 61 74 65 20 73 74 61 ow to create sta
0190: 74 69 63 20 61 72 63 68 69 76 65 73 20 6f 6e 20 tic archives on
01a0: 74 68 69 73 20 70 6c 61 74 66 6f 72 6d 0a 41 43 this platform.AC
01b0: 5f 43 48 45 43 4b 5f 54 4f 4f 4c 28 41 52 2c 20 _CHECK_TOOL(AR,
01c0: 61 72 29 0a 41 43 5f 43 48 45 43 4b 5f 54 4f 4f ar).AC_CHECK_TOO
01d0: 4c 28 52 41 4e 4c 49 42 2c 20 72 61 6e 6c 69 62 L(RANLIB, ranlib
01e0: 29 0a 0a 64 6e 6c 20 44 65 74 65 72 6d 69 6e 65 )..dnl Determine
01f0: 20 68 6f 77 20 74 6f 20 73 74 72 69 70 20 65 78 how to strip ex
0200: 65 63 75 74 61 62 6c 65 73 0a 41 43 5f 43 48 45 ecutables.AC_CHE
0210: 43 4b 5f 54 4f 4f 4c 28 53 54 52 49 50 2c 20 73 CK_TOOL(STRIP, s
0220: 74 72 69 70 29 0a 0a 64 6e 6c 20 43 68 65 63 6b trip)..dnl Check
0230: 20 66 6f 72 20 61 6c 6c 20 72 65 71 75 69 72 65 for all require
0240: 64 20 68 65 61 64 65 72 73 0a 41 43 5f 43 48 45 d headers.AC_CHE
0250: 43 4b 5f 48 45 41 44 45 52 53 28 61 72 70 61 2f CK_HEADERS(arpa/
0260: 69 6e 65 74 2e 68 20 69 6e 74 74 79 70 65 73 2e inet.h inttypes.
0270: 68 20 73 74 64 61 72 67 2e 68 20 73 74 64 69 6e h stdarg.h stdin
0280: 74 2e 68 20 73 74 64 69 6f 2e 68 20 73 74 64 6c t.h stdio.h stdl
0290: 69 62 2e 68 20 73 74 72 69 6e 67 2e 68 20 73 79 ib.h string.h sy
02a0: 73 2f 73 6f 63 6b 65 74 2e 68 20 73 79 73 2f 74 s/socket.h sys/t
02b0: 79 70 65 73 2e 68 20 73 79 73 2f 75 6e 2e 68 20 ypes.h sys/un.h
02c0: 75 6e 69 73 74 64 2e 68 20 70 74 68 72 65 61 64 unistd.h pthread
02d0: 2e 68 20 7a 6c 69 62 2e 68 20 6c 69 6d 69 74 73 .h zlib.h limits
02e0: 2e 68 2c 2c 5b 0a 09 41 43 5f 57 41 52 4e 28 5b .h,,[..AC_WARN([
02f0: 52 65 71 75 69 72 65 64 20 68 65 61 64 65 72 20 Required header
0300: 6d 69 73 73 69 6e 67 2c 20 63 6f 6d 70 69 6c 61 missing, compila
0310: 74 69 6f 6e 20 77 69 6c 6c 20 6c 69 6b 65 6c 79 tion will likely
0320: 20 66 61 69 6c 2e 5d 29 0a 5d 2c 20 5b 0a 23 69 fail.]).], [.#i
0330: 66 64 65 66 20 48 41 56 45 5f 41 52 50 41 5f 49 fdef HAVE_ARPA_I
0340: 4e 45 54 5f 48 0a 23 20 20 69 6e 63 6c 75 64 65 NET_H.# include
0350: 20 3c 61 72 70 61 2f 69 6e 65 74 2e 68 3e 0a 23 <arpa/inet.h>.#
0360: 65 6e 64 69 66 0a 23 69 66 64 65 66 20 48 41 56 endif.#ifdef HAV
0370: 45 5f 49 4e 54 54 59 50 45 53 5f 48 0a 23 20 20 E_INTTYPES_H.#
0380: 69 6e 63 6c 75 64 65 20 3c 69 6e 74 74 79 70 65 include <inttype
0390: 73 2e 68 3e 0a 23 65 6e 64 69 66 0a 23 69 66 64 s.h>.#endif.#ifd
03a0: 65 66 20 48 41 56 45 5f 53 54 44 41 52 47 5f 48 ef HAVE_STDARG_H
03b0: 0a 23 20 20 69 6e 63 6c 75 64 65 20 3c 73 74 64 .# include <std
03c0: 61 72 67 2e 68 3e 0a 23 65 6e 64 69 66 0a 23 69 arg.h>.#endif.#i
03d0: 66 64 65 66 20 48 41 56 45 5f 53 54 44 49 4e 54 fdef HAVE_STDINT
03e0: 5f 48 0a 23 20 20 69 6e 63 6c 75 64 65 20 3c 73 _H.# include <s
03f0: 74 64 69 6e 74 2e 68 3e 0a 23 65 6e 64 69 66 0a tdint.h>.#endif.
0400: 23 69 66 64 65 66 20 48 41 56 45 5f 53 54 44 49 #ifdef HAVE_STDI
0410: 4f 5f 48 0a 23 20 20 69 6e 63 6c 75 64 65 20 3c O_H.# include <
0420: 73 74 64 69 6f 2e 68 3e 0a 23 65 6e 64 69 66 0a stdio.h>.#endif.
0430: 23 69 66 64 65 66 20 48 41 56 45 5f 53 54 44 4c #ifdef HAVE_STDL
0440: 49 42 5f 48 0a 23 20 20 69 6e 63 6c 75 64 65 20 IB_H.# include
0450: 3c 73 74 64 6c 69 62 2e 68 3e 0a 23 65 6e 64 69 <stdlib.h>.#endi
0460: 66 0a 23 69 66 64 65 66 20 48 41 56 45 5f 53 54 f.#ifdef HAVE_ST
0470: 52 49 4e 47 5f 48 0a 23 20 20 69 6e 63 6c 75 64 RING_H.# includ
0480: 65 20 3c 73 74 72 69 6e 67 2e 68 3e 0a 23 65 6e e <string.h>.#en
0490: 64 69 66 0a 23 69 66 64 65 66 20 48 41 56 45 5f dif.#ifdef HAVE_
04a0: 53 59 53 5f 53 4f 43 4b 45 54 5f 48 0a 23 20 20 SYS_SOCKET_H.#
04b0: 69 6e 63 6c 75 64 65 20 3c 73 79 73 2f 73 6f 63 include <sys/soc
04c0: 6b 65 74 2e 68 3e 0a 23 65 6e 64 69 66 0a 23 69 ket.h>.#endif.#i
04d0: 66 64 65 66 20 48 41 56 45 5f 53 59 53 5f 54 59 fdef HAVE_SYS_TY
04e0: 50 45 53 5f 48 0a 23 20 20 69 6e 63 6c 75 64 65 PES_H.# include
04f0: 20 3c 73 79 73 2f 74 79 70 65 73 2e 68 3e 0a 23 <sys/types.h>.#
0500: 65 6e 64 69 66 0a 23 69 66 64 65 66 20 48 41 56 endif.#ifdef HAV
0510: 45 5f 53 59 53 5f 55 4e 5f 48 0a 23 20 20 69 6e E_SYS_UN_H.# in
0520: 63 6c 75 64 65 20 3c 73 79 73 2f 75 6e 2e 68 3e clude <sys/un.h>
0530: 0a 23 65 6e 64 69 66 0a 23 69 66 64 65 66 20 48 .#endif.#ifdef H
0540: 41 56 45 5f 55 4e 49 53 54 44 5f 48 0a 23 20 20 AVE_UNISTD_H.#
0550: 69 6e 63 6c 75 64 65 20 3c 75 6e 69 73 74 64 2e include <unistd.
0560: 68 3e 0a 23 65 6e 64 69 66 0a 23 69 66 64 65 66 h>.#endif.#ifdef
0570: 20 48 41 56 45 5f 50 54 48 52 45 41 44 5f 48 0a HAVE_PTHREAD_H.
0580: 23 20 20 69 6e 63 6c 75 64 65 20 3c 70 74 68 72 # include <pthr
0590: 65 61 64 2e 68 3e 0a 23 65 6e 64 69 66 0a 23 69 ead.h>.#endif.#i
05a0: 66 64 65 66 20 48 41 56 45 5f 4c 49 4d 49 54 53 fdef HAVE_LIMITS
05b0: 5f 48 0a 23 20 20 69 6e 63 6c 75 64 65 20 3c 6c _H.# include <l
05c0: 69 6d 69 74 73 2e 68 3e 0a 23 65 6e 64 69 66 0a imits.h>.#endif.
05d0: 23 69 66 64 65 66 20 48 41 56 45 5f 5a 4c 49 42 #ifdef HAVE_ZLIB
05e0: 5f 48 0a 23 20 20 69 6e 63 6c 75 64 65 20 3c 7a _H.# include <z
05f0: 6c 69 62 2e 68 3e 0a 23 65 6e 64 69 66 0a 5d 29 lib.h>.#endif.])
0600: 0a 0a 64 6e 6c 20 43 68 65 63 6b 20 66 6f 72 20 ..dnl Check for
0610: 50 43 2f 53 43 20 68 65 61 64 65 72 73 20 61 6e PC/SC headers an
0620: 64 20 6c 69 62 72 61 72 69 65 73 0a 44 43 5f 50 d libraries.DC_P
0630: 43 53 43 0a 0a 64 6e 6c 20 43 68 65 63 6b 20 66 CSC..dnl Check f
0640: 6f 72 20 5a 4c 49 42 20 6c 69 62 72 61 72 69 65 or ZLIB librarie
0650: 73 0a 41 43 5f 43 48 45 43 4b 5f 4c 49 42 28 7a s.AC_CHECK_LIB(z
0660: 2c 20 75 6e 63 6f 6d 70 72 65 73 73 29 0a 0a 64 , uncompress)..d
0670: 6e 6c 20 53 65 74 20 76 65 72 73 69 6f 6e 20 73 nl Set version s
0680: 63 72 69 70 74 2c 20 74 6f 20 6c 69 6d 69 74 20 cript, to limit
0690: 74 68 65 20 73 63 6f 70 65 20 6f 66 20 73 79 6d the scope of sym
06a0: 62 6f 6c 73 0a 44 43 5f 53 45 54 56 45 52 53 49 bols.DC_SETVERSI
06b0: 4f 4e 53 43 52 49 50 54 28 6c 69 62 63 61 63 6b ONSCRIPT(libcack
06c0: 65 79 2e 76 65 72 73 29 0a 0a 64 6e 6c 20 55 70 ey.vers)..dnl Up
06d0: 61 74 65 20 4c 44 46 4c 41 47 53 20 74 6f 20 69 ate LDFLAGS to i
06e0: 6e 63 6c 75 64 65 20 73 65 74 74 69 6e 67 20 74 nclude setting t
06f0: 68 65 20 72 75 6e 2d 74 69 6d 65 20 6c 69 6e 6b he run-time link
0700: 65 72 20 70 61 74 68 20 74 6f 20 74 68 65 20 73 er path to the s
0710: 61 6d 65 20 61 73 20 6f 75 72 20 63 6f 6d 70 69 ame as our compi
0720: 6c 65 2d 74 69 6d 65 20 6c 69 6e 6b 65 72 0a 44 le-time linker.D
0730: 43 5f 53 59 4e 43 5f 52 50 41 54 48 0a 0a 64 6e C_SYNC_RPATH..dn
0740: 6c 20 49 66 20 77 65 20 75 70 64 61 74 65 64 20 l If we updated
0750: 4c 49 42 4f 42 4a 53 2c 20 75 70 64 61 74 65 20 LIBOBJS, update
0760: 53 48 4c 49 42 4f 42 4a 53 20 2d 2d 20 6d 75 73 SHLIBOBJS -- mus
0770: 74 20 62 65 20 6c 61 73 74 2e 0a 44 43 5f 53 59 t be last..DC_SY
0780: 4e 43 5f 53 48 4c 49 42 4f 42 4a 53 0a 0a 64 6e NC_SHLIBOBJS..dn
0790: 6c 20 50 72 6f 64 75 63 65 20 4d 61 6b 65 66 69 l Produce Makefi
07a0: 6c 65 0a 41 43 5f 4f 55 54 50 55 54 28 4d 61 6b le.AC_OUTPUT(Mak
07b0: 65 66 69 6c 65 29 0a efile).