Disable IM_* environment variables when --disable-deprecated
This commit is contained in:
parent
9e9c8e65aa
commit
230d2acfea
@ -261,7 +261,7 @@ vips_add_init( VipsAdd *add )
|
||||
* range of possible values.
|
||||
*
|
||||
* Operations on integer images are performed using the processor's vector unit,
|
||||
* if possible. Disable this with --vips-novector or IM_NOVECTOR.
|
||||
* if possible. Disable this with --vips-novector or VIPS_NOVECTOR.
|
||||
*
|
||||
* See also: vips_subtract(), vips_linear().
|
||||
*
|
||||
|
@ -801,8 +801,12 @@ static void
|
||||
vips_image_add_progress( VipsImage *image )
|
||||
{
|
||||
if( vips__progress ||
|
||||
#if VIPS_ENABLE_DEPRECATED
|
||||
g_getenv( "VIPS_PROGRESS" ) ||
|
||||
g_getenv( "IM_PROGRESS" ) ) {
|
||||
#else
|
||||
g_getenv( "VIPS_PROGRESS" ) ) {
|
||||
#endif
|
||||
|
||||
/* Keep the %complete we displayed last time here.
|
||||
*/
|
||||
@ -2513,8 +2517,12 @@ vips_get_disc_threshold( void )
|
||||
*/
|
||||
threshold = 100 * 1024 * 1024;
|
||||
|
||||
#if VIPS_ENABLE_DEPRECATED
|
||||
if( (env = g_getenv( "VIPS_DISC_THRESHOLD" )) ||
|
||||
(env = g_getenv( "IM_DISC_THRESHOLD" )) )
|
||||
#else
|
||||
if( (env = g_getenv( "VIPS_DISC_THRESHOLD" )) )
|
||||
#endif
|
||||
threshold = vips__parse_size( env );
|
||||
|
||||
if( vips__disc_threshold )
|
||||
|
@ -434,8 +434,12 @@ vips_init( const char *argv0 )
|
||||
g_free( locale );
|
||||
bind_textdomain_codeset( GETTEXT_PACKAGE, "UTF-8" );
|
||||
|
||||
#if VIPS_ENABLE_DEPRECATED
|
||||
if( g_getenv( "VIPS_INFO" ) ||
|
||||
g_getenv( "IM_INFO" ) )
|
||||
#else
|
||||
if( g_getenv( "VIPS_INFO" ) )
|
||||
#endif
|
||||
vips_info_set( TRUE );
|
||||
if( g_getenv( "VIPS_PROFILE" ) )
|
||||
vips_profile_set( TRUE );
|
||||
@ -544,8 +548,12 @@ vips_init( const char *argv0 )
|
||||
* set up if you are using libvips from something like Ruby. Allow this
|
||||
* env var hack as a workaround.
|
||||
*/
|
||||
#if VIPS_ENABLE_DEPRECATED
|
||||
if( g_getenv( "VIPS_WARNING" ) ||
|
||||
g_getenv( "IM_WARNING" ) )
|
||||
#else
|
||||
if( g_getenv( "VIPS_WARNING" ) )
|
||||
#endif
|
||||
g_log_set_handler( "VIPS", G_LOG_LEVEL_WARNING,
|
||||
empty_log_handler, NULL );
|
||||
|
||||
|
@ -426,8 +426,12 @@ vips_concurrency_get( void )
|
||||
*/
|
||||
if( vips__concurrency > 0 )
|
||||
nthr = vips__concurrency;
|
||||
#if VIPS_ENABLE_DEPRECATED
|
||||
else if( ((str = g_getenv( "VIPS_CONCURRENCY" )) ||
|
||||
(str = g_getenv( "IM_CONCURRENCY" ))) &&
|
||||
#else
|
||||
else if( (str = g_getenv( "VIPS_CONCURRENCY" )) &&
|
||||
#endif
|
||||
(x = atoi( str )) > 0 )
|
||||
nthr = x;
|
||||
else
|
||||
|
@ -64,7 +64,7 @@
|
||||
#include <vips/internal.h>
|
||||
#include <vips/thread.h>
|
||||
|
||||
/* Cleared by the command-line --vips-novector switch and the IM_NOVECTOR env
|
||||
/* Cleared by the command-line --vips-novector switch and the VIPS_NOVECTOR env
|
||||
* var.
|
||||
*/
|
||||
gboolean vips__vector_enabled = TRUE;
|
||||
@ -99,11 +99,15 @@ vips_vector_init( void )
|
||||
orc_debug_set_level( 99 );
|
||||
#endif /*DEBUG_ORC*/
|
||||
|
||||
/* Look for the environment variable IM_NOVECTOR and use that to turn
|
||||
/* Look for the environment variable VIPS_NOVECTOR and use that to turn
|
||||
* off as well.
|
||||
*/
|
||||
#if VIPS_ENABLE_DEPRECATED
|
||||
if( g_getenv( "VIPS_NOVECTOR" ) ||
|
||||
g_getenv( "IM_NOVECTOR" ) )
|
||||
#else
|
||||
if( g_getenv( "VIPS_NOVECTOR" ) )
|
||||
#endif
|
||||
vips__vector_enabled = FALSE;
|
||||
|
||||
#endif /*HAVE_ORC*/
|
||||
|
Loading…
Reference in New Issue
Block a user