Check-in [688a565bf6]
Overview
Comment:Updated to move setting of soname to common shobj.m4
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 688a565bf65c5407ac90615c15a17b3d571d7c4b
User & Date: rkeene on 2014-11-24 18:59:57
Other Links: manifest | tags
Context
2014-11-24
19:00
Removed spurious directory check-in: b86fdf8dfe user: rkeene tags: trunk
18:59
Updated to move setting of soname to common shobj.m4 check-in: 688a565bf6 user: rkeene tags: trunk
18:56
Added Mac OS X support for soname check-in: e1a8ff771d user: rkeene tags: trunk
Changes

Modified aclocal/libconfig.m4 from [4d7e795efc] to [d46c22e181].

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
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
])

AC_DEFUN(LC_SET_SONAME, [
	SAVE_LDFLAGS="$LDFLAGS"

	AC_MSG_CHECKING([how to specify soname])

	for try in "-Wl,--soname,$1" "Wl,-install_name,$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 aclocal/shobj.m4 from [455eb6a4ce] to [e9646b81f6].

165
166
167
168
169
170
171























165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194







+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
				CFLAGS="$CFLAGS -mms-bitfields"
				CPPFLAGS="$CPPFLAGS -mms-bitfields"
				SHOBJLDFLAGS='-shared -Wl,--enable-auto-image-base -Wl,--output-def,$[@].def,--out-implib,$[@].a'
				;;
		esac
	fi
])

AC_DEFUN(SHOBJ_SET_SONAME, [
	SAVE_LDFLAGS="$LDFLAGS"

	AC_MSG_CHECKING([how to specify soname])

	for try in "-Wl,--soname,$1" "Wl,-install_name,$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 configure.ac from [826e405246] to [82bc168655].

39
40
41
42
43
44
45
46

47
48
49
50
51
39
40
41
42
43
44
45

46
47
48
49
50
51







-
+





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.$SHOBJEXT.$PACKAGE_VERSION])
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)