Check-in [580c833532]
Overview
Comment:Updated to try to link statically to zlib
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:580c83353268f42b41ee8c397819aba1fcd8f112
User & Date: rkeene on 2010-09-26 04:42:52
Other Links: manifest | tags
Context
2010-09-26
04:42
KitCreator 0.2.4.x check-in: 49e8ab0bae user: rkeene tags: trunk, 0.2.4
04:42
Updated to try to link statically to zlib check-in: 580c833532 user: rkeene tags: trunk
04:42
Added back safe successful exits check-in: baaf0c5896 user: rkeene tags: trunk
Changes

Modified kitsh/buildsrc/kitsh-0.0/aclocal.m4 from [bc43649110] to [e537bcd01c].

90
91
92
93
94
95
96
97
98
99
100
101

102
103
104
105
106
107
108
109
110

111
112
113
114


115
116
117
118
119
















120
121
122
123
124
125
126
	AC_SUBST(CFLAGS)
	AC_SUBST(CPPFLAGS)
	AC_SUBST(LIBS)

	AC_MSG_RESULT([$tkconfigsh])
])

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

	SAVELIBS="${LIBS}"
	staticlibcxx=""

	dnl HP/UX uses -Wl,-a,archive -lstdc++ -Wl,-a,shared_archive
	dnl Linux and Solaris us -Wl,-Bstatic ... -Wl,-Bdynamic
	dnl
	dnl Sun Studio uses -lCstd -lCrun, most platforms use -lstdc++
	for trylink in "-Wl,-a,archive -lstdc++ -Wl,-a,shared_archive" "-Wl,-Bstatic -lCstd -lCrun -Wl,-Bdynamic" "-Wl,-Bstatic -lstdc++ -Wl,-Bdynamic" "-lCstd -lCrun" "-lstdc++"; do
		LIBS="${SAVELIBS} ${trylink}"

		AC_LINK_IFELSE(AC_LANG_PROGRAM([], []), [
			staticlibcxx="${trylink}"


			break
		])
	done


	LIBS="${SAVELIBS} ${staticlibcxx}"

	AC_MSG_RESULT([${staticlibcxx}])

	AC_SUBST(LIBS)
















])

AC_DEFUN(DC_FIND_TCLKIT_LIBS, [
	DC_SETUP_TCL_PLAT_DEFS

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







|
|


|
>


<
|
<



|
>




>
>
|

|

|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







90
91
92
93
94
95
96
97
98
99
100
101
102
103
104

105

106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
	AC_SUBST(CFLAGS)
	AC_SUBST(CPPFLAGS)
	AC_SUBST(LIBS)

	AC_MSG_RESULT([$tkconfigsh])
])

AC_DEFUN(DC_DO_STATIC_LINK_LIB, [
	AC_MSG_CHECKING([for how to statically link to $1])

	SAVELIBS="${LIBS}"
	staticlib=""
	found="0"
	dnl HP/UX uses -Wl,-a,archive -lstdc++ -Wl,-a,shared_archive
	dnl Linux and Solaris us -Wl,-Bstatic ... -Wl,-Bdynamic

	for trylink in "-Wl,-a,archive $2 -Wl,-a,shared_archive" "-Wl,-Bstatic $2 -Wl,-Bdynamic" "$2"; do

		LIBS="${SAVELIBS} ${trylink}"

		AC_LINK_IFELSE(AC_LANG_PROGRAM([], []), [
			staticlib="${trylink}"
			found="1"

			break
		])
	done

	if test "${found}" = "1"; then
		LIBS="${SAVELIBS} ${staticlib}"

		AC_MSG_RESULT([${staticlib}])

		AC_SUBST(LIBS)

		$3
	else
		LIBS="${SAVELIBS}"

		AC_MSG_RESULT([cant])

		$4
	fi
])

AC_DEFUN(DC_DO_STATIC_LINK_LIBCXX, [
	dnl Sun Studio uses -lCstd -lCrun, most platforms use -lstdc++
	DC_DO_STATIC_LINK_LIB([C++ Library (Sun Studio)], [-lCstd -lCrun],, [
		DC_DO_STATIC_LINK_LIB([C++ Library (UNIX)], [-lstdc++])
	])
])

AC_DEFUN(DC_FIND_TCLKIT_LIBS, [
	DC_SETUP_TCL_PLAT_DEFS

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

Modified kitsh/buildsrc/kitsh-0.0/configure.ac from [af02db7477] to [dc10e35060].

28
29
30
31
32
33
34



35



36
37
38
LIBS="${SAVE_LIBS}"

dnl Find zlib
AC_ARG_WITH(zlib, AC_HELP_STRING([--with-zlib], [directory containing zlib]), [
	CFLAGS="${CFLAGS} -I${with_zlib}/include -I${with_zlib}"
	LDFLAGS="${LDFLAGS} -L${with_zlib}/lib -L${with_zlib}"
])



AC_SEARCH_LIBS(inflate, z zlib,, [ AC_MSG_WARN([Couldn't find inflate (normally in zlib)!]) ])




dnl Produce output
AC_OUTPUT(Makefile)







>
>
>
|
>
>
>



28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
LIBS="${SAVE_LIBS}"

dnl Find zlib
AC_ARG_WITH(zlib, AC_HELP_STRING([--with-zlib], [directory containing zlib]), [
	CFLAGS="${CFLAGS} -I${with_zlib}/include -I${with_zlib}"
	LDFLAGS="${LDFLAGS} -L${with_zlib}/lib -L${with_zlib}"
])
DC_DO_STATIC_LINK_LIB(zlib, -lz,, [
	DC_DO_STATIC_LINK_LIB(zlib, -lzlib,, [
		AC_SEARCH_LIBS(inflate, z zlib,, [
			AC_MSG_WARN([Couldn't find inflate (normally in zlib)!])
		])
	])
])

dnl Produce output
AC_OUTPUT(Makefile)