[Date Prev][Date Next][Thread Prev][][Date Index][Thread Index]

Re: w3m-filter and w3mmee/w3m-m17n



Citation (with leading "> " of each line) from article:
  <b9yhe66fz7g.fsf@jpl.org>
    by Katsumi Yamaoka <yamaoka@jpl.org> :
> ;; RHL 9 で w3mmee を作るのは、今日のところは断念しました。
> ;; prefix=/usr/local で Boehm GC 6.2 を入れてあるんですが、
> ;; configure の $gcversion の取得は乗り切ったものの、gc_priv.h
> ;; 周りのエラー続出でお手上げ状態。^^;;

gc6.2(ひょっとするともっと前?)からlinuxでもprivate/gc_priv.hは不要に
なったようですね。

↓のパッチ(configureのほうは手パッチが必要になるかも)でmakeできるよう
になると思います。

# AIXも大丈夫かどうかは不明。

-- 
須藤 清一 <suto@ks-and-ks.ne.jp>
http://pub.ks-and-ks.ne.jp/pgp-public-key.html
Index: configure
===================================================================
RCS file: /usr/site/cvsroot/w3m/configure,v
retrieving revision 1.1.1.1.6.24.4.50
diff -u -r1.1.1.1.6.24.4.50 configure
--- configure	2003/06/26 10:12:59	1.1.1.1.6.24.4.50
+++ configure	2003/07/01 10:03:35
@@ -34,6 +34,7 @@
 ssl_libdir=
 gc_includedir=
 gc_libdir=
+gc_cflags=
 mimetypes=
 
 all_yes=0
@@ -165,6 +166,10 @@
    gc_libdir=`expr "$1" : "--gc-libdir=\(.*\)"`
    ;;
 
+   --gc-cflags=*)
+   gc_cflags=`expr "$1" : "--gc-cflags=\(.*\)"`
+   ;;
+
    --mimetypes=*)
    mimetypes=`expr "$1" : "--mimetypes=\(.*\)"`
    ;;
@@ -206,6 +211,7 @@
    echo "--ssl-libdir=DIR	specify OpenSSL lib dir"
    echo "--gc-includedir=DIR	specify Boehm-GC include dir"
    echo "--gc-libdir=DIR	specify Boehm-GC lib dir"
+   echo "--gc-cflags=FLAGS	specify Boehm-GC lib specific CC flags"
    echo "--mimetypes=PATH	specify mime.types path"
    echo "-help           Display help"
    exit 0
@@ -1492,28 +1498,6 @@
  fi
 done
 
-case $sysname in #(
- linux|Linux|LINUX|aix|Aix|AIX) #(
-
- if [ \! -f "$gcinclude/private/gc_priv.h" ]; then
-  case $cflags in #(
-   *DEBIAN*) #(
-   # on Debian, we can use libgc*.deb
-   :;;
-
-   *)
-   # these OS requires gcmain.c, which include gc/gc_priv.h
-   # therefore we use gc library comes with w3m
-   echo "Your OS is $sysname; using gc library comes with w3m."
-   gclib=""
-   ;;
-
-  esac
- fi
- ;;
-
-esac
-
 if [ -n "$gclib" -a -n "$gcinclude" ]; then
  cat > _zmachdep.c << EOF
 #include <gc.h>
@@ -1531,56 +1515,49 @@
 fi
 
 if [ -z "$gcversion" ]; then
- if [ "X$gcinclude" = X./gc/include ]; then
-  gclib="gc/gc.a"
-  gctarget="$gclib"
- else
-  echo "You first need to install Boehm-GC library,"
-  echo "(see http://www.hpl.hp.com/personal/Hans_Boehm/gc/)"
+ echo "You first need to install Boehm-GC library,"
+ echo "(see http://www.hpl.hp.com/personal/Hans_Boehm/gc/)"
 
-  if [ -n "$gcinclude" -a \! -f $gcinclude/private/gc_priv.h ]; then
-   echo "Warning: You probably need to issue"
+ if [ -n "$gcinclude" -a \! -f $gcinclude/private/gc_priv.h ]; then
+  echo "Warning: You probably need to issue"
 
-   if [ \! -d $gcinclude/private/. ]; then
-    echo " mkdir $gcinclude/private"
-    echo and
-   fi
-
-   echo " cp include/gc/private/gc_priv.h to $gcinclude/private"
+  if [ \! -d $gcinclude/private/. ]; then
+   echo " mkdir $gcinclude/private"
+   echo and
   fi
 
-  rm -f XXMakefile config.h
-  exit 1
+  echo " cp include/gc/private/gc_priv.h to $gcinclude/private"
  fi
-fi
 
-# arch specific flags for libgc
-gc_cflags=''
+ rm -f XXMakefile config.h
+ exit 1
+fi
 
-if [ "$gclib" = "gc/gc.a" ]; then
- patchfile=""
+case $sysname in #(
+ linux|Linux|LINUX|aix|Aix|AIX) #(
 
- case "$platform:$sysname" in #(
-  ia64:Linux|alpha:Linux|s390*:Linux) #(
-  gc_cflags="-DGC_LINUX_THREADS -D_REENTRANT"
-  ;;
+ if [ \! -f "$gcinclude/private/gc_priv.h" -a "$gcversion" -lt 602000 ]; then
+  case $cflags in #(
+   *DEBIAN*) #(
+   # on Debian, we can use libgc*.deb
+   :;;
 
-  R3000:*System_V*|R4000:UNIX_SYSV|R*000:UNIX_SV)
-  # EWS-4800
-  gc_cflags=-Dmips
-  ;;
- esac
+   *)
+   # these OS requires gcmain.c, which include gc/gc_priv.h
+   # therefore we use gc library comes with w3m
+   echo "Your OS is $sysname; you need $gcinclude/private/gc_priv.h"
+   rm -f XXMakefile config.h
+   exit 1
+   ;;
 
- # Apply patch.
- if [  ! -f patch_done -a -n "$patchfile" -a -f "$patchfile" ]; then
-  patch -lp0 < $patchfile
-  echo "dpatch='$patch'" >> config.param
-  touch patch_done
+  esac
  fi
-fi
+ ;;
+
+esac
 
 echo "GC_version is $gcversion."
-cflags="$cflags -I$gcinclude"
+cflags="$cflags -I$gcinclude -DGC_VERSION=$gcversion"
 
 echo "Input additional LD flags other than listed above, if any:"
 
Index: gcmain.c
===================================================================
RCS file: /usr/site/cvsroot/w3m/gcmain.c,v
retrieving revision 1.1.1.1.6.5
diff -u -r1.1.1.1.6.5 gcmain.c
--- gcmain.c	2000/12/02 18:14:14	1.1.1.1.6.5
+++ gcmain.c	2003/07/01 10:18:50
@@ -1,15 +1,15 @@
 #ifndef GC_MAIN
 #define GC_MAIN
 
-#if defined(AIX) || defined(linux)
+#if (defined(AIX) || defined(linux)) && GC_VERSION < 602000
 /* to cope with Boehm GC... */
 
 #define MAIN real_main
 
 #if defined(DEBIAN)
-#include "gc/private/gc_priv.h"
+#include <gc/private/gc_priv.h>
 #else
-#include "private/gc_priv.h"
+#include <private/gc_priv.h>
 #endif
 int real_main(int, char **, char **);