diff --git a/configure.ac b/configure.ac index c2db5f58..2c8064f6 100644 --- a/configure.ac +++ b/configure.ac @@ -497,7 +497,14 @@ if test x"$with_orc" != "xno"; then PKG_CHECK_MODULES(ORC, orc-0.4 >= 0.4.11, [AC_DEFINE(HAVE_ORC,1,[define if you have orc-0.4.11 or later installed.]) with_orc=yes - PACKAGES_USED="$PACKAGES_USED orc-0.4"], + PACKAGES_USED="$PACKAGES_USED orc-0.4" + save_LIBS=$LIBS + LIBS="$LIBS $ORC_LIBS" + AC_CHECK_FUNCS(orc_program_get_error, + AC_DEFINE(HAVE_ORC_PROGRAM_GET_ERROR,1, + [define if your orc has orc_program_get_error.])) + LIBS=$save_LIBS + ], [AC_MSG_WARN([orc-0.4.11 or later not found; disabling orc support]) with_orc=no ]) diff --git a/libvips/iofuncs/vector.c b/libvips/iofuncs/vector.c index 6d4d6477..577a40a6 100644 --- a/libvips/iofuncs/vector.c +++ b/libvips/iofuncs/vector.c @@ -71,9 +71,11 @@ gboolean vips__vector_enabled = TRUE; void vips_vector_error( VipsVector *vector ) { +#ifdef HAVE_ORC_PROGRAM_GET_ERROR if( vector->program ) vips_warn( "VipsVector", "orc error: %s", orc_program_get_error( vector->program ) ); +#endif /*HAVE_ORC_PROGRAM_GET_ERROR*/ } void