Check-in [bab5762df8]
Overview
Comment:Cleanup configure and also weaken static library symbols
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:bab5762df82ede28542396517d3911ad039a67d3
User & Date: rkeene on 2014-05-05 21:38:51
Other Links: manifest | tags
Context
2014-05-05
21:39
tcc4tcl 0.4 check-in: 380bdee1f8 user: rkeene tags: trunk, 0.4
21:38
Cleanup configure and also weaken static library symbols check-in: bab5762df8 user: rkeene tags: trunk
21:12
Reverted [75e4d5fbed] and updated to do integration work in our driver directly check-in: cbac5b0590 user: rkeene tags: trunk
Changes

Modified Makefile.in from [f3dd26de50] to [7aa8d0f754].

53
54
55
56
57
58
59

60
61
62
63
64
65
66
	-@REMOVESYMS@ tcc4tcl.@SHOBJEXT@

tcc4tcl-static.a: tcc4tcl.o tcc/libtcc.a
	cp tcc/libtcc.a tcc4tcl-static.new.a
	$(AR) rcu tcc4tcl-static.new.a tcc4tcl.o
	-$(RANLIB) tcc4tcl-static.new.a
	mv tcc4tcl-static.new.a tcc4tcl-static.a


install: $(TARGET) pkgIndex.tcl $(srcdir)/tcc4tcl.tcl tcc/libtcc1.a $(shell echo $(srcdir)/tcc/include/*) $(srcdir)/headers.awk
	$(INSTALL) -d "$(DESTDIR)$(PACKAGE_INSTALL_DIR)"
	$(INSTALL) -d "$(DESTDIR)$(PACKAGE_INSTALL_DIR)/lib"
	$(INSTALL) -d "$(DESTDIR)$(PACKAGE_INSTALL_DIR)/include"
	$(INSTALL) -m 0755 $(TARGET) "$(DESTDIR)$(PACKAGE_INSTALL_DIR)"
	$(INSTALL) -m 0644 pkgIndex.tcl "$(DESTDIR)$(PACKAGE_INSTALL_DIR)"







>







53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
	-@REMOVESYMS@ tcc4tcl.@SHOBJEXT@

tcc4tcl-static.a: tcc4tcl.o tcc/libtcc.a
	cp tcc/libtcc.a tcc4tcl-static.new.a
	$(AR) rcu tcc4tcl-static.new.a tcc4tcl.o
	-$(RANLIB) tcc4tcl-static.new.a
	mv tcc4tcl-static.new.a tcc4tcl-static.a
	-@WEAKENSYMS@ tcc4tcl-static.a

install: $(TARGET) pkgIndex.tcl $(srcdir)/tcc4tcl.tcl tcc/libtcc1.a $(shell echo $(srcdir)/tcc/include/*) $(srcdir)/headers.awk
	$(INSTALL) -d "$(DESTDIR)$(PACKAGE_INSTALL_DIR)"
	$(INSTALL) -d "$(DESTDIR)$(PACKAGE_INSTALL_DIR)/lib"
	$(INSTALL) -d "$(DESTDIR)$(PACKAGE_INSTALL_DIR)/include"
	$(INSTALL) -m 0755 $(TARGET) "$(DESTDIR)$(PACKAGE_INSTALL_DIR)"
	$(INSTALL) -m 0644 pkgIndex.tcl "$(DESTDIR)$(PACKAGE_INSTALL_DIR)"

Modified configure.ac from [ed00a008d9] to [5732181c96].

10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
..
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
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

89
90
91

dnl Determine system information
DC_CHK_OS_INFO

dnl Determine if a shared or static build is requested
AC_ARG_ENABLE([static], AS_HELP_STRING([--enable-static], [build static library instead of shared library]), [
	if test "$enableval" = "no"; then
		TCC4TCL_TARGET=static
	else
		TCC4TCL_TARGET=shared
	fi
], [
	TCC4TCL_TARGET=shared
])

dnl Configure TCC build options
AC_SUBST(TCC_CONFIGURE_OPTS)
................................................................................

if test "${TCC4TCL_TARGET}" = "shared"; then
	dnl Determine how to make shared objects
	DC_GET_SHOBJFLAGS

	dnl Only export symbols we wish to expose
	TARGET="tcc4tcl.${SHOBJEXT}"


	AC_CHECK_HEADERS(windows.h)
	AC_CHECK_HEADERS(psapi.h,,, [
#ifdef HAVE_WINDOWS_H
#  include <windows.h>
#endif
])

	AC_MSG_CHECKING([for EnumProcessModules in -lpsapi])
	SAVE_LIBS="$LIBS"
	LIBS="-lpsapi $LIBS"
	AC_LINK_IFELSE([AC_LANG_PROGRAM([
#ifdef HAVE_WINDOWS_H
#  include <windows.h>
#endif
#ifdef HAVE_PSAPI_H
#  include <psapi.h>
#endif
], [
	EnumProcessModules(NULL, NULL, 0, NULL);
])], [
	AC_MSG_RESULT([found])
], [
	AC_MSG_RESULT([not found])
	LIBS="$SAVE_LIBS"
])
else
	TARGET="tcc4tcl-static.a"
fi
AC_SUBST(TARGET)
AC_SUBST(TCC4TCL_TARGET)

dnl Find out if we have the functions needed to open shared objects
AC_SEARCH_LIBS(dlopen, dl,, [
        AC_SEARCH_LIBS(shl_load, dld dl)
])
AC_CHECK_FUNCS(dlopen shl_load)

dnl Look for appropriate headers
AC_CHECK_HEADERS(unistd.h stdlib.h string.h strings.h dlfcn.h dl.h)

dnl Perform Tcl Extension required stuff
TCLEXT_INIT

dnl This must be done last since it breaks the compilation
if test "${TCC4TCL_TARGET}" = "shared"; then
	DC_SETVERSIONSCRIPT([tcc4tcl.syms], [tcc4tcl.vers])
	DC_FIND_STRIP_AND_REMOVESYMS([tcc4tcl.syms])
fi


dnl Produce output
AC_OUTPUT(Makefile pkgIndex.tcl tcc4tcl.syms)







|

|







 







<
>
|
|
<
<
<
<

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<





<
<
<
<
<
<
<
<
<






<

>



10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
..
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

dnl Determine system information
DC_CHK_OS_INFO

dnl Determine if a shared or static build is requested
AC_ARG_ENABLE([static], AS_HELP_STRING([--enable-static], [build static library instead of shared library]), [
	if test "$enableval" = "no"; then
		TCC4TCL_TARGET=shared
	else
		TCC4TCL_TARGET=static
	fi
], [
	TCC4TCL_TARGET=shared
])

dnl Configure TCC build options
AC_SUBST(TCC_CONFIGURE_OPTS)
................................................................................

if test "${TCC4TCL_TARGET}" = "shared"; then
	dnl Determine how to make shared objects
	DC_GET_SHOBJFLAGS

	dnl Only export symbols we wish to expose
	TARGET="tcc4tcl.${SHOBJEXT}"

else
	AC_CHECK_TOOL([RANLIB], [ranlib])
	AC_CHECK_TOOL([AR], [ar])
























	TARGET="tcc4tcl-static.a"
fi
AC_SUBST(TARGET)
AC_SUBST(TCC4TCL_TARGET)










dnl Perform Tcl Extension required stuff
TCLEXT_INIT

dnl This must be done last since it breaks the compilation
if test "${TCC4TCL_TARGET}" = "shared"; then
	DC_SETVERSIONSCRIPT([tcc4tcl.syms], [tcc4tcl.vers])

fi
DC_FIND_STRIP_AND_REMOVESYMS([tcc4tcl.syms])

dnl Produce output
AC_OUTPUT(Makefile pkgIndex.tcl tcc4tcl.syms)