diff --git a/acconfig.h b/acconfig.h index 4987eff1..70bd9784 100644 --- a/acconfig.h +++ b/acconfig.h @@ -10,7 +10,8 @@ #undef HAVE_PL_PERL #undef HAVE_STATIC_PERL #undef HAVE_GMODULE -#undef HAVE_GC +#undef HAVE_GC_H +#undef HAVE_GC_GC_H #undef WANT_BIG5 /* macros/curses checks */ diff --git a/configure.in b/configure.in index 4faacfd3..b148d751 100644 --- a/configure.in +++ b/configure.in @@ -493,10 +493,15 @@ if test "x$want_gc" = xyes; then if test "$glib_config_major_version" = "2"; then AC_CHECK_LIB(gc, GC_malloc, [ AC_CHECK_HEADER(gc/gc.h, [ - AC_DEFINE(HAVE_GC) + AC_DEFINE(HAVE_GC_GC_H) LIBS="$LIBS -lgc" ], [ - want_gc=no + AC_CHECK_HEADER(gc.h, [ + AC_DEFINE(HAVE_GC_H) + LIBS="$LIBS -lgc" + ], [ + want_gc=no + ]) ]) ], [ want_gc=no diff --git a/src/fe-text/irssi.c b/src/fe-text/irssi.c index d0bbbc99..b2a5e955 100644 --- a/src/fe-text/irssi.c +++ b/src/fe-text/irssi.c @@ -309,8 +309,12 @@ static void winsock_init(void) } #endif -#ifdef HAVE_GC -#include +#if defined (HAVE_GC_H) || defined (HAVE_GC_GC_H) +#ifdef HAVE_GC_H +# include +#else +# include +#endif GMemVTable gc_mem_table = { GC_malloc, GC_realloc, diff --git a/src/perl/perl-common.c b/src/perl/perl-common.c index adb27cea..924a7f7c 100644 --- a/src/perl/perl-common.c +++ b/src/perl/perl-common.c @@ -43,7 +43,9 @@ #include "perl-core.h" #include "perl-common.h" -#ifdef HAVE_GC +#ifdef HAVE_GC_H +# include +#elif defined (HAVE_GC_GC_H) # include #endif