From ae171a9c1bec28e6ac4daf30d11c67230d108cae Mon Sep 17 00:00:00 2001 From: Hans Ulrich Niedermann Date: Sun, 7 Nov 2021 18:04:18 +0100 Subject: Consistent checks for asm .symver and version-script Use the same checks for asm .symver and -Wl,--version-script support for both libgphoto2.la and libgphoto2_port.la. This also reorganizes the Makefile.am files for libgphoto2.la and libgphoto2_port.la so that things belonging together are actually grouped together, so that inconsistencies can become more visible. This does not change what actually happens with when linking the libraries: * libgphoto2.la is still linked with just a --export-symbols libgphoto2.sym list of exported symbols. * libgphoto2_port.la is still linked with a -Wl,--version-script=libgphoto2_port.ver version script. However, the two library Makefile.am are now organized in such a way that you can actually see that. We should examine what those two symbol export methods actually do on Linux/ELF (complete support for version script semantics), and on non-ELF systems such as MacOSX dylib or Windows DLL. --- configure.ac | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index c49a14c68..352229a74 100644 --- a/configure.ac +++ b/configure.ac @@ -289,26 +289,7 @@ AM_CPPFLAGS="$AM_CPPFLAGS -DLOCALEDIR=\\\"${localedir}\\\"" AC_SYS_LARGEFILE -AC_MSG_CHECKING([for asm .symver support]) -AC_COMPILE_IFELSE([dnl - AC_LANG_PROGRAM([[ - void f1(void); - void f1() {} - void f2(void); - void f2() {} - asm(".symver f1, f@VER1"); - asm(".symver f2, f@@VER2"); - ]],[])dnl -],[ - AC_DEFINE([HAVE_ASM_SYMVERS], [1], - [Define if there is asm .symver support.]) - VERSIONMAPLDFLAGS="-Wl,--version-script=\$(srcdir)/libgphoto2.ver" - AC_MSG_RESULT([yes]) -],[ - VERSIONMAPLDFLAGS="" - AC_MSG_RESULT([no]) -]) -AC_SUBST([VERSIONMAPLDFLAGS]) +GP_ASM_SYMVER_SUPPORT dnl --------------------------------------------------------------------------- dnl FIXME: What is this good for? -- cgit v1.2.1