I finally got around to making this work. At the moment syntax highlighting does not work for some reason, but I haven't played with it that much. Line numbering works though.
Attached is a patch to the 1.99.14 tarball, basically modifies the build files (gtk/Makefile.am, configure.in) to build the sourceviewmodule.
Also attached are three source files that go into gtk/ (.override, .defs, .c ) and one test file.
to use:
import gtksourceview
gsv = gtksourceview.SourceView()

Next I will try to get the highlighting to work, otherwise, what's the point eh? :)

BTW, I'm on RH8, I had to configure with --prefix=/usr and modify  Makefile.am, and gtk/Makefile.am to have:
pkgpythondir = $(pythondir)
pkgpyexecdir = $(pyexecdir)
instead of
pkgpythondir = $(pythondir)/gtk-2.0
pkgpyexecdir = $(pyexecdir)/gtk-2.0
It gets very confused otherwise.
I did not modify the .spec file, maybe next time.
Enjoy
-  - -- ----  ----------------------------------------- --- -- -   -
Ahmad Baitalmal
BitBuilder

web:
http://www.bitbuilder.com
-  - -- ----  -------------------------------------------------------------- --- -- -   -
diff -u pygtk-1.99.14/aclocal.m4 pygtk-1.99.14.orig/aclocal.m4
--- pygtk-1.99.14/aclocal.m4	2003-01-18 14:30:59.000000000 -0800
+++ pygtk-1.99.14.orig/aclocal.m4	2002-12-27 03:55:44.000000000 -0800
@@ -1084,6 +1084,8 @@
 AC_REQUIRE([AC_PROG_LD])dnl
 AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
 AC_REQUIRE([AC_PROG_NM])dnl
+AC_REQUIRE([LT_AC_PROG_SED])dnl
+
 AC_REQUIRE([AC_PROG_LN_S])dnl
 AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
 AC_REQUIRE([AC_OBJEXT])dnl
@@ -1251,9 +1253,12 @@
   lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
   lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
   ;;
-irix*)
+irix* | nonstopux*)
   symcode='[[BCDEGRST]]'
   ;;
+osf*)
+  symcode='[[BCDEGQRST]]'
+  ;;
 solaris* | sysv5*)
   symcode='[[BDT]]'
   ;;
@@ -1350,7 +1355,7 @@
 	  save_CFLAGS="$CFLAGS"
 	  LIBS="conftstm.$ac_objext"
 	  CFLAGS="$CFLAGS$no_builtin_flag"
-	  if AC_TRY_EVAL(ac_link) && test -s conftest; then
+	  if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then
 	    pipe_works=yes
 	  fi
 	  LIBS="$save_LIBS"
@@ -1894,7 +1899,7 @@
       # like `-m68040'.
       lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
       ;;
-    beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
+    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
       # PIC is the default for these OSes.
       ;;
     darwin* | rhapsody*)
@@ -1937,7 +1942,7 @@
       lt_cv_prog_cc_pic='+Z'
       ;;
 
-    irix5* | irix6*)
+    irix5* | irix6* | nonstopux*)
       lt_cv_prog_cc_wl='-Wl,'
       lt_cv_prog_cc_static='-non_shared'
       # PIC (with -KPIC) is the default.
@@ -1981,11 +1986,7 @@
     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
       lt_cv_prog_cc_pic='-KPIC'
       lt_cv_prog_cc_static='-Bstatic'
-      if test "x$host_vendor" = xsni; then
-	lt_cv_prog_cc_wl='-LD'
-      else
-	lt_cv_prog_cc_wl='-Wl,'
-      fi
+      lt_cv_prog_cc_wl='-Wl,'
       ;;
 
     uts4*)
@@ -2350,7 +2351,7 @@
     # If the export-symbols file already is a .def file (1st line
     # is EXPORTS), use it as is.
     # If DATA tags from a recent dlltool are present, honour them!
-    archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
+    archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then
 	cp $export_symbols $output_objdir/$soname-def;
       else
 	echo EXPORTS > $output_objdir/$soname-def;
@@ -2359,6 +2360,7 @@
 	 set dummy \$symbol;
 	 case \[$]# in
 	   2) echo "   \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
+	   4) echo "   \[$]2 \[$]3 \[$]4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;;
 	   *) echo "     \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;;
 	 esac;
 	 _lt_hint=`expr 1 + \$_lt_hint`;
@@ -2410,6 +2412,30 @@
     hardcode_shlibpath_var=no
     ;;
 
+  linux*)
+    if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
+      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+      supports_anon_versioning=no
+      case `$LD -v 2>/dev/null` in
+        *\ [01].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
+        *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+        *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+        *\ 2.11.*) ;; # other 2.11 versions
+        *) supports_anon_versioning=yes ;;
+      esac
+      if test $supports_anon_versioning = yes; then
+        archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~
+cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+$echo "local: *; };" >> $output_objdir/$libname.ver~
+        $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+      else
+        $archive_expsym_cmds="$archive_cmds"
+      fi
+    else
+      ld_shlibs=no
+    fi
+    ;;
+
   *)
     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
@@ -2471,10 +2497,12 @@
       # need to do runtime linking.
       case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
 	for ld_flag in $LDFLAGS; do
-	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+	  case $ld_flag in
+	  *-brtl*)
 	    aix_use_runtimelinking=yes
 	    break
-	  fi
+	  ;;
+	  esac
 	done
       esac
 
@@ -2588,8 +2616,9 @@
     esac
     # FIXME: Relying on posixy $() will cause problems for
     #        cross-compilation, but unfortunately the echo tests do not
-    #        yet detect zsh echo's removal of \ escapes.
-    archive_cmds='$nonopt $(test "x$module" = xyes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linker_flags -install_name $rpath/$soname $verstring'
+    #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
+    #	     `"' quotes if we put them in here... so don't!
+    archive_cmds='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs && $CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib ${lib}-master.o $deplibs$linker_flags $(test .$module != .yes && echo -install_name $rpath/$soname $verstring)'
     # We need to add '_' to the symbols in $export_symbols first
     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
     hardcode_direct=yes
@@ -2641,13 +2670,14 @@
     export_dynamic_flag_spec='${wl}-E'
     ;;
 
-  irix5* | irix6*)
+  irix5* | irix6* | nonstopux*)
     if test "$GCC" = yes; then
       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
     else
       archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+      hardcode_libdir_flag_spec='-rpath $libdir'
     fi
-    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
     hardcode_libdir_separator=:
     link_all_deplibs=yes
     ;;
@@ -2675,7 +2705,7 @@
     hardcode_direct=yes
     hardcode_shlibpath_var=no
     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-      archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
+      archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
       export_dynamic_flag_spec='${wl}-E'
     else
@@ -2685,7 +2715,7 @@
 	hardcode_libdir_flag_spec='-R$libdir'
         ;;
       *)
-        archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
+        archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
         ;;
       esac
@@ -2797,13 +2827,23 @@
     ;;
 
   sysv4)
-    if test "x$host_vendor" = xsno; then
-      archive_cmds='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      hardcode_direct=yes # is this really true???
-    else
-      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      hardcode_direct=no #Motorola manual says yes, but my tests say they lie
-    fi
+    case $host_vendor in
+      sni)
+        archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+        hardcode_direct=yes # is this really true???
+        ;;
+      siemens)
+        ## LD is ld it makes a PLAMLIB
+        ## CC just makes a GrossModule.
+        archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+        reload_cmds='$CC -r -o $output$reload_objs'
+        hardcode_direct=no
+        ;;
+      motorola)
+        archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+        hardcode_direct=no #Motorola manual says yes, but my tests say they lie
+        ;;
+    esac
     runpath_var='LD_RUN_PATH'
     hardcode_shlibpath_var=no
     ;;
@@ -2944,6 +2984,9 @@
 
 aix4* | aix5*)
   version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  hardcode_into_libs=yes
   if test "$host_cpu" = ia64; then
     # AIX 5 supports IA64
     library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
@@ -2982,6 +3025,7 @@
     fi
     shlibpath_var=LIBPATH
   fi
+  hardcode_into_libs=yes
   ;;
 
 amigaos*)
@@ -3029,7 +3073,7 @@
     ;;
   yes,mingw*)
     library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
-    sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"`
+    sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g" -e "s,=/,/,g"`
     ;;
   yes,pw32*)
     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
@@ -3112,14 +3156,17 @@
   postinstall_cmds='chmod 555 $lib'
   ;;
 
-irix5* | irix6*)
-  version_type=irix
+irix5* | irix6* | nonstopux*)
+  case $host_os in
+    nonstopux*) version_type=nonstopux ;;
+    *)          version_type=irix ;;
+  esac
   need_lib_prefix=no
   need_version=no
   soname_spec='${libname}${release}.so$major'
   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
   case $host_os in
-  irix5*)
+  irix5* | nonstopux*)
     libsuff= shlibsuff=
     ;;
   *)
@@ -3164,6 +3211,26 @@
   # people can always --disable-shared, the test was removed, and we
   # assume the GNU/Linux dynamic linker is in use.
   dynamic_linker='GNU/Linux ld.so'
+
+  # Find out which ABI we are using (multilib Linux x86_64 hack).
+  libsuff=
+  case "$host_cpu" in
+  x86_64*)
+    echo '[#]line __oline__ "configure"' > conftest.$ac_ext
+    if AC_TRY_EVAL(ac_compile); then
+      case `/usr/bin/file conftest.$ac_objext` in
+      *64-bit*)
+        libsuff=64
+        ;;
+      esac
+    fi
+    rm -rf conftest*
+    ;;
+  *)
+    ;;
+  esac
+  sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}"
+  sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
   ;;
 
 netbsd*)
@@ -3223,11 +3290,12 @@
 osf3* | osf4* | osf5*)
   version_type=osf
   need_version=no
-  soname_spec='${libname}${release}.so'
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
+  soname_spec='${libname}${release}.so$major'
+  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
   shlibpath_var=LD_LIBRARY_PATH
   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+  hardcode_into_libs=yes
   ;;
 
 sco3.2v5*)
@@ -3270,6 +3338,12 @@
   case $host_vendor in
     sni)
       shlibpath_overrides_runpath=no
+      need_lib_prefix=no
+      export_dynamic_flag_spec='${wl}-Blargedynsym'
+      runpath_var=LD_RUN_PATH
+      ;;
+    siemens)
+      need_lib_prefix=no
       ;;
     motorola)
       need_lib_prefix=no
@@ -3424,7 +3498,7 @@
   # Now quote all the things that may contain metacharacters while being
   # careful not to overquote the AC_SUBSTed values.  We take copies of the
   # variables and quote the copies for generation of the libtool script.
-  for var in echo old_CC old_CFLAGS \
+  for var in echo old_CC old_CFLAGS SED \
     AR AR_FLAGS CC LD LN_S NM SHELL \
     reload_flag reload_cmds wl \
     pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
@@ -3486,8 +3560,11 @@
 # configuration script generated by Autoconf, you may include it under
 # the same distribution terms that you use for the rest of that program.
 
+# A sed that does not truncate output.
+SED=$lt_SED
+
 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
-Xsed="sed -e s/^X//"
+Xsed="${SED} -e s/^X//"
 
 # The HP-UX ksh and POSIX shell print the target directory to stdout
 # if CDPATH is set.
@@ -4248,7 +4325,7 @@
 # AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies
 #  -- PORTME fill in with the dynamic library characteristics
 AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
-[AC_CACHE_CHECK([how to recognise dependant libraries],
+[AC_CACHE_CHECK([how to recognise dependent libraries],
 lt_cv_deplibs_check_method,
 [lt_cv_file_magic_cmd='$MAGIC_CMD'
 lt_cv_file_magic_test_file=
@@ -4323,9 +4400,9 @@
   lt_cv_file_magic_test_file=/usr/lib/libc.sl
   ;;
 
-irix5* | irix6*)
+irix5* | irix6* | nonstopux*)
   case $host_os in
-  irix5*)
+  irix5* | nonstopux*)
     # this will be overridden with pass_all, but let us keep it just in case
     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
     ;;
@@ -4347,7 +4424,7 @@
 # This must be Linux ELF.
 linux-gnu*)
   case $host_cpu in
-  alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* | s390* )
+  alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64* | s390* | x86_64*)
     lt_cv_deplibs_check_method=pass_all ;;
   *)
     # glibc up to 2.1.1 does not perform some relocations on ARM
@@ -4418,6 +4495,9 @@
     lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
     lt_cv_file_magic_test_file=/lib/libc.so
     ;;
+  siemens)
+    lt_cv_deplibs_check_method=pass_all
+    ;;
   esac
   ;;
 esac
@@ -4483,12 +4563,12 @@
 ])
 
 # AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
-# the libltdl convenience library and INCLTDL to the include flags for
+# the libltdl convenience library and LTDLINCL to the include flags for
 # the libltdl header and adds --enable-ltdl-convenience to the
-# configure arguments.  Note that LIBLTDL and INCLTDL are not
+# configure arguments.  Note that LIBLTDL and LTDLINCL are not
 # AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called.  If DIR is not
 # provided, it is assumed to be `libltdl'.  LIBLTDL will be prefixed
-# with '${top_builddir}/' and INCLTDL will be prefixed with
+# with '${top_builddir}/' and LTDLINCL will be prefixed with
 # '${top_srcdir}/' (note the single quotes!).  If your package is not
 # flat and you're not using automake, define top_builddir and
 # top_srcdir appropriately in the Makefiles.
@@ -4500,16 +4580,18 @@
       ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
   esac
   LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
-  INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
+  LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
+  # For backwards non-gettext consistent compatibility...
+  INCLTDL="$LTDLINCL"
 ])
 
 # AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
-# the libltdl installable library and INCLTDL to the include flags for
+# the libltdl installable library and LTDLINCL to the include flags for
 # the libltdl header and adds --enable-ltdl-install to the configure
-# arguments.  Note that LIBLTDL and INCLTDL are not AC_SUBSTed, nor is
+# arguments.  Note that LIBLTDL and LTDLINCL are not AC_SUBSTed, nor is
 # AC_CONFIG_SUBDIRS called.  If DIR is not provided and an installed
 # libltdl is not found, it is assumed to be `libltdl'.  LIBLTDL will
-# be prefixed with '${top_builddir}/' and INCLTDL will be prefixed
+# be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed
 # with '${top_srcdir}/' (note the single quotes!).  If your package is
 # not flat and you're not using automake, define top_builddir and
 # top_srcdir appropriately in the Makefiles.
@@ -4527,12 +4609,14 @@
   if test x"$enable_ltdl_install" = x"yes"; then
     ac_configure_args="$ac_configure_args --enable-ltdl-install"
     LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
-    INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
+    LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
   else
     ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
     LIBLTDL="-lltdl"
-    INCLTDL=
+    LTDLINCL=
   fi
+  # For backwards non-gettext consistent compatibility...
+  INCLTDL="$LTDLINCL"
 ])
 
 # old names
@@ -4547,6 +4631,95 @@
 # This is just to silence aclocal about the macro not being used
 ifelse([AC_DISABLE_FAST_INSTALL])
 
+# NOTE: This macro has been submitted for inclusion into   #
+#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
+#  a released version of Autoconf we should remove this    #
+#  macro and use it instead.                               #
+# LT_AC_PROG_SED
+# --------------
+# Check for a fully-functional sed program, that truncates
+# as few characters as possible.  Prefer GNU sed if found.
+AC_DEFUN([LT_AC_PROG_SED],
+[AC_MSG_CHECKING([for a sed that does not truncate output])
+AC_CACHE_VAL(lt_cv_path_SED,
+[# Loop through the user's path and test for sed and gsed.
+# Then use that list of sed's as ones to test for truncation.
+as_executable_p="test -f"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_prog in sed gsed; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
+        _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
+      fi
+    done
+  done
+done
+
+  # Create a temporary directory, and hook for its removal unless debugging.
+$debug ||
+{
+  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
+  trap '{ (exit 1); exit 1; }' 1 2 13 15
+}
+
+# Create a (secure) tmp directory for tmp files.
+: ${TMPDIR=/tmp}
+{
+  tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
+  test -n "$tmp" && test -d "$tmp"
+}  ||
+{
+  tmp=$TMPDIR/sed$$-$RANDOM
+  (umask 077 && mkdir $tmp)
+} ||
+{
+   echo "$me: cannot create a temporary directory in $TMPDIR" >&2
+   { (exit 1); exit 1; }
+}
+  _max=0
+  _count=0
+  # Add /usr/xpg4/bin/sed as it is typically found on Solaris
+  # along with /bin/sed that truncates output.
+  for _sed in $_sed_list /usr/xpg4/bin/sed; do
+    test ! -f ${_sed} && break
+    cat /dev/null > "$tmp/sed.in"
+    _count=0
+    echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in"
+    # Check for GNU sed and select it if it is found.
+    if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
+      lt_cv_path_SED=${_sed}
+      break
+    fi
+    while true; do
+      cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
+      mv "$tmp/sed.tmp" "$tmp/sed.in"
+      cp "$tmp/sed.in" "$tmp/sed.nl"
+      echo >>"$tmp/sed.nl"
+      ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
+      cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
+      # 40000 chars as input seems more than enough
+      test $_count -gt 10 && break
+      _count=`expr $_count + 1`
+      if test $_count -gt $_max; then
+        _max=$_count
+        lt_cv_path_SED=$_sed
+      fi
+    done
+  done
+  rm -rf "$tmp"
+])
+if test "X$SED" != "X"; then
+  lt_cv_path_SED=$SED
+else
+  SED=$lt_cv_path_SED
+fi
+AC_MSG_RESULT([$SED])
+])
+
 # Configure paths for GLIB
 # Owen Taylor     1997-2001
 
Only in pygtk-1.99.14: autom4te.cache
Common subdirectories: pygtk-1.99.14/codegen and pygtk-1.99.14.orig/codegen
Only in pygtk-1.99.14: config.h
Only in pygtk-1.99.14: config.log
Only in pygtk-1.99.14: config.status
diff -u pygtk-1.99.14/configure pygtk-1.99.14.orig/configure
--- pygtk-1.99.14/configure	2003-01-18 14:31:10.000000000 -0800
+++ pygtk-1.99.14.orig/configure	2002-12-27 03:55:56.000000000 -0800
@@ -469,7 +469,7 @@
 # include <unistd.h>
 #endif"
 
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM AWK SET_MAKE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE build build_cpu build_vendor build_os host host_cpu host_vendor host_os PLATFORM_WIN32_TRUE PLATFORM_WIN32_FALSE OS_WIN32_TRUE OS_WIN32_FALSE LN_S ECHO RANLIB ac_ct_RANLIB CPP EGREP LIBTOOL PYTHON PYTHON_VERSION PYTHON_PREFIX PYTHON_EXEC_PREFIX PYTHON_PLATFORM pythondir pkgpythondir pyexecdir pkgpyexecdir PYTHON_INCLUDES PKG_CONFIG GLIB_CFLAGS GLIB_LIBS GLIB_GENMARSHAL GOBJECT_QUERY GLIB_MKENUMS ATK_CFLAGS ATK_LIBS PANGO_CFLAGS PANGO_LIBS GTK_CFLAGS GTK_LIBS LIBGLADE_CFLAGS LIBGLADE_LIBS BUILD_LIBGLADE_TRUE BUILD_LIBGLADE_FALSE GTKGL_CFLAGS GTKGL_LIBS BUILD_GTKGL_TRUE BUILD_GTKGL_FALSE GTKSOURCEVIEW_CFLAGS GTKSOURCEVIEW_LIBS BUILD_GTKSOURCEVIEW_TRUE BUILD_GTKSOURCEVIEW_FALSE LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM AWK SET_MAKE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE build build_cpu build_vendor build_os host host_cpu host_vendor host_os PLATFORM_WIN32_TRUE PLATFORM_WIN32_FALSE OS_WIN32_TRUE OS_WIN32_FALSE LN_S ECHO RANLIB ac_ct_RANLIB CPP EGREP LIBTOOL PYTHON PYTHON_VERSION PYTHON_PREFIX PYTHON_EXEC_PREFIX PYTHON_PLATFORM pythondir pkgpythondir pyexecdir pkgpyexecdir PYTHON_INCLUDES PKG_CONFIG GLIB_CFLAGS GLIB_LIBS GLIB_GENMARSHAL GOBJECT_QUERY GLIB_MKENUMS ATK_CFLAGS ATK_LIBS PANGO_CFLAGS PANGO_LIBS GTK_CFLAGS GTK_LIBS LIBGLADE_CFLAGS LIBGLADE_LIBS BUILD_LIBGLADE_TRUE BUILD_LIBGLADE_FALSE GTKGL_CFLAGS GTKGL_LIBS BUILD_GTKGL_TRUE BUILD_GTKGL_FALSE LIBOBJS LTLIBOBJS'
 ac_subst_files=''
 
 # Initialize some variables set by options.
@@ -3304,6 +3304,91 @@
 echo "$as_me:$LINENO: result: $NM" >&5
 echo "${ECHO_T}$NM" >&6
 
+echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5
+echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6
+if test "${lt_cv_path_SED+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  # Loop through the user's path and test for sed and gsed.
+# Then use that list of sed's as ones to test for truncation.
+as_executable_p="test -f"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_prog in sed gsed; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
+        _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
+      fi
+    done
+  done
+done
+
+  # Create a temporary directory, and hook for its removal unless debugging.
+$debug ||
+{
+  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
+  trap '{ (exit 1); exit 1; }' 1 2 13 15
+}
+
+# Create a (secure) tmp directory for tmp files.
+: ${TMPDIR=/tmp}
+{
+  tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
+  test -n "$tmp" && test -d "$tmp"
+}  ||
+{
+  tmp=$TMPDIR/sed$$-$RANDOM
+  (umask 077 && mkdir $tmp)
+} ||
+{
+   echo "$me: cannot create a temporary directory in $TMPDIR" >&2
+   { (exit 1); exit 1; }
+}
+  _max=0
+  _count=0
+  # Add /usr/xpg4/bin/sed as it is typically found on Solaris
+  # along with /bin/sed that truncates output.
+  for _sed in $_sed_list /usr/xpg4/bin/sed; do
+    test ! -f ${_sed} && break
+    cat /dev/null > "$tmp/sed.in"
+    _count=0
+    echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in"
+    # Check for GNU sed and select it if it is found.
+    if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
+      lt_cv_path_SED=${_sed}
+      break
+    fi
+    while true; do
+      cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
+      mv "$tmp/sed.tmp" "$tmp/sed.in"
+      cp "$tmp/sed.in" "$tmp/sed.nl"
+      echo >>"$tmp/sed.nl"
+      ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
+      cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
+      # 40000 chars as input seems more than enough
+      test $_count -gt 10 && break
+      _count=`expr $_count + 1`
+      if test $_count -gt $_max; then
+        _max=$_count
+        lt_cv_path_SED=$_sed
+      fi
+    done
+  done
+  rm -rf "$tmp"
+
+fi
+
+if test "X$SED" != "X"; then
+  lt_cv_path_SED=$SED
+else
+  SED=$lt_cv_path_SED
+fi
+echo "$as_me:$LINENO: result: $SED" >&5
+echo "${ECHO_T}$SED" >&6
+
 echo "$as_me:$LINENO: checking whether ln -s works" >&5
 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
 LN_S=$as_ln_s
@@ -3315,8 +3400,8 @@
 echo "${ECHO_T}no, using $LN_S" >&6
 fi
 
-echo "$as_me:$LINENO: checking how to recognise dependant libraries" >&5
-echo $ECHO_N "checking how to recognise dependant libraries... $ECHO_C" >&6
+echo "$as_me:$LINENO: checking how to recognise dependent libraries" >&5
+echo $ECHO_N "checking how to recognise dependent libraries... $ECHO_C" >&6
 if test "${lt_cv_deplibs_check_method+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -3393,9 +3478,9 @@
   lt_cv_file_magic_test_file=/usr/lib/libc.sl
   ;;
 
-irix5* | irix6*)
+irix5* | irix6* | nonstopux*)
   case $host_os in
-  irix5*)
+  irix5* | nonstopux*)
     # this will be overridden with pass_all, but let us keep it just in case
     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
     ;;
@@ -3417,7 +3502,7 @@
 # This must be Linux ELF.
 linux-gnu*)
   case $host_cpu in
-  alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* | s390* )
+  alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64* | s390* | x86_64*)
     lt_cv_deplibs_check_method=pass_all ;;
   *)
     # glibc up to 2.1.1 does not perform some relocations on ARM
@@ -3488,6 +3573,9 @@
     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
     lt_cv_file_magic_test_file=/lib/libc.so
     ;;
+  siemens)
+    lt_cv_deplibs_check_method=pass_all
+    ;;
   esac
   ;;
 esac
@@ -3541,9 +3629,12 @@
   lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
   lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
   ;;
-irix*)
+irix* | nonstopux*)
   symcode='[BCDEGRST]'
   ;;
+osf*)
+  symcode='[BCDEGQRST]'
+  ;;
 solaris* | sysv5*)
   symcode='[BDT]'
   ;;
@@ -3652,7 +3743,7 @@
   (eval $ac_link) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && test -s conftest; then
+  (exit $ac_status); } && test -s conftest$ac_exeext; then
 	    pipe_works=yes
 	  fi
 	  LIBS="$save_LIBS"
@@ -4318,6 +4409,7 @@
 
 
 
+
 # Only perform the check for file, if the check method requires it
 case $deplibs_check_method in
 file_magic*)
@@ -4633,7 +4725,7 @@
 case $host in
 *-*-irix6*)
   # Find out which ABI we are using.
-  echo '#line 4636 "configure"' > conftest.$ac_ext
+  echo '#line 4728 "configure"' > conftest.$ac_ext
   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -4875,7 +4967,7 @@
       # like `-m68040'.
       lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
       ;;
-    beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
+    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
       # PIC is the default for these OSes.
       ;;
     darwin* | rhapsody*)
@@ -4918,7 +5010,7 @@
       lt_cv_prog_cc_pic='+Z'
       ;;
 
-    irix5* | irix6*)
+    irix5* | irix6* | nonstopux*)
       lt_cv_prog_cc_wl='-Wl,'
       lt_cv_prog_cc_static='-non_shared'
       # PIC (with -KPIC) is the default.
@@ -4962,11 +5054,7 @@
     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
       lt_cv_prog_cc_pic='-KPIC'
       lt_cv_prog_cc_static='-Bstatic'
-      if test "x$host_vendor" = xsni; then
-	lt_cv_prog_cc_wl='-LD'
-      else
-	lt_cv_prog_cc_wl='-Wl,'
-      fi
+      lt_cv_prog_cc_wl='-Wl,'
       ;;
 
     uts4*)
@@ -5166,7 +5254,7 @@
 save_CFLAGS="$CFLAGS"
 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
 compiler_c_o=no
-if { (eval echo configure:5169: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
+if { (eval echo configure:5257: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
   # The compiler can only warn and ignore the option if not recognized
   # So say no if there are warnings
   if test -s out/conftest.err; then
@@ -5502,7 +5590,7 @@
     # If the export-symbols file already is a .def file (1st line
     # is EXPORTS), use it as is.
     # If DATA tags from a recent dlltool are present, honour them!
-    archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
+    archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then
 	cp $export_symbols $output_objdir/$soname-def;
       else
 	echo EXPORTS > $output_objdir/$soname-def;
@@ -5511,6 +5599,7 @@
 	 set dummy \$symbol;
 	 case \$# in
 	   2) echo "   \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
+	   4) echo "   \$2 \$3 \$4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;;
 	   *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
 	 esac;
 	 _lt_hint=`expr 1 + \$_lt_hint`;
@@ -5562,6 +5651,30 @@
     hardcode_shlibpath_var=no
     ;;
 
+  linux*)
+    if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
+      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+      supports_anon_versioning=no
+      case `$LD -v 2>/dev/null` in
+        *\ 01.* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
+        *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+        *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+        *\ 2.11.*) ;; # other 2.11 versions
+        *) supports_anon_versioning=yes ;;
+      esac
+      if test $supports_anon_versioning = yes; then
+        archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~
+cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+$echo "local: *; };" >> $output_objdir/$libname.ver~
+        $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+      else
+        $archive_expsym_cmds="$archive_cmds"
+      fi
+    else
+      ld_shlibs=no
+    fi
+    ;;
+
   *)
     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
@@ -5623,10 +5736,12 @@
       # need to do runtime linking.
       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
 	for ld_flag in $LDFLAGS; do
-	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+	  case $ld_flag in
+	  *-brtl*)
 	    aix_use_runtimelinking=yes
 	    break
-	  fi
+	  ;;
+	  esac
 	done
       esac
 
@@ -5740,8 +5855,9 @@
     esac
     # FIXME: Relying on posixy $() will cause problems for
     #        cross-compilation, but unfortunately the echo tests do not
-    #        yet detect zsh echo's removal of \ escapes.
-    archive_cmds='$nonopt $(test "x$module" = xyes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linker_flags -install_name $rpath/$soname $verstring'
+    #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
+    #	     `"' quotes if we put them in here... so don't!
+    archive_cmds='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs && $CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib ${lib}-master.o $deplibs$linker_flags $(test .$module != .yes && echo -install_name $rpath/$soname $verstring)'
     # We need to add '_' to the symbols in $export_symbols first
     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
     hardcode_direct=yes
@@ -5793,13 +5909,14 @@
     export_dynamic_flag_spec='${wl}-E'
     ;;
 
-  irix5* | irix6*)
+  irix5* | irix6* | nonstopux*)
     if test "$GCC" = yes; then
       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
     else
       archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+      hardcode_libdir_flag_spec='-rpath $libdir'
     fi
-    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
     hardcode_libdir_separator=:
     link_all_deplibs=yes
     ;;
@@ -5827,7 +5944,7 @@
     hardcode_direct=yes
     hardcode_shlibpath_var=no
     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-      archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
+      archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
       export_dynamic_flag_spec='${wl}-E'
     else
@@ -5837,7 +5954,7 @@
 	hardcode_libdir_flag_spec='-R$libdir'
         ;;
       *)
-        archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
+        archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
         ;;
       esac
@@ -5949,13 +6066,23 @@
     ;;
 
   sysv4)
-    if test "x$host_vendor" = xsno; then
-      archive_cmds='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      hardcode_direct=yes # is this really true???
-    else
-      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      hardcode_direct=no #Motorola manual says yes, but my tests say they lie
-    fi
+    case $host_vendor in
+      sni)
+        archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+        hardcode_direct=yes # is this really true???
+        ;;
+      siemens)
+        ## LD is ld it makes a PLAMLIB
+        ## CC just makes a GrossModule.
+        archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+        reload_cmds='$CC -r -o $output$reload_objs'
+        hardcode_direct=no
+        ;;
+      motorola)
+        archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+        hardcode_direct=no #Motorola manual says yes, but my tests say they lie
+        ;;
+    esac
     runpath_var='LD_RUN_PATH'
     hardcode_shlibpath_var=no
     ;;
@@ -6103,6 +6230,9 @@
 
 aix4* | aix5*)
   version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  hardcode_into_libs=yes
   if test "$host_cpu" = ia64; then
     # AIX 5 supports IA64
     library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
@@ -6141,6 +6271,7 @@
     fi
     shlibpath_var=LIBPATH
   fi
+  hardcode_into_libs=yes
   ;;
 
 amigaos*)
@@ -6188,7 +6319,7 @@
     ;;
   yes,mingw*)
     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
-    sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"`
+    sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g" -e "s,=/,/,g"`
     ;;
   yes,pw32*)
     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll'
@@ -6271,14 +6402,17 @@
   postinstall_cmds='chmod 555 $lib'
   ;;
 
-irix5* | irix6*)
-  version_type=irix
+irix5* | irix6* | nonstopux*)
+  case $host_os in
+    nonstopux*) version_type=nonstopux ;;
+    *)          version_type=irix ;;
+  esac
   need_lib_prefix=no
   need_version=no
   soname_spec='${libname}${release}.so$major'
   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
   case $host_os in
-  irix5*)
+  irix5* | nonstopux*)
     libsuff= shlibsuff=
     ;;
   *)
@@ -6323,6 +6457,30 @@
   # people can always --disable-shared, the test was removed, and we
   # assume the GNU/Linux dynamic linker is in use.
   dynamic_linker='GNU/Linux ld.so'
+
+  # Find out which ABI we are using (multilib Linux x86_64 hack).
+  libsuff=
+  case "$host_cpu" in
+  x86_64*)
+    echo '#line 6465 "configure"' > conftest.$ac_ext
+    if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+      case `/usr/bin/file conftest.$ac_objext` in
+      *64-bit*)
+        libsuff=64
+        ;;
+      esac
+    fi
+    rm -rf conftest*
+    ;;
+  *)
+    ;;
+  esac
+  sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}"
+  sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
   ;;
 
 netbsd*)
@@ -6382,11 +6540,12 @@
 osf3* | osf4* | osf5*)
   version_type=osf
   need_version=no
-  soname_spec='${libname}${release}.so'
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
+  soname_spec='${libname}${release}.so$major'
+  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
   shlibpath_var=LD_LIBRARY_PATH
   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+  hardcode_into_libs=yes
   ;;
 
 sco3.2v5*)
@@ -6429,6 +6588,12 @@
   case $host_vendor in
     sni)
       shlibpath_overrides_runpath=no
+      need_lib_prefix=no
+      export_dynamic_flag_spec='${wl}-Blargedynsym'
+      runpath_var=LD_RUN_PATH
+      ;;
+    siemens)
+      need_lib_prefix=no
       ;;
     motorola)
       need_lib_prefix=no
@@ -6969,7 +7134,7 @@
     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 6972 "configure"
+#line 7137 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -7067,7 +7232,7 @@
     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 7070 "configure"
+#line 7235 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -7250,7 +7415,7 @@
   # Now quote all the things that may contain metacharacters while being
   # careful not to overquote the AC_SUBSTed values.  We take copies of the
   # variables and quote the copies for generation of the libtool script.
-  for var in echo old_CC old_CFLAGS \
+  for var in echo old_CC old_CFLAGS SED \
     AR AR_FLAGS CC LD LN_S NM SHELL \
     reload_flag reload_cmds wl \
     pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
@@ -7312,8 +7477,11 @@
 # configuration script generated by Autoconf, you may include it under
 # the same distribution terms that you use for the rest of that program.
 
+# A sed that does not truncate output.
+SED=$lt_SED
+
 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
-Xsed="sed -e s/^X//"
+Xsed="${SED} -e s/^X//"
 
 # The HP-UX ksh and POSIX shell print the target directory to stdout
 # if CDPATH is set.
@@ -9105,117 +9273,6 @@
 
 GTKGL_LIBS=`echo $GTKGL_LIBS | sed -e "s/$export_dynamic//"`
 
-build_gtksourceview=false
-
-  succeeded=no
-
-  if test -z "$PKG_CONFIG"; then
-    # Extract the first word of "pkg-config", so it can be a program name with args.
-set dummy pkg-config; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  case $PKG_CONFIG in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-
-  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
-  ;;
-esac
-fi
-PKG_CONFIG=$ac_cv_path_PKG_CONFIG
-
-if test -n "$PKG_CONFIG"; then
-  echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
-echo "${ECHO_T}$PKG_CONFIG" >&6
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-  fi
-
-  if test "$PKG_CONFIG" = "no" ; then
-     echo "*** The pkg-config script could not be found. Make sure it is"
-     echo "*** in your path, or set the PKG_CONFIG environment variable"
-     echo "*** to the full path to pkg-config."
-     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
-  else
-     PKG_CONFIG_MIN_VERSION=0.9.0
-     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
-        echo "$as_me:$LINENO: checking for gtksourceview >= 0.0.4" >&5
-echo $ECHO_N "checking for gtksourceview >= 0.0.4... $ECHO_C" >&6
-
-        if $PKG_CONFIG --exists "gtksourceview >= 0.0.4" ; then
-            echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-            succeeded=yes
-
-            echo "$as_me:$LINENO: checking GTKSOURCEVIEW_CFLAGS" >&5
-echo $ECHO_N "checking GTKSOURCEVIEW_CFLAGS... $ECHO_C" >&6
-            GTKSOURCEVIEW_CFLAGS=`$PKG_CONFIG --cflags "gtksourceview >= 0.0.4"`
-            echo "$as_me:$LINENO: result: $GTKSOURCEVIEW_CFLAGS" >&5
-echo "${ECHO_T}$GTKSOURCEVIEW_CFLAGS" >&6
-
-            echo "$as_me:$LINENO: checking GTKSOURCEVIEW_LIBS" >&5
-echo $ECHO_N "checking GTKSOURCEVIEW_LIBS... $ECHO_C" >&6
-            GTKSOURCEVIEW_LIBS=`$PKG_CONFIG --libs "gtksourceview >= 0.0.4"`
-            echo "$as_me:$LINENO: result: $GTKSOURCEVIEW_LIBS" >&5
-echo "${ECHO_T}$GTKSOURCEVIEW_LIBS" >&6
-        else
-            GTKSOURCEVIEW_CFLAGS=""
-            GTKSOURCEVIEW_LIBS=""
-            ## If we have a custom action on failure, don't print errors, but
-            ## do set a variable so people can do so.
-            GTKSOURCEVIEW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gtksourceview >= 0.0.4"`
-
-        fi
-
-
-
-     else
-        echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
-        echo "*** See http://www.freedesktop.org/software/pkgconfig";
-     fi
-  fi
-
-  if test $succeeded = yes; then
-     build_gtksourceview=true
-  else
-     build_gtksourceview=false
-  fi
-
-
-
-
-
-if $build_gtksourceview; then
-  BUILD_GTKSOURCEVIEW_TRUE=
-  BUILD_GTKSOURCEVIEW_FALSE='#'
-else
-  BUILD_GTKSOURCEVIEW_TRUE='#'
-  BUILD_GTKSOURCEVIEW_FALSE=
-fi
-
-GTKSOURCEVIEW_LIBS=`echo $GTKSOURCEVIEW_LIBS | sed -e "s/$export_dynamic//"`
-
 
 # Check whether --enable-numpy or --disable-numpy was given.
 if test "${enable_numpy+set}" = set; then
@@ -9803,13 +9860,6 @@
 Usually this means the macro was only invoked conditionally." >&2;}
    { (exit 1); exit 1; }; }
 fi
-if test -z "${BUILD_GTKSOURCEVIEW_TRUE}" && test -z "${BUILD_GTKSOURCEVIEW_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"BUILD_GTKSOURCEVIEW\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"BUILD_GTKSOURCEVIEW\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
-fi
 
 : ${CONFIG_STATUS=./config.status}
 ac_clean_files_save=$ac_clean_files
@@ -10430,10 +10480,6 @@
 s,@GTKGL_LIBS@,$GTKGL_LIBS,;t t
 s,@BUILD_GTKGL_TRUE@,$BUILD_GTKGL_TRUE,;t t
 s,@BUILD_GTKGL_FALSE@,$BUILD_GTKGL_FALSE,;t t
-s,@GTKSOURCEVIEW_CFLAGS@,$GTKSOURCEVIEW_CFLAGS,;t t
-s,@GTKSOURCEVIEW_LIBS@,$GTKSOURCEVIEW_LIBS,;t t
-s,@BUILD_GTKSOURCEVIEW_TRUE@,$BUILD_GTKSOURCEVIEW_TRUE,;t t
-s,@BUILD_GTKSOURCEVIEW_FALSE@,$BUILD_GTKSOURCEVIEW_FALSE,;t t
 s,@LIBOBJS@,$LIBOBJS,;t t
 s,@LTLIBOBJS@,$LTLIBOBJS,;t t
 CEOF
diff -u pygtk-1.99.14/configure.in pygtk-1.99.14.orig/configure.in
--- pygtk-1.99.14/configure.in	2003-01-18 14:25:38.000000000 -0800
+++ pygtk-1.99.14.orig/configure.in	2002-12-27 03:37:48.000000000 -0800
@@ -14,7 +14,6 @@
 m4_define(gtk_required_version,      2.0.0)
 m4_define(libglade_required_version, 2.0.0)
 m4_define(gtkgl_required_version,    1.99.0)
-m4_define(gtksourceview_required_version, 0.0.4)
 
 AC_INIT(pygtk, pygtk_version,
         [http://bugzilla.gnome.org/enter_bug.cgi?product=gnome-python&component=pygtk])
@@ -125,16 +124,6 @@
 AM_CONDITIONAL(BUILD_GTKGL, $build_gtkgl)
 GTKGL_LIBS=`echo $GTKGL_LIBS | sed -e "s/$export_dynamic//"`
 
-dnl gtksourceview
-build_gtksourceview=false
-PKG_CHECK_MODULES(GTKSOURCEVIEW, gtksourceview >= gtksourceview_required_version,
-  build_gtksourceview=true,
-  build_gtksourceview=false)
-AC_SUBST(GTKSOURCEVIEW_CFLAGS)
-AC_SUBST(GTKSOURCEVIEW_LIBS)
-AM_CONDITIONAL(BUILD_GTKSOURCEVIEW, $build_gtksourceview)
-GTKSOURCEVIEW_LIBS=`echo $GTKSOURCEVIEW_LIBS | sed -e "s/$export_dynamic//"`
-
 
 AC_ARG_ENABLE(numpy,
   AC_HELP_STRING([--disable-numpy], [Disable numeric python features]),,
Only in pygtk-1.99.14: configure.in~
Only in pygtk-1.99.14: .deps
Common subdirectories: pygtk-1.99.14/docs and pygtk-1.99.14.orig/docs
Common subdirectories: pygtk-1.99.14/examples and pygtk-1.99.14.orig/examples
Common subdirectories: pygtk-1.99.14/gtk and pygtk-1.99.14.orig/gtk
Only in pygtk-1.99.14: libtool
Only in pygtk-1.99.14: Makefile
diff -u pygtk-1.99.14/Makefile.am pygtk-1.99.14.orig/Makefile.am
--- pygtk-1.99.14/Makefile.am	2003-01-17 19:40:41.000000000 -0800
+++ pygtk-1.99.14.orig/Makefile.am	2002-08-24 22:47:58.000000000 -0700
@@ -20,8 +20,8 @@
 COMMONDEFS = pango-types.defs atk-types.defs gtk/gdk-types.defs \
 	     gtk/gtk-types.defs
 
-pkgpythondir = $(pythondir)
-pkgpyexecdir = $(pyexecdir)
+pkgpythondir = $(pythondir)/gtk-2.0
+pkgpyexecdir = $(pyexecdir)/gtk-2.0
 
 # this file is common to all pygtk versions.
 python_PYTHON = pygtk.py
diff -u pygtk-1.99.14/Makefile.in pygtk-1.99.14.orig/Makefile.in
--- pygtk-1.99.14/Makefile.in	2003-01-18 14:31:08.000000000 -0800
+++ pygtk-1.99.14.orig/Makefile.in	2002-12-27 03:55:54.000000000 -0800
@@ -49,8 +49,6 @@
 AWK = @AWK@
 BUILD_GTKGL_FALSE = @BUILD_GTKGL_FALSE@
 BUILD_GTKGL_TRUE = @BUILD_GTKGL_TRUE@
-BUILD_GTKSOURCEVIEW_FALSE = @BUILD_GTKSOURCEVIEW_FALSE@
-BUILD_GTKSOURCEVIEW_TRUE = @BUILD_GTKSOURCEVIEW_TRUE@
 BUILD_LIBGLADE_FALSE = @BUILD_LIBGLADE_FALSE@
 BUILD_LIBGLADE_TRUE = @BUILD_LIBGLADE_TRUE@
 CC = @CC@
@@ -74,8 +72,6 @@
 GOBJECT_QUERY = @GOBJECT_QUERY@
 GTKGL_CFLAGS = @GTKGL_CFLAGS@
 GTKGL_LIBS = @GTKGL_LIBS@
-GTKSOURCEVIEW_CFLAGS = @GTKSOURCEVIEW_CFLAGS@
-GTKSOURCEVIEW_LIBS = @GTKSOURCEVIEW_LIBS@
 GTK_CFLAGS = @GTK_CFLAGS@
 GTK_LIBS = @GTK_LIBS@
 INSTALL_DATA = @INSTALL_DATA@
@@ -145,9 +141,9 @@
 localstatedir = @localstatedir@
 mandir = @mandir@
 oldincludedir = @oldincludedir@
-pkgpyexecdir = $(pyexecdir)
+pkgpyexecdir = $(pyexecdir)/gtk-2.0
 
-pkgpythondir = $(pythondir)
+pkgpythondir = $(pythondir)/gtk-2.0
 prefix = @prefix@
 program_transform_name = @program_transform_name@
 pyexecdir = @pyexecdir@
Only in pygtk-1.99.14: pygtk-2.0.pc
Only in pygtk-1.99.14: pygtk.spec.old
Only in pygtk-1.99.14: stamp-h1
;; -*- scheme -*-
; object definitions ...
(define-object EmbeddedTag
  (in-module "Gtk")
  (parent "GtkTextTag")
  (c-name "GtkEmbeddedTag")
  (gtype-id "GTK_TYPE_EMBEDDED_TAG")
)

(define-object PatternTag
  (in-module "Gtk")
  (parent "GtkTextTag")
  (c-name "GtkPatternTag")
  (gtype-id "GTK_TYPE_PATTERN_TAG")
)

(define-object SourceBuffer
  (in-module "Gtk")
  (parent "GtkTextBuffer")
  (c-name "GtkSourceBuffer")
  (gtype-id "GTK_TYPE_SOURCE_BUFFER")
)

(define-object SourceView
  (in-module "Gtk")
  (parent "GtkTextView")
  (c-name "GtkSourceView")
  (gtype-id "GTK_TYPE_SOURCE_VIEW")
)

(define-object SyntaxTag
  (in-module "Gtk")
  (parent "GtkTextTag")
  (c-name "GtkSyntaxTag")
  (gtype-id "GTK_TYPE_SYNTAX_TAG")
)

;; Enumerations and flags ...


;; From /usr/local/include/gtksourceview/gtksourcebuffer.h

(define-function gtk_source_buffer_get_type
  (c-name "gtk_source_buffer_get_type")
  (return-type "GType")
)

(define-function gtk_source_buffer_new
  (c-name "gtk_source_buffer_new")
  (is-constructor-of "GtkSourceBuffer")
  (return-type "GtkSourceBuffer*")
  (parameters
    '("GtkTextTagTable*" "table")
  )
)

(define-method attach_to_view
  (of-object "GtkSourceBuffer")
  (c-name "gtk_source_buffer_attach_to_view")
  (return-type "none")
  (parameters
    '("GtkTextView*" "view")
  )
)

(define-method set_check_brackets
  (of-object "GtkSourceBuffer")
  (c-name "gtk_source_buffer_set_check_brackets")
  (return-type "none")
  (parameters
    '("gboolean" "check_brackets")
  )
)

(define-method get_highlight
  (of-object "GtkSourceBuffer")
  (c-name "gtk_source_buffer_get_highlight")
  (return-type "gboolean")
)

(define-method set_highlight
  (of-object "GtkSourceBuffer")
  (c-name "gtk_source_buffer_set_highlight")
  (return-type "none")
  (parameters
    '("gboolean" "highlight")
  )
)

(define-function gtk_source_buffer_regex_search
  (c-name "gtk_source_buffer_regex_search")
  (return-type "gint")
  (parameters
    '("const-gchar*" "text")
    '("gint" "pos")
    '("Regex*" "regex")
    '("gboolean" "forward")
    '("GtkSourceBufferMatch*" "match")
  )
)

(define-function gtk_source_buffer_regex_match
  (c-name "gtk_source_buffer_regex_match")
  (return-type "gint")
  (parameters
    '("const-gchar*" "text")
    '("gint" "pos")
    '("gint" "end")
    '("Regex*" "regex")
  )
)

(define-method get_regex_tags
  (of-object "GtkSourceBuffer")
  (c-name "gtk_source_buffer_get_regex_tags")
  (return-type "GList*")
)

(define-method purge_regex_tags
  (of-object "GtkSourceBuffer")
  (c-name "gtk_source_buffer_purge_regex_tags")
  (return-type "none")
)

(define-method install_regex_tags
  (of-object "GtkSourceBuffer")
  (c-name "gtk_source_buffer_install_regex_tags")
  (return-type "none")
  (parameters
    '("GList*" "entries")
  )
)

(define-method sync_syntax_regex
  (of-object "GtkSourceBuffer")
  (c-name "gtk_source_buffer_sync_syntax_regex")
  (return-type "none")
)

(define-function gtk_source_buffer_iter_has_syntax_tag
  (c-name "gtk_source_buffer_iter_has_syntax_tag")
  (return-type "GtkSyntaxTag*")
  (parameters
    '("GtkTextIter*" "iter")
  )
)

(define-method get_syntax_entries
  (of-object "GtkSourceBuffer")
  (c-name "gtk_source_buffer_get_syntax_entries")
  (return-type "GList*")
)

(define-method get_pattern_entries
  (of-object "GtkSourceBuffer")
  (c-name "gtk_source_buffer_get_pattern_entries")
  (return-type "GList*")
)

(define-method get_embedded_entries
  (of-object "GtkSourceBuffer")
  (c-name "gtk_source_buffer_get_embedded_entries")
  (return-type "GList*")
)

(define-method convert_to_html
  (of-object "GtkSourceBuffer")
  (c-name "gtk_source_buffer_convert_to_html")
  (return-type "gchar*")
  (parameters
    '("const-gchar*" "title")
  )
)

(define-function gtk_source_buffer_find_bracket_match
  (c-name "gtk_source_buffer_find_bracket_match")
  (return-type "gboolean")
  (parameters
    '("GtkTextIter*" "orig")
  )
)

(define-method can_undo
  (of-object "GtkSourceBuffer")
  (c-name "gtk_source_buffer_can_undo")
  (return-type "gboolean")
)

(define-method can_redo
  (of-object "GtkSourceBuffer")
  (c-name "gtk_source_buffer_can_redo")
  (return-type "gboolean")
)

(define-method undo
  (of-object "GtkSourceBuffer")
  (c-name "gtk_source_buffer_undo")
  (return-type "none")
)

(define-method redo
  (of-object "GtkSourceBuffer")
  (c-name "gtk_source_buffer_redo")
  (return-type "none")
)

(define-method get_undo_levels
  (of-object "GtkSourceBuffer")
  (c-name "gtk_source_buffer_get_undo_levels")
  (return-type "int")
)

(define-method set_undo_levels
  (of-object "GtkSourceBuffer")
  (c-name "gtk_source_buffer_set_undo_levels")
  (return-type "none")
  (parameters
    '("int" "undo_levels")
  )
)

(define-method begin_not_undoable_action
  (of-object "GtkSourceBuffer")
  (c-name "gtk_source_buffer_begin_not_undoable_action")
  (return-type "none")
)

(define-method end_not_undoable_action
  (of-object "GtkSourceBuffer")
  (c-name "gtk_source_buffer_end_not_undoable_action")
  (return-type "none")
)

(define-method line_add_marker
  (of-object "GtkSourceBuffer")
  (c-name "gtk_source_buffer_line_add_marker")
  (return-type "none")
  (parameters
    '("gint" "line")
    '("const-gchar*" "marker")
  )
)

(define-method line_set_marker
  (of-object "GtkSourceBuffer")
  (c-name "gtk_source_buffer_line_set_marker")
  (return-type "none")
  (parameters
    '("gint" "line")
    '("const-gchar*" "marker")
  )
)

(define-method line_remove_marker
  (of-object "GtkSourceBuffer")
  (c-name "gtk_source_buffer_line_remove_marker")
  (return-type "gboolean")
  (parameters
    '("gint" "line")
    '("const-gchar*" "marker")
  )
)

(define-method line_get_markers
  (of-object "GtkSourceBuffer")
  (c-name "gtk_source_buffer_line_get_markers")
  (return-type "const-GList*")
  (parameters
    '("gint" "line")
  )
)

(define-method line_has_markers
  (of-object "GtkSourceBuffer")
  (c-name "gtk_source_buffer_line_has_markers")
  (return-type "gint")
  (parameters
    '("gint" "line")
  )
)

(define-method line_remove_markers
  (of-object "GtkSourceBuffer")
  (c-name "gtk_source_buffer_line_remove_markers")
  (return-type "gint")
  (parameters
    '("gint" "line")
  )
)

(define-method get_all_markers
  (of-object "GtkSourceBuffer")
  (c-name "gtk_source_buffer_get_all_markers")
  (return-type "GList*")
)

(define-function gtk_source_buffer_remove_all_markers
  (c-name "gtk_source_buffer_remove_all_markers")
  (return-type "gint")
  (parameters
    '("GtkSourceBuffer*" "buffer")
    '("gint" "line_start")
    '("gint" "line_end")
  )
)

(define-method load
  (of-object "GtkSourceBuffer")
  (c-name "gtk_source_buffer_load")
  (return-type "gboolean")
  (parameters
    '("const-gchar*" "filename")
  )
)

(define-method save
  (of-object "GtkSourceBuffer")
  (c-name "gtk_source_buffer_save")
  (return-type "gboolean")
  (parameters
    '("const-gchar*" "filename")
  )
)

(define-method load_with_character_encoding
  (of-object "GtkSourceBuffer")
  (c-name "gtk_source_buffer_load_with_character_encoding")
  (return-type "gboolean")
  (parameters
    '("const-gchar*" "filename")
    '("const-gchar*" "encoding")
  )
)

(define-method save_with_character_encoding
  (of-object "GtkSourceBuffer")
  (c-name "gtk_source_buffer_save_with_character_encoding")
  (return-type "gboolean")
  (parameters
    '("const-gchar*" "filename")
    '("const-gchar*" "encoding")
    '("GError**" "error")
  )
)



;; From /usr/local/include/gtksourceview/gtksourcetag.h

(define-function gtk_syntax_tag_get_type
  (c-name "gtk_syntax_tag_get_type")
  (return-type "GType")
)

(define-function gtk_syntax_tag_new
  (c-name "gtk_syntax_tag_new")
  (is-constructor-of "GtkSyntaxTag")
  (return-type "GtkTextTag*")
  (parameters
    '("const-gchar*" "name")
    '("const-gchar*" "patternstart")
    '("const-gchar*" "patternend")
  )
)

(define-function gtk_pattern_tag_get_type
  (c-name "gtk_pattern_tag_get_type")
  (return-type "GType")
)

(define-function gtk_pattern_tag_new
  (c-name "gtk_pattern_tag_new")
  (is-constructor-of "GtkPatternTag")
  (return-type "GtkTextTag*")
  (parameters
    '("const-gchar*" "name")
    '("const-gchar*" "pattern")
  )
)

(define-function gtk_embedded_tag_get_type
  (c-name "gtk_embedded_tag_get_type")
  (return-type "GType")
)

(define-function gtk_embedded_tag_new
  (c-name "gtk_embedded_tag_new")
  (is-constructor-of "GtkEmbeddedTag")
  (return-type "GtkTextTag*")
  (parameters
    '("const-gchar*" "name")
    '("const-gchar*" "outside")
    '("const-gchar*" "inside")
  )
)

(define-function gtk_source_compile_regex
  (c-name "gtk_source_compile_regex")
  (return-type "gboolean")
  (parameters
    '("const-gchar*" "pattern")
    '("Regex*" "regex")
  )
)



;; From /usr/local/include/gtksourceview/gtksourceview.h

(define-function gtk_source_view_get_type
  (c-name "gtk_source_view_get_type")
  (return-type "GType")
  (parameters
  )
)

(define-function gtk_source_view_new
  (c-name "gtk_source_view_new")
  (is-constructor-of "GtkSourceView")
  (return-type "GtkWidget*")
  (parameters
  )
)

(define-function gtk_source_view_new_with_buffer
  (c-name "gtk_source_view_new_with_buffer")
  (return-type "GtkWidget*")
  (parameters
    '("GtkSourceBuffer*" "buffer")
  )
)

(define-method set_show_line_numbers
  (of-object "GtkSourceView")
  (c-name "gtk_source_view_set_show_line_numbers")
  (return-type "none")
  (parameters
    '("gboolean" "show")
  )
)

(define-method get_show_line_numbers
  (of-object "GtkSourceView")
  (c-name "gtk_source_view_get_show_line_numbers")
  (return-type "gboolean")
)

(define-method set_show_line_pixmaps
  (of-object "GtkSourceView")
  (c-name "gtk_source_view_set_show_line_pixmaps")
  (return-type "none")
  (parameters
    '("gboolean" "show")
  )
)

(define-method get_show_line_pixmaps
  (of-object "GtkSourceView")
  (c-name "gtk_source_view_get_show_line_pixmaps")
  (return-type "gboolean")
)

(define-method set_tab_stop
  (of-object "GtkSourceView")
  (c-name "gtk_source_view_set_tab_stop")
  (return-type "none")
  (parameters
    '("gint" "tab_stop")
  )
)

(define-method get_tab_stop
  (of-object "GtkSourceView")
  (c-name "gtk_source_view_get_tab_stop")
  (return-type "gint")
)

(define-method get_tab_stop_width
  (of-object "GtkSourceView")
  (c-name "gtk_source_view_get_tab_stop_width")
  (return-type "gint")
)

(define-method add_pixbuf
  (of-object "GtkSourceView")
  (c-name "gtk_source_view_add_pixbuf")
  (return-type "gboolean")
  (parameters
    '("const-gchar*" "key")
    '("GdkPixbuf*" "pixbuf")
    '("gboolean" "overwrite")
  )
)

(define-method get_pixbuf
  (of-object "GtkSourceView")
  (c-name "gtk_source_view_get_pixbuf")
  (return-type "GdkPixbuf*")
  (parameters
    '("const-gchar*" "key")
  )
)


/* -*- Mode: C; c-basic-offset: 4 -*- */
%%
headers
#include <Python.h>

#include "pygobject.h"
#include <gtksourceview/gtksourcebuffer.h>
#include <gtksourceview/gtksourcetag.h>
#include <gtksourceview/gtksourceview.h>
%%
modulename gtksourceview
%%
import gobject.GObject          as PyGObject_Type
import gobject.GError           as PyGError_Type
import gtk.TextTagTable         as PyGtkTextTagTable_Type
import gtk.TextTag                      as PyGtkTextTag_Type
import gtk.TextView             as PyGtkTextView_Type
import gtk.TextIter             as PyGtkTextIter_Type
import gtk.TextBuffer           as PyGtkTextBuffer_Type
import gtk.gdk.Pixbuf           as PyGdkPixbuf_Type
imoprt gtk.List                         as PyGList_Type
%%
ignore-glob
  *_get_type
%%
override gtk_source_buffer_load kwargs
static PyObject *
_wrap_gtk_source_buffer_load(PyGObject *self, PyObject *args, PyObject *kwargs)
{
    static char *kwlist[] = { "filename", NULL };
    char *filename;
        GError *error;
    int ret;

    if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s:GtkSourceBuffer.load", kwlist, 
&filename, &error))
        return NULL;
    ret = gtk_source_buffer_load(GTK_SOURCE_BUFFER(self->obj), filename, &error);
    return PyInt_FromLong(ret);
}
%%
override gtk_source_buffer_save kwargs
static PyObject *
_wrap_gtk_source_buffer_save(PyGObject *self, PyObject *args, PyObject *kwargs)
{
    static char *kwlist[] = { "filename", NULL };
    char *filename;
    int ret;
        GError *error;

    if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s:GtkSourceBuffer.save", kwlist, 
&filename, &error))
        return NULL;
    ret = gtk_source_buffer_save(GTK_SOURCE_BUFFER(self->obj), filename, &error);
    return PyInt_FromLong(ret);
}
%%
override gtk_source_buffer_load_with_character_encoding kwargs
static PyObject *
_wrap_gtk_source_buffer_load_with_character_encoding(PyGObject *self, PyObject *args, 
PyObject *kwargs)
{
    static char *kwlist[] = { "filename", "encoding", NULL };
    char *filename, *encoding;
    int ret;
        GError *error;
    if (!PyArg_ParseTupleAndKeywords(args, kwargs, 
"ss:GtkSourceBuffer.load_with_character_encoding", kwlist, &filename, &encoding, 
&error))
        return NULL;
    ret = gtk_source_buffer_load_with_character_encoding(GTK_SOURCE_BUFFER(self->obj), 
filename, encoding, &error);
    return PyInt_FromLong(ret);
}
%%
override gtk_source_buffer_get_regex_tags kwargs
static PyObject *
_wrap_gtk_source_buffer_get_regex_tags(PyGObject *self)
{
    GList    *tags, *tmp;
        PyObject *list;
    tags = gtk_source_buffer_get_regex_tags(GTK_SOURCE_BUFFER(self->obj));
        list = PyList_New(0);
        for (tmp = tags; tmp != NULL; tmp = tmp->next) 
        {
                PyObject *item = pygobject_new((GObject *)tmp->data);
                PyList_Append(list, item);
                Py_DECREF(item);
        }
        g_list_free(tags);
    return list;
}
%%
override gtk_source_buffer_install_regex_tags kwargs
static PyObject *
_wrap_gtk_source_buffer_install_regex_tags(PyGObject *self, PyObject *args, PyObject 
*kwargs)
{
    static char         *kwlist[] = { "entries", NULL };
    PyObject            *list;
        /* GtkPatternTag        *ptag  = NULL; */
    GList                       *glist = NULL;
    int len, i;

    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
                                "O:GtkSourceBuffer.install_regex_tags", kwlist, &list))
                return NULL;
    if (!PySequence_Check(list)) 
        {
                PyErr_SetString(PyExc_TypeError, "first argument must be a sequence");
                return NULL;
    }
    len = PySequence_Length(list);
    for (i = 0; i < len; i++) 
        {
                PyObject *item = PySequence_GetItem(list, i);
                /* Py_DECREF(item); */
                /*
                if(!pyg_boxed_check(item, GTK_TYPE_PATTERN_TAG))
                {
                        PyErr_SetString(PyExc_TypeError,
                                        "sequence item not a pattern tag object");
                        g_list_free(glist);
                        return NULL;
                }
                */
                glist = g_list_append(glist, pyg_boxed_get(item, GtkPatternTag ));
    }
    gtk_source_buffer_install_regex_tags(GTK_SOURCE_BUFFER(self->obj), glist);
    g_list_free(glist);
    Py_INCREF(Py_None);
    return Py_None;
}
%%
override gtk_source_buffer_get_syntax_entries kwargs
static PyObject *
_wrap_gtk_source_buffer_get_syntax_entries(PyGObject *self)
{
    GList    *entries, *tmp;
        PyObject *list;
    entries = gtk_source_buffer_get_syntax_entries(GTK_SOURCE_BUFFER(self->obj));
        list = PyList_New(0);
        for (tmp = entries; tmp != NULL; tmp = tmp->next) 
        {
                PyObject *item = pygobject_new((GObject *)tmp->data);
                PyList_Append(list, item);
                Py_DECREF(item);
        }
        g_list_free(entries);
    return list;
}
%%
override gtk_source_buffer_get_pattern_entries kwargs
static PyObject *
_wrap_gtk_source_buffer_get_pattern_entries(PyGObject *self)
{
    GList    *entries, *tmp;
        PyObject *list;
    entries = gtk_source_buffer_get_pattern_entries(GTK_SOURCE_BUFFER(self->obj));
        list = PyList_New(0);
        for (tmp = entries; tmp != NULL; tmp = tmp->next) 
        {
                PyObject *item = pygobject_new((GObject *)tmp->data);
                PyList_Append(list, item);
                Py_DECREF(item);
        }
        g_list_free(entries);
    return list;
}
%%
override gtk_source_buffer_get_embedded_entries kwargs
static PyObject *
_wrap_gtk_source_buffer_get_embedded_entries(PyGObject *self)
{
    GList    *entries, *tmp;
        PyObject *list;
    entries = gtk_source_buffer_get_embedded_entries(GTK_SOURCE_BUFFER(self->obj));
        list = PyList_New(0);
        for (tmp = entries; tmp != NULL; tmp = tmp->next) 
        {
                PyObject *item = pygobject_new((GObject *)tmp->data);
                PyList_Append(list, item);
                Py_DECREF(item);
        }
        g_list_free(entries);
    return list;
}
%%
override gtk_source_buffer_line_get_markers kwargs
static PyObject *
_wrap_gtk_source_buffer_line_get_markers(PyGObject *self, PyObject *args, PyObject 
*kwargs)
{
    GList    *markers, *tmp;
        PyObject *list;
        PyObject *line;
        gint     line_number;
    static char *kwlist[] = { "line", NULL };

    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
                                "O:GtkSourceBuffer.line_get_markers", kwlist, &line))
                return NULL;
    if (!PyInt_Check(line)) 
        {
                PyErr_SetString(PyExc_TypeError, "first argument must be a number");
                return NULL;
    }

        /* Get the line number out */
        line_number = (gint) PyInt_AsLong( line );
        markers = gtk_source_buffer_line_get_markers(GTK_SOURCE_BUFFER(self->obj), 
line_number);
        list = PyList_New(0);
        for (tmp = markers; tmp != NULL; tmp = tmp->next) 
        {
                PyObject *item = pygobject_new((GObject *)tmp->data);
                PyList_Append(list, item);
                Py_DECREF(item);
        }
        g_list_free(markers);
    return list;
}
%%
override gtk_source_buffer_get_all_markers kwargs
static PyObject *
_wrap_gtk_source_buffer_get_all_markers(PyGObject *self)
{
    GList    *markers, *tmp;
        PyObject *list;
    markers = gtk_source_buffer_get_all_markers(GTK_SOURCE_BUFFER(self->obj));
        list = PyList_New(0);
        for (tmp = markers; tmp != NULL; tmp = tmp->next) 
        {
                PyObject *item = pygobject_new((GObject *)tmp->data);
                PyList_Append(list, item);
                Py_DECREF(item);
        }
        g_list_free(markers);
    return list;
}
#!/usr/bin/env python
"""Application main window

Demonstrates a typical application window, with menubar, toolbar, statusbar."""

description = 'Application main window'

import gtk
import gtksourceview

def menuitem_cb(window, action, widget):
    dialog = gtk.MessageDialog(window, gtk.DIALOG_DESTROY_WITH_PARENT,
                               gtk.MESSAGE_INFO, gtk.BUTTONS_CLOSE,
                               'You selected or toggled the menu item: '
                               '"%s"' % (gtk.item_factory_path_from_widget(widget),))
    dialog.connect('response', lambda dialog, response: dialog.destroy())
    dialog.show()

menu_items = (
    ('/_File',            None,         None,        0, '<Branch>' ),
    ('/File/tearoff1',    None,         menuitem_cb, 0, '<Tearoff>'),
    ('/File/_New',        '<control>N', menuitem_cb, 0, '<StockItem>', gtk.STOCK_NEW),
    ('/File/_Open',       '<control>O', menuitem_cb, 0, '<StockItem>', gtk.STOCK_OPEN),
    ('/File/_Save',       '<control>S', menuitem_cb, 0, '<StockItem>', gtk.STOCK_SAVE),
    ('/File/Save _As...', None,         menuitem_cb, 0, '<StockItem>', gtk.STOCK_SAVE),
    ('/File/sep1',        None,         menuitem_cb, 0, '<Separator>'),
    ('/File/_Quit',       '<control>Q', menuitem_cb, 0, '<StockItem>', gtk.STOCK_QUIT),
    
    ('/_Preferences',                  None, None,        0, '<Branch>'),
    ('/_Preferences/_Color',           None, None,        0, '<Branch>'),
    ('/_Preferences/Color/_Red',       None, menuitem_cb, 0, '<RadioItem>'),
    ('/_Preferences/Color/_Green',     None, menuitem_cb, 0, '/Preferences/Color/Red'),
    ('/_Preferences/Color/_Blue',      None, menuitem_cb, 0, '/Preferences/Color/Red'),
    ('/_Preferences/_Shape',           None, None,        0, '<Branch>'),
    ('/_Preferences/Shape/_Square',    None, menuitem_cb, 0, '<RadioItem>'),
    ('/_Preferences/Shape/_Rectangle', None, menuitem_cb, 0, '/Preferences/Shape/Square'),
    ('/_Preferences/Shape/_Oval',      None, menuitem_cb, 0, '/Preferences/Shape/Rectangle'),

    # If you wanted this to be right justified you would use
    # "<LastBranch>", not "<Branch>".  Right justified help menu items
    # are generally considered a bad idea now days.

    ('/_Help',       None, None, 0, '<Branch>'),
    ('/Help/_About', None, menuitem_cb, 0, ''),
    )

def toolbar_cb(button, window):
    dialog = gtk.MessageDialog(window, gtk.DIALOG_DESTROY_WITH_PARENT,
                               gtk.MESSAGE_INFO, gtk.BUTTONS_CLOSE,
                               'You selected a toolbar button')
    dialog.connect('response', lambda dialog, response: dialog.destroy())
    dialog.show()

def register_stock_icons ():
    # TODO: Fix this
    
    items = [('demo-gtk-logo', '_GTK!', 0, 0, '')]
    
    # Register our stock items
    gtk.stock_add (items)
    
    # Add our custom icon factory to the list of defaults
    factory = gtk.IconFactory ()
    factory.add_default ()
    
    pixbuf = gtk.gdk.pixbuf_new_from_file ('gtk-logo-rgb.gif')
    
    # Register icon to accompany stock item
    if pixbuf:
	icon_set = gtk.IconSet (pixbuf)
	factory.add ('demo-gtk-logo', icon_set)
	icon_set.unref()
    else:
	print 'failed to load GTK logo for toolbar'
	
def update_statusbar(buffer, statusbar):
    # clear any previous message, underflow is allowed 
    statusbar.pop(0)
    count = buffer.get_char_count()
    iter = buffer.get_iter_at_mark(buffer.get_insert())
    row = iter.get_line()
    col = iter.get_line_offset()
    statusbar.push(0, 'Cursor at row %d column %d - %d chars in document' %
                   (row, col, count))

mark_set_callback = (lambda buffer, new_location, mark, statusbar:
                     update_statusbar(buffer, statusbar))
    
		     
def main():
    #register_stock_icons ()
    
    # Create the toplevel window
    window = gtk.Window()
    window.set_title('Application Window')
    if __name__ == '__main__':
	window.connect('destroy', lambda win: gtk.main_quit())

    table = gtk.Table(1, 4, gtk.FALSE)
    window.add(table)

    # Create the menubar

    accel_group = gtk.AccelGroup()
    window.add_accel_group(accel_group)
    
    item_factory = gtk.ItemFactory(gtk.MenuBar, '<main>', accel_group)

    # create menu items

    item_factory.create_items(menu_items, window)
    
    table.attach(item_factory.get_widget('<main>'),
                 # X direction           Y direction
                 0, 1,                      0, 1,
                 gtk.EXPAND | gtk.FILL,     0,
                 0,                         0)

    # Create the toolbar

    toolbar = gtk.Toolbar()
    toolbar.insert_stock(gtk.STOCK_OPEN,
                         "This is a demo button with an 'open' icon",
                         None,
                         toolbar_cb,
                         window,
                         -1)
    toolbar.insert_stock(gtk.STOCK_CLOSE,
                         "This is a demo button with an 'close' icon",
                         None,
                         toolbar_cb,
                         window,
                         -1)
    
    toolbar.append_space()

    toolbar.insert_stock('demo-gtk-logo',
                         "This is a demo button with a 'gtk' icon",
                         None,
                         toolbar_cb,
                         window,
                         -1)

    table.attach(toolbar,
                 # X direction           Y direction
                 0, 1,                   1, 2,
                 gtk.EXPAND | gtk.FILL,  0,
                 0,                      0)

    # Create document

    sw = gtk.ScrolledWindow()
    sw.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
    sw.set_shadow_type(gtk.SHADOW_IN)
    table.attach(sw,
                 # X direction           Y direction
                 0, 1,                   2, 3,
                 gtk.EXPAND | gtk.FILL,  gtk.EXPAND | gtk.FILL,
                 0,                      0)

    window.set_default_size(200, 200)
    
    contents = gtksourceview.SourceView()
    sw.add(contents)

    # Create statusbar 

    statusbar = gtk.Statusbar();
    table.attach(statusbar,
                 # X direction           Y direction
                 0, 1,                   3, 4,
                 gtk.EXPAND | gtk.FILL,  0,
                 0,                      0)

    buffer = contents.get_buffer()
    buffer.connect('changed', update_statusbar, statusbar)
    buffer.connect('mark_set', mark_set_callback, statusbar)
    update_statusbar(buffer, statusbar)
    
    window.show_all()

    if __name__ == '__main__': gtk.main()

if __name__ == '__main__': main()
/* -*- Mode: C; c-basic-offset: 4 -*- */

#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

/* include this first, before NO_IMPORT_PYGOBJECT is defined */
#include <pygobject.h>

void pygtksourceview_register_classes (PyObject *d);

extern PyMethodDef pygtksourceview_functions[];

DL_EXPORT(void)
initgtksourceview(void)
{
    PyObject *m, *d;
	
    init_pygobject ();

    m = Py_InitModule ("gtksourceview", pygtksourceview_functions);
    d = PyModule_GetDict (m);
	
    pygtksourceview_register_classes (d);

    if (PyErr_Occurred ()) {
	Py_FatalError ("can't initialise module gtksourceview");
    }
}

Reply via email to