Index: aclocal/libconfig.m4 ================================================================== --- aclocal/libconfig.m4 +++ aclocal/libconfig.m4 @@ -48,28 +48,5 @@ 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 -]) Index: aclocal/shobj.m4 ================================================================== --- aclocal/shobj.m4 +++ aclocal/shobj.m4 @@ -167,5 +167,28 @@ 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 +]) Index: configure.ac ================================================================== --- configure.ac +++ configure.ac @@ -41,11 +41,11 @@ 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)