Merge branch '8.11'

This commit is contained in:
John Cupitt 2021-07-02 12:35:24 +01:00
commit ec1d1abf50
2 changed files with 14 additions and 4 deletions

View File

@ -1,6 +1,11 @@
<<<<<<< HEAD
14/6/21 started 8.12
- all tools support `--version`
- add vips_svgload_string() convenience function
=======
14/8/20 started 8.11.2
- better libdir guessing [remi]
>>>>>>> 8.11
14/8/20 started 8.11.1
- add more example code to C docs

View File

@ -1205,18 +1205,23 @@ const char *
vips_guess_libdir( const char *argv0, const char *env_name )
{
const char *prefix = vips_guess_prefix( argv0, env_name );
static char *libdir = NULL;
static char *libdir = NULL;
char *suffix;
if( libdir )
return( libdir );
/* Have we been moved since configure? If not, use the configure-time
* libdir.
* libdir.
*
* The lib directory name can be eg. "lib", "lib64" etc. depending on
* the platform, so copy that from the configure-time libdir if we can.
*/
if( strcmp( prefix, VIPS_PREFIX ) == 0 )
libdir = VIPS_LIBDIR;
else if ( strstr(VIPS_LIBDIR, "/lib64") )
libdir = g_strdup_printf( "%s/lib64", prefix );
else if( (suffix = strrchr( VIPS_LIBDIR, G_DIR_SEPARATOR )) )
libdir = g_strdup_printf( "%s%s", prefix, suffix );
else
libdir = g_strdup_printf( "%s/lib", prefix );