Check-in [ea89461e7c]
Overview
Comment:Updated to check for define subprojects working as found

Updated to only link against C++ libs if Mk4tcl worked

Updated to check for MK4TCL available before referencing it

Added SunStudio C++ libraries

Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: ea89461e7c1e70b9c0f5b853243f736038220180
User & Date: rkeene on 2010-09-26 04:38:55
Other Links: manifest | tags
Context
2010-09-26
04:38
KitCreator 0.0.5.x check-in: 6d978c1a18 user: rkeene tags: trunk, 0.0.5
04:38
Updated to check for define subprojects working as found

Updated to only link against C++ libs if Mk4tcl worked

Updated to check for MK4TCL available before referencing it

Added SunStudio C++ libraries check-in: ea89461e7c user: rkeene tags: trunk

04:38
Updated to pass configure arguments to configure script check-in: 48744656f9 user: rkeene tags: trunk
Changes

Modified kitsh/buildsrc/kitsh-0.0/aclocal.m4 from [c2b5bbda30] to [abd6ccb011].

39
40
41
42
43
44
45


46
47
48


49




50
51


52
53
54

55
56
57
58
59
60
61
62
63










64
65
66
67

	AC_MSG_RESULT([$tclconfigsh])
])

AC_DEFUN(DC_DO_STATIC_LINK_LIBCXX, [
	AC_MSG_CHECKING([for how to statically link to libstdc++])



	STATICLIBCXX="-Wl,-Bstatic -lstdc++ -Wl,-Bdynamic"
	LIBS="${LIBS} ${STATICLIBCXX}"



	AC_SUBST(LIBS)





	AC_MSG_RESULT([${STATICLIBCXX}])


])

AC_DEFUN(DC_FIND_TCLKIT_LIBS, [

	for proj in mk4tcl tcl tclvfs; do
		AC_MSG_CHECKING([for libraries required for ${proj}])

		libdir="../../../${proj}/inst"
		libfiles="`find "${libdir}" -name '*.a' | tr "\n" ' '`"

		ARCHS="${ARCHS} ${libfiles}"

		AC_MSG_RESULT([${libfiles}])










	done

	AC_SUBST(ARCHS)
])







>
>
|
|

>
>
|
>
>
>
>

|
>
>



>









>
>
>
>
>
>
>
>
>
>




39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88

	AC_MSG_RESULT([$tclconfigsh])
])

AC_DEFUN(DC_DO_STATIC_LINK_LIBCXX, [
	AC_MSG_CHECKING([for how to statically link to libstdc++])

	SAVELIBS="${LIBS}"
	staticlibcxx=""
	for trylink in "-Wl,-Bstatic -lstdc++ -Wl,-Bdynamic" "-Wl,-Bstatic -lCstd -lCrun -Wl,-Bdynamic" "-lstdc++" "-lCstd -lCrun"; do
		LIBS="${SAVELIBS} ${trylink}"

		AC_LINK_IFELSE(, [
			staticlibcxx="${trylink}"

			break
		])
	done
	LIBS="${SAVELIBS} ${staticlibcxx}"

	AC_MSG_RESULT([${staticlibcxx}])

	AC_SUBST(LIBS)
])

AC_DEFUN(DC_FIND_TCLKIT_LIBS, [

	for proj in mk4tcl tcl tclvfs; do
		AC_MSG_CHECKING([for libraries required for ${proj}])

		libdir="../../../${proj}/inst"
		libfiles="`find "${libdir}" -name '*.a' | tr "\n" ' '`"

		ARCHS="${ARCHS} ${libfiles}"

		AC_MSG_RESULT([${libfiles}])

		if test "${libfiles}" != ""; then
			upperproj=`echo "${proj}" | dd conv=ucase 2>/dev/null`

			AC_DEFINE(KIT_INCLUDES_$upperproj)

			if test "${proj}" = "mk4tcl"; then
				DC_DO_STATIC_LINK_LIBCXX
			fi
		fi
	done

	AC_SUBST(ARCHS)
])

Modified kitsh/buildsrc/kitsh-0.0/configure.ac from [3b08b8978d] to [f5d520c4b9].

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24






25
26
27
28
29
30
31
dnl What are we running
AC_INIT(kitsh, 0.0)
AC_CONFIG_HEADER(config.h)

dnl Checks for programs.
AC_PROG_CC
AC_PROG_MAKE_SET
AC_PROG_INSTALL
AC_AIX
AC_GNU_SOURCE

dnl Find the appropriate Tcl headers and libraries
DC_DO_TCL

dnl Find out how to statically link to libstdc++ (for Metakit)
DC_DO_STATIC_LINK_LIBCXX

dnl Find archives we need to link to
DC_FIND_TCLKIT_LIBS

dnl Find the appropriate libraries to link to
AC_SEARCH_LIBS(inflate, z zlib,, [ AC_MSG_WARN([Couldn't find inflate (normally in zlib)!]) ])
AC_SEARCH_LIBS(acos, m,, [ AC_MSG_WARN([Couldn't find acos (normally in libm)!]) ])
AC_SEARCH_LIBS(dlsym, dl,, [ AC_MSG_WARN([Couldn't find dlsym (normally in libdl)!]) ])







dnl Determine if we have "Tcl_SetStartupScript" (8.6.x) or "TclSetStartupScriptPath" (8.4.x)
SAVE_LIBS="${LIBS}"
LIBS="${ARCHS} ${LIBS}"
AC_CHECK_FUNCS(Tcl_SetStartupScript TclSetStartupScriptPath)
LIBS="${SAVE_LIBS}"












<
<
<
<
<
<
<
<
<




>
>
>
>
>
>







1
2
3
4
5
6
7
8
9
10
11









12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
dnl What are we running
AC_INIT(kitsh, 0.0)
AC_CONFIG_HEADER(config.h)

dnl Checks for programs.
AC_PROG_CC
AC_PROG_MAKE_SET
AC_PROG_INSTALL
AC_AIX
AC_GNU_SOURCE










dnl Find the appropriate libraries to link to
AC_SEARCH_LIBS(inflate, z zlib,, [ AC_MSG_WARN([Couldn't find inflate (normally in zlib)!]) ])
AC_SEARCH_LIBS(acos, m,, [ AC_MSG_WARN([Couldn't find acos (normally in libm)!]) ])
AC_SEARCH_LIBS(dlsym, dl,, [ AC_MSG_WARN([Couldn't find dlsym (normally in libdl)!]) ])

dnl Find the appropriate Tcl headers and libraries
DC_DO_TCL

dnl Find archives we need to link to
DC_FIND_TCLKIT_LIBS

dnl Determine if we have "Tcl_SetStartupScript" (8.6.x) or "TclSetStartupScriptPath" (8.4.x)
SAVE_LIBS="${LIBS}"
LIBS="${ARCHS} ${LIBS}"
AC_CHECK_FUNCS(Tcl_SetStartupScript TclSetStartupScriptPath)
LIBS="${SAVE_LIBS}"

Modified kitsh/buildsrc/kitsh-0.0/kitInit.c from [04b049978f] to [9210ecc7cd].

32
33
34
35
36
37
38

39


40
41
42
43
44
45
46
#endif

#include "tclInt.h"

#ifdef KIT_INCLUDES_ITCL
Tcl_AppInitProc	Itcl_Init;
#endif

Tcl_AppInitProc	Mk4tcl_Init, Vfs_Init, Rechan_Init, Zlib_Init;


#if 10 * TCL_MAJOR_VERSION + TCL_MINOR_VERSION < 85
Tcl_AppInitProc	Pwb_Init;
#endif
#ifdef TCL_THREADS
Tcl_AppInitProc	Thread_Init;
#endif
#ifdef _WIN32







>
|
>
>







32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#endif

#include "tclInt.h"

#ifdef KIT_INCLUDES_ITCL
Tcl_AppInitProc	Itcl_Init;
#endif
#ifdef KIT_INCLUDES_MK4TCL
Tcl_AppInitProc	Mk4tcl_Init
#endif
Tcl_AppInitProc Vfs_Init, Rechan_Init, Zlib_Init;
#if 10 * TCL_MAJOR_VERSION + TCL_MINOR_VERSION < 85
Tcl_AppInitProc	Pwb_Init;
#endif
#ifdef TCL_THREADS
Tcl_AppInitProc	Thread_Init;
#endif
#ifdef _WIN32
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
    "info script $old\n"
    "if {$code == 2} { set code 0 }\n"
    "return -code $code $res\n"
"}\n"
#endif
"proc tclKitInit {} {\n"
    "rename tclKitInit {}\n"
    "load {} Mk4tcl\n"
    "mk::file open exe [info nameofexecutable] -readonly\n"
    "set n [mk::select exe.dirs!0.files name boot.tcl]\n"
    "if {$n != \"\"} {\n"
        "set s [mk::get exe.dirs!0.files!$n contents]\n"
	"if {![string length $s]} { error \"empty boot.tcl\" }\n"
        "catch {load {} zlib}\n"
        "if {[mk::get exe.dirs!0.files!$n size] != [string length $s]} {\n"







|







74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
    "info script $old\n"
    "if {$code == 2} { set code 0 }\n"
    "return -code $code $res\n"
"}\n"
#endif
"proc tclKitInit {} {\n"
    "rename tclKitInit {}\n"
    "catch { load {} Mk4tcl }\n"
    "mk::file open exe [info nameofexecutable] -readonly\n"
    "set n [mk::select exe.dirs!0.files name boot.tcl]\n"
    "if {$n != \"\"} {\n"
        "set s [mk::get exe.dirs!0.files!$n contents]\n"
	"if {![string length $s]} { error \"empty boot.tcl\" }\n"
        "catch {load {} zlib}\n"
        "if {[mk::get exe.dirs!0.files!$n size] != [string length $s]} {\n"
129
130
131
132
133
134
135

136

137
138
139
140
141
142
143

int 
TclKit_AppInit(Tcl_Interp *interp)
{
#ifdef KIT_INCLUDES_ITCL
    Tcl_StaticPackage(0, "Itcl", Itcl_Init, NULL);
#endif 

    Tcl_StaticPackage(0, "Mk4tcl", Mk4tcl_Init, NULL);

#if 10 * TCL_MAJOR_VERSION + TCL_MINOR_VERSION < 85
    Tcl_StaticPackage(0, "pwb", Pwb_Init, NULL);
#endif 
    Tcl_StaticPackage(0, "rechan", Rechan_Init, NULL);
    Tcl_StaticPackage(0, "vfs", Vfs_Init, NULL);
    Tcl_StaticPackage(0, "zlib", Zlib_Init, NULL);
#ifdef TCL_THREADS







>

>







132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148

int 
TclKit_AppInit(Tcl_Interp *interp)
{
#ifdef KIT_INCLUDES_ITCL
    Tcl_StaticPackage(0, "Itcl", Itcl_Init, NULL);
#endif 
#ifdef KIT_INCLUDES_MK4TCL
    Tcl_StaticPackage(0, "Mk4tcl", Mk4tcl_Init, NULL);
#endif
#if 10 * TCL_MAJOR_VERSION + TCL_MINOR_VERSION < 85
    Tcl_StaticPackage(0, "pwb", Pwb_Init, NULL);
#endif 
    Tcl_StaticPackage(0, "rechan", Rechan_Init, NULL);
    Tcl_StaticPackage(0, "vfs", Vfs_Init, NULL);
    Tcl_StaticPackage(0, "zlib", Zlib_Init, NULL);
#ifdef TCL_THREADS