Initialize threading support if necessary

This commit is contained in:
Pierre Pronchery 2013-12-31 21:24:51 +01:00
parent 38c0c758c0
commit 7e58b3869d
3 changed files with 9 additions and 1 deletions

View File

@ -25,7 +25,7 @@ helper: $(helper_OBJS) ../src/ghtml.o
$(CC) -o helper $(helper_OBJS) $(helper_LDFLAGS)
helper.o: helper.c ../src/common/find.c ../src/ghtml.c ../src/surfer.h ../config.h
$(CC) $(helper_CFLAGS) -c helper.c
$(CC) -D WITH_WEBKIT $(helper_CFLAGS) -c helper.c
clean:
$(RM) -- $(helper_OBJS)

View File

@ -1276,6 +1276,10 @@ int main(int argc, char * argv[])
_error("setlocale", 1);
bindtextdomain(PACKAGE, LOCALEDIR);
textdomain(PACKAGE);
#if defined(WITH_GTKHTML) || defined(WITH_GTKTEXTVIEW) || defined(WITH_WEBKIT)
if(g_thread_supported() == FALSE)
g_thread_init(NULL);
#endif
gtk_init(&argc, &argv);
while((o = getopt(argc, argv, "cdp:s:")) != -1)
switch(o)

View File

@ -18,4 +18,8 @@ depends=../src/ghtml.o
install=$(BINDIR)
[helper.c]
#cppflags=-D WITH_GTKMOZEMBED
#cppflags=-D WITH_GTKHTML
#cppflags=-D WITH_GTKTEXTVIEW
cppflags=-D WITH_WEBKIT
depends=../src/common/find.c,../src/ghtml.c,../src/surfer.h,../config.h