Check-in [3a41ad49f2]
Overview
Comment:Added symbol versions and updated to set soname correctly if possible
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:3a41ad49f23730c3165f99b8f3ea3a4241888614
User & Date: rkeene on 2014-11-24 18:54:12
Other Links: manifest | tags
Context
2014-11-24
18:55
Updated to use shared object extension correctly in soname check-in: d516625f90 user: rkeene tags: trunk
18:54
Added symbol versions and updated to set soname correctly if possible check-in: 3a41ad49f2 user: rkeene tags: trunk
18:23
Added more authors check-in: 6389f923c5 user: rkeene tags: trunk
Changes

Modified .fossil-settings/ignore-glob from [1dd559b6be] to [7e1489e3be].

23
24
25
26
27
28
29


libconfig.dll
libconfig.dll.a
libconfig.dll.def
libconfig.so
test-lc
test-lc.exe
test.cfg









>
>
23
24
25
26
27
28
29
30
31
libconfig.dll
libconfig.dll.a
libconfig.dll.def
libconfig.so
test-lc
test-lc.exe
test.cfg
libconfig.vers
libconfig.syms

Modified Makefile.in from [804405b696] to [3788187186].

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
..
78
79
80
81
82
83
84
85
86
87
88
89
90
LIBS = libconfig.$(AREXT) libconfig.$(SHOBJEXT)
BINS =
# The following two lines need to be kept syncronised.
OBJS = libconfig.o conf_space.o conf_section.o conf_apache.o conf_colon.o conf_equal.o conf_xml.o @LIBOBJS@
SHOBJS = libconfig_shr.o conf_space_shr.o conf_section_shr.o conf_apache_shr.o conf_colon_shr.o conf_equal_shr.o conf_xml_shr.o @SHLIBOBJS@

all: $(LIBS) $(BINS)

libconfig.$(SHOBJEXT): $(SHOBJS)
	$(CC) $(CPPFLAGS) $(CFLAGS) $(SHOBJFLAGS) $(SHOBJLDFLAGS) -o $@ $^ $(LDFLAGS)



libconfig.$(AREXT): $(OBJS)
	$(AR) rcu $@ $^
	-$(RANLIB) $@

libconfig.o: $(srcdir)/libconfig.c $(srcdir)/compat.h $(srcdir)/win32.h $(srcdir)/config.h libconfig.h
libconfig_shr.o: $(srcdir)/libconfig.c $(srcdir)/compat.h $(srcdir)/win32.h $(srcdir)/config.h libconfig.h

%_shr.o: $(srcdir)/%.c
	$(CC) $(CPPFLAGS) $(CFLAGS) $(SHOBJFLAGS) -c -o $@ "$(filter %.c, $^)"

%.o: $(srcdir)/%.c
	$(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ "$(filter %.c, $^)"










test-lc$(EXEEXT): $(LIBS) $(srcdir)/test-lc.c
	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $(filter %.c, $^) $(LDFLAGS) -Wl,-R -Wl,. -L. -lconfig

install: all libconfig.h
	-$(INSTALL) -d "$(mandir)"
	-$(INSTALL) -d "$(mandir)/man3"
................................................................................
	-( cd "$(libdir)" && rm -f libconfig.$(SHOBJEXT).$(PKGVERSMAJOR) && $(LN_S) libconfig.$(SHOBJEXT).$(PKGVERS) libconfig.$(SHOBJEXT).$(PKGVERSMAJOR) )
	-( cd "$(libdir)" && rm -f libconfig.$(SHOBJEXT) && $(LN_S) libconfig.$(SHOBJEXT).$(PKGVERS) libconfig.$(SHOBJEXT) )

clean:
	rm -f *.o $(BINS) $(LIBS) *~ test-lc$(EXEEXT) *.dll.a *.dll.def *.dll

distclean: clean
	rm -f Makefile config.h config.status config.log lc_geterrno.3 lc_process.3 lc_cleanup.3 lc_process_file.3 lc_register_var.3 lc_geterrstr.3 lc_register_callback.3 libconfig.3

mrproper: distclean
	rm -f aclocal.m4 config.guess config.sub install-sh configure

.PHONY: all clean distclean install







>
|
|
>
>


|










>
>
>
>
>
>
>
>
>







 







|





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
64
65
66
67
68
69
70
71
72
..
90
91
92
93
94
95
96
97
98
99
100
101
102
LIBS = libconfig.$(AREXT) libconfig.$(SHOBJEXT)
BINS =
# The following two lines need to be kept syncronised.
OBJS = libconfig.o conf_space.o conf_section.o conf_apache.o conf_colon.o conf_equal.o conf_xml.o @LIBOBJS@
SHOBJS = libconfig_shr.o conf_space_shr.o conf_section_shr.o conf_apache_shr.o conf_colon_shr.o conf_equal_shr.o conf_xml_shr.o @SHLIBOBJS@

all: $(LIBS) $(BINS)

libconfig.$(SHOBJEXT): $(SHOBJS) libconfig.vers libconfig.syms
	$(CC) $(CPPFLAGS) $(CFLAGS) $(SHOBJFLAGS) $(SHOBJLDFLAGS) -o $@ $(SHOBJS) $(LDFLAGS)
	-@WEAKENSYMS@ libconfig.$(SHOBJEXT)
	-@REMOVESYMS@ libconfig.$(SHOBJEXT)

libconfig.$(AREXT): $(OBJS)
	$(AR) rcu $@ $(OBJS)
	-$(RANLIB) $@

libconfig.o: $(srcdir)/libconfig.c $(srcdir)/compat.h $(srcdir)/win32.h $(srcdir)/config.h libconfig.h
libconfig_shr.o: $(srcdir)/libconfig.c $(srcdir)/compat.h $(srcdir)/win32.h $(srcdir)/config.h libconfig.h

%_shr.o: $(srcdir)/%.c
	$(CC) $(CPPFLAGS) $(CFLAGS) $(SHOBJFLAGS) -c -o $@ "$(filter %.c, $^)"

%.o: $(srcdir)/%.c
	$(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ "$(filter %.c, $^)"

libconfig.vers: libconfig.syms.in
	rm -f libconfig.vers
	echo 'LIBCONFIG_0.3.0 {' > '$@'
	echo '	global:' >> '$@'
	cat libconfig.syms.in | sed 's/^@SYMPREFIX@//;s/^/		/;s/$$/;/' >> '$@'
	echo '	local:' >> '$@'
	echo '		*;' >> '$@'
	echo '};' >> '$@'

test-lc$(EXEEXT): $(LIBS) $(srcdir)/test-lc.c
	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $(filter %.c, $^) $(LDFLAGS) -Wl,-R -Wl,. -L. -lconfig

install: all libconfig.h
	-$(INSTALL) -d "$(mandir)"
	-$(INSTALL) -d "$(mandir)/man3"
................................................................................
	-( cd "$(libdir)" && rm -f libconfig.$(SHOBJEXT).$(PKGVERSMAJOR) && $(LN_S) libconfig.$(SHOBJEXT).$(PKGVERS) libconfig.$(SHOBJEXT).$(PKGVERSMAJOR) )
	-( cd "$(libdir)" && rm -f libconfig.$(SHOBJEXT) && $(LN_S) libconfig.$(SHOBJEXT).$(PKGVERS) libconfig.$(SHOBJEXT) )

clean:
	rm -f *.o $(BINS) $(LIBS) *~ test-lc$(EXEEXT) *.dll.a *.dll.def *.dll

distclean: clean
	rm -f Makefile config.h config.status config.log lc_geterrno.3 lc_process.3 lc_cleanup.3 lc_process_file.3 lc_register_var.3 lc_geterrstr.3 lc_register_callback.3 libconfig.3 libconfig.syms

mrproper: distclean
	rm -f aclocal.m4 config.guess config.sub install-sh configure

.PHONY: all clean distclean install

Modified aclocal/libconfig.m4 from [d46c22e181] to [35c3537925].

46
47
48
49
50
51
52























	if test $SMALL = 0; then
		dnl Use opennet if it's available AND not small
		DC_ASK_OPTLIB(opennet, fopen_net, opennet.h, [      Enable opennet support (auto)], libopennet, HAVE_LIBOPENNET, HAVE_OPENNET_H)
	else
		AC_DEFINE(ENABLE_SMALL, [1], [Define to 1 if you want to produce a minimalistic build.])
	fi
])






























>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
	if test $SMALL = 0; then
		dnl Use opennet if it's available AND not small
		DC_ASK_OPTLIB(opennet, fopen_net, opennet.h, [      Enable opennet support (auto)], libopennet, HAVE_LIBOPENNET, HAVE_OPENNET_H)
	else
		AC_DEFINE(ENABLE_SMALL, [1], [Define to 1 if you want to produce a minimalistic build.])
	fi
])

AC_DEFUN(LC_SET_SONAME, [
	SAVE_LDFLAGS="$LDFLAGS"

	AC_MSG_CHECKING([how to specify soname])

	for try in "-Wl,--soname,$1" '__fail__'; do
		LDFLAGS="$SAVE_LDFLAGS"

		if test "${try}" = '__fail__'; then
			AC_MSG_RESULT([can't])

			break
		fi

		LDFLAGS="${LDFLAGS} ${try}"
		AC_TRY_LINK([void TestTest(void) { return; }], [], [
			AC_MSG_RESULT([$try])

			break
		])
	done
])

Modified build/prep.sh from [be7bb3d1c2] to [317dfaf547].

20
21
22
23
24
25
26



27
28
29
30
31
32

aclocal -I aclocal
autoconf
automake -fca

rm -rf autom4te.cache




# Add Linux/MUSL support if missing
if ! grep '[-]musl' config.sub >/dev/null 2>/dev/null; then
	sed 's@\(-*\)linux-gnu\* @\1linux-musl | &@g' config.sub > config.sub.new
	cat config.sub.new > config.sub
	rm -f config.sub.new
fi







>
>
>






20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35

aclocal -I aclocal
autoconf
automake -fca

rm -rf autom4te.cache

rm -f libconfig.vers
make -f Makefile.in libconfig.vers

# Add Linux/MUSL support if missing
if ! grep '[-]musl' config.sub >/dev/null 2>/dev/null; then
	sed 's@\(-*\)linux-gnu\* @\1linux-musl | &@g' config.sub > config.sub.new
	cat config.sub.new > config.sub
	rm -f config.sub.new
fi

Modified configure.ac from [10d96ac7ab] to [23d52dd695].

35
36
37
38
39
40
41






42
43
44
45
AC_CHECK_HEADERS(ctype.h dirent.h pwd.h stdio.h stdlib.h string.h sys/stat.h sys/time.h sys/types.h time.h unistd.h netdb.h netinet/in.h)

AC_HEADER_TIME

AC_REPLACE_FUNCS(strsep strtoll getuid)
AC_CHECK_FUNCS(getpwuid strtof)







dnl This MUST be last.
DC_SYNC_SHLIBOBJS

AC_OUTPUT(Makefile lc_geterrno.3 lc_process.3 lc_register_var.3 lc_geterrstr.3 lc_seterrstr.3 lc_register_callback.3 lc_cleanup.3 lc_process_file.3 libconfig.3 lc_handle_type.3)







>
>
>
>
>
>



|
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
AC_CHECK_HEADERS(ctype.h dirent.h pwd.h stdio.h stdlib.h string.h sys/stat.h sys/time.h sys/types.h time.h unistd.h netdb.h netinet/in.h)

AC_HEADER_TIME

AC_REPLACE_FUNCS(strsep strtoll getuid)
AC_CHECK_FUNCS(getpwuid strtof)

dnl Setup stable API
DC_SETUP_STABLE_API(libconfig.vers, libconfig.syms)

dnl Set a soname
LC_SET_SONAME([libconfig.so.$PACKAGE_VERSION])

dnl This MUST be last.
DC_SYNC_SHLIBOBJS

AC_OUTPUT(Makefile lc_geterrno.3 lc_process.3 lc_register_var.3 lc_geterrstr.3 lc_seterrstr.3 lc_register_callback.3 lc_cleanup.3 lc_process_file.3 libconfig.3 lc_handle_type.3 libconfig.syms)

Added libconfig.syms.in version [160176fe5f].











































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
@SYMPREFIX@lc_cleanup
@SYMPREFIX@lc_geterrno
@SYMPREFIX@lc_geterrstr
@SYMPREFIX@lc_handle_type
@SYMPREFIX@lc_process
@SYMPREFIX@lc_process_conf_apache
@SYMPREFIX@lc_process_conf_colon
@SYMPREFIX@lc_process_conf_equal
@SYMPREFIX@lc_process_conf_section
@SYMPREFIX@lc_process_conf_space
@SYMPREFIX@lc_process_conf_xml
@SYMPREFIX@lc_process_file
@SYMPREFIX@lc_process_var
@SYMPREFIX@lc_register_callback
@SYMPREFIX@lc_register_var
@SYMPREFIX@lc_seterrstr
@SYMPREFIX@lc_err_usererrmsg
@SYMPREFIX@lc_errfile
@SYMPREFIX@lc_errline
@SYMPREFIX@lc_errno
@SYMPREFIX@lc_optind