--- configure.ac +++ configure.ac @@ -91,6 +91,13 @@ ]) ]) +AC_ARG_WITH(gc, "where is gc install located", [test x"$with_gc" = xno && AC_MSG_ERROR([You can not build inkscape without gc])], + [with_gc="yes"]) +test x"$with_gc" = xyes && with_gc="/usr" +SAVE_CPPFLAGS="$CPPFLAGS" +CPPFLAGS="$CPPFLAGS -I$with_gc/include" +SAVE_LDFLAGS="$LDFLAGS" +LDFLAGS="$LDFLAGS -L$with_gc/lib" AC_CHECK_HEADERS([gc.h gc/gc.h], [ # To test for the different required libs, I have to @@ -98,12 +105,12 @@ # desired function name. They're all in libgc. # The "break" will exit from the top level # AC_CHECK_HEADERS. - gc_libs="" + gc_libs="-ldl" AC_CHECK_LIB(gc, GC_init, [gc_ok=yes; - LIBS="-lgc $gc_libs $LIBS"; + LIBS="-lgc $gc_libs $LIBS -L$with_gc/lib"; break], [gc_ok=no], [$gc_libs]) - gc_libs="-lpthread" + gc_libs="-lpthread -ldl" AC_CHECK_LIB(gc, GC_malloc, [gc_ok=yes; LIBS="-lgc $gc_libs $LIBS"; @@ -120,31 +127,31 @@ break], [gc_ok=no], [$gc_libs]) break], [gc_ok=no]) -if test "x$gc_ok" = "xyes"; then - AC_MSG_CHECKING([libgc version 6.4+]) - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ - #ifdef HAVE_GC_GC_H - # include - #else - # include - #endif - #include - extern unsigned GC_version; - int main(void){ - unsigned min = ((6 << 16) | (4 << 8) | 0); - printf("%d.%d.%d ",GC_version >> 16, (GC_version >> 8) & 0xFF, GC_version & 0xFF); - if (GC_version>=min) return 0; - return 1; - }]])], - [gc_ok=yes], - [gc_ok=no] - ) - AC_MSG_RESULT([$gc_ok]) -fi -if test "x$gc_ok" != "xyes"; then - AC_MSG_ERROR([libgc (the Boehm Conservative Collector) 6.4+, is needed to compile inkscape -- http://www.hpl.hp.com/personal/Hans_Boehm/gc]) -fi +dnl if test "x$gc_ok" = "xyes"; then +dnl AC_MSG_CHECKING([libgc version 6.4+]) +dnl AC_RUN_IFELSE( +dnl [AC_LANG_SOURCE([[ +dnl #ifdef HAVE_GC_GC_H +dnl # include +dnl #else +dnl # include +dnl #endif +dnl #include +dnl extern unsigned GC_version; +dnl int main(void){ +dnl unsigned min = ((6 << 16) | (4 << 8) | 0); +dnl printf("%d.%d.%d ",GC_version >> 16, (GC_version >> 8) & 0xFF, GC_version & 0xFF); +dnl if (GC_version>=min) return 0; +dnl return 1; +dnl }]])], +dnl [gc_ok=yes], +dnl [gc_ok=no] +dnl ) +dnl AC_MSG_RESULT([$gc_ok]) +dnl fi +dnl if test "x$gc_ok" != "xyes"; then +dnl AC_MSG_ERROR([libgc (the Boehm Conservative Collector) 6.4+, is needed to compile inkscape -- http://www.hpl.hp.com/personal/Hans_Boehm/gc]) +dnl fi AC_CHECK_HEADERS([malloc.h]) AC_CHECK_FUNCS([mallinfo], [