buildsys  Check-in [4a8529bfde]

Overview
Comment:Make it possible to build libraries as static libraries only.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 4a8529bfde4c65b0d8760e8a64d3cb004d5e5bdf725280a5ec2b50293fb12365
User & Date: js on 2008-12-23 13:36:26
Other Links: manifest | tags
Context
2009-04-15
14:17
Use $host instead of $target. check-in: 075461c0b0 user: js tags: trunk
2008-12-23
13:36
Make it possible to build libraries as static libraries only. check-in: 4a8529bfde user: js tags: trunk
03:53
Remove spaces at end of line. check-in: 0459f92e4f user: js tags: trunk
Changes

Modified buildsys.mk.in from [80d2d7a371] to [7300e92515].

146
147
148
149
150
151
152





153
154
155
156
157
158








159
160
161
162
163
164
165
146
147
148
149
150
151
152
153
154
155
156
157






158
159
160
161
162
163
164
165
166
167
168
169
170
171
172







+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
+
+







	if ${LD} -o $@ ${OBJS} ${LDFLAGS} ${LIBS}; then \
		${LINK_OK}; \
	else \
		${LINK_FAILED}; \
	fi

${LIB} ${LIB_NOINST}: ${EXT_DEPS} ${OBJS}
	case $@ in \
		*.a) \
			${MAKE} ${MFLAGS} STATIC_LIB=${LIB} LIB= $@ || exit 1 \
			;; \
		*) \
	${LINK_STATUS}
	if ${LD} -o $@ ${OBJS} ${LIB_LDFLAGS} ${LDFLAGS} ${LIBS}; then \
		${LINK_OK}; \
	else \
		${LINK_FAILED}; \
	fi
			${LINK_STATUS}; \
			if ${LD} -o $@ ${OBJS} ${LIB_LDFLAGS} ${LDFLAGS} ${LIBS}; then \
				${LINK_OK}; \
			else \
				${LINK_FAILED}; \
			fi \
			;; \
	esac

${PLUGIN} ${PLUGIN_NOINST}: ${EXT_DEPS} ${OBJS}
	${LINK_STATUS}
	if ${LD} -o $@ ${OBJS} ${PLUGIN_LDFLAGS} ${LDFLAGS} ${LIBS}; then \
		${LINK_OK}; \
	else \
		${LINK_FAILED}; \

Modified m4/buildsys.m4 from [20a47d6425] to [114780eddd].

15
16
17
18
19
20
21












22
23
24
25
26
27
28
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40







+
+
+
+
+
+
+
+
+
+
+
+







dnl CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
dnl SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
dnl INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
dnl CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
dnl ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
dnl POSSIBILITY OF SUCH DAMAGE.
dnl

AC_DEFUN([BUILDSYS_LIB], [
	AC_ARG_ENABLE(shared,
		[  --disable-shared        don't build shared libraries],
		enable_shared="$enableval")

	if test x"$enableval" = x"no"; then
		BUILDSYS_STATIC_LIB_ONLY
	else
		BUILDSYS_SHARED_LIB
	fi
])

AC_DEFUN([BUILDSYS_PROG_IMPLIB], [
	AC_MSG_CHECKING(whether we need an implib)
	case "$target" in
		*-*-cygwin* | *-*-mingw*)
			AC_MSG_RESULT(yes)
			PROG_IMPLIB_NEEDED='yes'
124
125
126
127
128
129
130























131
132
133
134
135
136
137
138
139
140
141
142
143
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178







+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+













	AC_SUBST(LIB_LDFLAGS)
	AC_SUBST(LIB_PREFIX)
	AC_SUBST(LIB_SUFFIX)
	AC_SUBST(PLUGIN_CPPFLAGS)
	AC_SUBST(PLUGIN_CFLAGS)
	AC_SUBST(PLUGIN_LDFLAGS)
	AC_SUBST(PLUGIN_SUFFIX)
	AC_SUBST(INSTALL_LIB)
	AC_SUBST(UNINSTALL_LIB)
	AC_SUBST(CLEAN_LIB)
])

AC_DEFUN([BUILDSYS_STATIC_LIB_ONLY], [
	AC_PATH_PROG(AR, ar)
	AC_PROG_RANLIB

	LIB_CPPFLAGS=''
	LIB_CFLAGS=''
	LIB_LDFLAGS=''
	LIB_PREFIX='lib'
	LIB_SUFFIX='.a'
	INSTALL_LIB='${INSTALL} -m 644 $$i ${DESTDIR}${libdir}/$$i'
	UNINSTALL_LIB='rm -f ${DESTDIR}${libdir}/$$i'
	CLEAN_LIB=''

	AC_SUBST(LIB_CPPFLAGS)
	AC_SUBST(LIB_CFLAGS)
	AC_SUBST(LIB_LDFLAGS)
	AC_SUBST(LIB_PREFIX)
	AC_SUBST(LIB_SUFFIX)
	AC_SUBST(INSTALL_LIB)
	AC_SUBST(UNINSTALL_LIB)
	AC_SUBST(CLEAN_LIB)
])

AC_DEFUN([BUILDSYS_TOUCH_DEPS], [
	${as_echo:="echo"} "${as_me:="configure"}: touching .deps files"
	for i in $(find . -name Makefile); do
		DEPSFILE="$(dirname $i)/.deps"
		test -f "$DEPSFILE" && rm "$DEPSFILE"
		touch -t 0001010000 "$DEPSFILE"
	done
])