Check-in [d26243325f]
Overview
Comment:Updated to use ABI version for soname
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:d26243325f3f469508c7c71502a57bf271d31275
User & Date: rkeene on 2014-11-24 22:35:44
Other Links: manifest | tags
Context
2014-11-25
18:03
Updated to deal with erroptname more completely check-in: ba3430c2d6 user: rkeene tags: trunk
2014-11-24
22:35
Updated to use ABI version for soname check-in: d26243325f user: rkeene tags: trunk
22:35
Work on improving error handling check-in: 63a4e29f38 user: rkeene tags: trunk
Changes

Modified Makefile.in from [eb94a13f4a] to [d57cc8913f].

12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
..
61
62
63
64
65
66
67


68
69
70
71
72
73
74
75
..
83
84
85
86
87
88
89
90
91
92
93
94

95
96
97
98
99
100
101
102
PATH_SEPARATOR = @PATH_SEPARATOR@
SHOBJFLAGS = @SHOBJFLAGS@
SHOBJLDFLAGS = @SHOBJLDFLAGS@
SHOBJEXT = @SHOBJEXT@
ARFLAGS = # @ARFLAGS@
AREXT = @AREXT@
PKGVERS = @PACKAGE_VERSION@
PKGVERSMAJOR = `echo $(PKGVERS) | cut -f 1 -d .`
EXEEXT = @EXEEXT@
LIBS = @LIBS@

prefix = @prefix@
mandir = @mandir@
sysconfdir = @sysconfdir@
datadir = @datadir@
................................................................................
	echo '	global:' >> '$@'
	cat '$(srcdir)/libconfig.syms.in' | sed 's/^@''SYMPREFIX@//;s/^/		/;s/$$/;/' >> '$@'
	echo '	local:' >> '$@'
	echo '		*;' >> '$@'
	echo '};' >> '$@'

test-lc$(EXEEXT): $(BINS) $(srcdir)/test-lc.c


	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $(filter %.c, $^) $(LDFLAGS) -Wl,-R -Wl,$(srcdir) -L$(srcdir) -lconfig

install: all $(srcdir)/libconfig.h
	-$(INSTALL) -d "$(DESTDIR)$(mandir)"
	-$(INSTALL) -d "$(DESTDIR)$(mandir)/man3"
	-$(INSTALL) -d "$(DESTDIR)$(libdir)"
	-$(INSTALL) -d "$(DESTDIR)$(includedir)"
	-$(INSTALL) -m 644 libconfig.$(SHOBJEXT).def "$(DESTDIR)$(libdir)/libconfig.def"
................................................................................
	$(INSTALL) -m 644 lc_geterrstr.3 "$(DESTDIR)$(mandir)/man3/lc_geterrstr.3"
	$(INSTALL) -m 644 lc_seterrstr.3 "$(DESTDIR)$(mandir)/man3/lc_seterrstr.3"
	$(INSTALL) -m 644 lc_geterrno.3 "$(DESTDIR)$(mandir)/man3/lc_geterrno.3"
	$(INSTALL) -m 644 lc_process.3 "$(DESTDIR)$(mandir)/man3/lc_process.3"
	$(INSTALL) -m 644 lc_cleanup.3 "$(DESTDIR)$(mandir)/man3/lc_cleanup.3"
	$(INSTALL) -m 644 libconfig.3 "$(DESTDIR)$(mandir)/man3/libconfig.3"
	$(INSTALL) -m 644 $(srcdir)/libconfig.h "$(DESTDIR)$(includedir)/libconfig.h"
	-( cd "$(DESTDIR)$(libdir)" && rm -f libconfig.$(SHOBJEXT).$(PKGVERSMAJOR) && $(LN_S) libconfig.$(SHOBJEXT).$(PKGVERS) libconfig.$(SHOBJEXT).$(PKGVERSMAJOR) )
	-( cd "$(DESTDIR)$(libdir)" && rm -f libconfig.$(SHOBJEXT) && $(LN_S) libconfig.$(SHOBJEXT).$(PKGVERS) libconfig.$(SHOBJEXT) )

clean:
	rm -f *.o $(BINS) *~ 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







|







 







>
>
|







 







|




>








12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
..
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
..
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
PATH_SEPARATOR = @PATH_SEPARATOR@
SHOBJFLAGS = @SHOBJFLAGS@
SHOBJLDFLAGS = @SHOBJLDFLAGS@
SHOBJEXT = @SHOBJEXT@
ARFLAGS = # @ARFLAGS@
AREXT = @AREXT@
PKGVERS = @PACKAGE_VERSION@
ABI_VERSION = @ABI_VERSION@
EXEEXT = @EXEEXT@
LIBS = @LIBS@

prefix = @prefix@
mandir = @mandir@
sysconfdir = @sysconfdir@
datadir = @datadir@
................................................................................
	echo '	global:' >> '$@'
	cat '$(srcdir)/libconfig.syms.in' | sed 's/^@''SYMPREFIX@//;s/^/		/;s/$$/;/' >> '$@'
	echo '	local:' >> '$@'
	echo '		*;' >> '$@'
	echo '};' >> '$@'

test-lc$(EXEEXT): $(BINS) $(srcdir)/test-lc.c
	rm -f libconfig.$(SHOBJEXT).$(ABI_VERSION)
	$(LN_S) libconfig.$(SHOBJEXT) libconfig.$(SHOBJEXT).$(ABI_VERSION)
	$(CC) $(CPPFLAGS) $(CFLAGS) -I$(srcdir) -o $@ $(filter %.c, $^) $(LDFLAGS) -Wl,-R,$(shell pwd) -L$(shell pwd) -lconfig

install: all $(srcdir)/libconfig.h
	-$(INSTALL) -d "$(DESTDIR)$(mandir)"
	-$(INSTALL) -d "$(DESTDIR)$(mandir)/man3"
	-$(INSTALL) -d "$(DESTDIR)$(libdir)"
	-$(INSTALL) -d "$(DESTDIR)$(includedir)"
	-$(INSTALL) -m 644 libconfig.$(SHOBJEXT).def "$(DESTDIR)$(libdir)/libconfig.def"
................................................................................
	$(INSTALL) -m 644 lc_geterrstr.3 "$(DESTDIR)$(mandir)/man3/lc_geterrstr.3"
	$(INSTALL) -m 644 lc_seterrstr.3 "$(DESTDIR)$(mandir)/man3/lc_seterrstr.3"
	$(INSTALL) -m 644 lc_geterrno.3 "$(DESTDIR)$(mandir)/man3/lc_geterrno.3"
	$(INSTALL) -m 644 lc_process.3 "$(DESTDIR)$(mandir)/man3/lc_process.3"
	$(INSTALL) -m 644 lc_cleanup.3 "$(DESTDIR)$(mandir)/man3/lc_cleanup.3"
	$(INSTALL) -m 644 libconfig.3 "$(DESTDIR)$(mandir)/man3/libconfig.3"
	$(INSTALL) -m 644 $(srcdir)/libconfig.h "$(DESTDIR)$(includedir)/libconfig.h"
	-( cd "$(DESTDIR)$(libdir)" && rm -f libconfig.$(SHOBJEXT).$(ABI_VERSION) && $(LN_S) libconfig.$(SHOBJEXT).$(PKGVERS) libconfig.$(SHOBJEXT).$(ABI_VERSION) )
	-( cd "$(DESTDIR)$(libdir)" && rm -f libconfig.$(SHOBJEXT) && $(LN_S) libconfig.$(SHOBJEXT).$(PKGVERS) libconfig.$(SHOBJEXT) )

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

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/shobj.m4 from [e9646b81f6] to [9a0374cc5c].

182
183
184
185
186
187
188



189
190
191
192
193


194
			AC_MSG_RESULT([can't])

			break
		fi

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



			AC_MSG_RESULT([$try])

			break
		])
	done


])







>
>
>





>
>

182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
			AC_MSG_RESULT([can't])

			break
		fi

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

			AC_MSG_RESULT([$try])

			break
		])
	done

	AC_SUBST(SHOBJLDFLAGS)
])

Modified aclocal/versionscript.m4 from [68146d5f5a] to [b9d44e1a68].

31
32
33
34
35
36
37
38


39
40

41
42
43
44
45


46
47
48
49
50
51
52

			break
		])
	done

	rm -f "${TMPSYMFILE}"
	rm -f "${TMPVERSIONSCRIPT}"



	if test -n "${addldflags}"; then
		LDFLAGS="${SAVE_LDFLAGS} ${addldflags}"

		AC_MSG_RESULT($addldflags)
	else
		LDFLAGS="${SAVE_LDFLAGS}"
		AC_MSG_RESULT([don't know])
	fi


])

AC_DEFUN([DC_FIND_STRIP_AND_REMOVESYMS], [
	SYMFILE="$1"

	dnl Determine how to strip executables
	AC_CHECK_TOOLS(OBJCOPY, objcopy gobjcopy, [false])








>
>

|
>


<


>
>







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

			break
		])
	done

	rm -f "${TMPSYMFILE}"
	rm -f "${TMPVERSIONSCRIPT}"

	LDFLAGS="${SAVE_LDFLAGS}"

	if test -n "${addldflags}"; then
		SHOBJLDFLAGS="${SHOBJLDFLAGS} ${addldflags}"

		AC_MSG_RESULT($addldflags)
	else

		AC_MSG_RESULT([don't know])
	fi

	AC_SUBST(SHOBJLDFLAGS)
])

AC_DEFUN([DC_FIND_STRIP_AND_REMOVESYMS], [
	SYMFILE="$1"

	dnl Determine how to strip executables
	AC_CHECK_TOOLS(OBJCOPY, objcopy gobjcopy, [false])

Modified configure.ac from [8e05c222f7] to [3feb25323b].

42
43
44
45
46
47
48

49

50
51
52
53
54
AC_REPLACE_FUNCS(strsep strtoll getuid)
AC_CHECK_FUNCS(getpwuid strtof)

dnl Setup stable API
DC_SETUP_STABLE_API([${srcdir}/libconfig.vers], libconfig.syms)

dnl Set a soname

SHOBJ_SET_SONAME([libconfig.$SHOBJEXT.$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)







>
|
>





42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
AC_REPLACE_FUNCS(strsep strtoll getuid)
AC_CHECK_FUNCS(getpwuid strtof)

dnl Setup stable API
DC_SETUP_STABLE_API([${srcdir}/libconfig.vers], libconfig.syms)

dnl Set a soname
ABI_VERSION='0'
SHOBJ_SET_SONAME([libconfig.$SHOBJEXT.$ABI_VERSION])
AC_SUBST(ABI_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)

Modified test-lc.c from [ae325a3444] to [039acf4416].

44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
	lc_register_var("bob", LC_VAR_SIZE_SIZE_T, &xval, 's');
	lc_register_var("Somesection.Free", LC_VAR_BOOL, &onoff, 0);
	lc_register_var("long", LC_VAR_BOOL_BY_EXISTANCE, &onoff2, 'l');
	lc_register_var("ipaddr", LC_VAR_IP, &ipaddr, 'i');
	lc_register_callback("sally", 0, LC_VAR_STRING, sally_cmd, NULL);
	lc_register_callback("HELP", 'h', LC_VAR_NONE, help_cmd, NULL);
	lc_register_callback("*.ifmodule", 0, LC_VAR_NONE, cmd_ifmodule, NULL);
	lcpret = lc_process_file("testapp", "build/test.conf", LC_CONF_APACHE);
	if (lcpret < 0) {
		fprintf(stderr, "Error processing config file: %s\n", lc_geterrstr());
		return(EXIT_FAILURE);
	}

	lcpret = lc_process(argc, argv, "testapp", LC_CONF_APACHE, "test.cfg");
	if (lcpret < 0) {







|







44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
	lc_register_var("bob", LC_VAR_SIZE_SIZE_T, &xval, 's');
	lc_register_var("Somesection.Free", LC_VAR_BOOL, &onoff, 0);
	lc_register_var("long", LC_VAR_BOOL_BY_EXISTANCE, &onoff2, 'l');
	lc_register_var("ipaddr", LC_VAR_IP, &ipaddr, 'i');
	lc_register_callback("sally", 0, LC_VAR_STRING, sally_cmd, NULL);
	lc_register_callback("HELP", 'h', LC_VAR_NONE, help_cmd, NULL);
	lc_register_callback("*.ifmodule", 0, LC_VAR_NONE, cmd_ifmodule, NULL);
	lcpret = lc_process_file("testapp", "test.conf", LC_CONF_APACHE);
	if (lcpret < 0) {
		fprintf(stderr, "Error processing config file: %s\n", lc_geterrstr());
		return(EXIT_FAILURE);
	}

	lcpret = lc_process(argc, argv, "testapp", LC_CONF_APACHE, "test.cfg");
	if (lcpret < 0) {