components/w3m/patches/01-libgc.patch
author Rich Burridge <rich.burridge@oracle.com>
Fri, 23 Jan 2015 08:59:19 -0800
changeset 3680 4dc408325e7e
child 3995 7d35330d300c
child 7256 c523ba6bf5f1
permissions -rw-r--r--
20146056 Move w3m from the Desktop consolidation to Userland 20148518 Move diffstat from the Desktop consolidation to Userland 20148697 Move lynx from the Desktop consolidation to Userland

#
# Find bgc on Solaris using pkg-config
#
# This patch needs to be evaluated to see if it needs to be passed upstream.

--- w3m-0.5.2.orig/acinclude.m4	Fri Apr  7 08:21:11 2006
+++ w3m-0.5.2/acinclude.m4	Thu Dec  4 09:32:08 2014
@@ -426,6 +426,7 @@
 # ----------------------------------------------------------------
 AC_DEFUN([AC_W3M_GC],
 [AC_MSG_CHECKING(GC library exists)
+AC_SUBST(LIBGC)
 AC_ARG_WITH(gc,
  [  --with-gc[=PREFIX]	  	libgc PREFIX],
  [test x"$with_gc" = xno && AC_MSG_ERROR([You can not build w3m without gc])],
@@ -456,7 +457,7 @@
    fi
  fi
  unset ac_cv_lib_gc_GC_init
- AC_CHECK_LIB(gc, GC_init, [LIBS="$LIBS -lgc"])
+ AC_CHECK_LIB(gc, GC_init, [LIBS="$LIBS `pkg-config --libs bdw-gc`"])
  if test x"$ac_cv_lib_gc_GC_init" = xno; then
     AC_MSG_CHECKING(GC library location)
     AC_MSG_RESULT($with_gc)
@@ -466,7 +467,7 @@
       LDFLAGS="$LDFLAGS -L$dir/lib"
       AC_MSG_CHECKING($dir)
       unset ac_cv_lib_gc_GC_init
-      AC_CHECK_LIB(gc, GC_init, [gclibdir="$dir/lib"; LIBS="$LIBS -L$dir/lib -lgc"; break])
+      AC_CHECK_LIB(bgc, GC_init, [gclibdir="$dir/lib"; LIBS="$LIBS -L$dir/lib `pkg-config --libs bdw-gc`"; break])
       LDFLAGS="$ldflags"
     done
     if test x"$gclibdir" = xno; then