Artifact c9dbeb54a14561a29d7d702d0356220be3260704:
0000: 64 6e 6c 20 57 68 61 74 20 61 72 65 20 77 65 20 dnl What are we
0010: 72 75 6e 6e 69 6e 67 0a 41 43 5f 49 4e 49 54 28 running.AC_INIT(
0020: 6b 69 74 73 68 2c 20 30 2e 30 29 0a 0a 64 6e 6c kitsh, 0.0)..dnl
0030: 20 43 68 65 63 6b 73 20 66 6f 72 20 70 72 6f 67 Checks for prog
0040: 72 61 6d 73 2e 0a 41 43 5f 50 52 4f 47 5f 43 43 rams..AC_PROG_CC
0050: 0a 41 43 5f 50 52 4f 47 5f 4d 41 4b 45 5f 53 45 .AC_PROG_MAKE_SE
0060: 54 0a 41 43 5f 50 52 4f 47 5f 49 4e 53 54 41 4c T.AC_PROG_INSTAL
0070: 4c 0a 41 43 5f 41 49 58 0a 41 43 5f 47 4e 55 5f L.AC_AIX.AC_GNU_
0080: 53 4f 55 52 43 45 0a 0a 64 6e 6c 20 46 69 6e 64 SOURCE..dnl Find
0090: 20 6f 75 74 20 69 66 20 77 65 20 73 68 6f 75 6c out if we shoul
00a0: 64 20 62 75 69 6c 64 20 61 20 44 4c 4c 20 6f 72 d build a DLL or
00b0: 20 61 6e 20 45 78 65 63 75 74 61 62 6c 65 0a 54 an Executable.T
00c0: 41 52 47 45 54 3d 22 74 63 6c 6b 69 74 22 0a 41 ARGET="tclkit".A
00d0: 43 5f 4d 53 47 5f 43 48 45 43 4b 49 4e 47 28 5b C_MSG_CHECKING([
00e0: 77 68 61 74 20 74 61 72 67 65 74 20 74 6f 20 62 what target to b
00f0: 75 69 6c 64 5d 29 0a 41 43 5f 41 52 47 5f 45 4e uild]).AC_ARG_EN
0100: 41 42 4c 45 28 6b 69 74 64 6c 6c 2c 20 41 43 5f ABLE(kitdll, AC_
0110: 48 45 4c 50 5f 53 54 52 49 4e 47 28 5b 2d 2d 65 HELP_STRING([--e
0120: 6e 61 62 6c 65 2d 6b 69 74 64 6c 6c 5d 2c 20 5b nable-kitdll], [
0130: 45 6e 61 62 6c 65 20 62 75 69 6c 64 69 6e 67 20 Enable building
0140: 4b 69 74 44 4c 4c 20 69 6e 73 74 65 61 64 20 6f KitDLL instead o
0150: 66 20 54 63 6c 6b 69 74 20 28 64 65 66 61 75 6c f Tclkit (defaul
0160: 74 3a 20 6e 6f 29 5d 29 2c 20 5b 0a 09 63 61 73 t: no)]), [..cas
0170: 65 20 22 24 65 6e 61 62 6c 65 76 61 6c 22 20 69 e "$enableval" i
0180: 6e 0a 09 09 79 65 73 7c 6b 69 74 64 6c 6c 29 0a n...yes|kitdll).
0190: 09 09 09 54 41 52 47 45 54 3d 22 6b 69 74 64 6c ...TARGET="kitdl
01a0: 6c 22 0a 09 09 09 3b 3b 0a 09 09 6e 6f 29 0a 09 l"....;;...no)..
01b0: 09 09 74 72 75 65 0a 09 09 09 3b 3b 0a 09 09 2a ..true....;;...*
01c0: 29 0a 09 09 09 41 43 5f 4d 53 47 5f 52 45 53 55 )....AC_MSG_RESU
01d0: 4c 54 28 5b 75 6e 6b 6e 6f 77 6e 5d 29 0a 0a 09 LT([unknown])...
01e0: 09 09 41 43 5f 4d 53 47 5f 45 52 52 4f 52 28 5b ..AC_MSG_ERROR([
01f0: 49 6e 76 61 6c 69 64 20 6f 70 74 69 6f 6e 3a 20 Invalid option:
0200: 24 65 6e 61 62 6c 65 76 61 6c 5d 29 0a 09 09 09 $enableval])....
0210: 3b 3b 0a 09 65 73 61 63 0a 5d 29 0a 41 43 5f 4d ;;..esac.]).AC_M
0220: 53 47 5f 52 45 53 55 4c 54 28 5b 24 54 41 52 47 SG_RESULT([$TARG
0230: 45 54 5d 29 0a 0a 64 6e 6c 20 46 69 6e 64 20 74 ET])..dnl Find t
0240: 68 65 20 61 70 70 72 6f 70 72 69 61 74 65 20 6c he appropriate l
0250: 69 62 72 61 72 69 65 73 20 74 6f 20 6c 69 6e 6b ibraries to link
0260: 20 74 6f 0a 41 43 5f 53 45 41 52 43 48 5f 4c 49 to.AC_SEARCH_LI
0270: 42 53 28 61 63 6f 73 2c 20 6d 2c 2c 20 5b 20 41 BS(acos, m,, [ A
0280: 43 5f 4d 53 47 5f 57 41 52 4e 28 5b 43 6f 75 6c C_MSG_WARN([Coul
0290: 64 6e 27 74 20 66 69 6e 64 20 61 63 6f 73 20 28 dn't find acos (
02a0: 6e 6f 72 6d 61 6c 6c 79 20 69 6e 20 6c 69 62 6d normally in libm
02b0: 29 21 5d 29 20 5d 29 0a 41 43 5f 53 45 41 52 43 )!]) ]).AC_SEARC
02c0: 48 5f 4c 49 42 53 28 64 6c 73 79 6d 2c 20 64 6c H_LIBS(dlsym, dl
02d0: 2c 2c 20 5b 20 41 43 5f 4d 53 47 5f 57 41 52 4e ,, [ AC_MSG_WARN
02e0: 28 5b 43 6f 75 6c 64 6e 27 74 20 66 69 6e 64 20 ([Couldn't find
02f0: 64 6c 73 79 6d 20 28 6e 6f 72 6d 61 6c 6c 79 20 dlsym (normally
0300: 69 6e 20 6c 69 62 64 6c 29 21 5d 29 20 5d 29 0a in libdl)!]) ]).
0310: 0a 69 66 20 74 65 73 74 20 22 24 54 41 52 47 45 .if test "$TARGE
0320: 54 22 20 3d 20 22 74 63 6c 6b 69 74 22 3b 20 74 T" = "tclkit"; t
0330: 68 65 6e 0a 09 64 6e 6c 20 46 69 67 75 72 65 20 hen..dnl Figure
0340: 6f 75 74 20 68 6f 77 20 74 6f 20 73 74 61 74 69 out how to stati
0350: 63 61 6c 6c 79 20 6c 69 6e 6b 20 74 6f 20 6c 69 cally link to li
0360: 62 67 63 63 2c 20 69 66 20 6e 65 65 64 65 64 0a bgcc, if needed.
0370: 09 44 43 5f 53 54 41 54 49 43 5f 4c 49 42 47 43 .DC_STATIC_LIBGC
0380: 43 0a 65 6c 73 65 0a 09 64 6e 6c 20 57 65 20 68 C.else..dnl We h
0390: 61 76 65 20 4b 69 74 44 4c 4c 0a 0a 09 64 6e 6c ave KitDLL...dnl
03a0: 20 44 65 74 65 72 6d 69 6e 65 20 73 79 73 74 65 Determine syste
03b0: 6d 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 0a 09 44 m information..D
03c0: 43 5f 43 48 4b 5f 4f 53 5f 49 4e 46 4f 0a 0a 09 C_CHK_OS_INFO...
03d0: 64 6e 6c 20 44 65 74 65 72 6d 69 6e 65 20 68 6f dnl Determine ho
03e0: 77 20 74 6f 20 63 72 65 61 74 65 20 61 20 73 68 w to create a sh
03f0: 61 72 65 64 20 6f 62 6a 65 63 74 0a 09 44 43 5f ared object..DC_
0400: 47 45 54 5f 53 48 4f 42 4a 46 4c 41 47 53 0a 0a GET_SHOBJFLAGS..
0410: 09 64 6e 6c 20 4b 69 74 44 4c 4c 20 61 6c 77 61 .dnl KitDLL alwa
0420: 79 73 20 75 73 65 73 20 43 2d 56 46 53 0a 09 41 ys uses C-VFS..A
0430: 43 5f 44 45 46 49 4e 45 28 5b 4b 49 54 5f 53 54 C_DEFINE([KIT_ST
0440: 4f 52 41 47 45 5f 43 56 46 53 5d 2c 20 5b 31 5d ORAGE_CVFS], [1]
0450: 2c 20 5b 44 65 66 69 6e 65 20 69 66 20 79 6f 75 , [Define if you
0460: 20 61 72 65 20 67 6f 69 6e 67 20 74 6f 20 75 73 are going to us
0470: 65 20 43 2d 56 46 53 20 66 6f 72 20 6b 69 74 20 e C-VFS for kit
0480: 73 74 6f 72 61 67 65 5d 29 0a 0a 09 64 6e 6c 20 storage])...dnl
0490: 44 65 66 69 6e 65 20 4b 69 74 44 4c 4c 20 75 73 Define KitDLL us
04a0: 61 67 65 0a 09 41 43 5f 44 45 46 49 4e 45 28 5b age..AC_DEFINE([
04b0: 54 43 4c 4b 49 54 5f 44 4c 4c 5d 2c 20 5b 31 5d TCLKIT_DLL], [1]
04c0: 2c 20 5b 44 65 66 69 6e 65 20 69 66 20 79 6f 75 , [Define if you
04d0: 20 61 72 65 20 75 73 69 6e 67 20 61 20 4b 69 74 are using a Kit
04e0: 44 4c 4c 20 72 61 74 68 65 72 20 74 68 61 6e 20 DLL rather than
04f0: 61 20 54 63 6c 6b 69 74 5d 29 0a 66 69 0a 0a 64 a Tclkit]).fi..d
0500: 6e 6c 20 46 69 6e 64 20 74 68 65 20 61 70 70 72 nl Find the appr
0510: 6f 70 72 69 61 74 65 20 54 63 6c 20 68 65 61 64 opriate Tcl head
0520: 65 72 73 20 61 6e 64 20 6c 69 62 72 61 72 69 65 ers and librarie
0530: 73 0a 44 43 5f 44 4f 5f 54 43 4c 0a 0a 64 6e 6c s.DC_DO_TCL..dnl
0540: 20 46 69 6e 64 20 61 72 63 68 69 76 65 73 20 77 Find archives w
0550: 65 20 6e 65 65 64 20 74 6f 20 6c 69 6e 6b 20 74 e need to link t
0560: 6f 0a 44 43 5f 46 49 4e 44 5f 54 43 4c 4b 49 54 o.DC_FIND_TCLKIT
0570: 5f 4c 49 42 53 0a 0a 64 6e 6c 20 46 69 6e 64 20 _LIBS..dnl Find
0580: 65 78 74 72 61 20 6f 62 6a 65 63 74 73 20 77 65 extra objects we
0590: 20 6e 65 65 64 20 74 6f 20 6c 69 6e 6b 20 61 73 need to link as
05a0: 20 61 20 70 61 72 74 20 6f 66 20 22 6b 69 74 22 a part of "kit"
05b0: 0a 41 43 5f 53 55 42 53 54 28 45 58 54 52 41 5f .AC_SUBST(EXTRA_
05c0: 4f 42 4a 53 29 0a 0a 64 6e 6c 20 43 68 65 63 6b OBJS)..dnl Check
05d0: 20 66 6f 72 20 57 69 6e 64 6f 77 73 20 52 65 73 for Windows Res
05e0: 6f 75 72 63 65 20 43 6f 6d 70 69 6c 65 72 0a 41 ource Compiler.A
05f0: 43 5f 43 48 45 43 4b 5f 54 4f 4f 4c 28 5b 52 43 C_CHECK_TOOL([RC
0600: 5d 2c 20 5b 77 69 6e 64 72 65 73 5d 2c 20 5b 66 ], [windres], [f
0610: 61 6c 73 65 5d 29 0a 0a 64 6e 6c 20 49 66 20 77 alse])..dnl If w
0620: 65 20 66 6f 75 6e 64 20 74 68 65 20 72 65 73 6f e found the reso
0630: 75 72 63 65 20 63 6f 6d 70 69 6c 65 72 2c 20 61 urce compiler, a
0640: 64 64 20 22 6b 69 74 2e 72 65 73 2e 6f 22 20 74 dd "kit.res.o" t
0650: 6f 20 6f 75 72 20 6c 69 73 74 20 6f 66 20 6f 62 o our list of ob
0660: 6a 65 63 74 73 20 74 6f 20 62 75 69 6c 64 0a 64 jects to build.d
0670: 6e 6c 20 28 61 73 20 6c 6f 6e 67 20 61 73 20 74 nl (as long as t
0680: 68 65 20 73 6f 75 72 63 65 20 66 6f 72 20 73 75 he source for su
0690: 63 68 20 61 6e 20 6f 62 6a 65 63 74 20 65 78 69 ch an object exi
06a0: 73 74 73 29 0a 69 66 20 21 20 74 65 73 74 20 22 sts).if ! test "
06b0: 24 52 43 22 20 3d 20 22 66 61 6c 73 65 22 3b 20 $RC" = "false";
06c0: 74 68 65 6e 0a 09 69 66 20 74 65 73 74 20 2d 66 then..if test -f
06d0: 20 6b 69 74 2e 72 63 3b 20 74 68 65 6e 0a 09 09 kit.rc; then...
06e0: 45 58 54 52 41 5f 4f 42 4a 53 3d 22 24 45 58 54 EXTRA_OBJS="$EXT
06f0: 52 41 5f 4f 42 4a 53 20 6b 69 74 2e 72 65 73 2e RA_OBJS kit.res.
0700: 6f 22 0a 09 66 69 0a 66 69 0a 0a 64 6e 6c 20 43 o"..fi.fi..dnl C
0710: 68 65 63 6b 20 66 6f 72 20 54 63 6c 20 66 65 61 heck for Tcl fea
0720: 74 75 72 65 73 0a 53 41 56 45 5f 4c 49 42 53 3d tures.SAVE_LIBS=
0730: 22 24 7b 4c 49 42 53 7d 22 0a 4c 49 42 53 3d 22 "${LIBS}".LIBS="
0740: 24 7b 41 52 43 48 53 7d 20 24 7b 4c 49 42 53 7d ${ARCHS} ${LIBS}
0750: 22 0a 0a 64 6e 6c 20 44 65 74 65 72 6d 69 6e 65 "..dnl Determine
0760: 20 69 66 20 77 65 20 68 61 76 65 20 22 54 63 6c if we have "Tcl
0770: 5f 53 65 74 53 74 61 72 74 75 70 53 63 72 69 70 _SetStartupScrip
0780: 74 22 20 28 38 2e 36 2e 78 29 20 6f 72 20 22 54 t" (8.6.x) or "T
0790: 63 6c 53 65 74 53 74 61 72 74 75 70 53 63 72 69 clSetStartupScri
07a0: 70 74 50 61 74 68 22 20 28 38 2e 34 2e 78 29 0a ptPath" (8.4.x).
07b0: 41 43 5f 43 48 45 43 4b 5f 46 55 4e 43 53 28 54 AC_CHECK_FUNCS(T
07c0: 63 6c 5f 53 65 74 53 74 61 72 74 75 70 53 63 72 cl_SetStartupScr
07d0: 69 70 74 20 54 63 6c 53 65 74 53 74 61 72 74 75 ipt TclSetStartu
07e0: 70 53 63 72 69 70 74 50 61 74 68 29 0a 0a 64 6e pScriptPath)..dn
07f0: 6c 20 43 68 65 63 6b 20 66 6f 72 20 74 68 65 20 l Check for the
0800: 61 62 69 6c 69 74 79 20 74 6f 20 67 65 74 20 74 ability to get t
0810: 68 65 20 63 75 72 72 65 6e 74 20 73 79 73 74 65 he current syste
0820: 6d 20 65 6e 63 6f 64 69 6e 67 0a 41 43 5f 43 48 m encoding.AC_CH
0830: 45 43 4b 5f 46 55 4e 43 53 28 54 63 6c 5f 47 65 ECK_FUNCS(Tcl_Ge
0840: 74 45 6e 63 6f 64 69 6e 67 4e 61 6d 65 46 72 6f tEncodingNameFro
0850: 6d 45 6e 76 69 72 6f 6e 6d 65 6e 74 20 54 63 6c mEnvironment Tcl
0860: 5f 53 65 74 53 79 73 74 65 6d 45 6e 63 6f 64 69 _SetSystemEncodi
0870: 6e 67 29 0a 4c 49 42 53 3d 22 24 7b 53 41 56 45 ng).LIBS="${SAVE
0880: 5f 4c 49 42 53 7d 22 0a 0a 64 6e 6c 20 43 68 65 _LIBS}"..dnl Che
0890: 63 6b 20 66 6f 72 20 6f 70 74 69 6f 6e 61 6c 20 ck for optional
08a0: 68 65 61 64 65 72 73 0a 41 43 5f 48 45 41 44 45 headers.AC_HEADE
08b0: 52 5f 53 54 44 43 0a 41 43 5f 43 48 45 43 4b 5f R_STDC.AC_CHECK_
08c0: 48 45 41 44 45 52 53 28 75 6e 69 73 74 64 2e 68 HEADERS(unistd.h
08d0: 20 73 74 72 69 6e 67 2e 68 20 73 74 72 69 6e 67 string.h string
08e0: 73 2e 68 29 0a 0a 64 6e 6c 20 43 68 65 63 6b 20 s.h)..dnl Check
08f0: 66 6f 72 20 6f 70 74 69 6f 6e 61 6c 20 73 79 73 for optional sys
0900: 74 65 6d 20 63 61 6c 6c 73 0a 41 43 5f 43 48 45 tem calls.AC_CHE
0910: 43 4b 5f 46 55 4e 43 53 28 72 65 61 64 6c 69 6e CK_FUNCS(readlin
0920: 6b 29 0a 0a 64 6e 6c 20 43 68 65 63 6b 20 66 6f k)..dnl Check fo
0930: 72 20 61 63 63 65 70 74 61 62 6c 65 20 64 6c 61 r acceptable dla
0940: 64 64 72 20 73 6f 20 77 65 20 63 61 6e 20 66 69 ddr so we can fi
0950: 6e 64 20 6f 75 72 73 65 6c 76 65 73 20 6f 6e 20 nd ourselves on
0960: 53 6f 6c 61 72 69 73 0a 44 43 5f 43 48 45 43 4b Solaris.DC_CHECK
0970: 5f 46 4f 52 5f 41 43 43 45 50 54 41 42 4c 45 5f _FOR_ACCEPTABLE_
0980: 44 4c 41 44 44 52 0a 0a 64 6e 6c 20 46 69 6e 64 DLADDR..dnl Find
0990: 20 7a 6c 69 62 0a 41 43 5f 41 52 47 5f 57 49 54 zlib.AC_ARG_WIT
09a0: 48 28 7a 6c 69 62 2c 20 41 43 5f 48 45 4c 50 5f H(zlib, AC_HELP_
09b0: 53 54 52 49 4e 47 28 5b 2d 2d 77 69 74 68 2d 7a STRING([--with-z
09c0: 6c 69 62 5d 2c 20 5b 64 69 72 65 63 74 6f 72 79 lib], [directory
09d0: 20 63 6f 6e 74 61 69 6e 69 6e 67 20 7a 6c 69 62 containing zlib
09e0: 5d 29 2c 20 5b 0a 09 43 50 50 46 4c 41 47 53 3d ]), [..CPPFLAGS=
09f0: 22 24 7b 43 50 50 46 4c 41 47 53 7d 20 2d 49 24 "${CPPFLAGS} -I$
0a00: 7b 77 69 74 68 5f 7a 6c 69 62 7d 2f 69 6e 63 6c {with_zlib}/incl
0a10: 75 64 65 20 2d 49 24 7b 77 69 74 68 5f 7a 6c 69 ude -I${with_zli
0a20: 62 7d 22 0a 09 43 46 4c 41 47 53 3d 22 24 7b 43 b}"..CFLAGS="${C
0a30: 46 4c 41 47 53 7d 20 2d 49 24 7b 77 69 74 68 5f FLAGS} -I${with_
0a40: 7a 6c 69 62 7d 2f 69 6e 63 6c 75 64 65 20 2d 49 zlib}/include -I
0a50: 24 7b 77 69 74 68 5f 7a 6c 69 62 7d 22 0a 09 4c ${with_zlib}"..L
0a60: 44 46 4c 41 47 53 3d 22 24 7b 4c 44 46 4c 41 47 DFLAGS="${LDFLAG
0a70: 53 7d 20 2d 4c 24 7b 77 69 74 68 5f 7a 6c 69 62 S} -L${with_zlib
0a80: 7d 2f 6c 69 62 20 2d 4c 24 7b 77 69 74 68 5f 7a }/lib -L${with_z
0a90: 6c 69 62 7d 22 0a 5d 29 0a 0a 64 6e 6c 20 4f 6e lib}".])..dnl On
0aa0: 6c 79 20 6e 65 65 64 65 64 20 66 6f 72 20 54 63 ly needed for Tc
0ab0: 6c 6b 69 74 0a 69 66 20 74 65 73 74 20 22 24 54 lkit.if test "$T
0ac0: 41 52 47 45 54 22 20 3d 20 22 74 63 6c 6b 69 74 ARGET" = "tclkit
0ad0: 22 3b 20 74 68 65 6e 0a 09 44 43 5f 44 4f 5f 53 "; then..DC_DO_S
0ae0: 54 41 54 49 43 5f 4c 49 4e 4b 5f 4c 49 42 28 7a TATIC_LINK_LIB(z
0af0: 6c 69 62 2c 20 2d 6c 7a 2c 2c 20 5b 0a 09 09 44 lib, -lz,, [...D
0b00: 43 5f 44 4f 5f 53 54 41 54 49 43 5f 4c 49 4e 4b C_DO_STATIC_LINK
0b10: 5f 4c 49 42 28 7a 6c 69 62 2c 20 2d 6c 7a 6c 69 _LIB(zlib, -lzli
0b20: 62 2c 2c 20 5b 0a 09 09 09 41 43 5f 53 45 41 52 b,, [....AC_SEAR
0b30: 43 48 5f 4c 49 42 53 28 69 6e 66 6c 61 74 65 2c CH_LIBS(inflate,
0b40: 20 7a 20 7a 6c 69 62 2c 2c 20 5b 0a 09 09 09 09 z zlib,, [.....
0b50: 41 43 5f 4d 53 47 5f 57 41 52 4e 28 5b 43 6f 75 AC_MSG_WARN([Cou
0b60: 6c 64 6e 27 74 20 66 69 6e 64 20 69 6e 66 6c 61 ldn't find infla
0b70: 74 65 20 28 6e 6f 72 6d 61 6c 6c 79 20 69 6e 20 te (normally in
0b80: 7a 6c 69 62 29 21 5d 29 0a 09 09 09 5d 29 0a 09 zlib)!])....])..
0b90: 09 5d 29 0a 09 5d 29 0a 66 69 0a 0a 64 6e 6c 20 .])..]).fi..dnl
0ba0: 44 65 74 65 72 6d 69 6e 65 20 77 68 69 63 68 20 Determine which
0bb0: 73 74 6f 72 61 67 65 20 6d 65 63 68 61 6e 69 73 storage mechanis
0bc0: 6d 20 74 6f 20 75 73 65 0a 41 43 5f 4d 53 47 5f m to use.AC_MSG_
0bd0: 43 48 45 43 4b 49 4e 47 28 5b 77 68 69 63 68 20 CHECKING([which
0be0: 54 63 6c 6b 69 74 20 53 74 6f 72 61 67 65 20 6d Tclkit Storage m
0bf0: 65 63 68 61 6e 69 73 6d 20 74 6f 20 75 73 65 5d echanism to use]
0c00: 29 0a 0a 73 74 6f 72 61 67 65 5f 6d 65 63 68 3d )..storage_mech=
0c10: 22 61 75 74 6f 22 0a 41 43 5f 41 52 47 5f 45 4e "auto".AC_ARG_EN
0c20: 41 42 4c 45 28 6b 69 74 2d 73 74 6f 72 61 67 65 ABLE(kit-storage
0c30: 2c 20 41 43 5f 48 45 4c 50 5f 53 54 52 49 4e 47 , AC_HELP_STRING
0c40: 28 5b 2d 2d 65 6e 61 62 6c 65 2d 6b 69 74 2d 73 ([--enable-kit-s
0c50: 74 6f 72 61 67 65 3d 7b 7a 69 70 7c 6d 6b 34 7c torage={zip|mk4|
0c60: 63 76 66 73 7d 5d 2c 20 5b 53 70 65 63 69 66 79 cvfs}], [Specify
0c70: 20 73 74 6f 72 61 67 65 20 6d 65 63 68 61 6e 69 storage mechani
0c80: 73 6d 20 74 6f 20 75 73 65 20 66 6f 72 20 62 75 sm to use for bu
0c90: 69 6c 74 2d 69 6e 20 56 46 53 20 28 64 65 66 61 ilt-in VFS (defa
0ca0: 75 6c 74 3a 20 61 75 74 6f 29 5d 29 2c 20 5b 0a ult: auto)]), [.
0cb0: 09 63 61 73 65 20 22 24 65 6e 61 62 6c 65 76 61 .case "$enableva
0cc0: 6c 22 20 69 6e 0a 09 09 6d 6b 34 29 0a 09 09 09 l" in...mk4)....
0cd0: 73 74 6f 72 61 67 65 5f 6d 65 63 68 3d 22 6d 6b storage_mech="mk
0ce0: 34 22 0a 0a 09 09 09 41 43 5f 44 45 46 49 4e 45 4".....AC_DEFINE
0cf0: 28 5b 4b 49 54 5f 53 54 4f 52 41 47 45 5f 4d 4b ([KIT_STORAGE_MK
0d00: 34 5d 2c 20 5b 31 5d 2c 20 5b 44 65 66 69 6e 65 4], [1], [Define
0d10: 20 69 66 20 79 6f 75 20 61 72 65 20 67 6f 69 6e if you are goin
0d20: 67 20 74 6f 20 75 73 65 20 4d 65 74 61 6b 69 74 g to use Metakit
0d30: 34 20 66 6f 72 20 6b 69 74 20 73 74 6f 72 61 67 4 for kit storag
0d40: 65 5d 29 0a 09 09 09 3b 3b 0a 09 09 7a 69 70 29 e])....;;...zip)
0d50: 0a 09 09 09 73 74 6f 72 61 67 65 5f 6d 65 63 68 ....storage_mech
0d60: 3d 22 7a 69 70 22 0a 0a 09 09 09 41 43 5f 44 45 ="zip".....AC_DE
0d70: 46 49 4e 45 28 5b 4b 49 54 5f 53 54 4f 52 41 47 FINE([KIT_STORAG
0d80: 45 5f 5a 49 50 5d 2c 20 5b 31 5d 2c 20 5b 44 65 E_ZIP], [1], [De
0d90: 66 69 6e 65 20 69 66 20 79 6f 75 20 61 72 65 20 fine if you are
0da0: 67 6f 69 6e 67 20 74 6f 20 75 73 65 20 5a 49 50 going to use ZIP
0db0: 20 66 6f 72 20 6b 69 74 20 73 74 6f 72 61 67 65 for kit storage
0dc0: 5d 29 0a 09 09 09 3b 3b 0a 09 09 63 76 66 73 29 ])....;;...cvfs)
0dd0: 0a 09 09 09 73 74 6f 72 61 67 65 5f 6d 65 63 68 ....storage_mech
0de0: 3d 22 63 76 66 73 22 0a 0a 09 09 09 41 43 5f 44 ="cvfs".....AC_D
0df0: 45 46 49 4e 45 28 5b 4b 49 54 5f 53 54 4f 52 41 EFINE([KIT_STORA
0e00: 47 45 5f 43 56 46 53 5d 2c 20 5b 31 5d 2c 20 5b GE_CVFS], [1], [
0e10: 44 65 66 69 6e 65 20 69 66 20 79 6f 75 20 61 72 Define if you ar
0e20: 65 20 67 6f 69 6e 67 20 74 6f 20 75 73 65 20 43 e going to use C
0e30: 2d 56 46 53 20 66 6f 72 20 6b 69 74 20 73 74 6f -VFS for kit sto
0e40: 72 61 67 65 5d 29 0a 09 09 09 3b 3b 0a 09 09 79 rage])....;;...y
0e50: 65 73 29 0a 09 09 09 23 20 49 66 20 74 68 65 79 es)....# If they
0e60: 20 6a 75 73 74 20 77 61 6e 74 20 74 6f 20 65 6e just want to en
0e70: 61 62 6c 65 20 6b 69 74 20 73 74 6f 72 61 67 65 able kit storage
0e80: 2c 20 62 75 74 20 6e 6f 74 68 69 6e 67 20 73 70 , but nothing sp
0e90: 65 63 69 66 69 63 61 6c 6c 79 2c 20 64 6f 20 6e ecifically, do n
0ea0: 6f 74 68 69 6e 67 0a 09 09 09 73 74 6f 72 61 67 othing....storag
0eb0: 65 5f 6d 65 63 68 3d 22 61 75 74 6f 22 0a 09 09 e_mech="auto"...
0ec0: 09 3b 3b 0a 09 09 61 75 74 6f 29 0a 09 09 09 23 .;;...auto)....#
0ed0: 20 41 75 74 6f 20 69 73 20 68 6f 77 20 69 74 20 Auto is how it
0ee0: 77 6f 72 6b 73 20 62 79 20 64 65 66 61 75 6c 74 works by default
0ef0: 0a 09 09 09 73 74 6f 72 61 67 65 5f 6d 65 63 68 ....storage_mech
0f00: 3d 22 61 75 74 6f 22 0a 09 09 09 3b 3b 0a 09 09 ="auto"....;;...
0f10: 6e 6f 29 0a 09 09 09 23 20 59 6f 75 20 63 61 6e no)....# You can
0f20: 27 74 20 64 69 73 61 62 6c 65 20 6b 69 74 20 73 't disable kit s
0f30: 74 6f 72 61 67 65 0a 09 09 09 41 43 5f 4d 53 47 torage....AC_MSG
0f40: 5f 52 45 53 55 4c 54 28 5b 66 61 69 6c 5d 29 0a _RESULT([fail]).
0f50: 09 09 09 41 43 5f 4d 53 47 5f 45 52 52 4f 52 28 ...AC_MSG_ERROR(
0f60: 5b 4b 69 74 20 53 74 6f 72 61 67 65 20 63 61 6e [Kit Storage can
0f70: 6e 6f 74 20 62 65 20 64 69 73 61 62 6c 65 64 5d not be disabled]
0f80: 29 0a 09 09 09 3b 3b 0a 09 09 2a 29 0a 09 09 09 )....;;...*)....
0f90: 41 43 5f 4d 53 47 5f 52 45 53 55 4c 54 28 5b 66 AC_MSG_RESULT([f
0fa0: 61 69 6c 5d 29 0a 09 09 09 41 43 5f 4d 53 47 5f ail])....AC_MSG_
0fb0: 45 52 52 4f 52 28 5b 55 6e 6b 6e 6f 77 6e 20 6b ERROR([Unknown k
0fc0: 69 74 20 73 74 6f 72 61 67 65 20 74 79 70 65 3a it storage type:
0fd0: 20 24 65 6e 61 62 6c 65 76 61 6c 5d 29 0a 09 09 $enableval])...
0fe0: 09 3b 3b 0a 09 65 73 61 63 0a 5d 29 0a 41 43 5f .;;..esac.]).AC_
0ff0: 4d 53 47 5f 52 45 53 55 4c 54 28 5b 24 73 74 6f MSG_RESULT([$sto
1000: 72 61 67 65 5f 6d 65 63 68 5d 29 0a 0a 64 6e 6c rage_mech])..dnl
1010: 20 56 65 72 69 66 79 20 73 61 6e 69 74 79 20 6f Verify sanity o
1020: 66 20 73 74 6f 72 61 67 65 20 6d 65 63 68 61 6e f storage mechan
1030: 69 73 6d 0a 69 66 20 21 20 74 65 73 74 20 22 24 ism.if ! test "$
1040: 54 41 52 47 45 54 22 20 3d 20 22 74 63 6c 6b 69 TARGET" = "tclki
1050: 74 22 3b 20 74 68 65 6e 0a 09 63 61 73 65 20 22 t"; then..case "
1060: 24 73 74 6f 72 61 67 65 5f 6d 65 63 68 22 20 69 $storage_mech" i
1070: 6e 0a 09 09 61 75 74 6f 7c 63 76 66 73 29 0a 09 n...auto|cvfs)..
1080: 09 09 74 72 75 65 0a 09 09 09 3b 3b 0a 09 09 2a ..true....;;...*
1090: 29 0a 09 09 09 41 43 5f 4d 53 47 5f 45 52 52 4f )....AC_MSG_ERRO
10a0: 52 28 5b 4f 6e 6c 79 20 22 63 76 66 73 22 20 61 R([Only "cvfs" a
10b0: 6e 64 20 22 61 75 74 6f 22 20 61 72 65 20 76 61 nd "auto" are va
10c0: 6c 69 64 20 73 74 6f 72 61 67 65 20 6d 65 63 68 lid storage mech
10d0: 61 6e 69 73 6d 73 20 77 68 65 6e 20 62 75 69 6c anisms when buil
10e0: 64 69 6e 67 20 4b 69 74 44 4c 4c 5d 29 0a 09 09 ding KitDLL])...
10f0: 09 3b 3b 0a 09 65 73 61 63 0a 66 69 0a 0a 64 6e .;;..esac.fi..dn
1100: 6c 20 50 75 74 20 63 6f 72 72 65 63 74 20 4d 61 l Put correct Ma
1110: 6b 65 66 69 6c 65 20 74 65 6d 70 6c 61 74 65 20 kefile template
1120: 69 6e 20 70 6c 61 63 65 0a 72 6d 20 2d 66 20 4d in place.rm -f M
1130: 61 6b 65 66 69 6c 65 2e 69 6e 0a 63 70 20 4d 61 akefile.in.cp Ma
1140: 6b 65 66 69 6c 65 2e 24 7b 54 41 52 47 45 54 7d kefile.${TARGET}
1150: 2e 69 6e 20 4d 61 6b 65 66 69 6c 65 2e 69 6e 0a .in Makefile.in.
1160: 0a 64 6e 6c 20 50 72 6f 64 75 63 65 20 6f 75 74 .dnl Produce out
1170: 70 75 74 0a 41 43 5f 4f 55 54 50 55 54 28 4d 61 put.AC_OUTPUT(Ma
1180: 6b 65 66 69 6c 65 20 4d 61 6b 65 66 69 6c 65 2e kefile Makefile.
1190: 63 6f 6d 6d 6f 6e 29 0a common).