buildsys  Check-in [075461c0b0]

Overview
Comment:Use $host instead of $target.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 075461c0b008fe1fa7b40744e20424a24e57971d265e3f0f1b970dc6eac3a06b
User & Date: js on 2009-04-15 14:17:33
Other Links: manifest | tags
Context
2009-04-15
14:20
Fix OpenBSD and MirBSD target. check-in: dd07640ce1 user: js tags: trunk
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
Changes

Modified m4/buildsys.m4 from [114780eddd] to [d049c3f4fd].

18
19
20
21
22
23
24
25

26
27
28
29


30
31

32
33
34
35

36
37

38
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
18
19
20
21
22
23
24

25

26


27
28


29

30
31
32
33
34

35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54

55
56
57
58
59
60
61
62







-
+
-

-
-
+
+
-
-
+
-



+

-
+

















+

-
+







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],
		AS_HELP_STRING([--disable-shared], [don't build shared libraries]))
		enable_shared="$enableval")

	if test x"$enableval" = x"no"; then
		BUILDSYS_STATIC_LIB_ONLY
	AS_IF([test x"$enable_shared" = x"no"],
		BUILDSYS_STATIC_LIB_ONLY,
	else
		BUILDSYS_SHARED_LIB
		BUILDSYS_SHARED_LIB)
	fi
])

AC_DEFUN([BUILDSYS_PROG_IMPLIB], [
	AC_REQUIRE([AC_CANONICAL_HOST])
	AC_MSG_CHECKING(whether we need an implib)
	case "$target" in
	case "$host" in
		*-*-cygwin* | *-*-mingw*)
			AC_MSG_RESULT(yes)
			PROG_IMPLIB_NEEDED='yes'
			PROG_IMPLIB_LDFLAGS='-Wl,-export-all-symbols,--out-implib,lib${PROG}.a'
			;;
		*)
			AC_MSG_RESULT(no)
			PROG_IMPLIB_NEEDED='no'
			PROG_IMPLIB_LDFLAGS=''
			;;
	esac

	AC_SUBST(PROG_IMPLIB_NEEDED)
	AC_SUBST(PROG_IMPLIB_LDFLAGS)
])

AC_DEFUN([BUILDSYS_SHARED_LIB], [
	AC_REQUIRE([AC_CANONICAL_HOST])
	AC_MSG_CHECKING(for shared library system)
	case "$target" in
	case "$host" in
		intel-apple-*)
			AC_MSG_RESULT([Mac OS X (Intel)])
			LIB_CPPFLAGS='-DPIC'
			LIB_CFLAGS='-fPIC'
			LIB_LDFLAGS='-dynamiclib -fPIC -install_name ${libdir}/${LIB}'
			LIB_PREFIX='lib'
			LIB_SUFFIX='.dylib'
142
143
144
145
146
147
148
149
150


151
152
153
154
155
156
157
141
142
143
144
145
146
147


148
149
150
151
152
153
154
155
156







-
-
+
+







	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
	AC_REQUIRE([AC_PROG_RANLIB])
	AC_PATH_TOOL(AR, ar)

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