fix up introspect program
and test with --disable-introspection
This commit is contained in:
parent
e5b55a9398
commit
da007b22e6
@ -81,14 +81,14 @@ INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir)
|
|||||||
if HAVE_INTROSPECTION
|
if HAVE_INTROSPECTION
|
||||||
|
|
||||||
AM_CPPFLAGS = \
|
AM_CPPFLAGS = \
|
||||||
`pkg-config gobject-introspection-1.0 --cflags` \
|
|
||||||
-I${top_srcdir}/libvips/include \
|
-I${top_srcdir}/libvips/include \
|
||||||
@VIPS_CFLAGS@ \
|
@VIPS_CFLAGS@ \
|
||||||
@VIPS_INCLUDES@
|
@VIPS_INCLUDES@ \
|
||||||
|
@INTROSPECTION_CFLAGS@
|
||||||
AM_LDFLAGS = \
|
AM_LDFLAGS = \
|
||||||
`pkg-config gobject-introspection-1.0 --libs` \
|
@INTROSPECTION_LIBS@ \
|
||||||
@LDFLAGS@
|
@LDFLAGS@
|
||||||
LDADD = @VIPS_CFLAGS@ libvips.la @VIPS_LIBS@
|
LDADD = @INTROSPECTION_LIBS@ @VIPS_CFLAGS@ libvips.la @VIPS_LIBS@
|
||||||
if ENABLE_CXX
|
if ENABLE_CXX
|
||||||
LDADD += @VIPS_CXX_LIBS@
|
LDADD += @VIPS_CXX_LIBS@
|
||||||
endif
|
endif
|
||||||
|
@ -32,6 +32,10 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
#define DEBUG
|
||||||
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
#endif /*HAVE_CONFIG_H*/
|
#endif /*HAVE_CONFIG_H*/
|
||||||
@ -46,7 +50,7 @@ static char *main_option_introspect_dump = NULL;
|
|||||||
|
|
||||||
static GOptionEntry main_option[] = {
|
static GOptionEntry main_option[] = {
|
||||||
{ "introspect-dump", 'i', 0,
|
{ "introspect-dump", 'i', 0,
|
||||||
G_OPTION_ARG_NONE, &main_option_introspect_dump,
|
G_OPTION_ARG_STRING, &main_option_introspect_dump,
|
||||||
N_( "dump introspection data" ), NULL },
|
N_( "dump introspection data" ), NULL },
|
||||||
{ NULL }
|
{ NULL }
|
||||||
};
|
};
|
||||||
@ -60,6 +64,7 @@ main( int argc, char *argv[] )
|
|||||||
|
|
||||||
if( VIPS_INIT( argv[0] ) )
|
if( VIPS_INIT( argv[0] ) )
|
||||||
vips_error_exit( "unable to start VIPS" );
|
vips_error_exit( "unable to start VIPS" );
|
||||||
|
|
||||||
textdomain( GETTEXT_PACKAGE );
|
textdomain( GETTEXT_PACKAGE );
|
||||||
setlocale( LC_ALL, "" );
|
setlocale( LC_ALL, "" );
|
||||||
|
|
||||||
@ -81,6 +86,21 @@ main( int argc, char *argv[] )
|
|||||||
|
|
||||||
g_option_context_free( context );
|
g_option_context_free( context );
|
||||||
|
|
||||||
|
#ifdef DEBUG
|
||||||
|
/* For debugging it's handy to have a copy of the input file.
|
||||||
|
*/
|
||||||
|
if( main_option_introspect_dump ) {
|
||||||
|
char **args;
|
||||||
|
char *cmd;
|
||||||
|
|
||||||
|
args = g_strsplit( main_option_introspect_dump, ",", 2 );
|
||||||
|
cmd = g_strdup_printf( "cp %s ~/functions.txt", args[0]);
|
||||||
|
printf( "introspect: running '%s'\n", cmd );
|
||||||
|
system( cmd );
|
||||||
|
g_free( cmd );
|
||||||
|
}
|
||||||
|
#endif /*DEBUG*/
|
||||||
|
|
||||||
if( main_option_introspect_dump &&
|
if( main_option_introspect_dump &&
|
||||||
!g_irepository_dump( main_option_introspect_dump, &error ) ) {
|
!g_irepository_dump( main_option_introspect_dump, &error ) ) {
|
||||||
if( error ) {
|
if( error ) {
|
||||||
|
Loading…
Reference in New Issue
Block a user