Remove `VIPS_EXEEXT` and `VIPS_SONAME` definitions (#2694)

And the corresponding `soname.h` header.
This commit is contained in:
Kleis Auke Wolthuizen 2022-02-27 16:27:37 +01:00 committed by GitHub
parent 0337c09700
commit f11b58ff6c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 5 additions and 46 deletions

View File

@ -66,13 +66,6 @@ EXTRA_DIST = \
CLEANFILES =
install-exec-hook:
echo '/* This file is autogenerated, do not edit. */' > soname.h && \
. ./libvips.la && \
echo "#define VIPS_SONAME \"$$dlname\"" >> soname.h && \
cp soname.h $(DESTDIR)$(pkgincludedir) && \
rm soname.h
# Modules
module_LTLIBRARIES =

View File

@ -39,7 +39,6 @@ pkginclude_HEADERS = \
region.h \
resample.h \
semaphore.h \
soname.h \
threadpool.h \
thread.h \
transform.h \

View File

@ -137,12 +137,6 @@ version_data.set('LIBRARY_CURRENT', library_current)
version_data.set('LIBRARY_REVISION', library_revision)
version_data.set('LIBRARY_AGE', library_age)
version_data.set('VIPS_CONFIG', ', '.join(vips_verbose_config))
#FIXME: Do not require this
if target_machine.system() == 'windows' or target_machine.system() == 'cygwin'
version_data.set('VIPS_EXEEXT', '.exe')
else
version_data.set('VIPS_EXEEXT', '')
endif
version_data.set10('VIPS_ENABLE_DEPRECATED', get_option('deprecated'))
version_header = configure_file(
@ -153,28 +147,9 @@ version_header = configure_file(
install_dir: get_option('prefix') / get_option('includedir') / 'vips'
)
#FIXME: Do not require this
soname_data = configuration_data()
if target_machine.system() == 'windows'
soname_data.set_quoted('VIPS_SONAME', 'vips-@0@.dll'.format(library_current - library_age))
elif target_machine.system() == 'cygwin'
soname_data.set_quoted('VIPS_SONAME', 'cygvips-@0@.dll'.format(library_current - library_age))
elif target_machine.system() == 'darwin'
soname_data.set_quoted('VIPS_SONAME', 'libvips.dylib')
else
soname_data.set_quoted('VIPS_SONAME', 'libvips.so')
endif
soname_header = configure_file(
output: 'soname.h',
configuration: soname_data,
install: true,
install_dir: get_option('prefix') / get_option('includedir') / 'vips'
)
libvips_sources += public_headers
libvips_sources += enumtypes
libvips_sources += version_header
libvips_sources += soname_header
install_headers(
public_other_headers,
@ -188,7 +163,6 @@ libvips_headers_dep = declare_dependency(
public_headers,
enumtypes[1],
version_header,
soname_header
],
include_directories: libvips_includedir
)

View File

@ -18,19 +18,9 @@
#define VIPS_CONFIG "@VIPS_CONFIG@"
/**
* VIPS_SONAME:
*
* The name of the shared object containing the vips library, for example
* "libvips.so.42", or "libvips-42.dll".
*/
#include "soname.h"
/* Not really anything to do with versions, but this is a handy place to put
* it.
*/
#define VIPS_EXEEXT "@VIPS_EXEEXT@"
#define VIPS_ENABLE_DEPRECATED @VIPS_ENABLE_DEPRECATED@
#endif /*VIPS_VERSION_H*/

View File

@ -580,7 +580,11 @@ size_t im_ref_string_get_length( const GValue *value );
#define IM_MINOR_VERSION VIPS_MINOR_VERSION
#define IM_MICRO_VERSION VIPS_MICRO_VERSION
#define IM_EXEEXT VIPS_EXEEXT
#if defined(G_PLATFORM_WIN32) || defined(G_WITH_CYGWIN)
#define IM_EXEEXT ".exe"
#else /* !defined(G_PLATFORM_WIN32) && !defined(G_WITH_CYGWIN) */
#define IM_EXEEXT ""
#endif /* defined(G_PLATFORM_WIN32) || defined(G_WITH_CYGWIN) */
#define IM_SIZEOF_HEADER VIPS_SIZEOF_HEADER

View File

@ -40,7 +40,6 @@ libvips/include/vips/region.h
libvips/include/vips/resample.h
libvips/include/vips/sbuf.h
libvips/include/vips/semaphore.h
libvips/include/vips/soname.h
libvips/include/vips/thread.h
libvips/include/vips/threadpool.h
libvips/include/vips/transform.h