don't call g_type_init() on newer glibs

stops a warning message
This commit is contained in:
John Cupitt 2013-06-11 15:22:02 +01:00
parent 87bdfd1cf5
commit 4c0c3f7063
2 changed files with 10 additions and 1 deletions

View File

@ -331,6 +331,13 @@ PKG_CHECK_MODULES(THREADS, glib-2.0 >= 2.32,[
] ]
) )
# after 2.36 the type system inits itself
PKG_CHECK_MODULES(TYPE_INIT, glib-2.0 < 2.36,[
AC_DEFINE(NEED_TYPE_INIT,1,[define if your glib needs g_type_init().])
],[
]
)
# check for gtk-doc # check for gtk-doc
GTK_DOC_CHECK(1.9) GTK_DOC_CHECK(1.9)

View File

@ -192,9 +192,11 @@ vips_init( const char *argv0 )
return( 0 ); return( 0 );
started = TRUE; started = TRUE;
/* Need gobject etc. #ifdef NEED_TYPE_INIT
/* Before glib 2.36 you have to call this on startup.
*/ */
g_type_init(); g_type_init();
#endif /*NEED_TYPE_INIT*/
/* Older glibs need this. /* Older glibs need this.
*/ */