anjuta-extras r10 - in trunk: . plugins plugins/class-inheritance plugins/sample1 plugins/scintilla plugins/scintilla/scintilla plugins/scintilla/scintilla/include plugins/scratchbox plugins/valgrind po



Author: jhs
Date: Wed Apr  8 07:16:46 2009
New Revision: 10
URL: http://svn.gnome.org/viewvc/anjuta-extras?rev=10&view=rev

Log:
Merged scintilla plugin in anjuta-extras


Added:
   trunk/plugins/scintilla/
   trunk/plugins/scintilla/anjuta-breakpoint-disabled-16.xpm
   trunk/plugins/scintilla/anjuta-editor-scintilla-plugin-48.png   (contents, props changed)
   trunk/plugins/scintilla/anjuta-editor-scintilla-plugin.svg
   trunk/plugins/scintilla/anjuta-editor-scintilla.glade
   trunk/plugins/scintilla/anjuta-editor.plugin
   trunk/plugins/scintilla/anjuta-linemark-16.xpm
   trunk/plugins/scintilla/lexer.h
   trunk/plugins/scintilla/plugin.h
   trunk/plugins/scintilla/properties_cxx.h
   trunk/plugins/scintilla/scintilla/
   trunk/plugins/scintilla/scintilla/CellBuffer.h
   trunk/plugins/scintilla/scintilla/Editor.cxx
   trunk/plugins/scintilla/scintilla/ExternalLexer.h
   trunk/plugins/scintilla/scintilla/Indicator.h
   trunk/plugins/scintilla/scintilla/LexAsm.cxx
   trunk/plugins/scintilla/scintilla/LexBash.cxx
   trunk/plugins/scintilla/scintilla/LexBasic.cxx
   trunk/plugins/scintilla/scintilla/LexCaml.cxx
   trunk/plugins/scintilla/scintilla/LexNsis.cxx
   trunk/plugins/scintilla/scintilla/LexScriptol.cxx
   trunk/plugins/scintilla/scintilla/LexTCL.cxx
   trunk/plugins/scintilla/scintilla/LexYAML.cxx
   trunk/plugins/scintilla/scintilla/Partitioning.h
   trunk/plugins/scintilla/scintilla/README.sync
   trunk/plugins/scintilla/scintilla/include/
   trunk/plugins/scintilla/scintilla/include/Accessor.h
   trunk/plugins/scintilla/scintilla/include/Face.py   (contents, props changed)
   trunk/plugins/scintilla/scintilla/include/HFacer.py   (contents, props changed)
   trunk/plugins/scintilla/scintilla/include/KeyWords.h
   trunk/plugins/scintilla/scintilla/include/Makefile.am
   trunk/plugins/scintilla/scintilla/include/Makefile.in
   trunk/plugins/scintilla/scintilla/include/Platform.h
   trunk/plugins/scintilla/scintilla/include/PropSet.h
   trunk/plugins/scintilla/scintilla/include/SString.h
   trunk/plugins/scintilla/scintilla/include/SciLexer.h
   trunk/plugins/scintilla/scintilla/include/Scintilla.h
   trunk/plugins/scintilla/scintilla/include/Scintilla.iface   (contents, props changed)
   trunk/plugins/scintilla/scintilla/include/ScintillaWidget.h
   trunk/plugins/scintilla/scintilla/include/WindowAccessor.h
   trunk/plugins/scintilla/text-editor-iterable.h
   trunk/plugins/scintilla/text_editor.c
   trunk/plugins/scintilla/text_editor_prefs.c
   trunk/plugins/scintilla/text_editor_prefs.h
Modified:
   trunk/Makefile
   trunk/aclocal.m4
   trunk/configure
   trunk/configure.ac
   trunk/plugins/Makefile.am
   trunk/plugins/class-inheritance/Makefile
   trunk/plugins/class-inheritance/Makefile.am
   trunk/plugins/class-inheritance/Makefile.in
   trunk/plugins/sample1/Makefile
   trunk/plugins/sample1/Makefile.in
   trunk/plugins/scratchbox/Makefile
   trunk/plugins/scratchbox/Makefile.in
   trunk/plugins/valgrind/Makefile
   trunk/plugins/valgrind/Makefile.in
   trunk/po/POTFILES
   trunk/po/POTFILES.in

Modified: trunk/Makefile
==============================================================================
--- trunk/Makefile	(original)
+++ trunk/Makefile	Wed Apr  8 07:16:46 2009
@@ -76,6 +76,8 @@
 AMDEP_FALSE = #
 AMDEP_TRUE = 
 AMTAR = ${SHELL} /home/jhs/devel/anjuta-extras/missing --run tar
+AM_CFLAGS =  -Wall -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wno-sign-compare 
+AM_CXXFLAGS =  -g -O2 -Wall -Wno-unused -Wshadow -Woverloaded-virtual 
 AR = ar
 AUTOCONF = ${SHELL} /home/jhs/devel/anjuta-extras/missing --run autoconf
 AUTOHEADER = ${SHELL} /home/jhs/devel/anjuta-extras/missing --run autoheader
@@ -89,6 +91,10 @@
 CFLAGS = -g -O2
 CPP = gcc -E
 CPPFLAGS = 
+CXX = g++
+CXXCPP = g++ -E
+CXXDEPMODE = depmode=gcc3
+CXXFLAGS = -g -O2
 CYGPATH_W = echo
 DATADIRNAME = share
 DEFS = -DHAVE_CONFIG_H
@@ -115,6 +121,8 @@
 GREP = /bin/grep
 HAVE_GRAPHVIZ_FALSE = #
 HAVE_GRAPHVIZ_TRUE = 
+HAVE_PLUGIN_SCINTILLA_FALSE = #
+HAVE_PLUGIN_SCINTILLA_TRUE = 
 HAVE_PLUGIN_VALGRIND_FALSE = #
 HAVE_PLUGIN_VALGRIND_TRUE = 
 INSTALL_DATA = ${INSTALL} -m 644
@@ -157,9 +165,9 @@
 LIPO = 
 LN_S = ln -s
 LTLIBOBJS = 
-MAINT = #
-MAINTAINER_MODE_FALSE = 
-MAINTAINER_MODE_TRUE = #
+MAINT = 
+MAINTAINER_MODE_FALSE = #
+MAINTAINER_MODE_TRUE = 
 MAKEINFO = ${SHELL} /home/jhs/devel/anjuta-extras/missing --run makeinfo
 MKINSTALLDIRS = ./mkinstalldirs
 MSGFMT = /usr/bin/msgfmt
@@ -191,11 +199,16 @@
 STRIP = strip
 USE_NLS = yes
 VERSION = 2.27.0
+WARN_CFLAGS = -Wall -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wno-sign-compare 
+WARN_CXXFLAGS = -g -O2 -Wall -Wno-unused -Wshadow -Woverloaded-virtual 
 XGETTEXT = /usr/bin/xgettext
 ac_ct_CC = gcc
+ac_ct_CXX = g++
 ac_ct_DUMPBIN = 
 am__fastdepCC_FALSE = #
 am__fastdepCC_TRUE = 
+am__fastdepCXX_FALSE = #
+am__fastdepCXX_TRUE = 
 am__include = include
 am__leading_dot = .
 am__quote = 
@@ -237,7 +250,7 @@
 mkdir_p = mkdir -p --
 oldincludedir = /usr/include
 pdfdir = ${docdir}
-prefix = /usr/local
+prefix = /usr
 program_transform_name = s,x,x,
 psdir = ${docdir}
 sbindir = ${exec_prefix}/sbin
@@ -251,7 +264,7 @@
 .SUFFIXES:
 am--refresh:
 	@:
-$(srcdir)/Makefile.in: # $(srcdir)/Makefile.am  $(am__configure_deps)
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
 	@for dep in $?; do \
 	  case '$(am__configure_deps)' in \
 	    *$$dep*) \
@@ -278,9 +291,9 @@
 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
 	$(SHELL) ./config.status --recheck
 
-$(top_srcdir)/configure: # $(am__configure_deps)
+$(top_srcdir)/configure:  $(am__configure_deps)
 	cd $(srcdir) && $(AUTOCONF)
-$(ACLOCAL_M4): # $(am__aclocal_m4_deps)
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
 	cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
 
 config.h: stamp-h1
@@ -292,7 +305,7 @@
 stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
 	@rm -f stamp-h1
 	cd $(top_builddir) && $(SHELL) ./config.status config.h
-$(srcdir)/config.h.in: # $(am__configure_deps) 
+$(srcdir)/config.h.in:  $(am__configure_deps) 
 	cd $(top_srcdir) && $(AUTOHEADER)
 	rm -f stamp-h1
 	touch $@

Modified: trunk/aclocal.m4
==============================================================================
--- trunk/aclocal.m4	(original)
+++ trunk/aclocal.m4	Wed Apr  8 07:16:46 2009
@@ -488,6 +488,148 @@
 fi])
 
 
+dnl GNOME_COMPILE_WARNINGS
+dnl Turn on many useful compiler warnings
+dnl For now, only works on GCC
+AC_DEFUN([GNOME_COMPILE_WARNINGS],[
+    dnl ******************************
+    dnl More compiler warnings
+    dnl ******************************
+
+    AC_ARG_ENABLE(compile-warnings, 
+                  AC_HELP_STRING([--enable-compile-warnings=@<:@no/minimum/yes/maximum/error@:>@],
+                                 [Turn on compiler warnings]),,
+                  [enable_compile_warnings="m4_default([$1],[yes])"])
+
+    warnCFLAGS=
+    if test "x$GCC" != xyes; then
+	enable_compile_warnings=no
+    fi
+
+    warning_flags=
+    realsave_CFLAGS="$CFLAGS"
+
+    case "$enable_compile_warnings" in
+    no)
+	warning_flags=
+	;;
+    minimum)
+	warning_flags="-Wall"
+	;;
+    yes)
+	warning_flags="-Wall -Wmissing-prototypes"
+	;;
+    maximum|error)
+	warning_flags="-Wall -Wmissing-prototypes -Wnested-externs -Wpointer-arith"
+	CFLAGS="$warning_flags $CFLAGS"
+	for option in -Wno-sign-compare; do
+		SAVE_CFLAGS="$CFLAGS"
+		CFLAGS="$CFLAGS $option"
+		AC_MSG_CHECKING([whether gcc understands $option])
+		AC_TRY_COMPILE([], [],
+			has_option=yes,
+			has_option=no,)
+		CFLAGS="$SAVE_CFLAGS"
+		AC_MSG_RESULT($has_option)
+		if test $has_option = yes; then
+		  warning_flags="$warning_flags $option"
+		fi
+		unset has_option
+		unset SAVE_CFLAGS
+	done
+	unset option
+	if test "$enable_compile_warnings" = "error" ; then
+	    warning_flags="$warning_flags -Werror"
+	fi
+	;;
+    *)
+	AC_MSG_ERROR(Unknown argument '$enable_compile_warnings' to --enable-compile-warnings)
+	;;
+    esac
+    CFLAGS="$realsave_CFLAGS"
+    AC_MSG_CHECKING(what warning flags to pass to the C compiler)
+    AC_MSG_RESULT($warning_flags)
+
+    AC_ARG_ENABLE(iso-c,
+                  AC_HELP_STRING([--enable-iso-c],
+                                 [Try to warn if code is not ISO C ]),,
+                  [enable_iso_c=no])
+
+    AC_MSG_CHECKING(what language compliance flags to pass to the C compiler)
+    complCFLAGS=
+    if test "x$enable_iso_c" != "xno"; then
+	if test "x$GCC" = "xyes"; then
+	case " $CFLAGS " in
+	    *[\ \	]-ansi[\ \	]*) ;;
+	    *) complCFLAGS="$complCFLAGS -ansi" ;;
+	esac
+	case " $CFLAGS " in
+	    *[\ \	]-pedantic[\ \	]*) ;;
+	    *) complCFLAGS="$complCFLAGS -pedantic" ;;
+	esac
+	fi
+    fi
+    AC_MSG_RESULT($complCFLAGS)
+
+    WARN_CFLAGS="$warning_flags $complCFLAGS"
+    AC_SUBST(WARN_CFLAGS)
+])
+
+dnl For C++, do basically the same thing.
+
+AC_DEFUN([GNOME_CXX_WARNINGS],[
+  AC_ARG_ENABLE(cxx-warnings,
+                AC_HELP_STRING([--enable-cxx-warnings=@<:@no/minimum/yes@:>@]
+                               [Turn on compiler warnings.]),,
+                [enable_cxx_warnings="m4_default([$1],[minimum])"])
+
+  AC_MSG_CHECKING(what warning flags to pass to the C++ compiler)
+  warnCXXFLAGS=
+  if test "x$GXX" != xyes; then
+    enable_cxx_warnings=no
+  fi
+  if test "x$enable_cxx_warnings" != "xno"; then
+    if test "x$GXX" = "xyes"; then
+      case " $CXXFLAGS " in
+      *[\ \	]-Wall[\ \	]*) ;;
+      *) warnCXXFLAGS="-Wall -Wno-unused" ;;
+      esac
+
+      ## -W is not all that useful.  And it cannot be controlled
+      ## with individual -Wno-xxx flags, unlike -Wall
+      if test "x$enable_cxx_warnings" = "xyes"; then
+	warnCXXFLAGS="$warnCXXFLAGS -Wshadow -Woverloaded-virtual"
+      fi
+    fi
+  fi
+  AC_MSG_RESULT($warnCXXFLAGS)
+
+   AC_ARG_ENABLE(iso-cxx,
+                 AC_HELP_STRING([--enable-iso-cxx],
+                                [Try to warn if code is not ISO C++ ]),,
+                 [enable_iso_cxx=no])
+
+   AC_MSG_CHECKING(what language compliance flags to pass to the C++ compiler)
+   complCXXFLAGS=
+   if test "x$enable_iso_cxx" != "xno"; then
+     if test "x$GXX" = "xyes"; then
+      case " $CXXFLAGS " in
+      *[\ \	]-ansi[\ \	]*) ;;
+      *) complCXXFLAGS="$complCXXFLAGS -ansi" ;;
+      esac
+
+      case " $CXXFLAGS " in
+      *[\ \	]-pedantic[\ \	]*) ;;
+      *) complCXXFLAGS="$complCXXFLAGS -pedantic" ;;
+      esac
+     fi
+   fi
+  AC_MSG_RESULT($complCXXFLAGS)
+
+  WARN_CXXFLAGS="$CXXFLAGS $warnCXXFLAGS $complCXXFLAGS"
+  AC_SUBST(WARN_CXXFLAGS)
+])
+
 
 dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
 # serial 40 IT_PROG_INTLTOOL

Modified: trunk/configure
==============================================================================
--- trunk/configure	(original)
+++ trunk/configure	Wed Apr  8 07:16:46 2009
@@ -793,6 +793,8 @@
 anjuta_plugin_dir
 anjutadatadir
 anjutalibdir
+HAVE_PLUGIN_SCINTILLA_FALSE
+HAVE_PLUGIN_SCINTILLA_TRUE
 GCONF_SCHEMAS_INSTALL_FALSE
 GCONF_SCHEMAS_INSTALL_TRUE
 GCONF_SCHEMA_FILE_DIR
@@ -808,6 +810,7 @@
 LIBANJUTA_LIBS
 LIBANJUTA_CFLAGS
 PKG_CONFIG
+CXXCPP
 OTOOL64
 OTOOL
 LIPO
@@ -875,11 +878,21 @@
 MSGFMT
 USE_NLS
 GETTEXT_PACKAGE
+AM_CXXFLAGS
+AM_CFLAGS
+WARN_CXXFLAGS
+WARN_CFLAGS
 BINUTILS_REQUIRED
 LIBGRAPHVIZ_REQUIRED
 EGREP
 GREP
 CPP
+am__fastdepCXX_FALSE
+am__fastdepCXX_TRUE
+CXXDEPMODE
+ac_ct_CXX
+CXXFLAGS
+CXX
 am__fastdepCC_FALSE
 am__fastdepCC_TRUE
 CCDEPMODE
@@ -962,6 +975,11 @@
 enable_option_checking
 enable_maintainer_mode
 enable_dependency_tracking
+enable_compile_warnings
+enable_iso_c
+enable_cxx_warnings
+enable_iso_cxx
+enable_debug
 enable_nls
 enable_shared
 enable_static
@@ -974,6 +992,7 @@
 with_gconf_source
 with_gconf_schema_file_dir
 enable_schemas_install
+enable_plugin_scintilla
 '
       ac_precious_vars='build_alias
 host_alias
@@ -983,7 +1002,11 @@
 LDFLAGS
 LIBS
 CPPFLAGS
+CXX
+CXXFLAGS
+CCC
 CPP
+CXXCPP
 PKG_CONFIG
 LIBANJUTA_CFLAGS
 LIBANJUTA_LIBS
@@ -1623,6 +1646,14 @@
 			  (and sometimes confusing) to the casual installer
   --disable-dependency-tracking  speeds up one-time build
   --enable-dependency-tracking   do not reject slow dependency extractors
+  --enable-compile-warnings=[no/minimum/yes/maximum/error]
+                          Turn on compiler warnings
+  --enable-iso-c          Try to warn if code is not ISO C
+  --enable-cxx-warnings=[no/minimum/yes]
+                               Turn on compiler warnings.
+
+  --enable-iso-cxx        Try to warn if code is not ISO C++
+  --enable-debug          Enable debug messages
   --disable-nls           do not use Native Language Support
   --enable-shared[=PKGS]  build shared libraries [default=yes]
   --enable-static[=PKGS]  build static libraries [default=yes]
@@ -1633,6 +1664,8 @@
                           Disable Valgrind plugin
   --disable-graphviz      Disable GraphViz support in Anjuta
   --disable-schemas-install	Disable the schemas installation
+  --disable-plugin-scintilla
+                          Scintilla based editor in Anjuta
 
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
@@ -1653,7 +1686,10 @@
   LIBS        libraries to pass to the linker, e.g. -l<library>
   CPPFLAGS    C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
               you have headers in a nonstandard directory <include dir>
+  CXX         C++ compiler command
+  CXXFLAGS    C++ compiler flags
   CPP         C preprocessor
+  CXXCPP      C++ preprocessor
   PKG_CONFIG  path to pkg-config utility
   LIBANJUTA_CFLAGS
               C compiler flags for LIBANJUTA, overriding pkg-config
@@ -4596,213 +4632,27 @@
 fi
 
 
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}gcc; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_CC="${ac_tool_prefix}gcc"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  { $as_echo "$as_me:$LINENO: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_CC"; then
-  ac_ct_CC=$CC
-  # Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ac_ct_CC"; then
-  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_ac_ct_CC="gcc"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
-  { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-$as_echo "$ac_ct_CC" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-  if test "x$ac_ct_CC" = x; then
-    CC=""
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+if test -z "$CXX"; then
+  if test -n "$CCC"; then
+    CXX=$CCC
   else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    CC=$ac_ct_CC
-  fi
-else
-  CC="$ac_cv_prog_CC"
-fi
-
-if test -z "$CC"; then
-          if test -n "$ac_tool_prefix"; then
-    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}cc; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_CC="${ac_tool_prefix}cc"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  { $as_echo "$as_me:$LINENO: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  fi
-fi
-if test -z "$CC"; then
-  # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  ac_prog_rejected=no
-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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
-       ac_prog_rejected=yes
-       continue
-     fi
-    ac_cv_prog_CC="cc"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-if test $ac_prog_rejected = yes; then
-  # We found a bogon in the path, so make sure we never use it.
-  set dummy $ac_cv_prog_CC
-  shift
-  if test $# != 0; then
-    # We chose a different compiler from the bogus one.
-    # However, it has the same basename, so the bogon will be chosen
-    # first if we set CC to just the basename; use the full file name.
-    shift
-    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
-  fi
-fi
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  { $as_echo "$as_me:$LINENO: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$CC"; then
-  if test -n "$ac_tool_prefix"; then
-  for ac_prog in cl.exe
+    if test -n "$ac_tool_prefix"; then
+  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
   do
     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
+if test "${ac_cv_prog_CXX+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
+  if test -n "$CXX"; then
+  ac_cv_prog_CXX="$CXX" # Let the user override the test.
 else
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
@@ -4811,7 +4661,7 @@
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
@@ -4821,32 +4671,32 @@
 
 fi
 fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  { $as_echo "$as_me:$LINENO: result: $CC" >&5
-$as_echo "$CC" >&6; }
+CXX=$ac_cv_prog_CXX
+if test -n "$CXX"; then
+  { $as_echo "$as_me:$LINENO: result: $CXX" >&5
+$as_echo "$CXX" >&6; }
 else
   { $as_echo "$as_me:$LINENO: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
 
-    test -n "$CC" && break
+    test -n "$CXX" && break
   done
 fi
-if test -z "$CC"; then
-  ac_ct_CC=$CC
-  for ac_prog in cl.exe
+if test -z "$CXX"; then
+  ac_ct_CXX=$CXX
+  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  if test -n "$ac_ct_CC"; then
-  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+  if test -n "$ac_ct_CXX"; then
+  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
 else
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
@@ -4855,7 +4705,7 @@
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_ac_ct_CC="$ac_prog"
+    ac_cv_prog_ac_ct_CXX="$ac_prog"
     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
@@ -4865,21 +4715,21 @@
 
 fi
 fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
-  { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-$as_echo "$ac_ct_CC" >&6; }
+ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
+if test -n "$ac_ct_CXX"; then
+  { $as_echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
+$as_echo "$ac_ct_CXX" >&6; }
 else
   { $as_echo "$as_me:$LINENO: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
 
-  test -n "$ac_ct_CC" && break
+  test -n "$ac_ct_CXX" && break
 done
 
-  if test "x$ac_ct_CC" = x; then
-    CC=""
+  if test "x$ac_ct_CXX" = x; then
+    CXX="g++"
   else
     case $cross_compiling:$ac_tool_warned in
 yes:)
@@ -4887,23 +4737,14 @@
 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
 ac_tool_warned=yes ;;
 esac
-    CC=$ac_ct_CC
+    CXX=$ac_ct_CXX
   fi
 fi
 
+  fi
 fi
-
-
-test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }; }
-
 # Provide some information about the compiler.
-$as_echo "$as_me:$LINENO: checking for C compiler version" >&5
+$as_echo "$as_me:$LINENO: checking for C++ compiler version" >&5
 set X $ac_compile
 ac_compiler=$2
 { (ac_try="$ac_compiler --version >&5"
@@ -4940,9 +4781,9 @@
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }
 
-{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
-$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
-if test "${ac_cv_c_compiler_gnu+set}" = set; then
+{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5
+$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
+if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
@@ -4978,7 +4819,7 @@
   cat conftest.err >&5
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
+	 test -z "$ac_cxx_werror_flag" ||
 	 test ! -s conftest.err
        } && test -s conftest.$ac_objext; then
   ac_compiler_gnu=yes
@@ -4990,27 +4831,27 @@
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-ac_cv_c_compiler_gnu=$ac_compiler_gnu
+ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
 
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
-$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5
+$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
 if test $ac_compiler_gnu = yes; then
-  GCC=yes
+  GXX=yes
 else
-  GCC=
+  GXX=
 fi
-ac_test_CFLAGS=${CFLAGS+set}
-ac_save_CFLAGS=$CFLAGS
-{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
-$as_echo_n "checking whether $CC accepts -g... " >&6; }
-if test "${ac_cv_prog_cc_g+set}" = set; then
+ac_test_CXXFLAGS=${CXXFLAGS+set}
+ac_save_CXXFLAGS=$CXXFLAGS
+{ $as_echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5
+$as_echo_n "checking whether $CXX accepts -g... " >&6; }
+if test "${ac_cv_prog_cxx_g+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  ac_save_c_werror_flag=$ac_c_werror_flag
-   ac_c_werror_flag=yes
-   ac_cv_prog_cc_g=no
-   CFLAGS="-g"
+  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
+   ac_cxx_werror_flag=yes
+   ac_cv_prog_cxx_g=no
+   CXXFLAGS="-g"
    cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -5041,15 +4882,15 @@
   cat conftest.err >&5
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
+	 test -z "$ac_cxx_werror_flag" ||
 	 test ! -s conftest.err
        } && test -s conftest.$ac_objext; then
-  ac_cv_prog_cc_g=yes
+  ac_cv_prog_cxx_g=yes
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-	CFLAGS=""
+	CXXFLAGS=""
       cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -5080,7 +4921,7 @@
   cat conftest.err >&5
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
+	 test -z "$ac_cxx_werror_flag" ||
 	 test ! -s conftest.err
        } && test -s conftest.$ac_objext; then
   :
@@ -5088,8 +4929,8 @@
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-	ac_c_werror_flag=$ac_save_c_werror_flag
-	 CFLAGS="-g"
+	ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+	 CXXFLAGS="-g"
 	 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -5120,10 +4961,10 @@
   cat conftest.err >&5
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
+	 test -z "$ac_cxx_werror_flag" ||
 	 test ! -s conftest.err
        } && test -s conftest.$ac_objext; then
-  ac_cv_prog_cc_g=yes
+  ac_cv_prog_cxx_g=yes
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
@@ -5138,152 +4979,36 @@
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-   ac_c_werror_flag=$ac_save_c_werror_flag
+   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
-$as_echo "$ac_cv_prog_cc_g" >&6; }
-if test "$ac_test_CFLAGS" = set; then
-  CFLAGS=$ac_save_CFLAGS
-elif test $ac_cv_prog_cc_g = yes; then
-  if test "$GCC" = yes; then
-    CFLAGS="-g -O2"
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5
+$as_echo "$ac_cv_prog_cxx_g" >&6; }
+if test "$ac_test_CXXFLAGS" = set; then
+  CXXFLAGS=$ac_save_CXXFLAGS
+elif test $ac_cv_prog_cxx_g = yes; then
+  if test "$GXX" = yes; then
+    CXXFLAGS="-g -O2"
   else
-    CFLAGS="-g"
+    CXXFLAGS="-g"
   fi
 else
-  if test "$GCC" = yes; then
-    CFLAGS="-O2"
+  if test "$GXX" = yes; then
+    CXXFLAGS="-O2"
   else
-    CFLAGS=
+    CXXFLAGS=
   fi
 fi
-{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
-$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
-if test "${ac_cv_prog_cc_c89+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_cv_prog_cc_c89=no
-ac_save_CC=$CC
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <stdarg.h>
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
-struct buf { int x; };
-FILE * (*rcsopen) (struct buf *, struct stat *, int);
-static char *e (p, i)
-     char **p;
-     int i;
-{
-  return p[i];
-}
-static char *f (char * (*g) (char **, int), char **p, ...)
-{
-  char *s;
-  va_list v;
-  va_start (v,p);
-  s = g (p, va_arg (v,int));
-  va_end (v);
-  return s;
-}
-
-/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
-   function prototypes and stuff, but not '\xHH' hex character constants.
-   These don't provoke an error unfortunately, instead are silently treated
-   as 'x'.  The following induces an error, until -std is added to get
-   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
-   array size at least.  It's necessary to write '\x00'==0 to get something
-   that's true only with -std.  */
-int osf4_cc_array ['\x00' == 0 ? 1 : -1];
-
-/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
-   inside strings and character constants.  */
-#define FOO(x) 'x'
-int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
-
-int test (int i, double x);
-struct s1 {int (*f) (int a);};
-struct s2 {int (*f) (double a);};
-int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
-int argc;
-char **argv;
-int
-main ()
-{
-return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
-  ;
-  return 0;
-}
-_ACEOF
-for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
-	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
-do
-  CC="$ac_save_CC $ac_arg"
-  rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_prog_cc_c89=$ac_arg
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext
-  test "x$ac_cv_prog_cc_c89" != "xno" && break
-done
-rm -f conftest.$ac_ext
-CC=$ac_save_CC
-
-fi
-# AC_CACHE_VAL
-case "x$ac_cv_prog_cc_c89" in
-  x)
-    { $as_echo "$as_me:$LINENO: result: none needed" >&5
-$as_echo "none needed" >&6; } ;;
-  xno)
-    { $as_echo "$as_me:$LINENO: result: unsupported" >&5
-$as_echo "unsupported" >&6; } ;;
-  *)
-    CC="$CC $ac_cv_prog_cc_c89"
-    { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
-$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
-esac
-
-
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
-depcc="$CC"   am_compiler_list=
+depcc="$CXX"  am_compiler_list=
 
 { $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
 $as_echo_n "checking dependency style of $depcc... " >&6; }
-if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
+if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
@@ -5305,7 +5030,7 @@
   # directory.
   mkdir sub
 
-  am_cv_CC_dependencies_compiler_type=none
+  am_cv_CXX_dependencies_compiler_type=none
   if test "$am_compiler_list" = ""; then
      am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
   fi
@@ -5358,7 +5083,7 @@
       #   icc: Command line remark: option '-MP' not supported
       if (grep 'ignoring option' conftest.err ||
           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
-        am_cv_CC_dependencies_compiler_type=$depmode
+        am_cv_CXX_dependencies_compiler_type=$depmode
         break
       fi
     fi
@@ -5367,611 +5092,374 @@
   cd ..
   rm -rf conftest.dir
 else
-  am_cv_CC_dependencies_compiler_type=none
+  am_cv_CXX_dependencies_compiler_type=none
 fi
 
 fi
-{ $as_echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
-$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
-CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+{ $as_echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; }
+CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
 
 
 
 if
   test "x$enable_dependency_tracking" != xno \
-  && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
-  am__fastdepCC_TRUE=
-  am__fastdepCC_FALSE='#'
+  && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
+  am__fastdepCXX_TRUE=
+  am__fastdepCXX_FALSE='#'
 else
-  am__fastdepCC_TRUE='#'
-  am__fastdepCC_FALSE=
+  am__fastdepCXX_TRUE='#'
+  am__fastdepCXX_FALSE=
 fi
 
 
-
-am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc
-
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
-{ $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
-$as_echo_n "checking how to run the C preprocessor... " >&6; }
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
-  CPP=
-fi
-if test -z "$CPP"; then
-  if test "${ac_cv_prog_CPP+set}" = set; then
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-      # Double quotes because CPP needs to be expanded
-    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
-    do
-      ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
-do
-  # Use a header file that comes with gcc, so configuring glibc
-  # with a fresh cross-compiler works.
-  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-  # <limits.h> exists even on freestanding compilers.
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp. "Syntax error" is here to catch this case.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-		     Syntax error
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       }; then
-  :
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
 else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_CC="${ac_tool_prefix}gcc"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
 
-  # Broken: fails on valid input.
-continue
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:$LINENO: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
-rm -f conftest.err conftest.$ac_ext
 
-  # OK, works on sane cases.  Now check whether nonexistent headers
-  # can be detected and how.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <ac_nonexistent.h>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       }; then
-  # Broken: success on invalid input.
-continue
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  # Passes both tests.
-ac_preproc_ok=:
-break
 fi
-
-rm -f conftest.err conftest.$ac_ext
-
+if test -z "$ac_cv_prog_CC"; then
+  ac_ct_CC=$CC
+  # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_CC="gcc"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
 done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then
-  break
-fi
-
-    done
-    ac_cv_prog_CPP=$CPP
+done
+IFS=$as_save_IFS
 
 fi
-  CPP=$ac_cv_prog_CPP
-else
-  ac_cv_prog_CPP=$CPP
 fi
-{ $as_echo "$as_me:$LINENO: result: $CPP" >&5
-$as_echo "$CPP" >&6; }
-ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
-do
-  # Use a header file that comes with gcc, so configuring glibc
-  # with a fresh cross-compiler works.
-  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-  # <limits.h> exists even on freestanding compilers.
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp. "Syntax error" is here to catch this case.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-		     Syntax error
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       }; then
-  :
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
 else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  # Broken: fails on valid input.
-continue
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
-rm -f conftest.err conftest.$ac_ext
-
-  # OK, works on sane cases.  Now check whether nonexistent headers
-  # can be detected and how.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <ac_nonexistent.h>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
+  if test "x$ac_ct_CC" = x; then
+    CC=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       }; then
-  # Broken: success on invalid input.
-continue
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-
-rm -f conftest.err conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then
-  :
+    CC=$ac_ct_CC
+  fi
 else
-  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }; }
+  CC="$ac_cv_prog_CC"
 fi
 
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-{ $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
-$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
-if test "${ac_cv_path_GREP+set}" = set; then
+if test -z "$CC"; then
+          if test -n "$ac_tool_prefix"; then
+    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  if test -z "$GREP"; then
-  ac_path_GREP_found=false
-  # Loop through the user's path and test for each of PROGNAME-LIST
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+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 grep ggrep; do
-    for ac_exec_ext in '' $ac_executable_extensions; do
-      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
-      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
-# Check for GNU ac_path_GREP and select it if it is found.
-  # Check for GNU $ac_path_GREP
-case `"$ac_path_GREP" --version 2>&1` in
-*GNU*)
-  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
-*)
-  ac_count=0
-  $as_echo_n 0123456789 >"conftest.in"
-  while :
-  do
-    cat "conftest.in" "conftest.in" >"conftest.tmp"
-    mv "conftest.tmp" "conftest.in"
-    cp "conftest.in" "conftest.nl"
-    $as_echo 'GREP' >> "conftest.nl"
-    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
-    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
-    ac_count=`expr $ac_count + 1`
-    if test $ac_count -gt ${ac_path_GREP_max-0}; then
-      # Best one so far, save it but keep looking for a better one
-      ac_cv_path_GREP="$ac_path_GREP"
-      ac_path_GREP_max=$ac_count
-    fi
-    # 10*(2^10) chars as input seems more than enough
-    test $ac_count -gt 10 && break
-  done
-  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
-
-      $ac_path_GREP_found && break 3
-    done
-  done
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_CC="${ac_tool_prefix}cc"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
 done
 IFS=$as_save_IFS
-  if test -z "$ac_cv_path_GREP"; then
-    { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
-$as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
-   { (exit 1); exit 1; }; }
-  fi
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:$LINENO: result: $CC" >&5
+$as_echo "$CC" >&6; }
 else
-  ac_cv_path_GREP=$GREP
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
-$as_echo "$ac_cv_path_GREP" >&6; }
- GREP="$ac_cv_path_GREP"
-
 
-{ $as_echo "$as_me:$LINENO: checking for egrep" >&5
-$as_echo_n "checking for egrep... " >&6; }
-if test "${ac_cv_path_EGREP+set}" = set; then
+  fi
+fi
+if test -z "$CC"; then
+  # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
-   then ac_cv_path_EGREP="$GREP -E"
-   else
-     if test -z "$EGREP"; then
-  ac_path_EGREP_found=false
-  # Loop through the user's path and test for each of PROGNAME-LIST
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+  ac_prog_rejected=no
+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 egrep; do
-    for ac_exec_ext in '' $ac_executable_extensions; do
-      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
-      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
-# Check for GNU ac_path_EGREP and select it if it is found.
-  # Check for GNU $ac_path_EGREP
-case `"$ac_path_EGREP" --version 2>&1` in
-*GNU*)
-  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
-*)
-  ac_count=0
-  $as_echo_n 0123456789 >"conftest.in"
-  while :
-  do
-    cat "conftest.in" "conftest.in" >"conftest.tmp"
-    mv "conftest.tmp" "conftest.in"
-    cp "conftest.in" "conftest.nl"
-    $as_echo 'EGREP' >> "conftest.nl"
-    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
-    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
-    ac_count=`expr $ac_count + 1`
-    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
-      # Best one so far, save it but keep looking for a better one
-      ac_cv_path_EGREP="$ac_path_EGREP"
-      ac_path_EGREP_max=$ac_count
-    fi
-    # 10*(2^10) chars as input seems more than enough
-    test $ac_count -gt 10 && break
-  done
-  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
-
-      $ac_path_EGREP_found && break 3
-    done
-  done
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+       ac_prog_rejected=yes
+       continue
+     fi
+    ac_cv_prog_CC="cc"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
 done
 IFS=$as_save_IFS
-  if test -z "$ac_cv_path_EGREP"; then
-    { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
-$as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
-   { (exit 1); exit 1; }; }
+
+if test $ac_prog_rejected = yes; then
+  # We found a bogon in the path, so make sure we never use it.
+  set dummy $ac_cv_prog_CC
+  shift
+  if test $# != 0; then
+    # We chose a different compiler from the bogus one.
+    # However, it has the same basename, so the bogon will be chosen
+    # first if we set CC to just the basename; use the full file name.
+    shift
+    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
   fi
-else
-  ac_cv_path_EGREP=$EGREP
 fi
-
-   fi
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
-$as_echo "$ac_cv_path_EGREP" >&6; }
- EGREP="$ac_cv_path_EGREP"
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:$LINENO: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
 
 
-{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5
-$as_echo_n "checking for ANSI C header files... " >&6; }
-if test "${ac_cv_header_stdc+set}" = set; then
+fi
+if test -z "$CC"; then
+  if test -n "$ac_tool_prefix"; then
+  for ac_prog in cl.exe
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
 
-int
-main ()
-{
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:$LINENO: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
 
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_header_stdc=yes
+
+    test -n "$CC" && break
+  done
+fi
+if test -z "$CC"; then
+  ac_ct_CC=$CC
+  for ac_prog in cl.exe
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+  $as_echo_n "(cached) " >&6
 else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_CC="$ac_prog"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
 
-	ac_cv_header_stdc=no
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
-if test $ac_cv_header_stdc = yes; then
-  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <string.h>
+  test -n "$ac_ct_CC" && break
+done
 
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "memchr" >/dev/null 2>&1; then
-  :
-else
-  ac_cv_header_stdc=no
+  if test "x$ac_ct_CC" = x; then
+    CC=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    CC=$ac_ct_CC
+  fi
 fi
-rm -f conftest*
 
 fi
 
-if test $ac_cv_header_stdc = yes; then
-  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <stdlib.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "free" >/dev/null 2>&1; then
-  :
-else
-  ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
 
-if test $ac_cv_header_stdc = yes; then
-  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
-  if test "$cross_compiling" = yes; then
-  :
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <ctype.h>
-#include <stdlib.h>
-#if ((' ' & 0x0FF) == 0x020)
-# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#else
-# define ISLOWER(c) \
-		   (('a' <= (c) && (c) <= 'i') \
-		     || ('j' <= (c) && (c) <= 'r') \
-		     || ('s' <= (c) && (c) <= 'z'))
-# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
-#endif
+test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }; }
 
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
-int
-main ()
-{
-  int i;
-  for (i = 0; i < 256; i++)
-    if (XOR (islower (i), ISLOWER (i))
-	|| toupper (i) != TOUPPER (i))
-      return 2;
-  return 0;
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
+# Provide some information about the compiler.
+$as_echo "$as_me:$LINENO: checking for C compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+{ (ac_try="$ac_compiler --version >&5"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 $as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>&5
+  (eval "$ac_compiler --version >&5") 2>&5
   ac_status=$?
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
+  (exit $ac_status); }
+{ (ac_try="$ac_compiler -v >&5"
+case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 $as_echo "$ac_try_echo") >&5
-  (eval "$ac_try") 2>&5
+  (eval "$ac_compiler -v >&5") 2>&5
   ac_status=$?
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  :
-else
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-ac_cv_header_stdc=no
-fi
-rm -rf conftest.dSYM
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-
-
-fi
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
-$as_echo "$ac_cv_header_stdc" >&6; }
-if test $ac_cv_header_stdc = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define STDC_HEADERS 1
-_ACEOF
-
-fi
-
-
-BINUTILS_REQUIRED=2.15.92
-LIBGRAPHVIZ_REQUIRED=1.0
-
-
-
-
-
-GETTEXT_PACKAGE=anjuta-extras
-
-
-cat >>confdefs.h <<_ACEOF
-#define GETTEXT_PACKAGE "$GETTEXT_PACKAGE"
-_ACEOF
-
-# On IRIX 5.3, sys/types and inttypes.h are conflicting.
-
-
-
-
-
-
-
-
+  (exit $ac_status); }
+{ (ac_try="$ac_compiler -V >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compiler -V >&5") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
 
-for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
-		  inttypes.h stdint.h unistd.h
-do
-as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
-$as_echo_n "checking for $ac_header... " >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
+$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
+if test "${ac_cv_c_compiler_gnu+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
@@ -5980,9 +5468,17 @@
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-$ac_includes_default
 
-#include <$ac_header>
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
+
+  ;
+  return 0;
+}
 _ACEOF
 rm -f conftest.$ac_objext
 if { (ac_try="$ac_compile"
@@ -6002,59 +5498,50 @@
 	 test -z "$ac_c_werror_flag" ||
 	 test ! -s conftest.err
        } && test -s conftest.$ac_objext; then
-  eval "$as_ac_Header=yes"
+  ac_compiler_gnu=yes
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-	eval "$as_ac_Header=no"
+	ac_compiler_gnu=no
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-ac_res=`eval 'as_val=${'$as_ac_Header'}
-		 $as_echo "$as_val"'`
-	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-as_val=`eval 'as_val=${'$as_ac_Header'}
-		 $as_echo "$as_val"'`
-   if test "x$as_val" = x""yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
 
 fi
-
-done
-
-
-
-
-for ac_header in locale.h
-do
-as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
-$as_echo_n "checking for $ac_header... " >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  $as_echo_n "(cached) " >&6
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
+$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+  GCC=yes
+else
+  GCC=
 fi
-ac_res=`eval 'as_val=${'$as_ac_Header'}
-		 $as_echo "$as_val"'`
-	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
+$as_echo_n "checking whether $CC accepts -g... " >&6; }
+if test "${ac_cv_prog_cc_g+set}" = set; then
+  $as_echo_n "(cached) " >&6
 else
-  # Is the header compilable?
-{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
-$as_echo_n "checking $ac_header usability... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
+  ac_save_c_werror_flag=$ac_c_werror_flag
+   ac_c_werror_flag=yes
+   ac_cv_prog_cc_g=no
+   CFLAGS="-g"
+   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-$ac_includes_default
-#include <$ac_header>
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
 _ACEOF
 rm -f conftest.$ac_objext
 if { (ac_try="$ac_compile"
@@ -6074,137 +5561,76 @@
 	 test -z "$ac_c_werror_flag" ||
 	 test ! -s conftest.err
        } && test -s conftest.$ac_objext; then
-  ac_header_compiler=yes
+  ac_cv_prog_cc_g=yes
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-	ac_header_compiler=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
-$as_echo_n "checking $ac_header presence... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
+	CFLAGS=""
+      cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <$ac_header>
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
 _ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 $as_echo "$ac_try_echo") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
 	 test ! -s conftest.err
-       }; then
-  ac_header_preproc=yes
+       } && test -s conftest.$ac_objext; then
+  :
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-  ac_header_preproc=no
-fi
-
-rm -f conftest.err conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-
-    ;;
-esac
-{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
-$as_echo_n "checking for $ac_header... " >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  $as_echo_n "(cached) " >&6
-else
-  eval "$as_ac_Header=\$ac_header_preproc"
-fi
-ac_res=`eval 'as_val=${'$as_ac_Header'}
-		 $as_echo "$as_val"'`
-	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-
-fi
-as_val=`eval 'as_val=${'$as_ac_Header'}
-		 $as_echo "$as_val"'`
-   if test "x$as_val" = x""yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-    if test $ac_cv_header_locale_h = yes; then
-    { $as_echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5
-$as_echo_n "checking for LC_MESSAGES... " >&6; }
-if test "${am_cv_val_LC_MESSAGES+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
+	ac_c_werror_flag=$ac_save_c_werror_flag
+	 CFLAGS="-g"
+	 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <locale.h>
+
 int
 main ()
 {
-return LC_MESSAGES
+
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 $as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
@@ -6213,63 +5639,110 @@
   (exit $ac_status); } && {
 	 test -z "$ac_c_werror_flag" ||
 	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  am_cv_val_LC_MESSAGES=yes
+       } && test -s conftest.$ac_objext; then
+  ac_cv_prog_cc_g=yes
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-	am_cv_val_LC_MESSAGES=no
+
 fi
 
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-{ $as_echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5
-$as_echo "$am_cv_val_LC_MESSAGES" >&6; }
-    if test $am_cv_val_LC_MESSAGES = yes; then
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_LC_MESSAGES 1
-_ACEOF
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
 
-    fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+   ac_c_werror_flag=$ac_save_c_werror_flag
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
+$as_echo "$ac_cv_prog_cc_g" >&6; }
+if test "$ac_test_CFLAGS" = set; then
+  CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+  if test "$GCC" = yes; then
+    CFLAGS="-g -O2"
+  else
+    CFLAGS="-g"
+  fi
+else
+  if test "$GCC" = yes; then
+    CFLAGS="-O2"
+  else
+    CFLAGS=
   fi
-     USE_NLS=yes
-
-
-    gt_cv_have_gettext=no
-
-    CATOBJEXT=NONE
-    XGETTEXT=:
-    INTLLIBS=
-
-    if test "${ac_cv_header_libintl_h+set}" = set; then
-  { $as_echo "$as_me:$LINENO: checking for libintl.h" >&5
-$as_echo_n "checking for libintl.h... " >&6; }
-if test "${ac_cv_header_libintl_h+set}" = set; then
-  $as_echo_n "(cached) " >&6
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
-$as_echo "$ac_cv_header_libintl_h" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
+$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
+if test "${ac_cv_prog_cc_c89+set}" = set; then
+  $as_echo_n "(cached) " >&6
 else
-  # Is the header compilable?
-{ $as_echo "$as_me:$LINENO: checking libintl.h usability" >&5
-$as_echo_n "checking libintl.h usability... " >&6; }
+  ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-$ac_includes_default
-#include <libintl.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+     char **p;
+     int i;
+{
+  return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+  char *s;
+  va_list v;
+  va_start (v,p);
+  s = g (p, va_arg (v,int));
+  va_end (v);
+  return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
+   function prototypes and stuff, but not '\xHH' hex character constants.
+   These don't provoke an error unfortunately, instead are silently treated
+   as 'x'.  The following induces an error, until -std is added to get
+   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
+   array size at least.  It's necessary to write '\x00'==0 to get something
+   that's true only with -std.  */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+   inside strings and character constants.  */
+#define FOO(x) 'x'
+int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
+  ;
+  return 0;
+}
 _ACEOF
-rm -f conftest.$ac_objext
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
+	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+  CC="$ac_save_CC $ac_arg"
+  rm -f conftest.$ac_objext
 if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -6287,581 +5760,558 @@
 	 test -z "$ac_c_werror_flag" ||
 	 test ! -s conftest.err
        } && test -s conftest.$ac_objext; then
-  ac_header_compiler=yes
+  ac_cv_prog_cc_c89=$ac_arg
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-	ac_header_compiler=no
-fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
+fi
 
-# Is the header present?
-{ $as_echo "$as_me:$LINENO: checking libintl.h presence" >&5
-$as_echo_n "checking libintl.h presence... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <libintl.h>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       }; then
-  ac_header_preproc=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+rm -f core conftest.err conftest.$ac_objext
+  test "x$ac_cv_prog_cc_c89" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
 
-  ac_header_preproc=no
 fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c89" in
+  x)
+    { $as_echo "$as_me:$LINENO: result: none needed" >&5
+$as_echo "none needed" >&6; } ;;
+  xno)
+    { $as_echo "$as_me:$LINENO: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;;
+  *)
+    CC="$CC $ac_cv_prog_cc_c89"
+    { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
+$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
+esac
 
-rm -f conftest.err conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { $as_echo "$as_me:$LINENO: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: libintl.h: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { $as_echo "$as_me:$LINENO: WARNING: libintl.h: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: libintl.h: present but cannot be compiled" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: libintl.h:     check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: libintl.h:     check for missing prerequisite headers?" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: libintl.h: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: libintl.h: see the Autoconf documentation" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5
-$as_echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: libintl.h: in the future, the compiler will take precedence" >&5
-$as_echo "$as_me: WARNING: libintl.h: in the future, the compiler will take precedence" >&2;}
 
-    ;;
-esac
-{ $as_echo "$as_me:$LINENO: checking for libintl.h" >&5
-$as_echo_n "checking for libintl.h... " >&6; }
-if test "${ac_cv_header_libintl_h+set}" = set; then
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+depcc="$CC"   am_compiler_list=
+
+{ $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  ac_cv_header_libintl_h=$ac_header_preproc
+  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
+
+  am_cv_CC_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+  fi
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+    case $depmode in
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+	continue
+      else
+	break
+      fi
+      ;;
+    none) break ;;
+    esac
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.
+    if depmode=$depmode \
+       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_CC_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_CC_dependencies_compiler_type=none
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
-$as_echo "$ac_cv_header_libintl_h" >&6; }
 
 fi
-if test "x$ac_cv_header_libintl_h" = x""yes; then
-  gt_cv_func_dgettext_libintl="no"
-      libintl_extra_libs=""
+{ $as_echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
 
-      #
-      # First check in libc
-      #
-      { $as_echo "$as_me:$LINENO: checking for ngettext in libc" >&5
-$as_echo_n "checking for ngettext in libc... " >&6; }
-if test "${gt_cv_func_ngettext_libc+set}" = set; then
+
+
+if
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+  am__fastdepCC_TRUE=
+  am__fastdepCC_FALSE='#'
+else
+  am__fastdepCC_TRUE='#'
+  am__fastdepCC_FALSE=
+fi
+
+
+
+am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+{ $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
+$as_echo_n "checking how to run the C preprocessor... " >&6; }
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+  CPP=
+fi
+if test -z "$CPP"; then
+  if test "${ac_cv_prog_CPP+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
+      # Double quotes because CPP needs to be expanded
+    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+    do
+      ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-
-#include <libintl.h>
-
-int
-main ()
-{
-return !ngettext ("","", 1)
-  ;
-  return 0;
-}
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+		     Syntax error
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
+if { (ac_try="$ac_cpp conftest.$ac_ext"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 $as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
 	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
        }; then
-  gt_cv_func_ngettext_libc=yes
+  :
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-	gt_cv_func_ngettext_libc=no
+  # Broken: fails on valid input.
+continue
 fi
 
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-
-fi
-{ $as_echo "$as_me:$LINENO: result: $gt_cv_func_ngettext_libc" >&5
-$as_echo "$gt_cv_func_ngettext_libc" >&6; }
+rm -f conftest.err conftest.$ac_ext
 
-      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
-	      { $as_echo "$as_me:$LINENO: checking for dgettext in libc" >&5
-$as_echo_n "checking for dgettext in libc... " >&6; }
-if test "${gt_cv_func_dgettext_libc+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
+  # OK, works on sane cases.  Now check whether nonexistent headers
+  # can be detected and how.
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-
-#include <libintl.h>
-
-int
-main ()
-{
-return !dgettext ("","")
-  ;
-  return 0;
-}
+#include <ac_nonexistent.h>
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
+if { (ac_try="$ac_cpp conftest.$ac_ext"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 $as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
 	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
        }; then
-  gt_cv_func_dgettext_libc=yes
+  # Broken: success on invalid input.
+continue
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-	gt_cv_func_dgettext_libc=no
+  # Passes both tests.
+ac_preproc_ok=:
+break
 fi
 
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_ext
 
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+  break
 fi
-{ $as_echo "$as_me:$LINENO: result: $gt_cv_func_dgettext_libc" >&5
-$as_echo "$gt_cv_func_dgettext_libc" >&6; }
-      fi
 
-      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
+    done
+    ac_cv_prog_CPP=$CPP
 
-for ac_func in bind_textdomain_codeset
-do
-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
-$as_echo_n "checking for $ac_func... " >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-  $as_echo_n "(cached) " >&6
+fi
+  CPP=$ac_cv_prog_CPP
 else
+  ac_cv_prog_CPP=$CPP
+fi
+{ $as_echo "$as_me:$LINENO: result: $CPP" >&5
+$as_echo "$CPP" >&6; }
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
 #ifdef __STDC__
 # include <limits.h>
 #else
 # include <assert.h>
 #endif
-
-#undef $ac_func
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined __stub_$ac_func || defined __stub___$ac_func
-choke me
-#endif
-
-int
-main ()
-{
-return $ac_func ();
-  ;
-  return 0;
-}
+		     Syntax error
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
+if { (ac_try="$ac_cpp conftest.$ac_ext"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 $as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
 	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
        }; then
-  eval "$as_ac_var=yes"
+  :
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-	eval "$as_ac_var=no"
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-ac_res=`eval 'as_val=${'$as_ac_var'}
-		 $as_echo "$as_val"'`
-	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-as_val=`eval 'as_val=${'$as_ac_var'}
-		 $as_echo "$as_val"'`
-   if test "x$as_val" = x""yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
+  # Broken: fails on valid input.
+continue
 fi
-done
-
-      fi
 
-      #
-      # If we don't have everything we want, check in libintl
-      #
-      if test "$gt_cv_func_dgettext_libc" != "yes" \
-	 || test "$gt_cv_func_ngettext_libc" != "yes" \
-         || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
+rm -f conftest.err conftest.$ac_ext
 
-        { $as_echo "$as_me:$LINENO: checking for bindtextdomain in -lintl" >&5
-$as_echo_n "checking for bindtextdomain in -lintl... " >&6; }
-if test "${ac_cv_lib_intl_bindtextdomain+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lintl  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
+  # OK, works on sane cases.  Now check whether nonexistent headers
+  # can be detected and how.
+  cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char bindtextdomain ();
-int
-main ()
-{
-return bindtextdomain ();
-  ;
-  return 0;
-}
+#include <ac_nonexistent.h>
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
+if { (ac_try="$ac_cpp conftest.$ac_ext"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 $as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
 	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
        }; then
-  ac_cv_lib_intl_bindtextdomain=yes
+  # Broken: success on invalid input.
+continue
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-	ac_cv_lib_intl_bindtextdomain=no
+  # Passes both tests.
+ac_preproc_ok=:
+break
 fi
 
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_intl_bindtextdomain" >&5
-$as_echo "$ac_cv_lib_intl_bindtextdomain" >&6; }
-if test "x$ac_cv_lib_intl_bindtextdomain" = x""yes; then
-  { $as_echo "$as_me:$LINENO: checking for ngettext in -lintl" >&5
-$as_echo_n "checking for ngettext in -lintl... " >&6; }
-if test "${ac_cv_lib_intl_ngettext+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lintl  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+rm -f conftest.err conftest.$ac_ext
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char ngettext ();
-int
-main ()
-{
-return ngettext ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_intl_ngettext=yes
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+  :
 else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_intl_ngettext=no
+  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }; }
 fi
 
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_intl_ngettext" >&5
-$as_echo "$ac_cv_lib_intl_ngettext" >&6; }
-if test "x$ac_cv_lib_intl_ngettext" = x""yes; then
-  { $as_echo "$as_me:$LINENO: checking for dgettext in -lintl" >&5
-$as_echo_n "checking for dgettext in -lintl... " >&6; }
-if test "${ac_cv_lib_intl_dgettext+set}" = set; then
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+{ $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
+$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
+if test "${ac_cv_path_GREP+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lintl  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char dgettext ();
-int
-main ()
-{
-return dgettext ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
+  if test -z "$GREP"; then
+  ac_path_GREP_found=false
+  # Loop through the user's path and test for each of PROGNAME-LIST
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_prog in grep ggrep; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
+      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
+# Check for GNU ac_path_GREP and select it if it is found.
+  # Check for GNU $ac_path_GREP
+case `"$ac_path_GREP" --version 2>&1` in
+*GNU*)
+  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
+*)
+  ac_count=0
+  $as_echo_n 0123456789 >"conftest.in"
+  while :
+  do
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    $as_echo 'GREP' >> "conftest.nl"
+    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+    ac_count=`expr $ac_count + 1`
+    if test $ac_count -gt ${ac_path_GREP_max-0}; then
+      # Best one so far, save it but keep looking for a better one
+      ac_cv_path_GREP="$ac_path_GREP"
+      ac_path_GREP_max=$ac_count
+    fi
+    # 10*(2^10) chars as input seems more than enough
+    test $ac_count -gt 10 && break
+  done
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_intl_dgettext=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-	ac_cv_lib_intl_dgettext=no
+      $ac_path_GREP_found && break 3
+    done
+  done
+done
+IFS=$as_save_IFS
+  if test -z "$ac_cv_path_GREP"; then
+    { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
+$as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
+   { (exit 1); exit 1; }; }
+  fi
+else
+  ac_cv_path_GREP=$GREP
 fi
 
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dgettext" >&5
-$as_echo "$ac_cv_lib_intl_dgettext" >&6; }
-if test "x$ac_cv_lib_intl_dgettext" = x""yes; then
-  gt_cv_func_dgettext_libintl=yes
 fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
+$as_echo "$ac_cv_path_GREP" >&6; }
+ GREP="$ac_cv_path_GREP"
+
+
+{ $as_echo "$as_me:$LINENO: checking for egrep" >&5
+$as_echo_n "checking for egrep... " >&6; }
+if test "${ac_cv_path_EGREP+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
+   then ac_cv_path_EGREP="$GREP -E"
+   else
+     if test -z "$EGREP"; then
+  ac_path_EGREP_found=false
+  # Loop through the user's path and test for each of PROGNAME-LIST
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_prog in egrep; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
+      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
+# Check for GNU ac_path_EGREP and select it if it is found.
+  # Check for GNU $ac_path_EGREP
+case `"$ac_path_EGREP" --version 2>&1` in
+*GNU*)
+  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
+*)
+  ac_count=0
+  $as_echo_n 0123456789 >"conftest.in"
+  while :
+  do
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    $as_echo 'EGREP' >> "conftest.nl"
+    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+    ac_count=`expr $ac_count + 1`
+    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
+      # Best one so far, save it but keep looking for a better one
+      ac_cv_path_EGREP="$ac_path_EGREP"
+      ac_path_EGREP_max=$ac_count
+    fi
+    # 10*(2^10) chars as input seems more than enough
+    test $ac_count -gt 10 && break
+  done
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
 
+      $ac_path_EGREP_found && break 3
+    done
+  done
+done
+IFS=$as_save_IFS
+  if test -z "$ac_cv_path_EGREP"; then
+    { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
+$as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
+   { (exit 1); exit 1; }; }
+  fi
+else
+  ac_cv_path_EGREP=$EGREP
 fi
 
+   fi
 fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
+$as_echo "$ac_cv_path_EGREP" >&6; }
+ EGREP="$ac_cv_path_EGREP"
 
 
-	if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
-	  { $as_echo "$as_me:$LINENO: checking if -liconv is needed to use gettext" >&5
-$as_echo_n "checking if -liconv is needed to use gettext... " >&6; }
-	  { $as_echo "$as_me:$LINENO: result: " >&5
-$as_echo "" >&6; }
-  	  { $as_echo "$as_me:$LINENO: checking for ngettext in -lintl" >&5
-$as_echo_n "checking for ngettext in -lintl... " >&6; }
-if test "${ac_cv_lib_intl_ngettext+set}" = set; then
+{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5
+$as_echo_n "checking for ANSI C header files... " >&6; }
+if test "${ac_cv_header_stdc+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lintl -liconv $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
+  cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char ngettext ();
 int
 main ()
 {
-return ngettext ();
+
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 $as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
@@ -6870,56 +6320,96 @@
   (exit $ac_status); } && {
 	 test -z "$ac_c_werror_flag" ||
 	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_intl_ngettext=yes
+       } && test -s conftest.$ac_objext; then
+  ac_cv_header_stdc=yes
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-	ac_cv_lib_intl_ngettext=no
+	ac_cv_header_stdc=no
 fi
 
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_intl_ngettext" >&5
-$as_echo "$ac_cv_lib_intl_ngettext" >&6; }
-if test "x$ac_cv_lib_intl_ngettext" = x""yes; then
-  { $as_echo "$as_me:$LINENO: checking for dcgettext in -lintl" >&5
-$as_echo_n "checking for dcgettext in -lintl... " >&6; }
-if test "${ac_cv_lib_intl_dcgettext+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lintl -liconv $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+  cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
+#include <string.h>
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "memchr" >/dev/null 2>&1; then
+  :
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "free" >/dev/null 2>&1; then
+  :
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+  if test "$cross_compiling" = yes; then
+  :
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ctype.h>
+#include <stdlib.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+		   (('a' <= (c) && (c) <= 'i') \
+		     || ('j' <= (c) && (c) <= 'r') \
+		     || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
 #endif
-char dcgettext ();
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
 int
 main ()
 {
-return dcgettext ();
-  ;
+  int i;
+  for (i = 0; i < 256; i++)
+    if (XOR (islower (i), ISLOWER (i))
+	|| toupper (i) != TOUPPER (i))
+      return 2;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
+rm -f conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -6927,432 +6417,334 @@
 esac
 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 $as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
+  (eval "$ac_link") 2>&5
   ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_intl_dcgettext=yes
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  :
 else
-  $as_echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-	ac_cv_lib_intl_dcgettext=no
+( exit $ac_status )
+ac_cv_header_stdc=no
 fi
-
 rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dcgettext" >&5
-$as_echo "$ac_cv_lib_intl_dcgettext" >&6; }
-if test "x$ac_cv_lib_intl_dcgettext" = x""yes; then
-  gt_cv_func_dgettext_libintl=yes
-			libintl_extra_libs=-liconv
-else
-  :
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
 
-else
-  :
+
+fi
 fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
+$as_echo "$ac_cv_header_stdc" >&6; }
+if test $ac_cv_header_stdc = yes; then
 
-        fi
+cat >>confdefs.h <<\_ACEOF
+#define STDC_HEADERS 1
+_ACEOF
 
-        #
-        # If we found libintl, then check in it for bind_textdomain_codeset();
-        # we'll prefer libc if neither have bind_textdomain_codeset(),
-        # and both have dgettext and ngettext
-        #
-        if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
-          glib_save_LIBS="$LIBS"
-          LIBS="$LIBS -lintl $libintl_extra_libs"
-          unset ac_cv_func_bind_textdomain_codeset
+fi
 
-for ac_func in bind_textdomain_codeset
-do
-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
-$as_echo_n "checking for $ac_func... " >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+{ $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
+$as_echo_n "checking how to run the C preprocessor... " >&6; }
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+  CPP=
+fi
+if test -z "$CPP"; then
+  if test "${ac_cv_prog_CPP+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
+      # Double quotes because CPP needs to be expanded
+    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+    do
+      ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
 #ifdef __STDC__
 # include <limits.h>
 #else
 # include <assert.h>
 #endif
+		     Syntax error
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  :
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-#undef $ac_func
+  # Broken: fails on valid input.
+continue
+fi
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined __stub_$ac_func || defined __stub___$ac_func
-choke me
-#endif
+rm -f conftest.err conftest.$ac_ext
 
-int
-main ()
-{
-return $ac_func ();
-  ;
-  return 0;
-}
+  # OK, works on sane cases.  Now check whether nonexistent headers
+  # can be detected and how.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 $as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
 	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
        }; then
-  eval "$as_ac_var=yes"
+  # Broken: success on invalid input.
+continue
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-	eval "$as_ac_var=no"
+  # Passes both tests.
+ac_preproc_ok=:
+break
 fi
 
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-ac_res=`eval 'as_val=${'$as_ac_var'}
-		 $as_echo "$as_val"'`
-	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-as_val=`eval 'as_val=${'$as_ac_var'}
-		 $as_echo "$as_val"'`
-   if test "x$as_val" = x""yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
+rm -f conftest.err conftest.$ac_ext
 
-fi
 done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+  break
+fi
 
-          LIBS="$glib_save_LIBS"
-
-          if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
-            gt_cv_func_dgettext_libc=no
-          else
-            if test "$gt_cv_func_dgettext_libc" = "yes" \
-		&& test "$gt_cv_func_ngettext_libc" = "yes"; then
-              gt_cv_func_dgettext_libintl=no
-            fi
-          fi
-        fi
-      fi
-
-      if test "$gt_cv_func_dgettext_libc" = "yes" \
-	|| test "$gt_cv_func_dgettext_libintl" = "yes"; then
-        gt_cv_have_gettext=yes
-      fi
-
-      if test "$gt_cv_func_dgettext_libintl" = "yes"; then
-        INTLLIBS="-lintl $libintl_extra_libs"
-      fi
-
-      if test "$gt_cv_have_gettext" = "yes"; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_GETTEXT 1
-_ACEOF
+    done
+    ac_cv_prog_CPP=$CPP
 
-	# Extract the first word of "msgfmt", so it can be a program name with args.
-set dummy msgfmt; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_MSGFMT+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  case "$MSGFMT" in
-  /*)
-  ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
-  ;;
-  *)
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-  for ac_dir in $PATH; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
-	ac_cv_path_MSGFMT="$ac_dir/$ac_word"
-	break
-      fi
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
-  ;;
-esac
 fi
-MSGFMT="$ac_cv_path_MSGFMT"
-if test "$MSGFMT" != "no"; then
-  { $as_echo "$as_me:$LINENO: result: $MSGFMT" >&5
-$as_echo "$MSGFMT" >&6; }
+  CPP=$ac_cv_prog_CPP
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+  ac_cv_prog_CPP=$CPP
 fi
-	if test "$MSGFMT" != "no"; then
-          glib_save_LIBS="$LIBS"
-          LIBS="$LIBS $INTLLIBS"
-
-for ac_func in dcgettext
+{ $as_echo "$as_me:$LINENO: result: $CPP" >&5
+$as_echo "$CPP" >&6; }
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
 do
-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
-$as_echo_n "checking for $ac_func... " >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-  $as_echo_n "(cached) " >&6
-else
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
 #ifdef __STDC__
 # include <limits.h>
 #else
 # include <assert.h>
 #endif
+		     Syntax error
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  :
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-#undef $ac_func
+  # Broken: fails on valid input.
+continue
+fi
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined __stub_$ac_func || defined __stub___$ac_func
-choke me
-#endif
+rm -f conftest.err conftest.$ac_ext
 
-int
-main ()
-{
-return $ac_func ();
-  ;
-  return 0;
-}
+  # OK, works on sane cases.  Now check whether nonexistent headers
+  # can be detected and how.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 $as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
 	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
        }; then
-  eval "$as_ac_var=yes"
+  # Broken: success on invalid input.
+continue
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-	eval "$as_ac_var=no"
+  # Passes both tests.
+ac_preproc_ok=:
+break
 fi
 
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+  :
+else
+  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }; }
 fi
-ac_res=`eval 'as_val=${'$as_ac_var'}
-		 $as_echo "$as_val"'`
-	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-as_val=`eval 'as_val=${'$as_ac_var'}
-		 $as_echo "$as_val"'`
-   if test "x$as_val" = x""yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
 
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+BINUTILS_REQUIRED=2.15.92
+LIBGRAPHVIZ_REQUIRED=1.0
+
+
+
+
+
+
+
+    # Check whether --enable-compile-warnings was given.
+if test "${enable_compile_warnings+set}" = set; then
+  enableval=$enable_compile_warnings;
+else
+  enable_compile_warnings="maximum"
 fi
-done
 
-	  MSGFMT_OPTS=
-	  { $as_echo "$as_me:$LINENO: checking if msgfmt accepts -c" >&5
-$as_echo_n "checking if msgfmt accepts -c... " >&6; }
-	  cat >conftest.foo <<_ACEOF
 
-msgid ""
-msgstr ""
-"Content-Type: text/plain; charset=UTF-8\n"
-"Project-Id-Version: test 1.0\n"
-"PO-Revision-Date: 2007-02-15 12:01+0100\n"
-"Last-Translator: test <foo bar xx>\n"
-"Language-Team: C <LL li org>\n"
-"MIME-Version: 1.0\n"
-"Content-Transfer-Encoding: 8bit\n"
+    warnCFLAGS=
+    if test "x$GCC" != xyes; then
+	enable_compile_warnings=no
+    fi
+
+    warning_flags=
+    realsave_CFLAGS="$CFLAGS"
 
-_ACEOF
-if { ($as_echo "$as_me:$LINENO: \$MSGFMT -c -o /dev/null conftest.foo") >&5
-  ($MSGFMT -c -o /dev/null conftest.foo) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-  MSGFMT_OPTS=-c; { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-else { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-echo "$as_me: failed input was:" >&5
-sed 's/^/| /' conftest.foo >&5
-fi
-
-	  # Extract the first word of "gmsgfmt", so it can be a program name with args.
-set dummy gmsgfmt; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_GMSGFMT+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  case $GMSGFMT in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_GMSGFMT="$GMSGFMT" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-  test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
-  ;;
-esac
-fi
-GMSGFMT=$ac_cv_path_GMSGFMT
-if test -n "$GMSGFMT"; then
-  { $as_echo "$as_me:$LINENO: result: $GMSGFMT" >&5
-$as_echo "$GMSGFMT" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-	  # Extract the first word of "xgettext", so it can be a program name with args.
-set dummy xgettext; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_XGETTEXT+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  case "$XGETTEXT" in
-  /*)
-  ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
-  ;;
-  *)
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-  for ac_dir in $PATH; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
-	ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
-	break
-      fi
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
-  ;;
-esac
-fi
-XGETTEXT="$ac_cv_path_XGETTEXT"
-if test "$XGETTEXT" != ":"; then
-  { $as_echo "$as_me:$LINENO: result: $XGETTEXT" >&5
-$as_echo "$XGETTEXT" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-	  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
+    case "$enable_compile_warnings" in
+    no)
+	warning_flags=
+	;;
+    minimum)
+	warning_flags="-Wall"
+	;;
+    yes)
+	warning_flags="-Wall -Wmissing-prototypes"
+	;;
+    maximum|error)
+	warning_flags="-Wall -Wmissing-prototypes -Wnested-externs -Wpointer-arith"
+	CFLAGS="$warning_flags $CFLAGS"
+	for option in -Wno-sign-compare; do
+		SAVE_CFLAGS="$CFLAGS"
+		CFLAGS="$CFLAGS $option"
+		{ $as_echo "$as_me:$LINENO: checking whether gcc understands $option" >&5
+$as_echo_n "checking whether gcc understands $option... " >&6; }
+		cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
@@ -7361,21 +6753,20 @@
 int
 main ()
 {
-extern int _nl_msg_cat_cntr;
-			 return _nl_msg_cat_cntr
+
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 $as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
@@ -7384,21 +6775,169 @@
   (exit $ac_status); } && {
 	 test -z "$ac_c_werror_flag" ||
 	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  CATOBJEXT=.gmo
-             DATADIRNAME=share
+       } && test -s conftest.$ac_objext; then
+  has_option=yes
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-	case $host in
-	    *-*-solaris*)
-	    	                	    	                { $as_echo "$as_me:$LINENO: checking for bind_textdomain_codeset" >&5
-$as_echo_n "checking for bind_textdomain_codeset... " >&6; }
-if test "${ac_cv_func_bind_textdomain_codeset+set}" = set; then
+	has_option=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+		CFLAGS="$SAVE_CFLAGS"
+		{ $as_echo "$as_me:$LINENO: result: $has_option" >&5
+$as_echo "$has_option" >&6; }
+		if test $has_option = yes; then
+		  warning_flags="$warning_flags $option"
+		fi
+		unset has_option
+		unset SAVE_CFLAGS
+	done
+	unset option
+	if test "$enable_compile_warnings" = "error" ; then
+	    warning_flags="$warning_flags -Werror"
+	fi
+	;;
+    *)
+	{ { $as_echo "$as_me:$LINENO: error: Unknown argument '$enable_compile_warnings' to --enable-compile-warnings" >&5
+$as_echo "$as_me: error: Unknown argument '$enable_compile_warnings' to --enable-compile-warnings" >&2;}
+   { (exit 1); exit 1; }; }
+	;;
+    esac
+    CFLAGS="$realsave_CFLAGS"
+    { $as_echo "$as_me:$LINENO: checking what warning flags to pass to the C compiler" >&5
+$as_echo_n "checking what warning flags to pass to the C compiler... " >&6; }
+    { $as_echo "$as_me:$LINENO: result: $warning_flags" >&5
+$as_echo "$warning_flags" >&6; }
+
+    # Check whether --enable-iso-c was given.
+if test "${enable_iso_c+set}" = set; then
+  enableval=$enable_iso_c;
+else
+  enable_iso_c=no
+fi
+
+
+    { $as_echo "$as_me:$LINENO: checking what language compliance flags to pass to the C compiler" >&5
+$as_echo_n "checking what language compliance flags to pass to the C compiler... " >&6; }
+    complCFLAGS=
+    if test "x$enable_iso_c" != "xno"; then
+	if test "x$GCC" = "xyes"; then
+	case " $CFLAGS " in
+	    *\ \	-ansi\ \	*) ;;
+	    *) complCFLAGS="$complCFLAGS -ansi" ;;
+	esac
+	case " $CFLAGS " in
+	    *\ \	-pedantic\ \	*) ;;
+	    *) complCFLAGS="$complCFLAGS -pedantic" ;;
+	esac
+	fi
+    fi
+    { $as_echo "$as_me:$LINENO: result: $complCFLAGS" >&5
+$as_echo "$complCFLAGS" >&6; }
+
+    WARN_CFLAGS="$warning_flags $complCFLAGS"
+
+
+
+  # Check whether --enable-cxx-warnings was given.
+if test "${enable_cxx_warnings+set}" = set; then
+  enableval=$enable_cxx_warnings;
+else
+  enable_cxx_warnings="yes"
+fi
+
+
+  { $as_echo "$as_me:$LINENO: checking what warning flags to pass to the C++ compiler" >&5
+$as_echo_n "checking what warning flags to pass to the C++ compiler... " >&6; }
+  warnCXXFLAGS=
+  if test "x$GXX" != xyes; then
+    enable_cxx_warnings=no
+  fi
+  if test "x$enable_cxx_warnings" != "xno"; then
+    if test "x$GXX" = "xyes"; then
+      case " $CXXFLAGS " in
+      *\ \	-Wall\ \	*) ;;
+      *) warnCXXFLAGS="-Wall -Wno-unused" ;;
+      esac
+
+      ## -W is not all that useful.  And it cannot be controlled
+      ## with individual -Wno-xxx flags, unlike -Wall
+      if test "x$enable_cxx_warnings" = "xyes"; then
+	warnCXXFLAGS="$warnCXXFLAGS -Wshadow -Woverloaded-virtual"
+      fi
+    fi
+  fi
+  { $as_echo "$as_me:$LINENO: result: $warnCXXFLAGS" >&5
+$as_echo "$warnCXXFLAGS" >&6; }
+
+   # Check whether --enable-iso-cxx was given.
+if test "${enable_iso_cxx+set}" = set; then
+  enableval=$enable_iso_cxx;
+else
+  enable_iso_cxx=no
+fi
+
+
+   { $as_echo "$as_me:$LINENO: checking what language compliance flags to pass to the C++ compiler" >&5
+$as_echo_n "checking what language compliance flags to pass to the C++ compiler... " >&6; }
+   complCXXFLAGS=
+   if test "x$enable_iso_cxx" != "xno"; then
+     if test "x$GXX" = "xyes"; then
+      case " $CXXFLAGS " in
+      *\ \	-ansi\ \	*) ;;
+      *) complCXXFLAGS="$complCXXFLAGS -ansi" ;;
+      esac
+
+      case " $CXXFLAGS " in
+      *\ \	-pedantic\ \	*) ;;
+      *) complCXXFLAGS="$complCXXFLAGS -pedantic" ;;
+      esac
+     fi
+   fi
+  { $as_echo "$as_me:$LINENO: result: $complCXXFLAGS" >&5
+$as_echo "$complCXXFLAGS" >&6; }
+
+  WARN_CXXFLAGS="$CXXFLAGS $warnCXXFLAGS $complCXXFLAGS"
+
+
+AM_CFLAGS="$AM_CFLAGS $WARN_CFLAGS"
+AM_CXXFLAGS="$AM_CXXFLAGS $WARN_CXXFLAGS"
+
+# Check whether --enable-debug was given.
+if test "${enable_debug+set}" = set; then
+  enableval=$enable_debug; AM_CFLAGS="$AM_CFLAGS -DDEBUG"
+  AM_CXXFLAGS="$AM_CXXFLAGS -DDEBUG"
+fi
+
+
+
+
+GETTEXT_PACKAGE=anjuta-extras
+
+
+cat >>confdefs.h <<_ACEOF
+#define GETTEXT_PACKAGE "$GETTEXT_PACKAGE"
+_ACEOF
+
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+
+
+
+
+
+
+
+
+
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+		  inttypes.h stdint.h unistd.h
+do
+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
   $as_echo_n "(cached) " >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
@@ -7407,54 +6946,19 @@
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-/* Define bind_textdomain_codeset to an innocuous variant, in case <limits.h> declares bind_textdomain_codeset.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define bind_textdomain_codeset innocuous_bind_textdomain_codeset
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char bind_textdomain_codeset (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef bind_textdomain_codeset
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char bind_textdomain_codeset ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined __stub_bind_textdomain_codeset || defined __stub___bind_textdomain_codeset
-choke me
-#endif
+$ac_includes_default
 
-int
-main ()
-{
-return bind_textdomain_codeset ();
-  ;
-  return 0;
-}
+#include <$ac_header>
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 $as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
@@ -7463,562 +6967,1280 @@
   (exit $ac_status); } && {
 	 test -z "$ac_c_werror_flag" ||
 	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_func_bind_textdomain_codeset=yes
+       } && test -s conftest.$ac_objext; then
+  eval "$as_ac_Header=yes"
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-	ac_cv_func_bind_textdomain_codeset=no
+	eval "$as_ac_Header=no"
 fi
 
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_bind_textdomain_codeset" >&5
-$as_echo "$ac_cv_func_bind_textdomain_codeset" >&6; }
-if test "x$ac_cv_func_bind_textdomain_codeset" = x""yes; then
-  CATOBJEXT=.gmo
-               DATADIRNAME=share
-else
-  CATOBJEXT=.mo
-               DATADIRNAME=lib
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-
-	    ;;
-	    *)
-	    CATOBJEXT=.mo
-            DATADIRNAME=lib
-	    ;;
-	    esac
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-          LIBS="$glib_save_LIBS"
-	  INSTOBJEXT=.mo
-	else
-	  gt_cv_have_gettext=no
-	fi
-      fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+		 $as_echo "$as_val"'`
+	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_Header'}
+		 $as_echo "$as_val"'`
+   if test "x$as_val" = x""yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
 
 fi
 
+done
 
 
-    if test "$gt_cv_have_gettext" = "yes" ; then
 
-cat >>confdefs.h <<\_ACEOF
-#define ENABLE_NLS 1
+
+for ac_header in locale.h
+do
+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  $as_echo_n "(cached) " >&6
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+		 $as_echo "$as_val"'`
+	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+else
+  # Is the header compilable?
+{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
+$as_echo_n "checking $ac_header usability... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
 _ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-    fi
+	ac_header_compiler=no
+fi
 
-        if test "$XGETTEXT" != ":"; then
-                  if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
-        : ;
-      else
-        { $as_echo "$as_me:$LINENO: result: found xgettext program is not GNU xgettext; ignore it" >&5
-$as_echo "found xgettext program is not GNU xgettext; ignore it" >&6; }
-        XGETTEXT=":"
-      fi
-    fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
 
-    # We need to process the po/ directory.
-    POSUB=po
+# Is the header present?
+{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
+$as_echo_n "checking $ac_header presence... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-    ac_config_commands="$ac_config_commands default-1"
+  ac_header_preproc=no
+fi
 
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
 
-                for lang in $ALL_LINGUAS; do
-      GMOFILES="$GMOFILES $lang.gmo"
-      POFILES="$POFILES $lang.po"
-    done
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
 
+    ;;
+esac
+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  $as_echo_n "(cached) " >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+		 $as_echo "$as_val"'`
+	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
 
+fi
+as_val=`eval 'as_val=${'$as_ac_Header'}
+		 $as_echo "$as_val"'`
+   if test "x$as_val" = x""yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
 
+fi
 
+done
 
+    if test $ac_cv_header_locale_h = yes; then
+    { $as_echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5
+$as_echo_n "checking for LC_MESSAGES... " >&6; }
+if test "${am_cv_val_LC_MESSAGES+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <locale.h>
+int
+main ()
+{
+return LC_MESSAGES
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  am_cv_val_LC_MESSAGES=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+	am_cv_val_LC_MESSAGES=no
+fi
 
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5
+$as_echo "$am_cv_val_LC_MESSAGES" >&6; }
+    if test $am_cv_val_LC_MESSAGES = yes; then
 
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LC_MESSAGES 1
+_ACEOF
 
+    fi
+  fi
+     USE_NLS=yes
 
 
+    gt_cv_have_gettext=no
 
+    CATOBJEXT=NONE
+    XGETTEXT=:
+    INTLLIBS=
 
-   if test "$gt_cv_have_gettext" = "yes"; then
-     if test "x$ALL_LINGUAS" = "x"; then
-       LINGUAS=
-     else
-       { $as_echo "$as_me:$LINENO: checking for catalogs to be installed" >&5
-$as_echo_n "checking for catalogs to be installed... " >&6; }
-       NEW_LINGUAS=
-       for presentlang in $ALL_LINGUAS; do
-         useit=no
-         if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
-           desiredlanguages="$LINGUAS"
-         else
-           desiredlanguages="$ALL_LINGUAS"
-         fi
-         for desiredlang in $desiredlanguages; do
- 	   # Use the presentlang catalog if desiredlang is
-           #   a. equal to presentlang, or
-           #   b. a variant of presentlang (because in this case,
-           #      presentlang can be used as a fallback for messages
-           #      which are not translated in the desiredlang catalog).
-           case "$desiredlang" in
-             "$presentlang"*) useit=yes;;
-           esac
-         done
-         if test $useit = yes; then
-           NEW_LINGUAS="$NEW_LINGUAS $presentlang"
-         fi
-       done
-       LINGUAS=$NEW_LINGUAS
-       { $as_echo "$as_me:$LINENO: result: $LINGUAS" >&5
-$as_echo "$LINGUAS" >&6; }
-     fi
+    if test "${ac_cv_header_libintl_h+set}" = set; then
+  { $as_echo "$as_me:$LINENO: checking for libintl.h" >&5
+$as_echo_n "checking for libintl.h... " >&6; }
+if test "${ac_cv_header_libintl_h+set}" = set; then
+  $as_echo_n "(cached) " >&6
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
+$as_echo "$ac_cv_header_libintl_h" >&6; }
+else
+  # Is the header compilable?
+{ $as_echo "$as_me:$LINENO: checking libintl.h usability" >&5
+$as_echo_n "checking libintl.h usability... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <libintl.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-          if test -n "$LINGUAS"; then
-       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
-     fi
-   fi
+	ac_header_compiler=no
+fi
 
-            MKINSTALLDIRS=
-   if test -n "$ac_aux_dir"; then
-     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
-   fi
-   if test -z "$MKINSTALLDIRS"; then
-     MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
-   fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
 
+# Is the header present?
+{ $as_echo "$as_me:$LINENO: checking libintl.h presence" >&5
+$as_echo_n "checking libintl.h presence... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <libintl.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-         test -d po || mkdir po
-   if test "x$srcdir" != "x."; then
-     if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
-       posrcprefix="$srcdir/"
-     else
-       posrcprefix="../$srcdir/"
-     fi
-   else
-     posrcprefix="../"
-   fi
-   rm -f po/POTFILES
-   sed -e "/^#/d" -e "/^\$/d" -e "s,.*,	$posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
-	< $srcdir/po/POTFILES.in > po/POTFILES
+  ac_header_preproc=no
+fi
 
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
 
-  { $as_echo "$as_me:$LINENO: checking whether NLS is requested" >&5
-$as_echo_n "checking whether NLS is requested... " >&6; }
-    # Check whether --enable-nls was given.
-if test "${enable_nls+set}" = set; then
-  enableval=$enable_nls; USE_NLS=$enableval
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { $as_echo "$as_me:$LINENO: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: libintl.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { $as_echo "$as_me:$LINENO: WARNING: libintl.h: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: libintl.h: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: libintl.h:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: libintl.h:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: libintl.h: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: libintl.h: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: libintl.h: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: libintl.h: in the future, the compiler will take precedence" >&2;}
+
+    ;;
+esac
+{ $as_echo "$as_me:$LINENO: checking for libintl.h" >&5
+$as_echo_n "checking for libintl.h... " >&6; }
+if test "${ac_cv_header_libintl_h+set}" = set; then
+  $as_echo_n "(cached) " >&6
 else
-  USE_NLS=yes
+  ac_cv_header_libintl_h=$ac_header_preproc
 fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
+$as_echo "$ac_cv_header_libintl_h" >&6; }
 
-  { $as_echo "$as_me:$LINENO: result: $USE_NLS" >&5
-$as_echo "$USE_NLS" >&6; }
-
+fi
+if test "x$ac_cv_header_libintl_h" = x""yes; then
+  gt_cv_func_dgettext_libintl="no"
+      libintl_extra_libs=""
 
+      #
+      # First check in libc
+      #
+      { $as_echo "$as_me:$LINENO: checking for ngettext in libc" >&5
+$as_echo_n "checking for ngettext in libc... " >&6; }
+if test "${gt_cv_func_ngettext_libc+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
+#include <libintl.h>
 
-case "$am__api_version" in
-    1.01234)
-	{ { $as_echo "$as_me:$LINENO: error: Automake 1.5 or newer is required to use intltool" >&5
-$as_echo "$as_me: error: Automake 1.5 or newer is required to use intltool" >&2;}
-   { (exit 1); exit 1; }; }
-    ;;
-    *)
-    ;;
+int
+main ()
+{
+return !ngettext ("","", 1)
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
 esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  gt_cv_func_ngettext_libc=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-if test -n "0.35.0"; then
-    { $as_echo "$as_me:$LINENO: checking for intltool >= 0.35.0" >&5
-$as_echo_n "checking for intltool >= 0.35.0... " >&6; }
+	gt_cv_func_ngettext_libc=no
+fi
 
-    INTLTOOL_REQUIRED_VERSION_AS_INT=`echo 0.35.0 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
-    INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
-    INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
 
-    { $as_echo "$as_me:$LINENO: result: $INTLTOOL_APPLIED_VERSION found" >&5
-$as_echo "$INTLTOOL_APPLIED_VERSION found" >&6; }
-    test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
-	{ { $as_echo "$as_me:$LINENO: error: Your intltool is too old.  You need intltool 0.35.0 or later." >&5
-$as_echo "$as_me: error: Your intltool is too old.  You need intltool 0.35.0 or later." >&2;}
-   { (exit 1); exit 1; }; }
 fi
+{ $as_echo "$as_me:$LINENO: result: $gt_cv_func_ngettext_libc" >&5
+$as_echo "$gt_cv_func_ngettext_libc" >&6; }
 
-# Extract the first word of "intltool-update", so it can be a program name with args.
-set dummy intltool-update; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_INTLTOOL_UPDATE+set}" = set; then
-  $as_echo_n "(cached) " >&6
+      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
+	      { $as_echo "$as_me:$LINENO: checking for dgettext in libc" >&5
+$as_echo_n "checking for dgettext in libc... " >&6; }
+if test "${gt_cv_func_dgettext_libc+set}" = set; then
+  $as_echo_n "(cached) " >&6
 else
-  case $INTLTOOL_UPDATE in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_INTLTOOL_UPDATE="$INTLTOOL_UPDATE" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_path_INTLTOOL_UPDATE="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
-  ;;
+#include <libintl.h>
+
+int
+main ()
+{
+return !dgettext ("","")
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
 esac
-fi
-INTLTOOL_UPDATE=$ac_cv_path_INTLTOOL_UPDATE
-if test -n "$INTLTOOL_UPDATE"; then
-  { $as_echo "$as_me:$LINENO: result: $INTLTOOL_UPDATE" >&5
-$as_echo "$INTLTOOL_UPDATE" >&6; }
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  gt_cv_func_dgettext_libc=yes
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+	gt_cv_func_dgettext_libc=no
+fi
 
-# Extract the first word of "intltool-merge", so it can be a program name with args.
-set dummy intltool-merge; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_INTLTOOL_MERGE+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  case $INTLTOOL_MERGE in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_INTLTOOL_MERGE="$INTLTOOL_MERGE" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_path_INTLTOOL_MERGE="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
 
-  ;;
-esac
-fi
-INTLTOOL_MERGE=$ac_cv_path_INTLTOOL_MERGE
-if test -n "$INTLTOOL_MERGE"; then
-  { $as_echo "$as_me:$LINENO: result: $INTLTOOL_MERGE" >&5
-$as_echo "$INTLTOOL_MERGE" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
 fi
+{ $as_echo "$as_me:$LINENO: result: $gt_cv_func_dgettext_libc" >&5
+$as_echo "$gt_cv_func_dgettext_libc" >&6; }
+      fi
 
+      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
 
-# Extract the first word of "intltool-extract", so it can be a program name with args.
-set dummy intltool-extract; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_INTLTOOL_EXTRACT+set}" = set; then
+for ac_func in bind_textdomain_codeset
+do
+as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+$as_echo_n "checking for $ac_func... " >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
   $as_echo_n "(cached) " >&6
 else
-  case $INTLTOOL_EXTRACT in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_INTLTOOL_EXTRACT="$INTLTOOL_EXTRACT" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_path_INTLTOOL_EXTRACT="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $ac_func innocuous_$ac_func
 
-  ;;
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
+
+int
+main ()
+{
+return $ac_func ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
 esac
-fi
-INTLTOOL_EXTRACT=$ac_cv_path_INTLTOOL_EXTRACT
-if test -n "$INTLTOOL_EXTRACT"; then
-  { $as_echo "$as_me:$LINENO: result: $INTLTOOL_EXTRACT" >&5
-$as_echo "$INTLTOOL_EXTRACT" >&6; }
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  eval "$as_ac_var=yes"
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	eval "$as_ac_var=no"
 fi
 
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+ac_res=`eval 'as_val=${'$as_ac_var'}
+		 $as_echo "$as_val"'`
+	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_var'}
+		 $as_echo "$as_val"'`
+   if test "x$as_val" = x""yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
 
-if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
-    { { $as_echo "$as_me:$LINENO: error: The intltool scripts were not found. Please install intltool." >&5
-$as_echo "$as_me: error: The intltool scripts were not found. Please install intltool." >&2;}
-   { (exit 1); exit 1; }; }
 fi
+done
 
-  INTLTOOL_DESKTOP_RULE='%.desktop:   %.desktop.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
-INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
-     INTLTOOL_KEYS_RULE='%.keys:      %.keys.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
-     INTLTOOL_PROP_RULE='%.prop:      %.prop.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
-      INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< $@'
-     INTLTOOL_PONG_RULE='%.pong:      %.pong.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
-   INTLTOOL_SERVER_RULE='%.server:    %.server.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
-    INTLTOOL_SHEET_RULE='%.sheet:     %.sheet.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
-INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
-       INTLTOOL_UI_RULE='%.ui:        %.ui.in        $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
-      INTLTOOL_XML_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
-      INTLTOOL_XML_NOMERGE_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< $@'
-      INTLTOOL_XAM_RULE='%.xam:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
-      INTLTOOL_KBD_RULE='%.kbd:       %.kbd.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
-    INTLTOOL_CAVES_RULE='%.caves:     %.caves.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
-  INTLTOOL_SCHEMAS_RULE='%.schemas:   %.schemas.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
-    INTLTOOL_THEME_RULE='%.theme:     %.theme.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
-    INTLTOOL_SERVICE_RULE='%.service: %.service.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
-   INTLTOOL_POLICY_RULE='%.policy:    %.policy.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+      fi
 
+      #
+      # If we don't have everything we want, check in libintl
+      #
+      if test "$gt_cv_func_dgettext_libc" != "yes" \
+	 || test "$gt_cv_func_ngettext_libc" != "yes" \
+         || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
 
+        { $as_echo "$as_me:$LINENO: checking for bindtextdomain in -lintl" >&5
+$as_echo_n "checking for bindtextdomain in -lintl... " >&6; }
+if test "${ac_cv_lib_intl_bindtextdomain+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lintl  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char bindtextdomain ();
+int
+main ()
+{
+return bindtextdomain ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  ac_cv_lib_intl_bindtextdomain=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+	ac_cv_lib_intl_bindtextdomain=no
+fi
 
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_intl_bindtextdomain" >&5
+$as_echo "$ac_cv_lib_intl_bindtextdomain" >&6; }
+if test "x$ac_cv_lib_intl_bindtextdomain" = x""yes; then
+  { $as_echo "$as_me:$LINENO: checking for ngettext in -lintl" >&5
+$as_echo_n "checking for ngettext in -lintl... " >&6; }
+if test "${ac_cv_lib_intl_ngettext+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lintl  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char ngettext ();
+int
+main ()
+{
+return ngettext ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  ac_cv_lib_intl_ngettext=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+	ac_cv_lib_intl_ngettext=no
+fi
 
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_intl_ngettext" >&5
+$as_echo "$ac_cv_lib_intl_ngettext" >&6; }
+if test "x$ac_cv_lib_intl_ngettext" = x""yes; then
+  { $as_echo "$as_me:$LINENO: checking for dgettext in -lintl" >&5
+$as_echo_n "checking for dgettext in -lintl... " >&6; }
+if test "${ac_cv_lib_intl_dgettext+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lintl  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dgettext ();
+int
+main ()
+{
+return dgettext ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  ac_cv_lib_intl_dgettext=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+	ac_cv_lib_intl_dgettext=no
+fi
 
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dgettext" >&5
+$as_echo "$ac_cv_lib_intl_dgettext" >&6; }
+if test "x$ac_cv_lib_intl_dgettext" = x""yes; then
+  gt_cv_func_dgettext_libintl=yes
+fi
 
+fi
 
+fi
 
 
+	if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
+	  { $as_echo "$as_me:$LINENO: checking if -liconv is needed to use gettext" >&5
+$as_echo_n "checking if -liconv is needed to use gettext... " >&6; }
+	  { $as_echo "$as_me:$LINENO: result: " >&5
+$as_echo "" >&6; }
+  	  { $as_echo "$as_me:$LINENO: checking for ngettext in -lintl" >&5
+$as_echo_n "checking for ngettext in -lintl... " >&6; }
+if test "${ac_cv_lib_intl_ngettext+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lintl -liconv $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char ngettext ();
+int
+main ()
+{
+return ngettext ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  ac_cv_lib_intl_ngettext=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+	ac_cv_lib_intl_ngettext=no
+fi
 
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_intl_ngettext" >&5
+$as_echo "$ac_cv_lib_intl_ngettext" >&6; }
+if test "x$ac_cv_lib_intl_ngettext" = x""yes; then
+  { $as_echo "$as_me:$LINENO: checking for dcgettext in -lintl" >&5
+$as_echo_n "checking for dcgettext in -lintl... " >&6; }
+if test "${ac_cv_lib_intl_dcgettext+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lintl -liconv $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dcgettext ();
+int
+main ()
+{
+return dcgettext ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  ac_cv_lib_intl_dcgettext=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+	ac_cv_lib_intl_dcgettext=no
+fi
 
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dcgettext" >&5
+$as_echo "$ac_cv_lib_intl_dcgettext" >&6; }
+if test "x$ac_cv_lib_intl_dcgettext" = x""yes; then
+  gt_cv_func_dgettext_libintl=yes
+			libintl_extra_libs=-liconv
+else
+  :
+fi
 
+else
+  :
+fi
 
+        fi
 
+        #
+        # If we found libintl, then check in it for bind_textdomain_codeset();
+        # we'll prefer libc if neither have bind_textdomain_codeset(),
+        # and both have dgettext and ngettext
+        #
+        if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
+          glib_save_LIBS="$LIBS"
+          LIBS="$LIBS -lintl $libintl_extra_libs"
+          unset ac_cv_func_bind_textdomain_codeset
 
+for ac_func in bind_textdomain_codeset
+do
+as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+$as_echo_n "checking for $ac_func... " >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $ac_func innocuous_$ac_func
 
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
 
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
 
+#undef $ac_func
 
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
 
+int
+main ()
+{
+return $ac_func ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  eval "$as_ac_var=yes"
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+	eval "$as_ac_var=no"
+fi
 
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+ac_res=`eval 'as_val=${'$as_ac_var'}
+		 $as_echo "$as_val"'`
+	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_var'}
+		 $as_echo "$as_val"'`
+   if test "x$as_val" = x""yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
 
+fi
+done
 
+          LIBS="$glib_save_LIBS"
 
+          if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
+            gt_cv_func_dgettext_libc=no
+          else
+            if test "$gt_cv_func_dgettext_libc" = "yes" \
+		&& test "$gt_cv_func_ngettext_libc" = "yes"; then
+              gt_cv_func_dgettext_libintl=no
+            fi
+          fi
+        fi
+      fi
 
+      if test "$gt_cv_func_dgettext_libc" = "yes" \
+	|| test "$gt_cv_func_dgettext_libintl" = "yes"; then
+        gt_cv_have_gettext=yes
+      fi
 
+      if test "$gt_cv_func_dgettext_libintl" = "yes"; then
+        INTLLIBS="-lintl $libintl_extra_libs"
+      fi
 
+      if test "$gt_cv_have_gettext" = "yes"; then
 
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_GETTEXT 1
+_ACEOF
 
-
-
-
-
-
-
-
-
-
-
-
-
-
-# Check the gettext tools to make sure they are GNU
-# Extract the first word of "xgettext", so it can be a program name with args.
-set dummy xgettext; ac_word=$2
+	# Extract the first word of "msgfmt", so it can be a program name with args.
+set dummy msgfmt; ac_word=$2
 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_XGETTEXT+set}" = set; then
+if test "${ac_cv_path_MSGFMT+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  case $XGETTEXT in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
+  case "$MSGFMT" in
+  /*)
+  ac_cv_path_MSGFMT="$MSGFMT" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_path_XGETTEXT="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+  for ac_dir in $PATH; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
+	ac_cv_path_MSGFMT="$ac_dir/$ac_word"
+	break
+      fi
+    fi
+  done
+  IFS="$ac_save_ifs"
+  test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
   ;;
 esac
 fi
-XGETTEXT=$ac_cv_path_XGETTEXT
-if test -n "$XGETTEXT"; then
-  { $as_echo "$as_me:$LINENO: result: $XGETTEXT" >&5
-$as_echo "$XGETTEXT" >&6; }
+MSGFMT="$ac_cv_path_MSGFMT"
+if test "$MSGFMT" != "no"; then
+  { $as_echo "$as_me:$LINENO: result: $MSGFMT" >&5
+$as_echo "$MSGFMT" >&6; }
 else
   { $as_echo "$as_me:$LINENO: result: no" >&5
 $as_echo "no" >&6; }
 fi
+	if test "$MSGFMT" != "no"; then
+          glib_save_LIBS="$LIBS"
+          LIBS="$LIBS $INTLLIBS"
 
-
-# Extract the first word of "msgmerge", so it can be a program name with args.
-set dummy msgmerge; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_MSGMERGE+set}" = set; then
+for ac_func in dcgettext
+do
+as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+$as_echo_n "checking for $ac_func... " >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
   $as_echo_n "(cached) " >&6
 else
-  case $MSGMERGE in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_MSGMERGE="$MSGMERGE" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_path_MSGMERGE="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $ac_func innocuous_$ac_func
 
-  ;;
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
+
+int
+main ()
+{
+return $ac_func ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
 esac
-fi
-MSGMERGE=$ac_cv_path_MSGMERGE
-if test -n "$MSGMERGE"; then
-  { $as_echo "$as_me:$LINENO: result: $MSGMERGE" >&5
-$as_echo "$MSGMERGE" >&6; }
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  eval "$as_ac_var=yes"
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	eval "$as_ac_var=no"
 fi
 
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+ac_res=`eval 'as_val=${'$as_ac_var'}
+		 $as_echo "$as_val"'`
+	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_var'}
+		 $as_echo "$as_val"'`
+   if test "x$as_val" = x""yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
 
-# Extract the first word of "msgfmt", so it can be a program name with args.
-set dummy msgfmt; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_MSGFMT+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  case $MSGFMT in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_MSGFMT="$MSGFMT" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_path_MSGFMT="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
+fi
 done
-IFS=$as_save_IFS
 
-  ;;
-esac
-fi
-MSGFMT=$ac_cv_path_MSGFMT
-if test -n "$MSGFMT"; then
-  { $as_echo "$as_me:$LINENO: result: $MSGFMT" >&5
-$as_echo "$MSGFMT" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
+	  MSGFMT_OPTS=
+	  { $as_echo "$as_me:$LINENO: checking if msgfmt accepts -c" >&5
+$as_echo_n "checking if msgfmt accepts -c... " >&6; }
+	  cat >conftest.foo <<_ACEOF
+
+msgid ""
+msgstr ""
+"Content-Type: text/plain; charset=UTF-8\n"
+"Project-Id-Version: test 1.0\n"
+"PO-Revision-Date: 2007-02-15 12:01+0100\n"
+"Last-Translator: test <foo bar xx>\n"
+"Language-Team: C <LL li org>\n"
+"MIME-Version: 1.0\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+_ACEOF
+if { ($as_echo "$as_me:$LINENO: \$MSGFMT -c -o /dev/null conftest.foo") >&5
+  ($MSGFMT -c -o /dev/null conftest.foo) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  MSGFMT_OPTS=-c; { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+else { $as_echo "$as_me:$LINENO: result: no" >&5
 $as_echo "no" >&6; }
+echo "$as_me: failed input was:" >&5
+sed 's/^/| /' conftest.foo >&5
 fi
 
-
-# Extract the first word of "gmsgfmt", so it can be a program name with args.
+	  # Extract the first word of "gmsgfmt", so it can be a program name with args.
 set dummy gmsgfmt; ac_word=$2
 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
@@ -8059,97 +8281,43 @@
 fi
 
 
-if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
-    { { $as_echo "$as_me:$LINENO: error: GNU gettext tools not found; required for intltool" >&5
-$as_echo "$as_me: error: GNU gettext tools not found; required for intltool" >&2;}
-   { (exit 1); exit 1; }; }
-fi
-xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
-mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
-mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
-if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
-    { { $as_echo "$as_me:$LINENO: error: GNU gettext tools not found; required for intltool" >&5
-$as_echo "$as_me: error: GNU gettext tools not found; required for intltool" >&2;}
-   { (exit 1); exit 1; }; }
-fi
-
-# Extract the first word of "perl", so it can be a program name with args.
-set dummy perl; ac_word=$2
+	  # Extract the first word of "xgettext", so it can be a program name with args.
+set dummy xgettext; ac_word=$2
 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_INTLTOOL_PERL+set}" = set; then
+if test "${ac_cv_path_XGETTEXT+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  case $INTLTOOL_PERL in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_INTLTOOL_PERL="$INTLTOOL_PERL" # Let the user override the test with a path.
+  case "$XGETTEXT" in
+  /*)
+  ac_cv_path_XGETTEXT="$XGETTEXT" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_path_INTLTOOL_PERL="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+  for ac_dir in $PATH; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
+	ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
+	break
+      fi
+    fi
+  done
+  IFS="$ac_save_ifs"
+  test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
   ;;
 esac
 fi
-INTLTOOL_PERL=$ac_cv_path_INTLTOOL_PERL
-if test -n "$INTLTOOL_PERL"; then
-  { $as_echo "$as_me:$LINENO: result: $INTLTOOL_PERL" >&5
-$as_echo "$INTLTOOL_PERL" >&6; }
+XGETTEXT="$ac_cv_path_XGETTEXT"
+if test "$XGETTEXT" != ":"; then
+  { $as_echo "$as_me:$LINENO: result: $XGETTEXT" >&5
+$as_echo "$XGETTEXT" >&6; }
 else
   { $as_echo "$as_me:$LINENO: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
-
-if test -z "$INTLTOOL_PERL"; then
-   { { $as_echo "$as_me:$LINENO: error: perl not found" >&5
-$as_echo "$as_me: error: perl not found" >&2;}
-   { (exit 1); exit 1; }; }
-fi
-{ $as_echo "$as_me:$LINENO: checking for perl >= 5.8.1" >&5
-$as_echo_n "checking for perl >= 5.8.1... " >&6; }
-$INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1
-if test $? -ne 0; then
-   { { $as_echo "$as_me:$LINENO: error: perl 5.8.1 is required for intltool" >&5
-$as_echo "$as_me: error: perl 5.8.1 is required for intltool" >&2;}
-   { (exit 1); exit 1; }; }
-else
-   IT_PERL_VERSION="`$INTLTOOL_PERL -e \"printf '%vd', $^V\"`"
-   { $as_echo "$as_me:$LINENO: result: $IT_PERL_VERSION" >&5
-$as_echo "$IT_PERL_VERSION" >&6; }
-fi
-if test "x" != "xno-xml"; then
-   { $as_echo "$as_me:$LINENO: checking for XML::Parser" >&5
-$as_echo_n "checking for XML::Parser... " >&6; }
-   if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
-       { $as_echo "$as_me:$LINENO: result: ok" >&5
-$as_echo "ok" >&6; }
-   else
-       { { $as_echo "$as_me:$LINENO: error: XML::Parser perl module is required for intltool" >&5
-$as_echo "$as_me: error: XML::Parser perl module is required for intltool" >&2;}
-   { (exit 1); exit 1; }; }
-   fi
-fi
-
-# Substitute ALL_LINGUAS so we can use it in po/Makefile
-
-
-# Set DATADIRNAME correctly if it is not set yet
-# (copied from glib-gettext.m4)
-if test -z "$DATADIRNAME"; then
-  cat >conftest.$ac_ext <<_ACEOF
+	  cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
@@ -8160,7 +8328,7 @@
 main ()
 {
 extern int _nl_msg_cat_cntr;
-                       return _nl_msg_cat_cntr
+			 return _nl_msg_cat_cntr
   ;
   return 0;
 }
@@ -8186,14 +8354,15 @@
 	 test "$cross_compiling" = yes ||
 	 $as_test_x conftest$ac_exeext
        }; then
-  DATADIRNAME=share
+  CATOBJEXT=.gmo
+             DATADIRNAME=share
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	case $host in
-    *-*-solaris*)
-                        { $as_echo "$as_me:$LINENO: checking for bind_textdomain_codeset" >&5
+	    *-*-solaris*)
+	    	                	    	                { $as_echo "$as_me:$LINENO: checking for bind_textdomain_codeset" >&5
 $as_echo_n "checking for bind_textdomain_codeset... " >&6; }
 if test "${ac_cv_func_bind_textdomain_codeset+set}" = set; then
   $as_echo_n "(cached) " >&6
@@ -8279,39 +8448,63 @@
 { $as_echo "$as_me:$LINENO: result: $ac_cv_func_bind_textdomain_codeset" >&5
 $as_echo "$ac_cv_func_bind_textdomain_codeset" >&6; }
 if test "x$ac_cv_func_bind_textdomain_codeset" = x""yes; then
-  DATADIRNAME=share
+  CATOBJEXT=.gmo
+               DATADIRNAME=share
 else
-  DATADIRNAME=lib
+  CATOBJEXT=.mo
+               DATADIRNAME=lib
 fi
 
-    ;;
-    *)
-    DATADIRNAME=lib
-    ;;
-    esac
+	    ;;
+	    *)
+	    CATOBJEXT=.mo
+            DATADIRNAME=lib
+	    ;;
+	    esac
 fi
 
 rm -rf conftest.dSYM
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
+          LIBS="$glib_save_LIBS"
+	  INSTOBJEXT=.mo
+	else
+	  gt_cv_have_gettext=no
+	fi
+      fi
+
 fi
 
 
 
+    if test "$gt_cv_have_gettext" = "yes" ; then
 
+cat >>confdefs.h <<\_ACEOF
+#define ENABLE_NLS 1
+_ACEOF
 
-case `pwd` in
-  *\ * | *\	*)
-    { $as_echo "$as_me:$LINENO: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
-$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
-esac
+    fi
 
+        if test "$XGETTEXT" != ":"; then
+                  if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
+        : ;
+      else
+        { $as_echo "$as_me:$LINENO: result: found xgettext program is not GNU xgettext; ignore it" >&5
+$as_echo "found xgettext program is not GNU xgettext; ignore it" >&6; }
+        XGETTEXT=":"
+      fi
+    fi
 
+    # We need to process the po/ directory.
+    POSUB=po
 
-macro_version='2.2.6'
-macro_revision='1.3012'
+    ac_config_commands="$ac_config_commands default-1"
 
 
+                for lang in $ALL_LINGUAS; do
+      GMOFILES="$GMOFILES $lang.gmo"
+      POFILES="$POFILES $lang.po"
+    done
 
 
 
@@ -8323,164 +8516,256 @@
 
 
 
-ltmain="$ac_aux_dir/ltmain.sh"
 
-# Make sure we can run config.sub.
-$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
-  { { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
-$as_echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
-   { (exit 1); exit 1; }; }
 
-{ $as_echo "$as_me:$LINENO: checking build system type" >&5
-$as_echo_n "checking build system type... " >&6; }
-if test "${ac_cv_build+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_build_alias=$build_alias
-test "x$ac_build_alias" = x &&
-  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
-test "x$ac_build_alias" = x &&
-  { { $as_echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
-$as_echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
-   { (exit 1); exit 1; }; }
-ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
-  { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
-$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
-   { (exit 1); exit 1; }; }
+   if test "$gt_cv_have_gettext" = "yes"; then
+     if test "x$ALL_LINGUAS" = "x"; then
+       LINGUAS=
+     else
+       { $as_echo "$as_me:$LINENO: checking for catalogs to be installed" >&5
+$as_echo_n "checking for catalogs to be installed... " >&6; }
+       NEW_LINGUAS=
+       for presentlang in $ALL_LINGUAS; do
+         useit=no
+         if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
+           desiredlanguages="$LINGUAS"
+         else
+           desiredlanguages="$ALL_LINGUAS"
+         fi
+         for desiredlang in $desiredlanguages; do
+ 	   # Use the presentlang catalog if desiredlang is
+           #   a. equal to presentlang, or
+           #   b. a variant of presentlang (because in this case,
+           #      presentlang can be used as a fallback for messages
+           #      which are not translated in the desiredlang catalog).
+           case "$desiredlang" in
+             "$presentlang"*) useit=yes;;
+           esac
+         done
+         if test $useit = yes; then
+           NEW_LINGUAS="$NEW_LINGUAS $presentlang"
+         fi
+       done
+       LINGUAS=$NEW_LINGUAS
+       { $as_echo "$as_me:$LINENO: result: $LINGUAS" >&5
+$as_echo "$LINGUAS" >&6; }
+     fi
 
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_build" >&5
-$as_echo "$ac_cv_build" >&6; }
-case $ac_cv_build in
-*-*-*) ;;
-*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
-$as_echo "$as_me: error: invalid value of canonical build" >&2;}
-   { (exit 1); exit 1; }; };;
-esac
-build=$ac_cv_build
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_build
-shift
-build_cpu=$1
-build_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-build_os=$*
-IFS=$ac_save_IFS
-case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
+          if test -n "$LINGUAS"; then
+       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
+     fi
+   fi
 
+            MKINSTALLDIRS=
+   if test -n "$ac_aux_dir"; then
+     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
+   fi
+   if test -z "$MKINSTALLDIRS"; then
+     MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
+   fi
 
-{ $as_echo "$as_me:$LINENO: checking host system type" >&5
-$as_echo_n "checking host system type... " >&6; }
-if test "${ac_cv_host+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test "x$host_alias" = x; then
-  ac_cv_host=$ac_cv_build
-else
-  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
-    { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
-$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
-   { (exit 1); exit 1; }; }
-fi
 
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5
-$as_echo "$ac_cv_host" >&6; }
-case $ac_cv_host in
-*-*-*) ;;
-*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
-$as_echo "$as_me: error: invalid value of canonical host" >&2;}
-   { (exit 1); exit 1; }; };;
+         test -d po || mkdir po
+   if test "x$srcdir" != "x."; then
+     if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
+       posrcprefix="$srcdir/"
+     else
+       posrcprefix="../$srcdir/"
+     fi
+   else
+     posrcprefix="../"
+   fi
+   rm -f po/POTFILES
+   sed -e "/^#/d" -e "/^\$/d" -e "s,.*,	$posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
+	< $srcdir/po/POTFILES.in > po/POTFILES
+
+
+  { $as_echo "$as_me:$LINENO: checking whether NLS is requested" >&5
+$as_echo_n "checking whether NLS is requested... " >&6; }
+    # Check whether --enable-nls was given.
+if test "${enable_nls+set}" = set; then
+  enableval=$enable_nls; USE_NLS=$enableval
+else
+  USE_NLS=yes
+fi
+
+  { $as_echo "$as_me:$LINENO: result: $USE_NLS" >&5
+$as_echo "$USE_NLS" >&6; }
+
+
+
+
+case "$am__api_version" in
+    1.01234)
+	{ { $as_echo "$as_me:$LINENO: error: Automake 1.5 or newer is required to use intltool" >&5
+$as_echo "$as_me: error: Automake 1.5 or newer is required to use intltool" >&2;}
+   { (exit 1); exit 1; }; }
+    ;;
+    *)
+    ;;
 esac
-host=$ac_cv_host
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_host
-shift
-host_cpu=$1
-host_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-host_os=$*
-IFS=$ac_save_IFS
-case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
 
+if test -n "0.35.0"; then
+    { $as_echo "$as_me:$LINENO: checking for intltool >= 0.35.0" >&5
+$as_echo_n "checking for intltool >= 0.35.0... " >&6; }
 
-{ $as_echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5
-$as_echo_n "checking for a sed that does not truncate output... " >&6; }
-if test "${ac_cv_path_SED+set}" = set; then
+    INTLTOOL_REQUIRED_VERSION_AS_INT=`echo 0.35.0 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
+    INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
+    INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
+
+    { $as_echo "$as_me:$LINENO: result: $INTLTOOL_APPLIED_VERSION found" >&5
+$as_echo "$INTLTOOL_APPLIED_VERSION found" >&6; }
+    test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
+	{ { $as_echo "$as_me:$LINENO: error: Your intltool is too old.  You need intltool 0.35.0 or later." >&5
+$as_echo "$as_me: error: Your intltool is too old.  You need intltool 0.35.0 or later." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+# Extract the first word of "intltool-update", so it can be a program name with args.
+set dummy intltool-update; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_INTLTOOL_UPDATE+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
-     for ac_i in 1 2 3 4 5 6 7; do
-       ac_script="$ac_script$as_nl$ac_script"
-     done
-     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
-     $as_unset ac_script || ac_script=
-     if test -z "$SED"; then
-  ac_path_SED_found=false
-  # Loop through the user's path and test for each of PROGNAME-LIST
+  case $INTLTOOL_UPDATE in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_INTLTOOL_UPDATE="$INTLTOOL_UPDATE" # 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_prog in sed gsed; do
-    for ac_exec_ext in '' $ac_executable_extensions; do
-      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
-      { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
-# Check for GNU ac_path_SED and select it if it is found.
-  # Check for GNU $ac_path_SED
-case `"$ac_path_SED" --version 2>&1` in
-*GNU*)
-  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
-*)
-  ac_count=0
-  $as_echo_n 0123456789 >"conftest.in"
-  while :
-  do
-    cat "conftest.in" "conftest.in" >"conftest.tmp"
-    mv "conftest.tmp" "conftest.in"
-    cp "conftest.in" "conftest.nl"
-    $as_echo '' >> "conftest.nl"
-    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
-    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
-    ac_count=`expr $ac_count + 1`
-    if test $ac_count -gt ${ac_path_SED_max-0}; then
-      # Best one so far, save it but keep looking for a better one
-      ac_cv_path_SED="$ac_path_SED"
-      ac_path_SED_max=$ac_count
-    fi
-    # 10*(2^10) chars as input seems more than enough
-    test $ac_count -gt 10 && break
-  done
-  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_INTLTOOL_UPDATE="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+  ;;
 esac
+fi
+INTLTOOL_UPDATE=$ac_cv_path_INTLTOOL_UPDATE
+if test -n "$INTLTOOL_UPDATE"; then
+  { $as_echo "$as_me:$LINENO: result: $INTLTOOL_UPDATE" >&5
+$as_echo "$INTLTOOL_UPDATE" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
 
-      $ac_path_SED_found && break 3
-    done
-  done
+
+# Extract the first word of "intltool-merge", so it can be a program name with args.
+set dummy intltool-merge; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_INTLTOOL_MERGE+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  case $INTLTOOL_MERGE in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_INTLTOOL_MERGE="$INTLTOOL_MERGE" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_INTLTOOL_MERGE="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
 done
 IFS=$as_save_IFS
-  if test -z "$ac_cv_path_SED"; then
-    { { $as_echo "$as_me:$LINENO: error: no acceptable sed could be found in \$PATH" >&5
-$as_echo "$as_me: error: no acceptable sed could be found in \$PATH" >&2;}
-   { (exit 1); exit 1; }; }
+
+  ;;
+esac
+fi
+INTLTOOL_MERGE=$ac_cv_path_INTLTOOL_MERGE
+if test -n "$INTLTOOL_MERGE"; then
+  { $as_echo "$as_me:$LINENO: result: $INTLTOOL_MERGE" >&5
+$as_echo "$INTLTOOL_MERGE" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+# Extract the first word of "intltool-extract", so it can be a program name with args.
+set dummy intltool-extract; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_INTLTOOL_EXTRACT+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  case $INTLTOOL_EXTRACT in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_INTLTOOL_EXTRACT="$INTLTOOL_EXTRACT" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_INTLTOOL_EXTRACT="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
   fi
+done
+done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+INTLTOOL_EXTRACT=$ac_cv_path_INTLTOOL_EXTRACT
+if test -n "$INTLTOOL_EXTRACT"; then
+  { $as_echo "$as_me:$LINENO: result: $INTLTOOL_EXTRACT" >&5
+$as_echo "$INTLTOOL_EXTRACT" >&6; }
 else
-  ac_cv_path_SED=$SED
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
+
+if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
+    { { $as_echo "$as_me:$LINENO: error: The intltool scripts were not found. Please install intltool." >&5
+$as_echo "$as_me: error: The intltool scripts were not found. Please install intltool." >&2;}
+   { (exit 1); exit 1; }; }
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_SED" >&5
-$as_echo "$ac_cv_path_SED" >&6; }
- SED="$ac_cv_path_SED"
-  rm -f conftest.sed
 
-test -z "$SED" && SED=sed
-Xsed="$SED -e 1s/^X//"
+  INTLTOOL_DESKTOP_RULE='%.desktop:   %.desktop.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+     INTLTOOL_KEYS_RULE='%.keys:      %.keys.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+     INTLTOOL_PROP_RULE='%.prop:      %.prop.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+      INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< $@'
+     INTLTOOL_PONG_RULE='%.pong:      %.pong.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+   INTLTOOL_SERVER_RULE='%.server:    %.server.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+    INTLTOOL_SHEET_RULE='%.sheet:     %.sheet.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+       INTLTOOL_UI_RULE='%.ui:        %.ui.in        $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+      INTLTOOL_XML_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+      INTLTOOL_XML_NOMERGE_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< $@'
+      INTLTOOL_XAM_RULE='%.xam:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+      INTLTOOL_KBD_RULE='%.kbd:       %.kbd.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+    INTLTOOL_CAVES_RULE='%.caves:     %.caves.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+  INTLTOOL_SCHEMAS_RULE='%.schemas:   %.schemas.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+    INTLTOOL_THEME_RULE='%.theme:     %.theme.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+    INTLTOOL_SERVICE_RULE='%.service: %.service.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+   INTLTOOL_POLICY_RULE='%.policy:    %.policy.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
 
 
 
@@ -8492,76 +8777,10 @@
 
 
 
-{ $as_echo "$as_me:$LINENO: checking for fgrep" >&5
-$as_echo_n "checking for fgrep... " >&6; }
-if test "${ac_cv_path_FGREP+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
-   then ac_cv_path_FGREP="$GREP -F"
-   else
-     if test -z "$FGREP"; then
-  ac_path_FGREP_found=false
-  # Loop through the user's path and test for each of PROGNAME-LIST
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_prog in fgrep; do
-    for ac_exec_ext in '' $ac_executable_extensions; do
-      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
-      { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
-# Check for GNU ac_path_FGREP and select it if it is found.
-  # Check for GNU $ac_path_FGREP
-case `"$ac_path_FGREP" --version 2>&1` in
-*GNU*)
-  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
-*)
-  ac_count=0
-  $as_echo_n 0123456789 >"conftest.in"
-  while :
-  do
-    cat "conftest.in" "conftest.in" >"conftest.tmp"
-    mv "conftest.tmp" "conftest.in"
-    cp "conftest.in" "conftest.nl"
-    $as_echo 'FGREP' >> "conftest.nl"
-    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
-    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
-    ac_count=`expr $ac_count + 1`
-    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
-      # Best one so far, save it but keep looking for a better one
-      ac_cv_path_FGREP="$ac_path_FGREP"
-      ac_path_FGREP_max=$ac_count
-    fi
-    # 10*(2^10) chars as input seems more than enough
-    test $ac_count -gt 10 && break
-  done
-  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
 
-      $ac_path_FGREP_found && break 3
-    done
-  done
-done
-IFS=$as_save_IFS
-  if test -z "$ac_cv_path_FGREP"; then
-    { { $as_echo "$as_me:$LINENO: error: no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
-$as_echo "$as_me: error: no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
-   { (exit 1); exit 1; }; }
-  fi
-else
-  ac_cv_path_FGREP=$FGREP
-fi
 
-   fi
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_FGREP" >&5
-$as_echo "$ac_cv_path_FGREP" >&6; }
- FGREP="$ac_cv_path_FGREP"
 
 
-test -z "$GREP" && GREP=grep
 
 
 
@@ -8581,110 +8800,8 @@
 
 
 
-# Check whether --with-gnu-ld was given.
-if test "${with_gnu_ld+set}" = set; then
-  withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
-else
-  with_gnu_ld=no
-fi
 
-ac_prog=ld
-if test "$GCC" = yes; then
-  # Check if gcc -print-prog-name=ld gives a path.
-  { $as_echo "$as_me:$LINENO: checking for ld used by $CC" >&5
-$as_echo_n "checking for ld used by $CC... " >&6; }
-  case $host in
-  *-*-mingw*)
-    # gcc leaves a trailing carriage return which upsets mingw
-    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
-  *)
-    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
-  esac
-  case $ac_prog in
-    # Accept absolute paths.
-    [\\/]* | ?:[\\/]*)
-      re_direlt='/[^/][^/]*/\.\./'
-      # Canonicalize the pathname of ld
-      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
-      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
-	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
-      done
-      test -z "$LD" && LD="$ac_prog"
-      ;;
-  "")
-    # If it fails, then pretend we aren't using GCC.
-    ac_prog=ld
-    ;;
-  *)
-    # If it is relative, then search for the first ld in PATH.
-    with_gnu_ld=unknown
-    ;;
-  esac
-elif test "$with_gnu_ld" = yes; then
-  { $as_echo "$as_me:$LINENO: checking for GNU ld" >&5
-$as_echo_n "checking for GNU ld... " >&6; }
-else
-  { $as_echo "$as_me:$LINENO: checking for non-GNU ld" >&5
-$as_echo_n "checking for non-GNU ld... " >&6; }
-fi
-if test "${lt_cv_path_LD+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test -z "$LD"; then
-  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-  for ac_dir in $PATH; do
-    IFS="$lt_save_ifs"
-    test -z "$ac_dir" && ac_dir=.
-    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
-      lt_cv_path_LD="$ac_dir/$ac_prog"
-      # Check to see if the program is GNU ld.  I'd rather use --version,
-      # but apparently some variants of GNU ld only accept -v.
-      # Break only if it was the GNU/non-GNU ld that we prefer.
-      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
-      *GNU* | *'with BFD'*)
-	test "$with_gnu_ld" != no && break
-	;;
-      *)
-	test "$with_gnu_ld" != yes && break
-	;;
-      esac
-    fi
-  done
-  IFS="$lt_save_ifs"
-else
-  lt_cv_path_LD="$LD" # Let the user override the test with a path.
-fi
-fi
 
-LD="$lt_cv_path_LD"
-if test -n "$LD"; then
-  { $as_echo "$as_me:$LINENO: result: $LD" >&5
-$as_echo "$LD" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-test -z "$LD" && { { $as_echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
-$as_echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
-   { (exit 1); exit 1; }; }
-{ $as_echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
-$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
-if test "${lt_cv_prog_gnu_ld+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  # I'd rather use --version here, but apparently some GNU lds only accept -v.
-case `$LD -v 2>&1 </dev/null` in
-*GNU* | *'with BFD'*)
-  lt_cv_prog_gnu_ld=yes
-  ;;
-*)
-  lt_cv_prog_gnu_ld=no
-  ;;
-esac
-fi
-{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
-$as_echo "$lt_cv_prog_gnu_ld" >&6; }
-with_gnu_ld=$lt_cv_prog_gnu_ld
 
 
 
@@ -8694,82 +8811,119 @@
 
 
 
-{ $as_echo "$as_me:$LINENO: checking for BSD- or MS-compatible name lister (nm)" >&5
-$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
-if test "${lt_cv_path_NM+set}" = set; then
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# Check the gettext tools to make sure they are GNU
+# Extract the first word of "xgettext", so it can be a program name with args.
+set dummy xgettext; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_XGETTEXT+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  if test -n "$NM"; then
-  # Let the user override the test.
-  lt_cv_path_NM="$NM"
-else
-  lt_nm_to_check="${ac_tool_prefix}nm"
-  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
-    lt_nm_to_check="$lt_nm_to_check nm"
+  case $XGETTEXT in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_XGETTEXT="$XGETTEXT" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_XGETTEXT="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
   fi
-  for lt_tmp_nm in $lt_nm_to_check; do
-    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
-      IFS="$lt_save_ifs"
-      test -z "$ac_dir" && ac_dir=.
-      tmp_nm="$ac_dir/$lt_tmp_nm"
-      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
-	# Check to see if the nm accepts a BSD-compat flag.
-	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
-	#   nm: unknown option "B" ignored
-	# Tru64's nm complains that /dev/null is an invalid object file
-	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
-	*/dev/null* | *'Invalid file or object type'*)
-	  lt_cv_path_NM="$tmp_nm -B"
-	  break
-	  ;;
-	*)
-	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
-	  */dev/null*)
-	    lt_cv_path_NM="$tmp_nm -p"
-	    break
-	    ;;
-	  *)
-	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
-	    continue # so that we can try to find one that supports BSD flags
-	    ;;
-	  esac
-	  ;;
-	esac
-      fi
-    done
-    IFS="$lt_save_ifs"
-  done
-  : ${lt_cv_path_NM=no}
-fi
+done
+done
+IFS=$as_save_IFS
+
+  ;;
+esac
 fi
-{ $as_echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5
-$as_echo "$lt_cv_path_NM" >&6; }
-if test "$lt_cv_path_NM" != "no"; then
-  NM="$lt_cv_path_NM"
+XGETTEXT=$ac_cv_path_XGETTEXT
+if test -n "$XGETTEXT"; then
+  { $as_echo "$as_me:$LINENO: result: $XGETTEXT" >&5
+$as_echo "$XGETTEXT" >&6; }
 else
-  # Didn't find any BSD compatible name lister, look for dumpbin.
-  if test -n "$ac_tool_prefix"; then
-  for ac_prog in "dumpbin -symbols" "link -dump -symbols"
-  do
-    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
-set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+# Extract the first word of "msgmerge", so it can be a program name with args.
+set dummy msgmerge; ac_word=$2
 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_DUMPBIN+set}" = set; then
+if test "${ac_cv_path_MSGMERGE+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  if test -n "$DUMPBIN"; then
-  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+  case $MSGMERGE in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_MSGMERGE="$MSGMERGE" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
+    ac_cv_path_MSGMERGE="$as_dir/$ac_word$ac_exec_ext"
     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
@@ -8777,43 +8931,39 @@
 done
 IFS=$as_save_IFS
 
+  ;;
+esac
 fi
-fi
-DUMPBIN=$ac_cv_prog_DUMPBIN
-if test -n "$DUMPBIN"; then
-  { $as_echo "$as_me:$LINENO: result: $DUMPBIN" >&5
-$as_echo "$DUMPBIN" >&6; }
+MSGMERGE=$ac_cv_path_MSGMERGE
+if test -n "$MSGMERGE"; then
+  { $as_echo "$as_me:$LINENO: result: $MSGMERGE" >&5
+$as_echo "$MSGMERGE" >&6; }
 else
   { $as_echo "$as_me:$LINENO: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
 
-    test -n "$DUMPBIN" && break
-  done
-fi
-if test -z "$DUMPBIN"; then
-  ac_ct_DUMPBIN=$DUMPBIN
-  for ac_prog in "dumpbin -symbols" "link -dump -symbols"
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
+# Extract the first word of "msgfmt", so it can be a program name with args.
+set dummy msgfmt; ac_word=$2
 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then
+if test "${ac_cv_path_MSGFMT+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  if test -n "$ac_ct_DUMPBIN"; then
-  ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+  case $MSGFMT in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_MSGFMT="$MSGFMT" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
+    ac_cv_path_MSGFMT="$as_dir/$ac_word$ac_exec_ext"
     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
@@ -8821,611 +8971,482 @@
 done
 IFS=$as_save_IFS
 
+  ;;
+esac
 fi
-fi
-ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
-if test -n "$ac_ct_DUMPBIN"; then
-  { $as_echo "$as_me:$LINENO: result: $ac_ct_DUMPBIN" >&5
-$as_echo "$ac_ct_DUMPBIN" >&6; }
+MSGFMT=$ac_cv_path_MSGFMT
+if test -n "$MSGFMT"; then
+  { $as_echo "$as_me:$LINENO: result: $MSGFMT" >&5
+$as_echo "$MSGFMT" >&6; }
 else
   { $as_echo "$as_me:$LINENO: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
 
-  test -n "$ac_ct_DUMPBIN" && break
+# Extract the first word of "gmsgfmt", so it can be a program name with args.
+set dummy gmsgfmt; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_GMSGFMT+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  case $GMSGFMT in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_GMSGFMT="$GMSGFMT" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
 done
+IFS=$as_save_IFS
 
-  if test "x$ac_ct_DUMPBIN" = x; then
-    DUMPBIN=":"
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
+  test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
+  ;;
 esac
-    DUMPBIN=$ac_ct_DUMPBIN
-  fi
 fi
-
-
-  if test "$DUMPBIN" != ":"; then
-    NM="$DUMPBIN"
-  fi
+GMSGFMT=$ac_cv_path_GMSGFMT
+if test -n "$GMSGFMT"; then
+  { $as_echo "$as_me:$LINENO: result: $GMSGFMT" >&5
+$as_echo "$GMSGFMT" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 fi
-test -z "$NM" && NM=nm
-
-
-
 
 
+if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
+    { { $as_echo "$as_me:$LINENO: error: GNU gettext tools not found; required for intltool" >&5
+$as_echo "$as_me: error: GNU gettext tools not found; required for intltool" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
+mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
+mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
+if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
+    { { $as_echo "$as_me:$LINENO: error: GNU gettext tools not found; required for intltool" >&5
+$as_echo "$as_me: error: GNU gettext tools not found; required for intltool" >&2;}
+   { (exit 1); exit 1; }; }
+fi
 
-{ $as_echo "$as_me:$LINENO: checking the name lister ($NM) interface" >&5
-$as_echo_n "checking the name lister ($NM) interface... " >&6; }
-if test "${lt_cv_nm_interface+set}" = set; then
+# Extract the first word of "perl", so it can be a program name with args.
+set dummy perl; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_INTLTOOL_PERL+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  lt_cv_nm_interface="BSD nm"
-  echo "int some_variable = 0;" > conftest.$ac_ext
-  (eval echo "\"\$as_me:8871: $ac_compile\"" >&5)
-  (eval "$ac_compile" 2>conftest.err)
-  cat conftest.err >&5
-  (eval echo "\"\$as_me:8874: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
-  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
-  cat conftest.err >&5
-  (eval echo "\"\$as_me:8877: output\"" >&5)
-  cat conftest.out >&5
-  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
-    lt_cv_nm_interface="MS dumpbin"
+  case $INTLTOOL_PERL in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_INTLTOOL_PERL="$INTLTOOL_PERL" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_INTLTOOL_PERL="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
   fi
-  rm -f conftest*
-fi
-{ $as_echo "$as_me:$LINENO: result: $lt_cv_nm_interface" >&5
-$as_echo "$lt_cv_nm_interface" >&6; }
+done
+done
+IFS=$as_save_IFS
 
-{ $as_echo "$as_me:$LINENO: checking whether ln -s works" >&5
-$as_echo_n "checking whether ln -s works... " >&6; }
-LN_S=$as_ln_s
-if test "$LN_S" = "ln -s"; then
-  { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
+  ;;
+esac
+fi
+INTLTOOL_PERL=$ac_cv_path_INTLTOOL_PERL
+if test -n "$INTLTOOL_PERL"; then
+  { $as_echo "$as_me:$LINENO: result: $INTLTOOL_PERL" >&5
+$as_echo "$INTLTOOL_PERL" >&6; }
 else
-  { $as_echo "$as_me:$LINENO: result: no, using $LN_S" >&5
-$as_echo "no, using $LN_S" >&6; }
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
-# find the maximum length of command line arguments
-{ $as_echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5
-$as_echo_n "checking the maximum length of command line arguments... " >&6; }
-if test "${lt_cv_sys_max_cmd_len+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-    i=0
-  teststring="ABCD"
-
-  case $build_os in
-  msdosdjgpp*)
-    # On DJGPP, this test can blow up pretty badly due to problems in libc
-    # (any single argument exceeding 2000 bytes causes a buffer overrun
-    # during glob expansion).  Even if it were fixed, the result of this
-    # check would be larger than it should be.
-    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
-    ;;
-
-  gnu*)
-    # Under GNU Hurd, this test is not required because there is
-    # no limit to the length of command line arguments.
-    # Libtool will interpret -1 as no limit whatsoever
-    lt_cv_sys_max_cmd_len=-1;
-    ;;
-
-  cygwin* | mingw* | cegcc*)
-    # On Win9x/ME, this test blows up -- it succeeds, but takes
-    # about 5 minutes as the teststring grows exponentially.
-    # Worse, since 9x/ME are not pre-emptively multitasking,
-    # you end up with a "frozen" computer, even though with patience
-    # the test eventually succeeds (with a max line length of 256k).
-    # Instead, let's just punt: use the minimum linelength reported by
-    # all of the supported platforms: 8192 (on NT/2K/XP).
-    lt_cv_sys_max_cmd_len=8192;
-    ;;
-
-  amigaos*)
-    # On AmigaOS with pdksh, this test takes hours, literally.
-    # So we just punt and use a minimum line length of 8192.
-    lt_cv_sys_max_cmd_len=8192;
-    ;;
-
-  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
-    # This has been around since 386BSD, at least.  Likely further.
-    if test -x /sbin/sysctl; then
-      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
-    elif test -x /usr/sbin/sysctl; then
-      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
-    else
-      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
-    fi
-    # And add a safety zone
-    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
-    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
-    ;;
-
-  interix*)
-    # We know the value 262144 and hardcode it with a safety zone (like BSD)
-    lt_cv_sys_max_cmd_len=196608
-    ;;
-
-  osf*)
-    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
-    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
-    # nice to cause kernel panics so lets avoid the loop below.
-    # First set a reasonable default.
-    lt_cv_sys_max_cmd_len=16384
-    #
-    if test -x /sbin/sysconfig; then
-      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
-        *1*) lt_cv_sys_max_cmd_len=-1 ;;
-      esac
-    fi
-    ;;
-  sco3.2v5*)
-    lt_cv_sys_max_cmd_len=102400
-    ;;
-  sysv5* | sco5v6* | sysv4.2uw2*)
-    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
-    if test -n "$kargmax"; then
-      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[	 ]//'`
-    else
-      lt_cv_sys_max_cmd_len=32768
-    fi
-    ;;
-  *)
-    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
-    if test -n "$lt_cv_sys_max_cmd_len"; then
-      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
-      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
-    else
-      # Make teststring a little bigger before we do anything with it.
-      # a 1K string should be a reasonable start.
-      for i in 1 2 3 4 5 6 7 8 ; do
-        teststring=$teststring$teststring
-      done
-      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
-      # If test is not a shell built-in, we'll probably end up computing a
-      # maximum length that is only half of the actual maximum length, but
-      # we can't tell.
-      while { test "X"`$SHELL $0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
-	         = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
-	      test $i != 17 # 1/2 MB should be enough
-      do
-        i=`expr $i + 1`
-        teststring=$teststring$teststring
-      done
-      # Only check the string length outside the loop.
-      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
-      teststring=
-      # Add a significant safety factor because C++ compilers can tack on
-      # massive amounts of additional arguments before passing them to the
-      # linker.  It appears as though 1/2 is a usable value.
-      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
-    fi
-    ;;
-  esac
 
+if test -z "$INTLTOOL_PERL"; then
+   { { $as_echo "$as_me:$LINENO: error: perl not found" >&5
+$as_echo "$as_me: error: perl not found" >&2;}
+   { (exit 1); exit 1; }; }
 fi
-
-if test -n $lt_cv_sys_max_cmd_len ; then
-  { $as_echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5
-$as_echo "$lt_cv_sys_max_cmd_len" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for perl >= 5.8.1" >&5
+$as_echo_n "checking for perl >= 5.8.1... " >&6; }
+$INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1
+if test $? -ne 0; then
+   { { $as_echo "$as_me:$LINENO: error: perl 5.8.1 is required for intltool" >&5
+$as_echo "$as_me: error: perl 5.8.1 is required for intltool" >&2;}
+   { (exit 1); exit 1; }; }
 else
-  { $as_echo "$as_me:$LINENO: result: none" >&5
-$as_echo "none" >&6; }
+   IT_PERL_VERSION="`$INTLTOOL_PERL -e \"printf '%vd', $^V\"`"
+   { $as_echo "$as_me:$LINENO: result: $IT_PERL_VERSION" >&5
+$as_echo "$IT_PERL_VERSION" >&6; }
 fi
-max_cmd_len=$lt_cv_sys_max_cmd_len
-
-
-
-
-
-
-: ${CP="cp -f"}
-: ${MV="mv -f"}
-: ${RM="rm -f"}
-
-{ $as_echo "$as_me:$LINENO: checking whether the shell understands some XSI constructs" >&5
-$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; }
-# Try some XSI features
-xsi_shell=no
-( _lt_dummy="a/b/c"
-  test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
-      = c,a/b,, \
-    && eval 'test $(( 1 + 1 )) -eq 2 \
-    && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
-  && xsi_shell=yes
-{ $as_echo "$as_me:$LINENO: result: $xsi_shell" >&5
-$as_echo "$xsi_shell" >&6; }
-
-
-{ $as_echo "$as_me:$LINENO: checking whether the shell understands \"+=\"" >&5
-$as_echo_n "checking whether the shell understands \"+=\"... " >&6; }
-lt_shell_append=no
-( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \
-    >/dev/null 2>&1 \
-  && lt_shell_append=yes
-{ $as_echo "$as_me:$LINENO: result: $lt_shell_append" >&5
-$as_echo "$lt_shell_append" >&6; }
-
-
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
-  lt_unset=unset
-else
-  lt_unset=false
+if test "x" != "xno-xml"; then
+   { $as_echo "$as_me:$LINENO: checking for XML::Parser" >&5
+$as_echo_n "checking for XML::Parser... " >&6; }
+   if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
+       { $as_echo "$as_me:$LINENO: result: ok" >&5
+$as_echo "ok" >&6; }
+   else
+       { { $as_echo "$as_me:$LINENO: error: XML::Parser perl module is required for intltool" >&5
+$as_echo "$as_me: error: XML::Parser perl module is required for intltool" >&2;}
+   { (exit 1); exit 1; }; }
+   fi
 fi
 
+# Substitute ALL_LINGUAS so we can use it in po/Makefile
 
 
+# Set DATADIRNAME correctly if it is not set yet
+# (copied from glib-gettext.m4)
+if test -z "$DATADIRNAME"; then
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
-
-# test EBCDIC or ASCII
-case `echo X|tr X '\101'` in
- A) # ASCII based system
-    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
-  lt_SP2NL='tr \040 \012'
-  lt_NL2SP='tr \015\012 \040\040'
-  ;;
- *) # EBCDIC based system
-  lt_SP2NL='tr \100 \n'
-  lt_NL2SP='tr \r\n \100\100'
-  ;;
+int
+main ()
+{
+extern int _nl_msg_cat_cntr;
+                       return _nl_msg_cat_cntr
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
 esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  DATADIRNAME=share
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+	case $host in
+    *-*-solaris*)
+                        { $as_echo "$as_me:$LINENO: checking for bind_textdomain_codeset" >&5
+$as_echo_n "checking for bind_textdomain_codeset... " >&6; }
+if test "${ac_cv_func_bind_textdomain_codeset+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define bind_textdomain_codeset to an innocuous variant, in case <limits.h> declares bind_textdomain_codeset.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define bind_textdomain_codeset innocuous_bind_textdomain_codeset
 
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char bind_textdomain_codeset (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
 
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
 
+#undef bind_textdomain_codeset
 
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char bind_textdomain_codeset ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined __stub_bind_textdomain_codeset || defined __stub___bind_textdomain_codeset
+choke me
+#endif
 
-
-
-
-{ $as_echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5
-$as_echo_n "checking for $LD option to reload object files... " >&6; }
-if test "${lt_cv_ld_reload_flag+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  lt_cv_ld_reload_flag='-r'
-fi
-{ $as_echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5
-$as_echo "$lt_cv_ld_reload_flag" >&6; }
-reload_flag=$lt_cv_ld_reload_flag
-case $reload_flag in
-"" | " "*) ;;
-*) reload_flag=" $reload_flag" ;;
-esac
-reload_cmds='$LD$reload_flag -o $output$reload_objs'
-case $host_os in
-  darwin*)
-    if test "$GCC" = yes; then
-      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
-    else
-      reload_cmds='$LD$reload_flag -o $output$reload_objs'
-    fi
-    ;;
-esac
-
-
-
-
-
-
-
-
-
-if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
-set dummy ${ac_tool_prefix}objdump; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_OBJDUMP+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$OBJDUMP"; then
-  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
+int
+main ()
+{
+return bind_textdomain_codeset ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  ac_cv_func_bind_textdomain_codeset=yes
 else
-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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+	ac_cv_func_bind_textdomain_codeset=no
 fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
 fi
-OBJDUMP=$ac_cv_prog_OBJDUMP
-if test -n "$OBJDUMP"; then
-  { $as_echo "$as_me:$LINENO: result: $OBJDUMP" >&5
-$as_echo "$OBJDUMP" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_bind_textdomain_codeset" >&5
+$as_echo "$ac_cv_func_bind_textdomain_codeset" >&6; }
+if test "x$ac_cv_func_bind_textdomain_codeset" = x""yes; then
+  DATADIRNAME=share
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+  DATADIRNAME=lib
 fi
 
-
+    ;;
+    *)
+    DATADIRNAME=lib
+    ;;
+    esac
 fi
-if test -z "$ac_cv_prog_OBJDUMP"; then
-  ac_ct_OBJDUMP=$OBJDUMP
-  # Extract the first word of "objdump", so it can be a program name with args.
-set dummy objdump; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ac_ct_OBJDUMP"; then
-  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
-else
-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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_ac_ct_OBJDUMP="objdump"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
 
-fi
-fi
-ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
-if test -n "$ac_ct_OBJDUMP"; then
-  { $as_echo "$as_me:$LINENO: result: $ac_ct_OBJDUMP" >&5
-$as_echo "$ac_ct_OBJDUMP" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
 fi
 
-  if test "x$ac_ct_OBJDUMP" = x; then
-    OBJDUMP="false"
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    OBJDUMP=$ac_ct_OBJDUMP
-  fi
-else
-  OBJDUMP="$ac_cv_prog_OBJDUMP"
-fi
 
-test -z "$OBJDUMP" && OBJDUMP=objdump
 
 
 
+case `pwd` in
+  *\ * | *\	*)
+    { $as_echo "$as_me:$LINENO: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
+$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
+esac
 
 
 
+macro_version='2.2.6'
+macro_revision='1.3012'
 
 
 
-{ $as_echo "$as_me:$LINENO: checking how to recognize dependent libraries" >&5
-$as_echo_n "checking how to recognize dependent libraries... " >&6; }
-if test "${lt_cv_deplibs_check_method+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  lt_cv_file_magic_cmd='$MAGIC_CMD'
-lt_cv_file_magic_test_file=
-lt_cv_deplibs_check_method='unknown'
-# Need to set the preceding variable on all platforms that support
-# interlibrary dependencies.
-# 'none' -- dependencies not supported.
-# `unknown' -- same as none, but documents that we really don't know.
-# 'pass_all' -- all dependencies passed with no checks.
-# 'test_compile' -- check by making test program.
-# 'file_magic [[regex]]' -- check by looking for files in library path
-# which responds to the $file_magic_cmd with a given extended regex.
-# If you have `file' or equivalent on your system and you're not sure
-# whether `pass_all' will *always* work, you probably want this one.
 
-case $host_os in
-aix[4-9]*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
 
-beos*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
 
-bsdi[45]*)
-  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
-  lt_cv_file_magic_cmd='/usr/bin/file -L'
-  lt_cv_file_magic_test_file=/shlib/libc.so
-  ;;
 
-cygwin*)
-  # func_win32_libid is a shell function defined in ltmain.sh
-  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
-  lt_cv_file_magic_cmd='func_win32_libid'
-  ;;
 
-mingw* | pw32*)
-  # Base MSYS/MinGW do not provide the 'file' command needed by
-  # func_win32_libid shell function, so use a weaker test based on 'objdump',
-  # unless we find 'file', for example because we are cross-compiling.
-  if ( file / ) >/dev/null 2>&1; then
-    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
-    lt_cv_file_magic_cmd='func_win32_libid'
-  else
-    lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
-    lt_cv_file_magic_cmd='$OBJDUMP -f'
-  fi
-  ;;
 
-cegcc)
-  # use the weaker test based on 'objdump'. See mingw*.
-  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
-  lt_cv_file_magic_cmd='$OBJDUMP -f'
-  ;;
 
-darwin* | rhapsody*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
 
-freebsd* | dragonfly*)
-  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
-    case $host_cpu in
-    i*86 )
-      # Not sure whether the presence of OpenBSD here was a mistake.
-      # Let's accept both of them until this is cleared up.
-      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
-      lt_cv_file_magic_cmd=/usr/bin/file
-      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
-      ;;
-    esac
-  else
-    lt_cv_deplibs_check_method=pass_all
-  fi
-  ;;
 
-gnu*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
 
-hpux10.20* | hpux11*)
-  lt_cv_file_magic_cmd=/usr/bin/file
-  case $host_cpu in
-  ia64*)
-    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
-    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
-    ;;
-  hppa*64*)
-    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'
-    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
-    ;;
-  *)
-    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
-    lt_cv_file_magic_test_file=/usr/lib/libc.sl
-    ;;
-  esac
-  ;;
-
-interix[3-9]*)
-  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
-  lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
-  ;;
-
-irix5* | irix6* | nonstopux*)
-  case $LD in
-  *-32|*"-32 ") libmagic=32-bit;;
-  *-n32|*"-n32 ") libmagic=N32;;
-  *-64|*"-64 ") libmagic=64-bit;;
-  *) libmagic=never-match;;
-  esac
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-# This must be Linux ELF.
-linux* | k*bsd*-gnu)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-netbsd* | netbsdelf*-gnu)
-  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
-    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
-  else
-    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
-  fi
-  ;;
-
-newos6*)
-  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
-  lt_cv_file_magic_cmd=/usr/bin/file
-  lt_cv_file_magic_test_file=/usr/lib/libnls.so
-  ;;
+ltmain="$ac_aux_dir/ltmain.sh"
 
-*nto* | *qnx*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
+# Make sure we can run config.sub.
+$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
+  { { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
+$as_echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
+   { (exit 1); exit 1; }; }
 
-openbsd*)
-  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
-  else
-    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
-  fi
-  ;;
+{ $as_echo "$as_me:$LINENO: checking build system type" >&5
+$as_echo_n "checking build system type... " >&6; }
+if test "${ac_cv_build+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_build_alias=$build_alias
+test "x$ac_build_alias" = x &&
+  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
+test "x$ac_build_alias" = x &&
+  { { $as_echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
+$as_echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
+   { (exit 1); exit 1; }; }
+ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
+  { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
+$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
+   { (exit 1); exit 1; }; }
 
-osf3* | osf4* | osf5*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_build" >&5
+$as_echo "$ac_cv_build" >&6; }
+case $ac_cv_build in
+*-*-*) ;;
+*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
+$as_echo "$as_me: error: invalid value of canonical build" >&2;}
+   { (exit 1); exit 1; }; };;
+esac
+build=$ac_cv_build
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_build
+shift
+build_cpu=$1
+build_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+build_os=$*
+IFS=$ac_save_IFS
+case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
 
-rdos*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
 
-solaris*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
+{ $as_echo "$as_me:$LINENO: checking host system type" >&5
+$as_echo_n "checking host system type... " >&6; }
+if test "${ac_cv_host+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test "x$host_alias" = x; then
+  ac_cv_host=$ac_cv_build
+else
+  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
+    { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
+$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
+   { (exit 1); exit 1; }; }
+fi
 
-sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5
+$as_echo "$ac_cv_host" >&6; }
+case $ac_cv_host in
+*-*-*) ;;
+*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
+$as_echo "$as_me: error: invalid value of canonical host" >&2;}
+   { (exit 1); exit 1; }; };;
+esac
+host=$ac_cv_host
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_host
+shift
+host_cpu=$1
+host_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+host_os=$*
+IFS=$ac_save_IFS
+case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
 
-sysv4 | sysv4.3*)
-  case $host_vendor in
-  motorola)
-    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
-    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
-    ;;
-  ncr)
-    lt_cv_deplibs_check_method=pass_all
-    ;;
-  sequent)
-    lt_cv_file_magic_cmd='/bin/file'
-    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
-    ;;
-  sni)
-    lt_cv_file_magic_cmd='/bin/file'
-    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
-    ;;
-  pc)
-    lt_cv_deplibs_check_method=pass_all
-    ;;
-  esac
-  ;;
 
-tpf*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
+{ $as_echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5
+$as_echo_n "checking for a sed that does not truncate output... " >&6; }
+if test "${ac_cv_path_SED+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
+     for ac_i in 1 2 3 4 5 6 7; do
+       ac_script="$ac_script$as_nl$ac_script"
+     done
+     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
+     $as_unset ac_script || ac_script=
+     if test -z "$SED"; then
+  ac_path_SED_found=false
+  # Loop through the user's path and test for each of PROGNAME-LIST
+  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
+      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
+      { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
+# Check for GNU ac_path_SED and select it if it is found.
+  # Check for GNU $ac_path_SED
+case `"$ac_path_SED" --version 2>&1` in
+*GNU*)
+  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
+*)
+  ac_count=0
+  $as_echo_n 0123456789 >"conftest.in"
+  while :
+  do
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    $as_echo '' >> "conftest.nl"
+    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+    ac_count=`expr $ac_count + 1`
+    if test $ac_count -gt ${ac_path_SED_max-0}; then
+      # Best one so far, save it but keep looking for a better one
+      ac_cv_path_SED="$ac_path_SED"
+      ac_path_SED_max=$ac_count
+    fi
+    # 10*(2^10) chars as input seems more than enough
+    test $ac_count -gt 10 && break
+  done
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
 esac
 
+      $ac_path_SED_found && break 3
+    done
+  done
+done
+IFS=$as_save_IFS
+  if test -z "$ac_cv_path_SED"; then
+    { { $as_echo "$as_me:$LINENO: error: no acceptable sed could be found in \$PATH" >&5
+$as_echo "$as_me: error: no acceptable sed could be found in \$PATH" >&2;}
+   { (exit 1); exit 1; }; }
+  fi
+else
+  ac_cv_path_SED=$SED
 fi
-{ $as_echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5
-$as_echo "$lt_cv_deplibs_check_method" >&6; }
-file_magic_cmd=$lt_cv_file_magic_cmd
-deplibs_check_method=$lt_cv_deplibs_check_method
-test -z "$deplibs_check_method" && deplibs_check_method=unknown
 
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_SED" >&5
+$as_echo "$ac_cv_path_SED" >&6; }
+ SED="$ac_cv_path_SED"
+  rm -f conftest.sed
 
+test -z "$SED" && SED=sed
+Xsed="$SED -e 1s/^X//"
 
 
 
@@ -9436,102 +9457,200 @@
 
 
 
-if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ar; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_AR+set}" = set; then
+
+{ $as_echo "$as_me:$LINENO: checking for fgrep" >&5
+$as_echo_n "checking for fgrep... " >&6; }
+if test "${ac_cv_path_FGREP+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  if test -n "$AR"; then
-  ac_cv_prog_AR="$AR" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
+  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
+   then ac_cv_path_FGREP="$GREP -F"
+   else
+     if test -z "$FGREP"; then
+  ac_path_FGREP_found=false
+  # Loop through the user's path and test for each of PROGNAME-LIST
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_AR="${ac_tool_prefix}ar"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
+  for ac_prog in fgrep; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
+      { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
+# Check for GNU ac_path_FGREP and select it if it is found.
+  # Check for GNU $ac_path_FGREP
+case `"$ac_path_FGREP" --version 2>&1` in
+*GNU*)
+  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
+*)
+  ac_count=0
+  $as_echo_n 0123456789 >"conftest.in"
+  while :
+  do
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    $as_echo 'FGREP' >> "conftest.nl"
+    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+    ac_count=`expr $ac_count + 1`
+    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
+      # Best one so far, save it but keep looking for a better one
+      ac_cv_path_FGREP="$ac_path_FGREP"
+      ac_path_FGREP_max=$ac_count
+    fi
+    # 10*(2^10) chars as input seems more than enough
+    test $ac_count -gt 10 && break
+  done
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+      $ac_path_FGREP_found && break 3
+    done
+  done
 done
 IFS=$as_save_IFS
-
+  if test -z "$ac_cv_path_FGREP"; then
+    { { $as_echo "$as_me:$LINENO: error: no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
+$as_echo "$as_me: error: no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
+   { (exit 1); exit 1; }; }
+  fi
+else
+  ac_cv_path_FGREP=$FGREP
 fi
+
+   fi
 fi
-AR=$ac_cv_prog_AR
-if test -n "$AR"; then
-  { $as_echo "$as_me:$LINENO: result: $AR" >&5
-$as_echo "$AR" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_FGREP" >&5
+$as_echo "$ac_cv_path_FGREP" >&6; }
+ FGREP="$ac_cv_path_FGREP"
+
+
+test -z "$GREP" && GREP=grep
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# Check whether --with-gnu-ld was given.
+if test "${with_gnu_ld+set}" = set; then
+  withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+  with_gnu_ld=no
 fi
 
-
+ac_prog=ld
+if test "$GCC" = yes; then
+  # Check if gcc -print-prog-name=ld gives a path.
+  { $as_echo "$as_me:$LINENO: checking for ld used by $CC" >&5
+$as_echo_n "checking for ld used by $CC... " >&6; }
+  case $host in
+  *-*-mingw*)
+    # gcc leaves a trailing carriage return which upsets mingw
+    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+  *)
+    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+  esac
+  case $ac_prog in
+    # Accept absolute paths.
+    [\\/]* | ?:[\\/]*)
+      re_direlt='/[^/][^/]*/\.\./'
+      # Canonicalize the pathname of ld
+      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
+      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
+	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
+      done
+      test -z "$LD" && LD="$ac_prog"
+      ;;
+  "")
+    # If it fails, then pretend we aren't using GCC.
+    ac_prog=ld
+    ;;
+  *)
+    # If it is relative, then search for the first ld in PATH.
+    with_gnu_ld=unknown
+    ;;
+  esac
+elif test "$with_gnu_ld" = yes; then
+  { $as_echo "$as_me:$LINENO: checking for GNU ld" >&5
+$as_echo_n "checking for GNU ld... " >&6; }
+else
+  { $as_echo "$as_me:$LINENO: checking for non-GNU ld" >&5
+$as_echo_n "checking for non-GNU ld... " >&6; }
 fi
-if test -z "$ac_cv_prog_AR"; then
-  ac_ct_AR=$AR
-  # Extract the first word of "ar", so it can be a program name with args.
-set dummy ar; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
+if test "${lt_cv_path_LD+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  if test -n "$ac_ct_AR"; then
-  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
+  if test -z "$LD"; then
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  for ac_dir in $PATH; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+      lt_cv_path_LD="$ac_dir/$ac_prog"
+      # Check to see if the program is GNU ld.  I'd rather use --version,
+      # but apparently some variants of GNU ld only accept -v.
+      # Break only if it was the GNU/non-GNU ld that we prefer.
+      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
+      *GNU* | *'with BFD'*)
+	test "$with_gnu_ld" != no && break
+	;;
+      *)
+	test "$with_gnu_ld" != yes && break
+	;;
+      esac
+    fi
+  done
+  IFS="$lt_save_ifs"
 else
-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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_ac_ct_AR="ar"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
+  lt_cv_path_LD="$LD" # Let the user override the test with a path.
 fi
 fi
-ac_ct_AR=$ac_cv_prog_ac_ct_AR
-if test -n "$ac_ct_AR"; then
-  { $as_echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
-$as_echo "$ac_ct_AR" >&6; }
+
+LD="$lt_cv_path_LD"
+if test -n "$LD"; then
+  { $as_echo "$as_me:$LINENO: result: $LD" >&5
+$as_echo "$LD" >&6; }
 else
   { $as_echo "$as_me:$LINENO: result: no" >&5
 $as_echo "no" >&6; }
 fi
-
-  if test "x$ac_ct_AR" = x; then
-    AR="false"
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    AR=$ac_ct_AR
-  fi
+test -z "$LD" && { { $as_echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
+$as_echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
+   { (exit 1); exit 1; }; }
+{ $as_echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
+$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
+if test "${lt_cv_prog_gnu_ld+set}" = set; then
+  $as_echo_n "(cached) " >&6
 else
-  AR="$ac_cv_prog_AR"
+  # I'd rather use --version here, but apparently some GNU lds only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+  lt_cv_prog_gnu_ld=yes
+  ;;
+*)
+  lt_cv_prog_gnu_ld=no
+  ;;
+esac
 fi
-
-test -z "$AR" && AR=ar
-test -z "$AR_FLAGS" && AR_FLAGS=cru
-
-
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
+$as_echo "$lt_cv_prog_gnu_ld" >&6; }
+with_gnu_ld=$lt_cv_prog_gnu_ld
 
 
 
@@ -9541,56 +9660,73 @@
 
 
 
-if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
-set dummy ${ac_tool_prefix}strip; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_STRIP+set}" = set; then
+{ $as_echo "$as_me:$LINENO: checking for BSD- or MS-compatible name lister (nm)" >&5
+$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
+if test "${lt_cv_path_NM+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  if test -n "$STRIP"; then
-  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+  if test -n "$NM"; then
+  # Let the user override the test.
+  lt_cv_path_NM="$NM"
 else
-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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
+  lt_nm_to_check="${ac_tool_prefix}nm"
+  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
+    lt_nm_to_check="$lt_nm_to_check nm"
   fi
-done
-done
-IFS=$as_save_IFS
-
+  for lt_tmp_nm in $lt_nm_to_check; do
+    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
+      IFS="$lt_save_ifs"
+      test -z "$ac_dir" && ac_dir=.
+      tmp_nm="$ac_dir/$lt_tmp_nm"
+      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
+	# Check to see if the nm accepts a BSD-compat flag.
+	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
+	#   nm: unknown option "B" ignored
+	# Tru64's nm complains that /dev/null is an invalid object file
+	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
+	*/dev/null* | *'Invalid file or object type'*)
+	  lt_cv_path_NM="$tmp_nm -B"
+	  break
+	  ;;
+	*)
+	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
+	  */dev/null*)
+	    lt_cv_path_NM="$tmp_nm -p"
+	    break
+	    ;;
+	  *)
+	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
+	    continue # so that we can try to find one that supports BSD flags
+	    ;;
+	  esac
+	  ;;
+	esac
+      fi
+    done
+    IFS="$lt_save_ifs"
+  done
+  : ${lt_cv_path_NM=no}
 fi
 fi
-STRIP=$ac_cv_prog_STRIP
-if test -n "$STRIP"; then
-  { $as_echo "$as_me:$LINENO: result: $STRIP" >&5
-$as_echo "$STRIP" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5
+$as_echo "$lt_cv_path_NM" >&6; }
+if test "$lt_cv_path_NM" != "no"; then
+  NM="$lt_cv_path_NM"
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_STRIP"; then
-  ac_ct_STRIP=$STRIP
-  # Extract the first word of "strip", so it can be a program name with args.
-set dummy strip; ac_word=$2
+  # Didn't find any BSD compatible name lister, look for dumpbin.
+  if test -n "$ac_tool_prefix"; then
+  for ac_prog in "dumpbin -symbols" "link -dump -symbols"
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
+if test "${ac_cv_prog_DUMPBIN+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  if test -n "$ac_ct_STRIP"; then
-  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+  if test -n "$DUMPBIN"; then
+  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
 else
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
@@ -9599,7 +9735,7 @@
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_ac_ct_STRIP="strip"
+    ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
@@ -9609,47 +9745,32 @@
 
 fi
 fi
-ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
-if test -n "$ac_ct_STRIP"; then
-  { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
-$as_echo "$ac_ct_STRIP" >&6; }
+DUMPBIN=$ac_cv_prog_DUMPBIN
+if test -n "$DUMPBIN"; then
+  { $as_echo "$as_me:$LINENO: result: $DUMPBIN" >&5
+$as_echo "$DUMPBIN" >&6; }
 else
   { $as_echo "$as_me:$LINENO: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
-  if test "x$ac_ct_STRIP" = x; then
-    STRIP=":"
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    STRIP=$ac_ct_STRIP
-  fi
-else
-  STRIP="$ac_cv_prog_STRIP"
-fi
-
-test -z "$STRIP" && STRIP=:
-
 
-
-
-
-
-if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+    test -n "$DUMPBIN" && break
+  done
+fi
+if test -z "$DUMPBIN"; then
+  ac_ct_DUMPBIN=$DUMPBIN
+  for ac_prog in "dumpbin -symbols" "link -dump -symbols"
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_RANLIB+set}" = set; then
+if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  if test -n "$RANLIB"; then
-  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+  if test -n "$ac_ct_DUMPBIN"; then
+  ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
 else
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
@@ -9658,7 +9779,7 @@
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+    ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
@@ -9668,57 +9789,21 @@
 
 fi
 fi
-RANLIB=$ac_cv_prog_RANLIB
-if test -n "$RANLIB"; then
-  { $as_echo "$as_me:$LINENO: result: $RANLIB" >&5
-$as_echo "$RANLIB" >&6; }
+ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
+if test -n "$ac_ct_DUMPBIN"; then
+  { $as_echo "$as_me:$LINENO: result: $ac_ct_DUMPBIN" >&5
+$as_echo "$ac_ct_DUMPBIN" >&6; }
 else
   { $as_echo "$as_me:$LINENO: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
 
-fi
-if test -z "$ac_cv_prog_RANLIB"; then
-  ac_ct_RANLIB=$RANLIB
-  # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ac_ct_RANLIB"; then
-  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
-else
-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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_ac_ct_RANLIB="ranlib"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
+  test -n "$ac_ct_DUMPBIN" && break
 done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
-if test -n "$ac_ct_RANLIB"; then
-  { $as_echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
-$as_echo "$ac_ct_RANLIB" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
 
-  if test "x$ac_ct_RANLIB" = x; then
-    RANLIB=":"
+  if test "x$ac_ct_DUMPBIN" = x; then
+    DUMPBIN=":"
   else
     case $cross_compiling:$ac_tool_warned in
 yes:)
@@ -9726,62 +9811,240 @@
 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
 ac_tool_warned=yes ;;
 esac
-    RANLIB=$ac_ct_RANLIB
+    DUMPBIN=$ac_ct_DUMPBIN
   fi
-else
-  RANLIB="$ac_cv_prog_RANLIB"
 fi
 
-test -z "$RANLIB" && RANLIB=:
 
+  if test "$DUMPBIN" != ":"; then
+    NM="$DUMPBIN"
+  fi
+fi
+test -z "$NM" && NM=nm
 
 
 
 
 
-# Determine commands to create old-style static archives.
-old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
-old_postinstall_cmds='chmod 644 $oldlib'
-old_postuninstall_cmds=
 
-if test -n "$RANLIB"; then
-  case $host_os in
-  openbsd*)
-    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
-    ;;
-  *)
-    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
-    ;;
-  esac
-  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
+{ $as_echo "$as_me:$LINENO: checking the name lister ($NM) interface" >&5
+$as_echo_n "checking the name lister ($NM) interface... " >&6; }
+if test "${lt_cv_nm_interface+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_nm_interface="BSD nm"
+  echo "int some_variable = 0;" > conftest.$ac_ext
+  (eval echo "\"\$as_me:9837: $ac_compile\"" >&5)
+  (eval "$ac_compile" 2>conftest.err)
+  cat conftest.err >&5
+  (eval echo "\"\$as_me:9840: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
+  cat conftest.err >&5
+  (eval echo "\"\$as_me:9843: output\"" >&5)
+  cat conftest.out >&5
+  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
+    lt_cv_nm_interface="MS dumpbin"
+  fi
+  rm -f conftest*
 fi
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_nm_interface" >&5
+$as_echo "$lt_cv_nm_interface" >&6; }
 
+{ $as_echo "$as_me:$LINENO: checking whether ln -s works" >&5
+$as_echo_n "checking whether ln -s works... " >&6; }
+LN_S=$as_ln_s
+if test "$LN_S" = "ln -s"; then
+  { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no, using $LN_S" >&5
+$as_echo "no, using $LN_S" >&6; }
+fi
 
+# find the maximum length of command line arguments
+{ $as_echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5
+$as_echo_n "checking the maximum length of command line arguments... " >&6; }
+if test "${lt_cv_sys_max_cmd_len+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+    i=0
+  teststring="ABCD"
 
+  case $build_os in
+  msdosdjgpp*)
+    # On DJGPP, this test can blow up pretty badly due to problems in libc
+    # (any single argument exceeding 2000 bytes causes a buffer overrun
+    # during glob expansion).  Even if it were fixed, the result of this
+    # check would be larger than it should be.
+    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
+    ;;
 
+  gnu*)
+    # Under GNU Hurd, this test is not required because there is
+    # no limit to the length of command line arguments.
+    # Libtool will interpret -1 as no limit whatsoever
+    lt_cv_sys_max_cmd_len=-1;
+    ;;
 
+  cygwin* | mingw* | cegcc*)
+    # On Win9x/ME, this test blows up -- it succeeds, but takes
+    # about 5 minutes as the teststring grows exponentially.
+    # Worse, since 9x/ME are not pre-emptively multitasking,
+    # you end up with a "frozen" computer, even though with patience
+    # the test eventually succeeds (with a max line length of 256k).
+    # Instead, let's just punt: use the minimum linelength reported by
+    # all of the supported platforms: 8192 (on NT/2K/XP).
+    lt_cv_sys_max_cmd_len=8192;
+    ;;
 
+  amigaos*)
+    # On AmigaOS with pdksh, this test takes hours, literally.
+    # So we just punt and use a minimum line length of 8192.
+    lt_cv_sys_max_cmd_len=8192;
+    ;;
 
+  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
+    # This has been around since 386BSD, at least.  Likely further.
+    if test -x /sbin/sysctl; then
+      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
+    elif test -x /usr/sbin/sysctl; then
+      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
+    else
+      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
+    fi
+    # And add a safety zone
+    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+    ;;
 
+  interix*)
+    # We know the value 262144 and hardcode it with a safety zone (like BSD)
+    lt_cv_sys_max_cmd_len=196608
+    ;;
 
+  osf*)
+    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
+    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
+    # nice to cause kernel panics so lets avoid the loop below.
+    # First set a reasonable default.
+    lt_cv_sys_max_cmd_len=16384
+    #
+    if test -x /sbin/sysconfig; then
+      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
+        *1*) lt_cv_sys_max_cmd_len=-1 ;;
+      esac
+    fi
+    ;;
+  sco3.2v5*)
+    lt_cv_sys_max_cmd_len=102400
+    ;;
+  sysv5* | sco5v6* | sysv4.2uw2*)
+    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
+    if test -n "$kargmax"; then
+      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[	 ]//'`
+    else
+      lt_cv_sys_max_cmd_len=32768
+    fi
+    ;;
+  *)
+    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
+    if test -n "$lt_cv_sys_max_cmd_len"; then
+      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+    else
+      # Make teststring a little bigger before we do anything with it.
+      # a 1K string should be a reasonable start.
+      for i in 1 2 3 4 5 6 7 8 ; do
+        teststring=$teststring$teststring
+      done
+      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
+      # If test is not a shell built-in, we'll probably end up computing a
+      # maximum length that is only half of the actual maximum length, but
+      # we can't tell.
+      while { test "X"`$SHELL $0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
+	         = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
+	      test $i != 17 # 1/2 MB should be enough
+      do
+        i=`expr $i + 1`
+        teststring=$teststring$teststring
+      done
+      # Only check the string length outside the loop.
+      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
+      teststring=
+      # Add a significant safety factor because C++ compilers can tack on
+      # massive amounts of additional arguments before passing them to the
+      # linker.  It appears as though 1/2 is a usable value.
+      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
+    fi
+    ;;
+  esac
 
+fi
 
+if test -n $lt_cv_sys_max_cmd_len ; then
+  { $as_echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5
+$as_echo "$lt_cv_sys_max_cmd_len" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: none" >&5
+$as_echo "none" >&6; }
+fi
+max_cmd_len=$lt_cv_sys_max_cmd_len
 
 
 
 
 
 
+: ${CP="cp -f"}
+: ${MV="mv -f"}
+: ${RM="rm -f"}
 
+{ $as_echo "$as_me:$LINENO: checking whether the shell understands some XSI constructs" >&5
+$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; }
+# Try some XSI features
+xsi_shell=no
+( _lt_dummy="a/b/c"
+  test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
+      = c,a/b,, \
+    && eval 'test $(( 1 + 1 )) -eq 2 \
+    && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
+  && xsi_shell=yes
+{ $as_echo "$as_me:$LINENO: result: $xsi_shell" >&5
+$as_echo "$xsi_shell" >&6; }
 
 
+{ $as_echo "$as_me:$LINENO: checking whether the shell understands \"+=\"" >&5
+$as_echo_n "checking whether the shell understands \"+=\"... " >&6; }
+lt_shell_append=no
+( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \
+    >/dev/null 2>&1 \
+  && lt_shell_append=yes
+{ $as_echo "$as_me:$LINENO: result: $lt_shell_append" >&5
+$as_echo "$lt_shell_append" >&6; }
 
 
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+  lt_unset=unset
+else
+  lt_unset=false
+fi
 
 
 
 
 
+# test EBCDIC or ASCII
+case `echo X|tr X '\101'` in
+ A) # ASCII based system
+    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
+  lt_SP2NL='tr \040 \012'
+  lt_NL2SP='tr \015\012 \040\040'
+  ;;
+ *) # EBCDIC based system
+  lt_SP2NL='tr \100 \n'
+  lt_NL2SP='tr \r\n \100\100'
+  ;;
+esac
 
 
 
@@ -9789,248 +10052,134 @@
 
 
 
-# If no C compiler was specified, use CC.
-LTCC=${LTCC-"$CC"}
-
-# If no C compiler flags were specified, use CFLAGS.
-LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
-
-# Allow CC to be a program name with arguments.
-compiler=$CC
-
-
-# Check for command to grab the raw symbol name followed by C symbol from nm.
-{ $as_echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5
-$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
-if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-
-# These are sane defaults that work on at least a few old systems.
-# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
-
-# Character class describing NM global symbol codes.
-symcode='[BCDEGRST]'
 
-# Regexp to match symbols that can be accessed directly from C.
-sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
 
-# Define system-specific variables.
+{ $as_echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5
+$as_echo_n "checking for $LD option to reload object files... " >&6; }
+if test "${lt_cv_ld_reload_flag+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_ld_reload_flag='-r'
+fi
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5
+$as_echo "$lt_cv_ld_reload_flag" >&6; }
+reload_flag=$lt_cv_ld_reload_flag
+case $reload_flag in
+"" | " "*) ;;
+*) reload_flag=" $reload_flag" ;;
+esac
+reload_cmds='$LD$reload_flag -o $output$reload_objs'
 case $host_os in
-aix*)
-  symcode='[BCDT]'
-  ;;
-cygwin* | mingw* | pw32* | cegcc*)
-  symcode='[ABCDGISTW]'
-  ;;
-hpux*)
-  if test "$host_cpu" = ia64; then
-    symcode='[ABCDEGRST]'
-  fi
-  ;;
-irix* | nonstopux*)
-  symcode='[BCDEGRST]'
-  ;;
-osf*)
-  symcode='[BCDEGQRST]'
-  ;;
-solaris*)
-  symcode='[BDRT]'
-  ;;
-sco3.2v5*)
-  symcode='[DT]'
-  ;;
-sysv4.2uw2*)
-  symcode='[DT]'
-  ;;
-sysv5* | sco5v6* | unixware* | OpenUNIX*)
-  symcode='[ABDT]'
-  ;;
-sysv4)
-  symcode='[DFNSTU]'
-  ;;
+  darwin*)
+    if test "$GCC" = yes; then
+      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
+    else
+      reload_cmds='$LD$reload_flag -o $output$reload_objs'
+    fi
+    ;;
 esac
 
-# If we're using GNU nm, then use its standard symbol codes.
-case `$NM -V 2>&1` in
-*GNU* | *'with BFD'*)
-  symcode='[ABCDGIRSTW]' ;;
-esac
 
-# Transform an extracted symbol line into a proper C declaration.
-# Some systems (esp. on ia64) link data and code symbols differently,
-# so use this general approach.
-lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
 
-# Transform an extracted symbol line into symbol name and symbol address
-lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"\2\", (void *) \&\2},/p'"
-lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/  {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"lib\2\", (void *) \&\2},/p'"
 
-# Handle CRLF in mingw tool chain
-opt_cr=
-case $build_os in
-mingw*)
-  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
-  ;;
-esac
 
-# Try without a prefix underscore, then with it.
-for ac_symprfx in "" "_"; do
 
-  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
-  symxfrm="\\1 $ac_symprfx\\2 \\2"
 
-  # Write the raw and C identifiers.
-  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
-    # Fake it for dumpbin and say T for any non-static function
-    # and D for any global variable.
-    # Also find C++ and __fastcall symbols from MSVC++,
-    # which start with @ or ?.
-    lt_cv_sys_global_symbol_pipe="$AWK '"\
-"     {last_section=section; section=\$ 3};"\
-"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
-"     \$ 0!~/External *\|/{next};"\
-"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
-"     {if(hide[section]) next};"\
-"     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
-"     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
-"     s[1]~/^[ ?]/{print s[1], s[1]; next};"\
-"     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
-"     ' prfx=^$ac_symprfx"
-  else
-    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[	 ]\($symcode$symcode*\)[	 ][	 ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
-  fi
 
-  # Check to see that the pipe works correctly.
-  pipe_works=no
-
-  rm -f conftest*
-  cat > conftest.$ac_ext <<_LT_EOF
-#ifdef __cplusplus
-extern "C" {
-#endif
-char nm_test_var;
-void nm_test_func(void);
-void nm_test_func(void){}
-#ifdef __cplusplus
-}
-#endif
-int main(){nm_test_var='a';nm_test_func();return(0);}
-_LT_EOF
-
-  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-    # Now try to grab the symbols.
-    nlist=conftest.nm
-    if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5
-  (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && test -s "$nlist"; then
-      # Try sorting and uniquifying the output.
-      if sort "$nlist" | uniq > "$nlist"T; then
-	mv -f "$nlist"T "$nlist"
-      else
-	rm -f "$nlist"T
-      fi
-
-      # Make sure that we snagged all the symbols we need.
-      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
-	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
-	  cat <<_LT_EOF > conftest.$ac_ext
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-_LT_EOF
-	  # Now generate the symbol file.
-	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
-
-	  cat <<_LT_EOF >> conftest.$ac_ext
-
-/* The mapping between symbol names and symbols.  */
-const struct {
-  const char *name;
-  void       *address;
-}
-lt__PROGRAM__LTX_preloaded_symbols[] =
-{
-  { "@PROGRAM@", (void *) 0 },
-_LT_EOF
-	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
-	  cat <<\_LT_EOF >> conftest.$ac_ext
-  {0, (void *) 0}
-};
-
-/* This works around a problem in FreeBSD linker */
-#ifdef FREEBSD_WORKAROUND
-static const void *lt_preloaded_setup() {
-  return lt__PROGRAM__LTX_preloaded_symbols;
-}
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-_LT_EOF
-	  # Now try linking the two files.
-	  mv conftest.$ac_objext conftstm.$ac_objext
-	  lt_save_LIBS="$LIBS"
-	  lt_save_CFLAGS="$CFLAGS"
-	  LIBS="conftstm.$ac_objext"
-	  CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
-	  if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && test -s conftest${ac_exeext}; then
-	    pipe_works=yes
-	  fi
-	  LIBS="$lt_save_LIBS"
-	  CFLAGS="$lt_save_CFLAGS"
-	else
-	  echo "cannot find nm_test_func in $nlist" >&5
-	fi
-      else
-	echo "cannot find nm_test_var in $nlist" >&5
-      fi
-    else
-      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
-    fi
-  else
-    echo "$progname: failed program was:" >&5
-    cat conftest.$ac_ext >&5
-  fi
-  rm -rf conftest* conftst*
 
-  # Do not use the global_symbol_pipe unless it works.
-  if test "$pipe_works" = yes; then
-    break
-  else
-    lt_cv_sys_global_symbol_pipe=
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
+set dummy ${ac_tool_prefix}objdump; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_OBJDUMP+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$OBJDUMP"; then
+  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
+else
+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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
   fi
 done
+done
+IFS=$as_save_IFS
 
 fi
-
-if test -z "$lt_cv_sys_global_symbol_pipe"; then
-  lt_cv_sys_global_symbol_to_cdecl=
 fi
-if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
-  { $as_echo "$as_me:$LINENO: result: failed" >&5
-$as_echo "failed" >&6; }
+OBJDUMP=$ac_cv_prog_OBJDUMP
+if test -n "$OBJDUMP"; then
+  { $as_echo "$as_me:$LINENO: result: $OBJDUMP" >&5
+$as_echo "$OBJDUMP" >&6; }
 else
-  { $as_echo "$as_me:$LINENO: result: ok" >&5
-$as_echo "ok" >&6; }
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
 
+fi
+if test -z "$ac_cv_prog_OBJDUMP"; then
+  ac_ct_OBJDUMP=$OBJDUMP
+  # Extract the first word of "objdump", so it can be a program name with args.
+set dummy objdump; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_OBJDUMP"; then
+  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
+else
+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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_OBJDUMP="objdump"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
 
+fi
+fi
+ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
+if test -n "$ac_ct_OBJDUMP"; then
+  { $as_echo "$as_me:$LINENO: result: $ac_ct_OBJDUMP" >&5
+$as_echo "$ac_ct_OBJDUMP" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
 
+  if test "x$ac_ct_OBJDUMP" = x; then
+    OBJDUMP="false"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    OBJDUMP=$ac_ct_OBJDUMP
+  fi
+else
+  OBJDUMP="$ac_cv_prog_OBJDUMP"
+fi
 
+test -z "$OBJDUMP" && OBJDUMP=objdump
 
 
 
@@ -10040,249 +10189,229 @@
 
 
 
+{ $as_echo "$as_me:$LINENO: checking how to recognize dependent libraries" >&5
+$as_echo_n "checking how to recognize dependent libraries... " >&6; }
+if test "${lt_cv_deplibs_check_method+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_file_magic_cmd='$MAGIC_CMD'
+lt_cv_file_magic_test_file=
+lt_cv_deplibs_check_method='unknown'
+# Need to set the preceding variable on all platforms that support
+# interlibrary dependencies.
+# 'none' -- dependencies not supported.
+# `unknown' -- same as none, but documents that we really don't know.
+# 'pass_all' -- all dependencies passed with no checks.
+# 'test_compile' -- check by making test program.
+# 'file_magic [[regex]]' -- check by looking for files in library path
+# which responds to the $file_magic_cmd with a given extended regex.
+# If you have `file' or equivalent on your system and you're not sure
+# whether `pass_all' will *always* work, you probably want this one.
 
+case $host_os in
+aix[4-9]*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
 
+beos*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
 
+bsdi[45]*)
+  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
+  lt_cv_file_magic_cmd='/usr/bin/file -L'
+  lt_cv_file_magic_test_file=/shlib/libc.so
+  ;;
 
+cygwin*)
+  # func_win32_libid is a shell function defined in ltmain.sh
+  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+  lt_cv_file_magic_cmd='func_win32_libid'
+  ;;
 
+mingw* | pw32*)
+  # Base MSYS/MinGW do not provide the 'file' command needed by
+  # func_win32_libid shell function, so use a weaker test based on 'objdump',
+  # unless we find 'file', for example because we are cross-compiling.
+  if ( file / ) >/dev/null 2>&1; then
+    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+    lt_cv_file_magic_cmd='func_win32_libid'
+  else
+    lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+    lt_cv_file_magic_cmd='$OBJDUMP -f'
+  fi
+  ;;
 
+cegcc)
+  # use the weaker test based on 'objdump'. See mingw*.
+  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
+  lt_cv_file_magic_cmd='$OBJDUMP -f'
+  ;;
 
+darwin* | rhapsody*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
 
-# Check whether --enable-libtool-lock was given.
-if test "${enable_libtool_lock+set}" = set; then
-  enableval=$enable_libtool_lock;
-fi
-
-test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
-
-# Some flags need to be propagated to the compiler or linker for good
-# libtool support.
-case $host in
-ia64-*-hpux*)
-  # Find out which ABI we are using.
-  echo 'int i;' > conftest.$ac_ext
-  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-    case `/usr/bin/file conftest.$ac_objext` in
-      *ELF-32*)
-	HPUX_IA64_MODE="32"
-	;;
-      *ELF-64*)
-	HPUX_IA64_MODE="64"
-	;;
+freebsd* | dragonfly*)
+  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+    case $host_cpu in
+    i*86 )
+      # Not sure whether the presence of OpenBSD here was a mistake.
+      # Let's accept both of them until this is cleared up.
+      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
+      lt_cv_file_magic_cmd=/usr/bin/file
+      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
+      ;;
     esac
+  else
+    lt_cv_deplibs_check_method=pass_all
   fi
-  rm -rf conftest*
   ;;
-*-*-irix6*)
-  # Find out which ABI we are using.
-  echo '#line 10082 "configure"' > conftest.$ac_ext
-  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-    if test "$lt_cv_prog_gnu_ld" = yes; then
-      case `/usr/bin/file conftest.$ac_objext` in
-	*32-bit*)
-	  LD="${LD-ld} -melf32bsmip"
-	  ;;
-	*N32*)
-	  LD="${LD-ld} -melf32bmipn32"
-	  ;;
-	*64-bit*)
-	  LD="${LD-ld} -melf64bmip"
-	;;
-      esac
-    else
-      case `/usr/bin/file conftest.$ac_objext` in
-	*32-bit*)
-	  LD="${LD-ld} -32"
-	  ;;
-	*N32*)
-	  LD="${LD-ld} -n32"
-	  ;;
-	*64-bit*)
-	  LD="${LD-ld} -64"
-	  ;;
-      esac
-    fi
-  fi
-  rm -rf conftest*
+
+gnu*)
+  lt_cv_deplibs_check_method=pass_all
   ;;
 
-x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
-s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
-  # Find out which ABI we are using.
-  echo 'int i;' > conftest.$ac_ext
-  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-    case `/usr/bin/file conftest.o` in
-      *32-bit*)
-	case $host in
-	  x86_64-*kfreebsd*-gnu)
-	    LD="${LD-ld} -m elf_i386_fbsd"
-	    ;;
-	  x86_64-*linux*)
-	    LD="${LD-ld} -m elf_i386"
-	    ;;
-	  ppc64-*linux*|powerpc64-*linux*)
-	    LD="${LD-ld} -m elf32ppclinux"
-	    ;;
-	  s390x-*linux*)
-	    LD="${LD-ld} -m elf_s390"
-	    ;;
-	  sparc64-*linux*)
-	    LD="${LD-ld} -m elf32_sparc"
-	    ;;
-	esac
-	;;
-      *64-bit*)
-	case $host in
-	  x86_64-*kfreebsd*-gnu)
-	    LD="${LD-ld} -m elf_x86_64_fbsd"
-	    ;;
-	  x86_64-*linux*)
-	    LD="${LD-ld} -m elf_x86_64"
-	    ;;
-	  ppc*-*linux*|powerpc*-*linux*)
-	    LD="${LD-ld} -m elf64ppc"
-	    ;;
-	  s390*-*linux*|s390*-*tpf*)
-	    LD="${LD-ld} -m elf64_s390"
-	    ;;
-	  sparc*-*linux*)
-	    LD="${LD-ld} -m elf64_sparc"
-	    ;;
-	esac
-	;;
-    esac
-  fi
-  rm -rf conftest*
+hpux10.20* | hpux11*)
+  lt_cv_file_magic_cmd=/usr/bin/file
+  case $host_cpu in
+  ia64*)
+    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
+    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
+    ;;
+  hppa*64*)
+    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'
+    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
+    ;;
+  *)
+    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
+    lt_cv_file_magic_test_file=/usr/lib/libc.sl
+    ;;
+  esac
   ;;
 
-*-*-sco3.2v5*)
-  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
-  SAVE_CFLAGS="$CFLAGS"
-  CFLAGS="$CFLAGS -belf"
-  { $as_echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5
-$as_echo_n "checking whether the C compiler needs -belf... " >&6; }
-if test "${lt_cv_cc_needs_belf+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
+interix[3-9]*)
+  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
+  lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
+  ;;
 
-     cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+irix5* | irix6* | nonstopux*)
+  case $LD in
+  *-32|*"-32 ") libmagic=32-bit;;
+  *-n32|*"-n32 ") libmagic=N32;;
+  *-64|*"-64 ") libmagic=64-bit;;
+  *) libmagic=never-match;;
+  esac
+  lt_cv_deplibs_check_method=pass_all
+  ;;
 
-int
-main ()
-{
+# This must be Linux ELF.
+linux* | k*bsd*-gnu)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
 
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  lt_cv_cc_needs_belf=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+netbsd* | netbsdelf*-gnu)
+  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
+  else
+    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
+  fi
+  ;;
 
-	lt_cv_cc_needs_belf=no
-fi
+newos6*)
+  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
+  lt_cv_file_magic_cmd=/usr/bin/file
+  lt_cv_file_magic_test_file=/usr/lib/libnls.so
+  ;;
 
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-     ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
+*nto* | *qnx*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
 
-fi
-{ $as_echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5
-$as_echo "$lt_cv_cc_needs_belf" >&6; }
-  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
-    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
-    CFLAGS="$SAVE_CFLAGS"
+openbsd*)
+  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
+  else
+    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
   fi
   ;;
-sparc*-*solaris*)
-  # Find out which ABI we are using.
-  echo 'int i;' > conftest.$ac_ext
-  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-    case `/usr/bin/file conftest.o` in
-    *64-bit*)
-      case $lt_cv_prog_gnu_ld in
-      yes*) LD="${LD-ld} -m elf64_sparc" ;;
-      *)
-	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
-	  LD="${LD-ld} -64"
-	fi
-	;;
-      esac
-      ;;
-    esac
-  fi
-  rm -rf conftest*
+
+osf3* | osf4* | osf5*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+rdos*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+solaris*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+sysv4 | sysv4.3*)
+  case $host_vendor in
+  motorola)
+    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
+    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
+    ;;
+  ncr)
+    lt_cv_deplibs_check_method=pass_all
+    ;;
+  sequent)
+    lt_cv_file_magic_cmd='/bin/file'
+    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
+    ;;
+  sni)
+    lt_cv_file_magic_cmd='/bin/file'
+    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
+    ;;
+  pc)
+    lt_cv_deplibs_check_method=pass_all
+    ;;
+  esac
+  ;;
+
+tpf*)
+  lt_cv_deplibs_check_method=pass_all
   ;;
 esac
 
-need_locks="$enable_libtool_lock"
+fi
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5
+$as_echo "$lt_cv_deplibs_check_method" >&6; }
+file_magic_cmd=$lt_cv_file_magic_cmd
+deplibs_check_method=$lt_cv_deplibs_check_method
+test -z "$deplibs_check_method" && deplibs_check_method=unknown
 
 
-  case $host_os in
-    rhapsody* | darwin*)
-    if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
-set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
+
+
+
+
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ar; ac_word=$2
 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_DSYMUTIL+set}" = set; then
+if test "${ac_cv_prog_AR+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  if test -n "$DSYMUTIL"; then
-  ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
+  if test -n "$AR"; then
+  ac_cv_prog_AR="$AR" # Let the user override the test.
 else
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
@@ -10291,7 +10420,7 @@
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
+    ac_cv_prog_AR="${ac_tool_prefix}ar"
     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
@@ -10301,10 +10430,10 @@
 
 fi
 fi
-DSYMUTIL=$ac_cv_prog_DSYMUTIL
-if test -n "$DSYMUTIL"; then
-  { $as_echo "$as_me:$LINENO: result: $DSYMUTIL" >&5
-$as_echo "$DSYMUTIL" >&6; }
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+  { $as_echo "$as_me:$LINENO: result: $AR" >&5
+$as_echo "$AR" >&6; }
 else
   { $as_echo "$as_me:$LINENO: result: no" >&5
 $as_echo "no" >&6; }
@@ -10312,17 +10441,17 @@
 
 
 fi
-if test -z "$ac_cv_prog_DSYMUTIL"; then
-  ac_ct_DSYMUTIL=$DSYMUTIL
-  # Extract the first word of "dsymutil", so it can be a program name with args.
-set dummy dsymutil; ac_word=$2
+if test -z "$ac_cv_prog_AR"; then
+  ac_ct_AR=$AR
+  # Extract the first word of "ar", so it can be a program name with args.
+set dummy ar; ac_word=$2
 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then
+if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  if test -n "$ac_ct_DSYMUTIL"; then
-  ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
+  if test -n "$ac_ct_AR"; then
+  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
 else
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
@@ -10331,7 +10460,7 @@
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
+    ac_cv_prog_ac_ct_AR="ar"
     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
@@ -10341,17 +10470,17 @@
 
 fi
 fi
-ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
-if test -n "$ac_ct_DSYMUTIL"; then
-  { $as_echo "$as_me:$LINENO: result: $ac_ct_DSYMUTIL" >&5
-$as_echo "$ac_ct_DSYMUTIL" >&6; }
+ac_ct_AR=$ac_cv_prog_ac_ct_AR
+if test -n "$ac_ct_AR"; then
+  { $as_echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
+$as_echo "$ac_ct_AR" >&6; }
 else
   { $as_echo "$as_me:$LINENO: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
-  if test "x$ac_ct_DSYMUTIL" = x; then
-    DSYMUTIL=":"
+  if test "x$ac_ct_AR" = x; then
+    AR="false"
   else
     case $cross_compiling:$ac_tool_warned in
 yes:)
@@ -10359,22 +10488,35 @@
 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
 ac_tool_warned=yes ;;
 esac
-    DSYMUTIL=$ac_ct_DSYMUTIL
+    AR=$ac_ct_AR
   fi
 else
-  DSYMUTIL="$ac_cv_prog_DSYMUTIL"
+  AR="$ac_cv_prog_AR"
 fi
 
-    if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
-set dummy ${ac_tool_prefix}nmedit; ac_word=$2
+test -z "$AR" && AR=ar
+test -z "$AR_FLAGS" && AR_FLAGS=cru
+
+
+
+
+
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_NMEDIT+set}" = set; then
+if test "${ac_cv_prog_STRIP+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  if test -n "$NMEDIT"; then
-  ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
+  if test -n "$STRIP"; then
+  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
 else
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
@@ -10383,7 +10525,7 @@
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
+    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
@@ -10393,10 +10535,10 @@
 
 fi
 fi
-NMEDIT=$ac_cv_prog_NMEDIT
-if test -n "$NMEDIT"; then
-  { $as_echo "$as_me:$LINENO: result: $NMEDIT" >&5
-$as_echo "$NMEDIT" >&6; }
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+  { $as_echo "$as_me:$LINENO: result: $STRIP" >&5
+$as_echo "$STRIP" >&6; }
 else
   { $as_echo "$as_me:$LINENO: result: no" >&5
 $as_echo "no" >&6; }
@@ -10404,17 +10546,17 @@
 
 
 fi
-if test -z "$ac_cv_prog_NMEDIT"; then
-  ac_ct_NMEDIT=$NMEDIT
-  # Extract the first word of "nmedit", so it can be a program name with args.
-set dummy nmedit; ac_word=$2
+if test -z "$ac_cv_prog_STRIP"; then
+  ac_ct_STRIP=$STRIP
+  # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then
+if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  if test -n "$ac_ct_NMEDIT"; then
-  ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
+  if test -n "$ac_ct_STRIP"; then
+  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
 else
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
@@ -10423,7 +10565,7 @@
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_ac_ct_NMEDIT="nmedit"
+    ac_cv_prog_ac_ct_STRIP="strip"
     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
@@ -10433,17 +10575,17 @@
 
 fi
 fi
-ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
-if test -n "$ac_ct_NMEDIT"; then
-  { $as_echo "$as_me:$LINENO: result: $ac_ct_NMEDIT" >&5
-$as_echo "$ac_ct_NMEDIT" >&6; }
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+  { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
+$as_echo "$ac_ct_STRIP" >&6; }
 else
   { $as_echo "$as_me:$LINENO: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
-  if test "x$ac_ct_NMEDIT" = x; then
-    NMEDIT=":"
+  if test "x$ac_ct_STRIP" = x; then
+    STRIP=":"
   else
     case $cross_compiling:$ac_tool_warned in
 yes:)
@@ -10451,22 +10593,29 @@
 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
 ac_tool_warned=yes ;;
 esac
-    NMEDIT=$ac_ct_NMEDIT
+    STRIP=$ac_ct_STRIP
   fi
 else
-  NMEDIT="$ac_cv_prog_NMEDIT"
+  STRIP="$ac_cv_prog_STRIP"
 fi
 
-    if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
-set dummy ${ac_tool_prefix}lipo; ac_word=$2
+test -z "$STRIP" && STRIP=:
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_LIPO+set}" = set; then
+if test "${ac_cv_prog_RANLIB+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  if test -n "$LIPO"; then
-  ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
+  if test -n "$RANLIB"; then
+  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
 else
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
@@ -10475,7 +10624,7 @@
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
+    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
@@ -10485,10 +10634,10 @@
 
 fi
 fi
-LIPO=$ac_cv_prog_LIPO
-if test -n "$LIPO"; then
-  { $as_echo "$as_me:$LINENO: result: $LIPO" >&5
-$as_echo "$LIPO" >&6; }
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+  { $as_echo "$as_me:$LINENO: result: $RANLIB" >&5
+$as_echo "$RANLIB" >&6; }
 else
   { $as_echo "$as_me:$LINENO: result: no" >&5
 $as_echo "no" >&6; }
@@ -10496,17 +10645,17 @@
 
 
 fi
-if test -z "$ac_cv_prog_LIPO"; then
-  ac_ct_LIPO=$LIPO
-  # Extract the first word of "lipo", so it can be a program name with args.
-set dummy lipo; ac_word=$2
+if test -z "$ac_cv_prog_RANLIB"; then
+  ac_ct_RANLIB=$RANLIB
+  # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then
+if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  if test -n "$ac_ct_LIPO"; then
-  ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
+  if test -n "$ac_ct_RANLIB"; then
+  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
 else
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
@@ -10515,7 +10664,7 @@
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_ac_ct_LIPO="lipo"
+    ac_cv_prog_ac_ct_RANLIB="ranlib"
     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
@@ -10525,17 +10674,17 @@
 
 fi
 fi
-ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
-if test -n "$ac_ct_LIPO"; then
-  { $as_echo "$as_me:$LINENO: result: $ac_ct_LIPO" >&5
-$as_echo "$ac_ct_LIPO" >&6; }
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+  { $as_echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
+$as_echo "$ac_ct_RANLIB" >&6; }
 else
   { $as_echo "$as_me:$LINENO: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
-  if test "x$ac_ct_LIPO" = x; then
-    LIPO=":"
+  if test "x$ac_ct_RANLIB" = x; then
+    RANLIB=":"
   else
     case $cross_compiling:$ac_tool_warned in
 yes:)
@@ -10543,195 +10692,39 @@
 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
 ac_tool_warned=yes ;;
 esac
-    LIPO=$ac_ct_LIPO
+    RANLIB=$ac_ct_RANLIB
   fi
 else
-  LIPO="$ac_cv_prog_LIPO"
+  RANLIB="$ac_cv_prog_RANLIB"
 fi
 
-    if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
-set dummy ${ac_tool_prefix}otool; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_OTOOL+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$OTOOL"; then
-  ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
-else
-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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
+test -z "$RANLIB" && RANLIB=:
 
-fi
-fi
-OTOOL=$ac_cv_prog_OTOOL
-if test -n "$OTOOL"; then
-  { $as_echo "$as_me:$LINENO: result: $OTOOL" >&5
-$as_echo "$OTOOL" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
 
 
-fi
-if test -z "$ac_cv_prog_OTOOL"; then
-  ac_ct_OTOOL=$OTOOL
-  # Extract the first word of "otool", so it can be a program name with args.
-set dummy otool; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ac_ct_OTOOL"; then
-  ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
-else
-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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_ac_ct_OTOOL="otool"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
 
-fi
-fi
-ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
-if test -n "$ac_ct_OTOOL"; then
-  { $as_echo "$as_me:$LINENO: result: $ac_ct_OTOOL" >&5
-$as_echo "$ac_ct_OTOOL" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
 
-  if test "x$ac_ct_OTOOL" = x; then
-    OTOOL=":"
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    OTOOL=$ac_ct_OTOOL
-  fi
-else
-  OTOOL="$ac_cv_prog_OTOOL"
-fi
 
-    if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
-set dummy ${ac_tool_prefix}otool64; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_OTOOL64+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$OTOOL64"; then
-  ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
-else
-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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
+# Determine commands to create old-style static archives.
+old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
+old_postinstall_cmds='chmod 644 $oldlib'
+old_postuninstall_cmds=
 
-fi
-fi
-OTOOL64=$ac_cv_prog_OTOOL64
-if test -n "$OTOOL64"; then
-  { $as_echo "$as_me:$LINENO: result: $OTOOL64" >&5
-$as_echo "$OTOOL64" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+if test -n "$RANLIB"; then
+  case $host_os in
+  openbsd*)
+    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
+    ;;
+  *)
+    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
+    ;;
+  esac
+  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
 fi
 
 
-fi
-if test -z "$ac_cv_prog_OTOOL64"; then
-  ac_ct_OTOOL64=$OTOOL64
-  # Extract the first word of "otool64", so it can be a program name with args.
-set dummy otool64; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ac_ct_OTOOL64"; then
-  ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
-else
-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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_ac_ct_OTOOL64="otool64"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
 
-fi
-fi
-ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
-if test -n "$ac_ct_OTOOL64"; then
-  { $as_echo "$as_me:$LINENO: result: $ac_ct_OTOOL64" >&5
-$as_echo "$ac_ct_OTOOL64" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
 
-  if test "x$ac_ct_OTOOL64" = x; then
-    OTOOL64=":"
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    OTOOL64=$ac_ct_OTOOL64
-  fi
-else
-  OTOOL64="$ac_cv_prog_OTOOL64"
-fi
 
 
 
@@ -10759,393 +10752,251 @@
 
 
 
-    { $as_echo "$as_me:$LINENO: checking for -single_module linker flag" >&5
-$as_echo_n "checking for -single_module linker flag... " >&6; }
-if test "${lt_cv_apple_cc_single_mod+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  lt_cv_apple_cc_single_mod=no
-      if test -z "${LT_MULTI_MODULE}"; then
-	# By default we will add the -single_module flag. You can override
-	# by either setting the environment variable LT_MULTI_MODULE
-	# non-empty at configure time, or by adding -multi_module to the
-	# link flags.
-	rm -rf libconftest.dylib*
-	echo "int foo(void){return 1;}" > conftest.c
-	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
--dynamiclib -Wl,-single_module conftest.c" >&5
-	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
-	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
-        _lt_result=$?
-	if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
-	  lt_cv_apple_cc_single_mod=yes
-	else
-	  cat conftest.err >&5
-	fi
-	rm -rf libconftest.dylib*
-	rm -f conftest.*
-      fi
-fi
-{ $as_echo "$as_me:$LINENO: result: $lt_cv_apple_cc_single_mod" >&5
-$as_echo "$lt_cv_apple_cc_single_mod" >&6; }
-    { $as_echo "$as_me:$LINENO: checking for -exported_symbols_list linker flag" >&5
-$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
-if test "${lt_cv_ld_exported_symbols_list+set}" = set; then
+
+
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+
+# Check for command to grab the raw symbol name followed by C symbol from nm.
+{ $as_echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5
+$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
+if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  lt_cv_ld_exported_symbols_list=no
-      save_LDFLAGS=$LDFLAGS
-      echo "_main" > conftest.sym
-      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
-      cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
 
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  lt_cv_ld_exported_symbols_list=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	lt_cv_ld_exported_symbols_list=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-	LDFLAGS="$save_LDFLAGS"
-
-fi
-{ $as_echo "$as_me:$LINENO: result: $lt_cv_ld_exported_symbols_list" >&5
-$as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
-    case $host_os in
-    rhapsody* | darwin1.[012])
-      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
-    darwin1.*)
-      _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
-    darwin*) # darwin 5.x on
-      # if running on 10.5 or later, the deployment target defaults
-      # to the OS version, if on x86, and 10.4, the deployment
-      # target defaults to 10.4. Don't you love it?
-      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
-	10.0,*86*-darwin8*|10.0,*-darwin[91]*)
-	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
-	10.[012]*)
-	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
-	10.*)
-	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
-      esac
-    ;;
-  esac
-    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
-      _lt_dar_single_mod='$single_module'
-    fi
-    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
-      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
-    else
-      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
-    fi
-    if test "$DSYMUTIL" != ":"; then
-      _lt_dsymutil='~$DSYMUTIL $lib || :'
-    else
-      _lt_dsymutil=
-    fi
-    ;;
-  esac
+# These are sane defaults that work on at least a few old systems.
+# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
 
+# Character class describing NM global symbol codes.
+symcode='[BCDEGRST]'
 
-for ac_header in dlfcn.h
-do
-as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
-$as_echo_n "checking for $ac_header... " >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
+# Regexp to match symbols that can be accessed directly from C.
+sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
 
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
+# Define system-specific variables.
+case $host_os in
+aix*)
+  symcode='[BCDT]'
+  ;;
+cygwin* | mingw* | pw32* | cegcc*)
+  symcode='[ABCDGISTW]'
+  ;;
+hpux*)
+  if test "$host_cpu" = ia64; then
+    symcode='[ABCDEGRST]'
+  fi
+  ;;
+irix* | nonstopux*)
+  symcode='[BCDEGRST]'
+  ;;
+osf*)
+  symcode='[BCDEGQRST]'
+  ;;
+solaris*)
+  symcode='[BDRT]'
+  ;;
+sco3.2v5*)
+  symcode='[DT]'
+  ;;
+sysv4.2uw2*)
+  symcode='[DT]'
+  ;;
+sysv5* | sco5v6* | unixware* | OpenUNIX*)
+  symcode='[ABDT]'
+  ;;
+sysv4)
+  symcode='[DFNSTU]'
+  ;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  eval "$as_ac_Header=yes"
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-	eval "$as_ac_Header=no"
-fi
+# If we're using GNU nm, then use its standard symbol codes.
+case `$NM -V 2>&1` in
+*GNU* | *'with BFD'*)
+  symcode='[ABCDGIRSTW]' ;;
+esac
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-ac_res=`eval 'as_val=${'$as_ac_Header'}
-		 $as_echo "$as_val"'`
-	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-as_val=`eval 'as_val=${'$as_ac_Header'}
-		 $as_echo "$as_val"'`
-   if test "x$as_val" = x""yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+# Transform an extracted symbol line into a proper C declaration.
+# Some systems (esp. on ia64) link data and code symbols differently,
+# so use this general approach.
+lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
 
-fi
+# Transform an extracted symbol line into symbol name and symbol address
+lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"\2\", (void *) \&\2},/p'"
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/  {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"lib\2\", (void *) \&\2},/p'"
 
-done
+# Handle CRLF in mingw tool chain
+opt_cr=
+case $build_os in
+mingw*)
+  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
+  ;;
+esac
 
+# Try without a prefix underscore, then with it.
+for ac_symprfx in "" "_"; do
 
+  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
+  symxfrm="\\1 $ac_symprfx\\2 \\2"
 
-# Set options
-
-
-
-        enable_dlopen=no
-
-
-  enable_win32_dll=no
-
-
-            # Check whether --enable-shared was given.
-if test "${enable_shared+set}" = set; then
-  enableval=$enable_shared; p=${PACKAGE-default}
-    case $enableval in
-    yes) enable_shared=yes ;;
-    no) enable_shared=no ;;
-    *)
-      enable_shared=no
-      # Look at the argument we got.  We use all the common list separators.
-      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
-      for pkg in $enableval; do
-	IFS="$lt_save_ifs"
-	if test "X$pkg" = "X$p"; then
-	  enable_shared=yes
-	fi
-      done
-      IFS="$lt_save_ifs"
-      ;;
-    esac
-else
-  enable_shared=yes
-fi
+  # Write the raw and C identifiers.
+  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+    # Fake it for dumpbin and say T for any non-static function
+    # and D for any global variable.
+    # Also find C++ and __fastcall symbols from MSVC++,
+    # which start with @ or ?.
+    lt_cv_sys_global_symbol_pipe="$AWK '"\
+"     {last_section=section; section=\$ 3};"\
+"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
+"     \$ 0!~/External *\|/{next};"\
+"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
+"     {if(hide[section]) next};"\
+"     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
+"     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
+"     s[1]~/^[ ?]/{print s[1], s[1]; next};"\
+"     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
+"     ' prfx=^$ac_symprfx"
+  else
+    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[	 ]\($symcode$symcode*\)[	 ][	 ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
+  fi
 
+  # Check to see that the pipe works correctly.
+  pipe_works=no
 
+  rm -f conftest*
+  cat > conftest.$ac_ext <<_LT_EOF
+#ifdef __cplusplus
+extern "C" {
+#endif
+char nm_test_var;
+void nm_test_func(void);
+void nm_test_func(void){}
+#ifdef __cplusplus
+}
+#endif
+int main(){nm_test_var='a';nm_test_func();return(0);}
+_LT_EOF
 
+  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+    # Now try to grab the symbols.
+    nlist=conftest.nm
+    if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5
+  (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && test -s "$nlist"; then
+      # Try sorting and uniquifying the output.
+      if sort "$nlist" | uniq > "$nlist"T; then
+	mv -f "$nlist"T "$nlist"
+      else
+	rm -f "$nlist"T
+      fi
 
+      # Make sure that we snagged all the symbols we need.
+      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
+	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
+	  cat <<_LT_EOF > conftest.$ac_ext
+#ifdef __cplusplus
+extern "C" {
+#endif
 
+_LT_EOF
+	  # Now generate the symbol file.
+	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
 
+	  cat <<_LT_EOF >> conftest.$ac_ext
 
+/* The mapping between symbol names and symbols.  */
+const struct {
+  const char *name;
+  void       *address;
+}
+lt__PROGRAM__LTX_preloaded_symbols[] =
+{
+  { "@PROGRAM@", (void *) 0 },
+_LT_EOF
+	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
+	  cat <<\_LT_EOF >> conftest.$ac_ext
+  {0, (void *) 0}
+};
 
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+  return lt__PROGRAM__LTX_preloaded_symbols;
+}
+#endif
 
-  # Check whether --enable-static was given.
-if test "${enable_static+set}" = set; then
-  enableval=$enable_static; p=${PACKAGE-default}
-    case $enableval in
-    yes) enable_static=yes ;;
-    no) enable_static=no ;;
-    *)
-     enable_static=no
-      # Look at the argument we got.  We use all the common list separators.
-      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
-      for pkg in $enableval; do
-	IFS="$lt_save_ifs"
-	if test "X$pkg" = "X$p"; then
-	  enable_static=yes
+#ifdef __cplusplus
+}
+#endif
+_LT_EOF
+	  # Now try linking the two files.
+	  mv conftest.$ac_objext conftstm.$ac_objext
+	  lt_save_LIBS="$LIBS"
+	  lt_save_CFLAGS="$CFLAGS"
+	  LIBS="conftstm.$ac_objext"
+	  CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
+	  if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && test -s conftest${ac_exeext}; then
+	    pipe_works=yes
+	  fi
+	  LIBS="$lt_save_LIBS"
+	  CFLAGS="$lt_save_CFLAGS"
+	else
+	  echo "cannot find nm_test_func in $nlist" >&5
 	fi
-      done
-      IFS="$lt_save_ifs"
-      ;;
-    esac
-else
-  enable_static=yes
-fi
-
-
-
-
-
-
-
-
-
-
-# Check whether --with-pic was given.
-if test "${with_pic+set}" = set; then
-  withval=$with_pic; pic_mode="$withval"
-else
-  pic_mode=default
-fi
-
-
-test -z "$pic_mode" && pic_mode=default
-
-
-
-
-
+      else
+	echo "cannot find nm_test_var in $nlist" >&5
+      fi
+    else
+      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
+    fi
+  else
+    echo "$progname: failed program was:" >&5
+    cat conftest.$ac_ext >&5
+  fi
+  rm -rf conftest* conftst*
 
+  # Do not use the global_symbol_pipe unless it works.
+  if test "$pipe_works" = yes; then
+    break
+  else
+    lt_cv_sys_global_symbol_pipe=
+  fi
+done
 
-  # Check whether --enable-fast-install was given.
-if test "${enable_fast_install+set}" = set; then
-  enableval=$enable_fast_install; p=${PACKAGE-default}
-    case $enableval in
-    yes) enable_fast_install=yes ;;
-    no) enable_fast_install=no ;;
-    *)
-      enable_fast_install=no
-      # Look at the argument we got.  We use all the common list separators.
-      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
-      for pkg in $enableval; do
-	IFS="$lt_save_ifs"
-	if test "X$pkg" = "X$p"; then
-	  enable_fast_install=yes
-	fi
-      done
-      IFS="$lt_save_ifs"
-      ;;
-    esac
-else
-  enable_fast_install=yes
 fi
 
-
-
-
-
-
-
-
-
-
-
-# This can be used to rebuild libtool when needed
-LIBTOOL_DEPS="$ltmain"
-
-# Always use our own libtool.
-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-test -z "$LN_S" && LN_S="ln -s"
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-if test -n "${ZSH_VERSION+set}" ; then
-   setopt NO_GLOB_SUBST
+if test -z "$lt_cv_sys_global_symbol_pipe"; then
+  lt_cv_sys_global_symbol_to_cdecl=
 fi
-
-{ $as_echo "$as_me:$LINENO: checking for objdir" >&5
-$as_echo_n "checking for objdir... " >&6; }
-if test "${lt_cv_objdir+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  rm -f .libs 2>/dev/null
-mkdir .libs 2>/dev/null
-if test -d .libs; then
-  lt_cv_objdir=.libs
+if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
+  { $as_echo "$as_me:$LINENO: result: failed" >&5
+$as_echo "failed" >&6; }
 else
-  # MS-DOS does not allow filenames that begin with a dot.
-  lt_cv_objdir=_libs
-fi
-rmdir .libs 2>/dev/null
+  { $as_echo "$as_me:$LINENO: result: ok" >&5
+$as_echo "ok" >&6; }
 fi
-{ $as_echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5
-$as_echo "$lt_cv_objdir" >&6; }
-objdir=$lt_cv_objdir
 
 
 
 
 
-cat >>confdefs.h <<_ACEOF
-#define LT_OBJDIR "$lt_cv_objdir/"
-_ACEOF
-
 
 
 
@@ -11162,1931 +11013,1738 @@
 
 
 
-case $host_os in
-aix3*)
-  # AIX sometimes has problems with the GCC collect2 program.  For some
-  # reason, if we set the COLLECT_NAMES environment variable, the problems
-  # vanish in a puff of smoke.
-  if test "X${COLLECT_NAMES+set}" != Xset; then
-    COLLECT_NAMES=
-    export COLLECT_NAMES
-  fi
-  ;;
-esac
 
-# Sed substitution that helps us do robust quoting.  It backslashifies
-# metacharacters that are still active within double-quoted strings.
-sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
+# Check whether --enable-libtool-lock was given.
+if test "${enable_libtool_lock+set}" = set; then
+  enableval=$enable_libtool_lock;
+fi
 
-# Same as above, but do not quote variable references.
-double_quote_subst='s/\(["`\\]\)/\\\1/g'
+test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
 
-# Sed substitution to delay expansion of an escaped shell variable in a
-# double_quote_subst'ed string.
-delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
+# Some flags need to be propagated to the compiler or linker for good
+# libtool support.
+case $host in
+ia64-*-hpux*)
+  # Find out which ABI we are using.
+  echo 'int i;' > conftest.$ac_ext
+  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+    case `/usr/bin/file conftest.$ac_objext` in
+      *ELF-32*)
+	HPUX_IA64_MODE="32"
+	;;
+      *ELF-64*)
+	HPUX_IA64_MODE="64"
+	;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
+*-*-irix6*)
+  # Find out which ABI we are using.
+  echo '#line 11048 "configure"' > conftest.$ac_ext
+  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+    if test "$lt_cv_prog_gnu_ld" = yes; then
+      case `/usr/bin/file conftest.$ac_objext` in
+	*32-bit*)
+	  LD="${LD-ld} -melf32bsmip"
+	  ;;
+	*N32*)
+	  LD="${LD-ld} -melf32bmipn32"
+	  ;;
+	*64-bit*)
+	  LD="${LD-ld} -melf64bmip"
+	;;
+      esac
+    else
+      case `/usr/bin/file conftest.$ac_objext` in
+	*32-bit*)
+	  LD="${LD-ld} -32"
+	  ;;
+	*N32*)
+	  LD="${LD-ld} -n32"
+	  ;;
+	*64-bit*)
+	  LD="${LD-ld} -64"
+	  ;;
+      esac
+    fi
+  fi
+  rm -rf conftest*
+  ;;
 
-# Sed substitution to delay expansion of an escaped single quote.
-delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
+s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
+  # Find out which ABI we are using.
+  echo 'int i;' > conftest.$ac_ext
+  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+    case `/usr/bin/file conftest.o` in
+      *32-bit*)
+	case $host in
+	  x86_64-*kfreebsd*-gnu)
+	    LD="${LD-ld} -m elf_i386_fbsd"
+	    ;;
+	  x86_64-*linux*)
+	    LD="${LD-ld} -m elf_i386"
+	    ;;
+	  ppc64-*linux*|powerpc64-*linux*)
+	    LD="${LD-ld} -m elf32ppclinux"
+	    ;;
+	  s390x-*linux*)
+	    LD="${LD-ld} -m elf_s390"
+	    ;;
+	  sparc64-*linux*)
+	    LD="${LD-ld} -m elf32_sparc"
+	    ;;
+	esac
+	;;
+      *64-bit*)
+	case $host in
+	  x86_64-*kfreebsd*-gnu)
+	    LD="${LD-ld} -m elf_x86_64_fbsd"
+	    ;;
+	  x86_64-*linux*)
+	    LD="${LD-ld} -m elf_x86_64"
+	    ;;
+	  ppc*-*linux*|powerpc*-*linux*)
+	    LD="${LD-ld} -m elf64ppc"
+	    ;;
+	  s390*-*linux*|s390*-*tpf*)
+	    LD="${LD-ld} -m elf64_s390"
+	    ;;
+	  sparc*-*linux*)
+	    LD="${LD-ld} -m elf64_sparc"
+	    ;;
+	esac
+	;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
 
-# Sed substitution to avoid accidental globbing in evaled expressions
-no_glob_subst='s/\*/\\\*/g'
+*-*-sco3.2v5*)
+  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
+  SAVE_CFLAGS="$CFLAGS"
+  CFLAGS="$CFLAGS -belf"
+  { $as_echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5
+$as_echo_n "checking whether the C compiler needs -belf... " >&6; }
+if test "${lt_cv_cc_needs_belf+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
-# Global variables:
-ofile=libtool
-can_build_shared=yes
+     cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
-# All known linkers require a `.a' archive for static linking (except MSVC,
-# which needs '.lib').
-libext=a
+int
+main ()
+{
 
-with_gnu_ld="$lt_cv_prog_gnu_ld"
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  lt_cv_cc_needs_belf=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-old_CC="$CC"
-old_CFLAGS="$CFLAGS"
+	lt_cv_cc_needs_belf=no
+fi
 
-# Set sane defaults for various variables
-test -z "$CC" && CC=cc
-test -z "$LTCC" && LTCC=$CC
-test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
-test -z "$LD" && LD=ld
-test -z "$ac_objext" && ac_objext=o
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+     ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
-for cc_temp in $compiler""; do
-  case $cc_temp in
-    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
-    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
-    \-*) ;;
-    *) break;;
-  esac
-done
-cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+fi
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5
+$as_echo "$lt_cv_cc_needs_belf" >&6; }
+  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
+    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
+    CFLAGS="$SAVE_CFLAGS"
+  fi
+  ;;
+sparc*-*solaris*)
+  # Find out which ABI we are using.
+  echo 'int i;' > conftest.$ac_ext
+  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+    case `/usr/bin/file conftest.o` in
+    *64-bit*)
+      case $lt_cv_prog_gnu_ld in
+      yes*) LD="${LD-ld} -m elf64_sparc" ;;
+      *)
+	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
+	  LD="${LD-ld} -64"
+	fi
+	;;
+      esac
+      ;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
+esac
 
+need_locks="$enable_libtool_lock"
 
-# Only perform the check for file, if the check method requires it
-test -z "$MAGIC_CMD" && MAGIC_CMD=file
-case $deplibs_check_method in
-file_magic*)
-  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
-    { $as_echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5
-$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
-if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
+
+  case $host_os in
+    rhapsody* | darwin*)
+    if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
+set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_DSYMUTIL+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  case $MAGIC_CMD in
-[\\/*] |  ?:[\\/]*)
-  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
-  ;;
-*)
-  lt_save_MAGIC_CMD="$MAGIC_CMD"
-  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
-  for ac_dir in $ac_dummy; do
-    IFS="$lt_save_ifs"
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/${ac_tool_prefix}file; then
-      lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
-      if test -n "$file_magic_test_file"; then
-	case $deplibs_check_method in
-	"file_magic "*)
-	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
-	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
-	    $EGREP "$file_magic_regex" > /dev/null; then
-	    :
-	  else
-	    cat <<_LT_EOF 1>&2
-
-*** Warning: the command libtool uses to detect shared libraries,
-*** $file_magic_cmd, produces output that libtool cannot recognize.
-*** The result is that libtool may fail to recognize shared libraries
-*** as such.  This will affect the creation of libtool libraries that
-*** depend on shared libraries, but programs linked with such libtool
-*** libraries will work regardless of this problem.  Nevertheless, you
-*** may want to report the problem to your system manager and/or to
-*** bug-libtool gnu org
+  if test -n "$DSYMUTIL"; then
+  ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
+else
+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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
 
-_LT_EOF
-	  fi ;;
-	esac
-      fi
-      break
-    fi
-  done
-  IFS="$lt_save_ifs"
-  MAGIC_CMD="$lt_save_MAGIC_CMD"
-  ;;
-esac
 fi
-
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-if test -n "$MAGIC_CMD"; then
-  { $as_echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
-$as_echo "$MAGIC_CMD" >&6; }
+fi
+DSYMUTIL=$ac_cv_prog_DSYMUTIL
+if test -n "$DSYMUTIL"; then
+  { $as_echo "$as_me:$LINENO: result: $DSYMUTIL" >&5
+$as_echo "$DSYMUTIL" >&6; }
 else
   { $as_echo "$as_me:$LINENO: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
 
-
-
-
-if test -z "$lt_cv_path_MAGIC_CMD"; then
-  if test -n "$ac_tool_prefix"; then
-    { $as_echo "$as_me:$LINENO: checking for file" >&5
-$as_echo_n "checking for file... " >&6; }
-if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
+fi
+if test -z "$ac_cv_prog_DSYMUTIL"; then
+  ac_ct_DSYMUTIL=$DSYMUTIL
+  # Extract the first word of "dsymutil", so it can be a program name with args.
+set dummy dsymutil; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  case $MAGIC_CMD in
-[\\/*] |  ?:[\\/]*)
-  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
-  ;;
-*)
-  lt_save_MAGIC_CMD="$MAGIC_CMD"
-  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
-  for ac_dir in $ac_dummy; do
-    IFS="$lt_save_ifs"
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/file; then
-      lt_cv_path_MAGIC_CMD="$ac_dir/file"
-      if test -n "$file_magic_test_file"; then
-	case $deplibs_check_method in
-	"file_magic "*)
-	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
-	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
-	    $EGREP "$file_magic_regex" > /dev/null; then
-	    :
-	  else
-	    cat <<_LT_EOF 1>&2
-
-*** Warning: the command libtool uses to detect shared libraries,
-*** $file_magic_cmd, produces output that libtool cannot recognize.
-*** The result is that libtool may fail to recognize shared libraries
-*** as such.  This will affect the creation of libtool libraries that
-*** depend on shared libraries, but programs linked with such libtool
-*** libraries will work regardless of this problem.  Nevertheless, you
-*** may want to report the problem to your system manager and/or to
-*** bug-libtool gnu org
+  if test -n "$ac_ct_DSYMUTIL"; then
+  ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
+else
+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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
 
-_LT_EOF
-	  fi ;;
-	esac
-      fi
-      break
-    fi
-  done
-  IFS="$lt_save_ifs"
-  MAGIC_CMD="$lt_save_MAGIC_CMD"
-  ;;
-esac
 fi
-
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-if test -n "$MAGIC_CMD"; then
-  { $as_echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
-$as_echo "$MAGIC_CMD" >&6; }
+fi
+ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
+if test -n "$ac_ct_DSYMUTIL"; then
+  { $as_echo "$as_me:$LINENO: result: $ac_ct_DSYMUTIL" >&5
+$as_echo "$ac_ct_DSYMUTIL" >&6; }
 else
   { $as_echo "$as_me:$LINENO: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
-
+  if test "x$ac_ct_DSYMUTIL" = x; then
+    DSYMUTIL=":"
   else
-    MAGIC_CMD=:
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    DSYMUTIL=$ac_ct_DSYMUTIL
   fi
+else
+  DSYMUTIL="$ac_cv_prog_DSYMUTIL"
 fi
 
+    if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
+set dummy ${ac_tool_prefix}nmedit; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_NMEDIT+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$NMEDIT"; then
+  ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
+else
+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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
   fi
-  ;;
-esac
-
-# Use C for the default configuration in the libtool script
-
-lt_save_CC="$CC"
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
+done
+done
+IFS=$as_save_IFS
 
-# Source file extension for C test sources.
-ac_ext=c
+fi
+fi
+NMEDIT=$ac_cv_prog_NMEDIT
+if test -n "$NMEDIT"; then
+  { $as_echo "$as_me:$LINENO: result: $NMEDIT" >&5
+$as_echo "$NMEDIT" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
 
-# Object file extension for compiled C test sources.
-objext=o
-objext=$objext
 
-# Code to be used in simple compile tests
-lt_simple_compile_test_code="int some_variable = 0;"
+fi
+if test -z "$ac_cv_prog_NMEDIT"; then
+  ac_ct_NMEDIT=$NMEDIT
+  # Extract the first word of "nmedit", so it can be a program name with args.
+set dummy nmedit; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_NMEDIT"; then
+  ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
+else
+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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_NMEDIT="nmedit"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
 
-# Code to be used in simple link tests
-lt_simple_link_test_code='int main(){return(0);}'
-
-
-
-
-
-
-
-# If no C compiler was specified, use CC.
-LTCC=${LTCC-"$CC"}
-
-# If no C compiler flags were specified, use CFLAGS.
-LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
-
-# Allow CC to be a program name with arguments.
-compiler=$CC
-
-# Save the default compiler, since it gets overwritten when the other
-# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
-compiler_DEFAULT=$CC
-
-# save warnings/boilerplate of simple test code
-ac_outfile=conftest.$ac_objext
-echo "$lt_simple_compile_test_code" >conftest.$ac_ext
-eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_compiler_boilerplate=`cat conftest.err`
-$RM conftest*
-
-ac_outfile=conftest.$ac_objext
-echo "$lt_simple_link_test_code" >conftest.$ac_ext
-eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_linker_boilerplate=`cat conftest.err`
-$RM -r conftest*
+fi
+fi
+ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
+if test -n "$ac_ct_NMEDIT"; then
+  { $as_echo "$as_me:$LINENO: result: $ac_ct_NMEDIT" >&5
+$as_echo "$ac_ct_NMEDIT" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
 
+  if test "x$ac_ct_NMEDIT" = x; then
+    NMEDIT=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    NMEDIT=$ac_ct_NMEDIT
+  fi
+else
+  NMEDIT="$ac_cv_prog_NMEDIT"
+fi
 
-if test -n "$compiler"; then
+    if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
+set dummy ${ac_tool_prefix}lipo; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_LIPO+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$LIPO"; then
+  ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
+else
+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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
 
-lt_prog_compiler_no_builtin_flag=
+fi
+fi
+LIPO=$ac_cv_prog_LIPO
+if test -n "$LIPO"; then
+  { $as_echo "$as_me:$LINENO: result: $LIPO" >&5
+$as_echo "$LIPO" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
 
-if test "$GCC" = yes; then
-  lt_prog_compiler_no_builtin_flag=' -fno-builtin'
 
-  { $as_echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
-$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
-if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then
+fi
+if test -z "$ac_cv_prog_LIPO"; then
+  ac_ct_LIPO=$LIPO
+  # Extract the first word of "lipo", so it can be a program name with args.
+set dummy lipo; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  lt_cv_prog_compiler_rtti_exceptions=no
-   ac_outfile=conftest.$ac_objext
-   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-   lt_compiler_flag="-fno-rtti -fno-exceptions"
-   # Insert the option either (1) after the last *FLAGS variable, or
-   # (2) before a word containing "conftest.", or (3) at the end.
-   # Note that $ac_compile itself does not contain backslashes and begins
-   # with a dollar sign (not a hyphen), so the echo should work correctly.
-   # The option is referenced via a variable to avoid confusing sed.
-   lt_compile=`echo "$ac_compile" | $SED \
-   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-   -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:11447: $lt_compile\"" >&5)
-   (eval "$lt_compile" 2>conftest.err)
-   ac_status=$?
-   cat conftest.err >&5
-   echo "$as_me:11451: \$? = $ac_status" >&5
-   if (exit $ac_status) && test -s "$ac_outfile"; then
-     # The compiler can only warn and ignore the option if not recognized
-     # So say no if there are warnings other than the usual output.
-     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
-     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
-     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
-       lt_cv_prog_compiler_rtti_exceptions=yes
-     fi
-   fi
-   $RM conftest*
+  if test -n "$ac_ct_LIPO"; then
+  ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
+else
+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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_LIPO="lipo"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
 
 fi
-{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
-$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
-
-if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
-    lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
+fi
+ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
+if test -n "$ac_ct_LIPO"; then
+  { $as_echo "$as_me:$LINENO: result: $ac_ct_LIPO" >&5
+$as_echo "$ac_ct_LIPO" >&6; }
 else
-    :
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
+  if test "x$ac_ct_LIPO" = x; then
+    LIPO=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    LIPO=$ac_ct_LIPO
+  fi
+else
+  LIPO="$ac_cv_prog_LIPO"
 fi
 
+    if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
+set dummy ${ac_tool_prefix}otool; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_OTOOL+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$OTOOL"; then
+  ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
+else
+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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
 
+fi
+fi
+OTOOL=$ac_cv_prog_OTOOL
+if test -n "$OTOOL"; then
+  { $as_echo "$as_me:$LINENO: result: $OTOOL" >&5
+$as_echo "$OTOOL" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
 
 
+fi
+if test -z "$ac_cv_prog_OTOOL"; then
+  ac_ct_OTOOL=$OTOOL
+  # Extract the first word of "otool", so it can be a program name with args.
+set dummy otool; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_OTOOL"; then
+  ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
+else
+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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_OTOOL="otool"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
 
+fi
+fi
+ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
+if test -n "$ac_ct_OTOOL"; then
+  { $as_echo "$as_me:$LINENO: result: $ac_ct_OTOOL" >&5
+$as_echo "$ac_ct_OTOOL" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
 
-  lt_prog_compiler_wl=
-lt_prog_compiler_pic=
-lt_prog_compiler_static=
+  if test "x$ac_ct_OTOOL" = x; then
+    OTOOL=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    OTOOL=$ac_ct_OTOOL
+  fi
+else
+  OTOOL="$ac_cv_prog_OTOOL"
+fi
 
-{ $as_echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
-$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+    if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
+set dummy ${ac_tool_prefix}otool64; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_OTOOL64+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$OTOOL64"; then
+  ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
+else
+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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
 
-  if test "$GCC" = yes; then
-    lt_prog_compiler_wl='-Wl,'
-    lt_prog_compiler_static='-static'
+fi
+fi
+OTOOL64=$ac_cv_prog_OTOOL64
+if test -n "$OTOOL64"; then
+  { $as_echo "$as_me:$LINENO: result: $OTOOL64" >&5
+$as_echo "$OTOOL64" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
 
-    case $host_os in
-      aix*)
-      # All AIX code is PIC.
-      if test "$host_cpu" = ia64; then
-	# AIX 5 now supports IA64 processor
-	lt_prog_compiler_static='-Bstatic'
-      fi
-      ;;
 
-    amigaos*)
-      case $host_cpu in
-      powerpc)
-            # see comment about AmigaOS4 .so support
-            lt_prog_compiler_pic='-fPIC'
-        ;;
-      m68k)
-            # FIXME: we need at least 68020 code to build shared libraries, but
-            # adding the `-m68020' flag to GCC prevents building anything better,
-            # like `-m68040'.
-            lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
-        ;;
-      esac
-      ;;
+fi
+if test -z "$ac_cv_prog_OTOOL64"; then
+  ac_ct_OTOOL64=$OTOOL64
+  # Extract the first word of "otool64", so it can be a program name with args.
+set dummy otool64; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_OTOOL64"; then
+  ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
+else
+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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_OTOOL64="otool64"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
 
-    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
-      # PIC is the default for these OSes.
-      ;;
+fi
+fi
+ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
+if test -n "$ac_ct_OTOOL64"; then
+  { $as_echo "$as_me:$LINENO: result: $ac_ct_OTOOL64" >&5
+$as_echo "$ac_ct_OTOOL64" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
 
-    mingw* | cygwin* | pw32* | os2* | cegcc*)
-      # This hack is so that the source file can tell whether it is being
-      # built for inclusion in a dll (and should export symbols for example).
-      # Although the cygwin gcc ignores -fPIC, still need this for old-style
-      # (--disable-auto-import) libraries
-      lt_prog_compiler_pic='-DDLL_EXPORT'
-      ;;
+  if test "x$ac_ct_OTOOL64" = x; then
+    OTOOL64=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    OTOOL64=$ac_ct_OTOOL64
+  fi
+else
+  OTOOL64="$ac_cv_prog_OTOOL64"
+fi
 
-    darwin* | rhapsody*)
-      # PIC is the default on this platform
-      # Common symbols not allowed in MH_DYLIB files
-      lt_prog_compiler_pic='-fno-common'
-      ;;
 
-    hpux*)
-      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
-      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
-      # sets the default TLS model and affects inlining.
-      case $host_cpu in
-      hppa*64*)
-	# +Z the default
-	;;
-      *)
-	lt_prog_compiler_pic='-fPIC'
-	;;
-      esac
-      ;;
 
-    interix[3-9]*)
-      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
-      # Instead, we relocate shared libraries at runtime.
-      ;;
 
-    msdosdjgpp*)
-      # Just because we use GCC doesn't mean we suddenly get shared libraries
-      # on systems that don't support them.
-      lt_prog_compiler_can_build_shared=no
-      enable_shared=no
-      ;;
 
-    *nto* | *qnx*)
-      # QNX uses GNU C++, but need to define -shared option too, otherwise
-      # it will coredump.
-      lt_prog_compiler_pic='-fPIC -shared'
-      ;;
 
-    sysv4*MP*)
-      if test -d /usr/nec; then
-	lt_prog_compiler_pic=-Kconform_pic
-      fi
-      ;;
 
-    *)
-      lt_prog_compiler_pic='-fPIC'
-      ;;
-    esac
-  else
-    # PORTME Check for flag to pass linker flags through the system compiler.
-    case $host_os in
-    aix*)
-      lt_prog_compiler_wl='-Wl,'
-      if test "$host_cpu" = ia64; then
-	# AIX 5 now supports IA64 processor
-	lt_prog_compiler_static='-Bstatic'
-      else
-	lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
-      fi
-      ;;
 
-    mingw* | cygwin* | pw32* | os2* | cegcc*)
-      # This hack is so that the source file can tell whether it is being
-      # built for inclusion in a dll (and should export symbols for example).
-      lt_prog_compiler_pic='-DDLL_EXPORT'
-      ;;
 
-    hpux9* | hpux10* | hpux11*)
-      lt_prog_compiler_wl='-Wl,'
-      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
-      # not for PA HP-UX.
-      case $host_cpu in
-      hppa*64*|ia64*)
-	# +Z the default
-	;;
-      *)
-	lt_prog_compiler_pic='+Z'
-	;;
-      esac
-      # Is there a better lt_prog_compiler_static that works with the bundled CC?
-      lt_prog_compiler_static='${wl}-a ${wl}archive'
-      ;;
 
-    irix5* | irix6* | nonstopux*)
-      lt_prog_compiler_wl='-Wl,'
-      # PIC (with -KPIC) is the default.
-      lt_prog_compiler_static='-non_shared'
-      ;;
 
-    linux* | k*bsd*-gnu)
-      case $cc_basename in
-      # old Intel for x86_64 which still supported -KPIC.
-      ecc*)
-	lt_prog_compiler_wl='-Wl,'
-	lt_prog_compiler_pic='-KPIC'
-	lt_prog_compiler_static='-static'
-        ;;
-      # icc used to be incompatible with GCC.
-      # ICC 10 doesn't accept -KPIC any more.
-      icc* | ifort*)
-	lt_prog_compiler_wl='-Wl,'
-	lt_prog_compiler_pic='-fPIC'
-	lt_prog_compiler_static='-static'
-        ;;
-      # Lahey Fortran 8.1.
-      lf95*)
-	lt_prog_compiler_wl='-Wl,'
-	lt_prog_compiler_pic='--shared'
-	lt_prog_compiler_static='--static'
-	;;
-      pgcc* | pgf77* | pgf90* | pgf95*)
-        # Portland Group compilers (*not* the Pentium gcc compiler,
-	# which looks to be a dead project)
-	lt_prog_compiler_wl='-Wl,'
-	lt_prog_compiler_pic='-fpic'
-	lt_prog_compiler_static='-Bstatic'
-        ;;
-      ccc*)
-        lt_prog_compiler_wl='-Wl,'
-        # All Alpha code is PIC.
-        lt_prog_compiler_static='-non_shared'
-        ;;
-      xl*)
-	# IBM XL C 8.0/Fortran 10.1 on PPC
-	lt_prog_compiler_wl='-Wl,'
-	lt_prog_compiler_pic='-qpic'
-	lt_prog_compiler_static='-qstaticlink'
-	;;
-      *)
-	case `$CC -V 2>&1 | sed 5q` in
-	*Sun\ C*)
-	  # Sun C 5.9
-	  lt_prog_compiler_pic='-KPIC'
-	  lt_prog_compiler_static='-Bstatic'
-	  lt_prog_compiler_wl='-Wl,'
-	  ;;
-	*Sun\ F*)
-	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
-	  lt_prog_compiler_pic='-KPIC'
-	  lt_prog_compiler_static='-Bstatic'
-	  lt_prog_compiler_wl=''
-	  ;;
-	esac
-	;;
-      esac
-      ;;
-
-    newsos6)
-      lt_prog_compiler_pic='-KPIC'
-      lt_prog_compiler_static='-Bstatic'
-      ;;
-
-    *nto* | *qnx*)
-      # QNX uses GNU C++, but need to define -shared option too, otherwise
-      # it will coredump.
-      lt_prog_compiler_pic='-fPIC -shared'
-      ;;
-
-    osf3* | osf4* | osf5*)
-      lt_prog_compiler_wl='-Wl,'
-      # All OSF/1 code is PIC.
-      lt_prog_compiler_static='-non_shared'
-      ;;
 
-    rdos*)
-      lt_prog_compiler_static='-non_shared'
-      ;;
 
-    solaris*)
-      lt_prog_compiler_pic='-KPIC'
-      lt_prog_compiler_static='-Bstatic'
-      case $cc_basename in
-      f77* | f90* | f95*)
-	lt_prog_compiler_wl='-Qoption ld ';;
-      *)
-	lt_prog_compiler_wl='-Wl,';;
-      esac
-      ;;
 
-    sunos4*)
-      lt_prog_compiler_wl='-Qoption ld '
-      lt_prog_compiler_pic='-PIC'
-      lt_prog_compiler_static='-Bstatic'
-      ;;
 
-    sysv4 | sysv4.2uw2* | sysv4.3*)
-      lt_prog_compiler_wl='-Wl,'
-      lt_prog_compiler_pic='-KPIC'
-      lt_prog_compiler_static='-Bstatic'
-      ;;
 
-    sysv4*MP*)
-      if test -d /usr/nec ;then
-	lt_prog_compiler_pic='-Kconform_pic'
-	lt_prog_compiler_static='-Bstatic'
-      fi
-      ;;
 
-    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
-      lt_prog_compiler_wl='-Wl,'
-      lt_prog_compiler_pic='-KPIC'
-      lt_prog_compiler_static='-Bstatic'
-      ;;
 
-    unicos*)
-      lt_prog_compiler_wl='-Wl,'
-      lt_prog_compiler_can_build_shared=no
-      ;;
 
-    uts4*)
-      lt_prog_compiler_pic='-pic'
-      lt_prog_compiler_static='-Bstatic'
-      ;;
 
-    *)
-      lt_prog_compiler_can_build_shared=no
-      ;;
-    esac
-  fi
 
-case $host_os in
-  # For platforms which do not support PIC, -DPIC is meaningless:
-  *djgpp*)
-    lt_prog_compiler_pic=
-    ;;
-  *)
-    lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
-    ;;
-esac
-{ $as_echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5
-$as_echo "$lt_prog_compiler_pic" >&6; }
 
 
 
 
 
 
-#
-# Check to make sure the PIC flag actually works.
-#
-if test -n "$lt_prog_compiler_pic"; then
-  { $as_echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
-$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
-if test "${lt_cv_prog_compiler_pic_works+set}" = set; then
+    { $as_echo "$as_me:$LINENO: checking for -single_module linker flag" >&5
+$as_echo_n "checking for -single_module linker flag... " >&6; }
+if test "${lt_cv_apple_cc_single_mod+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  lt_cv_prog_compiler_pic_works=no
-   ac_outfile=conftest.$ac_objext
-   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-   lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
-   # Insert the option either (1) after the last *FLAGS variable, or
-   # (2) before a word containing "conftest.", or (3) at the end.
-   # Note that $ac_compile itself does not contain backslashes and begins
-   # with a dollar sign (not a hyphen), so the echo should work correctly.
-   # The option is referenced via a variable to avoid confusing sed.
-   lt_compile=`echo "$ac_compile" | $SED \
-   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-   -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:11786: $lt_compile\"" >&5)
-   (eval "$lt_compile" 2>conftest.err)
-   ac_status=$?
-   cat conftest.err >&5
-   echo "$as_me:11790: \$? = $ac_status" >&5
-   if (exit $ac_status) && test -s "$ac_outfile"; then
-     # The compiler can only warn and ignore the option if not recognized
-     # So say no if there are warnings other than the usual output.
-     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
-     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
-     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
-       lt_cv_prog_compiler_pic_works=yes
-     fi
-   fi
-   $RM conftest*
-
+  lt_cv_apple_cc_single_mod=no
+      if test -z "${LT_MULTI_MODULE}"; then
+	# By default we will add the -single_module flag. You can override
+	# by either setting the environment variable LT_MULTI_MODULE
+	# non-empty at configure time, or by adding -multi_module to the
+	# link flags.
+	rm -rf libconftest.dylib*
+	echo "int foo(void){return 1;}" > conftest.c
+	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+-dynamiclib -Wl,-single_module conftest.c" >&5
+	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
+        _lt_result=$?
+	if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
+	  lt_cv_apple_cc_single_mod=yes
+	else
+	  cat conftest.err >&5
+	fi
+	rm -rf libconftest.dylib*
+	rm -f conftest.*
+      fi
 fi
-{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works" >&5
-$as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
-
-if test x"$lt_cv_prog_compiler_pic_works" = xyes; then
-    case $lt_prog_compiler_pic in
-     "" | " "*) ;;
-     *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
-     esac
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_apple_cc_single_mod" >&5
+$as_echo "$lt_cv_apple_cc_single_mod" >&6; }
+    { $as_echo "$as_me:$LINENO: checking for -exported_symbols_list linker flag" >&5
+$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
+if test "${lt_cv_ld_exported_symbols_list+set}" = set; then
+  $as_echo_n "(cached) " >&6
 else
-    lt_prog_compiler_pic=
-     lt_prog_compiler_can_build_shared=no
-fi
+  lt_cv_ld_exported_symbols_list=no
+      save_LDFLAGS=$LDFLAGS
+      echo "_main" > conftest.sym
+      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
+      cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
-fi
+int
+main ()
+{
 
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  lt_cv_ld_exported_symbols_list=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+	lt_cv_ld_exported_symbols_list=no
+fi
 
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+	LDFLAGS="$save_LDFLAGS"
 
+fi
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_ld_exported_symbols_list" >&5
+$as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
+    case $host_os in
+    rhapsody* | darwin1.[012])
+      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
+    darwin1.*)
+      _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+    darwin*) # darwin 5.x on
+      # if running on 10.5 or later, the deployment target defaults
+      # to the OS version, if on x86, and 10.4, the deployment
+      # target defaults to 10.4. Don't you love it?
+      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
+	10.0,*86*-darwin8*|10.0,*-darwin[91]*)
+	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+	10.[012]*)
+	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+	10.*)
+	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+      esac
+    ;;
+  esac
+    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
+      _lt_dar_single_mod='$single_module'
+    fi
+    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
+      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
+    else
+      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
+    fi
+    if test "$DSYMUTIL" != ":"; then
+      _lt_dsymutil='~$DSYMUTIL $lib || :'
+    else
+      _lt_dsymutil=
+    fi
+    ;;
+  esac
 
 
-#
-# Check to make sure the static flag actually works.
-#
-wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
-{ $as_echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
-$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
-if test "${lt_cv_prog_compiler_static_works+set}" = set; then
+for ac_header in dlfcn.h
+do
+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
   $as_echo_n "(cached) " >&6
 else
-  lt_cv_prog_compiler_static_works=no
-   save_LDFLAGS="$LDFLAGS"
-   LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
-   echo "$lt_simple_link_test_code" > conftest.$ac_ext
-   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
-     # The linker can only warn and ignore the option if not recognized
-     # So say no if there are warnings
-     if test -s conftest.err; then
-       # Append any errors to the config.log.
-       cat conftest.err 1>&5
-       $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
-       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
-       if diff conftest.exp conftest.er2 >/dev/null; then
-         lt_cv_prog_compiler_static_works=yes
-       fi
-     else
-       lt_cv_prog_compiler_static_works=yes
-     fi
-   fi
-   $RM -r conftest*
-   LDFLAGS="$save_LDFLAGS"
-
-fi
-{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works" >&5
-$as_echo "$lt_cv_prog_compiler_static_works" >&6; }
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
 
-if test x"$lt_cv_prog_compiler_static_works" = xyes; then
-    :
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  eval "$as_ac_Header=yes"
 else
-    lt_prog_compiler_static=
-fi
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+	eval "$as_ac_Header=no"
+fi
 
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+		 $as_echo "$as_val"'`
+	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_Header'}
+		 $as_echo "$as_val"'`
+   if test "x$as_val" = x""yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
 
+fi
 
+done
 
 
 
-  { $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
-$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
-if test "${lt_cv_prog_compiler_c_o+set}" = set; then
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+if test -z "$CXX"; then
+  if test -n "$CCC"; then
+    CXX=$CCC
+  else
+    if test -n "$ac_tool_prefix"; then
+  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CXX+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  lt_cv_prog_compiler_c_o=no
-   $RM -r conftest 2>/dev/null
-   mkdir conftest
-   cd conftest
-   mkdir out
-   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-
-   lt_compiler_flag="-o out/conftest2.$ac_objext"
-   # Insert the option either (1) after the last *FLAGS variable, or
-   # (2) before a word containing "conftest.", or (3) at the end.
-   # Note that $ac_compile itself does not contain backslashes and begins
-   # with a dollar sign (not a hyphen), so the echo should work correctly.
-   lt_compile=`echo "$ac_compile" | $SED \
-   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-   -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:11891: $lt_compile\"" >&5)
-   (eval "$lt_compile" 2>out/conftest.err)
-   ac_status=$?
-   cat out/conftest.err >&5
-   echo "$as_me:11895: \$? = $ac_status" >&5
-   if (exit $ac_status) && 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
-     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
-     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
-     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
-       lt_cv_prog_compiler_c_o=yes
-     fi
-   fi
-   chmod u+w . 2>&5
-   $RM conftest*
-   # SGI C++ compiler will create directory out/ii_files/ for
-   # template instantiation
-   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
-   $RM out/* && rmdir out
-   cd ..
-   $RM -r conftest
-   $RM conftest*
+  if test -n "$CXX"; then
+  ac_cv_prog_CXX="$CXX" # Let the user override the test.
+else
+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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
 
 fi
-{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5
-$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
-
-
-
-
+fi
+CXX=$ac_cv_prog_CXX
+if test -n "$CXX"; then
+  { $as_echo "$as_me:$LINENO: result: $CXX" >&5
+$as_echo "$CXX" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
 
 
-  { $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
-$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
-if test "${lt_cv_prog_compiler_c_o+set}" = set; then
+    test -n "$CXX" && break
+  done
+fi
+if test -z "$CXX"; then
+  ac_ct_CXX=$CXX
+  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  lt_cv_prog_compiler_c_o=no
-   $RM -r conftest 2>/dev/null
-   mkdir conftest
-   cd conftest
-   mkdir out
-   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-
-   lt_compiler_flag="-o out/conftest2.$ac_objext"
-   # Insert the option either (1) after the last *FLAGS variable, or
-   # (2) before a word containing "conftest.", or (3) at the end.
-   # Note that $ac_compile itself does not contain backslashes and begins
-   # with a dollar sign (not a hyphen), so the echo should work correctly.
-   lt_compile=`echo "$ac_compile" | $SED \
-   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-   -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:11946: $lt_compile\"" >&5)
-   (eval "$lt_compile" 2>out/conftest.err)
-   ac_status=$?
-   cat out/conftest.err >&5
-   echo "$as_me:11950: \$? = $ac_status" >&5
-   if (exit $ac_status) && 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
-     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
-     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
-     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
-       lt_cv_prog_compiler_c_o=yes
-     fi
-   fi
-   chmod u+w . 2>&5
-   $RM conftest*
-   # SGI C++ compiler will create directory out/ii_files/ for
-   # template instantiation
-   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
-   $RM out/* && rmdir out
-   cd ..
-   $RM -r conftest
-   $RM conftest*
+  if test -n "$ac_ct_CXX"; then
+  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
+else
+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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_CXX="$ac_prog"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
 
 fi
-{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5
-$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
-
-
-
-
-hard_links="nottested"
-if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
-  # do not overwrite the value of need_locks provided by the user
-  { $as_echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
-$as_echo_n "checking if we can lock with hard links... " >&6; }
-  hard_links=yes
-  $RM conftest*
-  ln conftest.a conftest.b 2>/dev/null && hard_links=no
-  touch conftest.a
-  ln conftest.a conftest.b 2>&5 || hard_links=no
-  ln conftest.a conftest.b 2>/dev/null && hard_links=no
-  { $as_echo "$as_me:$LINENO: result: $hard_links" >&5
-$as_echo "$hard_links" >&6; }
-  if test "$hard_links" = no; then
-    { $as_echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
-$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
-    need_locks=warn
-  fi
+fi
+ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
+if test -n "$ac_ct_CXX"; then
+  { $as_echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
+$as_echo "$ac_ct_CXX" >&6; }
 else
-  need_locks=no
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
 
+  test -n "$ac_ct_CXX" && break
+done
 
+  if test "x$ac_ct_CXX" = x; then
+    CXX="g++"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    CXX=$ac_ct_CXX
+  fi
+fi
 
+  fi
+fi
+# Provide some information about the compiler.
+$as_echo "$as_me:$LINENO: checking for C++ compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+{ (ac_try="$ac_compiler --version >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compiler --version >&5") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (ac_try="$ac_compiler -v >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compiler -v >&5") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (ac_try="$ac_compiler -V >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compiler -V >&5") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
 
+{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5
+$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
+if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
-  { $as_echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
-$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
-
-  runpath_var=
-  allow_undefined_flag=
-  always_export_symbols=no
-  archive_cmds=
-  archive_expsym_cmds=
-  compiler_needs_object=no
-  enable_shared_with_static_runtimes=no
-  export_dynamic_flag_spec=
-  export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
-  hardcode_automatic=no
-  hardcode_direct=no
-  hardcode_direct_absolute=no
-  hardcode_libdir_flag_spec=
-  hardcode_libdir_flag_spec_ld=
-  hardcode_libdir_separator=
-  hardcode_minus_L=no
-  hardcode_shlibpath_var=unsupported
-  inherit_rpath=no
-  link_all_deplibs=unknown
-  module_cmds=
-  module_expsym_cmds=
-  old_archive_from_new_cmds=
-  old_archive_from_expsyms_cmds=
-  thread_safe_flag_spec=
-  whole_archive_flag_spec=
-  # include_expsyms should be a list of space-separated symbols to be *always*
-  # included in the symbol list
-  include_expsyms=
-  # exclude_expsyms can be an extended regexp of symbols to exclude
-  # it will be wrapped by ` (' and `)$', so one must not match beginning or
-  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
-  # as well as any symbol that contains `d'.
-  exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
-  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
-  # platforms (ab)use it in PIC code, but their linkers get confused if
-  # the symbol is explicitly referenced.  Since portable code cannot
-  # rely on this symbol name, it's probably fine to never include it in
-  # preloaded symbol tables.
-  # Exclude shared library initialization/finalization symbols.
-  extract_expsyms_cmds=
-
-  case $host_os in
-  cygwin* | mingw* | pw32* | cegcc*)
-    # FIXME: the MSVC++ port hasn't been tested in a loooong time
-    # When not using gcc, we currently assume that we are using
-    # Microsoft Visual C++.
-    if test "$GCC" != yes; then
-      with_gnu_ld=no
-    fi
-    ;;
-  interix*)
-    # we just hope/assume this is gcc and not c89 (= MSVC++)
-    with_gnu_ld=yes
-    ;;
-  openbsd*)
-    with_gnu_ld=no
-    ;;
-  esac
-
-  ld_shlibs=yes
-  if test "$with_gnu_ld" = yes; then
-    # If archive_cmds runs LD, not CC, wlarc should be empty
-    wlarc='${wl}'
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
 
-    # Set some defaults for GNU ld with shared library support. These
-    # are reset later if shared libraries are not supported. Putting them
-    # here allows them to be overridden if necessary.
-    runpath_var=LD_RUN_PATH
-    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
-    export_dynamic_flag_spec='${wl}--export-dynamic'
-    # ancient GNU ld didn't support --whole-archive et. al.
-    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
-      whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
-    else
-      whole_archive_flag_spec=
-    fi
-    supports_anon_versioning=no
-    case `$LD -v 2>&1` 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
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_compiler_gnu=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-    # See if GNU ld supports shared libraries.
-    case $host_os in
-    aix[3-9]*)
-      # On AIX/PPC, the GNU linker is very broken
-      if test "$host_cpu" != ia64; then
-	ld_shlibs=no
-	cat <<_LT_EOF 1>&2
+	ac_compiler_gnu=no
+fi
 
-*** Warning: the GNU linker, at least up to release 2.9.1, is reported
-*** to be unable to reliably create shared libraries on AIX.
-*** Therefore, libtool is disabling shared libraries support.  If you
-*** really care for shared libraries, you may want to modify your PATH
-*** so that a non-GNU linker is found, and then restart.
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
 
-_LT_EOF
-      fi
-      ;;
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5
+$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+  GXX=yes
+else
+  GXX=
+fi
+ac_test_CXXFLAGS=${CXXFLAGS+set}
+ac_save_CXXFLAGS=$CXXFLAGS
+{ $as_echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5
+$as_echo_n "checking whether $CXX accepts -g... " >&6; }
+if test "${ac_cv_prog_cxx_g+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
+   ac_cxx_werror_flag=yes
+   ac_cv_prog_cxx_g=no
+   CXXFLAGS="-g"
+   cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
-    amigaos*)
-      case $host_cpu in
-      powerpc)
-            # see comment about AmigaOS4 .so support
-            archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-            archive_expsym_cmds=''
-        ;;
-      m68k)
-            archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
-            hardcode_libdir_flag_spec='-L$libdir'
-            hardcode_minus_L=yes
-        ;;
-      esac
-      ;;
+int
+main ()
+{
 
-    beos*)
-      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
-	allow_undefined_flag=unsupported
-	# Joseph Beckenbach <jrb3 best com> says some releases of gcc
-	# support --undefined.  This deserves some investigation.  FIXME
-	archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-      else
-	ld_shlibs=no
-      fi
-      ;;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_prog_cxx_g=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-    cygwin* | mingw* | pw32* | cegcc*)
-      # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
-      # as there is no search path for DLLs.
-      hardcode_libdir_flag_spec='-L$libdir'
-      allow_undefined_flag=unsupported
-      always_export_symbols=no
-      enable_shared_with_static_runtimes=yes
-      export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
+	CXXFLAGS=""
+      cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
-      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
-        archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-	# If the export-symbols file already is a .def file (1st line
-	# is EXPORTS), use it as is; otherwise, prepend...
-	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;
-	  cat $export_symbols >> $output_objdir/$soname.def;
-	fi~
-	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-      else
-	ld_shlibs=no
-      fi
-      ;;
-
-    interix[3-9]*)
-      hardcode_direct=no
-      hardcode_shlibpath_var=no
-      hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
-      export_dynamic_flag_spec='${wl}-E'
-      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
-      # Instead, shared libraries are loaded at an image base (0x10000000 by
-      # default) and relocated if they conflict, which is a slow very memory
-      # consuming and fragmenting process.  To avoid this, we pick a random,
-      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
-      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
-      archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
-      archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
-      ;;
+int
+main ()
+{
 
-    gnu* | linux* | tpf* | k*bsd*-gnu)
-      tmp_diet=no
-      if test "$host_os" = linux-dietlibc; then
-	case $cc_basename in
-	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
-	esac
-      fi
-      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
-	 && test "$tmp_diet" = no
-      then
-	tmp_addflag=
-	tmp_sharedflag='-shared'
-	case $cc_basename,$host_cpu in
-        pgcc*)				# Portland Group C compiler
-	  whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
-	  tmp_addflag=' $pic_flag'
-	  ;;
-	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
-	  whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
-	  tmp_addflag=' $pic_flag -Mnomain' ;;
-	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
-	  tmp_addflag=' -i_dynamic' ;;
-	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
-	  tmp_addflag=' -i_dynamic -nofor_main' ;;
-	ifc* | ifort*)			# Intel Fortran compiler
-	  tmp_addflag=' -nofor_main' ;;
-	lf95*)				# Lahey Fortran 8.1
-	  whole_archive_flag_spec=
-	  tmp_sharedflag='--shared' ;;
-	xl[cC]*)			# IBM XL C 8.0 on PPC (deal with xlf below)
-	  tmp_sharedflag='-qmkshrobj'
-	  tmp_addflag= ;;
-	esac
-	case `$CC -V 2>&1 | sed 5q` in
-	*Sun\ C*)			# Sun C 5.9
-	  whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
-	  compiler_needs_object=yes
-	  tmp_sharedflag='-G' ;;
-	*Sun\ F*)			# Sun Fortran 8.3
-	  tmp_sharedflag='-G' ;;
-	esac
-	archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  :
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-        if test "x$supports_anon_versioning" = xyes; 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 '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
-        fi
+	ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+	 CXXFLAGS="-g"
+	 cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
-	case $cc_basename in
-	xlf*)
-	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
-	  whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
-	  hardcode_libdir_flag_spec=
-	  hardcode_libdir_flag_spec_ld='-rpath $libdir'
-	  archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
-	  if test "x$supports_anon_versioning" = xyes; 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~
-	      $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
-	  fi
-	  ;;
-	esac
-      else
-        ld_shlibs=no
-      fi
-      ;;
+int
+main ()
+{
 
-    netbsd* | netbsdelf*-gnu)
-      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
-	archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
-	wlarc=
-      else
-	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-      fi
-      ;;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_prog_cxx_g=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-    solaris*)
-      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
-	ld_shlibs=no
-	cat <<_LT_EOF 1>&2
 
-*** Warning: The releases 2.8.* of the GNU linker cannot reliably
-*** create shared libraries on Solaris systems.  Therefore, libtool
-*** is disabling shared libraries support.  We urge you to upgrade GNU
-*** binutils to release 2.9.1 or newer.  Another option is to modify
-*** your PATH or compiler configuration so that the native linker is
-*** used, and then restart.
+fi
 
-_LT_EOF
-      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
-	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-      else
-	ld_shlibs=no
-      fi
-      ;;
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
 
-    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
-      case `$LD -v 2>&1` in
-        *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
-	ld_shlibs=no
-	cat <<_LT_EOF 1>&2
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
 
-*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
-*** reliably create shared libraries on SCO systems.  Therefore, libtool
-*** is disabling shared libraries support.  We urge you to upgrade GNU
-*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
-*** your PATH or compiler configuration so that the native linker is
-*** used, and then restart.
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5
+$as_echo "$ac_cv_prog_cxx_g" >&6; }
+if test "$ac_test_CXXFLAGS" = set; then
+  CXXFLAGS=$ac_save_CXXFLAGS
+elif test $ac_cv_prog_cxx_g = yes; then
+  if test "$GXX" = yes; then
+    CXXFLAGS="-g -O2"
+  else
+    CXXFLAGS="-g"
+  fi
+else
+  if test "$GXX" = yes; then
+    CXXFLAGS="-O2"
+  else
+    CXXFLAGS=
+  fi
+fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
-_LT_EOF
-	;;
-	*)
-	  # For security reasons, it is highly recommended that you always
-	  # use absolute paths for naming shared libraries, and exclude the
-	  # DT_RUNPATH tag from executables and libraries.  But doing so
-	  # requires that you compile everything twice, which is a pain.
-	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
-	    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
-	    archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	    archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-	  else
-	    ld_shlibs=no
-	  fi
-	;;
-      esac
-      ;;
+depcc="$CXX"  am_compiler_list=
 
-    sunos4*)
-      archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-      wlarc=
-      hardcode_direct=yes
-      hardcode_shlibpath_var=no
-      ;;
+{ $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
 
-    *)
-      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
-	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-      else
-	ld_shlibs=no
-      fi
-      ;;
-    esac
+  am_cv_CXX_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+  fi
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
 
-    if test "$ld_shlibs" = no; then
-      runpath_var=
-      hardcode_libdir_flag_spec=
-      export_dynamic_flag_spec=
-      whole_archive_flag_spec=
-    fi
-  else
-    # PORTME fill in a description of your system's linker (not GNU ld)
-    case $host_os in
-    aix3*)
-      allow_undefined_flag=unsupported
-      always_export_symbols=yes
-      archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
-      # Note: this linker hardcodes the directories in LIBPATH if there
-      # are no directories specified by -L.
-      hardcode_minus_L=yes
-      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
-	# Neither direct hardcoding nor static linking is supported with a
-	# broken collect2.
-	hardcode_direct=unsupported
+    case $depmode in
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+	continue
+      else
+	break
       fi
       ;;
+    none) break ;;
+    esac
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.
+    if depmode=$depmode \
+       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_CXX_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
 
-    aix[4-9]*)
-      if test "$host_cpu" = ia64; then
-	# On IA64, the linker does run time linking by default, so we don't
-	# have to do anything special.
-	aix_use_runtimelinking=no
-	exp_sym_flag='-Bexport'
-	no_entry_flag=""
-      else
-	# If we're using GNU nm, then we don't want the "-C" option.
-	# -C means demangle to AIX nm, but means don't demangle with GNU nm
-	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
-	  export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
-	else
-	  export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
-	fi
-	aix_use_runtimelinking=no
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_CXX_dependencies_compiler_type=none
+fi
 
-	# Test if we are trying to use run time linking or normal
-	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
-	# need to do runtime linking.
-	case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
-	  for ld_flag in $LDFLAGS; do
-	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
-	    aix_use_runtimelinking=yes
-	    break
-	  fi
-	  done
-	  ;;
-	esac
+fi
+{ $as_echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; }
+CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
 
-	exp_sym_flag='-bexport'
-	no_entry_flag='-bnoentry'
-      fi
 
-      # When large executables or shared objects are built, AIX ld can
-      # have problems creating the table of contents.  If linking a library
-      # or program results in "error TOC overflow" add -mminimal-toc to
-      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
-      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
 
-      archive_cmds=''
-      hardcode_direct=yes
-      hardcode_direct_absolute=yes
-      hardcode_libdir_separator=':'
-      link_all_deplibs=yes
-      file_list_spec='${wl}-f,'
+if
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
+  am__fastdepCXX_TRUE=
+  am__fastdepCXX_FALSE='#'
+else
+  am__fastdepCXX_TRUE='#'
+  am__fastdepCXX_FALSE=
+fi
 
-      if test "$GCC" = yes; then
-	case $host_os in aix4.[012]|aix4.[012].*)
-	# We only want to do this on AIX 4.2 and lower, the check
-	# below for broken collect2 doesn't work under 4.3+
-	  collect2name=`${CC} -print-prog-name=collect2`
-	  if test -f "$collect2name" &&
-	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
-	  then
-	  # We have reworked collect2
-	  :
-	  else
-	  # We have old collect2
-	  hardcode_direct=unsupported
-	  # It fails to find uninstalled libraries when the uninstalled
-	  # path is not listed in the libpath.  Setting hardcode_minus_L
-	  # to unsupported forces relinking
-	  hardcode_minus_L=yes
-	  hardcode_libdir_flag_spec='-L$libdir'
-	  hardcode_libdir_separator=
-	  fi
-	  ;;
-	esac
-	shared_flag='-shared'
-	if test "$aix_use_runtimelinking" = yes; then
-	  shared_flag="$shared_flag "'${wl}-G'
-	fi
-	link_all_deplibs=no
-      else
-	# not using gcc
-	if test "$host_cpu" = ia64; then
-	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
-	# chokes on -Wl,-G. The following line is correct:
-	  shared_flag='-G'
-	else
-	  if test "$aix_use_runtimelinking" = yes; then
-	    shared_flag='${wl}-G'
-	  else
-	    shared_flag='${wl}-bM:SRE'
-	  fi
-	fi
-      fi
 
-      export_dynamic_flag_spec='${wl}-bexpall'
-      # It seems that -bexpall does not export symbols beginning with
-      # underscore (_), so it is better to generate a list of symbols to export.
-      always_export_symbols=yes
-      if test "$aix_use_runtimelinking" = yes; then
-	# Warning - without using the other runtime loading flags (-brtl),
-	# -berok will link without error, but may produce a broken library.
-	allow_undefined_flag='-berok'
-        # Determine the default libpath from the value encoded in an
-        # empty executable.
-        cat >conftest.$ac_ext <<_ACEOF
+if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
+    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
+    (test "X$CXX" != "Xg++"))) ; then
+  ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+{ $as_echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5
+$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
+if test -z "$CXXCPP"; then
+  if test "${ac_cv_prog_CXXCPP+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+      # Double quotes because CXXCPP needs to be expanded
+    for CXXCPP in "$CXX -E" "/lib/cpp"
+    do
+      ac_preproc_ok=false
+for ac_cxx_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+		     Syntax error
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
+if { (ac_try="$ac_cpp conftest.$ac_ext"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 $as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
 	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
        }; then
-
-lt_aix_libpath_sed='
-    /Import File Strings/,/^$/ {
-	/^0/ {
-	    s/^0  *\(.*\)$/\1/
-	    p
-	}
-    }'
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then
-  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-fi
+  :
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-
+  # Broken: fails on valid input.
+continue
 fi
 
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+rm -f conftest.err conftest.$ac_ext
 
-        hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
-        archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
-      else
-	if test "$host_cpu" = ia64; then
-	  hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
-	  allow_undefined_flag="-z nodefs"
-	  archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
-	else
-	 # Determine the default libpath from the value encoded in an
-	 # empty executable.
-	 cat >conftest.$ac_ext <<_ACEOF
+  # OK, works on sane cases.  Now check whether nonexistent headers
+  # can be detected and how.
+  cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
+#include <ac_nonexistent.h>
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
+if { (ac_try="$ac_cpp conftest.$ac_ext"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 $as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
 	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
        }; then
+  # Broken: success on invalid input.
+continue
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-lt_aix_libpath_sed='
-    /Import File Strings/,/^$/ {
-	/^0/ {
-	    s/^0  *\(.*\)$/\1/
-	    p
-	}
-    }'
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then
-  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+  break
 fi
+
+    done
+    ac_cv_prog_CXXCPP=$CXXCPP
+
+fi
+  CXXCPP=$ac_cv_prog_CXXCPP
+else
+  ac_cv_prog_CXXCPP=$CXXCPP
+fi
+{ $as_echo "$as_me:$LINENO: result: $CXXCPP" >&5
+$as_echo "$CXXCPP" >&6; }
+ac_preproc_ok=false
+for ac_cxx_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+		     Syntax error
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  :
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
+  # Broken: fails on valid input.
+continue
+fi
+
+rm -f conftest.err conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether nonexistent headers
+  # can be detected and how.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  # Broken: success on invalid input.
+continue
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+  # Passes both tests.
+ac_preproc_ok=:
+break
 fi
 
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+rm -f conftest.err conftest.$ac_ext
 
-	 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
-	  # Warning - without using the other run time loading flags,
-	  # -berok will link without error, but may produce a broken library.
-	  no_undefined_flag=' ${wl}-bernotok'
-	  allow_undefined_flag=' ${wl}-berok'
-	  # Exported symbols can be pulled into shared objects from archives
-	  whole_archive_flag_spec='$convenience'
-	  archive_cmds_need_lc=yes
-	  # This is similar to how AIX traditionally builds its shared libraries.
-	  archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
-	fi
-      fi
-      ;;
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+  :
+else
+  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+_lt_caught_CXX_error=yes; }
+fi
 
-    amigaos*)
-      case $host_cpu in
-      powerpc)
-            # see comment about AmigaOS4 .so support
-            archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-            archive_expsym_cmds=''
-        ;;
-      m68k)
-            archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
-            hardcode_libdir_flag_spec='-L$libdir'
-            hardcode_minus_L=yes
-        ;;
-      esac
-      ;;
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
-    bsdi[45]*)
-      export_dynamic_flag_spec=-rdynamic
-      ;;
+else
+  _lt_caught_CXX_error=yes
+fi
 
-    cygwin* | mingw* | pw32* | cegcc*)
-      # When not using gcc, we currently assume that we are using
-      # Microsoft Visual C++.
-      # hardcode_libdir_flag_spec is actually meaningless, as there is
-      # no search path for DLLs.
-      hardcode_libdir_flag_spec=' '
-      allow_undefined_flag=unsupported
-      # Tell ltmain to make .lib files, not .a files.
-      libext=lib
-      # Tell ltmain to make .dll files, not .so files.
-      shrext_cmds=".dll"
-      # FIXME: Setting linknames here is a bad hack.
-      archive_cmds='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
-      # The linker will automatically build a .lib file if we build a DLL.
-      old_archive_from_new_cmds='true'
-      # FIXME: Should let the user specify the lib program.
-      old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
-      fix_srcfile_path='`cygpath -w "$srcfile"`'
-      enable_shared_with_static_runtimes=yes
-      ;;
 
-    darwin* | rhapsody*)
 
 
-  archive_cmds_need_lc=no
-  hardcode_direct=no
-  hardcode_automatic=yes
-  hardcode_shlibpath_var=unsupported
-  whole_archive_flag_spec=''
-  link_all_deplibs=yes
-  allow_undefined_flag="$_lt_dar_allow_undefined"
-  case $cc_basename in
-     ifort*) _lt_dar_can_shared=yes ;;
-     *) _lt_dar_can_shared=$GCC ;;
-  esac
-  if test "$_lt_dar_can_shared" = "yes"; then
-    output_verbose_link_cmd=echo
-    archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
-    module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
-    archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
-    module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
 
-  else
-  ld_shlibs=no
-  fi
+# Set options
 
-      ;;
 
-    dgux*)
-      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      hardcode_libdir_flag_spec='-L$libdir'
-      hardcode_shlibpath_var=no
-      ;;
 
-    freebsd1*)
-      ld_shlibs=no
-      ;;
+        enable_dlopen=no
 
-    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
-    # support.  Future versions do this automatically, but an explicit c++rt0.o
-    # does not break anything, and helps significantly (at the cost of a little
-    # extra space).
-    freebsd2.2*)
-      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
-      hardcode_libdir_flag_spec='-R$libdir'
-      hardcode_direct=yes
-      hardcode_shlibpath_var=no
-      ;;
 
-    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
-    freebsd2*)
-      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-      hardcode_direct=yes
-      hardcode_minus_L=yes
-      hardcode_shlibpath_var=no
-      ;;
+  enable_win32_dll=no
 
-    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
-    freebsd* | dragonfly*)
-      archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
-      hardcode_libdir_flag_spec='-R$libdir'
-      hardcode_direct=yes
-      hardcode_shlibpath_var=no
-      ;;
 
-    hpux9*)
-      if test "$GCC" = yes; then
-	archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
-      else
-	archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
-      fi
-      hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
-      hardcode_libdir_separator=:
-      hardcode_direct=yes
-
-      # hardcode_minus_L: Not really in the search PATH,
-      # but as the default location of the library.
-      hardcode_minus_L=yes
-      export_dynamic_flag_spec='${wl}-E'
+            # Check whether --enable-shared was given.
+if test "${enable_shared+set}" = set; then
+  enableval=$enable_shared; p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_shared=yes ;;
+    no) enable_shared=no ;;
+    *)
+      enable_shared=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+	IFS="$lt_save_ifs"
+	if test "X$pkg" = "X$p"; then
+	  enable_shared=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
       ;;
+    esac
+else
+  enable_shared=yes
+fi
 
-    hpux10*)
-      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
-	archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
-      else
-	archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
-      fi
-      if test "$with_gnu_ld" = no; then
-	hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
-	hardcode_libdir_flag_spec_ld='+b $libdir'
-	hardcode_libdir_separator=:
-	hardcode_direct=yes
-	hardcode_direct_absolute=yes
-	export_dynamic_flag_spec='${wl}-E'
-	# hardcode_minus_L: Not really in the search PATH,
-	# but as the default location of the library.
-	hardcode_minus_L=yes
-      fi
-      ;;
 
-    hpux11*)
-      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
-	case $host_cpu in
-	hppa*64*)
-	  archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
-	  ;;
-	ia64*)
-	  archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
-	  ;;
-	*)
-	  archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
-	  ;;
-	esac
-      else
-	case $host_cpu in
-	hppa*64*)
-	  archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
-	  ;;
-	ia64*)
-	  archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
-	  ;;
-	*)
-	  archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
-	  ;;
-	esac
-      fi
-      if test "$with_gnu_ld" = no; then
-	hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
-	hardcode_libdir_separator=:
 
-	case $host_cpu in
-	hppa*64*|ia64*)
-	  hardcode_direct=no
-	  hardcode_shlibpath_var=no
-	  ;;
-	*)
-	  hardcode_direct=yes
-	  hardcode_direct_absolute=yes
-	  export_dynamic_flag_spec='${wl}-E'
 
-	  # hardcode_minus_L: Not really in the search PATH,
-	  # but as the default location of the library.
-	  hardcode_minus_L=yes
-	  ;;
-	esac
-      fi
-      ;;
 
-    irix5* | irix6* | nonstopux*)
-      if test "$GCC" = yes; then
-	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-	# Try to use the -exported_symbol ld option, if it does not
-	# work, assume that -exports_file does not work either and
-	# implicitly export all symbols.
-        save_LDFLAGS="$LDFLAGS"
-        LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
-        cat >conftest.$ac_ext <<_ACEOF
-int foo(void) {}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
 
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
 
-fi
 
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-        LDFLAGS="$save_LDFLAGS"
-      else
-	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
-	archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
-      fi
-      archive_cmds_need_lc='no'
-      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
-      hardcode_libdir_separator=:
-      inherit_rpath=yes
-      link_all_deplibs=yes
+  # Check whether --enable-static was given.
+if test "${enable_static+set}" = set; then
+  enableval=$enable_static; p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_static=yes ;;
+    no) enable_static=no ;;
+    *)
+     enable_static=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+	IFS="$lt_save_ifs"
+	if test "X$pkg" = "X$p"; then
+	  enable_static=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
       ;;
+    esac
+else
+  enable_static=yes
+fi
 
-    netbsd* | netbsdelf*-gnu)
-      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
-	archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
-      else
-	archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
-      fi
-      hardcode_libdir_flag_spec='-R$libdir'
-      hardcode_direct=yes
-      hardcode_shlibpath_var=no
-      ;;
 
-    newsos6)
-      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      hardcode_direct=yes
-      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
-      hardcode_libdir_separator=:
-      hardcode_shlibpath_var=no
-      ;;
 
-    *nto* | *qnx*)
-      ;;
 
-    openbsd*)
-      if test -f /usr/libexec/ld.so; then
-	hardcode_direct=yes
-	hardcode_shlibpath_var=no
-	hardcode_direct_absolute=yes
-	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 $compiler_flags'
-	  archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
-	  hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
-	  export_dynamic_flag_spec='${wl}-E'
-	else
-	  case $host_os in
-	   openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
-	     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-	     hardcode_libdir_flag_spec='-R$libdir'
-	     ;;
-	   *)
-	     archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
-	     hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
-	     ;;
-	  esac
-	fi
-      else
-	ld_shlibs=no
-      fi
-      ;;
 
-    os2*)
-      hardcode_libdir_flag_spec='-L$libdir'
-      hardcode_minus_L=yes
-      allow_undefined_flag=unsupported
-      archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
-      old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
-      ;;
 
-    osf3*)
-      if test "$GCC" = yes; then
-	allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
-	archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-      else
-	allow_undefined_flag=' -expect_unresolved \*'
-	archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
-      fi
-      archive_cmds_need_lc='no'
-      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
-      hardcode_libdir_separator=:
-      ;;
 
-    osf4* | osf5*)	# as osf3* with the addition of -msym flag
-      if test "$GCC" = yes; then
-	allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
-	archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-	hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
-      else
-	allow_undefined_flag=' -expect_unresolved \*'
-	archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
-	archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
-	$CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
 
-	# Both c and cxx compiler support -rpath directly
-	hardcode_libdir_flag_spec='-rpath $libdir'
-      fi
-      archive_cmds_need_lc='no'
-      hardcode_libdir_separator=:
-      ;;
 
-    solaris*)
-      no_undefined_flag=' -z defs'
-      if test "$GCC" = yes; then
-	wlarc='${wl}'
-	archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
-	archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-	  $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
-      else
-	case `$CC -V 2>&1` in
-	*"Compilers 5.0"*)
-	  wlarc=''
-	  archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
-	  archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-	  $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
-	  ;;
-	*)
-	  wlarc='${wl}'
-	  archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
-	  archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-	  $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
-	  ;;
-	esac
-      fi
-      hardcode_libdir_flag_spec='-R$libdir'
-      hardcode_shlibpath_var=no
-      case $host_os in
-      solaris2.[0-5] | solaris2.[0-5].*) ;;
-      *)
-	# The compiler driver will combine and reorder linker options,
-	# but understands `-z linker_flag'.  GCC discards it without `$wl',
-	# but is careful enough not to reorder.
-	# Supported since Solaris 2.6 (maybe 2.5.1?)
-	if test "$GCC" = yes; then
-	  whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
-	else
-	  whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
-	fi
-	;;
-      esac
-      link_all_deplibs=yes
-      ;;
 
-    sunos4*)
-      if test "x$host_vendor" = xsequent; then
-	# Use $CC to link under sequent, because it throws in some extra .o
-	# files that make .init and .fini sections work.
-	archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
-      else
-	archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
-      fi
-      hardcode_libdir_flag_spec='-L$libdir'
-      hardcode_direct=yes
-      hardcode_minus_L=yes
-      hardcode_shlibpath_var=no
-      ;;
+# Check whether --with-pic was given.
+if test "${with_pic+set}" = set; then
+  withval=$with_pic; pic_mode="$withval"
+else
+  pic_mode=default
+fi
 
-    sysv4)
-      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
-      ;;
 
-    sysv4.3*)
-      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      hardcode_shlibpath_var=no
-      export_dynamic_flag_spec='-Bexport'
-      ;;
+test -z "$pic_mode" && pic_mode=default
 
-    sysv4*MP*)
-      if test -d /usr/nec; then
-	archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-	hardcode_shlibpath_var=no
-	runpath_var=LD_RUN_PATH
-	hardcode_runpath_var=yes
-	ld_shlibs=yes
-      fi
-      ;;
 
-    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
-      no_undefined_flag='${wl}-z,text'
-      archive_cmds_need_lc=no
-      hardcode_shlibpath_var=no
-      runpath_var='LD_RUN_PATH'
 
-      if test "$GCC" = yes; then
-	archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-      else
-	archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-      fi
-      ;;
 
-    sysv5* | sco3.2v5* | sco5v6*)
-      # Note: We can NOT use -z defs as we might desire, because we do not
-      # link with -lc, and that would cause any symbols used from libc to
-      # always be unresolved, which means just about no library would
-      # ever link correctly.  If we're not using GNU ld we use -z text
-      # though, which does catch some bad symbols but isn't as heavy-handed
-      # as -z defs.
-      no_undefined_flag='${wl}-z,text'
-      allow_undefined_flag='${wl}-z,nodefs'
-      archive_cmds_need_lc=no
-      hardcode_shlibpath_var=no
-      hardcode_libdir_flag_spec='${wl}-R,$libdir'
-      hardcode_libdir_separator=':'
-      link_all_deplibs=yes
-      export_dynamic_flag_spec='${wl}-Bexport'
-      runpath_var='LD_RUN_PATH'
 
-      if test "$GCC" = yes; then
-	archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-      else
-	archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-      fi
-      ;;
 
-    uts4*)
-      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      hardcode_libdir_flag_spec='-L$libdir'
-      hardcode_shlibpath_var=no
-      ;;
 
+  # Check whether --enable-fast-install was given.
+if test "${enable_fast_install+set}" = set; then
+  enableval=$enable_fast_install; p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_fast_install=yes ;;
+    no) enable_fast_install=no ;;
     *)
-      ld_shlibs=no
+      enable_fast_install=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+	IFS="$lt_save_ifs"
+	if test "X$pkg" = "X$p"; then
+	  enable_fast_install=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
       ;;
     esac
-
-    if test x$host_vendor = xsni; then
-      case $host in
-      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
-	export_dynamic_flag_spec='${wl}-Blargedynsym'
-	;;
-      esac
-    fi
-  fi
-
-{ $as_echo "$as_me:$LINENO: result: $ld_shlibs" >&5
-$as_echo "$ld_shlibs" >&6; }
-test "$ld_shlibs" = no && can_build_shared=no
-
-with_gnu_ld=$with_gnu_ld
-
-
-
-
-
+else
+  enable_fast_install=yes
+fi
 
 
 
@@ -13097,68 +12755,12 @@
 
 
 
-#
-# Do we need to explicitly link libc?
-#
-case "x$archive_cmds_need_lc" in
-x|xyes)
-  # Assume -lc should be added
-  archive_cmds_need_lc=yes
 
-  if test "$enable_shared" = yes && test "$GCC" = yes; then
-    case $archive_cmds in
-    *'~'*)
-      # FIXME: we may have to deal with multi-command sequences.
-      ;;
-    '$CC '*)
-      # Test whether the compiler implicitly links with -lc since on some
-      # systems, -lgcc has to come before -lc. If gcc already passes -lc
-      # to ld, don't add -lc before -lgcc.
-      { $as_echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
-$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
-      $RM conftest*
-      echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+# This can be used to rebuild libtool when needed
+LIBTOOL_DEPS="$ltmain"
 
-      if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } 2>conftest.err; then
-        soname=conftest
-        lib=conftest
-        libobjs=conftest.$ac_objext
-        deplibs=
-        wl=$lt_prog_compiler_wl
-	pic_flag=$lt_prog_compiler_pic
-        compiler_flags=-v
-        linker_flags=-v
-        verstring=
-        output_objdir=.
-        libname=conftest
-        lt_save_allow_undefined_flag=$allow_undefined_flag
-        allow_undefined_flag=
-        if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\"") >&5
-  (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
-        then
-	  archive_cmds_need_lc=no
-        else
-	  archive_cmds_need_lc=yes
-        fi
-        allow_undefined_flag=$lt_save_allow_undefined_flag
-      else
-        cat conftest.err 1>&5
-      fi
-      $RM conftest*
-      { $as_echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5
-$as_echo "$archive_cmds_need_lc" >&6; }
-      ;;
-    esac
-  fi
-  ;;
-esac
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
 
 
 
@@ -13184,6 +12786,7 @@
 
 
 
+test -z "$LN_S" && LN_S="ln -s"
 
 
 
@@ -13198,12 +12801,36 @@
 
 
 
+if test -n "${ZSH_VERSION+set}" ; then
+   setopt NO_GLOB_SUBST
+fi
 
+{ $as_echo "$as_me:$LINENO: checking for objdir" >&5
+$as_echo_n "checking for objdir... " >&6; }
+if test "${lt_cv_objdir+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  rm -f .libs 2>/dev/null
+mkdir .libs 2>/dev/null
+if test -d .libs; then
+  lt_cv_objdir=.libs
+else
+  # MS-DOS does not allow filenames that begin with a dot.
+  lt_cv_objdir=_libs
+fi
+rmdir .libs 2>/dev/null
+fi
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5
+$as_echo "$lt_cv_objdir" >&6; }
+objdir=$lt_cv_objdir
 
 
 
 
 
+cat >>confdefs.h <<_ACEOF
+#define LT_OBJDIR "$lt_cv_objdir/"
+_ACEOF
 
 
 
@@ -13221,40 +12848,229 @@
 
 
 
+case $host_os in
+aix3*)
+  # AIX sometimes has problems with the GCC collect2 program.  For some
+  # reason, if we set the COLLECT_NAMES environment variable, the problems
+  # vanish in a puff of smoke.
+  if test "X${COLLECT_NAMES+set}" != Xset; then
+    COLLECT_NAMES=
+    export COLLECT_NAMES
+  fi
+  ;;
+esac
 
+# Sed substitution that helps us do robust quoting.  It backslashifies
+# metacharacters that are still active within double-quoted strings.
+sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
 
+# Same as above, but do not quote variable references.
+double_quote_subst='s/\(["`\\]\)/\\\1/g'
 
+# Sed substitution to delay expansion of an escaped shell variable in a
+# double_quote_subst'ed string.
+delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
 
+# Sed substitution to delay expansion of an escaped single quote.
+delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
 
+# Sed substitution to avoid accidental globbing in evaled expressions
+no_glob_subst='s/\*/\\\*/g'
 
+# Global variables:
+ofile=libtool
+can_build_shared=yes
 
+# All known linkers require a `.a' archive for static linking (except MSVC,
+# which needs '.lib').
+libext=a
 
+with_gnu_ld="$lt_cv_prog_gnu_ld"
 
+old_CC="$CC"
+old_CFLAGS="$CFLAGS"
 
+# Set sane defaults for various variables
+test -z "$CC" && CC=cc
+test -z "$LTCC" && LTCC=$CC
+test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
+test -z "$LD" && LD=ld
+test -z "$ac_objext" && ac_objext=o
 
+for cc_temp in $compiler""; do
+  case $cc_temp in
+    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+    \-*) ;;
+    *) break;;
+  esac
+done
+cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
 
 
+# Only perform the check for file, if the check method requires it
+test -z "$MAGIC_CMD" && MAGIC_CMD=file
+case $deplibs_check_method in
+file_magic*)
+  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
+    { $as_echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5
+$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
+if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  case $MAGIC_CMD in
+[\\/*] |  ?:[\\/]*)
+  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+  ;;
+*)
+  lt_save_MAGIC_CMD="$MAGIC_CMD"
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
+  for ac_dir in $ac_dummy; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/${ac_tool_prefix}file; then
+      lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
+      if test -n "$file_magic_test_file"; then
+	case $deplibs_check_method in
+	"file_magic "*)
+	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
+	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+	    $EGREP "$file_magic_regex" > /dev/null; then
+	    :
+	  else
+	    cat <<_LT_EOF 1>&2
 
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such.  This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem.  Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool gnu org
 
+_LT_EOF
+	  fi ;;
+	esac
+      fi
+      break
+    fi
+  done
+  IFS="$lt_save_ifs"
+  MAGIC_CMD="$lt_save_MAGIC_CMD"
+  ;;
+esac
+fi
 
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+  { $as_echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
+$as_echo "$MAGIC_CMD" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
 
 
 
 
 
+if test -z "$lt_cv_path_MAGIC_CMD"; then
+  if test -n "$ac_tool_prefix"; then
+    { $as_echo "$as_me:$LINENO: checking for file" >&5
+$as_echo_n "checking for file... " >&6; }
+if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  case $MAGIC_CMD in
+[\\/*] |  ?:[\\/]*)
+  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+  ;;
+*)
+  lt_save_MAGIC_CMD="$MAGIC_CMD"
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
+  for ac_dir in $ac_dummy; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/file; then
+      lt_cv_path_MAGIC_CMD="$ac_dir/file"
+      if test -n "$file_magic_test_file"; then
+	case $deplibs_check_method in
+	"file_magic "*)
+	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
+	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+	    $EGREP "$file_magic_regex" > /dev/null; then
+	    :
+	  else
+	    cat <<_LT_EOF 1>&2
 
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such.  This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem.  Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool gnu org
 
+_LT_EOF
+	  fi ;;
+	esac
+      fi
+      break
+    fi
+  done
+  IFS="$lt_save_ifs"
+  MAGIC_CMD="$lt_save_MAGIC_CMD"
+  ;;
+esac
+fi
 
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+  { $as_echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
+$as_echo "$MAGIC_CMD" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
 
 
+  else
+    MAGIC_CMD=:
+  fi
+fi
 
+  fi
+  ;;
+esac
 
+# Use C for the default configuration in the libtool script
 
+lt_save_CC="$CC"
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
+# Source file extension for C test sources.
+ac_ext=c
 
+# Object file extension for compiled C test sources.
+objext=o
+objext=$objext
 
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;"
 
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(){return(0);}'
 
 
 
@@ -13262,952 +13078,1070 @@
 
 
 
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
 
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
 
+# Allow CC to be a program name with arguments.
+compiler=$CC
 
+# Save the default compiler, since it gets overwritten when the other
+# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
+compiler_DEFAULT=$CC
 
+# save warnings/boilerplate of simple test code
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$RM conftest*
 
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$RM -r conftest*
 
 
+if test -n "$compiler"; then
 
+lt_prog_compiler_no_builtin_flag=
 
+if test "$GCC" = yes; then
+  lt_prog_compiler_no_builtin_flag=' -fno-builtin'
 
+  { $as_echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
+$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
+if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_rtti_exceptions=no
+   ac_outfile=conftest.$ac_objext
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+   lt_compiler_flag="-fno-rtti -fno-exceptions"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   # The option is referenced via a variable to avoid confusing sed.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:13133: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&5
+   echo "$as_me:13137: \$? = $ac_status" >&5
+   if (exit $ac_status) && test -s "$ac_outfile"; then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings other than the usual output.
+     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+       lt_cv_prog_compiler_rtti_exceptions=yes
+     fi
+   fi
+   $RM conftest*
 
+fi
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
+$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
 
+if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
+    lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
+else
+    :
+fi
 
+fi
 
 
 
 
 
 
+  lt_prog_compiler_wl=
+lt_prog_compiler_pic=
+lt_prog_compiler_static=
 
+{ $as_echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
+$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
 
+  if test "$GCC" = yes; then
+    lt_prog_compiler_wl='-Wl,'
+    lt_prog_compiler_static='-static'
 
+    case $host_os in
+      aix*)
+      # All AIX code is PIC.
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	lt_prog_compiler_static='-Bstatic'
+      fi
+      ;;
 
+    amigaos*)
+      case $host_cpu in
+      powerpc)
+            # see comment about AmigaOS4 .so support
+            lt_prog_compiler_pic='-fPIC'
+        ;;
+      m68k)
+            # FIXME: we need at least 68020 code to build shared libraries, but
+            # adding the `-m68020' flag to GCC prevents building anything better,
+            # like `-m68040'.
+            lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
+        ;;
+      esac
+      ;;
 
+    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+      # PIC is the default for these OSes.
+      ;;
 
+    mingw* | cygwin* | pw32* | os2* | cegcc*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      # Although the cygwin gcc ignores -fPIC, still need this for old-style
+      # (--disable-auto-import) libraries
+      lt_prog_compiler_pic='-DDLL_EXPORT'
+      ;;
 
+    darwin* | rhapsody*)
+      # PIC is the default on this platform
+      # Common symbols not allowed in MH_DYLIB files
+      lt_prog_compiler_pic='-fno-common'
+      ;;
 
+    hpux*)
+      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
+      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
+      # sets the default TLS model and affects inlining.
+      case $host_cpu in
+      hppa*64*)
+	# +Z the default
+	;;
+      *)
+	lt_prog_compiler_pic='-fPIC'
+	;;
+      esac
+      ;;
 
+    interix[3-9]*)
+      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+      # Instead, we relocate shared libraries at runtime.
+      ;;
 
+    msdosdjgpp*)
+      # Just because we use GCC doesn't mean we suddenly get shared libraries
+      # on systems that don't support them.
+      lt_prog_compiler_can_build_shared=no
+      enable_shared=no
+      ;;
 
+    *nto* | *qnx*)
+      # QNX uses GNU C++, but need to define -shared option too, otherwise
+      # it will coredump.
+      lt_prog_compiler_pic='-fPIC -shared'
+      ;;
 
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	lt_prog_compiler_pic=-Kconform_pic
+      fi
+      ;;
 
+    *)
+      lt_prog_compiler_pic='-fPIC'
+      ;;
+    esac
+  else
+    # PORTME Check for flag to pass linker flags through the system compiler.
+    case $host_os in
+    aix*)
+      lt_prog_compiler_wl='-Wl,'
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	lt_prog_compiler_static='-Bstatic'
+      else
+	lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
+      fi
+      ;;
 
+    mingw* | cygwin* | pw32* | os2* | cegcc*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      lt_prog_compiler_pic='-DDLL_EXPORT'
+      ;;
 
+    hpux9* | hpux10* | hpux11*)
+      lt_prog_compiler_wl='-Wl,'
+      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+      # not for PA HP-UX.
+      case $host_cpu in
+      hppa*64*|ia64*)
+	# +Z the default
+	;;
+      *)
+	lt_prog_compiler_pic='+Z'
+	;;
+      esac
+      # Is there a better lt_prog_compiler_static that works with the bundled CC?
+      lt_prog_compiler_static='${wl}-a ${wl}archive'
+      ;;
 
+    irix5* | irix6* | nonstopux*)
+      lt_prog_compiler_wl='-Wl,'
+      # PIC (with -KPIC) is the default.
+      lt_prog_compiler_static='-non_shared'
+      ;;
 
+    linux* | k*bsd*-gnu)
+      case $cc_basename in
+      # old Intel for x86_64 which still supported -KPIC.
+      ecc*)
+	lt_prog_compiler_wl='-Wl,'
+	lt_prog_compiler_pic='-KPIC'
+	lt_prog_compiler_static='-static'
+        ;;
+      # icc used to be incompatible with GCC.
+      # ICC 10 doesn't accept -KPIC any more.
+      icc* | ifort*)
+	lt_prog_compiler_wl='-Wl,'
+	lt_prog_compiler_pic='-fPIC'
+	lt_prog_compiler_static='-static'
+        ;;
+      # Lahey Fortran 8.1.
+      lf95*)
+	lt_prog_compiler_wl='-Wl,'
+	lt_prog_compiler_pic='--shared'
+	lt_prog_compiler_static='--static'
+	;;
+      pgcc* | pgf77* | pgf90* | pgf95*)
+        # Portland Group compilers (*not* the Pentium gcc compiler,
+	# which looks to be a dead project)
+	lt_prog_compiler_wl='-Wl,'
+	lt_prog_compiler_pic='-fpic'
+	lt_prog_compiler_static='-Bstatic'
+        ;;
+      ccc*)
+        lt_prog_compiler_wl='-Wl,'
+        # All Alpha code is PIC.
+        lt_prog_compiler_static='-non_shared'
+        ;;
+      xl*)
+	# IBM XL C 8.0/Fortran 10.1 on PPC
+	lt_prog_compiler_wl='-Wl,'
+	lt_prog_compiler_pic='-qpic'
+	lt_prog_compiler_static='-qstaticlink'
+	;;
+      *)
+	case `$CC -V 2>&1 | sed 5q` in
+	*Sun\ C*)
+	  # Sun C 5.9
+	  lt_prog_compiler_pic='-KPIC'
+	  lt_prog_compiler_static='-Bstatic'
+	  lt_prog_compiler_wl='-Wl,'
+	  ;;
+	*Sun\ F*)
+	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
+	  lt_prog_compiler_pic='-KPIC'
+	  lt_prog_compiler_static='-Bstatic'
+	  lt_prog_compiler_wl=''
+	  ;;
+	esac
+	;;
+      esac
+      ;;
 
+    newsos6)
+      lt_prog_compiler_pic='-KPIC'
+      lt_prog_compiler_static='-Bstatic'
+      ;;
 
+    *nto* | *qnx*)
+      # QNX uses GNU C++, but need to define -shared option too, otherwise
+      # it will coredump.
+      lt_prog_compiler_pic='-fPIC -shared'
+      ;;
 
+    osf3* | osf4* | osf5*)
+      lt_prog_compiler_wl='-Wl,'
+      # All OSF/1 code is PIC.
+      lt_prog_compiler_static='-non_shared'
+      ;;
 
+    rdos*)
+      lt_prog_compiler_static='-non_shared'
+      ;;
 
+    solaris*)
+      lt_prog_compiler_pic='-KPIC'
+      lt_prog_compiler_static='-Bstatic'
+      case $cc_basename in
+      f77* | f90* | f95*)
+	lt_prog_compiler_wl='-Qoption ld ';;
+      *)
+	lt_prog_compiler_wl='-Wl,';;
+      esac
+      ;;
 
+    sunos4*)
+      lt_prog_compiler_wl='-Qoption ld '
+      lt_prog_compiler_pic='-PIC'
+      lt_prog_compiler_static='-Bstatic'
+      ;;
 
+    sysv4 | sysv4.2uw2* | sysv4.3*)
+      lt_prog_compiler_wl='-Wl,'
+      lt_prog_compiler_pic='-KPIC'
+      lt_prog_compiler_static='-Bstatic'
+      ;;
 
+    sysv4*MP*)
+      if test -d /usr/nec ;then
+	lt_prog_compiler_pic='-Kconform_pic'
+	lt_prog_compiler_static='-Bstatic'
+      fi
+      ;;
 
+    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+      lt_prog_compiler_wl='-Wl,'
+      lt_prog_compiler_pic='-KPIC'
+      lt_prog_compiler_static='-Bstatic'
+      ;;
 
+    unicos*)
+      lt_prog_compiler_wl='-Wl,'
+      lt_prog_compiler_can_build_shared=no
+      ;;
 
+    uts4*)
+      lt_prog_compiler_pic='-pic'
+      lt_prog_compiler_static='-Bstatic'
+      ;;
 
+    *)
+      lt_prog_compiler_can_build_shared=no
+      ;;
+    esac
+  fi
 
+case $host_os in
+  # For platforms which do not support PIC, -DPIC is meaningless:
+  *djgpp*)
+    lt_prog_compiler_pic=
+    ;;
+  *)
+    lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
+    ;;
+esac
+{ $as_echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5
+$as_echo "$lt_prog_compiler_pic" >&6; }
 
 
 
 
 
-  { $as_echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
-$as_echo_n "checking dynamic linker characteristics... " >&6; }
 
-if test "$GCC" = yes; then
-  case $host_os in
-    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
-    *) lt_awk_arg="/^libraries:/" ;;
-  esac
-  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
-  if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
-    # if the path contains ";" then we assume it to be the separator
-    # otherwise default to the standard path separator (i.e. ":") - it is
-    # assumed that no part of a normal pathname contains ";" but that should
-    # okay in the real world where ";" in dirpaths is itself problematic.
-    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
-  else
-    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
-  fi
-  # Ok, now we have the path, separated by spaces, we can step through it
-  # and add multilib dir if necessary.
-  lt_tmp_lt_search_path_spec=
-  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
-  for lt_sys_path in $lt_search_path_spec; do
-    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
-      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
-    else
-      test -d "$lt_sys_path" && \
-	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
-    fi
-  done
-  lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
-BEGIN {RS=" "; FS="/|\n";} {
-  lt_foo="";
-  lt_count=0;
-  for (lt_i = NF; lt_i > 0; lt_i--) {
-    if ($lt_i != "" && $lt_i != ".") {
-      if ($lt_i == "..") {
-        lt_count++;
-      } else {
-        if (lt_count == 0) {
-          lt_foo="/" $lt_i lt_foo;
-        } else {
-          lt_count--;
-        }
-      }
-    }
-  }
-  if (lt_foo != "") { lt_freq[lt_foo]++; }
-  if (lt_freq[lt_foo] == 1) { print lt_foo; }
-}'`
-  sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$lt_prog_compiler_pic"; then
+  { $as_echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
+$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
+if test "${lt_cv_prog_compiler_pic_works+set}" = set; then
+  $as_echo_n "(cached) " >&6
 else
-  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+  lt_cv_prog_compiler_pic_works=no
+   ac_outfile=conftest.$ac_objext
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+   lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   # The option is referenced via a variable to avoid confusing sed.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:13472: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&5
+   echo "$as_me:13476: \$? = $ac_status" >&5
+   if (exit $ac_status) && test -s "$ac_outfile"; then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings other than the usual output.
+     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+       lt_cv_prog_compiler_pic_works=yes
+     fi
+   fi
+   $RM conftest*
+
 fi
-library_names_spec=
-libname_spec='lib$name'
-soname_spec=
-shrext_cmds=".so"
-postinstall_cmds=
-postuninstall_cmds=
-finish_cmds=
-finish_eval=
-shlibpath_var=
-shlibpath_overrides_runpath=unknown
-version_type=none
-dynamic_linker="$host_os ld.so"
-sys_lib_dlsearch_path_spec="/lib /usr/lib"
-need_lib_prefix=unknown
-hardcode_into_libs=no
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works" >&5
+$as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
 
-# when you set need_version to no, make sure it does not cause -set_version
-# flags to be left without arguments
-need_version=unknown
+if test x"$lt_cv_prog_compiler_pic_works" = xyes; then
+    case $lt_prog_compiler_pic in
+     "" | " "*) ;;
+     *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
+     esac
+else
+    lt_prog_compiler_pic=
+     lt_prog_compiler_can_build_shared=no
+fi
 
-case $host_os in
-aix3*)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
-  shlibpath_var=LIBPATH
+fi
 
-  # AIX 3 has no versioning support, so we append a major version to the name.
-  soname_spec='${libname}${release}${shared_ext}$major'
-  ;;
 
-aix[4-9]*)
-  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}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
-    shlibpath_var=LD_LIBRARY_PATH
-  else
-    # With GCC up to 2.95.x, collect2 would create an import file
-    # for dependence libraries.  The import file would start with
-    # the line `#! .'.  This would cause the generated library to
-    # depend on `.', always an invalid library.  This was fixed in
-    # development snapshots of GCC prior to 3.0.
-    case $host_os in
-      aix4 | aix4.[01] | aix4.[01].*)
-      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
-	   echo ' yes '
-	   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
-	:
-      else
-	can_build_shared=no
-      fi
-      ;;
-    esac
-    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
-    # soname into executable. Probably we can add versioning support to
-    # collect2, so additional links can be useful in future.
-    if test "$aix_use_runtimelinking" = yes; then
-      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
-      # instead of lib<name>.a to let people know that these are not
-      # typical AIX shared libraries.
-      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    else
-      # We preserve .a as extension for shared libraries through AIX4.2
-      # and later when we are not doing run time linking.
-      library_names_spec='${libname}${release}.a $libname.a'
-      soname_spec='${libname}${release}${shared_ext}$major'
-    fi
-    shlibpath_var=LIBPATH
-  fi
-  ;;
 
-amigaos*)
-  case $host_cpu in
-  powerpc)
-    # Since July 2007 AmigaOS4 officially supports .so libraries.
-    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    ;;
-  m68k)
-    library_names_spec='$libname.ixlibrary $libname.a'
-    # Create ${libname}_ixlibrary.a entries in /sys/libs.
-    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
-    ;;
-  esac
-  ;;
 
-beos*)
-  library_names_spec='${libname}${shared_ext}'
-  dynamic_linker="$host_os ld.so"
-  shlibpath_var=LIBRARY_PATH
-  ;;
 
-bsdi[45]*)
-  version_type=linux
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
-  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
-  # the default ld.so.conf also contains /usr/contrib/lib and
-  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
-  # libtool to hard-code these into programs
-  ;;
 
-cygwin* | mingw* | pw32* | cegcc*)
-  version_type=windows
-  shrext_cmds=".dll"
-  need_version=no
-  need_lib_prefix=no
+#
+# Check to make sure the static flag actually works.
+#
+wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
+{ $as_echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
+$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
+if test "${lt_cv_prog_compiler_static_works+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_static_works=no
+   save_LDFLAGS="$LDFLAGS"
+   LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
+   echo "$lt_simple_link_test_code" > conftest.$ac_ext
+   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+     # The linker can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     if test -s conftest.err; then
+       # Append any errors to the config.log.
+       cat conftest.err 1>&5
+       $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
+       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+       if diff conftest.exp conftest.er2 >/dev/null; then
+         lt_cv_prog_compiler_static_works=yes
+       fi
+     else
+       lt_cv_prog_compiler_static_works=yes
+     fi
+   fi
+   $RM -r conftest*
+   LDFLAGS="$save_LDFLAGS"
 
-  case $GCC,$host_os in
-  yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
-    library_names_spec='$libname.dll.a'
-    # DLL is installed to $(libdir)/../bin by postinstall_cmds
-    postinstall_cmds='base_file=`basename \${file}`~
-      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
-      dldir=$destdir/`dirname \$dlpath`~
-      test -d \$dldir || mkdir -p \$dldir~
-      $install_prog $dir/$dlname \$dldir/$dlname~
-      chmod a+x \$dldir/$dlname~
-      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
-        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
-      fi'
-    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
-      dlpath=$dir/\$dldll~
-       $RM \$dlpath'
-    shlibpath_overrides_runpath=yes
+fi
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works" >&5
+$as_echo "$lt_cv_prog_compiler_static_works" >&6; }
 
-    case $host_os in
-    cygwin*)
-      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
-      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
-      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
-      ;;
-    mingw* | cegcc*)
-      # MinGW DLLs use traditional 'lib' prefix
-      soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
-      sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
-      if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
-        # It is most probably a Windows format PATH printed by
-        # mingw gcc, but we are running on Cygwin. Gcc prints its search
-        # path with ; separators, and with drive letters. We can handle the
-        # drive letters (cygwin fileutils understands them), so leave them,
-        # especially as we might pass files found there to a mingw objdump,
-        # which wouldn't understand a cygwinified path. Ahh.
-        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
-      else
-        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
-      fi
-      ;;
-    pw32*)
-      # pw32 DLLs use 'pw' prefix rather than 'lib'
-      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
-      ;;
-    esac
-    ;;
+if test x"$lt_cv_prog_compiler_static_works" = xyes; then
+    :
+else
+    lt_prog_compiler_static=
+fi
 
-  *)
-    library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
-    ;;
-  esac
-  dynamic_linker='Win32 ld.exe'
-  # FIXME: first we should search . and the directory the executable is in
-  shlibpath_var=PATH
-  ;;
 
-darwin* | rhapsody*)
-  dynamic_linker="$host_os dyld"
-  version_type=darwin
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
-  soname_spec='${libname}${release}${major}$shared_ext'
-  shlibpath_overrides_runpath=yes
-  shlibpath_var=DYLD_LIBRARY_PATH
-  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
 
-  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
-  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
-  ;;
 
-dgux*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  ;;
 
-freebsd1*)
-  dynamic_linker=no
-  ;;
 
-freebsd* | dragonfly*)
-  # DragonFly does not have aout.  When/if they implement a new
-  # versioning mechanism, adjust this.
-  if test -x /usr/bin/objformat; then
-    objformat=`/usr/bin/objformat`
-  else
-    case $host_os in
-    freebsd[123]*) objformat=aout ;;
-    *) objformat=elf ;;
-    esac
-  fi
-  version_type=freebsd-$objformat
-  case $version_type in
-    freebsd-elf*)
-      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
-      need_version=no
-      need_lib_prefix=no
-      ;;
-    freebsd-*)
-      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
-      need_version=yes
-      ;;
-  esac
-  shlibpath_var=LD_LIBRARY_PATH
-  case $host_os in
-  freebsd2*)
-    shlibpath_overrides_runpath=yes
-    ;;
-  freebsd3.[01]* | freebsdelf3.[01]*)
-    shlibpath_overrides_runpath=yes
-    hardcode_into_libs=yes
-    ;;
-  freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
-  freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
-    shlibpath_overrides_runpath=no
-    hardcode_into_libs=yes
-    ;;
-  *) # from 4.6 on, and DragonFly
-    shlibpath_overrides_runpath=yes
-    hardcode_into_libs=yes
-    ;;
-  esac
-  ;;
 
-gnu*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  hardcode_into_libs=yes
-  ;;
+  { $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
+$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
+if test "${lt_cv_prog_compiler_c_o+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_c_o=no
+   $RM -r conftest 2>/dev/null
+   mkdir conftest
+   cd conftest
+   mkdir out
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
 
-hpux9* | hpux10* | hpux11*)
-  # Give a soname corresponding to the major version so that dld.sl refuses to
-  # link against other versions.
-  version_type=sunos
-  need_lib_prefix=no
-  need_version=no
-  case $host_cpu in
-  ia64*)
-    shrext_cmds='.so'
-    hardcode_into_libs=yes
-    dynamic_linker="$host_os dld.so"
-    shlibpath_var=LD_LIBRARY_PATH
-    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
-    if test "X$HPUX_IA64_MODE" = X32; then
-      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
-    else
-      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
-    fi
-    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
-    ;;
-  hppa*64*)
-    shrext_cmds='.sl'
-    hardcode_into_libs=yes
-    dynamic_linker="$host_os dld.sl"
-    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
-    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
-    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
-    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
-    ;;
-  *)
-    shrext_cmds='.sl'
-    dynamic_linker="$host_os dld.sl"
-    shlibpath_var=SHLIB_PATH
-    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
-    ;;
-  esac
-  # HP-UX runs *really* slowly unless shared libraries are mode 555.
-  postinstall_cmds='chmod 555 $lib'
-  ;;
+   lt_compiler_flag="-o out/conftest2.$ac_objext"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:13577: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>out/conftest.err)
+   ac_status=$?
+   cat out/conftest.err >&5
+   echo "$as_me:13581: \$? = $ac_status" >&5
+   if (exit $ac_status) && 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
+     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+       lt_cv_prog_compiler_c_o=yes
+     fi
+   fi
+   chmod u+w . 2>&5
+   $RM conftest*
+   # SGI C++ compiler will create directory out/ii_files/ for
+   # template instantiation
+   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+   $RM out/* && rmdir out
+   cd ..
+   $RM -r conftest
+   $RM conftest*
 
-interix[3-9]*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  ;;
+fi
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5
+$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
 
-irix5* | irix6* | nonstopux*)
-  case $host_os in
-    nonstopux*) version_type=nonstopux ;;
-    *)
-	if test "$lt_cv_prog_gnu_ld" = yes; then
-		version_type=linux
-	else
-		version_type=irix
-	fi ;;
-  esac
-  need_lib_prefix=no
-  need_version=no
-  soname_spec='${libname}${release}${shared_ext}$major'
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
-  case $host_os in
-  irix5* | nonstopux*)
-    libsuff= shlibsuff=
-    ;;
-  *)
-    case $LD in # libtool.m4 will add one of these switches to LD
-    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
-      libsuff= shlibsuff= libmagic=32-bit;;
-    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
-      libsuff=32 shlibsuff=N32 libmagic=N32;;
-    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
-      libsuff=64 shlibsuff=64 libmagic=64-bit;;
-    *) libsuff= shlibsuff= libmagic=never-match;;
-    esac
-    ;;
-  esac
-  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
-  shlibpath_overrides_runpath=no
-  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
-  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
-  hardcode_into_libs=yes
-  ;;
 
-# No shared lib support for Linux oldld, aout, or coff.
-linux*oldld* | linux*aout* | linux*coff*)
-  dynamic_linker=no
-  ;;
 
-# This must be Linux ELF.
-linux* | k*bsd*-gnu)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  # Some binutils ld are patched to set DT_RUNPATH
-  save_LDFLAGS=$LDFLAGS
-  save_libdir=$libdir
-  eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
-       LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
 
-int
-main ()
-{
 
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  if  ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then
-  shlibpath_overrides_runpath=yes
-fi
 
+  { $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
+$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
+if test "${lt_cv_prog_compiler_c_o+set}" = set; then
+  $as_echo_n "(cached) " >&6
 else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  lt_cv_prog_compiler_c_o=no
+   $RM -r conftest 2>/dev/null
+   mkdir conftest
+   cd conftest
+   mkdir out
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
 
+   lt_compiler_flag="-o out/conftest2.$ac_objext"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:13632: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>out/conftest.err)
+   ac_status=$?
+   cat out/conftest.err >&5
+   echo "$as_me:13636: \$? = $ac_status" >&5
+   if (exit $ac_status) && 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
+     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+       lt_cv_prog_compiler_c_o=yes
+     fi
+   fi
+   chmod u+w . 2>&5
+   $RM conftest*
+   # SGI C++ compiler will create directory out/ii_files/ for
+   # template instantiation
+   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+   $RM out/* && rmdir out
+   cd ..
+   $RM -r conftest
+   $RM conftest*
 
 fi
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5
+$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
 
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-  LDFLAGS=$save_LDFLAGS
-  libdir=$save_libdir
 
-  # This implies no fast_install, which is unacceptable.
-  # Some rework will be needed to allow for fast_install
-  # before this can be enabled.
-  hardcode_into_libs=yes
 
-  # Append ld.so.conf contents to the search path
-  if test -f /etc/ld.so.conf; then
-    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[	 ]*hwcap[	 ]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
-    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+
+hard_links="nottested"
+if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
+  # do not overwrite the value of need_locks provided by the user
+  { $as_echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
+$as_echo_n "checking if we can lock with hard links... " >&6; }
+  hard_links=yes
+  $RM conftest*
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  touch conftest.a
+  ln conftest.a conftest.b 2>&5 || hard_links=no
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  { $as_echo "$as_me:$LINENO: result: $hard_links" >&5
+$as_echo "$hard_links" >&6; }
+  if test "$hard_links" = no; then
+    { $as_echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
+$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
+    need_locks=warn
   fi
+else
+  need_locks=no
+fi
 
-  # We used to test for /lib/ld.so.1 and disable shared libraries on
-  # powerpc, because MkLinux only supported shared libraries with the
-  # GNU dynamic linker.  Since this was broken with cross compilers,
-  # most powerpc-linux boxes support dynamic linking these days and
-  # 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'
-  ;;
 
-netbsdelf*-gnu)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  dynamic_linker='NetBSD ld.elf_so'
-  ;;
 
-netbsd*)
-  version_type=sunos
-  need_lib_prefix=no
-  need_version=no
-  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
-    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
-    dynamic_linker='NetBSD (a.out) ld.so'
-  else
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
-    dynamic_linker='NetBSD ld.elf_so'
-  fi
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  hardcode_into_libs=yes
-  ;;
 
-newsos6)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  ;;
 
-*nto* | *qnx*)
-  version_type=qnx
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  dynamic_linker='ldqnx.so'
-  ;;
 
-openbsd*)
-  version_type=sunos
-  sys_lib_dlsearch_path_spec="/usr/lib"
-  need_lib_prefix=no
-  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+  { $as_echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
+
+  runpath_var=
+  allow_undefined_flag=
+  always_export_symbols=no
+  archive_cmds=
+  archive_expsym_cmds=
+  compiler_needs_object=no
+  enable_shared_with_static_runtimes=no
+  export_dynamic_flag_spec=
+  export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  hardcode_automatic=no
+  hardcode_direct=no
+  hardcode_direct_absolute=no
+  hardcode_libdir_flag_spec=
+  hardcode_libdir_flag_spec_ld=
+  hardcode_libdir_separator=
+  hardcode_minus_L=no
+  hardcode_shlibpath_var=unsupported
+  inherit_rpath=no
+  link_all_deplibs=unknown
+  module_cmds=
+  module_expsym_cmds=
+  old_archive_from_new_cmds=
+  old_archive_from_expsyms_cmds=
+  thread_safe_flag_spec=
+  whole_archive_flag_spec=
+  # include_expsyms should be a list of space-separated symbols to be *always*
+  # included in the symbol list
+  include_expsyms=
+  # exclude_expsyms can be an extended regexp of symbols to exclude
+  # it will be wrapped by ` (' and `)$', so one must not match beginning or
+  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
+  # as well as any symbol that contains `d'.
+  exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
+  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
+  # platforms (ab)use it in PIC code, but their linkers get confused if
+  # the symbol is explicitly referenced.  Since portable code cannot
+  # rely on this symbol name, it's probably fine to never include it in
+  # preloaded symbol tables.
+  # Exclude shared library initialization/finalization symbols.
+  extract_expsyms_cmds=
+
   case $host_os in
-    openbsd3.3 | openbsd3.3.*)	need_version=yes ;;
-    *)				need_version=no  ;;
+  cygwin* | mingw* | pw32* | cegcc*)
+    # FIXME: the MSVC++ port hasn't been tested in a loooong time
+    # When not using gcc, we currently assume that we are using
+    # Microsoft Visual C++.
+    if test "$GCC" != yes; then
+      with_gnu_ld=no
+    fi
+    ;;
+  interix*)
+    # we just hope/assume this is gcc and not c89 (= MSVC++)
+    with_gnu_ld=yes
+    ;;
+  openbsd*)
+    with_gnu_ld=no
+    ;;
   esac
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
-  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-    case $host_os in
-      openbsd2.[89] | openbsd2.[89].*)
-	shlibpath_overrides_runpath=no
-	;;
-      *)
-	shlibpath_overrides_runpath=yes
-	;;
-      esac
-  else
-    shlibpath_overrides_runpath=yes
-  fi
-  ;;
 
-os2*)
-  libname_spec='$name'
-  shrext_cmds=".dll"
-  need_lib_prefix=no
-  library_names_spec='$libname${shared_ext} $libname.a'
-  dynamic_linker='OS/2 ld.exe'
-  shlibpath_var=LIBPATH
-  ;;
-
-osf3* | osf4* | osf5*)
-  version_type=osf
-  need_lib_prefix=no
-  need_version=no
-  soname_spec='${libname}${release}${shared_ext}$major'
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  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"
-  ;;
-
-rdos*)
-  dynamic_linker=no
-  ;;
-
-solaris*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  hardcode_into_libs=yes
-  # ldd complains unless libraries are executable
-  postinstall_cmds='chmod +x $lib'
-  ;;
-
-sunos4*)
-  version_type=sunos
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
-  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
+  ld_shlibs=yes
   if test "$with_gnu_ld" = yes; then
-    need_lib_prefix=no
-  fi
-  need_version=yes
-  ;;
-
-sysv4 | sysv4.3*)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  case $host_vendor in
-    sni)
-      shlibpath_overrides_runpath=no
-      need_lib_prefix=no
-      runpath_var=LD_RUN_PATH
-      ;;
-    siemens)
-      need_lib_prefix=no
-      ;;
-    motorola)
-      need_lib_prefix=no
-      need_version=no
-      shlibpath_overrides_runpath=no
-      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
-      ;;
-  esac
-  ;;
-
-sysv4*MP*)
-  if test -d /usr/nec ;then
-    version_type=linux
-    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
-    soname_spec='$libname${shared_ext}.$major'
-    shlibpath_var=LD_LIBRARY_PATH
-  fi
-  ;;
+    # If archive_cmds runs LD, not CC, wlarc should be empty
+    wlarc='${wl}'
 
-sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
-  version_type=freebsd-elf
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  hardcode_into_libs=yes
-  if test "$with_gnu_ld" = yes; then
-    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
-  else
-    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
-    case $host_os in
-      sco3.2v5*)
-        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
-	;;
+    # Set some defaults for GNU ld with shared library support. These
+    # are reset later if shared libraries are not supported. Putting them
+    # here allows them to be overridden if necessary.
+    runpath_var=LD_RUN_PATH
+    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+    export_dynamic_flag_spec='${wl}--export-dynamic'
+    # ancient GNU ld didn't support --whole-archive et. al.
+    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
+      whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+    else
+      whole_archive_flag_spec=
+    fi
+    supports_anon_versioning=no
+    case `$LD -v 2>&1` 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
-  fi
-  sys_lib_dlsearch_path_spec='/usr/lib'
-  ;;
-
-tpf*)
-  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  ;;
-
-uts4*)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  ;;
-
-*)
-  dynamic_linker=no
-  ;;
-esac
-{ $as_echo "$as_me:$LINENO: result: $dynamic_linker" >&5
-$as_echo "$dynamic_linker" >&6; }
-test "$dynamic_linker" = no && can_build_shared=no
-
-variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
-if test "$GCC" = yes; then
-  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
-fi
-
-if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
-  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
-fi
-if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
-  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
-fi
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
 
+    # See if GNU ld supports shared libraries.
+    case $host_os in
+    aix[3-9]*)
+      # On AIX/PPC, the GNU linker is very broken
+      if test "$host_cpu" != ia64; then
+	ld_shlibs=no
+	cat <<_LT_EOF 1>&2
 
+*** Warning: the GNU linker, at least up to release 2.9.1, is reported
+*** to be unable to reliably create shared libraries on AIX.
+*** Therefore, libtool is disabling shared libraries support.  If you
+*** really care for shared libraries, you may want to modify your PATH
+*** so that a non-GNU linker is found, and then restart.
 
+_LT_EOF
+      fi
+      ;;
 
+    amigaos*)
+      case $host_cpu in
+      powerpc)
+            # see comment about AmigaOS4 .so support
+            archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+            archive_expsym_cmds=''
+        ;;
+      m68k)
+            archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+            hardcode_libdir_flag_spec='-L$libdir'
+            hardcode_minus_L=yes
+        ;;
+      esac
+      ;;
 
+    beos*)
+      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+	allow_undefined_flag=unsupported
+	# Joseph Beckenbach <jrb3 best com> says some releases of gcc
+	# support --undefined.  This deserves some investigation.  FIXME
+	archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+      else
+	ld_shlibs=no
+      fi
+      ;;
 
+    cygwin* | mingw* | pw32* | cegcc*)
+      # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
+      # as there is no search path for DLLs.
+      hardcode_libdir_flag_spec='-L$libdir'
+      allow_undefined_flag=unsupported
+      always_export_symbols=no
+      enable_shared_with_static_runtimes=yes
+      export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
 
+      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+        archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+	# If the export-symbols file already is a .def file (1st line
+	# is EXPORTS), use it as is; otherwise, prepend...
+	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;
+	  cat $export_symbols >> $output_objdir/$soname.def;
+	fi~
+	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+      else
+	ld_shlibs=no
+      fi
+      ;;
 
+    interix[3-9]*)
+      hardcode_direct=no
+      hardcode_shlibpath_var=no
+      hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+      export_dynamic_flag_spec='${wl}-E'
+      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+      # Instead, shared libraries are loaded at an image base (0x10000000 by
+      # default) and relocated if they conflict, which is a slow very memory
+      # consuming and fragmenting process.  To avoid this, we pick a random,
+      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
+      archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      ;;
 
+    gnu* | linux* | tpf* | k*bsd*-gnu)
+      tmp_diet=no
+      if test "$host_os" = linux-dietlibc; then
+	case $cc_basename in
+	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
+	esac
+      fi
+      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
+	 && test "$tmp_diet" = no
+      then
+	tmp_addflag=
+	tmp_sharedflag='-shared'
+	case $cc_basename,$host_cpu in
+        pgcc*)				# Portland Group C compiler
+	  whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+	  tmp_addflag=' $pic_flag'
+	  ;;
+	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
+	  whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+	  tmp_addflag=' $pic_flag -Mnomain' ;;
+	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
+	  tmp_addflag=' -i_dynamic' ;;
+	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
+	  tmp_addflag=' -i_dynamic -nofor_main' ;;
+	ifc* | ifort*)			# Intel Fortran compiler
+	  tmp_addflag=' -nofor_main' ;;
+	lf95*)				# Lahey Fortran 8.1
+	  whole_archive_flag_spec=
+	  tmp_sharedflag='--shared' ;;
+	xl[cC]*)			# IBM XL C 8.0 on PPC (deal with xlf below)
+	  tmp_sharedflag='-qmkshrobj'
+	  tmp_addflag= ;;
+	esac
+	case `$CC -V 2>&1 | sed 5q` in
+	*Sun\ C*)			# Sun C 5.9
+	  whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+	  compiler_needs_object=yes
+	  tmp_sharedflag='-G' ;;
+	*Sun\ F*)			# Sun Fortran 8.3
+	  tmp_sharedflag='-G' ;;
+	esac
+	archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
+        if test "x$supports_anon_versioning" = xyes; 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 '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+        fi
 
+	case $cc_basename in
+	xlf*)
+	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
+	  whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
+	  hardcode_libdir_flag_spec=
+	  hardcode_libdir_flag_spec_ld='-rpath $libdir'
+	  archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
+	  if test "x$supports_anon_versioning" = xyes; 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~
+	      $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
+	  fi
+	  ;;
+	esac
+      else
+        ld_shlibs=no
+      fi
+      ;;
 
+    netbsd* | netbsdelf*-gnu)
+      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+	archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+	wlarc=
+      else
+	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      fi
+      ;;
 
+    solaris*)
+      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
+	ld_shlibs=no
+	cat <<_LT_EOF 1>&2
 
+*** Warning: The releases 2.8.* of the GNU linker cannot reliably
+*** create shared libraries on Solaris systems.  Therefore, libtool
+*** is disabling shared libraries support.  We urge you to upgrade GNU
+*** binutils to release 2.9.1 or newer.  Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
 
+_LT_EOF
+      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      else
+	ld_shlibs=no
+      fi
+      ;;
 
+    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+      case `$LD -v 2>&1` in
+        *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
+	ld_shlibs=no
+	cat <<_LT_EOF 1>&2
 
+*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
+*** reliably create shared libraries on SCO systems.  Therefore, libtool
+*** is disabling shared libraries support.  We urge you to upgrade GNU
+*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
 
+_LT_EOF
+	;;
+	*)
+	  # For security reasons, it is highly recommended that you always
+	  # use absolute paths for naming shared libraries, and exclude the
+	  # DT_RUNPATH tag from executables and libraries.  But doing so
+	  # requires that you compile everything twice, which is a pain.
+	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+	    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+	    archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	    archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+	  else
+	    ld_shlibs=no
+	  fi
+	;;
+      esac
+      ;;
 
+    sunos4*)
+      archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      wlarc=
+      hardcode_direct=yes
+      hardcode_shlibpath_var=no
+      ;;
 
+    *)
+      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      else
+	ld_shlibs=no
+      fi
+      ;;
+    esac
 
+    if test "$ld_shlibs" = no; then
+      runpath_var=
+      hardcode_libdir_flag_spec=
+      export_dynamic_flag_spec=
+      whole_archive_flag_spec=
+    fi
+  else
+    # PORTME fill in a description of your system's linker (not GNU ld)
+    case $host_os in
+    aix3*)
+      allow_undefined_flag=unsupported
+      always_export_symbols=yes
+      archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
+      # Note: this linker hardcodes the directories in LIBPATH if there
+      # are no directories specified by -L.
+      hardcode_minus_L=yes
+      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
+	# Neither direct hardcoding nor static linking is supported with a
+	# broken collect2.
+	hardcode_direct=unsupported
+      fi
+      ;;
 
+    aix[4-9]*)
+      if test "$host_cpu" = ia64; then
+	# On IA64, the linker does run time linking by default, so we don't
+	# have to do anything special.
+	aix_use_runtimelinking=no
+	exp_sym_flag='-Bexport'
+	no_entry_flag=""
+      else
+	# If we're using GNU nm, then we don't want the "-C" option.
+	# -C means demangle to AIX nm, but means don't demangle with GNU nm
+	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
+	  export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+	else
+	  export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+	fi
+	aix_use_runtimelinking=no
 
+	# Test if we are trying to use run time linking or normal
+	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
+	# need to do runtime linking.
+	case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
+	  for ld_flag in $LDFLAGS; do
+	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+	    aix_use_runtimelinking=yes
+	    break
+	  fi
+	  done
+	  ;;
+	esac
 
+	exp_sym_flag='-bexport'
+	no_entry_flag='-bnoentry'
+      fi
 
+      # When large executables or shared objects are built, AIX ld can
+      # have problems creating the table of contents.  If linking a library
+      # or program results in "error TOC overflow" add -mminimal-toc to
+      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
+      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
 
+      archive_cmds=''
+      hardcode_direct=yes
+      hardcode_direct_absolute=yes
+      hardcode_libdir_separator=':'
+      link_all_deplibs=yes
+      file_list_spec='${wl}-f,'
 
+      if test "$GCC" = yes; then
+	case $host_os in aix4.[012]|aix4.[012].*)
+	# We only want to do this on AIX 4.2 and lower, the check
+	# below for broken collect2 doesn't work under 4.3+
+	  collect2name=`${CC} -print-prog-name=collect2`
+	  if test -f "$collect2name" &&
+	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
+	  then
+	  # We have reworked collect2
+	  :
+	  else
+	  # We have old collect2
+	  hardcode_direct=unsupported
+	  # It fails to find uninstalled libraries when the uninstalled
+	  # path is not listed in the libpath.  Setting hardcode_minus_L
+	  # to unsupported forces relinking
+	  hardcode_minus_L=yes
+	  hardcode_libdir_flag_spec='-L$libdir'
+	  hardcode_libdir_separator=
+	  fi
+	  ;;
+	esac
+	shared_flag='-shared'
+	if test "$aix_use_runtimelinking" = yes; then
+	  shared_flag="$shared_flag "'${wl}-G'
+	fi
+	link_all_deplibs=no
+      else
+	# not using gcc
+	if test "$host_cpu" = ia64; then
+	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+	# chokes on -Wl,-G. The following line is correct:
+	  shared_flag='-G'
+	else
+	  if test "$aix_use_runtimelinking" = yes; then
+	    shared_flag='${wl}-G'
+	  else
+	    shared_flag='${wl}-bM:SRE'
+	  fi
+	fi
+      fi
 
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-  { $as_echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
-$as_echo_n "checking how to hardcode library paths into programs... " >&6; }
-hardcode_action=
-if test -n "$hardcode_libdir_flag_spec" ||
-   test -n "$runpath_var" ||
-   test "X$hardcode_automatic" = "Xyes" ; then
-
-  # We can hardcode non-existent directories.
-  if test "$hardcode_direct" != no &&
-     # If the only mechanism to avoid hardcoding is shlibpath_var, we
-     # have to relink, otherwise we might link with an installed library
-     # when we should be linking with a yet-to-be-installed one
-     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no &&
-     test "$hardcode_minus_L" != no; then
-    # Linking always hardcodes the temporary library directory.
-    hardcode_action=relink
-  else
-    # We can link without hardcoding, and we can hardcode nonexisting dirs.
-    hardcode_action=immediate
-  fi
-else
-  # We cannot hardcode anything, or else we can only hardcode existing
-  # directories.
-  hardcode_action=unsupported
-fi
-{ $as_echo "$as_me:$LINENO: result: $hardcode_action" >&5
-$as_echo "$hardcode_action" >&6; }
-
-if test "$hardcode_action" = relink ||
-   test "$inherit_rpath" = yes; then
-  # Fast installation is not supported
-  enable_fast_install=no
-elif test "$shlibpath_overrides_runpath" = yes ||
-     test "$enable_shared" = no; then
-  # Fast installation is not necessary
-  enable_fast_install=needless
-fi
-
-
-
-
-
-
-  if test "x$enable_dlopen" != xyes; then
-  enable_dlopen=unknown
-  enable_dlopen_self=unknown
-  enable_dlopen_self_static=unknown
-else
-  lt_cv_dlopen=no
-  lt_cv_dlopen_libs=
-
-  case $host_os in
-  beos*)
-    lt_cv_dlopen="load_add_on"
-    lt_cv_dlopen_libs=
-    lt_cv_dlopen_self=yes
-    ;;
-
-  mingw* | pw32* | cegcc*)
-    lt_cv_dlopen="LoadLibrary"
-    lt_cv_dlopen_libs=
-    ;;
-
-  cygwin*)
-    lt_cv_dlopen="dlopen"
-    lt_cv_dlopen_libs=
-    ;;
-
-  darwin*)
-  # if libdl is installed we need to link against it
-    { $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
-$as_echo_n "checking for dlopen in -ldl... " >&6; }
-if test "${ac_cv_lib_dl_dlopen+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldl  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
+      export_dynamic_flag_spec='${wl}-bexpall'
+      # It seems that -bexpall does not export symbols beginning with
+      # underscore (_), so it is better to generate a list of symbols to export.
+      always_export_symbols=yes
+      if test "$aix_use_runtimelinking" = yes; then
+	# Warning - without using the other runtime loading flags (-brtl),
+	# -berok will link without error, but may produce a broken library.
+	allow_undefined_flag='-berok'
+        # Determine the default libpath from the value encoded in an
+        # empty executable.
+        cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char dlopen ();
 int
 main ()
 {
-return dlopen ();
+
   ;
   return 0;
 }
@@ -14233,80 +14167,52 @@
 	 test "$cross_compiling" = yes ||
 	 $as_test_x conftest$ac_exeext
        }; then
-  ac_cv_lib_dl_dlopen=yes
+
+lt_aix_libpath_sed='
+    /Import File Strings/,/^$/ {
+	/^0/ {
+	    s/^0  *\(.*\)$/\1/
+	    p
+	}
+    }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then
+  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-	ac_cv_lib_dl_dlopen=no
+
 fi
 
 rm -rf conftest.dSYM
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
-$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
-if test "x$ac_cv_lib_dl_dlopen" = x""yes; then
-  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
-else
-
-    lt_cv_dlopen="dyld"
-    lt_cv_dlopen_libs=
-    lt_cv_dlopen_self=yes
-
-fi
-
-    ;;
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 
-  *)
-    { $as_echo "$as_me:$LINENO: checking for shl_load" >&5
-$as_echo_n "checking for shl_load... " >&6; }
-if test "${ac_cv_func_shl_load+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
+        hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+        archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+      else
+	if test "$host_cpu" = ia64; then
+	  hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
+	  allow_undefined_flag="-z nodefs"
+	  archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+	else
+	 # Determine the default libpath from the value encoded in an
+	 # empty executable.
+	 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-/* Define shl_load to an innocuous variant, in case <limits.h> declares shl_load.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define shl_load innocuous_shl_load
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char shl_load (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef shl_load
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char shl_load ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined __stub_shl_load || defined __stub___shl_load
-choke me
-#endif
 
 int
 main ()
 {
-return shl_load ();
+
   ;
   return 0;
 }
@@ -14332,54 +14238,245 @@
 	 test "$cross_compiling" = yes ||
 	 $as_test_x conftest$ac_exeext
        }; then
-  ac_cv_func_shl_load=yes
+
+lt_aix_libpath_sed='
+    /Import File Strings/,/^$/ {
+	/^0/ {
+	    s/^0  *\(.*\)$/\1/
+	    p
+	}
+    }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then
+  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-	ac_cv_func_shl_load=no
+
 fi
 
 rm -rf conftest.dSYM
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5
-$as_echo "$ac_cv_func_shl_load" >&6; }
-if test "x$ac_cv_func_shl_load" = x""yes; then
-  lt_cv_dlopen="shl_load"
-else
-  { $as_echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
-$as_echo_n "checking for shl_load in -ldld... " >&6; }
-if test "${ac_cv_lib_dld_shl_load+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldld  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char shl_load ();
-int
-main ()
-{
-return shl_load ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
+	 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+	  # Warning - without using the other run time loading flags,
+	  # -berok will link without error, but may produce a broken library.
+	  no_undefined_flag=' ${wl}-bernotok'
+	  allow_undefined_flag=' ${wl}-berok'
+	  # Exported symbols can be pulled into shared objects from archives
+	  whole_archive_flag_spec='$convenience'
+	  archive_cmds_need_lc=yes
+	  # This is similar to how AIX traditionally builds its shared libraries.
+	  archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+	fi
+      fi
+      ;;
+
+    amigaos*)
+      case $host_cpu in
+      powerpc)
+            # see comment about AmigaOS4 .so support
+            archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+            archive_expsym_cmds=''
+        ;;
+      m68k)
+            archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+            hardcode_libdir_flag_spec='-L$libdir'
+            hardcode_minus_L=yes
+        ;;
+      esac
+      ;;
+
+    bsdi[45]*)
+      export_dynamic_flag_spec=-rdynamic
+      ;;
+
+    cygwin* | mingw* | pw32* | cegcc*)
+      # When not using gcc, we currently assume that we are using
+      # Microsoft Visual C++.
+      # hardcode_libdir_flag_spec is actually meaningless, as there is
+      # no search path for DLLs.
+      hardcode_libdir_flag_spec=' '
+      allow_undefined_flag=unsupported
+      # Tell ltmain to make .lib files, not .a files.
+      libext=lib
+      # Tell ltmain to make .dll files, not .so files.
+      shrext_cmds=".dll"
+      # FIXME: Setting linknames here is a bad hack.
+      archive_cmds='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
+      # The linker will automatically build a .lib file if we build a DLL.
+      old_archive_from_new_cmds='true'
+      # FIXME: Should let the user specify the lib program.
+      old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
+      fix_srcfile_path='`cygpath -w "$srcfile"`'
+      enable_shared_with_static_runtimes=yes
+      ;;
+
+    darwin* | rhapsody*)
+
+
+  archive_cmds_need_lc=no
+  hardcode_direct=no
+  hardcode_automatic=yes
+  hardcode_shlibpath_var=unsupported
+  whole_archive_flag_spec=''
+  link_all_deplibs=yes
+  allow_undefined_flag="$_lt_dar_allow_undefined"
+  case $cc_basename in
+     ifort*) _lt_dar_can_shared=yes ;;
+     *) _lt_dar_can_shared=$GCC ;;
+  esac
+  if test "$_lt_dar_can_shared" = "yes"; then
+    output_verbose_link_cmd=echo
+    archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+    module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
+    archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
+    module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
+
+  else
+  ld_shlibs=no
+  fi
+
+      ;;
+
+    dgux*)
+      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_shlibpath_var=no
+      ;;
+
+    freebsd1*)
+      ld_shlibs=no
+      ;;
+
+    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
+    # support.  Future versions do this automatically, but an explicit c++rt0.o
+    # does not break anything, and helps significantly (at the cost of a little
+    # extra space).
+    freebsd2.2*)
+      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_direct=yes
+      hardcode_shlibpath_var=no
+      ;;
+
+    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+    freebsd2*)
+      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_direct=yes
+      hardcode_minus_L=yes
+      hardcode_shlibpath_var=no
+      ;;
+
+    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+    freebsd* | dragonfly*)
+      archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_direct=yes
+      hardcode_shlibpath_var=no
+      ;;
+
+    hpux9*)
+      if test "$GCC" = yes; then
+	archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      else
+	archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      fi
+      hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+      hardcode_libdir_separator=:
+      hardcode_direct=yes
+
+      # hardcode_minus_L: Not really in the search PATH,
+      # but as the default location of the library.
+      hardcode_minus_L=yes
+      export_dynamic_flag_spec='${wl}-E'
+      ;;
+
+    hpux10*)
+      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+	archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+      fi
+      if test "$with_gnu_ld" = no; then
+	hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+	hardcode_libdir_flag_spec_ld='+b $libdir'
+	hardcode_libdir_separator=:
+	hardcode_direct=yes
+	hardcode_direct_absolute=yes
+	export_dynamic_flag_spec='${wl}-E'
+	# hardcode_minus_L: Not really in the search PATH,
+	# but as the default location of the library.
+	hardcode_minus_L=yes
+      fi
+      ;;
+
+    hpux11*)
+      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+	case $host_cpu in
+	hppa*64*)
+	  archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	ia64*)
+	  archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	*)
+	  archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	esac
+      else
+	case $host_cpu in
+	hppa*64*)
+	  archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	ia64*)
+	  archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	*)
+	  archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	esac
+      fi
+      if test "$with_gnu_ld" = no; then
+	hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+	hardcode_libdir_separator=:
+
+	case $host_cpu in
+	hppa*64*|ia64*)
+	  hardcode_direct=no
+	  hardcode_shlibpath_var=no
+	  ;;
+	*)
+	  hardcode_direct=yes
+	  hardcode_direct_absolute=yes
+	  export_dynamic_flag_spec='${wl}-E'
+
+	  # hardcode_minus_L: Not really in the search PATH,
+	  # but as the default location of the library.
+	  hardcode_minus_L=yes
+	  ;;
+	esac
+      fi
+      ;;
+
+    irix5* | irix6* | nonstopux*)
+      if test "$GCC" = yes; then
+	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	# Try to use the -exported_symbol ld option, if it does not
+	# work, assume that -exports_file does not work either and
+	# implicitly export all symbols.
+        save_LDFLAGS="$LDFLAGS"
+        LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
+        cat >conftest.$ac_ext <<_ACEOF
+int foo(void) {}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
@@ -14399,273 +14496,4822 @@
 	 test "$cross_compiling" = yes ||
 	 $as_test_x conftest$ac_exeext
        }; then
-  ac_cv_lib_dld_shl_load=yes
+  archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
+
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-	ac_cv_lib_dld_shl_load=no
+
 fi
 
 rm -rf conftest.dSYM
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
-$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
-if test "x$ac_cv_lib_dld_shl_load" = x""yes; then
-  lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
-else
-  { $as_echo "$as_me:$LINENO: checking for dlopen" >&5
-$as_echo_n "checking for dlopen... " >&6; }
-if test "${ac_cv_func_dlopen+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define dlopen to an innocuous variant, in case <limits.h> declares dlopen.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define dlopen innocuous_dlopen
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char dlopen (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
+        LDFLAGS="$save_LDFLAGS"
+      else
+	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+	archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
+      fi
+      archive_cmds_need_lc='no'
+      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator=:
+      inherit_rpath=yes
+      link_all_deplibs=yes
+      ;;
 
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef dlopen
+    netbsd* | netbsdelf*-gnu)
+      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+	archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
+      else
+	archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
+      fi
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_direct=yes
+      hardcode_shlibpath_var=no
+      ;;
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char dlopen ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined __stub_dlopen || defined __stub___dlopen
-choke me
-#endif
+    newsos6)
+      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_direct=yes
+      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator=:
+      hardcode_shlibpath_var=no
+      ;;
 
-int
-main ()
-{
-return dlopen ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_func_dlopen=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+    *nto* | *qnx*)
+      ;;
 
-	ac_cv_func_dlopen=no
-fi
+    openbsd*)
+      if test -f /usr/libexec/ld.so; then
+	hardcode_direct=yes
+	hardcode_shlibpath_var=no
+	hardcode_direct_absolute=yes
+	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 $compiler_flags'
+	  archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+	  hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+	  export_dynamic_flag_spec='${wl}-E'
+	else
+	  case $host_os in
+	   openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+	     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+	     hardcode_libdir_flag_spec='-R$libdir'
+	     ;;
+	   *)
+	     archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	     hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+	     ;;
+	  esac
+	fi
+      else
+	ld_shlibs=no
+      fi
+      ;;
 
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5
-$as_echo "$ac_cv_func_dlopen" >&6; }
-if test "x$ac_cv_func_dlopen" = x""yes; then
-  lt_cv_dlopen="dlopen"
-else
-  { $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
-$as_echo_n "checking for dlopen in -ldl... " >&6; }
-if test "${ac_cv_lib_dl_dlopen+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldl  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+    os2*)
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_minus_L=yes
+      allow_undefined_flag=unsupported
+      archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
+      old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+      ;;
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char dlopen ();
-int
-main ()
-{
-return dlopen ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_dl_dlopen=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+    osf3*)
+      if test "$GCC" = yes; then
+	allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
+	archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+      else
+	allow_undefined_flag=' -expect_unresolved \*'
+	archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+      fi
+      archive_cmds_need_lc='no'
+      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator=:
+      ;;
 
-	ac_cv_lib_dl_dlopen=no
-fi
+    osf4* | osf5*)	# as osf3* with the addition of -msym flag
+      if test "$GCC" = yes; then
+	allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
+	archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      else
+	allow_undefined_flag=' -expect_unresolved \*'
+	archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+	archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
+	$CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
 
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
-$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
-if test "x$ac_cv_lib_dl_dlopen" = x""yes; then
-  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
-else
-  { $as_echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5
-$as_echo_n "checking for dlopen in -lsvld... " >&6; }
-if test "${ac_cv_lib_svld_dlopen+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lsvld  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+	# Both c and cxx compiler support -rpath directly
+	hardcode_libdir_flag_spec='-rpath $libdir'
+      fi
+      archive_cmds_need_lc='no'
+      hardcode_libdir_separator=:
+      ;;
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char dlopen ();
-int
-main ()
-{
-return dlopen ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
+    solaris*)
+      no_undefined_flag=' -z defs'
+      if test "$GCC" = yes; then
+	wlarc='${wl}'
+	archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+	  $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+      else
+	case `$CC -V 2>&1` in
+	*"Compilers 5.0"*)
+	  wlarc=''
+	  archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+	  $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
+	  ;;
+	*)
+	  wlarc='${wl}'
+	  archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
+	  archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+	  $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+	  ;;
+	esac
+      fi
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_shlibpath_var=no
+      case $host_os in
+      solaris2.[0-5] | solaris2.[0-5].*) ;;
+      *)
+	# The compiler driver will combine and reorder linker options,
+	# but understands `-z linker_flag'.  GCC discards it without `$wl',
+	# but is careful enough not to reorder.
+	# Supported since Solaris 2.6 (maybe 2.5.1?)
+	if test "$GCC" = yes; then
+	  whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+	else
+	  whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
+	fi
+	;;
+      esac
+      link_all_deplibs=yes
+      ;;
+
+    sunos4*)
+      if test "x$host_vendor" = xsequent; then
+	# Use $CC to link under sequent, because it throws in some extra .o
+	# files that make .init and .fini sections work.
+	archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+      fi
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_direct=yes
+      hardcode_minus_L=yes
+      hardcode_shlibpath_var=no
+      ;;
+
+    sysv4)
+      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
+      ;;
+
+    sysv4.3*)
+      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_shlibpath_var=no
+      export_dynamic_flag_spec='-Bexport'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	hardcode_shlibpath_var=no
+	runpath_var=LD_RUN_PATH
+	hardcode_runpath_var=yes
+	ld_shlibs=yes
+      fi
+      ;;
+
+    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
+      no_undefined_flag='${wl}-z,text'
+      archive_cmds_need_lc=no
+      hardcode_shlibpath_var=no
+      runpath_var='LD_RUN_PATH'
+
+      if test "$GCC" = yes; then
+	archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      fi
+      ;;
+
+    sysv5* | sco3.2v5* | sco5v6*)
+      # Note: We can NOT use -z defs as we might desire, because we do not
+      # link with -lc, and that would cause any symbols used from libc to
+      # always be unresolved, which means just about no library would
+      # ever link correctly.  If we're not using GNU ld we use -z text
+      # though, which does catch some bad symbols but isn't as heavy-handed
+      # as -z defs.
+      no_undefined_flag='${wl}-z,text'
+      allow_undefined_flag='${wl}-z,nodefs'
+      archive_cmds_need_lc=no
+      hardcode_shlibpath_var=no
+      hardcode_libdir_flag_spec='${wl}-R,$libdir'
+      hardcode_libdir_separator=':'
+      link_all_deplibs=yes
+      export_dynamic_flag_spec='${wl}-Bexport'
+      runpath_var='LD_RUN_PATH'
+
+      if test "$GCC" = yes; then
+	archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      fi
+      ;;
+
+    uts4*)
+      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_shlibpath_var=no
+      ;;
+
+    *)
+      ld_shlibs=no
+      ;;
+    esac
+
+    if test x$host_vendor = xsni; then
+      case $host in
+      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+	export_dynamic_flag_spec='${wl}-Blargedynsym'
+	;;
+      esac
+    fi
+  fi
+
+{ $as_echo "$as_me:$LINENO: result: $ld_shlibs" >&5
+$as_echo "$ld_shlibs" >&6; }
+test "$ld_shlibs" = no && can_build_shared=no
+
+with_gnu_ld=$with_gnu_ld
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$archive_cmds_need_lc" in
+x|xyes)
+  # Assume -lc should be added
+  archive_cmds_need_lc=yes
+
+  if test "$enable_shared" = yes && test "$GCC" = yes; then
+    case $archive_cmds in
+    *'~'*)
+      # FIXME: we may have to deal with multi-command sequences.
+      ;;
+    '$CC '*)
+      # Test whether the compiler implicitly links with -lc since on some
+      # systems, -lgcc has to come before -lc. If gcc already passes -lc
+      # to ld, don't add -lc before -lgcc.
+      { $as_echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
+$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
+      $RM conftest*
+      echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+      if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } 2>conftest.err; then
+        soname=conftest
+        lib=conftest
+        libobjs=conftest.$ac_objext
+        deplibs=
+        wl=$lt_prog_compiler_wl
+	pic_flag=$lt_prog_compiler_pic
+        compiler_flags=-v
+        linker_flags=-v
+        verstring=
+        output_objdir=.
+        libname=conftest
+        lt_save_allow_undefined_flag=$allow_undefined_flag
+        allow_undefined_flag=
+        if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\"") >&5
+  (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+        then
+	  archive_cmds_need_lc=no
+        else
+	  archive_cmds_need_lc=yes
+        fi
+        allow_undefined_flag=$lt_save_allow_undefined_flag
+      else
+        cat conftest.err 1>&5
+      fi
+      $RM conftest*
+      { $as_echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5
+$as_echo "$archive_cmds_need_lc" >&6; }
+      ;;
+    esac
+  fi
+  ;;
+esac
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+  { $as_echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
+$as_echo_n "checking dynamic linker characteristics... " >&6; }
+
+if test "$GCC" = yes; then
+  case $host_os in
+    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
+    *) lt_awk_arg="/^libraries:/" ;;
+  esac
+  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+  if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
+    # if the path contains ";" then we assume it to be the separator
+    # otherwise default to the standard path separator (i.e. ":") - it is
+    # assumed that no part of a normal pathname contains ";" but that should
+    # okay in the real world where ";" in dirpaths is itself problematic.
+    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
+  else
+    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+  fi
+  # Ok, now we have the path, separated by spaces, we can step through it
+  # and add multilib dir if necessary.
+  lt_tmp_lt_search_path_spec=
+  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
+  for lt_sys_path in $lt_search_path_spec; do
+    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
+      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
+    else
+      test -d "$lt_sys_path" && \
+	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
+    fi
+  done
+  lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
+BEGIN {RS=" "; FS="/|\n";} {
+  lt_foo="";
+  lt_count=0;
+  for (lt_i = NF; lt_i > 0; lt_i--) {
+    if ($lt_i != "" && $lt_i != ".") {
+      if ($lt_i == "..") {
+        lt_count++;
+      } else {
+        if (lt_count == 0) {
+          lt_foo="/" $lt_i lt_foo;
+        } else {
+          lt_count--;
+        }
+      }
+    }
+  }
+  if (lt_foo != "") { lt_freq[lt_foo]++; }
+  if (lt_freq[lt_foo] == 1) { print lt_foo; }
+}'`
+  sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
+else
+  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+fi
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=".so"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+case $host_os in
+aix3*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+  shlibpath_var=LIBPATH
+
+  # AIX 3 has no versioning support, so we append a major version to the name.
+  soname_spec='${libname}${release}${shared_ext}$major'
+  ;;
+
+aix[4-9]*)
+  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}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+    shlibpath_var=LD_LIBRARY_PATH
+  else
+    # With GCC up to 2.95.x, collect2 would create an import file
+    # for dependence libraries.  The import file would start with
+    # the line `#! .'.  This would cause the generated library to
+    # depend on `.', always an invalid library.  This was fixed in
+    # development snapshots of GCC prior to 3.0.
+    case $host_os in
+      aix4 | aix4.[01] | aix4.[01].*)
+      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+	   echo ' yes '
+	   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
+	:
+      else
+	can_build_shared=no
+      fi
+      ;;
+    esac
+    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+    # soname into executable. Probably we can add versioning support to
+    # collect2, so additional links can be useful in future.
+    if test "$aix_use_runtimelinking" = yes; then
+      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+      # instead of lib<name>.a to let people know that these are not
+      # typical AIX shared libraries.
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    else
+      # We preserve .a as extension for shared libraries through AIX4.2
+      # and later when we are not doing run time linking.
+      library_names_spec='${libname}${release}.a $libname.a'
+      soname_spec='${libname}${release}${shared_ext}$major'
+    fi
+    shlibpath_var=LIBPATH
+  fi
+  ;;
+
+amigaos*)
+  case $host_cpu in
+  powerpc)
+    # Since July 2007 AmigaOS4 officially supports .so libraries.
+    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    ;;
+  m68k)
+    library_names_spec='$libname.ixlibrary $libname.a'
+    # Create ${libname}_ixlibrary.a entries in /sys/libs.
+    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+    ;;
+  esac
+  ;;
+
+beos*)
+  library_names_spec='${libname}${shared_ext}'
+  dynamic_linker="$host_os ld.so"
+  shlibpath_var=LIBRARY_PATH
+  ;;
+
+bsdi[45]*)
+  version_type=linux
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+  # the default ld.so.conf also contains /usr/contrib/lib and
+  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+  # libtool to hard-code these into programs
+  ;;
+
+cygwin* | mingw* | pw32* | cegcc*)
+  version_type=windows
+  shrext_cmds=".dll"
+  need_version=no
+  need_lib_prefix=no
+
+  case $GCC,$host_os in
+  yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
+    library_names_spec='$libname.dll.a'
+    # DLL is installed to $(libdir)/../bin by postinstall_cmds
+    postinstall_cmds='base_file=`basename \${file}`~
+      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+      dldir=$destdir/`dirname \$dlpath`~
+      test -d \$dldir || mkdir -p \$dldir~
+      $install_prog $dir/$dlname \$dldir/$dlname~
+      chmod a+x \$dldir/$dlname~
+      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+      fi'
+    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+      dlpath=$dir/\$dldll~
+       $RM \$dlpath'
+    shlibpath_overrides_runpath=yes
+
+    case $host_os in
+    cygwin*)
+      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+      ;;
+    mingw* | cegcc*)
+      # MinGW DLLs use traditional 'lib' prefix
+      soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+      if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
+        # It is most probably a Windows format PATH printed by
+        # mingw gcc, but we are running on Cygwin. Gcc prints its search
+        # path with ; separators, and with drive letters. We can handle the
+        # drive letters (cygwin fileutils understands them), so leave them,
+        # especially as we might pass files found there to a mingw objdump,
+        # which wouldn't understand a cygwinified path. Ahh.
+        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+      else
+        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+      fi
+      ;;
+    pw32*)
+      # pw32 DLLs use 'pw' prefix rather than 'lib'
+      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      ;;
+    esac
+    ;;
+
+  *)
+    library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
+    ;;
+  esac
+  dynamic_linker='Win32 ld.exe'
+  # FIXME: first we should search . and the directory the executable is in
+  shlibpath_var=PATH
+  ;;
+
+darwin* | rhapsody*)
+  dynamic_linker="$host_os dyld"
+  version_type=darwin
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+  soname_spec='${libname}${release}${major}$shared_ext'
+  shlibpath_overrides_runpath=yes
+  shlibpath_var=DYLD_LIBRARY_PATH
+  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+
+  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
+  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+  ;;
+
+dgux*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+freebsd1*)
+  dynamic_linker=no
+  ;;
+
+freebsd* | dragonfly*)
+  # DragonFly does not have aout.  When/if they implement a new
+  # versioning mechanism, adjust this.
+  if test -x /usr/bin/objformat; then
+    objformat=`/usr/bin/objformat`
+  else
+    case $host_os in
+    freebsd[123]*) objformat=aout ;;
+    *) objformat=elf ;;
+    esac
+  fi
+  version_type=freebsd-$objformat
+  case $version_type in
+    freebsd-elf*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+      need_version=no
+      need_lib_prefix=no
+      ;;
+    freebsd-*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+      need_version=yes
+      ;;
+  esac
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_os in
+  freebsd2*)
+    shlibpath_overrides_runpath=yes
+    ;;
+  freebsd3.[01]* | freebsdelf3.[01]*)
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
+  freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
+    shlibpath_overrides_runpath=no
+    hardcode_into_libs=yes
+    ;;
+  *) # from 4.6 on, and DragonFly
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  esac
+  ;;
+
+gnu*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  hardcode_into_libs=yes
+  ;;
+
+hpux9* | hpux10* | hpux11*)
+  # Give a soname corresponding to the major version so that dld.sl refuses to
+  # link against other versions.
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  case $host_cpu in
+  ia64*)
+    shrext_cmds='.so'
+    hardcode_into_libs=yes
+    dynamic_linker="$host_os dld.so"
+    shlibpath_var=LD_LIBRARY_PATH
+    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    if test "X$HPUX_IA64_MODE" = X32; then
+      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+    else
+      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+    fi
+    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+    ;;
+  hppa*64*)
+    shrext_cmds='.sl'
+    hardcode_into_libs=yes
+    dynamic_linker="$host_os dld.sl"
+    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+    ;;
+  *)
+    shrext_cmds='.sl'
+    dynamic_linker="$host_os dld.sl"
+    shlibpath_var=SHLIB_PATH
+    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    ;;
+  esac
+  # HP-UX runs *really* slowly unless shared libraries are mode 555.
+  postinstall_cmds='chmod 555 $lib'
+  ;;
+
+interix[3-9]*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  ;;
+
+irix5* | irix6* | nonstopux*)
+  case $host_os in
+    nonstopux*) version_type=nonstopux ;;
+    *)
+	if test "$lt_cv_prog_gnu_ld" = yes; then
+		version_type=linux
+	else
+		version_type=irix
+	fi ;;
+  esac
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+  case $host_os in
+  irix5* | nonstopux*)
+    libsuff= shlibsuff=
+    ;;
+  *)
+    case $LD in # libtool.m4 will add one of these switches to LD
+    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+      libsuff= shlibsuff= libmagic=32-bit;;
+    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+      libsuff=32 shlibsuff=N32 libmagic=N32;;
+    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+      libsuff=64 shlibsuff=64 libmagic=64-bit;;
+    *) libsuff= shlibsuff= libmagic=never-match;;
+    esac
+    ;;
+  esac
+  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+  shlibpath_overrides_runpath=no
+  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+  hardcode_into_libs=yes
+  ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+  dynamic_linker=no
+  ;;
+
+# This must be Linux ELF.
+linux* | k*bsd*-gnu)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  # Some binutils ld are patched to set DT_RUNPATH
+  save_LDFLAGS=$LDFLAGS
+  save_libdir=$libdir
+  eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
+       LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  if  ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then
+  shlibpath_overrides_runpath=yes
+fi
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+  LDFLAGS=$save_LDFLAGS
+  libdir=$save_libdir
+
+  # This implies no fast_install, which is unacceptable.
+  # Some rework will be needed to allow for fast_install
+  # before this can be enabled.
+  hardcode_into_libs=yes
+
+  # Append ld.so.conf contents to the search path
+  if test -f /etc/ld.so.conf; then
+    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[	 ]*hwcap[	 ]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+  fi
+
+  # We used to test for /lib/ld.so.1 and disable shared libraries on
+  # powerpc, because MkLinux only supported shared libraries with the
+  # GNU dynamic linker.  Since this was broken with cross compilers,
+  # most powerpc-linux boxes support dynamic linking these days and
+  # 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'
+  ;;
+
+netbsdelf*-gnu)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='NetBSD ld.elf_so'
+  ;;
+
+netbsd*)
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+    dynamic_linker='NetBSD (a.out) ld.so'
+  else
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    dynamic_linker='NetBSD ld.elf_so'
+  fi
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  ;;
+
+newsos6)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  ;;
+
+*nto* | *qnx*)
+  version_type=qnx
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='ldqnx.so'
+  ;;
+
+openbsd*)
+  version_type=sunos
+  sys_lib_dlsearch_path_spec="/usr/lib"
+  need_lib_prefix=no
+  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+  case $host_os in
+    openbsd3.3 | openbsd3.3.*)	need_version=yes ;;
+    *)				need_version=no  ;;
+  esac
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    case $host_os in
+      openbsd2.[89] | openbsd2.[89].*)
+	shlibpath_overrides_runpath=no
+	;;
+      *)
+	shlibpath_overrides_runpath=yes
+	;;
+      esac
+  else
+    shlibpath_overrides_runpath=yes
+  fi
+  ;;
+
+os2*)
+  libname_spec='$name'
+  shrext_cmds=".dll"
+  need_lib_prefix=no
+  library_names_spec='$libname${shared_ext} $libname.a'
+  dynamic_linker='OS/2 ld.exe'
+  shlibpath_var=LIBPATH
+  ;;
+
+osf3* | osf4* | osf5*)
+  version_type=osf
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  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"
+  ;;
+
+rdos*)
+  dynamic_linker=no
+  ;;
+
+solaris*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  # ldd complains unless libraries are executable
+  postinstall_cmds='chmod +x $lib'
+  ;;
+
+sunos4*)
+  version_type=sunos
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  if test "$with_gnu_ld" = yes; then
+    need_lib_prefix=no
+  fi
+  need_version=yes
+  ;;
+
+sysv4 | sysv4.3*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_vendor in
+    sni)
+      shlibpath_overrides_runpath=no
+      need_lib_prefix=no
+      runpath_var=LD_RUN_PATH
+      ;;
+    siemens)
+      need_lib_prefix=no
+      ;;
+    motorola)
+      need_lib_prefix=no
+      need_version=no
+      shlibpath_overrides_runpath=no
+      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+      ;;
+  esac
+  ;;
+
+sysv4*MP*)
+  if test -d /usr/nec ;then
+    version_type=linux
+    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+    soname_spec='$libname${shared_ext}.$major'
+    shlibpath_var=LD_LIBRARY_PATH
+  fi
+  ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+  version_type=freebsd-elf
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  if test "$with_gnu_ld" = yes; then
+    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
+  else
+    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
+    case $host_os in
+      sco3.2v5*)
+        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
+	;;
+    esac
+  fi
+  sys_lib_dlsearch_path_spec='/usr/lib'
+  ;;
+
+tpf*)
+  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  ;;
+
+uts4*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+*)
+  dynamic_linker=no
+  ;;
+esac
+{ $as_echo "$as_me:$LINENO: result: $dynamic_linker" >&5
+$as_echo "$dynamic_linker" >&6; }
+test "$dynamic_linker" = no && can_build_shared=no
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+
+if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
+  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
+fi
+if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
+  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+  { $as_echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
+$as_echo_n "checking how to hardcode library paths into programs... " >&6; }
+hardcode_action=
+if test -n "$hardcode_libdir_flag_spec" ||
+   test -n "$runpath_var" ||
+   test "X$hardcode_automatic" = "Xyes" ; then
+
+  # We can hardcode non-existent directories.
+  if test "$hardcode_direct" != no &&
+     # If the only mechanism to avoid hardcoding is shlibpath_var, we
+     # have to relink, otherwise we might link with an installed library
+     # when we should be linking with a yet-to-be-installed one
+     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no &&
+     test "$hardcode_minus_L" != no; then
+    # Linking always hardcodes the temporary library directory.
+    hardcode_action=relink
+  else
+    # We can link without hardcoding, and we can hardcode nonexisting dirs.
+    hardcode_action=immediate
+  fi
+else
+  # We cannot hardcode anything, or else we can only hardcode existing
+  # directories.
+  hardcode_action=unsupported
+fi
+{ $as_echo "$as_me:$LINENO: result: $hardcode_action" >&5
+$as_echo "$hardcode_action" >&6; }
+
+if test "$hardcode_action" = relink ||
+   test "$inherit_rpath" = yes; then
+  # Fast installation is not supported
+  enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+     test "$enable_shared" = no; then
+  # Fast installation is not necessary
+  enable_fast_install=needless
+fi
+
+
+
+
+
+
+  if test "x$enable_dlopen" != xyes; then
+  enable_dlopen=unknown
+  enable_dlopen_self=unknown
+  enable_dlopen_self_static=unknown
+else
+  lt_cv_dlopen=no
+  lt_cv_dlopen_libs=
+
+  case $host_os in
+  beos*)
+    lt_cv_dlopen="load_add_on"
+    lt_cv_dlopen_libs=
+    lt_cv_dlopen_self=yes
+    ;;
+
+  mingw* | pw32* | cegcc*)
+    lt_cv_dlopen="LoadLibrary"
+    lt_cv_dlopen_libs=
+    ;;
+
+  cygwin*)
+    lt_cv_dlopen="dlopen"
+    lt_cv_dlopen_libs=
+    ;;
+
+  darwin*)
+  # if libdl is installed we need to link against it
+    { $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
+$as_echo_n "checking for dlopen in -ldl... " >&6; }
+if test "${ac_cv_lib_dl_dlopen+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  ac_cv_lib_dl_dlopen=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_lib_dl_dlopen=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
+$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
+if test "x$ac_cv_lib_dl_dlopen" = x""yes; then
+  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+else
+
+    lt_cv_dlopen="dyld"
+    lt_cv_dlopen_libs=
+    lt_cv_dlopen_self=yes
+
+fi
+
+    ;;
+
+  *)
+    { $as_echo "$as_me:$LINENO: checking for shl_load" >&5
+$as_echo_n "checking for shl_load... " >&6; }
+if test "${ac_cv_func_shl_load+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define shl_load to an innocuous variant, in case <limits.h> declares shl_load.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define shl_load innocuous_shl_load
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char shl_load (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef shl_load
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char shl_load ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined __stub_shl_load || defined __stub___shl_load
+choke me
+#endif
+
+int
+main ()
+{
+return shl_load ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  ac_cv_func_shl_load=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_func_shl_load=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5
+$as_echo "$ac_cv_func_shl_load" >&6; }
+if test "x$ac_cv_func_shl_load" = x""yes; then
+  lt_cv_dlopen="shl_load"
+else
+  { $as_echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
+$as_echo_n "checking for shl_load in -ldld... " >&6; }
+if test "${ac_cv_lib_dld_shl_load+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char shl_load ();
+int
+main ()
+{
+return shl_load ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  ac_cv_lib_dld_shl_load=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_lib_dld_shl_load=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
+$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
+if test "x$ac_cv_lib_dld_shl_load" = x""yes; then
+  lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
+else
+  { $as_echo "$as_me:$LINENO: checking for dlopen" >&5
+$as_echo_n "checking for dlopen... " >&6; }
+if test "${ac_cv_func_dlopen+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define dlopen to an innocuous variant, in case <limits.h> declares dlopen.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define dlopen innocuous_dlopen
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char dlopen (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef dlopen
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined __stub_dlopen || defined __stub___dlopen
+choke me
+#endif
+
+int
+main ()
+{
+return dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  ac_cv_func_dlopen=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_func_dlopen=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5
+$as_echo "$ac_cv_func_dlopen" >&6; }
+if test "x$ac_cv_func_dlopen" = x""yes; then
+  lt_cv_dlopen="dlopen"
+else
+  { $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
+$as_echo_n "checking for dlopen in -ldl... " >&6; }
+if test "${ac_cv_lib_dl_dlopen+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  ac_cv_lib_dl_dlopen=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_lib_dl_dlopen=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
+$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
+if test "x$ac_cv_lib_dl_dlopen" = x""yes; then
+  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+else
+  { $as_echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5
+$as_echo_n "checking for dlopen in -lsvld... " >&6; }
+if test "${ac_cv_lib_svld_dlopen+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsvld  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  ac_cv_lib_svld_dlopen=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_lib_svld_dlopen=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5
+$as_echo "$ac_cv_lib_svld_dlopen" >&6; }
+if test "x$ac_cv_lib_svld_dlopen" = x""yes; then
+  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
+else
+  { $as_echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5
+$as_echo_n "checking for dld_link in -ldld... " >&6; }
+if test "${ac_cv_lib_dld_dld_link+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dld_link ();
+int
+main ()
+{
+return dld_link ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  ac_cv_lib_dld_dld_link=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_lib_dld_dld_link=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5
+$as_echo "$ac_cv_lib_dld_dld_link" >&6; }
+if test "x$ac_cv_lib_dld_dld_link" = x""yes; then
+  lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+    ;;
+  esac
+
+  if test "x$lt_cv_dlopen" != xno; then
+    enable_dlopen=yes
+  else
+    enable_dlopen=no
+  fi
+
+  case $lt_cv_dlopen in
+  dlopen)
+    save_CPPFLAGS="$CPPFLAGS"
+    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+
+    save_LDFLAGS="$LDFLAGS"
+    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
+
+    save_LIBS="$LIBS"
+    LIBS="$lt_cv_dlopen_libs $LIBS"
+
+    { $as_echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5
+$as_echo_n "checking whether a program can dlopen itself... " >&6; }
+if test "${lt_cv_dlopen_self+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  	  if test "$cross_compiling" = yes; then :
+  lt_cv_dlopen_self=cross
+else
+  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+  lt_status=$lt_dlunknown
+  cat > conftest.$ac_ext <<_LT_EOF
+#line 16445 "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+#  define LT_DLGLOBAL		RTLD_GLOBAL
+#else
+#  ifdef DL_GLOBAL
+#    define LT_DLGLOBAL		DL_GLOBAL
+#  else
+#    define LT_DLGLOBAL		0
+#  endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+   find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+#  ifdef RTLD_LAZY
+#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
+#  else
+#    ifdef DL_LAZY
+#      define LT_DLLAZY_OR_NOW		DL_LAZY
+#    else
+#      ifdef RTLD_NOW
+#        define LT_DLLAZY_OR_NOW	RTLD_NOW
+#      else
+#        ifdef DL_NOW
+#          define LT_DLLAZY_OR_NOW	DL_NOW
+#        else
+#          define LT_DLLAZY_OR_NOW	0
+#        endif
+#      endif
+#    endif
+#  endif
+#endif
+
+void fnord() { int i=42;}
+int main ()
+{
+  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+  int status = $lt_dlunknown;
+
+  if (self)
+    {
+      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
+      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+      /* dlclose (self); */
+    }
+  else
+    puts (dlerror ());
+
+  return status;
+}
+_LT_EOF
+  if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
+    (./conftest; exit; ) >&5 2>/dev/null
+    lt_status=$?
+    case x$lt_status in
+      x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
+      x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
+      x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
+    esac
+  else :
+    # compilation failed
+    lt_cv_dlopen_self=no
+  fi
+fi
+rm -fr conftest*
+
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5
+$as_echo "$lt_cv_dlopen_self" >&6; }
+
+    if test "x$lt_cv_dlopen_self" = xyes; then
+      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
+      { $as_echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5
+$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
+if test "${lt_cv_dlopen_self_static+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  	  if test "$cross_compiling" = yes; then :
+  lt_cv_dlopen_self_static=cross
+else
+  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+  lt_status=$lt_dlunknown
+  cat > conftest.$ac_ext <<_LT_EOF
+#line 16541 "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+#  define LT_DLGLOBAL		RTLD_GLOBAL
+#else
+#  ifdef DL_GLOBAL
+#    define LT_DLGLOBAL		DL_GLOBAL
+#  else
+#    define LT_DLGLOBAL		0
+#  endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+   find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+#  ifdef RTLD_LAZY
+#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
+#  else
+#    ifdef DL_LAZY
+#      define LT_DLLAZY_OR_NOW		DL_LAZY
+#    else
+#      ifdef RTLD_NOW
+#        define LT_DLLAZY_OR_NOW	RTLD_NOW
+#      else
+#        ifdef DL_NOW
+#          define LT_DLLAZY_OR_NOW	DL_NOW
+#        else
+#          define LT_DLLAZY_OR_NOW	0
+#        endif
+#      endif
+#    endif
+#  endif
+#endif
+
+void fnord() { int i=42;}
+int main ()
+{
+  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+  int status = $lt_dlunknown;
+
+  if (self)
+    {
+      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
+      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+      /* dlclose (self); */
+    }
+  else
+    puts (dlerror ());
+
+  return status;
+}
+_LT_EOF
+  if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
+    (./conftest; exit; ) >&5 2>/dev/null
+    lt_status=$?
+    case x$lt_status in
+      x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
+      x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
+      x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
+    esac
+  else :
+    # compilation failed
+    lt_cv_dlopen_self_static=no
+  fi
+fi
+rm -fr conftest*
+
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5
+$as_echo "$lt_cv_dlopen_self_static" >&6; }
+    fi
+
+    CPPFLAGS="$save_CPPFLAGS"
+    LDFLAGS="$save_LDFLAGS"
+    LIBS="$save_LIBS"
+    ;;
+  esac
+
+  case $lt_cv_dlopen_self in
+  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
+  *) enable_dlopen_self=unknown ;;
+  esac
+
+  case $lt_cv_dlopen_self_static in
+  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
+  *) enable_dlopen_self_static=unknown ;;
+  esac
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+striplib=
+old_striplib=
+{ $as_echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5
+$as_echo_n "checking whether stripping libraries is possible... " >&6; }
+if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
+  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
+  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
+  { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+# FIXME - insert some real tests, host_os isn't really good enough
+  case $host_os in
+  darwin*)
+    if test -n "$STRIP" ; then
+      striplib="$STRIP -x"
+      old_striplib="$STRIP -S"
+      { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+    else
+      { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+    fi
+    ;;
+  *)
+    { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+    ;;
+  esac
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+  # Report which library types will actually be built
+  { $as_echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5
+$as_echo_n "checking if libtool supports shared libraries... " >&6; }
+  { $as_echo "$as_me:$LINENO: result: $can_build_shared" >&5
+$as_echo "$can_build_shared" >&6; }
+
+  { $as_echo "$as_me:$LINENO: checking whether to build shared libraries" >&5
+$as_echo_n "checking whether to build shared libraries... " >&6; }
+  test "$can_build_shared" = "no" && enable_shared=no
+
+  # On AIX, shared libraries and static libraries use the same namespace, and
+  # are all built from PIC.
+  case $host_os in
+  aix3*)
+    test "$enable_shared" = yes && enable_static=no
+    if test -n "$RANLIB"; then
+      archive_cmds="$archive_cmds~\$RANLIB \$lib"
+      postinstall_cmds='$RANLIB $lib'
+    fi
+    ;;
+
+  aix[4-9]*)
+    if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+      test "$enable_shared" = yes && enable_static=no
+    fi
+    ;;
+  esac
+  { $as_echo "$as_me:$LINENO: result: $enable_shared" >&5
+$as_echo "$enable_shared" >&6; }
+
+  { $as_echo "$as_me:$LINENO: checking whether to build static libraries" >&5
+$as_echo_n "checking whether to build static libraries... " >&6; }
+  # Make sure either enable_shared or enable_static is yes.
+  test "$enable_shared" = yes || enable_static=yes
+  { $as_echo "$as_me:$LINENO: result: $enable_static" >&5
+$as_echo "$enable_static" >&6; }
+
+
+
+
+fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+CC="$lt_save_CC"
+
+
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+archive_cmds_need_lc_CXX=no
+allow_undefined_flag_CXX=
+always_export_symbols_CXX=no
+archive_expsym_cmds_CXX=
+compiler_needs_object_CXX=no
+export_dynamic_flag_spec_CXX=
+hardcode_direct_CXX=no
+hardcode_direct_absolute_CXX=no
+hardcode_libdir_flag_spec_CXX=
+hardcode_libdir_flag_spec_ld_CXX=
+hardcode_libdir_separator_CXX=
+hardcode_minus_L_CXX=no
+hardcode_shlibpath_var_CXX=unsupported
+hardcode_automatic_CXX=no
+inherit_rpath_CXX=no
+module_cmds_CXX=
+module_expsym_cmds_CXX=
+link_all_deplibs_CXX=unknown
+old_archive_cmds_CXX=$old_archive_cmds
+no_undefined_flag_CXX=
+whole_archive_flag_spec_CXX=
+enable_shared_with_static_runtimes_CXX=no
+
+# Source file extension for C++ test sources.
+ac_ext=cpp
+
+# Object file extension for compiled C++ test sources.
+objext=o
+objext_CXX=$objext
+
+# No sense in running all these tests if we already determined that
+# the CXX compiler isn't working.  Some variables (like enable_shared)
+# are currently assumed to apply to all compilers on this platform,
+# and will be corrupted by setting them based on a non-working compiler.
+if test "$_lt_caught_CXX_error" != yes; then
+  # Code to be used in simple compile tests
+  lt_simple_compile_test_code="int some_variable = 0;"
+
+  # Code to be used in simple link tests
+  lt_simple_link_test_code='int main(int, char *[]) { return(0); }'
+
+  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
+
+
+
+
+
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+
+  # save warnings/boilerplate of simple test code
+  ac_outfile=conftest.$ac_objext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$RM conftest*
+
+  ac_outfile=conftest.$ac_objext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$RM -r conftest*
+
+
+  # Allow CC to be a program name with arguments.
+  lt_save_CC=$CC
+  lt_save_LD=$LD
+  lt_save_GCC=$GCC
+  GCC=$GXX
+  lt_save_with_gnu_ld=$with_gnu_ld
+  lt_save_path_LD=$lt_cv_path_LD
+  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
+    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
+  else
+    $as_unset lt_cv_prog_gnu_ld
+  fi
+  if test -n "${lt_cv_path_LDCXX+set}"; then
+    lt_cv_path_LD=$lt_cv_path_LDCXX
+  else
+    $as_unset lt_cv_path_LD
+  fi
+  test -z "${LDCXX+set}" || LD=$LDCXX
+  CC=${CXX-"c++"}
+  compiler=$CC
+  compiler_CXX=$CC
+  for cc_temp in $compiler""; do
+  case $cc_temp in
+    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+    \-*) ;;
+    *) break;;
+  esac
+done
+cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+
+
+  if test -n "$compiler"; then
+    # We don't want -fno-exception when compiling C++ code, so set the
+    # no_builtin_flag separately
+    if test "$GXX" = yes; then
+      lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin'
+    else
+      lt_prog_compiler_no_builtin_flag_CXX=
+    fi
+
+    if test "$GXX" = yes; then
+      # Set up default GNU C++ configuration
+
+
+
+# Check whether --with-gnu-ld was given.
+if test "${with_gnu_ld+set}" = set; then
+  withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
+else
+  with_gnu_ld=no
+fi
+
+ac_prog=ld
+if test "$GCC" = yes; then
+  # Check if gcc -print-prog-name=ld gives a path.
+  { $as_echo "$as_me:$LINENO: checking for ld used by $CC" >&5
+$as_echo_n "checking for ld used by $CC... " >&6; }
+  case $host in
+  *-*-mingw*)
+    # gcc leaves a trailing carriage return which upsets mingw
+    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+  *)
+    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+  esac
+  case $ac_prog in
+    # Accept absolute paths.
+    [\\/]* | ?:[\\/]*)
+      re_direlt='/[^/][^/]*/\.\./'
+      # Canonicalize the pathname of ld
+      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
+      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
+	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
+      done
+      test -z "$LD" && LD="$ac_prog"
+      ;;
+  "")
+    # If it fails, then pretend we aren't using GCC.
+    ac_prog=ld
+    ;;
+  *)
+    # If it is relative, then search for the first ld in PATH.
+    with_gnu_ld=unknown
+    ;;
+  esac
+elif test "$with_gnu_ld" = yes; then
+  { $as_echo "$as_me:$LINENO: checking for GNU ld" >&5
+$as_echo_n "checking for GNU ld... " >&6; }
+else
+  { $as_echo "$as_me:$LINENO: checking for non-GNU ld" >&5
+$as_echo_n "checking for non-GNU ld... " >&6; }
+fi
+if test "${lt_cv_path_LD+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -z "$LD"; then
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  for ac_dir in $PATH; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+      lt_cv_path_LD="$ac_dir/$ac_prog"
+      # Check to see if the program is GNU ld.  I'd rather use --version,
+      # but apparently some variants of GNU ld only accept -v.
+      # Break only if it was the GNU/non-GNU ld that we prefer.
+      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
+      *GNU* | *'with BFD'*)
+	test "$with_gnu_ld" != no && break
+	;;
+      *)
+	test "$with_gnu_ld" != yes && break
+	;;
+      esac
+    fi
+  done
+  IFS="$lt_save_ifs"
+else
+  lt_cv_path_LD="$LD" # Let the user override the test with a path.
+fi
+fi
+
+LD="$lt_cv_path_LD"
+if test -n "$LD"; then
+  { $as_echo "$as_me:$LINENO: result: $LD" >&5
+$as_echo "$LD" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+test -z "$LD" && { { $as_echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
+$as_echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
+   { (exit 1); exit 1; }; }
+{ $as_echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
+$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
+if test "${lt_cv_prog_gnu_ld+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  # I'd rather use --version here, but apparently some GNU lds only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+  lt_cv_prog_gnu_ld=yes
+  ;;
+*)
+  lt_cv_prog_gnu_ld=no
+  ;;
+esac
+fi
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
+$as_echo "$lt_cv_prog_gnu_ld" >&6; }
+with_gnu_ld=$lt_cv_prog_gnu_ld
+
+
+
+
+
+
+
+      # Check if GNU C++ uses GNU ld as the underlying linker, since the
+      # archiving commands below assume that GNU ld is being used.
+      if test "$with_gnu_ld" = yes; then
+        archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+        archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+
+        hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+        export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+
+        # If archive_cmds runs LD, not CC, wlarc should be empty
+        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
+        #     investigate it a little bit more. (MM)
+        wlarc='${wl}'
+
+        # ancient GNU ld didn't support --whole-archive et. al.
+        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
+	  $GREP 'no-whole-archive' > /dev/null; then
+          whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+        else
+          whole_archive_flag_spec_CXX=
+        fi
+      else
+        with_gnu_ld=no
+        wlarc=
+
+        # A generic and very simple default shared library creation
+        # command for GNU C++ for the case where it uses the native
+        # linker, instead of GNU ld.  If possible, this setting should
+        # overridden to take advantage of the native linker features on
+        # the platform it is being used on.
+        archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+      fi
+
+      # Commands to make compiler produce verbose output that lists
+      # what "hidden" libraries, object files and flags are used when
+      # linking a shared library.
+      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+
+    else
+      GXX=no
+      with_gnu_ld=no
+      wlarc=
+    fi
+
+    # PORTME: fill in a description of your system's C++ link characteristics
+    { $as_echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
+    ld_shlibs_CXX=yes
+    case $host_os in
+      aix3*)
+        # FIXME: insert proper C++ library support
+        ld_shlibs_CXX=no
+        ;;
+      aix[4-9]*)
+        if test "$host_cpu" = ia64; then
+          # On IA64, the linker does run time linking by default, so we don't
+          # have to do anything special.
+          aix_use_runtimelinking=no
+          exp_sym_flag='-Bexport'
+          no_entry_flag=""
+        else
+          aix_use_runtimelinking=no
+
+          # Test if we are trying to use run time linking or normal
+          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+          # need to do runtime linking.
+          case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
+	    for ld_flag in $LDFLAGS; do
+	      case $ld_flag in
+	      *-brtl*)
+	        aix_use_runtimelinking=yes
+	        break
+	        ;;
+	      esac
+	    done
+	    ;;
+          esac
+
+          exp_sym_flag='-bexport'
+          no_entry_flag='-bnoentry'
+        fi
+
+        # When large executables or shared objects are built, AIX ld can
+        # have problems creating the table of contents.  If linking a library
+        # or program results in "error TOC overflow" add -mminimal-toc to
+        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
+        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+        archive_cmds_CXX=''
+        hardcode_direct_CXX=yes
+        hardcode_direct_absolute_CXX=yes
+        hardcode_libdir_separator_CXX=':'
+        link_all_deplibs_CXX=yes
+        file_list_spec_CXX='${wl}-f,'
+
+        if test "$GXX" = yes; then
+          case $host_os in aix4.[012]|aix4.[012].*)
+          # We only want to do this on AIX 4.2 and lower, the check
+          # below for broken collect2 doesn't work under 4.3+
+	  collect2name=`${CC} -print-prog-name=collect2`
+	  if test -f "$collect2name" &&
+	     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
+	  then
+	    # We have reworked collect2
+	    :
+	  else
+	    # We have old collect2
+	    hardcode_direct_CXX=unsupported
+	    # It fails to find uninstalled libraries when the uninstalled
+	    # path is not listed in the libpath.  Setting hardcode_minus_L
+	    # to unsupported forces relinking
+	    hardcode_minus_L_CXX=yes
+	    hardcode_libdir_flag_spec_CXX='-L$libdir'
+	    hardcode_libdir_separator_CXX=
+	  fi
+          esac
+          shared_flag='-shared'
+	  if test "$aix_use_runtimelinking" = yes; then
+	    shared_flag="$shared_flag "'${wl}-G'
+	  fi
+        else
+          # not using gcc
+          if test "$host_cpu" = ia64; then
+	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+	  # chokes on -Wl,-G. The following line is correct:
+	  shared_flag='-G'
+          else
+	    if test "$aix_use_runtimelinking" = yes; then
+	      shared_flag='${wl}-G'
+	    else
+	      shared_flag='${wl}-bM:SRE'
+	    fi
+          fi
+        fi
+
+        export_dynamic_flag_spec_CXX='${wl}-bexpall'
+        # It seems that -bexpall does not export symbols beginning with
+        # underscore (_), so it is better to generate a list of symbols to
+	# export.
+        always_export_symbols_CXX=yes
+        if test "$aix_use_runtimelinking" = yes; then
+          # Warning - without using the other runtime loading flags (-brtl),
+          # -berok will link without error, but may produce a broken library.
+          allow_undefined_flag_CXX='-berok'
+          # Determine the default libpath from the value encoded in an empty
+          # executable.
+          cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
 	 $as_test_x conftest$ac_exeext
        }; then
-  ac_cv_lib_svld_dlopen=yes
+
+lt_aix_libpath_sed='
+    /Import File Strings/,/^$/ {
+	/^0/ {
+	    s/^0  *\(.*\)$/\1/
+	    p
+	}
+    }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then
+  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+          hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
+
+          archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+        else
+          if test "$host_cpu" = ia64; then
+	    hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib'
+	    allow_undefined_flag_CXX="-z nodefs"
+	    archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+          else
+	    # Determine the default libpath from the value encoded in an
+	    # empty executable.
+	    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+
+lt_aix_libpath_sed='
+    /Import File Strings/,/^$/ {
+	/^0/ {
+	    s/^0  *\(.*\)$/\1/
+	    p
+	}
+    }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then
+  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+	    hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
+	    # Warning - without using the other run time loading flags,
+	    # -berok will link without error, but may produce a broken library.
+	    no_undefined_flag_CXX=' ${wl}-bernotok'
+	    allow_undefined_flag_CXX=' ${wl}-berok'
+	    # Exported symbols can be pulled into shared objects from archives
+	    whole_archive_flag_spec_CXX='$convenience'
+	    archive_cmds_need_lc_CXX=yes
+	    # This is similar to how AIX traditionally builds its shared
+	    # libraries.
+	    archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+          fi
+        fi
+        ;;
+
+      beos*)
+	if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+	  allow_undefined_flag_CXX=unsupported
+	  # Joseph Beckenbach <jrb3 best com> says some releases of gcc
+	  # support --undefined.  This deserves some investigation.  FIXME
+	  archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	else
+	  ld_shlibs_CXX=no
+	fi
+	;;
+
+      chorus*)
+        case $cc_basename in
+          *)
+	  # FIXME: insert proper C++ library support
+	  ld_shlibs_CXX=no
+	  ;;
+        esac
+        ;;
+
+      cygwin* | mingw* | pw32* | cegcc*)
+        # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless,
+        # as there is no search path for DLLs.
+        hardcode_libdir_flag_spec_CXX='-L$libdir'
+        allow_undefined_flag_CXX=unsupported
+        always_export_symbols_CXX=no
+        enable_shared_with_static_runtimes_CXX=yes
+
+        if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+          archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+          # If the export-symbols file already is a .def file (1st line
+          # is EXPORTS), use it as is; otherwise, prepend...
+          archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+	    cp $export_symbols $output_objdir/$soname.def;
+          else
+	    echo EXPORTS > $output_objdir/$soname.def;
+	    cat $export_symbols >> $output_objdir/$soname.def;
+          fi~
+          $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+        else
+          ld_shlibs_CXX=no
+        fi
+        ;;
+      darwin* | rhapsody*)
+
+
+  archive_cmds_need_lc_CXX=no
+  hardcode_direct_CXX=no
+  hardcode_automatic_CXX=yes
+  hardcode_shlibpath_var_CXX=unsupported
+  whole_archive_flag_spec_CXX=''
+  link_all_deplibs_CXX=yes
+  allow_undefined_flag_CXX="$_lt_dar_allow_undefined"
+  case $cc_basename in
+     ifort*) _lt_dar_can_shared=yes ;;
+     *) _lt_dar_can_shared=$GCC ;;
+  esac
+  if test "$_lt_dar_can_shared" = "yes"; then
+    output_verbose_link_cmd=echo
+    archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+    module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
+    archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
+    module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
+       if test "$lt_cv_apple_cc_single_mod" != "yes"; then
+      archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
+      archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
+    fi
+
+  else
+  ld_shlibs_CXX=no
+  fi
+
+	;;
+
+      dgux*)
+        case $cc_basename in
+          ec++*)
+	    # FIXME: insert proper C++ library support
+	    ld_shlibs_CXX=no
+	    ;;
+          ghcx*)
+	    # Green Hills C++ Compiler
+	    # FIXME: insert proper C++ library support
+	    ld_shlibs_CXX=no
+	    ;;
+          *)
+	    # FIXME: insert proper C++ library support
+	    ld_shlibs_CXX=no
+	    ;;
+        esac
+        ;;
+
+      freebsd[12]*)
+        # C++ shared libraries reported to be fairly broken before
+	# switch to ELF
+        ld_shlibs_CXX=no
+        ;;
+
+      freebsd-elf*)
+        archive_cmds_need_lc_CXX=no
+        ;;
+
+      freebsd* | dragonfly*)
+        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
+        # conventions
+        ld_shlibs_CXX=yes
+        ;;
+
+      gnu*)
+        ;;
+
+      hpux9*)
+        hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
+        hardcode_libdir_separator_CXX=:
+        export_dynamic_flag_spec_CXX='${wl}-E'
+        hardcode_direct_CXX=yes
+        hardcode_minus_L_CXX=yes # Not in the search PATH,
+				             # but as the default
+				             # location of the library.
+
+        case $cc_basename in
+          CC*)
+            # FIXME: insert proper C++ library support
+            ld_shlibs_CXX=no
+            ;;
+          aCC*)
+            archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+            # Commands to make compiler produce verbose output that lists
+            # what "hidden" libraries, object files and flags are used when
+            # linking a shared library.
+            #
+            # There doesn't appear to be a way to prevent this compiler from
+            # explicitly linking system object files so we need to strip them
+            # from the output so that they don't get included in the library
+            # dependencies.
+            output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+            ;;
+          *)
+            if test "$GXX" = yes; then
+              archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+            else
+              # FIXME: insert proper C++ library support
+              ld_shlibs_CXX=no
+            fi
+            ;;
+        esac
+        ;;
+
+      hpux10*|hpux11*)
+        if test $with_gnu_ld = no; then
+	  hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
+	  hardcode_libdir_separator_CXX=:
+
+          case $host_cpu in
+            hppa*64*|ia64*)
+              ;;
+            *)
+	      export_dynamic_flag_spec_CXX='${wl}-E'
+              ;;
+          esac
+        fi
+        case $host_cpu in
+          hppa*64*|ia64*)
+            hardcode_direct_CXX=no
+            hardcode_shlibpath_var_CXX=no
+            ;;
+          *)
+            hardcode_direct_CXX=yes
+            hardcode_direct_absolute_CXX=yes
+            hardcode_minus_L_CXX=yes # Not in the search PATH,
+					         # but as the default
+					         # location of the library.
+            ;;
+        esac
+
+        case $cc_basename in
+          CC*)
+	    # FIXME: insert proper C++ library support
+	    ld_shlibs_CXX=no
+	    ;;
+          aCC*)
+	    case $host_cpu in
+	      hppa*64*)
+	        archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	        ;;
+	      ia64*)
+	        archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	        ;;
+	      *)
+	        archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	        ;;
+	    esac
+	    # Commands to make compiler produce verbose output that lists
+	    # what "hidden" libraries, object files and flags are used when
+	    # linking a shared library.
+	    #
+	    # There doesn't appear to be a way to prevent this compiler from
+	    # explicitly linking system object files so we need to strip them
+	    # from the output so that they don't get included in the library
+	    # dependencies.
+	    output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+	    ;;
+          *)
+	    if test "$GXX" = yes; then
+	      if test $with_gnu_ld = no; then
+	        case $host_cpu in
+	          hppa*64*)
+	            archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	            ;;
+	          ia64*)
+	            archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	            ;;
+	          *)
+	            archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	            ;;
+	        esac
+	      fi
+	    else
+	      # FIXME: insert proper C++ library support
+	      ld_shlibs_CXX=no
+	    fi
+	    ;;
+        esac
+        ;;
+
+      interix[3-9]*)
+	hardcode_direct_CXX=no
+	hardcode_shlibpath_var_CXX=no
+	hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+	export_dynamic_flag_spec_CXX='${wl}-E'
+	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+	# Instead, shared libraries are loaded at an image base (0x10000000 by
+	# default) and relocated if they conflict, which is a slow very memory
+	# consuming and fragmenting process.  To avoid this, we pick a random,
+	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
+	archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+	archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+	;;
+      irix5* | irix6*)
+        case $cc_basename in
+          CC*)
+	    # SGI C++
+	    archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+
+	    # Archives containing C++ object files must be created using
+	    # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
+	    # necessary to make sure instantiated templates are included
+	    # in the archive.
+	    old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs'
+	    ;;
+          *)
+	    if test "$GXX" = yes; then
+	      if test "$with_gnu_ld" = no; then
+	        archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	      else
+	        archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib'
+	      fi
+	    fi
+	    link_all_deplibs_CXX=yes
+	    ;;
+        esac
+        hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+        hardcode_libdir_separator_CXX=:
+        inherit_rpath_CXX=yes
+        ;;
+
+      linux* | k*bsd*-gnu)
+        case $cc_basename in
+          KCC*)
+	    # Kuck and Associates, Inc. (KAI) C++ Compiler
+
+	    # KCC will only create a shared library if the output file
+	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
+	    # to its proper name (with version) after linking.
+	    archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+	    archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
+	    # Commands to make compiler produce verbose output that lists
+	    # what "hidden" libraries, object files and flags are used when
+	    # linking a shared library.
+	    #
+	    # There doesn't appear to be a way to prevent this compiler from
+	    # explicitly linking system object files so we need to strip them
+	    # from the output so that they don't get included in the library
+	    # dependencies.
+	    output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+
+	    hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+	    export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+
+	    # Archives containing C++ object files must be created using
+	    # "CC -Bstatic", where "CC" is the KAI C++ compiler.
+	    old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs'
+	    ;;
+	  icpc* | ecpc* )
+	    # Intel C++
+	    with_gnu_ld=yes
+	    # version 8.0 and above of icpc choke on multiply defined symbols
+	    # if we add $predep_objects and $postdep_objects, however 7.1 and
+	    # earlier do not add the objects themselves.
+	    case `$CC -V 2>&1` in
+	      *"Version 7."*)
+	        archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+		archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+		;;
+	      *)  # Version 8.0 or newer
+	        tmp_idyn=
+	        case $host_cpu in
+		  ia64*) tmp_idyn=' -i_dynamic';;
+		esac
+	        archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+		archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+		;;
+	    esac
+	    archive_cmds_need_lc_CXX=no
+	    hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+	    export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+	    whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+	    ;;
+          pgCC* | pgcpp*)
+            # Portland Group C++ compiler
+	    case `$CC -V` in
+	    *pgCC\ [1-5]* | *pgcpp\ [1-5]*)
+	      prelink_cmds_CXX='tpldir=Template.dir~
+		rm -rf $tpldir~
+		$CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
+		compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
+	      old_archive_cmds_CXX='tpldir=Template.dir~
+		rm -rf $tpldir~
+		$CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
+		$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
+		$RANLIB $oldlib'
+	      archive_cmds_CXX='tpldir=Template.dir~
+		rm -rf $tpldir~
+		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+	      archive_expsym_cmds_CXX='tpldir=Template.dir~
+		rm -rf $tpldir~
+		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+	      ;;
+	    *) # Version 6 will use weak symbols
+	      archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+	      archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+	      ;;
+	    esac
+
+	    hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir'
+	    export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+	    whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+            ;;
+	  cxx*)
+	    # Compaq C++
+	    archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	    archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
+
+	    runpath_var=LD_RUN_PATH
+	    hardcode_libdir_flag_spec_CXX='-rpath $libdir'
+	    hardcode_libdir_separator_CXX=:
+
+	    # Commands to make compiler produce verbose output that lists
+	    # what "hidden" libraries, object files and flags are used when
+	    # linking a shared library.
+	    #
+	    # There doesn't appear to be a way to prevent this compiler from
+	    # explicitly linking system object files so we need to strip them
+	    # from the output so that they don't get included in the library
+	    # dependencies.
+	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+	    ;;
+	  xl*)
+	    # IBM XL 8.0 on PPC, with GNU ld
+	    hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+	    export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+	    archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	    if test "x$supports_anon_versioning" = xyes; then
+	      archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~
+		cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+		echo "local: *; };" >> $output_objdir/$libname.ver~
+		$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+	    fi
+	    ;;
+	  *)
+	    case `$CC -V 2>&1 | sed 5q` in
+	    *Sun\ C*)
+	      # Sun C++ 5.9
+	      no_undefined_flag_CXX=' -zdefs'
+	      archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	      archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
+	      hardcode_libdir_flag_spec_CXX='-R$libdir'
+	      whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+	      compiler_needs_object_CXX=yes
+
+	      # Not sure whether something based on
+	      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
+	      # would be better.
+	      output_verbose_link_cmd='echo'
+
+	      # Archives containing C++ object files must be created using
+	      # "CC -xar", where "CC" is the Sun C++ compiler.  This is
+	      # necessary to make sure instantiated templates are included
+	      # in the archive.
+	      old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
+	      ;;
+	    esac
+	    ;;
+	esac
+	;;
+
+      lynxos*)
+        # FIXME: insert proper C++ library support
+	ld_shlibs_CXX=no
+	;;
+
+      m88k*)
+        # FIXME: insert proper C++ library support
+        ld_shlibs_CXX=no
+	;;
+
+      mvs*)
+        case $cc_basename in
+          cxx*)
+	    # FIXME: insert proper C++ library support
+	    ld_shlibs_CXX=no
+	    ;;
+	  *)
+	    # FIXME: insert proper C++ library support
+	    ld_shlibs_CXX=no
+	    ;;
+	esac
+	;;
+
+      netbsd*)
+        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+	  archive_cmds_CXX='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
+	  wlarc=
+	  hardcode_libdir_flag_spec_CXX='-R$libdir'
+	  hardcode_direct_CXX=yes
+	  hardcode_shlibpath_var_CXX=no
+	fi
+	# Workaround some broken pre-1.5 toolchains
+	output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
+	;;
+
+      *nto* | *qnx*)
+        ld_shlibs_CXX=yes
+	;;
+
+      openbsd2*)
+        # C++ shared libraries are fairly broken
+	ld_shlibs_CXX=no
+	;;
+
+      openbsd*)
+	if test -f /usr/libexec/ld.so; then
+	  hardcode_direct_CXX=yes
+	  hardcode_shlibpath_var_CXX=no
+	  hardcode_direct_absolute_CXX=yes
+	  archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+	  hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+	    archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
+	    export_dynamic_flag_spec_CXX='${wl}-E'
+	    whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+	  fi
+	  output_verbose_link_cmd=echo
+	else
+	  ld_shlibs_CXX=no
+	fi
+	;;
+
+      osf3* | osf4* | osf5*)
+        case $cc_basename in
+          KCC*)
+	    # Kuck and Associates, Inc. (KAI) C++ Compiler
+
+	    # KCC will only create a shared library if the output file
+	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
+	    # to its proper name (with version) after linking.
+	    archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+
+	    hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+	    hardcode_libdir_separator_CXX=:
+
+	    # Archives containing C++ object files must be created using
+	    # the KAI C++ compiler.
+	    case $host in
+	      osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;;
+	      *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;;
+	    esac
+	    ;;
+          RCC*)
+	    # Rational C++ 2.4.1
+	    # FIXME: insert proper C++ library support
+	    ld_shlibs_CXX=no
+	    ;;
+          cxx*)
+	    case $host in
+	      osf3*)
+	        allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
+	        archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+	        hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+		;;
+	      *)
+	        allow_undefined_flag_CXX=' -expect_unresolved \*'
+	        archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+	        archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
+	          echo "-hidden">> $lib.exp~
+	          $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp  `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~
+	          $RM $lib.exp'
+	        hardcode_libdir_flag_spec_CXX='-rpath $libdir'
+		;;
+	    esac
+
+	    hardcode_libdir_separator_CXX=:
+
+	    # Commands to make compiler produce verbose output that lists
+	    # what "hidden" libraries, object files and flags are used when
+	    # linking a shared library.
+	    #
+	    # There doesn't appear to be a way to prevent this compiler from
+	    # explicitly linking system object files so we need to strip them
+	    # from the output so that they don't get included in the library
+	    # dependencies.
+	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+	    ;;
+	  *)
+	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+	      allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
+	      case $host in
+	        osf3*)
+	          archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+		  ;;
+	        *)
+	          archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+		  ;;
+	      esac
+
+	      hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+	      hardcode_libdir_separator_CXX=:
+
+	      # Commands to make compiler produce verbose output that lists
+	      # what "hidden" libraries, object files and flags are used when
+	      # linking a shared library.
+	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+
+	    else
+	      # FIXME: insert proper C++ library support
+	      ld_shlibs_CXX=no
+	    fi
+	    ;;
+        esac
+        ;;
+
+      psos*)
+        # FIXME: insert proper C++ library support
+        ld_shlibs_CXX=no
+        ;;
+
+      sunos4*)
+        case $cc_basename in
+          CC*)
+	    # Sun C++ 4.x
+	    # FIXME: insert proper C++ library support
+	    ld_shlibs_CXX=no
+	    ;;
+          lcc*)
+	    # Lucid
+	    # FIXME: insert proper C++ library support
+	    ld_shlibs_CXX=no
+	    ;;
+          *)
+	    # FIXME: insert proper C++ library support
+	    ld_shlibs_CXX=no
+	    ;;
+        esac
+        ;;
+
+      solaris*)
+        case $cc_basename in
+          CC*)
+	    # Sun C++ 4.2, 5.x and Centerline C++
+            archive_cmds_need_lc_CXX=yes
+	    no_undefined_flag_CXX=' -zdefs'
+	    archive_cmds_CXX='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	    archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+	      $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+	    hardcode_libdir_flag_spec_CXX='-R$libdir'
+	    hardcode_shlibpath_var_CXX=no
+	    case $host_os in
+	      solaris2.[0-5] | solaris2.[0-5].*) ;;
+	      *)
+		# The compiler driver will combine and reorder linker options,
+		# but understands `-z linker_flag'.
+	        # Supported since Solaris 2.6 (maybe 2.5.1?)
+		whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract'
+	        ;;
+	    esac
+	    link_all_deplibs_CXX=yes
+
+	    output_verbose_link_cmd='echo'
+
+	    # Archives containing C++ object files must be created using
+	    # "CC -xar", where "CC" is the Sun C++ compiler.  This is
+	    # necessary to make sure instantiated templates are included
+	    # in the archive.
+	    old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
+	    ;;
+          gcx*)
+	    # Green Hills C++ Compiler
+	    archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+
+	    # The C++ compiler must be used to create the archive.
+	    old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
+	    ;;
+          *)
+	    # GNU C++ compiler with Solaris linker
+	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+	      no_undefined_flag_CXX=' ${wl}-z ${wl}defs'
+	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
+	        archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+	        archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+		  $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+	        # Commands to make compiler produce verbose output that lists
+	        # what "hidden" libraries, object files and flags are used when
+	        # linking a shared library.
+	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+	      else
+	        # g++ 2.7 appears to require `-G' NOT `-shared' on this
+	        # platform.
+	        archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+	        archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+		  $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+	        # Commands to make compiler produce verbose output that lists
+	        # what "hidden" libraries, object files and flags are used when
+	        # linking a shared library.
+	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+	      fi
+
+	      hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir'
+	      case $host_os in
+		solaris2.[0-5] | solaris2.[0-5].*) ;;
+		*)
+		  whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+		  ;;
+	      esac
+	    fi
+	    ;;
+        esac
+        ;;
+
+    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
+      no_undefined_flag_CXX='${wl}-z,text'
+      archive_cmds_need_lc_CXX=no
+      hardcode_shlibpath_var_CXX=no
+      runpath_var='LD_RUN_PATH'
+
+      case $cc_basename in
+        CC*)
+	  archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	*)
+	  archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+      esac
+      ;;
+
+      sysv5* | sco3.2v5* | sco5v6*)
+	# Note: We can NOT use -z defs as we might desire, because we do not
+	# link with -lc, and that would cause any symbols used from libc to
+	# always be unresolved, which means just about no library would
+	# ever link correctly.  If we're not using GNU ld we use -z text
+	# though, which does catch some bad symbols but isn't as heavy-handed
+	# as -z defs.
+	no_undefined_flag_CXX='${wl}-z,text'
+	allow_undefined_flag_CXX='${wl}-z,nodefs'
+	archive_cmds_need_lc_CXX=no
+	hardcode_shlibpath_var_CXX=no
+	hardcode_libdir_flag_spec_CXX='${wl}-R,$libdir'
+	hardcode_libdir_separator_CXX=':'
+	link_all_deplibs_CXX=yes
+	export_dynamic_flag_spec_CXX='${wl}-Bexport'
+	runpath_var='LD_RUN_PATH'
+
+	case $cc_basename in
+          CC*)
+	    archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	    archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	    ;;
+	  *)
+	    archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	    archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	    ;;
+	esac
+      ;;
+
+      tandem*)
+        case $cc_basename in
+          NCC*)
+	    # NonStop-UX NCC 3.20
+	    # FIXME: insert proper C++ library support
+	    ld_shlibs_CXX=no
+	    ;;
+          *)
+	    # FIXME: insert proper C++ library support
+	    ld_shlibs_CXX=no
+	    ;;
+        esac
+        ;;
+
+      vxworks*)
+        # FIXME: insert proper C++ library support
+        ld_shlibs_CXX=no
+        ;;
+
+      *)
+        # FIXME: insert proper C++ library support
+        ld_shlibs_CXX=no
+        ;;
+    esac
+
+    { $as_echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5
+$as_echo "$ld_shlibs_CXX" >&6; }
+    test "$ld_shlibs_CXX" = no && can_build_shared=no
+
+    GCC_CXX="$GXX"
+    LD_CXX="$LD"
+
+    ## CAVEAT EMPTOR:
+    ## There is no encapsulation within the following macros, do not change
+    ## the running order or otherwise move them around unless you know exactly
+    ## what you are doing...
+    # Dependencies to place before and after the object being linked:
+predep_objects_CXX=
+postdep_objects_CXX=
+predeps_CXX=
+postdeps_CXX=
+compiler_lib_search_path_CXX=
+
+cat > conftest.$ac_ext <<_LT_EOF
+class Foo
+{
+public:
+  Foo (void) { a = 0; }
+private:
+  int a;
+};
+_LT_EOF
+
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  # Parse the compiler output and extract the necessary
+  # objects, libraries and library flags.
+
+  # Sentinel used to keep track of whether or not we are before
+  # the conftest object file.
+  pre_test_object_deps_done=no
+
+  for p in `eval "$output_verbose_link_cmd"`; do
+    case $p in
+
+    -L* | -R* | -l*)
+       # Some compilers place space between "-{L,R}" and the path.
+       # Remove the space.
+       if test $p = "-L" ||
+          test $p = "-R"; then
+	 prev=$p
+	 continue
+       else
+	 prev=
+       fi
+
+       if test "$pre_test_object_deps_done" = no; then
+	 case $p in
+	 -L* | -R*)
+	   # Internal compiler library paths should come after those
+	   # provided the user.  The postdeps already come after the
+	   # user supplied libs so there is no need to process them.
+	   if test -z "$compiler_lib_search_path_CXX"; then
+	     compiler_lib_search_path_CXX="${prev}${p}"
+	   else
+	     compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}"
+	   fi
+	   ;;
+	 # The "-l" case would never come before the object being
+	 # linked, so don't bother handling this case.
+	 esac
+       else
+	 if test -z "$postdeps_CXX"; then
+	   postdeps_CXX="${prev}${p}"
+	 else
+	   postdeps_CXX="${postdeps_CXX} ${prev}${p}"
+	 fi
+       fi
+       ;;
+
+    *.$objext)
+       # This assumes that the test object file only shows up
+       # once in the compiler output.
+       if test "$p" = "conftest.$objext"; then
+	 pre_test_object_deps_done=yes
+	 continue
+       fi
+
+       if test "$pre_test_object_deps_done" = no; then
+	 if test -z "$predep_objects_CXX"; then
+	   predep_objects_CXX="$p"
+	 else
+	   predep_objects_CXX="$predep_objects_CXX $p"
+	 fi
+       else
+	 if test -z "$postdep_objects_CXX"; then
+	   postdep_objects_CXX="$p"
+	 else
+	   postdep_objects_CXX="$postdep_objects_CXX $p"
+	 fi
+       fi
+       ;;
+
+    *) ;; # Ignore the rest.
+
+    esac
+  done
+
+  # Clean up.
+  rm -f a.out a.exe
+else
+  echo "libtool.m4: error: problem compiling CXX test program"
+fi
+
+$RM -f confest.$objext
+
+# PORTME: override above test on systems where it is broken
+case $host_os in
+interix[3-9]*)
+  # Interix 3.5 installs completely hosed .la files for C++, so rather than
+  # hack all around it, let's just trust "g++" to DTRT.
+  predep_objects_CXX=
+  postdep_objects_CXX=
+  postdeps_CXX=
+  ;;
+
+linux*)
+  case `$CC -V 2>&1 | sed 5q` in
+  *Sun\ C*)
+    # Sun C++ 5.9
+
+    # The more standards-conforming stlport4 library is
+    # incompatible with the Cstd library. Avoid specifying
+    # it if it's in CXXFLAGS. Ignore libCrun as
+    # -library=stlport4 depends on it.
+    case " $CXX $CXXFLAGS " in
+    *" -library=stlport4 "*)
+      solaris_use_stlport4=yes
+      ;;
+    esac
+
+    if test "$solaris_use_stlport4" != yes; then
+      postdeps_CXX='-library=Cstd -library=Crun'
+    fi
+    ;;
+  esac
+  ;;
+
+solaris*)
+  case $cc_basename in
+  CC*)
+    # The more standards-conforming stlport4 library is
+    # incompatible with the Cstd library. Avoid specifying
+    # it if it's in CXXFLAGS. Ignore libCrun as
+    # -library=stlport4 depends on it.
+    case " $CXX $CXXFLAGS " in
+    *" -library=stlport4 "*)
+      solaris_use_stlport4=yes
+      ;;
+    esac
+
+    # Adding this requires a known-good setup of shared libraries for
+    # Sun compiler versions before 5.6, else PIC objects from an old
+    # archive will be linked into the output, leading to subtle bugs.
+    if test "$solaris_use_stlport4" != yes; then
+      postdeps_CXX='-library=Cstd -library=Crun'
+    fi
+    ;;
+  esac
+  ;;
+esac
+
+
+case " $postdeps_CXX " in
+*" -lc "*) archive_cmds_need_lc_CXX=no ;;
+esac
+ compiler_lib_search_dirs_CXX=
+if test -n "${compiler_lib_search_path_CXX}"; then
+ compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+    lt_prog_compiler_wl_CXX=
+lt_prog_compiler_pic_CXX=
+lt_prog_compiler_static_CXX=
+
+{ $as_echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
+$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+
+  # C++ specific cases for pic, static, wl, etc.
+  if test "$GXX" = yes; then
+    lt_prog_compiler_wl_CXX='-Wl,'
+    lt_prog_compiler_static_CXX='-static'
+
+    case $host_os in
+    aix*)
+      # All AIX code is PIC.
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	lt_prog_compiler_static_CXX='-Bstatic'
+      fi
+      ;;
+
+    amigaos*)
+      case $host_cpu in
+      powerpc)
+            # see comment about AmigaOS4 .so support
+            lt_prog_compiler_pic_CXX='-fPIC'
+        ;;
+      m68k)
+            # FIXME: we need at least 68020 code to build shared libraries, but
+            # adding the `-m68020' flag to GCC prevents building anything better,
+            # like `-m68040'.
+            lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4'
+        ;;
+      esac
+      ;;
+
+    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+      # PIC is the default for these OSes.
+      ;;
+    mingw* | cygwin* | os2* | pw32* | cegcc*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      # Although the cygwin gcc ignores -fPIC, still need this for old-style
+      # (--disable-auto-import) libraries
+      lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
+      ;;
+    darwin* | rhapsody*)
+      # PIC is the default on this platform
+      # Common symbols not allowed in MH_DYLIB files
+      lt_prog_compiler_pic_CXX='-fno-common'
+      ;;
+    *djgpp*)
+      # DJGPP does not support shared libraries at all
+      lt_prog_compiler_pic_CXX=
+      ;;
+    interix[3-9]*)
+      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+      # Instead, we relocate shared libraries at runtime.
+      ;;
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	lt_prog_compiler_pic_CXX=-Kconform_pic
+      fi
+      ;;
+    hpux*)
+      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
+      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
+      # sets the default TLS model and affects inlining.
+      case $host_cpu in
+      hppa*64*)
+	;;
+      *)
+	lt_prog_compiler_pic_CXX='-fPIC'
+	;;
+      esac
+      ;;
+    *qnx* | *nto*)
+      # QNX uses GNU C++, but need to define -shared option too, otherwise
+      # it will coredump.
+      lt_prog_compiler_pic_CXX='-fPIC -shared'
+      ;;
+    *)
+      lt_prog_compiler_pic_CXX='-fPIC'
+      ;;
+    esac
+  else
+    case $host_os in
+      aix[4-9]*)
+	# All AIX code is PIC.
+	if test "$host_cpu" = ia64; then
+	  # AIX 5 now supports IA64 processor
+	  lt_prog_compiler_static_CXX='-Bstatic'
+	else
+	  lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp'
+	fi
+	;;
+      chorus*)
+	case $cc_basename in
+	cxch68*)
+	  # Green Hills C++ Compiler
+	  # _LT_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
+	  ;;
+	esac
+	;;
+      dgux*)
+	case $cc_basename in
+	  ec++*)
+	    lt_prog_compiler_pic_CXX='-KPIC'
+	    ;;
+	  ghcx*)
+	    # Green Hills C++ Compiler
+	    lt_prog_compiler_pic_CXX='-pic'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      freebsd* | dragonfly*)
+	# FreeBSD uses GNU C++
+	;;
+      hpux9* | hpux10* | hpux11*)
+	case $cc_basename in
+	  CC*)
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
+	    if test "$host_cpu" != ia64; then
+	      lt_prog_compiler_pic_CXX='+Z'
+	    fi
+	    ;;
+	  aCC*)
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
+	    case $host_cpu in
+	    hppa*64*|ia64*)
+	      # +Z the default
+	      ;;
+	    *)
+	      lt_prog_compiler_pic_CXX='+Z'
+	      ;;
+	    esac
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      interix*)
+	# This is c89, which is MS Visual C++ (no shared libs)
+	# Anyone wants to do a port?
+	;;
+      irix5* | irix6* | nonstopux*)
+	case $cc_basename in
+	  CC*)
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    lt_prog_compiler_static_CXX='-non_shared'
+	    # CC pic flag -KPIC is the default.
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      linux* | k*bsd*-gnu)
+	case $cc_basename in
+	  KCC*)
+	    # KAI C++ Compiler
+	    lt_prog_compiler_wl_CXX='--backend -Wl,'
+	    lt_prog_compiler_pic_CXX='-fPIC'
+	    ;;
+	  ecpc* )
+	    # old Intel C++ for x86_64 which still supported -KPIC.
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    lt_prog_compiler_pic_CXX='-KPIC'
+	    lt_prog_compiler_static_CXX='-static'
+	    ;;
+	  icpc* )
+	    # Intel C++, used to be incompatible with GCC.
+	    # ICC 10 doesn't accept -KPIC any more.
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    lt_prog_compiler_pic_CXX='-fPIC'
+	    lt_prog_compiler_static_CXX='-static'
+	    ;;
+	  pgCC* | pgcpp*)
+	    # Portland Group C++ compiler
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    lt_prog_compiler_pic_CXX='-fpic'
+	    lt_prog_compiler_static_CXX='-Bstatic'
+	    ;;
+	  cxx*)
+	    # Compaq C++
+	    # Make sure the PIC flag is empty.  It appears that all Alpha
+	    # Linux and Compaq Tru64 Unix objects are PIC.
+	    lt_prog_compiler_pic_CXX=
+	    lt_prog_compiler_static_CXX='-non_shared'
+	    ;;
+	  xlc* | xlC*)
+	    # IBM XL 8.0 on PPC
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    lt_prog_compiler_pic_CXX='-qpic'
+	    lt_prog_compiler_static_CXX='-qstaticlink'
+	    ;;
+	  *)
+	    case `$CC -V 2>&1 | sed 5q` in
+	    *Sun\ C*)
+	      # Sun C++ 5.9
+	      lt_prog_compiler_pic_CXX='-KPIC'
+	      lt_prog_compiler_static_CXX='-Bstatic'
+	      lt_prog_compiler_wl_CXX='-Qoption ld '
+	      ;;
+	    esac
+	    ;;
+	esac
+	;;
+      lynxos*)
+	;;
+      m88k*)
+	;;
+      mvs*)
+	case $cc_basename in
+	  cxx*)
+	    lt_prog_compiler_pic_CXX='-W c,exportall'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      netbsd* | netbsdelf*-gnu)
+	;;
+      *qnx* | *nto*)
+        # QNX uses GNU C++, but need to define -shared option too, otherwise
+        # it will coredump.
+        lt_prog_compiler_pic_CXX='-fPIC -shared'
+        ;;
+      osf3* | osf4* | osf5*)
+	case $cc_basename in
+	  KCC*)
+	    lt_prog_compiler_wl_CXX='--backend -Wl,'
+	    ;;
+	  RCC*)
+	    # Rational C++ 2.4.1
+	    lt_prog_compiler_pic_CXX='-pic'
+	    ;;
+	  cxx*)
+	    # Digital/Compaq C++
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    # Make sure the PIC flag is empty.  It appears that all Alpha
+	    # Linux and Compaq Tru64 Unix objects are PIC.
+	    lt_prog_compiler_pic_CXX=
+	    lt_prog_compiler_static_CXX='-non_shared'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      psos*)
+	;;
+      solaris*)
+	case $cc_basename in
+	  CC*)
+	    # Sun C++ 4.2, 5.x and Centerline C++
+	    lt_prog_compiler_pic_CXX='-KPIC'
+	    lt_prog_compiler_static_CXX='-Bstatic'
+	    lt_prog_compiler_wl_CXX='-Qoption ld '
+	    ;;
+	  gcx*)
+	    # Green Hills C++ Compiler
+	    lt_prog_compiler_pic_CXX='-PIC'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      sunos4*)
+	case $cc_basename in
+	  CC*)
+	    # Sun C++ 4.x
+	    lt_prog_compiler_pic_CXX='-pic'
+	    lt_prog_compiler_static_CXX='-Bstatic'
+	    ;;
+	  lcc*)
+	    # Lucid
+	    lt_prog_compiler_pic_CXX='-pic'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+	case $cc_basename in
+	  CC*)
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    lt_prog_compiler_pic_CXX='-KPIC'
+	    lt_prog_compiler_static_CXX='-Bstatic'
+	    ;;
+	esac
+	;;
+      tandem*)
+	case $cc_basename in
+	  NCC*)
+	    # NonStop-UX NCC 3.20
+	    lt_prog_compiler_pic_CXX='-KPIC'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      vxworks*)
+	;;
+      *)
+	lt_prog_compiler_can_build_shared_CXX=no
+	;;
+    esac
+  fi
+
+case $host_os in
+  # For platforms which do not support PIC, -DPIC is meaningless:
+  *djgpp*)
+    lt_prog_compiler_pic_CXX=
+    ;;
+  *)
+    lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC"
+    ;;
+esac
+{ $as_echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5
+$as_echo "$lt_prog_compiler_pic_CXX" >&6; }
+
+
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$lt_prog_compiler_pic_CXX"; then
+  { $as_echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5
+$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; }
+if test "${lt_cv_prog_compiler_pic_works_CXX+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_pic_works_CXX=no
+   ac_outfile=conftest.$ac_objext
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+   lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   # The option is referenced via a variable to avoid confusing sed.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:18561: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&5
+   echo "$as_me:18565: \$? = $ac_status" >&5
+   if (exit $ac_status) && test -s "$ac_outfile"; then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings other than the usual output.
+     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+       lt_cv_prog_compiler_pic_works_CXX=yes
+     fi
+   fi
+   $RM conftest*
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works_CXX" >&5
+$as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; }
+
+if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then
+    case $lt_prog_compiler_pic_CXX in
+     "" | " "*) ;;
+     *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;;
+     esac
+else
+    lt_prog_compiler_pic_CXX=
+     lt_prog_compiler_can_build_shared_CXX=no
+fi
+
+fi
+
+
+
+#
+# Check to make sure the static flag actually works.
+#
+wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\"
+{ $as_echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
+$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
+if test "${lt_cv_prog_compiler_static_works_CXX+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_static_works_CXX=no
+   save_LDFLAGS="$LDFLAGS"
+   LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
+   echo "$lt_simple_link_test_code" > conftest.$ac_ext
+   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+     # The linker can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     if test -s conftest.err; then
+       # Append any errors to the config.log.
+       cat conftest.err 1>&5
+       $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
+       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+       if diff conftest.exp conftest.er2 >/dev/null; then
+         lt_cv_prog_compiler_static_works_CXX=yes
+       fi
+     else
+       lt_cv_prog_compiler_static_works_CXX=yes
+     fi
+   fi
+   $RM -r conftest*
+   LDFLAGS="$save_LDFLAGS"
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works_CXX" >&5
+$as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; }
+
+if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then
+    :
+else
+    lt_prog_compiler_static_CXX=
+fi
+
+
+
+
+    { $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
+$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
+if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_c_o_CXX=no
+   $RM -r conftest 2>/dev/null
+   mkdir conftest
+   cd conftest
+   mkdir out
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+   lt_compiler_flag="-o out/conftest2.$ac_objext"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:18660: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>out/conftest.err)
+   ac_status=$?
+   cat out/conftest.err >&5
+   echo "$as_me:18664: \$? = $ac_status" >&5
+   if (exit $ac_status) && 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
+     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+       lt_cv_prog_compiler_c_o_CXX=yes
+     fi
+   fi
+   chmod u+w . 2>&5
+   $RM conftest*
+   # SGI C++ compiler will create directory out/ii_files/ for
+   # template instantiation
+   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+   $RM out/* && rmdir out
+   cd ..
+   $RM -r conftest
+   $RM conftest*
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5
+$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; }
+
+
+
+    { $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
+$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
+if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_c_o_CXX=no
+   $RM -r conftest 2>/dev/null
+   mkdir conftest
+   cd conftest
+   mkdir out
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+   lt_compiler_flag="-o out/conftest2.$ac_objext"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:18712: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>out/conftest.err)
+   ac_status=$?
+   cat out/conftest.err >&5
+   echo "$as_me:18716: \$? = $ac_status" >&5
+   if (exit $ac_status) && 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
+     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+       lt_cv_prog_compiler_c_o_CXX=yes
+     fi
+   fi
+   chmod u+w . 2>&5
+   $RM conftest*
+   # SGI C++ compiler will create directory out/ii_files/ for
+   # template instantiation
+   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+   $RM out/* && rmdir out
+   cd ..
+   $RM -r conftest
+   $RM conftest*
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5
+$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; }
+
+
+
+
+hard_links="nottested"
+if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then
+  # do not overwrite the value of need_locks provided by the user
+  { $as_echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
+$as_echo_n "checking if we can lock with hard links... " >&6; }
+  hard_links=yes
+  $RM conftest*
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  touch conftest.a
+  ln conftest.a conftest.b 2>&5 || hard_links=no
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  { $as_echo "$as_me:$LINENO: result: $hard_links" >&5
+$as_echo "$hard_links" >&6; }
+  if test "$hard_links" = no; then
+    { $as_echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
+$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
+    need_locks=warn
+  fi
 else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  need_locks=no
+fi
+
+
+
+    { $as_echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
+
+  export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  case $host_os in
+  aix[4-9]*)
+    # If we're using GNU nm, then we don't want the "-C" option.
+    # -C means demangle to AIX nm, but means don't demangle with GNU nm
+    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
+      export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+    else
+      export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+    fi
+    ;;
+  pw32*)
+    export_symbols_cmds_CXX="$ltdll_cmds"
+  ;;
+  cygwin* | mingw* | cegcc*)
+    export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;/^.*[ ]__nm__/s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols'
+  ;;
+  linux* | k*bsd*-gnu)
+    link_all_deplibs_CXX=no
+  ;;
+  *)
+    export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  ;;
+  esac
+  exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
+
+{ $as_echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5
+$as_echo "$ld_shlibs_CXX" >&6; }
+test "$ld_shlibs_CXX" = no && can_build_shared=no
+
+with_gnu_ld_CXX=$with_gnu_ld
+
+
+
+
+
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$archive_cmds_need_lc_CXX" in
+x|xyes)
+  # Assume -lc should be added
+  archive_cmds_need_lc_CXX=yes
+
+  if test "$enable_shared" = yes && test "$GCC" = yes; then
+    case $archive_cmds_CXX in
+    *'~'*)
+      # FIXME: we may have to deal with multi-command sequences.
+      ;;
+    '$CC '*)
+      # Test whether the compiler implicitly links with -lc since on some
+      # systems, -lgcc has to come before -lc. If gcc already passes -lc
+      # to ld, don't add -lc before -lgcc.
+      { $as_echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
+$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
+      $RM conftest*
+      echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+      if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } 2>conftest.err; then
+        soname=conftest
+        lib=conftest
+        libobjs=conftest.$ac_objext
+        deplibs=
+        wl=$lt_prog_compiler_wl_CXX
+	pic_flag=$lt_prog_compiler_pic_CXX
+        compiler_flags=-v
+        linker_flags=-v
+        verstring=
+        output_objdir=.
+        libname=conftest
+        lt_save_allow_undefined_flag=$allow_undefined_flag_CXX
+        allow_undefined_flag_CXX=
+        if { (eval echo "$as_me:$LINENO: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\"") >&5
+  (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+        then
+	  archive_cmds_need_lc_CXX=no
+        else
+	  archive_cmds_need_lc_CXX=yes
+        fi
+        allow_undefined_flag_CXX=$lt_save_allow_undefined_flag
+      else
+        cat conftest.err 1>&5
+      fi
+      $RM conftest*
+      { $as_echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5
+$as_echo "$archive_cmds_need_lc_CXX" >&6; }
+      ;;
+    esac
+  fi
+  ;;
+esac
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+    { $as_echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
+$as_echo_n "checking dynamic linker characteristics... " >&6; }
+
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=".so"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+case $host_os in
+aix3*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+  shlibpath_var=LIBPATH
+
+  # AIX 3 has no versioning support, so we append a major version to the name.
+  soname_spec='${libname}${release}${shared_ext}$major'
+  ;;
+
+aix[4-9]*)
+  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}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+    shlibpath_var=LD_LIBRARY_PATH
+  else
+    # With GCC up to 2.95.x, collect2 would create an import file
+    # for dependence libraries.  The import file would start with
+    # the line `#! .'.  This would cause the generated library to
+    # depend on `.', always an invalid library.  This was fixed in
+    # development snapshots of GCC prior to 3.0.
+    case $host_os in
+      aix4 | aix4.[01] | aix4.[01].*)
+      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+	   echo ' yes '
+	   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
+	:
+      else
+	can_build_shared=no
+      fi
+      ;;
+    esac
+    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+    # soname into executable. Probably we can add versioning support to
+    # collect2, so additional links can be useful in future.
+    if test "$aix_use_runtimelinking" = yes; then
+      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+      # instead of lib<name>.a to let people know that these are not
+      # typical AIX shared libraries.
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    else
+      # We preserve .a as extension for shared libraries through AIX4.2
+      # and later when we are not doing run time linking.
+      library_names_spec='${libname}${release}.a $libname.a'
+      soname_spec='${libname}${release}${shared_ext}$major'
+    fi
+    shlibpath_var=LIBPATH
+  fi
+  ;;
+
+amigaos*)
+  case $host_cpu in
+  powerpc)
+    # Since July 2007 AmigaOS4 officially supports .so libraries.
+    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    ;;
+  m68k)
+    library_names_spec='$libname.ixlibrary $libname.a'
+    # Create ${libname}_ixlibrary.a entries in /sys/libs.
+    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+    ;;
+  esac
+  ;;
+
+beos*)
+  library_names_spec='${libname}${shared_ext}'
+  dynamic_linker="$host_os ld.so"
+  shlibpath_var=LIBRARY_PATH
+  ;;
+
+bsdi[45]*)
+  version_type=linux
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+  # the default ld.so.conf also contains /usr/contrib/lib and
+  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+  # libtool to hard-code these into programs
+  ;;
+
+cygwin* | mingw* | pw32* | cegcc*)
+  version_type=windows
+  shrext_cmds=".dll"
+  need_version=no
+  need_lib_prefix=no
+
+  case $GCC,$host_os in
+  yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
+    library_names_spec='$libname.dll.a'
+    # DLL is installed to $(libdir)/../bin by postinstall_cmds
+    postinstall_cmds='base_file=`basename \${file}`~
+      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+      dldir=$destdir/`dirname \$dlpath`~
+      test -d \$dldir || mkdir -p \$dldir~
+      $install_prog $dir/$dlname \$dldir/$dlname~
+      chmod a+x \$dldir/$dlname~
+      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+      fi'
+    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+      dlpath=$dir/\$dldll~
+       $RM \$dlpath'
+    shlibpath_overrides_runpath=yes
+
+    case $host_os in
+    cygwin*)
+      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+      ;;
+    mingw* | cegcc*)
+      # MinGW DLLs use traditional 'lib' prefix
+      soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+      if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
+        # It is most probably a Windows format PATH printed by
+        # mingw gcc, but we are running on Cygwin. Gcc prints its search
+        # path with ; separators, and with drive letters. We can handle the
+        # drive letters (cygwin fileutils understands them), so leave them,
+        # especially as we might pass files found there to a mingw objdump,
+        # which wouldn't understand a cygwinified path. Ahh.
+        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+      else
+        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+      fi
+      ;;
+    pw32*)
+      # pw32 DLLs use 'pw' prefix rather than 'lib'
+      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      ;;
+    esac
+    ;;
+
+  *)
+    library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
+    ;;
+  esac
+  dynamic_linker='Win32 ld.exe'
+  # FIXME: first we should search . and the directory the executable is in
+  shlibpath_var=PATH
+  ;;
+
+darwin* | rhapsody*)
+  dynamic_linker="$host_os dyld"
+  version_type=darwin
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+  soname_spec='${libname}${release}${major}$shared_ext'
+  shlibpath_overrides_runpath=yes
+  shlibpath_var=DYLD_LIBRARY_PATH
+  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+
+  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+  ;;
+
+dgux*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+freebsd1*)
+  dynamic_linker=no
+  ;;
+
+freebsd* | dragonfly*)
+  # DragonFly does not have aout.  When/if they implement a new
+  # versioning mechanism, adjust this.
+  if test -x /usr/bin/objformat; then
+    objformat=`/usr/bin/objformat`
+  else
+    case $host_os in
+    freebsd[123]*) objformat=aout ;;
+    *) objformat=elf ;;
+    esac
+  fi
+  version_type=freebsd-$objformat
+  case $version_type in
+    freebsd-elf*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+      need_version=no
+      need_lib_prefix=no
+      ;;
+    freebsd-*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+      need_version=yes
+      ;;
+  esac
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_os in
+  freebsd2*)
+    shlibpath_overrides_runpath=yes
+    ;;
+  freebsd3.[01]* | freebsdelf3.[01]*)
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
+  freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
+    shlibpath_overrides_runpath=no
+    hardcode_into_libs=yes
+    ;;
+  *) # from 4.6 on, and DragonFly
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  esac
+  ;;
+
+gnu*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  hardcode_into_libs=yes
+  ;;
+
+hpux9* | hpux10* | hpux11*)
+  # Give a soname corresponding to the major version so that dld.sl refuses to
+  # link against other versions.
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  case $host_cpu in
+  ia64*)
+    shrext_cmds='.so'
+    hardcode_into_libs=yes
+    dynamic_linker="$host_os dld.so"
+    shlibpath_var=LD_LIBRARY_PATH
+    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    if test "X$HPUX_IA64_MODE" = X32; then
+      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+    else
+      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+    fi
+    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+    ;;
+  hppa*64*)
+    shrext_cmds='.sl'
+    hardcode_into_libs=yes
+    dynamic_linker="$host_os dld.sl"
+    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+    ;;
+  *)
+    shrext_cmds='.sl'
+    dynamic_linker="$host_os dld.sl"
+    shlibpath_var=SHLIB_PATH
+    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    ;;
+  esac
+  # HP-UX runs *really* slowly unless shared libraries are mode 555.
+  postinstall_cmds='chmod 555 $lib'
+  ;;
+
+interix[3-9]*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  ;;
+
+irix5* | irix6* | nonstopux*)
+  case $host_os in
+    nonstopux*) version_type=nonstopux ;;
+    *)
+	if test "$lt_cv_prog_gnu_ld" = yes; then
+		version_type=linux
+	else
+		version_type=irix
+	fi ;;
+  esac
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+  case $host_os in
+  irix5* | nonstopux*)
+    libsuff= shlibsuff=
+    ;;
+  *)
+    case $LD in # libtool.m4 will add one of these switches to LD
+    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+      libsuff= shlibsuff= libmagic=32-bit;;
+    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+      libsuff=32 shlibsuff=N32 libmagic=N32;;
+    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+      libsuff=64 shlibsuff=64 libmagic=64-bit;;
+    *) libsuff= shlibsuff= libmagic=never-match;;
+    esac
+    ;;
+  esac
+  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+  shlibpath_overrides_runpath=no
+  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+  hardcode_into_libs=yes
+  ;;
 
-	ac_cv_lib_svld_dlopen=no
-fi
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+  dynamic_linker=no
+  ;;
 
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5
-$as_echo "$ac_cv_lib_svld_dlopen" >&6; }
-if test "x$ac_cv_lib_svld_dlopen" = x""yes; then
-  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
-else
-  { $as_echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5
-$as_echo_n "checking for dld_link in -ldld... " >&6; }
-if test "${ac_cv_lib_dld_dld_link+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldld  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
+# This must be Linux ELF.
+linux* | k*bsd*-gnu)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  # Some binutils ld are patched to set DT_RUNPATH
+  save_LDFLAGS=$LDFLAGS
+  save_libdir=$libdir
+  eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \
+       LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\""
+  cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char dld_link ();
 int
 main ()
 {
-return dld_link ();
+
   ;
   return 0;
 }
@@ -14685,272 +19331,263 @@
   cat conftest.err >&5
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
+	 test -z "$ac_cxx_werror_flag" ||
 	 test ! -s conftest.err
        } && test -s conftest$ac_exeext && {
 	 test "$cross_compiling" = yes ||
 	 $as_test_x conftest$ac_exeext
        }; then
-  ac_cv_lib_dld_dld_link=yes
+  if  ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then
+  shlibpath_overrides_runpath=yes
+fi
+
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-	ac_cv_lib_dld_dld_link=no
+
 fi
 
 rm -rf conftest.dSYM
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5
-$as_echo "$ac_cv_lib_dld_dld_link" >&6; }
-if test "x$ac_cv_lib_dld_dld_link" = x""yes; then
-  lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
-fi
-
-
-fi
-
-
-fi
-
-
-fi
-
+  LDFLAGS=$save_LDFLAGS
+  libdir=$save_libdir
 
-fi
+  # This implies no fast_install, which is unacceptable.
+  # Some rework will be needed to allow for fast_install
+  # before this can be enabled.
+  hardcode_into_libs=yes
 
+  # Append ld.so.conf contents to the search path
+  if test -f /etc/ld.so.conf; then
+    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[	 ]*hwcap[	 ]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+  fi
 
-fi
+  # We used to test for /lib/ld.so.1 and disable shared libraries on
+  # powerpc, because MkLinux only supported shared libraries with the
+  # GNU dynamic linker.  Since this was broken with cross compilers,
+  # most powerpc-linux boxes support dynamic linking these days and
+  # 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'
+  ;;
 
-    ;;
-  esac
+netbsdelf*-gnu)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='NetBSD ld.elf_so'
+  ;;
 
-  if test "x$lt_cv_dlopen" != xno; then
-    enable_dlopen=yes
+netbsd*)
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+    dynamic_linker='NetBSD (a.out) ld.so'
   else
-    enable_dlopen=no
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    dynamic_linker='NetBSD ld.elf_so'
   fi
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  ;;
 
-  case $lt_cv_dlopen in
-  dlopen)
-    save_CPPFLAGS="$CPPFLAGS"
-    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
-
-    save_LDFLAGS="$LDFLAGS"
-    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
-
-    save_LIBS="$LIBS"
-    LIBS="$lt_cv_dlopen_libs $LIBS"
-
-    { $as_echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5
-$as_echo_n "checking whether a program can dlopen itself... " >&6; }
-if test "${lt_cv_dlopen_self+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  	  if test "$cross_compiling" = yes; then :
-  lt_cv_dlopen_self=cross
-else
-  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
-  lt_status=$lt_dlunknown
-  cat > conftest.$ac_ext <<_LT_EOF
-#line 14759 "configure"
-#include "confdefs.h"
-
-#if HAVE_DLFCN_H
-#include <dlfcn.h>
-#endif
-
-#include <stdio.h>
-
-#ifdef RTLD_GLOBAL
-#  define LT_DLGLOBAL		RTLD_GLOBAL
-#else
-#  ifdef DL_GLOBAL
-#    define LT_DLGLOBAL		DL_GLOBAL
-#  else
-#    define LT_DLGLOBAL		0
-#  endif
-#endif
-
-/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
-   find out it does not work in some platform. */
-#ifndef LT_DLLAZY_OR_NOW
-#  ifdef RTLD_LAZY
-#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
-#  else
-#    ifdef DL_LAZY
-#      define LT_DLLAZY_OR_NOW		DL_LAZY
-#    else
-#      ifdef RTLD_NOW
-#        define LT_DLLAZY_OR_NOW	RTLD_NOW
-#      else
-#        ifdef DL_NOW
-#          define LT_DLLAZY_OR_NOW	DL_NOW
-#        else
-#          define LT_DLLAZY_OR_NOW	0
-#        endif
-#      endif
-#    endif
-#  endif
-#endif
+newsos6)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  ;;
 
-void fnord() { int i=42;}
-int main ()
-{
-  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
-  int status = $lt_dlunknown;
+*nto* | *qnx*)
+  version_type=qnx
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='ldqnx.so'
+  ;;
 
-  if (self)
-    {
-      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
-      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
-      /* dlclose (self); */
-    }
+openbsd*)
+  version_type=sunos
+  sys_lib_dlsearch_path_spec="/usr/lib"
+  need_lib_prefix=no
+  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+  case $host_os in
+    openbsd3.3 | openbsd3.3.*)	need_version=yes ;;
+    *)				need_version=no  ;;
+  esac
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    case $host_os in
+      openbsd2.[89] | openbsd2.[89].*)
+	shlibpath_overrides_runpath=no
+	;;
+      *)
+	shlibpath_overrides_runpath=yes
+	;;
+      esac
   else
-    puts (dlerror ());
-
-  return status;
-}
-_LT_EOF
-  if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
-    (./conftest; exit; ) >&5 2>/dev/null
-    lt_status=$?
-    case x$lt_status in
-      x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
-      x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
-      x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
-    esac
-  else :
-    # compilation failed
-    lt_cv_dlopen_self=no
+    shlibpath_overrides_runpath=yes
   fi
-fi
-rm -fr conftest*
-
+  ;;
 
-fi
-{ $as_echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5
-$as_echo "$lt_cv_dlopen_self" >&6; }
+os2*)
+  libname_spec='$name'
+  shrext_cmds=".dll"
+  need_lib_prefix=no
+  library_names_spec='$libname${shared_ext} $libname.a'
+  dynamic_linker='OS/2 ld.exe'
+  shlibpath_var=LIBPATH
+  ;;
 
-    if test "x$lt_cv_dlopen_self" = xyes; then
-      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
-      { $as_echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5
-$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
-if test "${lt_cv_dlopen_self_static+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  	  if test "$cross_compiling" = yes; then :
-  lt_cv_dlopen_self_static=cross
-else
-  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
-  lt_status=$lt_dlunknown
-  cat > conftest.$ac_ext <<_LT_EOF
-#line 14855 "configure"
-#include "confdefs.h"
+osf3* | osf4* | osf5*)
+  version_type=osf
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  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"
+  ;;
 
-#if HAVE_DLFCN_H
-#include <dlfcn.h>
-#endif
+rdos*)
+  dynamic_linker=no
+  ;;
 
-#include <stdio.h>
+solaris*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  # ldd complains unless libraries are executable
+  postinstall_cmds='chmod +x $lib'
+  ;;
 
-#ifdef RTLD_GLOBAL
-#  define LT_DLGLOBAL		RTLD_GLOBAL
-#else
-#  ifdef DL_GLOBAL
-#    define LT_DLGLOBAL		DL_GLOBAL
-#  else
-#    define LT_DLGLOBAL		0
-#  endif
-#endif
+sunos4*)
+  version_type=sunos
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  if test "$with_gnu_ld" = yes; then
+    need_lib_prefix=no
+  fi
+  need_version=yes
+  ;;
 
-/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
-   find out it does not work in some platform. */
-#ifndef LT_DLLAZY_OR_NOW
-#  ifdef RTLD_LAZY
-#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
-#  else
-#    ifdef DL_LAZY
-#      define LT_DLLAZY_OR_NOW		DL_LAZY
-#    else
-#      ifdef RTLD_NOW
-#        define LT_DLLAZY_OR_NOW	RTLD_NOW
-#      else
-#        ifdef DL_NOW
-#          define LT_DLLAZY_OR_NOW	DL_NOW
-#        else
-#          define LT_DLLAZY_OR_NOW	0
-#        endif
-#      endif
-#    endif
-#  endif
-#endif
+sysv4 | sysv4.3*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_vendor in
+    sni)
+      shlibpath_overrides_runpath=no
+      need_lib_prefix=no
+      runpath_var=LD_RUN_PATH
+      ;;
+    siemens)
+      need_lib_prefix=no
+      ;;
+    motorola)
+      need_lib_prefix=no
+      need_version=no
+      shlibpath_overrides_runpath=no
+      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+      ;;
+  esac
+  ;;
 
-void fnord() { int i=42;}
-int main ()
-{
-  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
-  int status = $lt_dlunknown;
+sysv4*MP*)
+  if test -d /usr/nec ;then
+    version_type=linux
+    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+    soname_spec='$libname${shared_ext}.$major'
+    shlibpath_var=LD_LIBRARY_PATH
+  fi
+  ;;
 
-  if (self)
-    {
-      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
-      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
-      /* dlclose (self); */
-    }
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+  version_type=freebsd-elf
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  if test "$with_gnu_ld" = yes; then
+    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
   else
-    puts (dlerror ());
-
-  return status;
-}
-_LT_EOF
-  if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
-    (./conftest; exit; ) >&5 2>/dev/null
-    lt_status=$?
-    case x$lt_status in
-      x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
-      x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
-      x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
+    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
+    case $host_os in
+      sco3.2v5*)
+        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
+	;;
     esac
-  else :
-    # compilation failed
-    lt_cv_dlopen_self_static=no
   fi
-fi
-rm -fr conftest*
+  sys_lib_dlsearch_path_spec='/usr/lib'
+  ;;
 
+tpf*)
+  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  ;;
 
-fi
-{ $as_echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5
-$as_echo "$lt_cv_dlopen_self_static" >&6; }
-    fi
+uts4*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
 
-    CPPFLAGS="$save_CPPFLAGS"
-    LDFLAGS="$save_LDFLAGS"
-    LIBS="$save_LIBS"
-    ;;
-  esac
+*)
+  dynamic_linker=no
+  ;;
+esac
+{ $as_echo "$as_me:$LINENO: result: $dynamic_linker" >&5
+$as_echo "$dynamic_linker" >&6; }
+test "$dynamic_linker" = no && can_build_shared=no
 
-  case $lt_cv_dlopen_self in
-  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
-  *) enable_dlopen_self=unknown ;;
-  esac
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
 
-  case $lt_cv_dlopen_self_static in
-  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
-  *) enable_dlopen_self_static=unknown ;;
-  esac
+if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
+  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
+fi
+if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
+  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
 fi
 
 
@@ -14969,35 +19606,6 @@
 
 
 
-striplib=
-old_striplib=
-{ $as_echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5
-$as_echo_n "checking whether stripping libraries is possible... " >&6; }
-if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
-  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
-  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
-  { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-else
-# FIXME - insert some real tests, host_os isn't really good enough
-  case $host_os in
-  darwin*)
-    if test -n "$STRIP" ; then
-      striplib="$STRIP -x"
-      old_striplib="$STRIP -S"
-      { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-    else
-      { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-    fi
-    ;;
-  *)
-    { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-    ;;
-  esac
-fi
 
 
 
@@ -15010,55 +19618,76 @@
 
 
 
-  # Report which library types will actually be built
-  { $as_echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5
-$as_echo_n "checking if libtool supports shared libraries... " >&6; }
-  { $as_echo "$as_me:$LINENO: result: $can_build_shared" >&5
-$as_echo "$can_build_shared" >&6; }
 
-  { $as_echo "$as_me:$LINENO: checking whether to build shared libraries" >&5
-$as_echo_n "checking whether to build shared libraries... " >&6; }
-  test "$can_build_shared" = "no" && enable_shared=no
 
-  # On AIX, shared libraries and static libraries use the same namespace, and
-  # are all built from PIC.
-  case $host_os in
-  aix3*)
-    test "$enable_shared" = yes && enable_static=no
-    if test -n "$RANLIB"; then
-      archive_cmds="$archive_cmds~\$RANLIB \$lib"
-      postinstall_cmds='$RANLIB $lib'
-    fi
-    ;;
 
-  aix[4-9]*)
-    if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
-      test "$enable_shared" = yes && enable_static=no
-    fi
-    ;;
-  esac
-  { $as_echo "$as_me:$LINENO: result: $enable_shared" >&5
-$as_echo "$enable_shared" >&6; }
 
-  { $as_echo "$as_me:$LINENO: checking whether to build static libraries" >&5
-$as_echo_n "checking whether to build static libraries... " >&6; }
-  # Make sure either enable_shared or enable_static is yes.
-  test "$enable_shared" = yes || enable_static=yes
-  { $as_echo "$as_me:$LINENO: result: $enable_static" >&5
-$as_echo "$enable_static" >&6; }
 
 
 
+    { $as_echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
+$as_echo_n "checking how to hardcode library paths into programs... " >&6; }
+hardcode_action_CXX=
+if test -n "$hardcode_libdir_flag_spec_CXX" ||
+   test -n "$runpath_var_CXX" ||
+   test "X$hardcode_automatic_CXX" = "Xyes" ; then
+
+  # We can hardcode non-existent directories.
+  if test "$hardcode_direct_CXX" != no &&
+     # If the only mechanism to avoid hardcoding is shlibpath_var, we
+     # have to relink, otherwise we might link with an installed library
+     # when we should be linking with a yet-to-be-installed one
+     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" != no &&
+     test "$hardcode_minus_L_CXX" != no; then
+    # Linking always hardcodes the temporary library directory.
+    hardcode_action_CXX=relink
+  else
+    # We can link without hardcoding, and we can hardcode nonexisting dirs.
+    hardcode_action_CXX=immediate
+  fi
+else
+  # We cannot hardcode anything, or else we can only hardcode existing
+  # directories.
+  hardcode_action_CXX=unsupported
+fi
+{ $as_echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5
+$as_echo "$hardcode_action_CXX" >&6; }
 
+if test "$hardcode_action_CXX" = relink ||
+   test "$inherit_rpath_CXX" = yes; then
+  # Fast installation is not supported
+  enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+     test "$enable_shared" = no; then
+  # Fast installation is not necessary
+  enable_fast_install=needless
 fi
+
+
+
+
+
+
+
+  fi # test -n "$compiler"
+
+  CC=$lt_save_CC
+  LDCXX=$LD
+  LD=$lt_save_LD
+  GCC=$lt_save_GCC
+  with_gnu_ld=$lt_save_with_gnu_ld
+  lt_cv_path_LDCXX=$lt_cv_path_LD
+  lt_cv_path_LD=$lt_save_path_LD
+  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
+  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
+fi # test "$_lt_caught_CXX_error" != yes
+
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
-CC="$lt_save_CC"
-
 
 
 
@@ -15080,6 +19709,31 @@
 
 
 
+{ $as_echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
+$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
+    # Check whether --enable-maintainer-mode was given.
+if test "${enable_maintainer_mode+set}" = set; then
+  enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
+else
+  USE_MAINTAINER_MODE=no
+fi
+
+  { $as_echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5
+$as_echo "$USE_MAINTAINER_MODE" >&6; }
+
+
+if test $USE_MAINTAINER_MODE = yes; then
+  MAINTAINER_MODE_TRUE=
+  MAINTAINER_MODE_FALSE='#'
+else
+  MAINTAINER_MODE_TRUE='#'
+  MAINTAINER_MODE_FALSE=
+fi
+
+  MAINT=$MAINTAINER_MODE_TRUE
+
+
+
 
 
 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
@@ -15714,6 +20368,38 @@
 
 
 
+# Check whether --enable-plugin-scintilla was given.
+if test "${enable_plugin_scintilla+set}" = set; then
+  enableval=$enable_plugin_scintilla;  if test "$enableval" = "no"; then
+		user_disabled_scintilla=1
+	  fi
+else
+   user_disabled_scintilla=0
+fi
+
+
+{ $as_echo "$as_me:$LINENO: checking if scintilla plugin is enabled" >&5
+$as_echo_n "checking if scintilla plugin is enabled... " >&6; }
+if test "$user_disabled_scintilla" = 1; then
+	{ $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+	scintilla="no"
+else
+	{ $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+	scintilla="yes"
+fi
+
+
+if test x$scintilla = xyes; then
+  HAVE_PLUGIN_SCINTILLA_TRUE=
+  HAVE_PLUGIN_SCINTILLA_FALSE='#'
+else
+  HAVE_PLUGIN_SCINTILLA_TRUE='#'
+  HAVE_PLUGIN_SCINTILLA_FALSE=
+fi
+
+
 anjutalibdir=`pkg-config --variable=libdir libanjuta-1.0`
 anjutadatadir=`pkg-config --variable=datadir libanjuta-1.0`
 
@@ -15732,7 +20418,7 @@
 EXTRA_CFLAGS='-DPACKAGE_PIXMAPS_DIR=\""$(datadir)/pixmaps/$(PACKAGE)"\" -DPACKAGE_LIB_DIR=\""$(pkglibdir)"\" -DPACKAGE_DATA_DIR=\""$(datadir)/$(PACKAGE)"\"'
 
 
-ac_config_files="$ac_config_files Makefile plugins/Makefile plugins/scratchbox/Makefile plugins/class-inheritance/Makefile plugins/sample1/Makefile plugins/indent/Makefile plugins/valgrind/Makefile plugins/profiler/Makefile po/Makefile.in scripts/Makefile"
+ac_config_files="$ac_config_files Makefile plugins/Makefile plugins/scratchbox/Makefile plugins/class-inheritance/Makefile plugins/sample1/Makefile plugins/indent/Makefile plugins/valgrind/Makefile plugins/profiler/Makefile plugins/scintilla/Makefile plugins/scintilla/scintilla/Makefile plugins/scintilla/scintilla/include/Makefile plugins/scintilla/properties/Makefile po/Makefile.in scripts/Makefile"
 
 cat >confcache <<\_ACEOF
 # This file is a shell script that caches the results of configure
@@ -15859,6 +20545,13 @@
 Usually this means the macro was only invoked conditionally." >&2;}
    { (exit 1); exit 1; }; }
 fi
+if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
   { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
 Usually this means the macro was only invoked conditionally." >&5
@@ -15870,6 +20563,20 @@
   ac_config_commands="$ac_config_commands po/stamp-it"
 
 
+if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
 if test -z "${HAVE_PLUGIN_VALGRIND_TRUE}" && test -z "${HAVE_PLUGIN_VALGRIND_FALSE}"; then
   { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_PLUGIN_VALGRIND\" was never defined.
 Usually this means the macro was only invoked conditionally." >&5
@@ -15891,6 +20598,13 @@
 Usually this means the macro was only invoked conditionally." >&2;}
    { (exit 1); exit 1; }; }
 fi
+if test -z "${HAVE_PLUGIN_SCINTILLA_TRUE}" && test -z "${HAVE_PLUGIN_SCINTILLA_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_PLUGIN_SCINTILLA\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"HAVE_PLUGIN_SCINTILLA\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
 
 : ${CONFIG_STATUS=./config.status}
 ac_write_fail=0
@@ -16517,6 +21231,59 @@
 enable_dlopen_self_static='`$ECHO "X$enable_dlopen_self_static" | $Xsed -e "$delay_single_quote_subst"`'
 old_striplib='`$ECHO "X$old_striplib" | $Xsed -e "$delay_single_quote_subst"`'
 striplib='`$ECHO "X$striplib" | $Xsed -e "$delay_single_quote_subst"`'
+compiler_lib_search_dirs='`$ECHO "X$compiler_lib_search_dirs" | $Xsed -e "$delay_single_quote_subst"`'
+predep_objects='`$ECHO "X$predep_objects" | $Xsed -e "$delay_single_quote_subst"`'
+postdep_objects='`$ECHO "X$postdep_objects" | $Xsed -e "$delay_single_quote_subst"`'
+predeps='`$ECHO "X$predeps" | $Xsed -e "$delay_single_quote_subst"`'
+postdeps='`$ECHO "X$postdeps" | $Xsed -e "$delay_single_quote_subst"`'
+compiler_lib_search_path='`$ECHO "X$compiler_lib_search_path" | $Xsed -e "$delay_single_quote_subst"`'
+LD_CXX='`$ECHO "X$LD_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+old_archive_cmds_CXX='`$ECHO "X$old_archive_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+compiler_CXX='`$ECHO "X$compiler_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+GCC_CXX='`$ECHO "X$GCC_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "X$lt_prog_compiler_no_builtin_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_wl_CXX='`$ECHO "X$lt_prog_compiler_wl_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_pic_CXX='`$ECHO "X$lt_prog_compiler_pic_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_static_CXX='`$ECHO "X$lt_prog_compiler_static_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_prog_compiler_c_o_CXX='`$ECHO "X$lt_cv_prog_compiler_c_o_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+archive_cmds_need_lc_CXX='`$ECHO "X$archive_cmds_need_lc_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+enable_shared_with_static_runtimes_CXX='`$ECHO "X$enable_shared_with_static_runtimes_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+export_dynamic_flag_spec_CXX='`$ECHO "X$export_dynamic_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+whole_archive_flag_spec_CXX='`$ECHO "X$whole_archive_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+compiler_needs_object_CXX='`$ECHO "X$compiler_needs_object_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+old_archive_from_new_cmds_CXX='`$ECHO "X$old_archive_from_new_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+old_archive_from_expsyms_cmds_CXX='`$ECHO "X$old_archive_from_expsyms_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+archive_cmds_CXX='`$ECHO "X$archive_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+archive_expsym_cmds_CXX='`$ECHO "X$archive_expsym_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+module_cmds_CXX='`$ECHO "X$module_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+module_expsym_cmds_CXX='`$ECHO "X$module_expsym_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+with_gnu_ld_CXX='`$ECHO "X$with_gnu_ld_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+allow_undefined_flag_CXX='`$ECHO "X$allow_undefined_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+no_undefined_flag_CXX='`$ECHO "X$no_undefined_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec_CXX='`$ECHO "X$hardcode_libdir_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec_ld_CXX='`$ECHO "X$hardcode_libdir_flag_spec_ld_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_libdir_separator_CXX='`$ECHO "X$hardcode_libdir_separator_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_direct_CXX='`$ECHO "X$hardcode_direct_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_direct_absolute_CXX='`$ECHO "X$hardcode_direct_absolute_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_minus_L_CXX='`$ECHO "X$hardcode_minus_L_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_shlibpath_var_CXX='`$ECHO "X$hardcode_shlibpath_var_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_automatic_CXX='`$ECHO "X$hardcode_automatic_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+inherit_rpath_CXX='`$ECHO "X$inherit_rpath_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+link_all_deplibs_CXX='`$ECHO "X$link_all_deplibs_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+fix_srcfile_path_CXX='`$ECHO "X$fix_srcfile_path_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+always_export_symbols_CXX='`$ECHO "X$always_export_symbols_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+export_symbols_cmds_CXX='`$ECHO "X$export_symbols_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+exclude_expsyms_CXX='`$ECHO "X$exclude_expsyms_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+include_expsyms_CXX='`$ECHO "X$include_expsyms_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+prelink_cmds_CXX='`$ECHO "X$prelink_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+file_list_spec_CXX='`$ECHO "X$file_list_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_action_CXX='`$ECHO "X$hardcode_action_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+compiler_lib_search_dirs_CXX='`$ECHO "X$compiler_lib_search_dirs_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+predep_objects_CXX='`$ECHO "X$predep_objects_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+postdep_objects_CXX='`$ECHO "X$postdep_objects_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+predeps_CXX='`$ECHO "X$predeps_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+postdeps_CXX='`$ECHO "X$postdeps_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+compiler_lib_search_path_CXX='`$ECHO "X$compiler_lib_search_path_CXX" | $Xsed -e "$delay_single_quote_subst"`'
 
 LTCC='$LTCC'
 LTCFLAGS='$LTCFLAGS'
@@ -16580,7 +21347,39 @@
 soname_spec \
 finish_eval \
 old_striplib \
-striplib; do
+striplib \
+compiler_lib_search_dirs \
+predep_objects \
+postdep_objects \
+predeps \
+postdeps \
+compiler_lib_search_path \
+LD_CXX \
+compiler_CXX \
+lt_prog_compiler_no_builtin_flag_CXX \
+lt_prog_compiler_wl_CXX \
+lt_prog_compiler_pic_CXX \
+lt_prog_compiler_static_CXX \
+lt_cv_prog_compiler_c_o_CXX \
+export_dynamic_flag_spec_CXX \
+whole_archive_flag_spec_CXX \
+compiler_needs_object_CXX \
+with_gnu_ld_CXX \
+allow_undefined_flag_CXX \
+no_undefined_flag_CXX \
+hardcode_libdir_flag_spec_CXX \
+hardcode_libdir_flag_spec_ld_CXX \
+hardcode_libdir_separator_CXX \
+fix_srcfile_path_CXX \
+exclude_expsyms_CXX \
+include_expsyms_CXX \
+file_list_spec_CXX \
+compiler_lib_search_dirs_CXX \
+predep_objects_CXX \
+postdep_objects_CXX \
+predeps_CXX \
+postdeps_CXX \
+compiler_lib_search_path_CXX; do
     case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
     *[\\\\\\\`\\"\\\$]*)
       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
@@ -16609,7 +21408,16 @@
 postuninstall_cmds \
 finish_cmds \
 sys_lib_search_path_spec \
-sys_lib_dlsearch_path_spec; do
+sys_lib_dlsearch_path_spec \
+old_archive_cmds_CXX \
+old_archive_from_new_cmds_CXX \
+old_archive_from_expsyms_cmds_CXX \
+archive_cmds_CXX \
+archive_expsym_cmds_CXX \
+module_cmds_CXX \
+module_expsym_cmds_CXX \
+export_symbols_cmds_CXX \
+prelink_cmds_CXX; do
     case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
     *[\\\\\\\`\\"\\\$]*)
       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
@@ -16646,6 +21454,8 @@
 
 
 
+
+
 _ACEOF
 
 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
@@ -16666,6 +21476,10 @@
     "plugins/indent/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/indent/Makefile" ;;
     "plugins/valgrind/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/valgrind/Makefile" ;;
     "plugins/profiler/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/profiler/Makefile" ;;
+    "plugins/scintilla/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/scintilla/Makefile" ;;
+    "plugins/scintilla/scintilla/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/scintilla/scintilla/Makefile" ;;
+    "plugins/scintilla/scintilla/include/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/scintilla/scintilla/include/Makefile" ;;
+    "plugins/scintilla/properties/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/scintilla/properties/Makefile" ;;
     "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
     "scripts/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/Makefile" ;;
     "po/stamp-it") CONFIG_COMMANDS="$CONFIG_COMMANDS po/stamp-it" ;;
@@ -17491,7 +22305,7 @@
 
 
 # The names of the tagged configurations supported by this script.
-available_tags=""
+available_tags="CXX "
 
 # ### BEGIN LIBTOOL CONFIG
 
@@ -17841,6 +22655,20 @@
 # How to hardcode a shared library path into an executable.
 hardcode_action=$hardcode_action
 
+# The directories searched by this compiler when creating a shared library.
+compiler_lib_search_dirs=$lt_compiler_lib_search_dirs
+
+# Dependencies to place before and after the objects being linked to
+# create a shared library.
+predep_objects=$lt_predep_objects
+postdep_objects=$lt_postdep_objects
+predeps=$lt_predeps
+postdeps=$lt_postdeps
+
+# The library search path used internally by the compiler when linking
+# a shared library.
+compiler_lib_search_path=$lt_compiler_lib_search_path
+
 # ### END LIBTOOL CONFIG
 
 _LT_EOF
@@ -18076,6 +22904,159 @@
     (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
   chmod +x "$ofile"
 
+
+    cat <<_LT_EOF >> "$ofile"
+
+# ### BEGIN LIBTOOL TAG CONFIG: CXX
+
+# The linker used to build libraries.
+LD=$lt_LD_CXX
+
+# Commands used to build an old-style archive.
+old_archive_cmds=$lt_old_archive_cmds_CXX
+
+# A language specific compiler.
+CC=$lt_compiler_CXX
+
+# Is the compiler the GNU compiler?
+with_gcc=$GCC_CXX
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX
+
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl_CXX
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic_CXX
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_lt_prog_compiler_static_CXX
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$archive_cmds_need_lc_CXX
+
+# Whether or not to disallow shared libs when runtime libs are static.
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX
+
+# Whether the compiler copes with passing no objects directly.
+compiler_needs_object=$lt_compiler_needs_object_CXX
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX
+
+# Commands used to build a shared archive.
+archive_cmds=$lt_archive_cmds_CXX
+archive_expsym_cmds=$lt_archive_expsym_cmds_CXX
+
+# Commands used to build a loadable module if different from building
+# a shared archive.
+module_cmds=$lt_module_cmds_CXX
+module_expsym_cmds=$lt_module_expsym_cmds_CXX
+
+# Whether we are building with GNU ld or not.
+with_gnu_ld=$lt_with_gnu_ld_CXX
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag_CXX
+
+# Flag that enforces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag_CXX
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist
+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX
+
+# If ld is used when linking, flag to hardcode \$libdir into a binary
+# during linking.  This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX
+
+# Whether we need a single "-rpath" flag with a separated argument.
+hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX
+
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# DIR into the resulting binary.
+hardcode_direct=$hardcode_direct_CXX
+
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# DIR into the resulting binary and the resulting library dependency is
+# "absolute",i.e impossible to change by setting \${shlibpath_var} if the
+# library is relocated.
+hardcode_direct_absolute=$hardcode_direct_absolute_CXX
+
+# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
+# into the resulting binary.
+hardcode_minus_L=$hardcode_minus_L_CXX
+
+# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
+# into the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX
+
+# Set to "yes" if building a shared library automatically hardcodes DIR
+# into the library and all subsequent libraries and executables linked
+# against it.
+hardcode_automatic=$hardcode_automatic_CXX
+
+# Set to yes if linker adds runtime paths of dependent libraries
+# to runtime path list.
+inherit_rpath=$inherit_rpath_CXX
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs_CXX
+
+# Fix the shell variable \$srcfile for the compiler.
+fix_srcfile_path=$lt_fix_srcfile_path_CXX
+
+# Set to "yes" if exported symbols are required.
+always_export_symbols=$always_export_symbols_CXX
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds_CXX
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_exclude_expsyms_CXX
+
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms_CXX
+
+# Commands necessary for linking programs (against libraries) with templates.
+prelink_cmds=$lt_prelink_cmds_CXX
+
+# Specify filename containing input files.
+file_list_spec=$lt_file_list_spec_CXX
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action_CXX
+
+# The directories searched by this compiler when creating a shared library.
+compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX
+
+# Dependencies to place before and after the objects being linked to
+# create a shared library.
+predep_objects=$lt_predep_objects_CXX
+postdep_objects=$lt_postdep_objects_CXX
+predeps=$lt_predeps_CXX
+postdeps=$lt_postdeps_CXX
+
+# The library search path used internally by the compiler when linking
+# a shared library.
+compiler_lib_search_path=$lt_compiler_lib_search_path_CXX
+
+# ### END LIBTOOL TAG CONFIG: CXX
+_LT_EOF
+
  ;;
     "po/stamp-it":C)
     if  ! grep "^# INTLTOOL_MAKEFILE$" "po/Makefile.in" > /dev/null ; then
@@ -18160,3 +23141,8 @@
         echo "Building Valgrind debugger plugin: .....................NO"
 	echo "		Requires binutils-dev"
 fi
+if  test x$scintilla = xyes ; then
+        echo "Building Scintilla based editor: .......................YES"
+else
+        echo "Building Scintilla based editor: .......................NO"
+fi

Modified: trunk/configure.ac
==============================================================================
--- trunk/configure.ac	(original)
+++ trunk/configure.ac	Wed Apr  8 07:16:46 2009
@@ -9,8 +9,11 @@
 
 AC_ISC_POSIX
 AC_PROG_CC
+AC_PROG_CXX
 AM_PROG_CC_STDC
 AC_HEADER_STDC
+AC_PROG_CPP
+AC_LANG_C
 
 BINUTILS_REQUIRED=2.15.92
 LIBGRAPHVIZ_REQUIRED=1.0
@@ -18,6 +21,21 @@
 AC_SUBST(LIBGRAPHVIZ_REQUIRED)
 AC_SUBST(BINUTILS_REQUIRED)
 
+dnl Compiler settings
+dnl ---------------------------------------------------------------------------
+
+GNOME_COMPILE_WARNINGS(maximum)
+GNOME_CXX_WARNINGS(yes)
+AM_CFLAGS="$AM_CFLAGS $WARN_CFLAGS"
+AM_CXXFLAGS="$AM_CXXFLAGS $WARN_CXXFLAGS"
+
+dnl Enable debugging mode
+AC_ARG_ENABLE(debug,
+  AC_HELP_STRING([--enable-debug],[Enable debug messages]),
+  AM_CFLAGS="$AM_CFLAGS -DDEBUG"
+  AM_CXXFLAGS="$AM_CXXFLAGS -DDEBUG")
+AC_SUBST(AM_CFLAGS)
+AC_SUBST(AM_CXXFLAGS)
 
 dnl ***************************************************************************
 dnl Internatinalization
@@ -29,6 +47,9 @@
 IT_PROG_INTLTOOL([0.35.0])
 AM_PROG_LIBTOOL
 
+dnl maintainer mode
+AM_MAINTAINER_MODE
+
 dnl Check for libanjuta
 PKG_CHECK_MODULES(LIBANJUTA, [libanjuta-1.0 >= 2.27.0])
 
@@ -140,6 +161,25 @@
 
 AM_GCONF_SOURCE_2
 
+dnl Scintilla Editor
+dnl -------------------------------------------------------------
+
+AC_ARG_ENABLE(plugin-scintilla,
+	AC_HELP_STRING([--disable-plugin-scintilla],[ Scintilla based editor in Anjuta]), 
+	[ if test "$enableval" = "no"; then
+		user_disabled_scintilla=1
+	  fi ],
+	[ user_disabled_scintilla=0 ])
+
+AC_MSG_CHECKING(if scintilla plugin is enabled)
+if test "$user_disabled_scintilla" = 1; then
+	AC_MSG_RESULT(no)
+	scintilla="no"
+else
+	AC_MSG_RESULT(yes)
+	scintilla="yes"
+fi
+AM_CONDITIONAL(HAVE_PLUGIN_SCINTILLA, [test x$scintilla = xyes])
 
 dnl Setup Plugin directories
 dnl ------------------------
@@ -170,6 +210,10 @@
 plugins/indent/Makefile
 plugins/valgrind/Makefile
 plugins/profiler/Makefile
+plugins/scintilla/Makefile
+plugins/scintilla/scintilla/Makefile
+plugins/scintilla/scintilla/include/Makefile
+plugins/scintilla/properties/Makefile
 po/Makefile.in
 scripts/Makefile
 ])
@@ -192,4 +236,9 @@
 else
         echo "Building Valgrind debugger plugin: .....................NO"
 	echo "		Requires binutils-dev"
+fi
+if [ test x$scintilla = xyes ]; then
+        echo "Building Scintilla based editor: .......................YES"
+else
+        echo "Building Scintilla based editor: .......................NO"
 fi
\ No newline at end of file

Modified: trunk/plugins/Makefile.am
==============================================================================
--- trunk/plugins/Makefile.am	(original)
+++ trunk/plugins/Makefile.am	Wed Apr  8 07:16:46 2009
@@ -1 +1 @@
-SUBDIRS = class-inheritance valgrind scratchbox profiler
+SUBDIRS = class-inheritance valgrind scratchbox profiler scintilla

Modified: trunk/plugins/class-inheritance/Makefile
==============================================================================
--- trunk/plugins/class-inheritance/Makefile	(original)
+++ trunk/plugins/class-inheritance/Makefile	Wed Apr  8 07:16:46 2009
@@ -95,6 +95,8 @@
 AMDEP_FALSE = #
 AMDEP_TRUE = 
 AMTAR = ${SHELL} /home/jhs/devel/anjuta-extras/missing --run tar
+AM_CFLAGS =  -Wall -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wno-sign-compare 
+AM_CXXFLAGS =  -g -O2 -Wall -Wno-unused -Wshadow -Woverloaded-virtual 
 AR = ar
 AUTOCONF = ${SHELL} /home/jhs/devel/anjuta-extras/missing --run autoconf
 AUTOHEADER = ${SHELL} /home/jhs/devel/anjuta-extras/missing --run autoheader
@@ -108,6 +110,10 @@
 CFLAGS = -g -O2
 CPP = gcc -E
 CPPFLAGS = 
+CXX = g++
+CXXCPP = g++ -E
+CXXDEPMODE = depmode=gcc3
+CXXFLAGS = -g -O2
 CYGPATH_W = echo
 DATADIRNAME = share
 DEFS = -DHAVE_CONFIG_H
@@ -134,6 +140,8 @@
 GREP = /bin/grep
 HAVE_GRAPHVIZ_FALSE = #
 HAVE_GRAPHVIZ_TRUE = 
+HAVE_PLUGIN_SCINTILLA_FALSE = #
+HAVE_PLUGIN_SCINTILLA_TRUE = 
 HAVE_PLUGIN_VALGRIND_FALSE = #
 HAVE_PLUGIN_VALGRIND_TRUE = 
 INSTALL_DATA = ${INSTALL} -m 644
@@ -176,9 +184,9 @@
 LIPO = 
 LN_S = ln -s
 LTLIBOBJS = 
-MAINT = #
-MAINTAINER_MODE_FALSE = 
-MAINTAINER_MODE_TRUE = #
+MAINT = 
+MAINTAINER_MODE_FALSE = #
+MAINTAINER_MODE_TRUE = 
 MAKEINFO = ${SHELL} /home/jhs/devel/anjuta-extras/missing --run makeinfo
 MKINSTALLDIRS = ./mkinstalldirs
 MSGFMT = /usr/bin/msgfmt
@@ -210,11 +218,16 @@
 STRIP = strip
 USE_NLS = yes
 VERSION = 2.27.0
+WARN_CFLAGS = -Wall -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wno-sign-compare 
+WARN_CXXFLAGS = -g -O2 -Wall -Wno-unused -Wshadow -Woverloaded-virtual 
 XGETTEXT = /usr/bin/xgettext
 ac_ct_CC = gcc
+ac_ct_CXX = g++
 ac_ct_DUMPBIN = 
 am__fastdepCC_FALSE = #
 am__fastdepCC_TRUE = 
+am__fastdepCXX_FALSE = #
+am__fastdepCXX_TRUE = 
 am__include = include
 am__leading_dot = .
 am__quote = 
@@ -256,7 +269,7 @@
 mkdir_p = mkdir -p --
 oldincludedir = /usr/include
 pdfdir = ${docdir}
-prefix = /usr/local
+prefix = /usr
 program_transform_name = s,x,x,
 psdir = ${docdir}
 sbindir = ${exec_prefix}/sbin
@@ -302,7 +315,6 @@
 # Plugin dependencies
 libanjuta_class_inheritance_la_LIBADD = \
 	$(LIBANJUTA_LIBS) \
-	$(GNOME_UI_LIBS) \
 	$(GRAPHVIZ_LIBS)
 
 
@@ -326,7 +338,7 @@
 
 .SUFFIXES:
 .SUFFIXES: .c .lo .o .obj
-$(srcdir)/Makefile.in: # $(srcdir)/Makefile.am  $(am__configure_deps)
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
 	@for dep in $?; do \
 	  case '$(am__configure_deps)' in \
 	    *$$dep*) \
@@ -351,9 +363,9 @@
 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 
-$(top_srcdir)/configure: # $(am__configure_deps)
+$(top_srcdir)/configure:  $(am__configure_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4): # $(am__aclocal_m4_deps)
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 install-pluginLTLIBRARIES: $(plugin_LTLIBRARIES)
 	@$(NORMAL_INSTALL)

Modified: trunk/plugins/class-inheritance/Makefile.am
==============================================================================
--- trunk/plugins/class-inheritance/Makefile.am	(original)
+++ trunk/plugins/class-inheritance/Makefile.am	Wed Apr  8 07:16:46 2009
@@ -40,7 +40,6 @@
 # Plugin dependencies
 libanjuta_class_inheritance_la_LIBADD = \
 	$(LIBANJUTA_LIBS) \
-	$(GNOME_UI_LIBS) \
 	$(GRAPHVIZ_LIBS)
 
 # Plugin sources

Modified: trunk/plugins/class-inheritance/Makefile.in
==============================================================================
--- trunk/plugins/class-inheritance/Makefile.in	(original)
+++ trunk/plugins/class-inheritance/Makefile.in	Wed Apr  8 07:16:46 2009
@@ -95,6 +95,8 @@
 AMDEP_FALSE = @AMDEP_FALSE@
 AMDEP_TRUE = @AMDEP_TRUE@
 AMTAR = @AMTAR@
+AM_CFLAGS = @AM_CFLAGS@
+AM_CXXFLAGS = @AM_CXXFLAGS@
 AR = @AR@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
@@ -108,6 +110,10 @@
 CFLAGS = @CFLAGS@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DATADIRNAME = @DATADIRNAME@
 DEFS = @DEFS@
@@ -134,6 +140,8 @@
 GREP = @GREP@
 HAVE_GRAPHVIZ_FALSE = @HAVE_GRAPHVIZ_FALSE@
 HAVE_GRAPHVIZ_TRUE = @HAVE_GRAPHVIZ_TRUE@
+HAVE_PLUGIN_SCINTILLA_FALSE = @HAVE_PLUGIN_SCINTILLA_FALSE@
+HAVE_PLUGIN_SCINTILLA_TRUE = @HAVE_PLUGIN_SCINTILLA_TRUE@
 HAVE_PLUGIN_VALGRIND_FALSE = @HAVE_PLUGIN_VALGRIND_FALSE@
 HAVE_PLUGIN_VALGRIND_TRUE = @HAVE_PLUGIN_VALGRIND_TRUE@
 INSTALL_DATA = @INSTALL_DATA@
@@ -210,11 +218,16 @@
 STRIP = @STRIP@
 USE_NLS = @USE_NLS@
 VERSION = @VERSION@
+WARN_CFLAGS = @WARN_CFLAGS@
+WARN_CXXFLAGS = @WARN_CXXFLAGS@
 XGETTEXT = @XGETTEXT@
 ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
 am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
@@ -302,7 +315,6 @@
 # Plugin dependencies
 @HAVE_GRAPHVIZ_TRUE libanjuta_class_inheritance_la_LIBADD = \
 @HAVE_GRAPHVIZ_TRUE@	$(LIBANJUTA_LIBS) \
- HAVE_GRAPHVIZ_TRUE@	$(GNOME_UI_LIBS) \
 @HAVE_GRAPHVIZ_TRUE@	$(GRAPHVIZ_LIBS)
 
 

Modified: trunk/plugins/sample1/Makefile
==============================================================================
--- trunk/plugins/sample1/Makefile	(original)
+++ trunk/plugins/sample1/Makefile	Wed Apr  8 07:16:46 2009
@@ -88,6 +88,8 @@
 AMDEP_FALSE = #
 AMDEP_TRUE = 
 AMTAR = ${SHELL} /home/jhs/devel/anjuta-extras/missing --run tar
+AM_CFLAGS =  -Wall -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wno-sign-compare 
+AM_CXXFLAGS =  -g -O2 -Wall -Wno-unused -Wshadow -Woverloaded-virtual 
 AR = ar
 AUTOCONF = ${SHELL} /home/jhs/devel/anjuta-extras/missing --run autoconf
 AUTOHEADER = ${SHELL} /home/jhs/devel/anjuta-extras/missing --run autoheader
@@ -101,6 +103,10 @@
 CFLAGS = -g -O2
 CPP = gcc -E
 CPPFLAGS = 
+CXX = g++
+CXXCPP = g++ -E
+CXXDEPMODE = depmode=gcc3
+CXXFLAGS = -g -O2
 CYGPATH_W = echo
 DATADIRNAME = share
 DEFS = -DHAVE_CONFIG_H
@@ -127,6 +133,8 @@
 GREP = /bin/grep
 HAVE_GRAPHVIZ_FALSE = #
 HAVE_GRAPHVIZ_TRUE = 
+HAVE_PLUGIN_SCINTILLA_FALSE = #
+HAVE_PLUGIN_SCINTILLA_TRUE = 
 HAVE_PLUGIN_VALGRIND_FALSE = #
 HAVE_PLUGIN_VALGRIND_TRUE = 
 INSTALL_DATA = ${INSTALL} -m 644
@@ -169,9 +177,9 @@
 LIPO = 
 LN_S = ln -s
 LTLIBOBJS = 
-MAINT = #
-MAINTAINER_MODE_FALSE = 
-MAINTAINER_MODE_TRUE = #
+MAINT = 
+MAINTAINER_MODE_FALSE = #
+MAINTAINER_MODE_TRUE = 
 MAKEINFO = ${SHELL} /home/jhs/devel/anjuta-extras/missing --run makeinfo
 MKINSTALLDIRS = ./mkinstalldirs
 MSGFMT = /usr/bin/msgfmt
@@ -203,11 +211,16 @@
 STRIP = strip
 USE_NLS = yes
 VERSION = 2.27.0
+WARN_CFLAGS = -Wall -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wno-sign-compare 
+WARN_CXXFLAGS = -g -O2 -Wall -Wno-unused -Wshadow -Woverloaded-virtual 
 XGETTEXT = /usr/bin/xgettext
 ac_ct_CC = gcc
+ac_ct_CXX = g++
 ac_ct_DUMPBIN = 
 am__fastdepCC_FALSE = #
 am__fastdepCC_TRUE = 
+am__fastdepCXX_FALSE = #
+am__fastdepCXX_TRUE = 
 am__include = include
 am__leading_dot = .
 am__quote = 
@@ -249,7 +262,7 @@
 mkdir_p = mkdir -p --
 oldincludedir = /usr/include
 pdfdir = ${docdir}
-prefix = /usr/local
+prefix = /usr
 program_transform_name = s,x,x,
 psdir = ${docdir}
 sbindir = ${exec_prefix}/sbin
@@ -315,7 +328,7 @@
 
 .SUFFIXES:
 .SUFFIXES: .c .lo .o .obj
-$(srcdir)/Makefile.in: # $(srcdir)/Makefile.am  $(am__configure_deps)
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
 	@for dep in $?; do \
 	  case '$(am__configure_deps)' in \
 	    *$$dep*) \
@@ -340,9 +353,9 @@
 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 
-$(top_srcdir)/configure: # $(am__configure_deps)
+$(top_srcdir)/configure:  $(am__configure_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4): # $(am__aclocal_m4_deps)
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 install-pluginLTLIBRARIES: $(plugin_LTLIBRARIES)
 	@$(NORMAL_INSTALL)

Modified: trunk/plugins/sample1/Makefile.in
==============================================================================
--- trunk/plugins/sample1/Makefile.in	(original)
+++ trunk/plugins/sample1/Makefile.in	Wed Apr  8 07:16:46 2009
@@ -88,6 +88,8 @@
 AMDEP_FALSE = @AMDEP_FALSE@
 AMDEP_TRUE = @AMDEP_TRUE@
 AMTAR = @AMTAR@
+AM_CFLAGS = @AM_CFLAGS@
+AM_CXXFLAGS = @AM_CXXFLAGS@
 AR = @AR@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
@@ -101,6 +103,10 @@
 CFLAGS = @CFLAGS@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DATADIRNAME = @DATADIRNAME@
 DEFS = @DEFS@
@@ -127,6 +133,8 @@
 GREP = @GREP@
 HAVE_GRAPHVIZ_FALSE = @HAVE_GRAPHVIZ_FALSE@
 HAVE_GRAPHVIZ_TRUE = @HAVE_GRAPHVIZ_TRUE@
+HAVE_PLUGIN_SCINTILLA_FALSE = @HAVE_PLUGIN_SCINTILLA_FALSE@
+HAVE_PLUGIN_SCINTILLA_TRUE = @HAVE_PLUGIN_SCINTILLA_TRUE@
 HAVE_PLUGIN_VALGRIND_FALSE = @HAVE_PLUGIN_VALGRIND_FALSE@
 HAVE_PLUGIN_VALGRIND_TRUE = @HAVE_PLUGIN_VALGRIND_TRUE@
 INSTALL_DATA = @INSTALL_DATA@
@@ -203,11 +211,16 @@
 STRIP = @STRIP@
 USE_NLS = @USE_NLS@
 VERSION = @VERSION@
+WARN_CFLAGS = @WARN_CFLAGS@
+WARN_CXXFLAGS = @WARN_CXXFLAGS@
 XGETTEXT = @XGETTEXT@
 ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
 am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@

Added: trunk/plugins/scintilla/anjuta-breakpoint-disabled-16.xpm
==============================================================================
--- (empty file)
+++ trunk/plugins/scintilla/anjuta-breakpoint-disabled-16.xpm	Wed Apr  8 07:16:46 2009
@@ -0,0 +1,42 @@
+/* XPM */
+static char *anjuta_breakpoint_disabled_16_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"16 16 20 1",
+"  c #5C3566",
+". c #684071",
+"X c #6A4473",
+"o c #6F4A78",
+"O c #633C6C",
+"+ c #643D6D",
+"@ c #E2BDE6",
+"# c #E6C3EA",
+"$ c #EBDAEF",
+"% c #ECCEF0",
+"& c #ECD8F0",
+"* c #F9DCFC",
+"= c #EEE1F2",
+"- c #FBE8FE",
+"; c #FCF1FF",
+": c #603869",
+"> c #613C6B",
+", c #633C6C",
+"< c #60396A",
+"1 c None",
+/* pixels */
+"1111111111111111",
+"11111+.   >11111",
+"1111+o=;;=o>1111",
+"111Oo=;;;;$o,111",
+"11,o=;;;;;;$o>11",
+"1,o=;;;;;;;-$oO1",
+"1 $;;;;;-;---% 1",
+"1 ;;;;;;-----* 1",
+"1 ;;;;-----*** 1",
+"1 $;;;----***# 1",
+"1:o$----****#X:1",
+"11>o&--****#X:11",
+"111,o&**** X<111",
+"1111Oo%**  <1111",
+"11111O    <11111",
+"1111111111111111"
+};

Added: trunk/plugins/scintilla/anjuta-editor-scintilla-plugin-48.png
==============================================================================
Binary file. No diff available.

Added: trunk/plugins/scintilla/anjuta-editor-scintilla-plugin.svg
==============================================================================
--- (empty file)
+++ trunk/plugins/scintilla/anjuta-editor-scintilla-plugin.svg	Wed Apr  8 07:16:46 2009
@@ -0,0 +1,918 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/";
+   xmlns:cc="http://web.resource.org/cc/";
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#";
+   xmlns:svg="http://www.w3.org/2000/svg";
+   xmlns="http://www.w3.org/2000/svg";
+   xmlns:xlink="http://www.w3.org/1999/xlink";
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd";
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape";
+   inkscape:export-ydpi="90.000000"
+   inkscape:export-xdpi="90.000000"
+   inkscape:export-filename="/home/maker/icons/anjuta-new/large/anjuta-editor-sv-48.png"
+   width="48px"
+   height="48px"
+   id="svg11300"
+   sodipodi:version="0.32"
+   inkscape:version="0.45.1"
+   sodipodi:docbase="/home/maker/icons/anjuta-new/large"
+   sodipodi:docname="anjuta-editor.svg"
+   inkscape:output_extension="org.inkscape.output.svg.inkscape">
+  <defs
+     id="defs3">
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient9952">
+      <stop
+         style="stop-color:#ffffff;stop-opacity:1;"
+         offset="0"
+         id="stop9954" />
+      <stop
+         style="stop-color:#ffffff;stop-opacity:0;"
+         offset="1"
+         id="stop9956" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient9920">
+      <stop
+         id="stop9922"
+         offset="0"
+         style="stop-color:#5b90c8;stop-opacity:1;" />
+      <stop
+         style="stop-color:#8fb0d1;stop-opacity:1;"
+         offset="0.31578946"
+         id="stop9924" />
+      <stop
+         id="stop9926"
+         offset="1"
+         style="stop-color:#34679d;stop-opacity:1;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient9910">
+      <stop
+         style="stop-color:#729fcf;stop-opacity:1;"
+         offset="0"
+         id="stop9912" />
+      <stop
+         id="stop9918"
+         offset="0.31578946"
+         style="stop-color:#a5bfda;stop-opacity:1;" />
+      <stop
+         style="stop-color:#376ca4;stop-opacity:1;"
+         offset="1"
+         id="stop9914" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient5060"
+       id="radialGradient6719"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-2.774389,0,0,1.969706,112.7623,-872.8854)"
+       cx="605.71429"
+       cy="486.64789"
+       fx="605.71429"
+       fy="486.64789"
+       r="117.14286" />
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient5060">
+      <stop
+         style="stop-color:black;stop-opacity:1;"
+         offset="0"
+         id="stop5062" />
+      <stop
+         style="stop-color:black;stop-opacity:0;"
+         offset="1"
+         id="stop5064" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient5060"
+       id="radialGradient6717"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.774389,0,0,1.969706,-1891.633,-872.8854)"
+       cx="605.71429"
+       cy="486.64789"
+       fx="605.71429"
+       fy="486.64789"
+       r="117.14286" />
+    <linearGradient
+       id="linearGradient5048">
+      <stop
+         style="stop-color:black;stop-opacity:0;"
+         offset="0"
+         id="stop5050" />
+      <stop
+         id="stop5056"
+         offset="0.5"
+         style="stop-color:black;stop-opacity:1;" />
+      <stop
+         style="stop-color:black;stop-opacity:0;"
+         offset="1"
+         id="stop5052" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient5048"
+       id="linearGradient6715"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.774389,0,0,1.969706,-1892.179,-872.8854)"
+       x1="302.85715"
+       y1="366.64789"
+       x2="302.85715"
+       y2="609.50507" />
+    <linearGradient
+       id="linearGradient2994">
+      <stop
+         style="stop-color:#000000;stop-opacity:1;"
+         offset="0"
+         id="stop2996" />
+      <stop
+         style="stop-color:#c9c9c9;stop-opacity:1;"
+         offset="1"
+         id="stop2998" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient2984">
+      <stop
+         style="stop-color:#e7e2b8;stop-opacity:1;"
+         offset="0"
+         id="stop2986" />
+      <stop
+         style="stop-color:#e7e2b8;stop-opacity:0;"
+         offset="1"
+         id="stop2988" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient2974">
+      <stop
+         style="stop-color:#c1c1c1;stop-opacity:1;"
+         offset="0"
+         id="stop2976" />
+      <stop
+         style="stop-color:#acacac;stop-opacity:1;"
+         offset="1"
+         id="stop2978" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient2966">
+      <stop
+         style="stop-color:#ffd1d1;stop-opacity:1;"
+         offset="0"
+         id="stop2968" />
+      <stop
+         id="stop3006"
+         offset="0.5"
+         style="stop-color:#ed0000;stop-opacity:1;" />
+      <stop
+         style="stop-color:#6f0000;stop-opacity:1;"
+         offset="1"
+         id="stop2970" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient2919">
+      <stop
+         style="stop-color:#a3a4a0;stop-opacity:1;"
+         offset="0"
+         id="stop2921" />
+      <stop
+         style="stop-color:#888a85;stop-opacity:1;"
+         offset="1"
+         id="stop2923" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient2873">
+      <stop
+         style="stop-color:#939393;stop-opacity:1;"
+         offset="0"
+         id="stop2875" />
+      <stop
+         style="stop-color:#424242;stop-opacity:1;"
+         offset="1"
+         id="stop2877" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient2865">
+      <stop
+         style="stop-color:#000000;stop-opacity:1;"
+         offset="0"
+         id="stop2867" />
+      <stop
+         style="stop-color:#000000;stop-opacity:0;"
+         offset="1"
+         id="stop2869" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient2855">
+      <stop
+         style="stop-color:#dfdfdf;stop-opacity:1;"
+         offset="0"
+         id="stop2857" />
+      <stop
+         style="stop-color:#ffffff;stop-opacity:1;"
+         offset="1"
+         id="stop2859" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2855"
+       id="linearGradient2861"
+       x1="21.043484"
+       y1="42.83337"
+       x2="14.283642"
+       y2="6.8333683"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.137871,0.000000,0.000000,1.000000,-2.660884,0.000000)" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2865"
+       id="radialGradient2871"
+       cx="23.5625"
+       cy="40.4375"
+       fx="23.5625"
+       fy="40.4375"
+       r="19.5625"
+       gradientTransform="matrix(1.000000,0.000000,0.000000,0.348243,0.000000,26.35543)"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2873"
+       id="linearGradient2879"
+       x1="26.612417"
+       y1="28.083368"
+       x2="26.228401"
+       y2="42.83337"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2919"
+       id="linearGradient2925"
+       x1="6"
+       y1="7.5624999"
+       x2="40.984375"
+       y2="7.5624999"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2994"
+       id="linearGradient3099"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.9350973,-0.7803718,0.6399444,0.9162263,-14.83735,24.867306)"
+       x1="25.71875"
+       y1="31.046875"
+       x2="25.514589"
+       y2="30.703125" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2984"
+       id="radialGradient3102"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.7338179,-2.2814675,1.298906,1.8596802,-84.874429,42.694512)"
+       cx="29.053354"
+       cy="27.640751"
+       fx="29.053354"
+       fy="27.640751"
+       r="3.2408544" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2974"
+       id="linearGradient3105"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.9350973,-0.7803718,0.6399444,0.9162263,-14.771234,24.630845)"
+       x1="46"
+       y1="19.8125"
+       x2="47.6875"
+       y2="22.625" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2966"
+       id="linearGradient3108"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.9350973,-0.7803718,0.6399444,0.9162263,-14.771234,24.630845)"
+       x1="49.18"
+       y1="18.700779"
+       x2="50.988335"
+       y2="22.250591" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2966"
+       id="linearGradient3110"
+       gradientUnits="userSpaceOnUse"
+       x1="39.171936"
+       y1="5.9010835"
+       x2="46.882192"
+       y2="5.9010835" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient9952"
+       id="linearGradient3123"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.4908441,-0.8400511,0.1771463,-1.2253689,21.073068,133.40674)"
+       x1="40.99242"
+       y1="70.908195"
+       x2="29.608442"
+       y2="78.567963" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2966"
+       id="linearGradient3126"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.4908441,-0.8400511,0.1771463,-1.2253689,20.860984,133.26874)"
+       x1="28.244684"
+       y1="60.445503"
+       x2="28.244684"
+       y2="68.224884" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2966"
+       id="linearGradient3129"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.4908441,-0.8400511,0.1771463,-1.2253689,20.860984,133.26874)"
+       x1="46.424732"
+       y1="72.362595"
+       x2="45.221565"
+       y2="55.617294" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2966"
+       id="linearGradient3132"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.4908441,-0.8400511,0.1771463,-1.2253689,20.860984,133.26874)"
+       x1="31.459106"
+       y1="72.880302"
+       x2="28.27574"
+       y2="55.962383" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2966"
+       id="linearGradient13937"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.4908441,-0.8400511,0.1771463,-1.2253689,20.860984,133.26874)"
+       x1="31.459106"
+       y1="72.880302"
+       x2="28.27574"
+       y2="55.962383" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2966"
+       id="linearGradient13939"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.4908441,-0.8400511,0.1771463,-1.2253689,20.860984,133.26874)"
+       x1="46.424732"
+       y1="72.362595"
+       x2="45.221565"
+       y2="55.617294" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2966"
+       id="linearGradient13941"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.4908441,-0.8400511,0.1771463,-1.2253689,20.860984,133.26874)"
+       x1="28.244684"
+       y1="60.445503"
+       x2="28.244684"
+       y2="68.224884" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient9952"
+       id="linearGradient13943"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.4908441,-0.8400511,0.1771463,-1.2253689,21.073068,133.40674)"
+       x1="40.99242"
+       y1="70.908195"
+       x2="29.608442"
+       y2="78.567963" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient9952"
+       id="linearGradient13946"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.7049771,-0.8400511,-0.135206,-1.2253689,78.357962,134.2722)"
+       x1="40.99242"
+       y1="70.908195"
+       x2="29.608442"
+       y2="78.567963" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2966"
+       id="linearGradient13949"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.7049771,-0.8400511,-0.135206,-1.2253689,31.070043,134.43495)"
+       x1="28.244684"
+       y1="60.445503"
+       x2="28.244684"
+       y2="68.224884" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2966"
+       id="linearGradient13952"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.7049771,-0.8400511,-0.135206,-1.2253689,28.046766,130.12683)"
+       x1="46.424732"
+       y1="72.362595"
+       x2="45.221565"
+       y2="55.617294" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2966"
+       id="linearGradient13955"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.7049771,-0.8400511,-0.135206,-1.2253689,30.418846,132.44496)"
+       x1="31.459106"
+       y1="72.880302"
+       x2="28.27574"
+       y2="55.962383" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2966"
+       id="linearGradient13977"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.7049771,-0.8400511,-0.135206,-1.2253689,30.418846,132.44496)"
+       x1="31.459106"
+       y1="72.880302"
+       x2="28.27574"
+       y2="55.962383" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2966"
+       id="linearGradient13979"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.7049771,-0.8400511,-0.135206,-1.2253689,28.046766,130.12683)"
+       x1="46.424732"
+       y1="72.362595"
+       x2="45.221565"
+       y2="55.617294" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2966"
+       id="linearGradient13981"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.7049771,-0.8400511,-0.135206,-1.2253689,31.070043,134.43495)"
+       x1="28.244684"
+       y1="60.445503"
+       x2="28.244684"
+       y2="68.224884" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient9952"
+       id="linearGradient13983"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.7049771,-0.8400511,-0.135206,-1.2253689,78.357962,134.2722)"
+       x1="40.99242"
+       y1="70.908195"
+       x2="29.608442"
+       y2="78.567963" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2966"
+       id="linearGradient13993"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.7049771,-0.8400511,-0.135206,-1.2253689,30.418846,132.44496)"
+       x1="31.459106"
+       y1="72.880302"
+       x2="28.27574"
+       y2="55.962383" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2966"
+       id="linearGradient13995"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.7049771,-0.8400511,-0.135206,-1.2253689,28.046766,130.12683)"
+       x1="46.424732"
+       y1="72.362595"
+       x2="45.221565"
+       y2="55.617294" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2966"
+       id="linearGradient13997"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.7049771,-0.8400511,-0.135206,-1.2253689,31.070043,134.43495)"
+       x1="28.244684"
+       y1="60.445503"
+       x2="28.244684"
+       y2="68.224884" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient9952"
+       id="linearGradient13999"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.7049771,-0.8400511,-0.135206,-1.2253689,78.357962,134.2722)"
+       x1="40.99242"
+       y1="70.908195"
+       x2="29.608442"
+       y2="78.567963" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient9952"
+       id="linearGradient14002"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.7049771,-0.8400511,-0.135206,-1.2253689,-9.392038,138.2722)"
+       x1="40.99242"
+       y1="70.908195"
+       x2="29.608442"
+       y2="78.567963" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2966"
+       id="linearGradient14005"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.7049771,-0.8400511,-0.135206,-1.2253689,-10.679957,138.43495)"
+       x1="28.244684"
+       y1="60.445503"
+       x2="28.244684"
+       y2="68.224884" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2966"
+       id="linearGradient14008"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.7049771,-0.8400511,-0.135206,-1.2253689,-13.703234,134.12683)"
+       x1="46.424732"
+       y1="72.362595"
+       x2="45.221565"
+       y2="55.617294" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2966"
+       id="linearGradient14011"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.7049771,-0.8400511,-0.135206,-1.2253689,-11.331154,136.44496)"
+       x1="31.459106"
+       y1="72.880302"
+       x2="28.27574"
+       y2="55.962383" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient9952"
+       id="linearGradient2282"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.4163566,-0.9271237,0.2594146,-1.1772274,12.602172,133.73124)"
+       x1="40.99242"
+       y1="70.908195"
+       x2="29.608442"
+       y2="78.567963" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2966"
+       id="linearGradient2285"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.3460016,-0.9556119,0.346551,-1.1545833,1.7990225,133.77868)"
+       x1="60.782894"
+       y1="61.446815"
+       x2="56.942043"
+       y2="68.922714" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2966"
+       id="linearGradient2288"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.445546,-0.9373536,0.2473168,-1.2043943,11.978609,131.29123)"
+       x1="46.424732"
+       y1="72.362595"
+       x2="45.221565"
+       y2="55.617294" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2966"
+       id="linearGradient2291"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.4531522,-0.9097056,0.2120608,-1.186672,16.080073,131.55826)"
+       x1="31.459106"
+       y1="72.880302"
+       x2="28.27574"
+       y2="55.962383" />
+  </defs>
+  <sodipodi:namedview
+     stroke="#c4a000"
+     fill="#edd400"
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="0.77254902"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="1"
+     inkscape:cx="12.549218"
+     inkscape:cy="36.105926"
+     inkscape:current-layer="layer3"
+     showgrid="true"
+     inkscape:grid-bbox="true"
+     inkscape:document-units="px"
+     inkscape:showpageshadow="false"
+     inkscape:window-width="1218"
+     inkscape:window-height="874"
+     inkscape:window-x="52"
+     inkscape:window-y="233"
+     borderlayer="true"
+     showguides="true"
+     inkscape:guide-bbox="true" />
+  <metadata
+     id="metadata4">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage"; />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title>Jakub Steiner</dc:title>
+          </cc:Agent>
+        </dc:creator>
+        <dc:source>http://jimmac.musichall.cz</dc:source>
+        <cc:license
+           rdf:resource="http://creativecommons.org/licenses/by-sa/2.0/"; />
+        <dc:title>Text Editor</dc:title>
+      </cc:Work>
+      <cc:License
+         rdf:about="http://creativecommons.org/licenses/by-sa/2.0/";>
+        <cc:permits
+           rdf:resource="http://web.resource.org/cc/Reproduction"; />
+        <cc:permits
+           rdf:resource="http://web.resource.org/cc/Distribution"; />
+        <cc:requires
+           rdf:resource="http://web.resource.org/cc/Notice"; />
+        <cc:requires
+           rdf:resource="http://web.resource.org/cc/Attribution"; />
+        <cc:permits
+           rdf:resource="http://web.resource.org/cc/DerivativeWorks"; />
+        <cc:requires
+           rdf:resource="http://web.resource.org/cc/ShareAlike"; />
+      </cc:License>
+    </rdf:RDF>
+  </metadata>
+  <g
+     id="layer1"
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer">
+    <g
+       transform="matrix(2.417561e-2,0,0,2.086758e-2,45.12765,40.1536)"
+       id="g6707">
+      <rect
+         style="opacity:0.40206185;color:black;fill:url(#linearGradient6715);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+         id="rect6709"
+         width="1339.6335"
+         height="478.35718"
+         x="-1559.2523"
+         y="-150.69685" />
+      <path
+         style="opacity:0.40206185;color:black;fill:url(#radialGradient6717);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+         d="M -219.61876,-150.68038 C -219.61876,-150.68038 -219.61876,327.65041 -219.61876,327.65041 C -76.744594,328.55086 125.78146,220.48075 125.78138,88.454235 C 125.78138,-43.572302 -33.655436,-150.68036 -219.61876,-150.68038 z "
+         id="path6711"
+         sodipodi:nodetypes="cccc" />
+      <path
+         sodipodi:nodetypes="cccc"
+         id="path6713"
+         d="M -1559.2523,-150.68038 C -1559.2523,-150.68038 -1559.2523,327.65041 -1559.2523,327.65041 C -1702.1265,328.55086 -1904.6525,220.48075 -1904.6525,88.454235 C -1904.6525,-43.572302 -1745.2157,-150.68036 -1559.2523,-150.68038 z "
+         style="opacity:0.40206185;color:black;fill:url(#radialGradient6719);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+    </g>
+    <path
+       style="color:#000000;fill:url(#linearGradient2861);fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient2879);stroke-width:0.99999982;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+       d="M 7.1638699,4.5063726 L 39.813122,4.5063726 C 40.575699,4.5063726 41.189615,5.0388241 41.189615,5.7002099 C 41.189615,5.7002099 43.590945,39.868907 43.590945,39.868907 C 43.590945,39.868907 43.603403,42.216529 43.603403,42.216529 C 43.603403,42.877915 42.989488,43.410366 42.226911,43.410366 L 4.750081,43.410366 C 3.9875042,43.410366 3.3735887,42.877915 3.3735887,42.216529 L 3.3624173,40.049613 L 5.7873775,5.7002099 C 5.7873775,5.0388241 6.4012931,4.5063726 7.1638699,4.5063726 z "
+       id="rect1975"
+       sodipodi:nodetypes="ccccccccccc" />
+    <rect
+       style="opacity:1;color:#000000;fill:#a4a4a4;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+       id="rect2851"
+       width="39.048077"
+       height="3.0714951"
+       x="3.9770372"
+       y="39.868271"
+       rx="0.67937863"
+       ry="0.67937863" />
+    <path
+       style="opacity:1;color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+       d="M 3.9267507,40.442796 C 3.9267507,40.442796 4.0776125,39.912466 4.6307727,39.868272 L 42.195375,39.868272 C 42.949684,39.868272 42.999971,40.619573 42.999971,40.619573 C 42.999971,40.619573 43.02357,39 41.7161,39 L 5.3042159,39 C 4.2984702,39.088388 3.9267507,39.779883 3.9267507,40.442796 z "
+       id="path2853"
+       sodipodi:nodetypes="ccccccc" />
+    <path
+       style="opacity:1;color:#000000;fill:url(#linearGradient2925);fill-opacity:1.0;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+       d="M 6.25,5.7343749 L 6,10.125 C 6,10.125 6.3125,8.9999999 7,8.9999999 L 40.125,8.9999999 C 40.828125,8.9843749 40.859375,9.3124999 40.984375,9.8281249 C 40.984375,9.8281249 40.734375,5.9531249 40.734375,5.9531249 C 40.703125,5.4062499 40.515625,4.9999999 39.953125,4.9999999 L 7.0625,4.9999999 C 6.609375,4.9999999 6.296875,5.3437499 6.25,5.7343749 z "
+       id="path2915"
+       sodipodi:nodetypes="ccccccccc" />
+    <path
+       sodipodi:nodetypes="ccccccccccc"
+       id="path2917"
+       d="M 7.8126474,5.5404503 L 38.944983,5.5404503 C 39.66702,5.5404503 40.2483,5.3883462 40.2483,6.014572 C 40.2483,6.014572 42.521973,39.023077 42.521973,39.023077 C 42.521973,39.023077 42.622156,41.732033 42.622156,41.732033 C 42.622156,42.358259 42.48282,42.376269 41.760782,42.376269 L 4.8620444,42.376269 C 4.4493662,42.376269 4.4426114,42.269871 4.4426114,41.864615 L 4.4320338,39.194177 L 6.7280807,6.045822 C 6.7280807,5.4195962 7.09061,5.5404503 7.8126474,5.5404503 z "
+       style="color:#000000;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:0.99999946;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;opacity:0.43859649" />
+    <g
+       id="g3053"
+       transform="translate(2,0)">
+      <rect
+         ry="1"
+         rx="1"
+         y="2.5"
+         x="8.5"
+         height="5"
+         width="2"
+         id="rect2899"
+         style="color:#000000;fill:#fce94f;fill-opacity:1;fill-rule:evenodd;stroke:#886f00;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+      <rect
+         ry="1"
+         rx="1"
+         y="2.5"
+         x="14.5"
+         height="5"
+         width="2"
+         id="rect2903"
+         style="color:#000000;fill:#fce94f;fill-opacity:1;fill-rule:evenodd;stroke:#886f00;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+      <rect
+         ry="1"
+         rx="1"
+         y="2.5"
+         x="20.5"
+         height="5"
+         width="2"
+         id="rect2907"
+         style="color:#000000;fill:#fce94f;fill-opacity:1;fill-rule:evenodd;stroke:#886f00;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+      <rect
+         ry="1"
+         rx="1"
+         y="2.5"
+         x="26.5"
+         height="5"
+         width="2"
+         id="rect2911"
+         style="color:#000000;fill:#fce94f;fill-opacity:1;fill-rule:evenodd;stroke:#886f00;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+      <rect
+         style="color:#000000;fill:#fce94f;fill-opacity:1;fill-rule:evenodd;stroke:#886f00;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+         id="rect2913"
+         width="2"
+         height="5"
+         x="32.5"
+         y="2.5"
+         rx="1"
+         ry="1" />
+    </g>
+    <g
+       id="g2941">
+      <rect
+         y="12"
+         x="9"
+         height="1"
+         width="29"
+         id="rect2927"
+         style="opacity:0.28070175;color:#000000;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+      <rect
+         style="opacity:0.28070176;color:#000000;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+         id="rect2929"
+         width="29"
+         height="1"
+         x="9"
+         y="14.981792" />
+      <rect
+         y="18.003939"
+         x="9"
+         height="1"
+         width="13"
+         id="rect2931"
+         style="opacity:0.28070176;color:#000000;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+      <rect
+         style="opacity:0.28070176;color:#000000;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+         id="rect2933"
+         width="29"
+         height="1"
+         x="9"
+         y="22.985731" />
+      <rect
+         y="26.007877"
+         x="9"
+         height="1"
+         width="29"
+         id="rect2935"
+         style="opacity:0.28070176;color:#000000;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+      <rect
+         style="opacity:0.28070176;color:#000000;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+         id="rect2937"
+         width="29"
+         height="1"
+         x="9"
+         y="29.030024" />
+      <rect
+         y="32.05217"
+         x="9"
+         height="1"
+         width="8"
+         id="rect2939"
+         style="opacity:0.28070176;color:#000000;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+    </g>
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer3"
+     inkscape:label="tools">
+    <g
+       id="g3113">
+      <path
+         sodipodi:nodetypes="cccccc"
+         id="path2960"
+         d="M 27.54397,36.451494 L 29.204206,26.90813 L 41.75436,2.2943294 C 43.993495,-1.3871613 48.764989,1.3384144 47.116494,5.0708515 L 34.384806,29.292294 L 27.54397,36.451494 z "
+         style="color:#000000;fill:#cb9022;fill-opacity:1;fill-rule:evenodd;stroke:#5c410c;stroke-width:1.00000012;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+      <path
+         style="color:#000000;fill:url(#linearGradient3108);fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient3110);stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+         d="M 39.609436,8.3065151 C 39.609436,8.3065151 40.201133,7.0831267 41.527056,7.7894508 C 42.893034,8.5171115 43.476908,9.598177 43.476908,9.598177 L 46.351754,4.6599974 C 46.351754,4.6599974 47.139444,2.4612239 45.02057,1.6673606 C 42.922939,0.88145628 42.20506,3.5177232 42.20506,3.5177232 L 39.609436,8.3065151 z "
+         id="path2964"
+         sodipodi:nodetypes="czcczcc" />
+      <path
+         sodipodi:nodetypes="czcczcc"
+         id="path2962"
+         d="M 38.859436,8.6815151 C 38.859436,8.6815151 40.451133,7.7081267 41.777056,8.4144508 C 43.143034,9.1421115 43.476908,10.848177 43.476908,10.848177 L 44.832159,8.2462072 C 44.832159,8.2462072 44.761512,6.3924337 43.316861,5.613143 C 41.832503,4.8124313 40.152186,6.2045451 40.152186,6.2045451 L 38.859436,8.6815151 z "
+         style="color:#000000;fill:url(#linearGradient3105);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+      <path
+         sodipodi:nodetypes="cccc"
+         id="path2982"
+         d="M 28.41844,34.679329 L 29.746628,27.044638 C 31.669229,26.618514 33.259699,27.240027 33.879728,28.988657 L 28.41844,34.679329 z "
+         style="color:#000000;fill:url(#radialGradient3102);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+      <path
+         sodipodi:nodetypes="cccc"
+         id="path2992"
+         d="M 28.775055,32.342262 L 28.275433,35.070601 L 30.267085,32.955284 C 30.011678,32.12604 29.411813,32.128113 28.775055,32.342262 z "
+         style="color:#000000;fill:url(#linearGradient3099);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+      <path
+         sodipodi:nodetypes="ccccc"
+         id="path3002"
+         d="M 29.726629,27.016006 L 31.98765,26.941957 L 41.692769,8.2285543 C 40.72936,7.7910464 39.837514,8.2038572 39.169141,8.6490017 L 29.726629,27.016006 z "
+         style="color:#000000;fill:#ffffff;fill-opacity:0.36363639;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+      <path
+         sodipodi:nodetypes="ccccc"
+         id="path3004"
+         d="M 33.919725,29.045922 L 33.615097,28.212432 L 43.295102,9.794192 C 43.295102,9.794192 43.584778,10.44238 43.572776,10.649232 L 33.919725,29.045922 z "
+         style="color:#000000;fill:#000000;fill-opacity:0.36363639;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+    </g>
+    <path
+       style="color:#000000;fill:#e7e7e7;fill-opacity:1;fill-rule:evenodd;stroke:#7d7d7d;stroke-width:0.99999964;stroke-linecap:butt;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+       d="M 23.70574,41.086295 C 24.935571,44.854194 25.298675,45.883418 25.244777,47.5 C 23.740306,46.5525 22.662588,44.671541 21.308513,42.303786 C 18.984225,38.239514 22.265839,36.674803 23.70574,41.086295 z "
+       id="path9903"
+       sodipodi:nodetypes="ccss"
+       inkscape:r_cx="true"
+       inkscape:r_cy="true" />
+    <path
+       sodipodi:type="arc"
+       style="color:#000000;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#cc0000;stroke-width:1.27585137;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+       id="path9905"
+       sodipodi:cx="40.1875"
+       sodipodi:cy="62"
+       sodipodi:rx="13.0625"
+       sodipodi:ry="5.5"
+       d="M 32.085889,57.685642 A 13.0625,5.5 0 0 1 52.298721,59.939541"
+       inkscape:r_cx="true"
+       inkscape:r_cy="true"
+       sodipodi:start="4.0433671"
+       sodipodi:end="5.8991888"
+       sodipodi:open="true"
+       transform="matrix(-0.3884217,-0.9386901,0.240548,-1.0002724,7.3679104,111.31056)" />
+    <path
+       sodipodi:type="arc"
+       style="color:#000000;fill:#ef2929;fill-opacity:1;fill-rule:evenodd;stroke:#cc0000;stroke-width:1.27585137;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+       id="path9907"
+       sodipodi:cx="33.5"
+       sodipodi:cy="54.9375"
+       sodipodi:rx="3"
+       sodipodi:ry="1.5625"
+       d="M 36.364517,54.473244 A 3,1.5625 0 0 1 30.693831,55.490029 L 33.5,54.9375 z"
+       inkscape:r_cx="true"
+       inkscape:r_cy="true"
+       sodipodi:start="5.9815064"
+       sodipodi:end="9.0633414"
+       transform="matrix(-0.4627395,-0.9043687,0.1592298,-1.0163926,14.664555,108.65819)"
+       inkscape:transform-center-x="-1.4142136"
+       inkscape:transform-center-y="0.88388348" />
+    <path
+       style="color:#000000;fill:url(#linearGradient2291);fill-opacity:1;fill-rule:evenodd;stroke:#cc0000;stroke-width:0.99999964;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+       d="M 20.840421,41.69719 L 23.385472,39.755438 C 21.954799,34.370827 17.954837,25.682117 14.89943,19.548371 C 8.8956053,10.439777 5.2261261,15.072842 11.493033,25.272071 C 12.415653,26.984466 16.492075,35.219402 20.840421,41.69719 z "
+       id="path9898"
+       inkscape:r_cx="true"
+       inkscape:r_cy="true"
+       sodipodi:nodetypes="ccccc" />
+    <path
+       style="color:#000000;fill:url(#linearGradient2288);fill-opacity:1;fill-rule:evenodd;stroke:#cc0000;stroke-width:0.99999964;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+       d="M 9.5920531,22.024134 L 14.516168,18.505059 C 12.17428,13.314494 7.5243564,5.0372727 6.388682,3.6621591 L 2.4999998,6.5858329 C 4.7434066,12.303003 7.7292848,17.814211 9.5920531,22.024134 z "
+       id="path9893"
+       inkscape:r_cx="true"
+       inkscape:r_cy="true"
+       sodipodi:nodetypes="ccccc" />
+    <path
+       style="color:#000000;fill:url(#linearGradient2285);fill-opacity:1;fill-rule:evenodd;stroke:#cc0000;stroke-width:0.99999964;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+       d="M 2.6444834,6.5000002 L 6.6149289,3.8038628 C 3.9571618,-1.2976364 -0.6524531,-1.2201534 2.6444834,6.5000002 z "
+       id="path9888"
+       inkscape:r_cx="true"
+       inkscape:r_cy="true"
+       sodipodi:nodetypes="ccc" />
+    <path
+       inkscape:r_cy="true"
+       inkscape:r_cx="true"
+       style="opacity:0.35714285;color:#000000;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient2282);stroke-width:1.00000012;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+       d="M 10.017501,20.268633 L 13.172171,18.189491 C 2.320959,-4.9647558 -2.3380138,-3.7887424 10.017501,20.268633 z "
+       id="path9930"
+       sodipodi:nodetypes="ccc" />
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer4"
+     inkscape:label="temp" />
+</svg>

Added: trunk/plugins/scintilla/anjuta-editor-scintilla.glade
==============================================================================
--- (empty file)
+++ trunk/plugins/scintilla/anjuta-editor-scintilla.glade	Wed Apr  8 07:16:46 2009
@@ -0,0 +1,1601 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
+<!--*- mode: xml -*-->
+<glade-interface>
+  <widget class="GtkWindow" id="preferences_dialog">
+    <property name="title" translatable="yes">window1</property>
+    <child>
+      <widget class="GtkNotebook" id="Editor">
+        <property name="visible">True</property>
+        <property name="can_focus">True</property>
+        <child>
+          <widget class="GtkHBox" id="page1">
+            <property name="visible">True</property>
+            <property name="border_width">5</property>
+            <property name="spacing">5</property>
+            <child>
+              <widget class="GtkVBox" id="vbox31">
+                <property name="visible">True</property>
+                <property name="spacing">5</property>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <widget class="GtkFrame" id="frame45">
+                    <property name="visible">True</property>
+                    <property name="label_xalign">0</property>
+                    <property name="shadow_type">GTK_SHADOW_NONE</property>
+                    <child>
+                      <widget class="GtkVBox" id="vbox1118">
+                        <property name="visible">True</property>
+                        <property name="border_width">5</property>
+                        <property name="spacing">5</property>
+                        <child>
+                          <widget class="GtkCheckButton" id="preferences_toggle:bool:0:0:autocomplete.choose.single">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="label" translatable="yes">Choose autocomplete for single match</property>
+                            <property name="use_underline">True</property>
+                            <property name="response_id">0</property>
+                            <property name="draw_indicator">True</property>
+                          </widget>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="GtkCheckButton" id="preferences_toggle:bool:1:0:xml.auto.close.tags">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="label" translatable="yes">Autocomplete XML/HTML closing tags</property>
+                            <property name="use_underline">True</property>
+                            <property name="response_id">0</property>
+                            <property name="draw_indicator">True</property>
+                          </widget>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="GtkHBox" id="hbox1122">
+                            <property name="visible">True</property>
+                            <property name="spacing">5</property>
+                            <child>
+                              <widget class="GtkSpinButton" id="preferences_spin:int:3:0:autocompleteword.automatic">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="adjustment">3 0 50 1 10 0</property>
+                                <property name="climb_rate">1</property>
+                                <property name="numeric">True</property>
+                              </widget>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkLabel" id="label1295">
+                                <property name="visible">True</property>
+                                <property name="xalign">0</property>
+                                <property name="label" translatable="yes">Autocompletion pop up choices</property>
+                              </widget>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                          </widget>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="position">2</property>
+                          </packing>
+                        </child>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkLabel" id="label12334">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">&lt;b&gt;Autocompletion&lt;/b&gt;</property>
+                        <property name="use_markup">True</property>
+                      </widget>
+                      <packing>
+                        <property name="type">label_item</property>
+                      </packing>
+                    </child>
+                  </widget>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkFrame" id="frame44">
+                    <property name="visible">True</property>
+                    <property name="label_xalign">0</property>
+                    <property name="shadow_type">GTK_SHADOW_NONE</property>
+                    <child>
+                      <widget class="GtkVBox" id="vbox40">
+                        <property name="visible">True</property>
+                        <property name="border_width">5</property>
+                        <property name="spacing">5</property>
+                        <child>
+                          <widget class="GtkCheckButton" id="preferences_toggle:bool:1:0:fold">
+                            <property name="can_focus">True</property>
+                            <property name="label" translatable="yes">Enable code folding</property>
+                            <property name="use_underline">True</property>
+                            <property name="response_id">0</property>
+                            <property name="draw_indicator">True</property>
+                          </widget>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="GtkCheckButton" id="preferences_toggle:bool:1:0:fold.comment">
+                            <property name="can_focus">True</property>
+                            <property name="label" translatable="yes">Enable comments folding</property>
+                            <property name="use_underline">True</property>
+                            <property name="response_id">0</property>
+                            <property name="draw_indicator">True</property>
+                          </widget>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="GtkCheckButton" id="preferences_toggle:bool:1:0:fold.comment.python">
+                            <property name="can_focus">True</property>
+                            <property name="label" translatable="yes">Enable python comments folding</property>
+                            <property name="use_underline">True</property>
+                            <property name="response_id">0</property>
+                            <property name="draw_indicator">True</property>
+                          </widget>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">2</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="GtkCheckButton" id="preferences_toggle:bool:1:0:fold.quotes.python">
+                            <property name="can_focus">True</property>
+                            <property name="label" translatable="yes">Enable python quoted strings folding</property>
+                            <property name="use_underline">True</property>
+                            <property name="response_id">0</property>
+                            <property name="draw_indicator">True</property>
+                          </widget>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">3</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="GtkCheckButton" id="preferences_toggle:bool:1:0:fold.html">
+                            <property name="can_focus">True</property>
+                            <property name="label" translatable="yes">Enable HTML tags folding</property>
+                            <property name="use_underline">True</property>
+                            <property name="response_id">0</property>
+                            <property name="draw_indicator">True</property>
+                          </widget>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">4</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="GtkCheckButton" id="preferences_toggle:bool:1:0:fold.compact">
+                            <property name="can_focus">True</property>
+                            <property name="label" translatable="yes">Compact folding</property>
+                            <property name="use_underline">True</property>
+                            <property name="response_id">0</property>
+                            <property name="draw_indicator">True</property>
+                          </widget>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">5</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="GtkCheckButton" id="preferences_toggle:bool:1:0:fold.underline">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="label" translatable="yes">Draw line below folded lines</property>
+                            <property name="use_underline">True</property>
+                            <property name="response_id">0</property>
+                            <property name="draw_indicator">True</property>
+                          </widget>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">6</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="GtkCheckButton" id="preferences_toggle:bool:0:0:fold.on.open">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="label" translatable="yes">Collapse all code folds on file open</property>
+                            <property name="use_underline">True</property>
+                            <property name="response_id">0</property>
+                            <property name="draw_indicator">True</property>
+                          </widget>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">7</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="GtkHBox" id="hbox1112">
+                            <property name="visible">True</property>
+                            <child>
+                              <widget class="GtkLabel" id="label12325">
+                                <property name="visible">True</property>
+                                <property name="label" translatable="yes">Fold style:</property>
+                              </widget>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkComboBox" id="preferences_combo:text:Plus/Minus,Arrows,Circular,Squares:0:fold.symbols">
+                                <property name="visible">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="items" translatable="yes">Plus/Minus
+Arrows
+Circular
+Squares</property>
+                              </widget>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                          </widget>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">8</property>
+                          </packing>
+                        </child>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkLabel" id="label1297">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">&lt;b&gt;Code folding&lt;/b&gt;</property>
+                        <property name="use_markup">True</property>
+                      </widget>
+                      <packing>
+                        <property name="type">label_item</property>
+                      </packing>
+                    </child>
+                  </widget>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="position">2</property>
+                  </packing>
+                </child>
+              </widget>
+              <packing>
+                <property name="expand">False</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkVBox" id="vbox32">
+                <property name="visible">True</property>
+                <property name="spacing">5</property>
+                <child>
+                  <widget class="GtkFrame" id="frame47">
+                    <property name="visible">True</property>
+                    <property name="label_xalign">0</property>
+                    <property name="shadow_type">GTK_SHADOW_NONE</property>
+                    <child>
+                      <widget class="GtkVBox" id="vbox1120">
+                        <property name="visible">True</property>
+                        <property name="border_width">5</property>
+                        <property name="spacing">5</property>
+                        <child>
+                          <widget class="GtkCheckButton" id="preferences_toggle:bool:0:0:disable.syntax.hilighting">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="label" translatable="yes">Disable syntax highlighting</property>
+                            <property name="use_underline">True</property>
+                            <property name="response_id">0</property>
+                            <property name="draw_indicator">True</property>
+                          </widget>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="GtkCheckButton" id="preferences_toggle:bool:1:0:braces.check">
+                            <property name="can_focus">True</property>
+                            <property name="label" translatable="yes">Enable braces check</property>
+                            <property name="use_underline">True</property>
+                            <property name="response_id">0</property>
+                            <property name="draw_indicator">True</property>
+                          </widget>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="GtkCheckButton" id="preferences_toggle:bool:0:0:strip.trailing.spaces">
+                            <property name="can_focus">True</property>
+                            <property name="label" translatable="yes">Strip trailling spaces on file save</property>
+                            <property name="use_underline">True</property>
+                            <property name="response_id">0</property>
+                            <property name="draw_indicator">True</property>
+                          </widget>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">2</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="GtkCheckButton" id="preferences_toggle:bool:0:0:editor.doseol">
+                            <property name="can_focus">True</property>
+                            <property name="label" translatable="yes">Filter extraneous characters in DOS mode</property>
+                            <property name="use_underline">True</property>
+                            <property name="response_id">0</property>
+                            <property name="draw_indicator">True</property>
+                          </widget>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">3</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="GtkCheckButton" id="preferences_toggle:bool:1:0:editor.wrapbookmarks">
+                            <property name="can_focus">True</property>
+                            <property name="label" translatable="yes" comments="Next bookmark at the end of the file will jump to the first bookmark from the beginning">Wrap bookmarks search around</property>
+                            <property name="use_underline">True</property>
+                            <property name="response_id">0</property>
+                            <property name="draw_indicator">True</property>
+                          </widget>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">4</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="GtkTable" id="table14">
+                            <property name="visible">True</property>
+                            <property name="n_rows">4</property>
+                            <property name="n_columns">2</property>
+                            <property name="column_spacing">5</property>
+                            <property name="row_spacing">5</property>
+                            <child>
+                              <widget class="GtkSpinButton" id="preferences_spin:int:80:0:edge.column">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="adjustment">80 0 500 1 10 0</property>
+                                <property name="climb_rate">1</property>
+                              </widget>
+                              <packing>
+                                <property name="top_attach">3</property>
+                                <property name="bottom_attach">4</property>
+                                <property name="x_options">GTK_FILL</property>
+                                <property name="y_options"></property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkSpinButton" id="preferences_spin:int:350:0:caret.period">
+                                <property name="can_focus">True</property>
+                                <property name="adjustment">212 100 10000 10 10 0</property>
+                                <property name="climb_rate">10</property>
+                                <property name="numeric">True</property>
+                              </widget>
+                              <packing>
+                                <property name="top_attach">2</property>
+                                <property name="bottom_attach">3</property>
+                                <property name="x_options">GTK_FILL</property>
+                                <property name="y_options"></property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkSpinButton" id="preferences_spin:int:2:0:caret.width">
+                                <property name="can_focus">True</property>
+                                <property name="adjustment">1 1 3 1 10 0</property>
+                                <property name="climb_rate">1</property>
+                                <property name="numeric">True</property>
+                              </widget>
+                              <packing>
+                                <property name="top_attach">1</property>
+                                <property name="bottom_attach">2</property>
+                                <property name="x_options">GTK_FILL</property>
+                                <property name="y_options"></property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkLabel" id="label1301">
+                                <property name="visible">True</property>
+                                <property name="xalign">0</property>
+                                <property name="label" translatable="yes" comments="Column where a vertical line will be drawn to indicate that lines should not be longer">Edge column</property>
+                              </widget>
+                              <packing>
+                                <property name="left_attach">1</property>
+                                <property name="right_attach">2</property>
+                                <property name="top_attach">3</property>
+                                <property name="bottom_attach">4</property>
+                                <property name="x_options">GTK_FILL</property>
+                                <property name="y_options"></property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkLabel" id="label1300">
+                                <property name="xalign">0</property>
+                                <property name="label" translatable="yes">Caret blink period in ms</property>
+                              </widget>
+                              <packing>
+                                <property name="left_attach">1</property>
+                                <property name="right_attach">2</property>
+                                <property name="top_attach">2</property>
+                                <property name="bottom_attach">3</property>
+                                <property name="x_options">GTK_FILL</property>
+                                <property name="y_options"></property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkLabel" id="label1294">
+                                <property name="xalign">0</property>
+                                <property name="label" translatable="yes">Editor caret (cursor) width in pixels</property>
+                              </widget>
+                              <packing>
+                                <property name="left_attach">1</property>
+                                <property name="right_attach">2</property>
+                                <property name="top_attach">1</property>
+                                <property name="bottom_attach">2</property>
+                                <property name="x_options">GTK_FILL</property>
+                                <property name="y_options"></property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkSpinButton" id="preferences_spin:int:40:0:margin.linenumber.width">
+                                <property name="can_focus">True</property>
+                                <property name="adjustment">40 10 200 1 10 0</property>
+                                <property name="climb_rate">1</property>
+                                <property name="numeric">True</property>
+                              </widget>
+                              <packing>
+                                <property name="x_options">GTK_FILL</property>
+                                <property name="y_options"></property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkLabel" id="label114">
+                                <property name="xalign">0</property>
+                                <property name="label" translatable="yes">Line numbers margin width in pixels</property>
+                              </widget>
+                              <packing>
+                                <property name="left_attach">1</property>
+                                <property name="right_attach">2</property>
+                                <property name="x_options">GTK_FILL</property>
+                                <property name="y_options"></property>
+                              </packing>
+                            </child>
+                          </widget>
+                          <packing>
+                            <property name="position">5</property>
+                          </packing>
+                        </child>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkLabel" id="label12337">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">&lt;b&gt;Misc options&lt;/b&gt;</property>
+                        <property name="use_markup">True</property>
+                      </widget>
+                      <packing>
+                        <property name="type">label_item</property>
+                      </packing>
+                    </child>
+                  </widget>
+                  <packing>
+                    <property name="expand">False</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkButton" id="style_button">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="label" translatable="yes">Colors &amp; Fonts</property>
+                    <property name="use_underline">True</property>
+                    <property name="response_id">0</property>
+                  </widget>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </widget>
+              <packing>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </widget>
+        </child>
+        <child>
+          <widget class="GtkLabel" id="label12350">
+            <property name="visible">True</property>
+            <property name="label" translatable="yes">Editor</property>
+          </widget>
+          <packing>
+            <property name="type">tab</property>
+            <property name="tab_fill">False</property>
+          </packing>
+        </child>
+        <child>
+          <widget class="GtkFrame" id="page2">
+            <property name="visible">True</property>
+            <property name="border_width">5</property>
+            <property name="label_xalign">0</property>
+            <property name="shadow_type">GTK_SHADOW_NONE</property>
+            <child>
+              <widget class="GtkVBox" id="vbox1111">
+                <property name="visible">True</property>
+                <child>
+                  <widget class="GtkTable" id="table15">
+                    <property name="visible">True</property>
+                    <property name="border_width">10</property>
+                    <property name="n_rows">5</property>
+                    <property name="n_columns">4</property>
+                    <property name="column_spacing">5</property>
+                    <property name="row_spacing">5</property>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <widget class="GtkCheckButton" id="preferences_toggle:bool:1:1:indent.automatic">
+                        <property name="can_focus">True</property>
+                        <property name="label" translatable="yes">Enable automatic indentation</property>
+                        <property name="use_underline">True</property>
+                        <property name="response_id">0</property>
+                        <property name="draw_indicator">True</property>
+                      </widget>
+                      <packing>
+                        <property name="top_attach">4</property>
+                        <property name="bottom_attach">5</property>
+                        <property name="x_options">GTK_FILL</property>
+                        <property name="y_options"></property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkCheckButton" id="preferences_toggle:bool:0:1:indent.maintain">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="label" translatable="yes" comments="If the user presses enter, the indentation of the current line will automatically be added to the next line">Maintain past Indentation</property>
+                        <property name="use_underline">True</property>
+                        <property name="response_id">0</property>
+                        <property name="draw_indicator">True</property>
+                      </widget>
+                      <packing>
+                        <property name="x_options">GTK_FILL</property>
+                        <property name="y_options"></property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkCheckButton" id="preferences_toggle:bool:0:0:tab.indents">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="label" translatable="yes">Pressing tab inserts indentation</property>
+                        <property name="use_underline">True</property>
+                        <property name="response_id">0</property>
+                        <property name="draw_indicator">True</property>
+                      </widget>
+                      <packing>
+                        <property name="left_attach">2</property>
+                        <property name="right_attach">4</property>
+                        <property name="top_attach">2</property>
+                        <property name="bottom_attach">3</property>
+                        <property name="x_options">GTK_FILL</property>
+                        <property name="y_options"></property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkCheckButton" id="preferences_toggle:bool:0:0:backspace.unindents">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="label" translatable="yes">Pressing backspace un-indents</property>
+                        <property name="use_underline">True</property>
+                        <property name="response_id">0</property>
+                        <property name="draw_indicator">True</property>
+                      </widget>
+                      <packing>
+                        <property name="left_attach">2</property>
+                        <property name="right_attach">4</property>
+                        <property name="top_attach">3</property>
+                        <property name="bottom_attach">4</property>
+                        <property name="x_options">GTK_FILL</property>
+                        <property name="y_options"></property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkVSeparator" id="vseparator1">
+                        <property name="visible">True</property>
+                      </widget>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="right_attach">2</property>
+                        <property name="bottom_attach">5</property>
+                        <property name="x_options">GTK_FILL</property>
+                        <property name="y_options">GTK_FILL</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkCheckButton" id="preferences_toggle:bool:0:1:indent.closing">
+                        <property name="can_focus">True</property>
+                        <property name="label" translatable="yes">Indent closing braces</property>
+                        <property name="use_underline">True</property>
+                        <property name="response_id">0</property>
+                        <property name="draw_indicator">True</property>
+                      </widget>
+                      <packing>
+                        <property name="top_attach">3</property>
+                        <property name="bottom_attach">4</property>
+                        <property name="x_options">GTK_FILL</property>
+                        <property name="y_options"></property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkCheckButton" id="preferences_toggle:bool:0:1:indent.opening">
+                        <property name="can_focus">True</property>
+                        <property name="label" translatable="yes">Indent opening braces</property>
+                        <property name="use_underline">True</property>
+                        <property name="response_id">0</property>
+                        <property name="draw_indicator">True</property>
+                      </widget>
+                      <packing>
+                        <property name="top_attach">2</property>
+                        <property name="bottom_attach">3</property>
+                        <property name="x_options">GTK_FILL</property>
+                        <property name="y_options"></property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkCheckButton" id="preferences_toggle:bool:1:1:use.tabs">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="label" translatable="yes">Use tabs for indentation</property>
+                        <property name="use_underline">True</property>
+                        <property name="response_id">0</property>
+                        <property name="draw_indicator">True</property>
+                      </widget>
+                      <packing>
+                        <property name="top_attach">1</property>
+                        <property name="bottom_attach">2</property>
+                        <property name="x_options">GTK_FILL</property>
+                        <property name="y_options"></property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkSpinButton" id="preferences_spin:int:4:1:indent.size">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="adjustment">4 1 100 1 10 0</property>
+                        <property name="climb_rate">1</property>
+                        <property name="numeric">True</property>
+                      </widget>
+                      <packing>
+                        <property name="left_attach">3</property>
+                        <property name="right_attach">4</property>
+                        <property name="top_attach">1</property>
+                        <property name="bottom_attach">2</property>
+                        <property name="x_options">GTK_FILL</property>
+                        <property name="y_options"></property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkSpinButton" id="preferences_spin:int:4:1:tabsize">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="adjustment">4 1 100 1 10 0</property>
+                        <property name="climb_rate">1</property>
+                        <property name="numeric">True</property>
+                      </widget>
+                      <packing>
+                        <property name="left_attach">3</property>
+                        <property name="right_attach">4</property>
+                        <property name="x_options">GTK_FILL</property>
+                        <property name="y_options"></property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkLabel" id="label123">
+                        <property name="visible">True</property>
+                        <property name="xalign">0</property>
+                        <property name="label" translatable="yes">Indentation size in spaces:</property>
+                      </widget>
+                      <packing>
+                        <property name="left_attach">2</property>
+                        <property name="right_attach">3</property>
+                        <property name="top_attach">1</property>
+                        <property name="bottom_attach">2</property>
+                        <property name="x_options">GTK_FILL</property>
+                        <property name="y_options"></property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkLabel" id="label122">
+                        <property name="visible">True</property>
+                        <property name="xalign">0</property>
+                        <property name="label" translatable="yes">Tab size in spaces:</property>
+                      </widget>
+                      <packing>
+                        <property name="left_attach">2</property>
+                        <property name="right_attach">3</property>
+                        <property name="x_options">GTK_FILL</property>
+                        <property name="y_options"></property>
+                      </packing>
+                    </child>
+                  </widget>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                  </packing>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+              </widget>
+            </child>
+            <child>
+              <widget class="GtkLabel" id="label12321">
+                <property name="visible">True</property>
+                <property name="label" translatable="yes">&lt;b&gt;Basic Indentation&lt;/b&gt;</property>
+                <property name="use_markup">True</property>
+              </widget>
+              <packing>
+                <property name="type">label_item</property>
+              </packing>
+            </child>
+          </widget>
+          <packing>
+            <property name="position">1</property>
+          </packing>
+        </child>
+        <child>
+          <widget class="GtkLabel" id="label12351">
+            <property name="visible">True</property>
+            <property name="label" translatable="yes">Basic Indentation</property>
+          </widget>
+          <packing>
+            <property name="type">tab</property>
+            <property name="position">1</property>
+            <property name="tab_fill">False</property>
+          </packing>
+        </child>
+        <child>
+          <widget class="GtkFrame" id="page3">
+            <property name="visible">True</property>
+            <property name="border_width">5</property>
+            <property name="label_xalign">0</property>
+            <property name="shadow_type">GTK_SHADOW_NONE</property>
+            <child>
+              <widget class="GtkTable" id="table17">
+                <property name="visible">True</property>
+                <property name="border_width">10</property>
+                <property name="n_rows">5</property>
+                <property name="n_columns">3</property>
+                <property name="column_spacing">5</property>
+                <property name="row_spacing">5</property>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <widget class="GtkVBox" id="vbox1127">
+                    <child>
+                      <widget class="GtkCheckButton" id="preferences_toggle:bool:0:0:view.eol">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="label" translatable="yes">View EOL chars</property>
+                        <property name="use_underline">True</property>
+                        <property name="response_id">0</property>
+                        <property name="draw_indicator">True</property>
+                      </widget>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkCheckButton" id="preferences_toggle:bool:0:0:view.indentation.guides">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="label" translatable="yes">View Indentation Guides</property>
+                        <property name="use_underline">True</property>
+                        <property name="response_id">0</property>
+                        <property name="draw_indicator">True</property>
+                      </widget>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkCheckButton" id="preferences_toggle:bool:0:0:whitespace">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="label" translatable="yes">View Whitespaces</property>
+                        <property name="use_underline">True</property>
+                        <property name="response_id">0</property>
+                        <property name="draw_indicator">True</property>
+                      </widget>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">2</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkCheckButton" id="preferences_toggle:bool:0:0:view.indentation.whitespace">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="label" translatable="yes">View indentation whitespaces</property>
+                        <property name="use_underline">True</property>
+                        <property name="response_id">0</property>
+                        <property name="draw_indicator">True</property>
+                      </widget>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">3</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkCheckButton" id="preferences_toggle:bool:0:0:view.line.wrap">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="label" translatable="yes">View Line Wrap</property>
+                        <property name="use_underline">True</property>
+                        <property name="response_id">0</property>
+                        <property name="draw_indicator">True</property>
+                      </widget>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">4</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkCheckButton" id="preferences_toggle:bool:1:0:margin.linenumber.visible">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="label" translatable="yes">Margin Linenum visible</property>
+                        <property name="use_underline">True</property>
+                        <property name="response_id">0</property>
+                        <property name="draw_indicator">True</property>
+                      </widget>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">5</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkCheckButton" id="preferences_toggle:bool:1:0:margin.marker.visible">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="label" translatable="yes">Margin Marker visible</property>
+                        <property name="use_underline">True</property>
+                        <property name="response_id">0</property>
+                        <property name="draw_indicator">True</property>
+                      </widget>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">6</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkCheckButton" id="preferences_toggle:bool:1:0:margin.fold.visible">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="label" translatable="yes">Margin Fold visible</property>
+                        <property name="use_underline">True</property>
+                        <property name="response_id">0</property>
+                        <property name="draw_indicator">True</property>
+                      </widget>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">7</property>
+                      </packing>
+                    </child>
+                  </widget>
+                  <packing>
+                    <property name="top_attach">4</property>
+                    <property name="bottom_attach">5</property>
+                    <property name="x_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkLabel" id="label133">
+                    <property name="visible">True</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">Lines</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="right_attach">3</property>
+                    <property name="top_attach">3</property>
+                    <property name="bottom_attach">4</property>
+                    <property name="x_options">GTK_FILL</property>
+                    <property name="y_options"></property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkSpinButton" id="preferences_spin:int:1:0:print.linenumber.count">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="adjustment">1 0 1000 1 10 0</property>
+                    <property name="climb_rate">1</property>
+                    <property name="numeric">True</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="right_attach">2</property>
+                    <property name="top_attach">3</property>
+                    <property name="bottom_attach">4</property>
+                    <property name="x_options">GTK_FILL</property>
+                    <property name="y_options"></property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkLabel" id="label132">
+                    <property name="visible">True</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">Add line number every:</property>
+                  </widget>
+                  <packing>
+                    <property name="top_attach">3</property>
+                    <property name="bottom_attach">4</property>
+                    <property name="x_options">GTK_FILL</property>
+                    <property name="y_options"></property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkCheckButton" id="preferences_toggle:bool:1:0:print.linewrap">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="label" translatable="yes">Enable line wrap</property>
+                    <property name="use_underline">True</property>
+                    <property name="response_id">0</property>
+                    <property name="draw_indicator">True</property>
+                  </widget>
+                  <packing>
+                    <property name="right_attach">3</property>
+                    <property name="top_attach">2</property>
+                    <property name="bottom_attach">3</property>
+                    <property name="x_options">GTK_FILL</property>
+                    <property name="y_options"></property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkCheckButton" id="preferences_toggle:bool:1:0:print.header">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="label" translatable="yes">Add page header</property>
+                    <property name="use_underline">True</property>
+                    <property name="response_id">0</property>
+                    <property name="draw_indicator">True</property>
+                  </widget>
+                  <packing>
+                    <property name="right_attach">3</property>
+                    <property name="top_attach">1</property>
+                    <property name="bottom_attach">2</property>
+                    <property name="x_options">GTK_FILL</property>
+                    <property name="y_options"></property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkRadioButton" id="radiobutton4">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="label" translatable="yes">Monochrome</property>
+                    <property name="use_underline">True</property>
+                    <property name="response_id">0</property>
+                    <property name="draw_indicator">True</property>
+                    <property name="group">preferences_toggle:bool:1:0:print.color</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="right_attach">3</property>
+                    <property name="x_options">GTK_FILL</property>
+                    <property name="y_options"></property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkRadioButton" id="preferences_toggle:bool:1:0:print.color">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="label" translatable="yes">Colour</property>
+                    <property name="use_underline">True</property>
+                    <property name="response_id">0</property>
+                    <property name="draw_indicator">True</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="right_attach">2</property>
+                    <property name="x_options">GTK_FILL</property>
+                    <property name="y_options"></property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkLabel" id="label131">
+                    <property name="visible">True</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">Mode:</property>
+                  </widget>
+                  <packing>
+                    <property name="x_options">GTK_FILL</property>
+                    <property name="y_options"></property>
+                  </packing>
+                </child>
+              </widget>
+            </child>
+            <child>
+              <widget class="GtkLabel" id="label129">
+                <property name="visible">True</property>
+                <property name="label" translatable="yes">&lt;b&gt;Print options&lt;/b&gt;</property>
+                <property name="use_markup">True</property>
+              </widget>
+              <packing>
+                <property name="type">label_item</property>
+              </packing>
+            </child>
+          </widget>
+          <packing>
+            <property name="position">2</property>
+          </packing>
+        </child>
+        <child>
+          <widget class="GtkLabel" id="label12352">
+            <property name="visible">True</property>
+            <property name="label" translatable="yes">Printing</property>
+          </widget>
+          <packing>
+            <property name="type">tab</property>
+            <property name="position">2</property>
+            <property name="tab_fill">False</property>
+          </packing>
+        </child>
+      </widget>
+    </child>
+  </widget>
+  <widget class="GtkDialog" id="style_editor_dialog">
+    <property name="title" translatable="yes">Fonts and colors for editor</property>
+    <property name="destroy_with_parent">True</property>
+    <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+    <child internal-child="vbox">
+      <widget class="GtkVBox" id="vbox1">
+        <property name="visible">True</property>
+        <child>
+          <widget class="GtkVBox" id="Editor">
+            <property name="visible">True</property>
+            <property name="border_width">5</property>
+            <property name="spacing">5</property>
+            <child>
+              <widget class="GtkFrame" id="frame1">
+                <property name="visible">True</property>
+                <property name="label_xalign">0</property>
+                <property name="shadow_type">GTK_SHADOW_NONE</property>
+                <child>
+                  <widget class="GtkTable" id="table2">
+                    <property name="visible">True</property>
+                    <property name="border_width">10</property>
+                    <property name="n_rows">6</property>
+                    <property name="n_columns">3</property>
+                    <property name="column_spacing">5</property>
+                    <property name="row_spacing">5</property>
+                    <child>
+                      <widget class="GtkFontButton" id="font">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="response_id">0</property>
+                      </widget>
+                      <packing>
+                        <property name="left_attach">2</property>
+                        <property name="right_attach">3</property>
+                        <property name="top_attach">2</property>
+                        <property name="bottom_attach">3</property>
+                        <property name="x_options">GTK_FILL</property>
+                        <property name="y_options"></property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkColorButton" id="back_color">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="response_id">0</property>
+                      </widget>
+                      <packing>
+                        <property name="left_attach">2</property>
+                        <property name="right_attach">3</property>
+                        <property name="top_attach">5</property>
+                        <property name="bottom_attach">6</property>
+                        <property name="x_options">GTK_FILL</property>
+                        <property name="y_options"></property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkColorButton" id="fore_color">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="response_id">0</property>
+                      </widget>
+                      <packing>
+                        <property name="left_attach">2</property>
+                        <property name="right_attach">3</property>
+                        <property name="top_attach">4</property>
+                        <property name="bottom_attach">5</property>
+                        <property name="y_options"></property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkHSeparator" id="hseparator1">
+                        <property name="visible">True</property>
+                      </widget>
+                      <packing>
+                        <property name="right_attach">3</property>
+                        <property name="top_attach">1</property>
+                        <property name="bottom_attach">2</property>
+                        <property name="x_options">GTK_FILL</property>
+                        <property name="y_options">GTK_FILL</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkHBox" id="hbox7">
+                        <property name="visible">True</property>
+                        <property name="spacing">5</property>
+                        <child>
+                          <widget class="GtkLabel" id="label11">
+                            <property name="visible">True</property>
+                            <property name="label" translatable="yes">Select highlight style to edit:</property>
+                          </widget>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="GtkComboBox" id="comboBox">
+                            <property name="visible">True</property>
+			    <property name="items" translatable="no"></property>
+                          </widget>
+                          <packing>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                      </widget>
+                      <packing>
+                        <property name="right_attach">3</property>
+                        <property name="x_options">GTK_FILL</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkHBox" id="hbox6">
+                        <property name="visible">True</property>
+                        <child>
+                          <widget class="GtkCheckButton" id="bold">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="label" translatable="yes">Bold</property>
+                            <property name="use_underline">True</property>
+                            <property name="response_id">0</property>
+                            <property name="draw_indicator">True</property>
+                          </widget>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="GtkCheckButton" id="italic">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="label" translatable="yes">Italic</property>
+                            <property name="use_underline">True</property>
+                            <property name="response_id">0</property>
+                            <property name="draw_indicator">True</property>
+                          </widget>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="GtkCheckButton" id="underlined">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="label" translatable="yes">Underlined</property>
+                            <property name="use_underline">True</property>
+                            <property name="response_id">0</property>
+                            <property name="draw_indicator">True</property>
+                          </widget>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">2</property>
+                          </packing>
+                        </child>
+                      </widget>
+                      <packing>
+                        <property name="left_attach">2</property>
+                        <property name="right_attach">3</property>
+                        <property name="top_attach">3</property>
+                        <property name="bottom_attach">4</property>
+                        <property name="x_options">GTK_FILL</property>
+                        <property name="y_options">GTK_FILL</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkCheckButton" id="back_default">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="label" translatable="yes">Use default</property>
+                        <property name="use_underline">True</property>
+                        <property name="response_id">0</property>
+                        <property name="draw_indicator">True</property>
+                      </widget>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="right_attach">2</property>
+                        <property name="top_attach">5</property>
+                        <property name="bottom_attach">6</property>
+                        <property name="x_options">GTK_FILL</property>
+                        <property name="y_options"></property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkCheckButton" id="fore_default">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="label" translatable="yes">Use default</property>
+                        <property name="use_underline">True</property>
+                        <property name="response_id">0</property>
+                        <property name="draw_indicator">True</property>
+                      </widget>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="right_attach">2</property>
+                        <property name="top_attach">4</property>
+                        <property name="bottom_attach">5</property>
+                        <property name="x_options">GTK_FILL</property>
+                        <property name="y_options"></property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkCheckButton" id="attributes_default">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="label" translatable="yes">Use default</property>
+                        <property name="use_underline">True</property>
+                        <property name="response_id">0</property>
+                        <property name="draw_indicator">True</property>
+                      </widget>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="right_attach">2</property>
+                        <property name="top_attach">3</property>
+                        <property name="bottom_attach">4</property>
+                        <property name="x_options">GTK_FILL</property>
+                        <property name="y_options"></property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkCheckButton" id="font_default">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="label" translatable="yes">Use default</property>
+                        <property name="use_underline">True</property>
+                        <property name="response_id">0</property>
+                        <property name="draw_indicator">True</property>
+                      </widget>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="right_attach">2</property>
+                        <property name="top_attach">2</property>
+                        <property name="bottom_attach">3</property>
+                        <property name="x_options">GTK_FILL</property>
+                        <property name="y_options"></property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkLabel" id="label10">
+                        <property name="visible">True</property>
+                        <property name="xalign">0</property>
+                        <property name="label" translatable="yes">Background color:</property>
+                      </widget>
+                      <packing>
+                        <property name="top_attach">5</property>
+                        <property name="bottom_attach">6</property>
+                        <property name="x_options">GTK_FILL</property>
+                        <property name="y_options"></property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkLabel" id="label9">
+                        <property name="visible">True</property>
+                        <property name="xalign">0</property>
+                        <property name="label" translatable="yes">Foreground color:</property>
+                      </widget>
+                      <packing>
+                        <property name="top_attach">4</property>
+                        <property name="bottom_attach">5</property>
+                        <property name="x_options">GTK_FILL</property>
+                        <property name="y_options"></property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkLabel" id="label8">
+                        <property name="visible">True</property>
+                        <property name="xalign">0</property>
+                        <property name="label" translatable="yes">Attributes:</property>
+                      </widget>
+                      <packing>
+                        <property name="top_attach">3</property>
+                        <property name="bottom_attach">4</property>
+                        <property name="x_options">GTK_FILL</property>
+                        <property name="y_options"></property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkLabel" id="label7">
+                        <property name="visible">True</property>
+                        <property name="xalign">0</property>
+                        <property name="label" translatable="yes">Font:</property>
+                      </widget>
+                      <packing>
+                        <property name="top_attach">2</property>
+                        <property name="bottom_attach">3</property>
+                        <property name="x_options">GTK_FILL</property>
+                        <property name="y_options"></property>
+                      </packing>
+                    </child>
+                  </widget>
+                </child>
+                <child>
+                  <widget class="GtkLabel" id="label12">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes">&lt;b&gt;Highlight style&lt;/b&gt;</property>
+                    <property name="use_markup">True</property>
+                  </widget>
+                  <packing>
+                    <property name="type">label_item</property>
+                  </packing>
+                </child>
+              </widget>
+              <packing>
+                <property name="expand">False</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkFrame" id="frame2">
+                <property name="visible">True</property>
+                <property name="label_xalign">0</property>
+                <property name="shadow_type">GTK_SHADOW_NONE</property>
+                <child>
+                  <widget class="GtkTable" id="table3">
+                    <property name="visible">True</property>
+                    <property name="border_width">10</property>
+                    <property name="n_rows">2</property>
+                    <property name="n_columns">4</property>
+                    <property name="column_spacing">5</property>
+                    <property name="row_spacing">5</property>
+                    <child>
+                      <widget class="GtkColorButton" id="caret">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="response_id">0</property>
+                      </widget>
+                      <packing>
+                        <property name="left_attach">3</property>
+                        <property name="right_attach">4</property>
+                        <property name="top_attach">1</property>
+                        <property name="bottom_attach">2</property>
+                        <property name="x_options">GTK_FILL</property>
+                        <property name="y_options"></property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkColorButton" id="calltip">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="response_id">0</property>
+                      </widget>
+                      <packing>
+                        <property name="left_attach">3</property>
+                        <property name="right_attach">4</property>
+                        <property name="x_options">GTK_FILL</property>
+                        <property name="y_options"></property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkColorButton" id="selection_back">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="response_id">0</property>
+                      </widget>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="right_attach">2</property>
+                        <property name="top_attach">1</property>
+                        <property name="bottom_attach">2</property>
+                        <property name="x_options">GTK_FILL</property>
+                        <property name="y_options"></property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkColorButton" id="selection_fore">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="response_id">0</property>
+                      </widget>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="right_attach">2</property>
+                        <property name="x_options">GTK_FILL</property>
+                        <property name="y_options"></property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkLabel" id="label16">
+                        <property name="visible">True</property>
+                        <property name="xalign">0</property>
+                        <property name="label" translatable="yes">Caret (cursor) color:</property>
+                      </widget>
+                      <packing>
+                        <property name="left_attach">2</property>
+                        <property name="right_attach">3</property>
+                        <property name="top_attach">1</property>
+                        <property name="bottom_attach">2</property>
+                        <property name="x_options">GTK_FILL</property>
+                        <property name="y_options"></property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkLabel" id="label15">
+                        <property name="visible">True</property>
+                        <property name="xalign">0</property>
+                        <property name="label" translatable="yes">Calltip background:</property>
+                      </widget>
+                      <packing>
+                        <property name="left_attach">2</property>
+                        <property name="right_attach">3</property>
+                        <property name="x_options">GTK_FILL</property>
+                        <property name="y_options"></property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkLabel" id="label14">
+                        <property name="visible">True</property>
+                        <property name="xalign">0</property>
+                        <property name="label" translatable="yes">Selection background:</property>
+                      </widget>
+                      <packing>
+                        <property name="top_attach">1</property>
+                        <property name="bottom_attach">2</property>
+                        <property name="x_options">GTK_FILL</property>
+                        <property name="y_options"></property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkLabel" id="label13">
+                        <property name="visible">True</property>
+                        <property name="xalign">0</property>
+                        <property name="label" translatable="yes">Selection foreground:</property>
+                      </widget>
+                      <packing>
+                        <property name="x_options">GTK_FILL</property>
+                        <property name="y_options"></property>
+                      </packing>
+                    </child>
+                  </widget>
+                </child>
+                <child>
+                  <widget class="GtkLabel" id="label17">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes">&lt;b&gt;Other colors&lt;/b&gt;</property>
+                    <property name="use_markup">True</property>
+                  </widget>
+                  <packing>
+                    <property name="type">label_item</property>
+                  </packing>
+                </child>
+              </widget>
+              <packing>
+                <property name="expand">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </widget>
+          <packing>
+            <property name="expand">False</property>
+            <property name="position">2</property>
+          </packing>
+        </child>
+        <child internal-child="action_area">
+          <widget class="GtkHButtonBox" id="hbuttonbox1">
+            <property name="visible">True</property>
+            <property name="layout_style">GTK_BUTTONBOX_END</property>
+            <child>
+              <widget class="GtkButton" id="button1">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="label">gtk-cancel</property>
+                <property name="use_stock">True</property>
+                <property name="response_id">-6</property>
+              </widget>
+            </child>
+            <child>
+              <widget class="GtkButton" id="button2">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="label">gtk-apply</property>
+                <property name="use_stock">True</property>
+                <property name="response_id">-10</property>
+              </widget>
+              <packing>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkButton" id="button3">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="label">gtk-ok</property>
+                <property name="use_stock">True</property>
+                <property name="response_id">-5</property>
+              </widget>
+              <packing>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </widget>
+          <packing>
+            <property name="expand">False</property>
+            <property name="pack_type">GTK_PACK_END</property>
+          </packing>
+        </child>
+      </widget>
+    </child>
+  </widget>
+</glade-interface>

Added: trunk/plugins/scintilla/anjuta-editor.plugin
==============================================================================
--- (empty file)
+++ trunk/plugins/scintilla/anjuta-editor.plugin	Wed Apr  8 07:16:46 2009
@@ -0,0 +1,67 @@
+[Anjuta Plugin]
+Name=Scintilla Editor
+Name[ar]=ÙØØØ Scintilla
+Name[be latin]=Redaktar Scintilla
+Name[bg]=ÐÐÐÐÐÑÐÑ Scintilla
+Name[ca]=Editor Scintilla
+Name[cs]=Editor Scintilla
+Name[da]=Scintilla-redigering
+Name[de]=Scintilla-Editor
+Name[dz]=àààààààààààààààààà
+Name[el]=ÎÏÎÎÎÏÎÎÏÏÎ ÎÎÎÎÎÎÎÏ scintilla
+Name[en_CA]=Scintilla Editor
+Name[en_GB]=Scintilla Editor
+Name[es]=Editor Scintilla
+Name[eu]=Scintilla editorea
+Name[fi]=Scintilla-muokkain
+Name[fr]=Ãditeur Scintilla
+Name[gl]=Editor Scintilla
+Name[gu]=Scintilla àààààà
+Name[he]=×××× ××××× Scintilla
+Name[hu]=Scintilla szerkesztÅ
+Name[it]=Editor Scintilla
+Name[ja]=Scintilla ãããã
+Name[kn]=Scintilla àààààà
+Name[ko]=Scintilla íìê
+Name[mk]=ÐÑÐÐÑÐÐÑÐÑ Scintilla
+Name[mr]=Scintilla àààààà
+Name[ne]=àààààààà ààààààà
+Name[nl]=Scintilla editor
+Name[pl]=Edytor Scintilla
+Name[pt]=Editor Scintilla
+Name[pt_BR]=Editor Scintilla
+Name[ru]=ÐÐÐÐÐÑÐÑ Scintilla
+Name[sl]=Urejevalnik Scintilla
+Name[sv]=Redigeraren Scintilla
+Name[th]=ààààààààààààààà Scintilla
+Name[tr]=Scintilla DÃzenleyici
+Name[vi]=Bá soán tháo Scintilla
+Name[zh_HK]=Scintilla çèå
+Name[zh_TW]=Scintilla çèå
+Description=An alternate editor based on Scintilla
+Description[ca]=Un editor alternatiu basat en el Scintilla
+Description[da]=En alternativ redigering baseret pà Scintilla
+Description[de]=Ein alternativer auf Scintilla basierender Editor
+Description[el]=ÎÎÎÏ ÎÎÎÎÎÎÎÏÎÎÏÏ ÎÏÎÎÎÏÎÎÏÏÎÏ ÎÎÏÎÏÎÎÎÎÏ ÏÏÎ Scintilla
+Description[en_GB]=An alternate editor based on Scintilla
+Description[es]=Un editor alternativo basado en Scintilla
+Description[eu]=Scintilla-n oinarritutako ordezko editorea
+Description[fi]=Scintilla-pohjainen vaihtoehtoinen muokkain
+Description[fr]=Un Ãditeur alternatif basà sur Scintilla
+Description[gl]=Un editor alternativo baseado no Scintilla
+Description[gu]=Scintilla àà àààààà àààààààà àààààà
+Description[hu]=AlternatÃtv Scintilla alapà szerkesztÅ
+Description[it]=Un editor alternativo basato su Scintilla
+Description[pt]=Um editor alternativo baseado no Scintilla
+Description[pt_BR]=Um editor alternativo baseado em GtkSourceview
+Description[ru]=ÐÐÑÑÐÑÐÐÑÐÐÐÑÐ ÑÐÐÐÐÑÐÑ, ÐÑÐÐÐÐÐÐÑÐ ÐÐ Scintilla
+Description[sl]=Alternativni urejevalnik na osnovi Scintilla
+Description[sv]=En alternativ redigerare baserad pà Scintilla
+Description[th]=ààààààààààààààààààààààà àààààà Scintilla
+Description[tr]=Scintilla temelli alternatif dÃzenleyici
+Description[vi]=Mát trÃnh soán tháo xen ká dáa vÃo Scintilla
+Location=anjuta-editor:EditorPlugin
+Version=0.1
+Icon=anjuta-editor-scintilla-plugin-48.png
+Interfaces=IAnjutaEditorFactory
+UserActivatable=no

Added: trunk/plugins/scintilla/anjuta-linemark-16.xpm
==============================================================================
--- (empty file)
+++ trunk/plugins/scintilla/anjuta-linemark-16.xpm	Wed Apr  8 07:16:46 2009
@@ -0,0 +1,71 @@
+/* XPM */
+static char *anjuta_linemark_16_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"16 16 49 1",
+"  c #396C08",
+". c #3A6C08",
+"X c #3E730A",
+"o c #43790E",
+"O c #44790F",
+"+ c #447A0F",
+"@ c #4A7E18",
+"# c #50821F",
+"$ c #5FA31D",
+"% c #61A71E",
+"& c #6CAD2E",
+"* c #70A937",
+"= c #79B83C",
+"- c #7AB93E",
+"; c #74AA40",
+": c #8AE234",
+"> c #81B250",
+", c #8CB961",
+"< c #92BD6A",
+"1 c #88C150",
+"2 c #8EC559",
+"3 c #93E444",
+"4 c #9BE651",
+"5 c #9EE757",
+"6 c #9BC970",
+"7 c #9DC972",
+"8 c #A7E966",
+"9 c #A9E96A",
+"0 c #B0E879",
+"q c #A6CD80",
+"w c #B4E980",
+"e c #B6EA84",
+"r c #BAE98C",
+"t c #CDF2A7",
+"y c #D4F4B5",
+"u c #D6F3B9",
+"i c #D7F4BA",
+"p c #D9F5BE",
+"a c #DDF5C6",
+"s c #DEF4C7",
+"d c #E2F7CD",
+"f c #E3F5D0",
+"g c #E6F6D5",
+"h c #E5F8D2",
+"j c #E9F7DB",
+"k c #E9F9D8",
+"l c #EDF9E1",
+"z c #F3FBEB",
+"x c None",
+/* pixels */
+"xxxxxxxxxxxxxxxx",
+"xxxxxx    xxxxxx",
+"xxxxxx &q.xxxxxx",
+"xxxxxx *> xxxxxx",
+"xxxxxX+76+Xxxxxx",
+"xxxxX,flzj<Xxxxx",
+"x   @spdkhg# ..x",
+"x %%1utyuys2%% x",
+"x $&-04895e-$% x",
+"x  .Or3::3ro   x",
+"xxxxo*r00r;Xxxxx",
+"xxxxx.o==+Xxxxxx",
+"xxxxxx %% xxxxxx",
+"xxxxxx.%% xxxxxx",
+"xxxxxx    xxxxxx",
+"xxxxxxxxxxxxxxxx"
+};

Added: trunk/plugins/scintilla/lexer.h
==============================================================================
--- (empty file)
+++ trunk/plugins/scintilla/lexer.h	Wed Apr  8 07:16:46 2009
@@ -0,0 +1,53 @@
+/*
+    lexer.h
+    Copyright (C) 2000  Kh. Naba Kumar Singh
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+*/
+
+#ifndef _LEXER_H_
+#define _LEXER_H_
+
+#define TE_LEXER_BASE		0
+#define TE_LEXER_AUTOMATIC	TE_LEXER_BASE
+#define TE_LEXER_NONE		TE_LEXER_BASE+1
+#define TE_LEXER_CPP		TE_LEXER_BASE+2
+#define TE_LEXER_GCPP		TE_LEXER_BASE+3
+#define TE_LEXER_HTML		TE_LEXER_BASE+4
+#define TE_LEXER_XML		TE_LEXER_BASE+5
+#define TE_LEXER_JS 		TE_LEXER_BASE+6
+#define TE_LEXER_WSCRIPT	TE_LEXER_BASE+7
+#define TE_LEXER_MAKE		TE_LEXER_BASE+8
+#define TE_LEXER_JAVA		TE_LEXER_BASE+9
+#define TE_LEXER_LUA		TE_LEXER_BASE+10
+#define TE_LEXER_PYTHON		TE_LEXER_BASE+11
+#define TE_LEXER_PERL		TE_LEXER_BASE+12
+#define TE_LEXER_SQL		TE_LEXER_BASE+13
+#define TE_LEXER_PLSQL		TE_LEXER_BASE+14
+#define TE_LEXER_PHP		TE_LEXER_BASE+15
+#define TE_LEXER_LATEX		TE_LEXER_BASE+16
+#define TE_LEXER_DIFF		TE_LEXER_BASE+17
+#define TE_LEXER_PASCAL		TE_LEXER_BASE+18
+#define TE_LEXER_XCODE		TE_LEXER_BASE+19
+#define TE_LEXER_PROPS		TE_LEXER_BASE+20
+#define TE_LEXER_CONF		TE_LEXER_BASE+21
+#define TE_LEXER_BAAN		TE_LEXER_BASE+22
+#define TE_LEXER_ADA		TE_LEXER_BASE+23
+#define TE_LEXER_LISP		TE_LEXER_BASE+24
+#define TE_LEXER_RUBY		TE_LEXER_BASE+25
+#define TE_LEXER_MATLAB		TE_LEXER_BASE+26
+#define TE_LEXER_CSS 		TE_LEXER_BASE+27
+
+#endif /* _LEXER_H_ */

Added: trunk/plugins/scintilla/plugin.h
==============================================================================
--- (empty file)
+++ trunk/plugins/scintilla/plugin.h	Wed Apr  8 07:16:46 2009
@@ -0,0 +1,43 @@
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Library General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+ 
+ 
+#include <libanjuta/anjuta-plugin.h>
+#include <libanjuta/anjuta-preferences.h>
+#include <libanjuta/anjuta-ui.h>
+
+#include "style-editor.h"
+
+extern GType editor_plugin_get_type (GTypeModule *module);
+#define ANJUTA_TYPE_PLUGIN_EDITOR         (editor_plugin_get_type (NULL))
+#define ANJUTA_PLUGIN_EDITOR(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), ANJUTA_TYPE_PLUGIN_EDITOR, EditorPlugin))
+#define ANJUTA_PLUGIN_EDITOR_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST ((k), ANJUTA_TYPE_PLUGIN_EDITOR, EditorPluginClass))
+#define ANJUTA_IS_PLUGIN_EDITOR(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), ANJUTA_TYPE_PLUGIN_EDITOR))
+#define ANJUTA_IS_PLUGIN_EDITOR_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), ANJUTA_TYPE_PLUGIN_EDITOR))
+#define ANJUTA_PLUGIN_EDITOR_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), ANJUTA_TYPE_PLUGIN_EDITOR, EditorPluginClass))
+
+typedef struct _EditorPlugin EditorPlugin;
+typedef struct _EditorPluginClass EditorPluginClass;
+
+struct _EditorPlugin{
+	AnjutaPlugin parent;
+	
+	GtkWidget* style_button;
+};
+
+struct _EditorPluginClass{
+	AnjutaPluginClass parent_class;
+};

Added: trunk/plugins/scintilla/properties_cxx.h
==============================================================================
--- (empty file)
+++ trunk/plugins/scintilla/properties_cxx.h	Wed Apr  8 07:16:46 2009
@@ -0,0 +1,47 @@
+/*
+ * properties_cxx.h Copyright (C) 2004 Johannes Schmid
+ * 
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free 
+ * Software Foundation; either version 2 of the License, or (at your option)
+ * any later version.
+ * 
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 
+ * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * for more details.
+ * 
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc., 59 
+ * 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA 
+ */
+
+#ifndef _PROPERTIES_CXX_H_
+#define _PROPERTIES_CXX_H_
+
+
+#include <glib.h>
+
+#include "PropSet.h"
+
+class PropSetFile : public PropSet {
+	bool lowerKeys;
+	SString GetWildUsingStart(const PropSet &psStart, const char *keybase, const char *filename);
+protected:
+	static bool caseSensitiveFilenames;
+public:
+	PropSetFile(bool lowerKeys_=false);
+	~PropSetFile();
+	bool ReadLine(const char *data, bool ifIsTrue, const char *directoryForImports=0);
+	void ReadFromMemory(const char *data, int len, const char *directoryForImports=0);
+	bool Read(const char *filename, const char *directoryForImports);
+	SString GetWild(const char *keybase, const char *filename);
+	SString GetNewExpand(const char *keybase, const char *filename="");
+	bool GetFirst(char **key, char **val);
+	bool GetNext(char **key, char **val);
+	static void SetCaseSensitiveFilenames(bool caseSensitiveFilenames_) {
+		caseSensitiveFilenames = caseSensitiveFilenames_;
+	}
+};
+
+#endif

Added: trunk/plugins/scintilla/scintilla/CellBuffer.h
==============================================================================
--- (empty file)
+++ trunk/plugins/scintilla/scintilla/CellBuffer.h	Wed Apr  8 07:16:46 2009
@@ -0,0 +1,242 @@
+// Scintilla source code edit control
+/** @file CellBuffer.h
+ ** Manages the text of the document.
+ **/
+// Copyright 1998-2004 by Neil Hodgson <neilh scintilla org>
+// The License.txt file describes the conditions under which this software may be distributed.
+
+#ifndef CELLBUFFER_H
+#define CELLBUFFER_H
+
+#ifdef SCI_NAMESPACE
+namespace Scintilla {
+#endif
+
+/**
+ * This holds the marker identifier and the marker type to display.
+ * MarkerHandleNumbers are members of lists.
+ */
+struct MarkerHandleNumber {
+	int handle;
+	int number;
+	MarkerHandleNumber *next;
+};
+
+/**
+ * A marker handle set contains any number of MarkerHandleNumbers.
+ */
+class MarkerHandleSet {
+	MarkerHandleNumber *root;
+
+public:
+	MarkerHandleSet();
+	~MarkerHandleSet();
+	int Length() const;
+	int NumberFromHandle(int handle) const;
+	int MarkValue() const;	///< Bit set of marker numbers.
+	bool Contains(int handle) const;
+	bool InsertHandle(int handle, int markerNum);
+	void RemoveHandle(int handle);
+	bool RemoveNumber(int markerNum);
+	void CombineWith(MarkerHandleSet *other);
+};
+
+/**
+ * The line vector contains information about each of the lines in a cell buffer.
+ */
+class LineVector {
+
+	Partitioning starts;
+	SplitVector<MarkerHandleSet *> markers;
+	SplitVector<int> levels;
+	/// Handles are allocated sequentially and should never have to be reused as 32 bit ints are very big.
+	int handleCurrent;
+
+public:
+
+	LineVector();
+	~LineVector();
+	void Init();
+
+	void ExpandLevels(int sizeNew=-1);
+	void ClearLevels();
+	int SetLevel(int line, int level);
+	int GetLevel(int line);
+
+	void InsertText(int line, int delta);
+	void InsertLine(int line, int position);
+	void SetLineStart(int line, int position);
+	void RemoveLine(int line);
+	int Lines() const {
+		return starts.Partitions();
+	}
+	int LineFromPosition(int pos);
+	int LineStart(int line) const {
+		return starts.PositionFromPartition(line);
+	}
+
+	int MarkValue(int line);
+	int AddMark(int line, int marker);
+	void MergeMarkers(int pos);
+	void DeleteMark(int line, int markerNum, bool all);
+	void DeleteMarkFromHandle(int markerHandle);
+	int LineFromHandle(int markerHandle);
+};
+
+enum actionType { insertAction, removeAction, startAction };
+
+/**
+ * Actions are used to store all the information required to perform one undo/redo step.
+ */
+class Action {
+public:
+	actionType at;
+	int position;
+	char *data;
+	int lenData;
+	bool mayCoalesce;
+
+	Action();
+	~Action();
+	void Create(actionType at_, int position_=0, char *data_=0, int lenData_=0, bool mayCoalesce_=true);
+	void Destroy();
+	void Grab(Action *source);
+};
+
+/**
+ *
+ */
+class UndoHistory {
+	Action *actions;
+	int lenActions;
+	int maxAction;
+	int currentAction;
+	int undoSequenceDepth;
+	int savePoint;
+
+	void EnsureUndoRoom();
+
+public:
+	UndoHistory();
+	~UndoHistory();
+
+	void AppendAction(actionType at, int position, char *data, int length, bool &startSequence);
+
+	void BeginUndoAction();
+	void EndUndoAction();
+	void DropUndoSequence();
+	void DeleteUndoHistory();
+
+	/// The save point is a marker in the undo stack where the container has stated that
+	/// the buffer was saved. Undo and redo can move over the save point.
+	void SetSavePoint();
+	bool IsSavePoint() const;
+
+	/// To perform an undo, StartUndo is called to retrieve the number of steps, then UndoStep is
+	/// called that many times. Similarly for redo.
+	bool CanUndo() const;
+	int StartUndo();
+	const Action &GetUndoStep() const;
+	void CompletedUndoStep();
+	bool CanRedo() const;
+	int StartRedo();
+	const Action &GetRedoStep() const;
+	void CompletedRedoStep();
+};
+
+/**
+ * Holder for an expandable array of characters that supports undo and line markers.
+ * Based on article "Data Structures in a Bit-Mapped Text Editor"
+ * by Wilfred J. Hansen, Byte January 1987, page 183.
+ */
+class CellBuffer {
+private:
+	SplitVector<char> substance;
+	SplitVector<char> style;
+	bool readOnly;
+
+	bool collectingUndo;
+	UndoHistory uh;
+
+	LineVector lv;
+
+	SplitVector<int> lineStates;
+
+public:
+
+	CellBuffer();
+	~CellBuffer();
+
+	/// Retrieving positions outside the range of the buffer works and returns 0
+	char CharAt(int position) const;
+	void GetCharRange(char *buffer, int position, int lengthRetrieve);
+	char StyleAt(int position);
+	const char *BufferPointer();
+
+	int Length() const;
+	void Allocate(int newSize);
+	int Lines() const;
+	int LineStart(int line) const;
+	int LineFromPosition(int pos) { return lv.LineFromPosition(pos); }
+	void InsertLine(int line, int position);
+	void RemoveLine(int line);
+	const char *InsertString(int position, const char *s, int insertLength, bool &startSequence);
+
+	/// Setting styles for positions outside the range of the buffer is safe and has no effect.
+	/// @return true if the style of a character is changed.
+	bool SetStyleAt(int position, char styleValue, char mask='\377');
+	bool SetStyleFor(int position, int length, char styleValue, char mask);
+
+	const char *DeleteChars(int position, int deleteLength, bool &startSequence);
+
+	bool IsReadOnly();
+	void SetReadOnly(bool set);
+
+	/// The save point is a marker in the undo stack where the container has stated that
+	/// the buffer was saved. Undo and redo can move over the save point.
+	void SetSavePoint();
+	bool IsSavePoint();
+
+	/// Line marker functions
+	int AddMark(int line, int markerNum);
+	void DeleteMark(int line, int markerNum);
+	void DeleteMarkFromHandle(int markerHandle);
+	int GetMark(int line);
+	void DeleteAllMarks(int markerNum);
+	int LineFromHandle(int markerHandle);
+
+	/// Actions without undo
+	void BasicInsertString(int position, const char *s, int insertLength);
+	void BasicDeleteChars(int position, int deleteLength);
+
+	bool SetUndoCollection(bool collectUndo);
+	bool IsCollectingUndo();
+	void BeginUndoAction();
+	void EndUndoAction();
+	void DeleteUndoHistory();
+
+	/// To perform an undo, StartUndo is called to retrieve the number of steps, then UndoStep is
+	/// called that many times. Similarly for redo.
+	bool CanUndo();
+	int StartUndo();
+	const Action &GetUndoStep() const;
+	void PerformUndoStep();
+	bool CanRedo();
+	int StartRedo();
+	const Action &GetRedoStep() const;
+	void PerformRedoStep();
+
+	int SetLineState(int line, int state);
+	int GetLineState(int line);
+	int GetMaxLineState();
+
+	int SetLevel(int line, int level);
+	int GetLevel(int line);
+	void ClearLevels();
+};
+
+#ifdef SCI_NAMESPACE
+}
+#endif
+
+#endif

Added: trunk/plugins/scintilla/scintilla/Editor.cxx
==============================================================================
--- (empty file)
+++ trunk/plugins/scintilla/scintilla/Editor.cxx	Wed Apr  8 07:16:46 2009
@@ -0,0 +1,7601 @@
+// Scintilla source code edit control
+/** @file Editor.cxx
+ ** Main code for the edit control.
+ **/
+// Copyright 1998-2004 by Neil Hodgson <neilh scintilla org>
+// The License.txt file describes the conditions under which this software may be distributed.
+
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+#include <ctype.h>
+
+#include "Platform.h"
+
+#ifndef PLAT_QT
+#define INCLUDE_DEPRECATED_FEATURES
+#endif
+#include "Scintilla.h"
+
+#include "SplitVector.h"
+#include "Partitioning.h"
+#include "RunStyles.h"
+#include "ContractionState.h"
+#include "CellBuffer.h"
+#include "KeyMap.h"
+#include "Indicator.h"
+#include "XPM.h"
+#include "LineMarker.h"
+#include "Style.h"
+#include "ViewStyle.h"
+#include "CharClassify.h"
+#include "Decoration.h"
+#include "Document.h"
+#include "PositionCache.h"
+#include "Editor.h"
+
+#ifdef SCI_NAMESPACE
+using namespace Scintilla;
+#endif
+
+/*
+	return whether this modification represents an operation that
+	may reasonably be deferred (not done now OR [possibly] at all)
+*/
+static bool CanDeferToLastStep(const DocModification& mh) {
+	if (mh.modificationType & (SC_MOD_BEFOREINSERT | SC_MOD_BEFOREDELETE))
+		return true;	// CAN skip
+	if (!(mh.modificationType & (SC_PERFORMED_UNDO | SC_PERFORMED_REDO)))
+		return false;	// MUST do
+	if (mh.modificationType & SC_MULTISTEPUNDOREDO)
+		return true;	// CAN skip
+	return false;		// PRESUMABLY must do
+}
+
+static bool CanEliminate(const DocModification& mh) {
+	return
+	    (mh.modificationType & (SC_MOD_BEFOREINSERT | SC_MOD_BEFOREDELETE)) != 0;
+}
+
+/*
+	return whether this modification represents the FINAL step
+	in a [possibly lengthy] multi-step Undo/Redo sequence
+*/
+static bool IsLastStep(const DocModification& mh) {
+	return
+	    (mh.modificationType & (SC_PERFORMED_UNDO | SC_PERFORMED_REDO)) != 0
+	    && (mh.modificationType & SC_MULTISTEPUNDOREDO) != 0
+	    && (mh.modificationType & SC_LASTSTEPINUNDOREDO) != 0
+	    && (mh.modificationType & SC_MULTILINEUNDOREDO) != 0;
+}
+
+Caret::Caret() :
+		active(false), on(false), period(500) {}
+
+Timer::Timer() :
+		ticking(false), ticksToWait(0), tickerID(0) {}
+
+Idler::Idler() :
+		state(false), idlerID(0) {}
+
+static inline bool IsControlCharacter(int ch) {
+	// iscntrl returns true for lots of chars > 127 which are displayable
+	return ch >= 0 && ch < ' ';
+}
+
+Editor::Editor() {
+	ctrlID = 0;
+
+	stylesValid = false;
+
+	printMagnification = 0;
+	printColourMode = SC_PRINT_NORMAL;
+	printWrapState = eWrapWord;
+	cursorMode = SC_CURSORNORMAL;
+	controlCharSymbol = 0;	/* Draw the control characters */
+
+	hasFocus = false;
+	hideSelection = false;
+	inOverstrike = false;
+	errorStatus = 0;
+	mouseDownCaptures = true;
+
+	bufferedDraw = true;
+	twoPhaseDraw = true;
+
+	lastClickTime = 0;
+	dwellDelay = SC_TIME_FOREVER;
+	ticksToDwell = SC_TIME_FOREVER;
+	dwelling = false;
+	ptMouseLast.x = 0;
+	ptMouseLast.y = 0;
+	inDragDrop = ddNone;
+	dropWentOutside = false;
+	posDrag = invalidPosition;
+	posDrop = invalidPosition;
+	selectionType = selChar;
+
+	lastXChosen = 0;
+	lineAnchor = 0;
+	originalAnchorPos = 0;
+
+	selType = selStream;
+	moveExtendsSelection = false;
+	xStartSelect = 0;
+	xEndSelect = 0;
+	primarySelection = true;
+
+	caretXPolicy = CARET_SLOP | CARET_EVEN;
+	caretXSlop = 50;
+
+	caretYPolicy = CARET_EVEN;
+	caretYSlop = 0;
+
+	searchAnchor = 0;
+
+	xOffset = 0;
+	xCaretMargin = 50;
+	horizontalScrollBarVisible = true;
+	scrollWidth = 2000;
+	trackLineWidth = false;
+	lineWidthMaxSeen = 0;
+	verticalScrollBarVisible = true;
+	endAtLastLine = true;
+	caretSticky = false;
+
+	pixmapLine = Surface::Allocate();
+	pixmapSelMargin = Surface::Allocate();
+	pixmapSelPattern = Surface::Allocate();
+	pixmapIndentGuide = Surface::Allocate();
+	pixmapIndentGuideHighlight = Surface::Allocate();
+
+	currentPos = 0;
+	anchor = 0;
+
+	targetStart = 0;
+	targetEnd = 0;
+	searchFlags = 0;
+
+	topLine = 0;
+	posTopLine = 0;
+
+	lengthForEncode = -1;
+
+	needUpdateUI = true;
+	braces[0] = invalidPosition;
+	braces[1] = invalidPosition;
+	bracesMatchStyle = STYLE_BRACEBAD;
+	highlightGuideColumn = 0;
+
+	theEdge = 0;
+
+	paintState = notPainting;
+
+	modEventMask = SC_MODEVENTMASKALL;
+
+	pdoc = new Document();
+	pdoc->AddRef();
+	pdoc->AddWatcher(this, 0);
+
+	recordingMacro = false;
+	foldFlags = 0;
+
+	wrapState = eWrapNone;
+	wrapWidth = LineLayout::wrapWidthInfinite;
+	wrapStart = wrapLineLarge;
+	wrapEnd = wrapLineLarge;
+	wrapVisualFlags = 0;
+	wrapVisualFlagsLocation = 0;
+	wrapVisualStartIndent = 0;
+	actualWrapVisualStartIndent = 0;
+
+	convertPastes = true;
+
+	hsStart = -1;
+	hsEnd = -1;
+
+	llc.SetLevel(LineLayoutCache::llcCaret);
+	posCache.SetSize(0x400);
+}
+
+Editor::~Editor() {
+	pdoc->RemoveWatcher(this, 0);
+	pdoc->Release();
+	pdoc = 0;
+	DropGraphics();
+	delete pixmapLine;
+	delete pixmapSelMargin;
+	delete pixmapSelPattern;
+	delete pixmapIndentGuide;
+	delete pixmapIndentGuideHighlight;
+}
+
+void Editor::Finalise() {
+	SetIdle(false);
+	CancelModes();
+}
+
+void Editor::DropGraphics() {
+	pixmapLine->Release();
+	pixmapSelMargin->Release();
+	pixmapSelPattern->Release();
+	pixmapIndentGuide->Release();
+	pixmapIndentGuideHighlight->Release();
+}
+
+void Editor::InvalidateStyleData() {
+	stylesValid = false;
+	DropGraphics();
+	palette.Release();
+	llc.Invalidate(LineLayout::llInvalid);
+	posCache.Clear();
+	if (selType == selRectangle) {
+		xStartSelect = XFromPosition(anchor);
+		xEndSelect = XFromPosition(currentPos);
+	}
+}
+
+void Editor::InvalidateStyleRedraw() {
+	NeedWrapping();
+	InvalidateStyleData();
+	Redraw();
+}
+
+void Editor::RefreshColourPalette(Palette &pal, bool want) {
+	vs.RefreshColourPalette(pal, want);
+}
+
+void Editor::RefreshStyleData() {
+	if (!stylesValid) {
+		stylesValid = true;
+		AutoSurface surface(this);
+		if (surface) {
+			vs.Refresh(*surface);
+			RefreshColourPalette(palette, true);
+			palette.Allocate(wMain);
+			RefreshColourPalette(palette, false);
+		}
+		SetScrollBars();
+	}
+}
+
+PRectangle Editor::GetClientRectangle() {
+	return wMain.GetClientPosition();
+}
+
+PRectangle Editor::GetTextRectangle() {
+	PRectangle rc = GetClientRectangle();
+	rc.left += vs.fixedColumnWidth;
+	rc.right -= vs.rightMarginWidth;
+	return rc;
+}
+
+int Editor::LinesOnScreen() {
+	PRectangle rcClient = GetClientRectangle();
+	int htClient = rcClient.bottom - rcClient.top;
+	//Platform::DebugPrintf("lines on screen = %d\n", htClient / lineHeight + 1);
+	return htClient / vs.lineHeight;
+}
+
+int Editor::LinesToScroll() {
+	int retVal = LinesOnScreen() - 1;
+	if (retVal < 1)
+		return 1;
+	else
+		return retVal;
+}
+
+int Editor::MaxScrollPos() {
+	//Platform::DebugPrintf("Lines %d screen = %d maxScroll = %d\n",
+	//LinesTotal(), LinesOnScreen(), LinesTotal() - LinesOnScreen() + 1);
+	int retVal = cs.LinesDisplayed();
+	if (endAtLastLine) {
+		retVal -= LinesOnScreen();
+	} else {
+		retVal--;
+	}
+	if (retVal < 0) {
+		return 0;
+	} else {
+		return retVal;
+	}
+}
+
+const char *ControlCharacterString(unsigned char ch) {
+	const char *reps[] = {
+		"NUL", "SOH", "STX", "ETX", "EOT", "ENQ", "ACK", "BEL",
+		"BS", "HT", "LF", "VT", "FF", "CR", "SO", "SI",
+		"DLE", "DC1", "DC2", "DC3", "DC4", "NAK", "SYN", "ETB",
+		"CAN", "EM", "SUB", "ESC", "FS", "GS", "RS", "US"
+	};
+	if (ch < (sizeof(reps) / sizeof(reps[0]))) {
+		return reps[ch];
+	} else {
+		return "BAD";
+	}
+}
+
+/**
+ * Convenience class to ensure LineLayout objects are always disposed.
+ */
+class AutoLineLayout {
+	LineLayoutCache &llc;
+	LineLayout *ll;
+	AutoLineLayout &operator=(const AutoLineLayout &) { return * this; }
+public:
+	AutoLineLayout(LineLayoutCache &llc_, LineLayout *ll_) : llc(llc_), ll(ll_) {}
+	~AutoLineLayout() {
+		llc.Dispose(ll);
+		ll = 0;
+	}
+	LineLayout *operator->() const {
+		return ll;
+	}
+	operator LineLayout *() const {
+		return ll;
+	}
+	void Set(LineLayout *ll_) {
+		llc.Dispose(ll);
+		ll = ll_;
+	}
+};
+
+#ifdef SCI_NAMESPACE
+namespace Scintilla {
+#endif
+
+/**
+ * Allows to iterate through the lines of a selection.
+ * Althought it can be called for a stream selection, in most cases
+ * it is inefficient and it should be used only for
+ * a rectangular or a line selection.
+ */
+class SelectionLineIterator {
+private:
+	Editor *ed;
+	int line;	///< Current line within the iteration.
+	bool forward;	///< True if iterating by increasing line number, false otherwise.
+	int selStart, selEnd;	///< Positions of the start and end of the selection relative to the start of the document.
+	int minX, maxX;	///< Left and right of selection rectangle.
+
+public:
+	int lineStart, lineEnd;	///< Line numbers, first and last lines of the selection.
+	int startPos, endPos;	///< Positions of the beginning and end of the selection on the current line.
+
+	void Reset() {
+		if (forward) {
+			line = lineStart;
+		} else {
+			line = lineEnd;
+		}
+	}
+
+	SelectionLineIterator(Editor *ed_, bool forward_ = true) : line(0), startPos(0), endPos(0) {
+		ed = ed_;
+		forward = forward_;
+		selStart = ed->SelectionStart();
+		selEnd = ed->SelectionEnd();
+		lineStart = ed->pdoc->LineFromPosition(selStart);
+		lineEnd = ed->pdoc->LineFromPosition(selEnd);
+		// Left of rectangle
+		minX = Platform::Minimum(ed->xStartSelect, ed->xEndSelect);
+		// Right of rectangle
+		maxX = Platform::Maximum(ed->xStartSelect, ed->xEndSelect);
+		Reset();
+	}
+	~SelectionLineIterator() {}
+
+	void SetAt(int line) {
+		if (line < lineStart || line > lineEnd) {
+			startPos = endPos = INVALID_POSITION;
+		} else {
+			if (ed->selType == ed->selRectangle) {
+				// Measure line and return character closest to minX
+				startPos = ed->PositionFromLineX(line, minX);
+				// Measure line and return character closest to maxX
+				endPos = ed->PositionFromLineX(line, maxX);
+			} else if (ed->selType == ed->selLines) {
+				startPos = ed->pdoc->LineStart(line);
+				endPos = ed->pdoc->LineStart(line + 1);
+			} else {	// Stream selection, here only for completion
+				if (line == lineStart) {
+					startPos = selStart;
+				} else {
+					startPos = ed->pdoc->LineStart(line);
+				}
+				if (line == lineEnd) {
+					endPos = selEnd;
+				} else {
+					endPos = ed->pdoc->LineStart(line + 1);
+				}
+			}
+		}
+	}
+	bool Iterate() {
+		SetAt(line);
+		if (forward) {
+			line++;
+		} else {
+			line--;
+		}
+		return startPos != INVALID_POSITION;
+	}
+};
+
+#ifdef SCI_NAMESPACE
+}
+#endif
+
+Point Editor::LocationFromPosition(int pos) {
+	Point pt;
+	RefreshStyleData();
+	if (pos == INVALID_POSITION)
+		return pt;
+	int line = pdoc->LineFromPosition(pos);
+	int lineVisible = cs.DisplayFromDoc(line);
+	//Platform::DebugPrintf("line=%d\n", line);
+	AutoSurface surface(this);
+	AutoLineLayout ll(llc, RetrieveLineLayout(line));
+	if (surface && ll) {
+		// -1 because of adding in for visible lines in following loop.
+		pt.y = (lineVisible - topLine - 1) * vs.lineHeight;
+		pt.x = 0;
+		unsigned int posLineStart = pdoc->LineStart(line);
+		LayoutLine(line, surface, vs, ll, wrapWidth);
+		int posInLine = pos - posLineStart;
+		// In case of very long line put x at arbitrary large position
+		if (posInLine > ll->maxLineLength) {
+			pt.x = ll->positions[ll->maxLineLength] - ll->positions[ll->LineStart(ll->lines)];
+		}
+
+		for (int subLine = 0; subLine < ll->lines; subLine++) {
+			if ((posInLine >= ll->LineStart(subLine)) && (posInLine <= ll->LineStart(subLine + 1))) {
+				pt.x = ll->positions[posInLine] - ll->positions[ll->LineStart(subLine)];
+				if (actualWrapVisualStartIndent != 0) {
+					int lineStart = ll->LineStart(subLine);
+					if (lineStart != 0)	// Wrapped
+						pt.x += actualWrapVisualStartIndent * vs.aveCharWidth;
+				}
+			}
+			if (posInLine >= ll->LineStart(subLine)) {
+				pt.y += vs.lineHeight;
+			}
+		}
+		pt.x += vs.fixedColumnWidth - xOffset;
+	}
+	return pt;
+}
+
+int Editor::XFromPosition(int pos) {
+	Point pt = LocationFromPosition(pos);
+	return pt.x - vs.fixedColumnWidth + xOffset;
+}
+
+int Editor::LineFromLocation(Point pt) {
+	return cs.DocFromDisplay(pt.y / vs.lineHeight + topLine);
+}
+
+void Editor::SetTopLine(int topLineNew) {
+	topLine = topLineNew;
+	posTopLine = pdoc->LineStart(cs.DocFromDisplay(topLine));
+}
+
+int Editor::PositionFromLocation(Point pt) {
+	RefreshStyleData();
+	pt.x = pt.x - vs.fixedColumnWidth + xOffset;
+	int visibleLine = pt.y / vs.lineHeight + topLine;
+	if (pt.y < 0) {	// Division rounds towards 0
+		visibleLine = (pt.y - (vs.lineHeight - 1)) / vs.lineHeight + topLine;
+	}
+	if (visibleLine < 0)
+		visibleLine = 0;
+	int lineDoc = cs.DocFromDisplay(visibleLine);
+	if (lineDoc >= pdoc->LinesTotal())
+		return pdoc->Length();
+	unsigned int posLineStart = pdoc->LineStart(lineDoc);
+	int retVal = posLineStart;
+	AutoSurface surface(this);
+	AutoLineLayout ll(llc, RetrieveLineLayout(lineDoc));
+	if (surface && ll) {
+		LayoutLine(lineDoc, surface, vs, ll, wrapWidth);
+		int lineStartSet = cs.DisplayFromDoc(lineDoc);
+		int subLine = visibleLine - lineStartSet;
+		if (subLine < ll->lines) {
+			int lineStart = ll->LineStart(subLine);
+			int lineEnd = ll->LineLastVisible(subLine);
+			int subLineStart = ll->positions[lineStart];
+
+			if (actualWrapVisualStartIndent != 0) {
+				if (lineStart != 0)	// Wrapped
+					pt.x -= actualWrapVisualStartIndent * vs.aveCharWidth;
+			}
+			int i = ll->FindBefore(pt.x + subLineStart, lineStart, lineEnd);
+			while (i < lineEnd) {
+				if ((pt.x + subLineStart) < ((ll->positions[i] + ll->positions[i + 1]) / 2)) {
+					return pdoc->MovePositionOutsideChar(i + posLineStart, 1);
+				}
+				i++;
+			}
+			return lineEnd + posLineStart;
+		}
+		retVal = ll->numCharsInLine + posLineStart;
+	}
+	return retVal;
+}
+
+// Like PositionFromLocation but INVALID_POSITION returned when not near any text.
+int Editor::PositionFromLocationClose(Point pt) {
+	RefreshStyleData();
+	PRectangle rcClient = GetTextRectangle();
+	if (!rcClient.Contains(pt))
+		return INVALID_POSITION;
+	if (pt.x < vs.fixedColumnWidth)
+		return INVALID_POSITION;
+	if (pt.y < 0)
+		return INVALID_POSITION;
+	pt.x = pt.x - vs.fixedColumnWidth + xOffset;
+	int visibleLine = pt.y / vs.lineHeight + topLine;
+	if (pt.y < 0) {	// Division rounds towards 0
+		visibleLine = (pt.y - (vs.lineHeight - 1)) / vs.lineHeight + topLine;
+	}
+	int lineDoc = cs.DocFromDisplay(visibleLine);
+	if (lineDoc < 0)
+		return INVALID_POSITION;
+	if (lineDoc >= pdoc->LinesTotal())
+		return INVALID_POSITION;
+	AutoSurface surface(this);
+	AutoLineLayout ll(llc, RetrieveLineLayout(lineDoc));
+	if (surface && ll) {
+		LayoutLine(lineDoc, surface, vs, ll, wrapWidth);
+		unsigned int posLineStart = pdoc->LineStart(lineDoc);
+		int lineStartSet = cs.DisplayFromDoc(lineDoc);
+		int subLine = visibleLine - lineStartSet;
+		if (subLine < ll->lines) {
+			int lineStart = ll->LineStart(subLine);
+			int lineEnd = ll->LineLastVisible(subLine);
+			int subLineStart = ll->positions[lineStart];
+
+			if (actualWrapVisualStartIndent != 0) {
+				if (lineStart != 0)	// Wrapped
+					pt.x -= actualWrapVisualStartIndent * vs.aveCharWidth;
+			}
+			int i = ll->FindBefore(pt.x + subLineStart, lineStart, lineEnd);
+			while (i < lineEnd) {
+				if ((pt.x + subLineStart) < ((ll->positions[i] + ll->positions[i + 1]) / 2)) {
+					return pdoc->MovePositionOutsideChar(i + posLineStart, 1);
+				}
+				i++;
+			}
+			if (pt.x < (ll->positions[lineEnd] - subLineStart)) {
+				return pdoc->MovePositionOutsideChar(lineEnd + posLineStart, 1);
+			}
+		}
+	}
+
+	return INVALID_POSITION;
+}
+
+/**
+ * Find the document position corresponding to an x coordinate on a particular document line.
+ * Ensure is between whole characters when document is in multi-byte or UTF-8 mode.
+ */
+int Editor::PositionFromLineX(int lineDoc, int x) {
+	RefreshStyleData();
+	if (lineDoc >= pdoc->LinesTotal())
+		return pdoc->Length();
+	//Platform::DebugPrintf("Position of (%d,%d) line = %d top=%d\n", pt.x, pt.y, line, topLine);
+	AutoSurface surface(this);
+	AutoLineLayout ll(llc, RetrieveLineLayout(lineDoc));
+	int retVal = 0;
+	if (surface && ll) {
+		unsigned int posLineStart = pdoc->LineStart(lineDoc);
+		LayoutLine(lineDoc, surface, vs, ll, wrapWidth);
+		retVal = ll->numCharsInLine + posLineStart;
+		int subLine = 0;
+		int lineStart = ll->LineStart(subLine);
+		int lineEnd = ll->LineLastVisible(subLine);
+		int subLineStart = ll->positions[lineStart];
+
+		if (actualWrapVisualStartIndent != 0) {
+			if (lineStart != 0)	// Wrapped
+				x -= actualWrapVisualStartIndent * vs.aveCharWidth;
+		}
+		int i = ll->FindBefore(x + subLineStart, lineStart, lineEnd);
+		while (i < lineEnd) {
+			if ((x + subLineStart) < ((ll->positions[i] + ll->positions[i + 1]) / 2)) {
+				retVal = pdoc->MovePositionOutsideChar(i + posLineStart, 1);
+				break;
+			}
+			i++;
+		}
+	}
+	return retVal;
+}
+
+/**
+ * If painting then abandon the painting because a wider redraw is needed.
+ * @return true if calling code should stop drawing.
+ */
+bool Editor::AbandonPaint() {
+	if ((paintState == painting) && !paintingAllText) {
+		paintState = paintAbandoned;
+	}
+	return paintState == paintAbandoned;
+}
+
+void Editor::RedrawRect(PRectangle rc) {
+	//Platform::DebugPrintf("Redraw %0d,%0d - %0d,%0d\n", rc.left, rc.top, rc.right, rc.bottom);
+
+	// Clip the redraw rectangle into the client area
+	PRectangle rcClient = GetClientRectangle();
+	if (rc.top < rcClient.top)
+		rc.top = rcClient.top;
+	if (rc.bottom > rcClient.bottom)
+		rc.bottom = rcClient.bottom;
+	if (rc.left < rcClient.left)
+		rc.left = rcClient.left;
+	if (rc.right > rcClient.right)
+		rc.right = rcClient.right;
+
+	if ((rc.bottom > rc.top) && (rc.right > rc.left)) {
+		wMain.InvalidateRectangle(rc);
+	}
+}
+
+void Editor::Redraw() {
+	//Platform::DebugPrintf("Redraw all\n");
+	PRectangle rcClient = GetClientRectangle();
+	wMain.InvalidateRectangle(rcClient);
+	//wMain.InvalidateAll();
+}
+
+void Editor::RedrawSelMargin(int line) {
+	if (!AbandonPaint()) {
+		if (vs.maskInLine) {
+			Redraw();
+		} else {
+			PRectangle rcSelMargin = GetClientRectangle();
+			rcSelMargin.right = vs.fixedColumnWidth;
+			if (line != -1) {
+				int position = pdoc->LineStart(line);
+				PRectangle rcLine = RectangleFromRange(position, position);
+				rcSelMargin.top = rcLine.top;
+				rcSelMargin.bottom = rcLine.bottom;
+			}
+			wMain.InvalidateRectangle(rcSelMargin);
+		}
+	}
+}
+
+PRectangle Editor::RectangleFromRange(int start, int end) {
+	int minPos = start;
+	if (minPos > end)
+		minPos = end;
+	int maxPos = start;
+	if (maxPos < end)
+		maxPos = end;
+	int minLine = cs.DisplayFromDoc(pdoc->LineFromPosition(minPos));
+	int lineDocMax = pdoc->LineFromPosition(maxPos);
+	int maxLine = cs.DisplayFromDoc(lineDocMax) + cs.GetHeight(lineDocMax) - 1;
+	PRectangle rcClient = GetTextRectangle();
+	PRectangle rc;
+	rc.left = vs.fixedColumnWidth;
+	rc.top = (minLine - topLine) * vs.lineHeight;
+	if (rc.top < 0)
+		rc.top = 0;
+	rc.right = rcClient.right;
+	rc.bottom = (maxLine - topLine + 1) * vs.lineHeight;
+	// Ensure PRectangle is within 16 bit space
+	rc.top = Platform::Clamp(rc.top, -32000, 32000);
+	rc.bottom = Platform::Clamp(rc.bottom, -32000, 32000);
+
+	return rc;
+}
+
+void Editor::InvalidateRange(int start, int end) {
+	RedrawRect(RectangleFromRange(start, end));
+}
+
+int Editor::CurrentPosition() {
+	return currentPos;
+}
+
+bool Editor::SelectionEmpty() {
+	return anchor == currentPos;
+}
+
+int Editor::SelectionStart() {
+	return Platform::Minimum(currentPos, anchor);
+}
+
+int Editor::SelectionEnd() {
+	return Platform::Maximum(currentPos, anchor);
+}
+
+void Editor::SetRectangularRange() {
+	if (selType == selRectangle) {
+		xStartSelect = XFromPosition(anchor);
+		xEndSelect = XFromPosition(currentPos);
+	}
+}
+
+void Editor::InvalidateSelection(int currentPos_, int anchor_, bool invalidateWholeSelection) {
+	if (anchor != anchor_ || selType == selRectangle) {
+		invalidateWholeSelection = true;
+	}
+	int firstAffected = currentPos;
+	if (invalidateWholeSelection) {
+		if (firstAffected > anchor)
+			firstAffected = anchor;
+		if (firstAffected > anchor_)
+			firstAffected = anchor_;
+	}
+	if (firstAffected > currentPos_)
+		firstAffected = currentPos_;
+	int lastAffected = currentPos;
+	if (invalidateWholeSelection) {
+		if (lastAffected < anchor)
+			lastAffected = anchor;
+		if (lastAffected < anchor_)
+			lastAffected = anchor_;
+	}
+	if (lastAffected < (currentPos_ + 1))	// +1 ensures caret repainted
+		lastAffected = (currentPos_ + 1);
+	needUpdateUI = true;
+	InvalidateRange(firstAffected, lastAffected);
+}
+
+void Editor::SetSelection(int currentPos_, int anchor_) {
+	currentPos_ = pdoc->ClampPositionIntoDocument(currentPos_);
+	anchor_ = pdoc->ClampPositionIntoDocument(anchor_);
+	if ((currentPos != currentPos_) || (anchor != anchor_)) {
+		InvalidateSelection(currentPos_, anchor_, true);
+		currentPos = currentPos_;
+		anchor = anchor_;
+	}
+	SetRectangularRange();
+	ClaimSelection();
+}
+
+void Editor::SetSelection(int currentPos_) {
+	currentPos_ = pdoc->ClampPositionIntoDocument(currentPos_);
+	if (currentPos != currentPos_) {
+		InvalidateSelection(currentPos_, anchor, false);
+		currentPos = currentPos_;
+	}
+	SetRectangularRange();
+	ClaimSelection();
+}
+
+void Editor::SetEmptySelection(int currentPos_) {
+	selType = selStream;
+	moveExtendsSelection = false;
+	SetSelection(currentPos_, currentPos_);
+}
+
+bool Editor::RangeContainsProtected(int start, int end) const {
+	if (vs.ProtectionActive()) {
+		if (start > end) {
+			int t = start;
+			start = end;
+			end = t;
+		}
+		int mask = pdoc->stylingBitsMask;
+		for (int pos = start; pos < end; pos++) {
+			if (vs.styles[pdoc->StyleAt(pos) & mask].IsProtected())
+				return true;
+		}
+	}
+	return false;
+}
+
+bool Editor::SelectionContainsProtected() {
+	// DONE, but untested...: make support rectangular selection
+	bool scp = false;
+	if (selType == selStream) {
+		scp = RangeContainsProtected(anchor, currentPos);
+	} else {
+		SelectionLineIterator lineIterator(this);
+		while (lineIterator.Iterate()) {
+			if (RangeContainsProtected(lineIterator.startPos, lineIterator.endPos)) {
+				scp = true;
+				break;
+			}
+		}
+	}
+	return scp;
+}
+
+/**
+ * Asks document to find a good position and then moves out of any invisible positions.
+ */
+int Editor::MovePositionOutsideChar(int pos, int moveDir, bool checkLineEnd) {
+	pos = pdoc->MovePositionOutsideChar(pos, moveDir, checkLineEnd);
+	if (vs.ProtectionActive()) {
+		int mask = pdoc->stylingBitsMask;
+		if (moveDir > 0) {
+			if ((pos > 0) && vs.styles[pdoc->StyleAt(pos - 1) & mask].IsProtected()) {
+				while ((pos < pdoc->Length()) &&
+				        (vs.styles[pdoc->StyleAt(pos) & mask].IsProtected()))
+					pos++;
+			}
+		} else if (moveDir < 0) {
+			if (vs.styles[pdoc->StyleAt(pos) & mask].IsProtected()) {
+				while ((pos > 0) &&
+				        (vs.styles[pdoc->StyleAt(pos - 1) & mask].IsProtected()))
+					pos--;
+			}
+		}
+	}
+	return pos;
+}
+
+int Editor::MovePositionTo(int newPos, selTypes sel, bool ensureVisible) {
+	int delta = newPos - currentPos;
+	newPos = pdoc->ClampPositionIntoDocument(newPos);
+	newPos = MovePositionOutsideChar(newPos, delta);
+	if (sel != noSel) {
+		selType = sel;
+	}
+	if (sel != noSel || moveExtendsSelection) {
+		SetSelection(newPos);
+	} else {
+		SetEmptySelection(newPos);
+	}
+	ShowCaretAtCurrentPosition();
+	if (ensureVisible) {
+		EnsureCaretVisible();
+	}
+	NotifyMove(newPos);
+	return 0;
+}
+
+int Editor::MovePositionSoVisible(int pos, int moveDir) {
+	pos = pdoc->ClampPositionIntoDocument(pos);
+	pos = MovePositionOutsideChar(pos, moveDir);
+	int lineDoc = pdoc->LineFromPosition(pos);
+	if (cs.GetVisible(lineDoc)) {
+		return pos;
+	} else {
+		int lineDisplay = cs.DisplayFromDoc(lineDoc);
+		if (moveDir > 0) {
+			// lineDisplay is already line before fold as lines in fold use display line of line after fold
+			lineDisplay = Platform::Clamp(lineDisplay, 0, cs.LinesDisplayed());
+			return pdoc->LineStart(cs.DocFromDisplay(lineDisplay));
+		} else {
+			lineDisplay = Platform::Clamp(lineDisplay - 1, 0, cs.LinesDisplayed());
+			return pdoc->LineEnd(cs.DocFromDisplay(lineDisplay));
+		}
+	}
+}
+
+/**
+ * Choose the x position that the caret will try to stick to
+ * as it moves up and down.
+ */
+void Editor::SetLastXChosen() {
+	Point pt = LocationFromPosition(currentPos);
+	lastXChosen = pt.x;
+}
+
+void Editor::ScrollTo(int line, bool moveThumb) {
+	int topLineNew = Platform::Clamp(line, 0, MaxScrollPos());
+	if (topLineNew != topLine) {
+		// Try to optimise small scrolls
+		int linesToMove = topLine - topLineNew;
+		SetTopLine(topLineNew);
+		ShowCaretAtCurrentPosition();
+		// Perform redraw rather than scroll if many lines would be redrawn anyway.
+#ifndef UNDER_CE
+		if ((abs(linesToMove) <= 10) && (paintState == notPainting)) {
+			ScrollText(linesToMove);
+		} else {
+			Redraw();
+		}
+#else
+		Redraw();
+#endif
+		if (moveThumb) {
+			SetVerticalScrollPos();
+		}
+	}
+}
+
+void Editor::ScrollText(int /* linesToMove */) {
+	//Platform::DebugPrintf("Editor::ScrollText %d\n", linesToMove);
+	Redraw();
+}
+
+void Editor::HorizontalScrollTo(int xPos) {
+	//Platform::DebugPrintf("HorizontalScroll %d\n", xPos);
+	if (xPos < 0)
+		xPos = 0;
+	if ((wrapState == eWrapNone) && (xOffset != xPos)) {
+		xOffset = xPos;
+		SetHorizontalScrollPos();
+		RedrawRect(GetClientRectangle());
+	}
+}
+
+void Editor::MoveCaretInsideView(bool ensureVisible) {
+	PRectangle rcClient = GetTextRectangle();
+	Point pt = LocationFromPosition(currentPos);
+	if (pt.y < rcClient.top) {
+		MovePositionTo(PositionFromLocation(
+		            Point(lastXChosen, rcClient.top)),
+		        noSel, ensureVisible);
+	} else if ((pt.y + vs.lineHeight - 1) > rcClient.bottom) {
+		int yOfLastLineFullyDisplayed = rcClient.top + (LinesOnScreen() - 1) * vs.lineHeight;
+		MovePositionTo(PositionFromLocation(
+		            Point(lastXChosen, rcClient.top + yOfLastLineFullyDisplayed)),
+		        noSel, ensureVisible);
+	}
+}
+
+int Editor::DisplayFromPosition(int pos) {
+	int lineDoc = pdoc->LineFromPosition(pos);
+	int lineDisplay = cs.DisplayFromDoc(lineDoc);
+	AutoSurface surface(this);
+	AutoLineLayout ll(llc, RetrieveLineLayout(lineDoc));
+	if (surface && ll) {
+		LayoutLine(lineDoc, surface, vs, ll, wrapWidth);
+		unsigned int posLineStart = pdoc->LineStart(lineDoc);
+		int posInLine = pos - posLineStart;
+		lineDisplay--; // To make up for first increment ahead.
+		for (int subLine = 0; subLine < ll->lines; subLine++) {
+			if (posInLine >= ll->LineStart(subLine)) {
+				lineDisplay++;
+			}
+		}
+	}
+	return lineDisplay;
+}
+
+/**
+ * Ensure the caret is reasonably visible in context.
+ *
+Caret policy in SciTE
+
+If slop is set, we can define a slop value.
+This value defines an unwanted zone (UZ) where the caret is... unwanted.
+This zone is defined as a number of pixels near the vertical margins,
+and as a number of lines near the horizontal margins.
+By keeping the caret away from the edges, it is seen within its context,
+so it is likely that the identifier that the caret is on can be completely seen,
+and that the current line is seen with some of the lines following it which are
+often dependent on that line.
+
+If strict is set, the policy is enforced... strictly.
+The caret is centred on the display if slop is not set,
+and cannot go in the UZ if slop is set.
+
+If jumps is set, the display is moved more energetically
+so the caret can move in the same direction longer before the policy is applied again.
+'3UZ' notation is used to indicate three time the size of the UZ as a distance to the margin.
+
+If even is not set, instead of having symmetrical UZs,
+the left and bottom UZs are extended up to right and top UZs respectively.
+This way, we favour the displaying of useful information: the begining of lines,
+where most code reside, and the lines after the caret, eg. the body of a function.
+
+     |        |       |      |                                            |
+slop | strict | jumps | even | Caret can go to the margin                 | When reaching limitÝcaret going out of
+     |        |       |      |                                            | visibility or going into the UZ) display is...
+-----+--------+-------+------+--------------------------------------------+--------------------------------------------------------------
+  0  |   0    |   0   |   0  | Yes                                        | moved to put caret on top/on right
+  0  |   0    |   0   |   1  | Yes                                        | moved by one position
+  0  |   0    |   1   |   0  | Yes                                        | moved to put caret on top/on right
+  0  |   0    |   1   |   1  | Yes                                        | centred on the caret
+  0  |   1    |   -   |   0  | Caret is always on top/on right of display | -
+  0  |   1    |   -   |   1  | No, caret is always centred                | -
+  1  |   0    |   0   |   0  | Yes                                        | moved to put caret out of the asymmetrical UZ
+  1  |   0    |   0   |   1  | Yes                                        | moved to put caret out of the UZ
+  1  |   0    |   1   |   0  | Yes                                        | moved to put caret at 3UZ of the top or right margin
+  1  |   0    |   1   |   1  | Yes                                        | moved to put caret at 3UZ of the margin
+  1  |   1    |   -   |   0  | Caret is always at UZ of top/right margin  | -
+  1  |   1    |   0   |   1  | No, kept out of UZ                         | moved by one position
+  1  |   1    |   1   |   1  | No, kept out of UZ                         | moved to put caret at 3UZ of the margin
+*/
+void Editor::EnsureCaretVisible(bool useMargin, bool vert, bool horiz) {
+	//Platform::DebugPrintf("EnsureCaretVisible %d %s\n", xOffset, useMargin ? " margin" : " ");
+	PRectangle rcClient = GetTextRectangle();
+	//int rcClientFullWidth = rcClient.Width();
+	int posCaret = currentPos;
+	if (posDrag >= 0) {
+		posCaret = posDrag;
+	}
+	Point pt = LocationFromPosition(posCaret);
+	Point ptBottomCaret = pt;
+	ptBottomCaret.y += vs.lineHeight - 1;
+	int lineCaret = DisplayFromPosition(posCaret);
+	bool bSlop, bStrict, bJump, bEven;
+
+	// Vertical positioning
+	if (vert && (pt.y < rcClient.top || ptBottomCaret.y > rcClient.bottom || (caretYPolicy & CARET_STRICT) != 0)) {
+		int linesOnScreen = LinesOnScreen();
+		int halfScreen = Platform::Maximum(linesOnScreen - 1, 2) / 2;
+		int newTopLine = topLine;
+		bSlop = (caretYPolicy & CARET_SLOP) != 0;
+		bStrict = (caretYPolicy & CARET_STRICT) != 0;
+		bJump = (caretYPolicy & CARET_JUMPS) != 0;
+		bEven = (caretYPolicy & CARET_EVEN) != 0;
+
+		// It should be possible to scroll the window to show the caret,
+		// but this fails to remove the caret on GTK+
+		if (bSlop) {	// A margin is defined
+			int yMoveT, yMoveB;
+			if (bStrict) {
+				int yMarginT, yMarginB;
+				if (!useMargin) {
+					// In drag mode, avoid moves
+					// otherwise, a double click will select several lines.
+					yMarginT = yMarginB = 0;
+				} else {
+					// yMarginT must equal to caretYSlop, with a minimum of 1 and
+					// a maximum of slightly less than half the heigth of the text area.
+					yMarginT = Platform::Clamp(caretYSlop, 1, halfScreen);
+					if (bEven) {
+						yMarginB = yMarginT;
+					} else {
+						yMarginB = linesOnScreen - yMarginT - 1;
+					}
+				}
+				yMoveT = yMarginT;
+				if (bEven) {
+					if (bJump) {
+						yMoveT = Platform::Clamp(caretYSlop * 3, 1, halfScreen);
+					}
+					yMoveB = yMoveT;
+				} else {
+					yMoveB = linesOnScreen - yMoveT - 1;
+				}
+				if (lineCaret < topLine + yMarginT) {
+					// Caret goes too high
+					newTopLine = lineCaret - yMoveT;
+				} else if (lineCaret > topLine + linesOnScreen - 1 - yMarginB) {
+					// Caret goes too low
+					newTopLine = lineCaret - linesOnScreen + 1 + yMoveB;
+				}
+			} else {	// Not strict
+				yMoveT = bJump ? caretYSlop * 3 : caretYSlop;
+				yMoveT = Platform::Clamp(yMoveT, 1, halfScreen);
+				if (bEven) {
+					yMoveB = yMoveT;
+				} else {
+					yMoveB = linesOnScreen - yMoveT - 1;
+				}
+				if (lineCaret < topLine) {
+					// Caret goes too high
+					newTopLine = lineCaret - yMoveT;
+				} else if (lineCaret > topLine + linesOnScreen - 1) {
+					// Caret goes too low
+					newTopLine = lineCaret - linesOnScreen + 1 + yMoveB;
+				}
+			}
+		} else {	// No slop
+			if (!bStrict && !bJump) {
+				// Minimal move
+				if (lineCaret < topLine) {
+					// Caret goes too high
+					newTopLine = lineCaret;
+				} else if (lineCaret > topLine + linesOnScreen - 1) {
+					// Caret goes too low
+					if (bEven) {
+						newTopLine = lineCaret - linesOnScreen + 1;
+					} else {
+						newTopLine = lineCaret;
+					}
+				}
+			} else {	// Strict or going out of display
+				if (bEven) {
+					// Always center caret
+					newTopLine = lineCaret - halfScreen;
+				} else {
+					// Always put caret on top of display
+					newTopLine = lineCaret;
+				}
+			}
+		}
+		newTopLine = Platform::Clamp(newTopLine, 0, MaxScrollPos());
+		if (newTopLine != topLine) {
+			Redraw();
+			SetTopLine(newTopLine);
+			SetVerticalScrollPos();
+		}
+	}
+
+	// Horizontal positioning
+	if (horiz && (wrapState == eWrapNone)) {
+		int halfScreen = Platform::Maximum(rcClient.Width() - 4, 4) / 2;
+		int xOffsetNew = xOffset;
+		bSlop = (caretXPolicy & CARET_SLOP) != 0;
+		bStrict = (caretXPolicy & CARET_STRICT) != 0;
+		bJump = (caretXPolicy & CARET_JUMPS) != 0;
+		bEven = (caretXPolicy & CARET_EVEN) != 0;
+
+		if (bSlop) {	// A margin is defined
+			int xMoveL, xMoveR;
+			if (bStrict) {
+				int xMarginL, xMarginR;
+				if (!useMargin) {
+					// In drag mode, avoid moves unless very near of the margin
+					// otherwise, a simple click will select text.
+					xMarginL = xMarginR = 2;
+				} else {
+					// xMargin must equal to caretXSlop, with a minimum of 2 and
+					// a maximum of slightly less than half the width of the text area.
+					xMarginR = Platform::Clamp(caretXSlop, 2, halfScreen);
+					if (bEven) {
+						xMarginL = xMarginR;
+					} else {
+						xMarginL = rcClient.Width() - xMarginR - 4;
+					}
+				}
+				if (bJump && bEven) {
+					// Jump is used only in even mode
+					xMoveL = xMoveR = Platform::Clamp(caretXSlop * 3, 1, halfScreen);
+				} else {
+					xMoveL = xMoveR = 0;	// Not used, avoid a warning
+				}
+				if (pt.x < rcClient.left + xMarginL) {
+					// Caret is on the left of the display
+					if (bJump && bEven) {
+						xOffsetNew -= xMoveL;
+					} else {
+						// Move just enough to allow to display the caret
+						xOffsetNew -= (rcClient.left + xMarginL) - pt.x;
+					}
+				} else if (pt.x >= rcClient.right - xMarginR) {
+					// Caret is on the right of the display
+					if (bJump && bEven) {
+						xOffsetNew += xMoveR;
+					} else {
+						// Move just enough to allow to display the caret
+						xOffsetNew += pt.x - (rcClient.right - xMarginR) + 1;
+					}
+				}
+			} else {	// Not strict
+				xMoveR = bJump ? caretXSlop * 3 : caretXSlop;
+				xMoveR = Platform::Clamp(xMoveR, 1, halfScreen);
+				if (bEven) {
+					xMoveL = xMoveR;
+				} else {
+					xMoveL = rcClient.Width() - xMoveR - 4;
+				}
+				if (pt.x < rcClient.left) {
+					// Caret is on the left of the display
+					xOffsetNew -= xMoveL;
+				} else if (pt.x >= rcClient.right) {
+					// Caret is on the right of the display
+					xOffsetNew += xMoveR;
+				}
+			}
+		} else {	// No slop
+			if (bStrict ||
+			        (bJump && (pt.x < rcClient.left || pt.x >= rcClient.right))) {
+				// Strict or going out of display
+				if (bEven) {
+					// Center caret
+					xOffsetNew += pt.x - rcClient.left - halfScreen;
+				} else {
+					// Put caret on right
+					xOffsetNew += pt.x - rcClient.right + 1;
+				}
+			} else {
+				// Move just enough to allow to display the caret
+				if (pt.x < rcClient.left) {
+					// Caret is on the left of the display
+					if (bEven) {
+						xOffsetNew -= rcClient.left - pt.x;
+					} else {
+						xOffsetNew += pt.x - rcClient.right + 1;
+					}
+				} else if (pt.x >= rcClient.right) {
+					// Caret is on the right of the display
+					xOffsetNew += pt.x - rcClient.right + 1;
+				}
+			}
+		}
+		// In case of a jump (find result) largely out of display, adjust the offset to display the caret
+		if (pt.x + xOffset < rcClient.left + xOffsetNew) {
+			xOffsetNew = pt.x + xOffset - rcClient.left;
+		} else if (pt.x + xOffset >= rcClient.right + xOffsetNew) {
+			xOffsetNew = pt.x + xOffset - rcClient.right + 1;
+			if (vs.caretStyle == CARETSTYLE_BLOCK) {
+				// Ensure we can see a good portion of the block caret
+				xOffsetNew += vs.aveCharWidth;
+			}
+		}
+		if (xOffsetNew < 0) {
+			xOffsetNew = 0;
+		}
+		if (xOffset != xOffsetNew) {
+			xOffset = xOffsetNew;
+			if (xOffsetNew > 0) {
+				PRectangle rcText = GetTextRectangle();
+				if (horizontalScrollBarVisible &&
+				        rcText.Width() + xOffset > scrollWidth) {
+					scrollWidth = xOffset + rcText.Width();
+					SetScrollBars();
+				}
+			}
+			SetHorizontalScrollPos();
+			Redraw();
+		}
+	}
+	UpdateSystemCaret();
+}
+
+void Editor::ShowCaretAtCurrentPosition() {
+	if (hasFocus) {
+		caret.active = true;
+		caret.on = true;
+		SetTicking(true);
+	} else {
+		caret.active = false;
+		caret.on = false;
+	}
+	InvalidateCaret();
+}
+
+void Editor::DropCaret() {
+	caret.active = false;
+	InvalidateCaret();
+}
+
+void Editor::InvalidateCaret() {
+	if (posDrag >= 0)
+		InvalidateRange(posDrag, posDrag + 1);
+	else
+		InvalidateRange(currentPos, currentPos + 1);
+	UpdateSystemCaret();
+}
+
+void Editor::UpdateSystemCaret() {
+}
+
+void Editor::NeedWrapping(int docLineStart, int docLineEnd) {
+	docLineStart = Platform::Clamp(docLineStart, 0, pdoc->LinesTotal());
+	if (wrapStart > docLineStart) {
+		wrapStart = docLineStart;
+		llc.Invalidate(LineLayout::llPositions);
+	}
+	if (wrapEnd < docLineEnd) {
+		wrapEnd = docLineEnd;
+	}
+	wrapEnd = Platform::Clamp(wrapEnd, 0, pdoc->LinesTotal());
+	// Wrap lines during idle.
+	if ((wrapState != eWrapNone) && (wrapEnd != wrapStart)) {
+		SetIdle(true);
+	}
+}
+
+bool Editor::WrapOneLine(Surface *surface, int lineToWrap) {
+	AutoLineLayout ll(llc, RetrieveLineLayout(lineToWrap));
+	int linesWrapped = 1;
+	if (ll) {
+		LayoutLine(lineToWrap, surface, vs, ll, wrapWidth);
+		linesWrapped = ll->lines;
+	}
+	return cs.SetHeight(lineToWrap, linesWrapped);
+}
+
+// Check if wrapping needed and perform any needed wrapping.
+// fullwrap: if true, all lines which need wrapping will be done,
+//           in this single call.
+// priorityWrapLineStart: If greater than zero, all lines starting from
+//           here to 1 page + 100 lines past will be wrapped (even if there are
+//           more lines under wrapping process in idle).
+// If it is neither fullwrap, nor priorityWrap, then 1 page + 100 lines will be
+// wrapped, if there are any wrapping going on in idle. (Generally this
+// condition is called only from idler).
+// Return true if wrapping occurred.
+bool Editor::WrapLines(bool fullWrap, int priorityWrapLineStart) {
+	// If there are any pending wraps, do them during idle if possible.
+	int linesInOneCall = LinesOnScreen() + 100;
+	if (wrapState != eWrapNone) {
+		if (wrapStart < wrapEnd) {
+			if (!SetIdle(true)) {
+				// Idle processing not supported so full wrap required.
+				fullWrap = true;
+			}
+		}
+		if (!fullWrap && priorityWrapLineStart >= 0 &&
+		        // .. and if the paint window is outside pending wraps
+		        (((priorityWrapLineStart + linesInOneCall) < wrapStart) ||
+		         (priorityWrapLineStart > wrapEnd))) {
+			// No priority wrap pending
+			return false;
+		}
+	}
+	int goodTopLine = topLine;
+	bool wrapOccurred = false;
+	if (wrapStart <= pdoc->LinesTotal()) {
+		if (wrapState == eWrapNone) {
+			if (wrapWidth != LineLayout::wrapWidthInfinite) {
+				wrapWidth = LineLayout::wrapWidthInfinite;
+				for (int lineDoc = 0; lineDoc < pdoc->LinesTotal(); lineDoc++) {
+					cs.SetHeight(lineDoc, 1);
+				}
+				wrapOccurred = true;
+			}
+			wrapStart = wrapLineLarge;
+			wrapEnd = wrapLineLarge;
+		} else {
+			if (wrapEnd >= pdoc->LinesTotal())
+				wrapEnd = pdoc->LinesTotal();
+			//ElapsedTime et;
+			int lineDocTop = cs.DocFromDisplay(topLine);
+			int subLineTop = topLine - cs.DisplayFromDoc(lineDocTop);
+			PRectangle rcTextArea = GetClientRectangle();
+			rcTextArea.left = vs.fixedColumnWidth;
+			rcTextArea.right -= vs.rightMarginWidth;
+			wrapWidth = rcTextArea.Width();
+			// Ensure all of the document is styled.
+			pdoc->EnsureStyledTo(pdoc->Length());
+			RefreshStyleData();
+			AutoSurface surface(this);
+			if (surface) {
+				bool priorityWrap = false;
+				int lastLineToWrap = wrapEnd;
+				int lineToWrap = wrapStart;
+				if (!fullWrap) {
+					if (priorityWrapLineStart >= 0) {
+						// This is a priority wrap.
+						lineToWrap = priorityWrapLineStart;
+						lastLineToWrap = priorityWrapLineStart + linesInOneCall;
+						priorityWrap = true;
+					} else {
+						// This is idle wrap.
+						lastLineToWrap = wrapStart + linesInOneCall;
+					}
+					if (lastLineToWrap >= wrapEnd)
+						lastLineToWrap = wrapEnd;
+				} // else do a fullWrap.
+
+				// Platform::DebugPrintf("Wraplines: full = %d, priorityStart = %d (wrapping: %d to %d)\n", fullWrap, priorityWrapLineStart, lineToWrap, lastLineToWrap);
+				// Platform::DebugPrintf("Pending wraps: %d to %d\n", wrapStart, wrapEnd);
+				while (lineToWrap < lastLineToWrap) {
+					if (WrapOneLine(surface, lineToWrap)) {
+						wrapOccurred = true;
+					}
+					lineToWrap++;
+				}
+				if (!priorityWrap)
+					wrapStart = lineToWrap;
+				// If wrapping is done, bring it to resting position
+				if (wrapStart >= wrapEnd) {
+					wrapStart = wrapLineLarge;
+					wrapEnd = wrapLineLarge;
+				}
+			}
+			goodTopLine = cs.DisplayFromDoc(lineDocTop);
+			if (subLineTop < cs.GetHeight(lineDocTop))
+				goodTopLine += subLineTop;
+			else
+				goodTopLine += cs.GetHeight(lineDocTop);
+			//double durWrap = et.Duration(true);
+			//Platform::DebugPrintf("Wrap:%9.6g \n", durWrap);
+		}
+	}
+	if (wrapOccurred) {
+		SetScrollBars();
+		SetTopLine(Platform::Clamp(goodTopLine, 0, MaxScrollPos()));
+		SetVerticalScrollPos();
+	}
+	return wrapOccurred;
+}
+
+void Editor::LinesJoin() {
+	if (!RangeContainsProtected(targetStart, targetEnd)) {
+		pdoc->BeginUndoAction();
+		bool prevNonWS = true;
+		for (int pos = targetStart; pos < targetEnd; pos++) {
+			if (IsEOLChar(pdoc->CharAt(pos))) {
+				targetEnd -= pdoc->LenChar(pos);
+				pdoc->DelChar(pos);
+				if (prevNonWS) {
+					// Ensure at least one space separating previous lines
+					pdoc->InsertChar(pos, ' ');
+					targetEnd++;
+				}
+			} else {
+				prevNonWS = pdoc->CharAt(pos) != ' ';
+			}
+		}
+		pdoc->EndUndoAction();
+	}
+}
+
+const char *Editor::StringFromEOLMode(int eolMode) {
+	if (eolMode == SC_EOL_CRLF) {
+		return "\r\n";
+	} else if (eolMode == SC_EOL_CR) {
+		return "\r";
+	} else {
+		return "\n";
+	}
+}
+
+void Editor::LinesSplit(int pixelWidth) {
+	if (!RangeContainsProtected(targetStart, targetEnd)) {
+		if (pixelWidth == 0) {
+			PRectangle rcText = GetTextRectangle();
+			pixelWidth = rcText.Width();
+		}
+		int lineStart = pdoc->LineFromPosition(targetStart);
+		int lineEnd = pdoc->LineFromPosition(targetEnd);
+		const char *eol = StringFromEOLMode(pdoc->eolMode);
+		pdoc->BeginUndoAction();
+		for (int line = lineStart; line <= lineEnd; line++) {
+			AutoSurface surface(this);
+			AutoLineLayout ll(llc, RetrieveLineLayout(line));
+			if (surface && ll) {
+				unsigned int posLineStart = pdoc->LineStart(line);
+				LayoutLine(line, surface, vs, ll, pixelWidth);
+				for (int subLine = 1; subLine < ll->lines; subLine++) {
+					pdoc->InsertCString(posLineStart + (subLine - 1) * strlen(eol) +
+					        ll->LineStart(subLine), eol);
+					targetEnd += static_cast<int>(strlen(eol));
+				}
+			}
+			lineEnd = pdoc->LineFromPosition(targetEnd);
+		}
+		pdoc->EndUndoAction();
+	}
+}
+
+int Editor::SubstituteMarkerIfEmpty(int markerCheck, int markerDefault) {
+	if (vs.markers[markerCheck].markType == SC_MARK_EMPTY)
+		return markerDefault;
+	return markerCheck;
+}
+
+// Avoid 64 bit compiler warnings.
+// Scintilla does not support text buffers larger than 2**31
+static int istrlen(const char *s) {
+	return static_cast<int>(strlen(s));
+}
+
+void Editor::PaintSelMargin(Surface *surfWindow, PRectangle &rc) {
+	if (vs.fixedColumnWidth == 0)
+		return;
+
+	PRectangle rcMargin = GetClientRectangle();
+	rcMargin.right = vs.fixedColumnWidth;
+
+	if (!rc.Intersects(rcMargin))
+		return;
+
+	Surface *surface;
+	if (bufferedDraw) {
+		surface = pixmapSelMargin;
+	} else {
+		surface = surfWindow;
+	}
+
+	PRectangle rcSelMargin = rcMargin;
+	rcSelMargin.right = rcMargin.left;
+
+	for (int margin = 0; margin < vs.margins; margin++) {
+		if (vs.ms[margin].width > 0) {
+
+			rcSelMargin.left = rcSelMargin.right;
+			rcSelMargin.right = rcSelMargin.left + vs.ms[margin].width;
+
+			if (vs.ms[margin].style != SC_MARGIN_NUMBER) {
+				/* alternate scheme:
+				if (vs.ms[margin].mask & SC_MASK_FOLDERS)
+					surface->FillRectangle(rcSelMargin, vs.styles[STYLE_DEFAULT].back.allocated);
+				else
+					// Required because of special way brush is created for selection margin
+					surface->FillRectangle(rcSelMargin, pixmapSelPattern);
+				*/
+				if (vs.ms[margin].mask & SC_MASK_FOLDERS)
+					// Required because of special way brush is created for selection margin
+					surface->FillRectangle(rcSelMargin, *pixmapSelPattern);
+				else {
+					ColourAllocated colour;
+					switch (vs.ms[margin].style) {
+					case SC_MARGIN_BACK:
+						colour = vs.styles[STYLE_DEFAULT].back.allocated;
+						break;
+					case SC_MARGIN_FORE:
+						colour = vs.styles[STYLE_DEFAULT].fore.allocated;
+						break;
+					default:
+						colour = vs.styles[STYLE_LINENUMBER].back.allocated;
+						break;
+					}
+					surface->FillRectangle(rcSelMargin, colour);
+				}
+			} else {
+				surface->FillRectangle(rcSelMargin, vs.styles[STYLE_LINENUMBER].back.allocated);
+			}
+
+			int visibleLine = topLine;
+			int yposScreen = 0;
+
+			// Work out whether the top line is whitespace located after a
+			// lessening of fold level which implies a 'fold tail' but which should not
+			// be displayed until the last of a sequence of whitespace.
+			bool needWhiteClosure = false;
+			int level = pdoc->GetLevel(cs.DocFromDisplay(topLine));
+			if (level & SC_FOLDLEVELWHITEFLAG) {
+				int lineBack = cs.DocFromDisplay(topLine);
+				int levelPrev = level;
+				while ((lineBack > 0) && (levelPrev & SC_FOLDLEVELWHITEFLAG)) {
+					lineBack--;
+					levelPrev = pdoc->GetLevel(lineBack);
+				}
+				if (!(levelPrev & SC_FOLDLEVELHEADERFLAG)) {
+					if ((level & SC_FOLDLEVELNUMBERMASK) < (levelPrev & SC_FOLDLEVELNUMBERMASK))
+						needWhiteClosure = true;
+				}
+			}
+
+			// Old code does not know about new markers needed to distinguish all cases
+			int folderOpenMid = SubstituteMarkerIfEmpty(SC_MARKNUM_FOLDEROPENMID,
+			        SC_MARKNUM_FOLDEROPEN);
+			int folderEnd = SubstituteMarkerIfEmpty(SC_MARKNUM_FOLDEREND,
+			        SC_MARKNUM_FOLDER);
+
+			while ((visibleLine < cs.LinesDisplayed()) && yposScreen < rcMargin.bottom) {
+
+				PLATFORM_ASSERT(visibleLine < cs.LinesDisplayed());
+
+				int lineDoc = cs.DocFromDisplay(visibleLine);
+				PLATFORM_ASSERT(cs.GetVisible(lineDoc));
+				bool firstSubLine = visibleLine == cs.DisplayFromDoc(lineDoc);
+
+				// Decide which fold indicator should be displayed
+				level = pdoc->GetLevel(lineDoc);
+				int levelNext = pdoc->GetLevel(lineDoc + 1);
+				int marks = pdoc->GetMark(lineDoc);
+				if (!firstSubLine)
+					marks = 0;
+				int levelNum = level & SC_FOLDLEVELNUMBERMASK;
+				int levelNextNum = levelNext & SC_FOLDLEVELNUMBERMASK;
+				if (level & SC_FOLDLEVELHEADERFLAG) {
+					if (firstSubLine) {
+						if (cs.GetExpanded(lineDoc)) {
+							if (levelNum == SC_FOLDLEVELBASE)
+								marks |= 1 << SC_MARKNUM_FOLDEROPEN;
+							else
+								marks |= 1 << folderOpenMid;
+						} else {
+							if (levelNum == SC_FOLDLEVELBASE)
+								marks |= 1 << SC_MARKNUM_FOLDER;
+							else
+								marks |= 1 << folderEnd;
+						}
+					} else {
+						marks |= 1 << SC_MARKNUM_FOLDERSUB;
+					}
+					needWhiteClosure = false;
+				} else if (level & SC_FOLDLEVELWHITEFLAG) {
+					if (needWhiteClosure) {
+						if (levelNext & SC_FOLDLEVELWHITEFLAG) {
+							marks |= 1 << SC_MARKNUM_FOLDERSUB;
+						} else if (levelNum > SC_FOLDLEVELBASE) {
+							marks |= 1 << SC_MARKNUM_FOLDERMIDTAIL;
+							needWhiteClosure = false;
+						} else {
+							marks |= 1 << SC_MARKNUM_FOLDERTAIL;
+							needWhiteClosure = false;
+						}
+					} else if (levelNum > SC_FOLDLEVELBASE) {
+						if (levelNextNum < levelNum) {
+							if (levelNextNum > SC_FOLDLEVELBASE) {
+								marks |= 1 << SC_MARKNUM_FOLDERMIDTAIL;
+							} else {
+								marks |= 1 << SC_MARKNUM_FOLDERTAIL;
+							}
+						} else {
+							marks |= 1 << SC_MARKNUM_FOLDERSUB;
+						}
+					}
+				} else if (levelNum > SC_FOLDLEVELBASE) {
+					if (levelNextNum < levelNum) {
+						needWhiteClosure = false;
+						if (levelNext & SC_FOLDLEVELWHITEFLAG) {
+							marks |= 1 << SC_MARKNUM_FOLDERSUB;
+							needWhiteClosure = true;
+						} else if (levelNextNum > SC_FOLDLEVELBASE) {
+							marks |= 1 << SC_MARKNUM_FOLDERMIDTAIL;
+						} else {
+							marks |= 1 << SC_MARKNUM_FOLDERTAIL;
+						}
+					} else {
+						marks |= 1 << SC_MARKNUM_FOLDERSUB;
+					}
+				}
+
+				marks &= vs.ms[margin].mask;
+				PRectangle rcMarker = rcSelMargin;
+				rcMarker.top = yposScreen;
+				rcMarker.bottom = yposScreen + vs.lineHeight;
+				if (vs.ms[margin].style == SC_MARGIN_NUMBER) {
+					char number[100];
+					number[0] = '\0';
+					if (firstSubLine)
+						sprintf(number, "%d", lineDoc + 1);
+					if (foldFlags & SC_FOLDFLAG_LEVELNUMBERS) {
+						int lev = pdoc->GetLevel(lineDoc);
+						sprintf(number, "%c%c %03X %03X",
+						        (lev & SC_FOLDLEVELHEADERFLAG) ? 'H' : '_',
+						        (lev & SC_FOLDLEVELWHITEFLAG) ? 'W' : '_',
+						        lev & SC_FOLDLEVELNUMBERMASK,
+						        lev >> 16
+						       );
+					}
+					PRectangle rcNumber = rcMarker;
+					// Right justify
+					int width = surface->WidthText(vs.styles[STYLE_LINENUMBER].font, number, istrlen(number));
+					int xpos = rcNumber.right - width - 3;
+					rcNumber.left = xpos;
+					surface->DrawTextNoClip(rcNumber, vs.styles[STYLE_LINENUMBER].font,
+					        rcNumber.top + vs.maxAscent, number, istrlen(number),
+					        vs.styles[STYLE_LINENUMBER].fore.allocated,
+					        vs.styles[STYLE_LINENUMBER].back.allocated);
+				}
+
+				if (marks) {
+					for (int markBit = 0; (markBit < 32) && marks; markBit++) {
+						if (marks & 1) {
+							vs.markers[markBit].Draw(surface, rcMarker, vs.styles[STYLE_LINENUMBER].font);
+						}
+						marks >>= 1;
+					}
+				}
+
+				visibleLine++;
+				yposScreen += vs.lineHeight;
+			}
+		}
+	}
+
+	PRectangle rcBlankMargin = rcMargin;
+	rcBlankMargin.left = rcSelMargin.right;
+	surface->FillRectangle(rcBlankMargin, vs.styles[STYLE_DEFAULT].back.allocated);
+
+	if (bufferedDraw) {
+		surfWindow->Copy(rcMargin, Point(), *pixmapSelMargin);
+	}
+}
+
+void DrawTabArrow(Surface *surface, PRectangle rcTab, int ymid) {
+	int ydiff = (rcTab.bottom - rcTab.top) / 2;
+	int xhead = rcTab.right - 1 - ydiff;
+	if (xhead <= rcTab.left) {
+		ydiff -= rcTab.left - xhead - 1;
+		xhead = rcTab.left - 1;
+	}
+	if ((rcTab.left + 2) < (rcTab.right - 1))
+		surface->MoveTo(rcTab.left + 2, ymid);
+	else
+		surface->MoveTo(rcTab.right - 1, ymid);
+	surface->LineTo(rcTab.right - 1, ymid);
+	surface->LineTo(xhead, ymid - ydiff);
+	surface->MoveTo(rcTab.right - 1, ymid);
+	surface->LineTo(xhead, ymid + ydiff);
+}
+
+LineLayout *Editor::RetrieveLineLayout(int lineNumber) {
+	int posLineStart = pdoc->LineStart(lineNumber);
+	int posLineEnd = pdoc->LineStart(lineNumber + 1);
+	PLATFORM_ASSERT(posLineEnd >= posLineStart);
+	int lineCaret = pdoc->LineFromPosition(currentPos);
+	return llc.Retrieve(lineNumber, lineCaret,
+	        posLineEnd - posLineStart, pdoc->GetStyleClock(),
+	        LinesOnScreen() + 1, pdoc->LinesTotal());
+}
+
+static bool GoodTrailByte(int v) {
+	return (v >= 0x80) && (v < 0xc0);
+}
+
+bool BadUTF(const char *s, int len, int &trailBytes) {
+	if (trailBytes) {
+		trailBytes--;
+		return false;
+	}
+	const unsigned char *us = reinterpret_cast<const unsigned char *>(s);
+	if (*us < 0x80) {
+		// Single bytes easy
+		return false;
+	} else if (*us > 0xF4) {
+		// Characters longer than 4 bytes not possible in current UTF-8
+		return true;
+	} else if (*us >= 0xF0) {
+		// 4 bytes
+		if (len < 4)
+			return true;
+		if (GoodTrailByte(us[1]) && GoodTrailByte(us[2]) && GoodTrailByte(us[3])) {
+			trailBytes = 3;
+			return false;
+		} else {
+			return true;
+		}
+	} else if (*us >= 0xE0) {
+		// 3 bytes
+		if (len < 3)
+			return true;
+		if (GoodTrailByte(us[1]) && GoodTrailByte(us[2])) {
+			trailBytes = 2;
+			return false;
+		} else {
+			return true;
+		}
+	} else if (*us >= 0xC2) {
+		// 2 bytes
+		if (len < 2)
+			return true;
+		if (GoodTrailByte(us[1])) {
+			trailBytes = 1;
+			return false;
+		} else {
+			return true;
+		}
+	} else if (*us >= 0xC0) {
+		// Overlong encoding
+		return true;
+	} else {
+		// Trail byte
+		return true;
+	}
+}
+
+/**
+ * Fill in the LineLayout data for the given line.
+ * Copy the given @a line and its styles from the document into local arrays.
+ * Also determine the x position at which each character starts.
+ */
+void Editor::LayoutLine(int line, Surface *surface, ViewStyle &vstyle, LineLayout *ll, int width) {
+	if (!ll)
+		return;
+
+	PLATFORM_ASSERT(line < pdoc->LinesTotal());
+	PLATFORM_ASSERT(ll->chars != NULL);
+	int posLineStart = pdoc->LineStart(line);
+	int posLineEnd = pdoc->LineStart(line + 1);
+	// If the line is very long, limit the treatment to a length that should fit in the viewport
+	if (posLineEnd > (posLineStart + ll->maxLineLength)) {
+		posLineEnd = posLineStart + ll->maxLineLength;
+	}
+	if (ll->validity == LineLayout::llCheckTextAndStyle) {
+		int lineLength = posLineEnd - posLineStart;
+		if (!vstyle.viewEOL) {
+			int cid = posLineEnd - 1;
+			while ((cid > posLineStart) && IsEOLChar(pdoc->CharAt(cid))) {
+				cid--;
+				lineLength--;
+			}
+		}
+		if (lineLength == ll->numCharsInLine) {
+			// See if chars, styles, indicators, are all the same
+			bool allSame = true;
+			const int styleMask = pdoc->stylingBitsMask;
+			// Check base line layout
+			char styleByte = 0;
+			int numCharsInLine = 0;
+			while (numCharsInLine < lineLength) {
+				int charInDoc = numCharsInLine + posLineStart;
+				char chDoc = pdoc->CharAt(charInDoc);
+				styleByte = pdoc->StyleAt(charInDoc);
+				allSame = allSame &&
+				        (ll->styles[numCharsInLine] == static_cast<unsigned char>(styleByte & styleMask));
+				allSame = allSame &&
+				        (ll->indicators[numCharsInLine] == static_cast<char>(styleByte & ~styleMask));
+				if (vstyle.styles[ll->styles[numCharsInLine]].caseForce == Style::caseMixed)
+					allSame = allSame &&
+					        (ll->chars[numCharsInLine] == chDoc);
+				else if (vstyle.styles[ll->styles[numCharsInLine]].caseForce == Style::caseLower)
+					allSame = allSame &&
+					        (ll->chars[numCharsInLine] == static_cast<char>(tolower(chDoc)));
+				else	// Style::caseUpper
+					allSame = allSame &&
+					        (ll->chars[numCharsInLine] == static_cast<char>(toupper(chDoc)));
+				numCharsInLine++;
+			}
+			allSame = allSame && (ll->styles[numCharsInLine] == styleByte);	// For eolFilled
+			if (allSame) {
+				ll->validity = LineLayout::llPositions;
+			} else {
+				ll->validity = LineLayout::llInvalid;
+			}
+		} else {
+			ll->validity = LineLayout::llInvalid;
+		}
+	}
+	if (ll->validity == LineLayout::llInvalid) {
+		ll->widthLine = LineLayout::wrapWidthInfinite;
+		ll->lines = 1;
+		int numCharsInLine = 0;
+		if (vstyle.edgeState == EDGE_BACKGROUND) {
+			ll->edgeColumn = pdoc->FindColumn(line, theEdge);
+			if (ll->edgeColumn >= posLineStart) {
+				ll->edgeColumn -= posLineStart;
+			}
+		} else {
+			ll->edgeColumn = -1;
+		}
+
+		char styleByte = 0;
+		int styleMask = pdoc->stylingBitsMask;
+		ll->styleBitsSet = 0;
+		// Fill base line layout
+		for (int charInDoc = posLineStart; charInDoc < posLineEnd; charInDoc++) {
+			char chDoc = pdoc->CharAt(charInDoc);
+			styleByte = pdoc->StyleAt(charInDoc);
+			ll->styleBitsSet |= styleByte;
+			if (vstyle.viewEOL || (!IsEOLChar(chDoc))) {
+				ll->chars[numCharsInLine] = chDoc;
+				ll->styles[numCharsInLine] = static_cast<char>(styleByte & styleMask);
+				ll->indicators[numCharsInLine] = static_cast<char>(styleByte & ~styleMask);
+				if (vstyle.styles[ll->styles[numCharsInLine]].caseForce == Style::caseUpper)
+					ll->chars[numCharsInLine] = static_cast<char>(toupper(chDoc));
+				else if (vstyle.styles[ll->styles[numCharsInLine]].caseForce == Style::caseLower)
+					ll->chars[numCharsInLine] = static_cast<char>(tolower(chDoc));
+				numCharsInLine++;
+			}
+		}
+		ll->xHighlightGuide = 0;
+		// Extra element at the end of the line to hold end x position and act as
+		ll->chars[numCharsInLine] = 0;   // Also triggers processing in the loops as this is a control character
+		ll->styles[numCharsInLine] = styleByte;	// For eolFilled
+		ll->indicators[numCharsInLine] = 0;
+
+		// Layout the line, determining the position of each character,
+		// with an extra element at the end for the end of the line.
+		int startseg = 0;	// Start of the current segment, in char. number
+		int startsegx = 0;	// Start of the current segment, in pixels
+		ll->positions[0] = 0;
+		unsigned int tabWidth = vstyle.spaceWidth * pdoc->tabInChars;
+		bool lastSegItalics = false;
+		Font &ctrlCharsFont = vstyle.styles[STYLE_CONTROLCHAR].font;
+
+		int ctrlCharWidth[32] = {0};
+		bool isControlNext = IsControlCharacter(ll->chars[0]);
+		int trailBytes = 0;
+		bool isBadUTFNext = IsUnicodeMode() && BadUTF(ll->chars, numCharsInLine, trailBytes);
+		for (int charInLine = 0; charInLine < numCharsInLine; charInLine++) {
+			bool isControl = isControlNext;
+			isControlNext = IsControlCharacter(ll->chars[charInLine + 1]);
+			bool isBadUTF = isBadUTFNext;
+			isBadUTFNext = IsUnicodeMode() && BadUTF(ll->chars + charInLine + 1, numCharsInLine - charInLine - 1, trailBytes);
+			if ((ll->styles[charInLine] != ll->styles[charInLine + 1]) ||
+			        isControl || isControlNext || isBadUTF || isBadUTFNext) {
+				ll->positions[startseg] = 0;
+				if (vstyle.styles[ll->styles[charInLine]].visible) {
+					if (isControl) {
+						if (ll->chars[charInLine] == '\t') {
+							ll->positions[charInLine + 1] = ((((startsegx + 2) /
+							        tabWidth) + 1) * tabWidth) - startsegx;
+						} else if (controlCharSymbol < 32) {
+							if (ctrlCharWidth[ll->chars[charInLine]] == 0) {
+								const char *ctrlChar = ControlCharacterString(ll->chars[charInLine]);
+								// +3 For a blank on front and rounded edge each side:
+								ctrlCharWidth[ll->chars[charInLine]] =
+								    surface->WidthText(ctrlCharsFont, ctrlChar, istrlen(ctrlChar)) + 3;
+							}
+							ll->positions[charInLine + 1] = ctrlCharWidth[ll->chars[charInLine]];
+						} else {
+							char cc[2] = { static_cast<char>(controlCharSymbol), '\0' };
+							surface->MeasureWidths(ctrlCharsFont, cc, 1,
+							        ll->positions + startseg + 1);
+						}
+						lastSegItalics = false;
+					} else if (isBadUTF) {
+						char hexits[3];
+						sprintf(hexits, "%2X", ll->chars[charInLine] & 0xff);
+						ll->positions[charInLine + 1] =
+						    surface->WidthText(ctrlCharsFont, hexits, istrlen(hexits)) + 3;
+					} else {	// Regular character
+						int lenSeg = charInLine - startseg + 1;
+						if ((lenSeg == 1) && (' ' == ll->chars[startseg])) {
+							lastSegItalics = false;
+							// Over half the segments are single characters and of these about half are space characters.
+							ll->positions[charInLine + 1] = vstyle.styles[ll->styles[charInLine]].spaceWidth;
+						} else {
+							lastSegItalics = vstyle.styles[ll->styles[charInLine]].italic;
+							posCache.MeasureWidths(surface, vstyle, ll->styles[charInLine], ll->chars + startseg,
+							        lenSeg, ll->positions + startseg + 1);
+						}
+					}
+				} else {    // invisible
+					for (int posToZero = startseg; posToZero <= (charInLine + 1); posToZero++) {
+						ll->positions[posToZero] = 0;
+					}
+				}
+				for (int posToIncrease = startseg; posToIncrease <= (charInLine + 1); posToIncrease++) {
+					ll->positions[posToIncrease] += startsegx;
+				}
+				startsegx = ll->positions[charInLine + 1];
+				startseg = charInLine + 1;
+			}
+		}
+		// Small hack to make lines that end with italics not cut off the edge of the last character
+		if ((startseg > 0) && lastSegItalics) {
+			ll->positions[startseg] += 2;
+		}
+		ll->numCharsInLine = numCharsInLine;
+		ll->validity = LineLayout::llPositions;
+	}
+	// Hard to cope when too narrow, so just assume there is space
+	if (width < 20) {
+		width = 20;
+	}
+	if ((ll->validity == LineLayout::llPositions) || (ll->widthLine != width)) {
+		ll->widthLine = width;
+		if (width == LineLayout::wrapWidthInfinite) {
+			ll->lines = 1;
+		} else if (width > ll->positions[ll->numCharsInLine]) {
+			// Simple common case where line does not need wrapping.
+			ll->lines = 1;
+		} else {
+			if (wrapVisualFlags & SC_WRAPVISUALFLAG_END) {
+				width -= vstyle.aveCharWidth; // take into account the space for end wrap mark
+			}
+			ll->lines = 0;
+			// Calculate line start positions based upon width.
+			int lastGoodBreak = 0;
+			int lastLineStart = 0;
+			int startOffset = 0;
+			int p = 0;
+			while (p < ll->numCharsInLine) {
+				if ((ll->positions[p + 1] - startOffset) >= width) {
+					if (lastGoodBreak == lastLineStart) {
+						// Try moving to start of last character
+						if (p > 0) {
+							lastGoodBreak = pdoc->MovePositionOutsideChar(p + posLineStart, -1)
+							        - posLineStart;
+						}
+						if (lastGoodBreak == lastLineStart) {
+							// Ensure at least one character on line.
+							lastGoodBreak = pdoc->MovePositionOutsideChar(lastGoodBreak + posLineStart + 1, 1)
+							        - posLineStart;
+						}
+					}
+					lastLineStart = lastGoodBreak;
+					ll->lines++;
+					ll->SetLineStart(ll->lines, lastGoodBreak);
+					startOffset = ll->positions[lastGoodBreak];
+					// take into account the space for start wrap mark and indent
+					startOffset -= actualWrapVisualStartIndent * vstyle.aveCharWidth;
+					p = lastGoodBreak + 1;
+					continue;
+				}
+				if (p > 0) {
+					if (wrapState == eWrapChar) {
+						lastGoodBreak = pdoc->MovePositionOutsideChar(p + posLineStart, -1)
+						        - posLineStart;
+						p = pdoc->MovePositionOutsideChar(p + 1 + posLineStart, 1) - posLineStart;
+						continue;
+					} else if (ll->styles[p] != ll->styles[p - 1]) {
+						lastGoodBreak = p;
+					} else if (IsSpaceOrTab(ll->chars[p - 1]) && !IsSpaceOrTab(ll->chars[p])) {
+						lastGoodBreak = p;
+					}
+				}
+				p++;
+			}
+			ll->lines++;
+		}
+		ll->validity = LineLayout::llLines;
+	}
+}
+
+ColourAllocated Editor::SelectionBackground(ViewStyle &vsDraw) {
+	return primarySelection ? vsDraw.selbackground.allocated : vsDraw.selbackground2.allocated;
+}
+
+ColourAllocated Editor::TextBackground(ViewStyle &vsDraw, bool overrideBackground,
+        ColourAllocated background, bool inSelection, bool inHotspot, int styleMain, int i, LineLayout *ll) {
+	if (inSelection) {
+		if (vsDraw.selbackset && (vsDraw.selAlpha == SC_ALPHA_NOALPHA)) {
+			return SelectionBackground(vsDraw);
+		}
+	} else {
+		if ((vsDraw.edgeState == EDGE_BACKGROUND) &&
+		        (i >= ll->edgeColumn) &&
+		        !IsEOLChar(ll->chars[i]))
+			return vsDraw.edgecolour.allocated;
+		if (inHotspot && vsDraw.hotspotBackgroundSet)
+			return vsDraw.hotspotBackground.allocated;
+		if (overrideBackground && (styleMain != STYLE_BRACELIGHT) && (styleMain != STYLE_BRACEBAD))
+			return background;
+	}
+	return vsDraw.styles[styleMain].back.allocated;
+}
+
+void Editor::DrawIndentGuide(Surface *surface, int lineVisible, int lineHeight, int start, PRectangle rcSegment, bool highlight) {
+	Point from(0, ((lineVisible & 1) && (lineHeight & 1)) ? 1 : 0);
+	PRectangle rcCopyArea(start + 1, rcSegment.top, start + 2, rcSegment.bottom);
+	surface->Copy(rcCopyArea, from,
+	        highlight ? *pixmapIndentGuideHighlight : *pixmapIndentGuide);
+}
+
+void Editor::DrawWrapMarker(Surface *surface, PRectangle rcPlace,
+        bool isEndMarker, ColourAllocated wrapColour) {
+	surface->PenColour(wrapColour);
+
+	enum { xa = 1 }; // gap before start
+	int w = rcPlace.right - rcPlace.left - xa - 1;
+
+	bool xStraight = isEndMarker;  // x-mirrored symbol for start marker
+	bool yStraight = true;
+	//bool yStraight= isEndMarker; // comment in for start marker y-mirrowed
+
+	int x0 = xStraight ? rcPlace.left : rcPlace.right - 1;
+	int y0 = yStraight ? rcPlace.top : rcPlace.bottom - 1;
+
+	int dy = (rcPlace.bottom - rcPlace.top) / 5;
+	int y = (rcPlace.bottom - rcPlace.top) / 2 + dy;
+
+	struct Relative {
+		Surface *surface;
+		int xBase;
+		int xDir;
+		int yBase;
+		int yDir;
+		void MoveTo(int xRelative, int yRelative) {
+			surface->MoveTo(xBase + xDir * xRelative, yBase + yDir * yRelative);
+		}
+		void LineTo(int xRelative, int yRelative) {
+			surface->LineTo(xBase + xDir * xRelative, yBase + yDir * yRelative);
+		}
+	};
+	Relative rel = {surface, x0, xStraight ? 1 : -1, y0, yStraight ? 1 : -1};
+
+	// arrow head
+	rel.MoveTo(xa, y);
+	rel.LineTo(xa + 2*w / 3, y - dy);
+	rel.MoveTo(xa, y);
+	rel.LineTo(xa + 2*w / 3, y + dy);
+
+	// arrow body
+	rel.MoveTo(xa, y);
+	rel.LineTo(xa + w, y);
+	rel.LineTo(xa + w, y - 2 * dy);
+	rel.LineTo(xa - 1,   // on windows lineto is exclusive endpoint, perhaps GTK not...
+	        y - 2 * dy);
+}
+
+static void SimpleAlphaRectangle(Surface *surface, PRectangle rc, ColourAllocated fill, int alpha) {
+	if (alpha != SC_ALPHA_NOALPHA) {
+		surface->AlphaRectangle(rc, 0, fill, alpha, fill, alpha, 0);
+	}
+}
+
+void Editor::DrawEOL(Surface *surface, ViewStyle &vsDraw, PRectangle rcLine, LineLayout *ll,
+        int line, int lineEnd, int xStart, int subLine, int subLineStart,
+        bool overrideBackground, ColourAllocated background,
+        bool drawWrapMarkEnd, ColourAllocated wrapColour) {
+
+	int styleMask = pdoc->stylingBitsMask;
+	PRectangle rcSegment = rcLine;
+
+	// Fill in a PRectangle representing the end of line characters
+	int xEol = ll->positions[lineEnd] - subLineStart;
+	rcSegment.left = xEol + xStart;
+	rcSegment.right = xEol + vsDraw.aveCharWidth + xStart;
+	int posLineEnd = pdoc->LineStart(line + 1);
+	bool eolInSelection = (subLine == (ll->lines - 1)) &&
+	        (posLineEnd > ll->selStart) && (posLineEnd <= ll->selEnd) && (ll->selStart != ll->selEnd);
+
+	if (eolInSelection && vsDraw.selbackset && (line < pdoc->LinesTotal() - 1) && (vsDraw.selAlpha == SC_ALPHA_NOALPHA)) {
+		surface->FillRectangle(rcSegment, SelectionBackground(vsDraw));
+	} else {
+		if (overrideBackground) {
+			surface->FillRectangle(rcSegment, background);
+		} else {
+			surface->FillRectangle(rcSegment, vsDraw.styles[ll->styles[ll->numCharsInLine] & styleMask].back.allocated);
+		}
+		if (eolInSelection && vsDraw.selbackset && (line < pdoc->LinesTotal() - 1) && (vsDraw.selAlpha != SC_ALPHA_NOALPHA)) {
+			SimpleAlphaRectangle(surface, rcSegment, SelectionBackground(vsDraw), vsDraw.selAlpha);
+		}
+	}
+
+	rcSegment.left = xEol + vsDraw.aveCharWidth + xStart;
+	rcSegment.right = rcLine.right;
+
+	if (vsDraw.selEOLFilled && eolInSelection && vsDraw.selbackset && (line < pdoc->LinesTotal() - 1) && (vsDraw.selAlpha == SC_ALPHA_NOALPHA)) {
+		surface->FillRectangle(rcSegment, SelectionBackground(vsDraw));
+	} else {
+		if (overrideBackground) {
+			surface->FillRectangle(rcSegment, background);
+		} else if (vsDraw.styles[ll->styles[ll->numCharsInLine] & styleMask].eolFilled) {
+			surface->FillRectangle(rcSegment, vsDraw.styles[ll->styles[ll->numCharsInLine] & styleMask].back.allocated);
+		} else {
+			surface->FillRectangle(rcSegment, vsDraw.styles[STYLE_DEFAULT].back.allocated);
+		}
+		if (vsDraw.selEOLFilled && eolInSelection && vsDraw.selbackset && (line < pdoc->LinesTotal() - 1) && (vsDraw.selAlpha != SC_ALPHA_NOALPHA)) {
+			SimpleAlphaRectangle(surface, rcSegment, SelectionBackground(vsDraw), vsDraw.selAlpha);
+		}
+	}
+
+	if (drawWrapMarkEnd) {
+		PRectangle rcPlace = rcSegment;
+
+		if (wrapVisualFlagsLocation & SC_WRAPVISUALFLAGLOC_END_BY_TEXT) {
+			rcPlace.left = xEol + xStart;
+			rcPlace.right = rcPlace.left + vsDraw.aveCharWidth;
+		} else {
+			// draw left of the right text margin, to avoid clipping by the current clip rect
+			rcPlace.right = rcLine.right - vs.rightMarginWidth;
+			rcPlace.left = rcPlace.right - vsDraw.aveCharWidth;
+		}
+		DrawWrapMarker(surface, rcPlace, true, wrapColour);
+	}
+}
+
+void Editor::DrawIndicators(Surface *surface, ViewStyle &vsDraw, int line, int xStart,
+        PRectangle rcLine, LineLayout *ll, int subLine, int lineEnd, bool under) {
+	// Draw decorators
+	const int posLineStart = pdoc->LineStart(line);
+	const int lineStart = ll->LineStart(subLine);
+	const int subLineStart = ll->positions[lineStart];
+	const int posLineEnd = posLineStart + lineEnd;
+
+	if (!under) {
+		// Draw indicators
+		// foreach indicator...
+		for (int indicnum = 0, mask = 1 << pdoc->stylingBits; mask < 0x100; indicnum++) {
+			if (!(mask & ll->styleBitsSet)) {
+				mask <<= 1;
+				continue;
+			}
+			int startPos = -1;
+			// foreach style pos in line...
+			for (int indicPos = lineStart; indicPos <= lineEnd; indicPos++) {
+				// look for starts...
+				if (startPos < 0) {
+					// NOT in indicator run, looking for START
+					if (indicPos < lineEnd && (ll->indicators[indicPos] & mask))
+						startPos = indicPos;
+				}
+				// ... or ends
+				if (startPos >= 0) {
+					// IN indicator run, looking for END
+					if (indicPos >= lineEnd || !(ll->indicators[indicPos] & mask)) {
+						// AT end of indicator run, DRAW it!
+						PRectangle rcIndic(
+						    ll->positions[startPos] + xStart - subLineStart,
+						    rcLine.top + vsDraw.maxAscent,
+						    ll->positions[indicPos] + xStart - subLineStart,
+						    rcLine.top + vsDraw.maxAscent + 3);
+						vsDraw.indicators[indicnum].Draw(surface, rcIndic, rcLine);
+						// RESET control var
+						startPos = -1;
+					}
+				}
+			}
+			mask <<= 1;
+		}
+	}
+
+	for (Decoration *deco = pdoc->decorations.root; deco; deco = deco->next) {
+		if (under == vsDraw.indicators[deco->indicator].under) {
+			int startPos = posLineStart + lineStart;
+			if (!deco->rs.ValueAt(startPos)) {
+				startPos = deco->rs.EndRun(startPos);
+			}
+			while ((startPos < posLineEnd) && (deco->rs.ValueAt(startPos))) {
+				int endPos = deco->rs.EndRun(startPos);
+				if (endPos > posLineEnd)
+					endPos = posLineEnd;
+				PRectangle rcIndic(
+				    ll->positions[startPos - posLineStart] + xStart - subLineStart,
+				    rcLine.top + vsDraw.maxAscent,
+				    ll->positions[endPos - posLineStart] + xStart - subLineStart,
+				    rcLine.top + vsDraw.maxAscent + 3);
+				vsDraw.indicators[deco->indicator].Draw(surface, rcIndic, rcLine);
+				startPos = deco->rs.EndRun(endPos);
+			}
+		}
+	}
+}
+
+void DrawTextBlob(Surface *surface, ViewStyle &vsDraw, PRectangle rcSegment,
+				  const char *s, ColourAllocated textBack, ColourAllocated textFore, bool twoPhaseDraw) {
+	if (!twoPhaseDraw) {
+		surface->FillRectangle(rcSegment, textBack);
+	}
+	Font &ctrlCharsFont = vsDraw.styles[STYLE_CONTROLCHAR].font;
+	int normalCharHeight = surface->Ascent(ctrlCharsFont) -
+	        surface->InternalLeading(ctrlCharsFont);
+	PRectangle rcCChar = rcSegment;
+	rcCChar.left = rcCChar.left + 1;
+	rcCChar.top = rcSegment.top + vsDraw.maxAscent - normalCharHeight;
+	rcCChar.bottom = rcSegment.top + vsDraw.maxAscent + 1;
+	PRectangle rcCentral = rcCChar;
+	rcCentral.top++;
+	rcCentral.bottom--;
+	surface->FillRectangle(rcCentral, textFore);
+	PRectangle rcChar = rcCChar;
+	rcChar.left++;
+	rcChar.right--;
+	surface->DrawTextClipped(rcChar, ctrlCharsFont,
+	        rcSegment.top + vsDraw.maxAscent, s, istrlen(s),
+	        textBack, textFore);
+}
+
+void Editor::DrawLine(Surface *surface, ViewStyle &vsDraw, int line, int lineVisible, int xStart,
+        PRectangle rcLine, LineLayout *ll, int subLine) {
+
+	PRectangle rcSegment = rcLine;
+
+	// Using one font for all control characters so it can be controlled independently to ensure
+	// the box goes around the characters tightly. Seems to be no way to work out what height
+	// is taken by an individual character - internal leading gives varying results.
+	Font &ctrlCharsFont = vsDraw.styles[STYLE_CONTROLCHAR].font;
+
+	// See if something overrides the line background color:  Either if caret is on the line
+	// and background color is set for that, or if a marker is defined that forces its background
+	// color onto the line, or if a marker is defined but has no selection margin in which to
+	// display itself (as long as it's not an SC_MARK_EMPTY marker).  These are checked in order
+	// with the earlier taking precedence.  When multiple markers cause background override,
+	// the color for the highest numbered one is used.
+	bool overrideBackground = false;
+	ColourAllocated background;
+	if (caret.active && vsDraw.showCaretLineBackground && (vsDraw.caretLineAlpha == SC_ALPHA_NOALPHA) && ll->containsCaret) {
+		overrideBackground = true;
+		background = vsDraw.caretLineBackground.allocated;
+	}
+	if (!overrideBackground) {
+		int marks = pdoc->GetMark(line);
+		for (int markBit = 0; (markBit < 32) && marks; markBit++) {
+			if ((marks & 1) && (vsDraw.markers[markBit].markType == SC_MARK_BACKGROUND) &&
+			        (vsDraw.markers[markBit].alpha == SC_ALPHA_NOALPHA)) {
+				background = vsDraw.markers[markBit].back.allocated;
+				overrideBackground = true;
+			}
+			marks >>= 1;
+		}
+	}
+	if (!overrideBackground) {
+		if (vsDraw.maskInLine) {
+			int marksMasked = pdoc->GetMark(line) & vsDraw.maskInLine;
+			if (marksMasked) {
+				for (int markBit = 0; (markBit < 32) && marksMasked; markBit++) {
+					if ((marksMasked & 1) && (vsDraw.markers[markBit].markType != SC_MARK_EMPTY) &&
+					        (vsDraw.markers[markBit].alpha == SC_ALPHA_NOALPHA)) {
+						overrideBackground = true;
+						background = vsDraw.markers[markBit].back.allocated;
+					}
+					marksMasked >>= 1;
+				}
+			}
+		}
+	}
+
+	bool drawWhitespaceBackground = (vsDraw.viewWhitespace != wsInvisible) &&
+	        (!overrideBackground) && (vsDraw.whitespaceBackgroundSet);
+
+	bool inIndentation = subLine == 0;	// Do not handle indentation except on first subline.
+	int indentWidth = pdoc->IndentSize() * vsDraw.spaceWidth;
+
+	int posLineStart = pdoc->LineStart(line);
+
+	int startseg = ll->LineStart(subLine);
+	int subLineStart = ll->positions[startseg];
+	int lineStart = 0;
+	int lineEnd = 0;
+	if (subLine < ll->lines) {
+		lineStart = ll->LineStart(subLine);
+		lineEnd = ll->LineStart(subLine + 1);
+	}
+
+	ColourAllocated wrapColour = vsDraw.styles[STYLE_DEFAULT].fore.allocated;
+	if (vsDraw.whitespaceForegroundSet)
+		wrapColour = vsDraw.whitespaceForeground.allocated;
+
+	bool drawWrapMarkEnd = false;
+
+	if (wrapVisualFlags & SC_WRAPVISUALFLAG_END) {
+		if (subLine + 1 < ll->lines) {
+			drawWrapMarkEnd = ll->LineStart(subLine + 1) != 0;
+		}
+	}
+
+	if (actualWrapVisualStartIndent != 0) {
+
+		bool continuedWrapLine = false;
+		if (subLine < ll->lines) {
+			continuedWrapLine = ll->LineStart(subLine) != 0;
+		}
+
+		if (continuedWrapLine) {
+			// draw continuation rect
+			PRectangle rcPlace = rcSegment;
+
+			rcPlace.left = ll->positions[startseg] + xStart - subLineStart;
+			rcPlace.right = rcPlace.left + actualWrapVisualStartIndent * vsDraw.aveCharWidth;
+
+			// default bgnd here..
+			surface->FillRectangle(rcSegment, overrideBackground ? background :
+			        vsDraw.styles[STYLE_DEFAULT].back.allocated);
+
+			// main line style would be below but this would be inconsistent with end markers
+			// also would possibly not be the style at wrap point
+			//int styleMain = ll->styles[lineStart];
+			//surface->FillRectangle(rcPlace, vsDraw.styles[styleMain].back.allocated);
+
+			if (wrapVisualFlags & SC_WRAPVISUALFLAG_START) {
+
+				if (wrapVisualFlagsLocation & SC_WRAPVISUALFLAGLOC_START_BY_TEXT)
+					rcPlace.left = rcPlace.right - vsDraw.aveCharWidth;
+				else
+					rcPlace.right = rcPlace.left + vsDraw.aveCharWidth;
+
+				DrawWrapMarker(surface, rcPlace, false, wrapColour);
+			}
+
+			xStart += actualWrapVisualStartIndent * vsDraw.aveCharWidth;
+		}
+	}
+
+	// Does not take margin into account but not significant
+	int xStartVisible = subLineStart - xStart;
+
+	BreakFinder bfBack(ll, lineStart, lineEnd, posLineStart, IsUnicodeMode(), xStartVisible);
+	int next = bfBack.First();
+
+	// Background drawing loop
+	while (twoPhaseDraw && (next < lineEnd)) {
+
+		startseg = next;
+		next = bfBack.Next();
+		int i = next - 1;
+		int iDoc = i + posLineStart;
+
+		rcSegment.left = ll->positions[startseg] + xStart - subLineStart;
+		rcSegment.right = ll->positions[i + 1] + xStart - subLineStart;
+		// Only try to draw if really visible - enhances performance by not calling environment to
+		// draw strings that are completely past the right side of the window.
+		if ((rcSegment.left <= rcLine.right) && (rcSegment.right >= rcLine.left)) {
+			// Clip to line rectangle, since may have a huge position which will not work with some platforms
+			rcSegment.left = Platform::Maximum(rcSegment.left, rcLine.left);
+			rcSegment.right = Platform::Minimum(rcSegment.right, rcLine.right);
+
+			int styleMain = ll->styles[i];
+			bool inSelection = (iDoc >= ll->selStart) && (iDoc < ll->selEnd) && (ll->selStart != ll->selEnd);
+			bool inHotspot = (ll->hsStart != -1) && (iDoc >= ll->hsStart) && (iDoc < ll->hsEnd);
+			ColourAllocated textBack = TextBackground(vsDraw, overrideBackground, background, inSelection, inHotspot, styleMain, i, ll);
+			if (ll->chars[i] == '\t') {
+				// Tab display
+				if (drawWhitespaceBackground &&
+				        (!inIndentation || vsDraw.viewWhitespace == wsVisibleAlways))
+					textBack = vsDraw.whitespaceBackground.allocated;
+				surface->FillRectangle(rcSegment, textBack);
+			} else if (IsControlCharacter(ll->chars[i])) {
+				// Control character display
+				inIndentation = false;
+				surface->FillRectangle(rcSegment, textBack);
+			} else {
+				// Normal text display
+				surface->FillRectangle(rcSegment, textBack);
+				if (vsDraw.viewWhitespace != wsInvisible ||
+				        (inIndentation && vsDraw.viewIndentationGuides == ivReal)) {
+					for (int cpos = 0; cpos <= i - startseg; cpos++) {
+						if (ll->chars[cpos + startseg] == ' ') {
+							if (drawWhitespaceBackground &&
+							        (!inIndentation || vsDraw.viewWhitespace == wsVisibleAlways)) {
+								PRectangle rcSpace(ll->positions[cpos + startseg] + xStart - subLineStart,
+									rcSegment.top,
+									ll->positions[cpos + startseg + 1] + xStart - subLineStart,
+									rcSegment.bottom);
+								surface->FillRectangle(rcSpace, vsDraw.whitespaceBackground.allocated);
+							}
+						} else {
+							inIndentation = false;
+						}
+					}
+				}
+			}
+		} else if (rcSegment.left > rcLine.right) {
+			break;
+		}
+	}
+
+	if (twoPhaseDraw) {
+		DrawEOL(surface, vsDraw, rcLine, ll, line, lineEnd,
+		        xStart, subLine, subLineStart, overrideBackground, background,
+		        drawWrapMarkEnd, wrapColour);
+	}
+
+	DrawIndicators(surface, vsDraw, line, xStart, rcLine, ll, subLine, lineEnd, true);
+
+	if (vsDraw.edgeState == EDGE_LINE) {
+		int edgeX = theEdge * vsDraw.spaceWidth;
+		rcSegment.left = edgeX + xStart;
+		rcSegment.right = rcSegment.left + 1;
+		surface->FillRectangle(rcSegment, vsDraw.edgecolour.allocated);
+	}
+
+	inIndentation = subLine == 0;	// Do not handle indentation except on first subline.
+	// Foreground drawing loop
+	BreakFinder bfFore(ll, lineStart, lineEnd, posLineStart, IsUnicodeMode(), xStartVisible);
+	next = bfFore.First();
+
+	while (next < lineEnd) {
+
+		startseg = next;
+		next = bfFore.Next();
+		int i = next - 1;
+
+		int iDoc = i + posLineStart;
+
+		rcSegment.left = ll->positions[startseg] + xStart - subLineStart;
+		rcSegment.right = ll->positions[i + 1] + xStart - subLineStart;
+		// Only try to draw if really visible - enhances performance by not calling environment to
+		// draw strings that are completely past the right side of the window.
+		if ((rcSegment.left <= rcLine.right) && (rcSegment.right >= rcLine.left)) {
+			int styleMain = ll->styles[i];
+			ColourAllocated textFore = vsDraw.styles[styleMain].fore.allocated;
+			Font &textFont = vsDraw.styles[styleMain].font;
+			//hotspot foreground
+			if (ll->hsStart != -1 && iDoc >= ll->hsStart && iDoc < hsEnd) {
+				if (vsDraw.hotspotForegroundSet)
+					textFore = vsDraw.hotspotForeground.allocated;
+			}
+			bool inSelection = (iDoc >= ll->selStart) && (iDoc < ll->selEnd) && (ll->selStart != ll->selEnd);
+			if (inSelection && (vsDraw.selforeset)) {
+				textFore = vsDraw.selforeground.allocated;
+			}
+			bool inHotspot = (ll->hsStart != -1) && (iDoc >= ll->hsStart) && (iDoc < ll->hsEnd);
+			ColourAllocated textBack = TextBackground(vsDraw, overrideBackground, background, inSelection, inHotspot, styleMain, i, ll);
+			if (ll->chars[i] == '\t') {
+				// Tab display
+				if (!twoPhaseDraw) {
+					if (drawWhitespaceBackground &&
+					        (!inIndentation || vsDraw.viewWhitespace == wsVisibleAlways))
+						textBack = vsDraw.whitespaceBackground.allocated;
+					surface->FillRectangle(rcSegment, textBack);
+				}
+				if ((vsDraw.viewWhitespace != wsInvisible) ||
+				        (inIndentation && vsDraw.viewIndentationGuides != ivNone)) {
+					if (vsDraw.whitespaceForegroundSet)
+						textFore = vsDraw.whitespaceForeground.allocated;
+					surface->PenColour(textFore);
+				}
+				if (inIndentation && vsDraw.viewIndentationGuides == ivReal) {
+					for (int xIG = ll->positions[i] / indentWidth * indentWidth; xIG < ll->positions[i + 1]; xIG += indentWidth) {
+						if (xIG >= ll->positions[i] && xIG > 0) {
+							DrawIndentGuide(surface, lineVisible, vsDraw.lineHeight, xIG + xStart, rcSegment,
+							        (ll->xHighlightGuide == xIG));
+						}
+					}
+				}
+				if (vsDraw.viewWhitespace != wsInvisible) {
+					if (!inIndentation || vsDraw.viewWhitespace == wsVisibleAlways) {
+						PRectangle rcTab(rcSegment.left + 1, rcSegment.top + 4,
+						        rcSegment.right - 1, rcSegment.bottom - vsDraw.maxDescent);
+						DrawTabArrow(surface, rcTab, rcSegment.top + vsDraw.lineHeight / 2);
+					}
+				}
+			} else if (IsControlCharacter(ll->chars[i])) {
+				// Control character display
+				inIndentation = false;
+				if (controlCharSymbol < 32) {
+					// Draw the character
+					const char *ctrlChar = ControlCharacterString(ll->chars[i]);
+					DrawTextBlob(surface, vsDraw, rcSegment, ctrlChar, textBack, textFore, twoPhaseDraw);
+				} else {
+					char cc[2] = { static_cast<char>(controlCharSymbol), '\0' };
+					surface->DrawTextNoClip(rcSegment, ctrlCharsFont,
+					        rcSegment.top + vsDraw.maxAscent,
+					        cc, 1, textBack, textFore);
+				}
+			} else if ((i == startseg) && (static_cast<unsigned char>(ll->chars[i]) >= 0x80) && IsUnicodeMode()) {
+				char hexits[3];
+				sprintf(hexits, "%2X", ll->chars[i] & 0xff);
+				DrawTextBlob(surface, vsDraw, rcSegment, hexits, textBack, textFore, twoPhaseDraw);
+			} else {
+				// Normal text display
+				if (vsDraw.styles[styleMain].visible) {
+					if (twoPhaseDraw) {
+						surface->DrawTextTransparent(rcSegment, textFont,
+						        rcSegment.top + vsDraw.maxAscent, ll->chars + startseg,
+						        i - startseg + 1, textFore);
+					} else {
+						surface->DrawTextNoClip(rcSegment, textFont,
+						        rcSegment.top + vsDraw.maxAscent, ll->chars + startseg,
+						        i - startseg + 1, textFore, textBack);
+					}
+				}
+				if (vsDraw.viewWhitespace != wsInvisible ||
+				        (inIndentation && vsDraw.viewIndentationGuides != ivNone)) {
+					for (int cpos = 0; cpos <= i - startseg; cpos++) {
+						if (ll->chars[cpos + startseg] == ' ') {
+							if (vsDraw.viewWhitespace != wsInvisible) {
+								if (vsDraw.whitespaceForegroundSet)
+									textFore = vsDraw.whitespaceForeground.allocated;
+								if (!inIndentation || vsDraw.viewWhitespace == wsVisibleAlways) {
+									int xmid = (ll->positions[cpos + startseg] + ll->positions[cpos + startseg + 1]) / 2;
+									if (!twoPhaseDraw && drawWhitespaceBackground &&
+									        (!inIndentation || vsDraw.viewWhitespace == wsVisibleAlways)) {
+										textBack = vsDraw.whitespaceBackground.allocated;
+										PRectangle rcSpace(ll->positions[cpos + startseg] + xStart - subLineStart,
+											rcSegment.top,
+											ll->positions[cpos + startseg + 1] + xStart - subLineStart,
+											rcSegment.bottom);
+										surface->FillRectangle(rcSpace, textBack);
+									}
+									PRectangle rcDot(xmid + xStart - subLineStart, rcSegment.top + vsDraw.lineHeight / 2, 0, 0);
+									rcDot.right = rcDot.left + 1;
+									rcDot.bottom = rcDot.top + 1;
+									surface->FillRectangle(rcDot, textFore);
+								}
+							}
+							if (inIndentation && vsDraw.viewIndentationGuides == ivReal) {
+								int startSpace = ll->positions[cpos + startseg];
+								if (startSpace > 0 && (startSpace % indentWidth == 0)) {
+									DrawIndentGuide(surface, lineVisible, vsDraw.lineHeight, startSpace + xStart, rcSegment,
+									        (ll->xHighlightGuide == ll->positions[cpos + startseg]));
+								}
+							}
+						} else {
+							inIndentation = false;
+						}
+					}
+				}
+			}
+			if (ll->hsStart != -1 && vsDraw.hotspotUnderline && iDoc >= ll->hsStart && iDoc < ll->hsEnd ) {
+				PRectangle rcUL = rcSegment;
+				rcUL.top = rcUL.top + vsDraw.maxAscent + 1;
+				rcUL.bottom = rcUL.top + 1;
+				if (vsDraw.hotspotForegroundSet)
+					surface->FillRectangle(rcUL, vsDraw.hotspotForeground.allocated);
+				else
+					surface->FillRectangle(rcUL, textFore);
+			} else if (vsDraw.styles[styleMain].underline) {
+				PRectangle rcUL = rcSegment;
+				rcUL.top = rcUL.top + vsDraw.maxAscent + 1;
+				rcUL.bottom = rcUL.top + 1;
+				surface->FillRectangle(rcUL, textFore);
+			}
+		} else if (rcSegment.left > rcLine.right) {
+			break;
+		}
+	}
+	if ((vsDraw.viewIndentationGuides == ivLookForward || vsDraw.viewIndentationGuides == ivLookBoth)
+	        && (subLine == 0)) {
+		int indentSpace = pdoc->GetLineIndentation(line);
+		// Find the most recent line with some text
+
+		int lineLastWithText = line;
+		while (lineLastWithText > Platform::Maximum(line-20, 0) && pdoc->IsWhiteLine(lineLastWithText)) {
+			lineLastWithText--;
+		}
+		if (lineLastWithText < line) {
+			// This line is empty, so use indentation of last line with text
+			int indentLastWithText = pdoc->GetLineIndentation(lineLastWithText);
+			int isFoldHeader = pdoc->GetLevel(lineLastWithText) & SC_FOLDLEVELHEADERFLAG;
+			if (isFoldHeader) {
+				// Level is one more level than parent
+				indentLastWithText += pdoc->IndentSize();
+			}
+			if (vsDraw.viewIndentationGuides == ivLookForward) {
+				// In viLookForward mode, previous line only used if it is a fold header
+				if (isFoldHeader) {
+					indentSpace = Platform::Maximum(indentSpace, indentLastWithText);
+				}
+			} else {	// viLookBoth
+				indentSpace = Platform::Maximum(indentSpace, indentLastWithText);
+			}
+		}
+
+		int lineNextWithText = line;
+		while (lineNextWithText < Platform::Minimum(line+20, pdoc->LinesTotal()) && pdoc->IsWhiteLine(lineNextWithText)) {
+			lineNextWithText++;
+		}
+		if (lineNextWithText > line) {
+			// This line is empty, so use indentation of last line with text
+			indentSpace = Platform::Maximum(indentSpace,
+			        pdoc->GetLineIndentation(lineNextWithText));
+		}
+
+		for (int indentPos = pdoc->IndentSize(); indentPos < indentSpace; indentPos += pdoc->IndentSize()) {
+			int xIndent = indentPos * vsDraw.spaceWidth;
+			DrawIndentGuide(surface, lineVisible, vsDraw.lineHeight, xIndent + xStart, rcSegment,
+			        (ll->xHighlightGuide == xIndent));
+		}
+	}
+
+	DrawIndicators(surface, vsDraw, line, xStart, rcLine, ll, subLine, lineEnd, false);
+
+	// End of the drawing of the current line
+	if (!twoPhaseDraw) {
+		DrawEOL(surface, vsDraw, rcLine, ll, line, lineEnd,
+		        xStart, subLine, subLineStart, overrideBackground, background,
+		        drawWrapMarkEnd, wrapColour);
+	}
+	if ((vsDraw.selAlpha != SC_ALPHA_NOALPHA) && (ll->selStart >= 0) && (ll->selEnd >= 0)) {
+		int startPosSel = (ll->selStart < posLineStart) ? posLineStart : ll->selStart;
+		int endPosSel = (ll->selEnd < (lineEnd + posLineStart)) ? ll->selEnd : (lineEnd + posLineStart);
+		if (startPosSel < endPosSel) {
+			rcSegment.left = xStart + ll->positions[startPosSel - posLineStart] - subLineStart;
+			rcSegment.right = xStart + ll->positions[endPosSel - posLineStart] - subLineStart;
+			rcSegment.left = Platform::Maximum(rcSegment.left, rcLine.left);
+			rcSegment.right = Platform::Minimum(rcSegment.right, rcLine.right);
+			SimpleAlphaRectangle(surface, rcSegment, SelectionBackground(vsDraw), vsDraw.selAlpha);
+		}
+	}
+
+	// Draw any translucent whole line states
+	rcSegment.left = xStart;
+	rcSegment.right = rcLine.right - 1;
+	if (caret.active && vsDraw.showCaretLineBackground && ll->containsCaret) {
+		SimpleAlphaRectangle(surface, rcSegment, vsDraw.caretLineBackground.allocated, vsDraw.caretLineAlpha);
+	}
+	int marks = pdoc->GetMark(line);
+	for (int markBit = 0; (markBit < 32) && marks; markBit++) {
+		if ((marks & 1) && (vsDraw.markers[markBit].markType == SC_MARK_BACKGROUND)) {
+			SimpleAlphaRectangle(surface, rcSegment, vsDraw.markers[markBit].back.allocated, vsDraw.markers[markBit].alpha);
+		}
+		marks >>= 1;
+	}
+	if (vsDraw.maskInLine) {
+		int marksMasked = pdoc->GetMark(line) & vsDraw.maskInLine;
+		if (marksMasked) {
+			for (int markBit = 0; (markBit < 32) && marksMasked; markBit++) {
+				if ((marksMasked & 1) && (vsDraw.markers[markBit].markType != SC_MARK_EMPTY)) {
+					SimpleAlphaRectangle(surface, rcSegment, vsDraw.markers[markBit].back.allocated, vsDraw.markers[markBit].alpha);
+				}
+				marksMasked >>= 1;
+			}
+		}
+	}
+}
+
+void Editor::DrawBlockCaret(Surface *surface, ViewStyle &vsDraw, LineLayout *ll, int subLine, int xStart, int offset, int posCaret, PRectangle rcCaret) {
+
+	int lineStart = ll->LineStart(subLine);
+	int posBefore = posCaret;
+	int posAfter = MovePositionOutsideChar(posCaret + 1, 1);
+	int numCharsToDraw = posAfter - posCaret;
+
+	// Work out where the starting and ending offsets are. We need to
+	// see if the previous character shares horizontal space, such as a
+	// glyph / combining character. If so we'll need to draw that too.
+	int offsetFirstChar = offset;
+	int offsetLastChar = offset + (posAfter - posCaret);
+	while ((offsetLastChar - numCharsToDraw) >= lineStart) {
+		if ((ll->positions[offsetLastChar] - ll->positions[offsetLastChar - numCharsToDraw]) > 0) {
+			// The char does not share horizontal space
+			break;
+		}
+		// Char shares horizontal space, update the numChars to draw
+		// Update posBefore to point to the prev char
+		posBefore = MovePositionOutsideChar(posBefore - 1, -1);
+		numCharsToDraw = posAfter - posBefore;
+		offsetFirstChar = offset - (posCaret - posBefore);
+	}
+
+	// See if the next character shares horizontal space, if so we'll
+	// need to draw that too.
+	numCharsToDraw = offsetLastChar - offsetFirstChar;
+	while ((offsetLastChar < ll->LineStart(subLine + 1)) && (offsetLastChar <= ll->numCharsInLine)) {
+		// Update posAfter to point to the 2nd next char, this is where
+		// the next character ends, and 2nd next begins. We'll need
+		// to compare these two
+		posBefore = posAfter;
+		posAfter = MovePositionOutsideChar(posAfter + 1, 1);
+		offsetLastChar = offset + (posAfter - posCaret);
+		if ((ll->positions[offsetLastChar] - ll->positions[offsetLastChar - (posAfter - posBefore)]) > 0) {
+			// The char does not share horizontal space
+			break;
+		}
+		// Char shares horizontal space, update the numChars to draw
+		numCharsToDraw = offsetLastChar - offsetFirstChar;
+	}
+
+	// We now know what to draw, update the caret drawing rectangle
+	rcCaret.left = ll->positions[offsetFirstChar] - ll->positions[ll->LineStart(subLine)] + xStart;
+	rcCaret.right = ll->positions[offsetFirstChar+numCharsToDraw] - ll->positions[ll->LineStart(subLine)] + xStart;
+
+	// This character is where the caret block is, we override the colours
+	// (inversed) for drawing the caret here.
+	int styleMain = ll->styles[offsetFirstChar];
+	surface->DrawTextClipped(rcCaret, vsDraw.styles[styleMain].font,
+	        rcCaret.top + vsDraw.maxAscent, ll->chars + offsetFirstChar,
+	        numCharsToDraw, vsDraw.styles[styleMain].back.allocated,
+	        vsDraw.caretcolour.allocated);
+}
+
+void Editor::RefreshPixMaps(Surface *surfaceWindow) {
+	if (!pixmapSelPattern->Initialised()) {
+		const int patternSize = 8;
+		pixmapSelPattern->InitPixMap(patternSize, patternSize, surfaceWindow, wMain.GetID());
+		// This complex procedure is to reproduce the checkerboard dithered pattern used by windows
+		// for scroll bars and Visual Studio for its selection margin. The colour of this pattern is half
+		// way between the chrome colour and the chrome highlight colour making a nice transition
+		// between the window chrome and the content area. And it works in low colour depths.
+		PRectangle rcPattern(0, 0, patternSize, patternSize);
+
+		// Initialize default colours based on the chrome colour scheme.  Typically the highlight is white.
+		ColourAllocated colourFMFill = vs.selbar.allocated;
+		ColourAllocated colourFMStripes = vs.selbarlight.allocated;
+
+		if (!(vs.selbarlight.desired == ColourDesired(0xff, 0xff, 0xff))) {
+			// User has chosen an unusual chrome colour scheme so just use the highlight edge colour.
+			// (Typically, the highlight colour is white.)
+			colourFMFill = vs.selbarlight.allocated;
+		}
+
+		if (vs.foldmarginColourSet) {
+			// override default fold margin colour
+			colourFMFill = vs.foldmarginColour.allocated;
+		}
+		if (vs.foldmarginHighlightColourSet) {
+			// override default fold margin highlight colour
+			colourFMStripes = vs.foldmarginHighlightColour.allocated;
+		}
+
+		pixmapSelPattern->FillRectangle(rcPattern, colourFMFill);
+		pixmapSelPattern->PenColour(colourFMStripes);
+		for (int stripe = 0; stripe < patternSize; stripe++) {
+			// Alternating 1 pixel stripes is same as checkerboard.
+			pixmapSelPattern->MoveTo(0, stripe * 2);
+			pixmapSelPattern->LineTo(patternSize, stripe * 2 - patternSize);
+		}
+	}
+
+	if (!pixmapIndentGuide->Initialised()) {
+		// 1 extra pixel in height so can handle odd/even positions and so produce a continuous line
+		pixmapIndentGuide->InitPixMap(1, vs.lineHeight + 1, surfaceWindow, wMain.GetID());
+		pixmapIndentGuideHighlight->InitPixMap(1, vs.lineHeight + 1, surfaceWindow, wMain.GetID());
+		PRectangle rcIG(0, 0, 1, vs.lineHeight);
+		pixmapIndentGuide->FillRectangle(rcIG, vs.styles[STYLE_INDENTGUIDE].back.allocated);
+		pixmapIndentGuide->PenColour(vs.styles[STYLE_INDENTGUIDE].fore.allocated);
+		pixmapIndentGuideHighlight->FillRectangle(rcIG, vs.styles[STYLE_BRACELIGHT].back.allocated);
+		pixmapIndentGuideHighlight->PenColour(vs.styles[STYLE_BRACELIGHT].fore.allocated);
+		for (int stripe = 1; stripe < vs.lineHeight + 1; stripe += 2) {
+			pixmapIndentGuide->MoveTo(0, stripe);
+			pixmapIndentGuide->LineTo(2, stripe);
+			pixmapIndentGuideHighlight->MoveTo(0, stripe);
+			pixmapIndentGuideHighlight->LineTo(2, stripe);
+		}
+	}
+
+	if (bufferedDraw) {
+		if (!pixmapLine->Initialised()) {
+			PRectangle rcClient = GetClientRectangle();
+			pixmapLine->InitPixMap(rcClient.Width(), vs.lineHeight,
+			        surfaceWindow, wMain.GetID());
+			pixmapSelMargin->InitPixMap(vs.fixedColumnWidth,
+			        rcClient.Height(), surfaceWindow, wMain.GetID());
+		}
+	}
+}
+
+void Editor::Paint(Surface *surfaceWindow, PRectangle rcArea) {
+	//Platform::DebugPrintf("Paint:%1d (%3d,%3d) ... (%3d,%3d)\n",
+	//	paintingAllText, rcArea.left, rcArea.top, rcArea.right, rcArea.bottom);
+
+	pixmapLine->Release();
+	RefreshStyleData();
+	RefreshPixMaps(surfaceWindow);
+
+	PRectangle rcClient = GetClientRectangle();
+	//Platform::DebugPrintf("Client: (%3d,%3d) ... (%3d,%3d)   %d\n",
+	//	rcClient.left, rcClient.top, rcClient.right, rcClient.bottom);
+
+	surfaceWindow->SetPalette(&palette, true);
+	pixmapLine->SetPalette(&palette, !hasFocus);
+
+	int screenLinePaintFirst = rcArea.top / vs.lineHeight;
+	// The area to be painted plus one extra line is styled.
+	// The extra line is to determine when a style change, such as starting a comment flows on to other lines.
+	int lineStyleLast = topLine + (rcArea.bottom - 1) / vs.lineHeight + 1;
+	//Platform::DebugPrintf("Paint lines = %d .. %d\n", topLine + screenLinePaintFirst, lineStyleLast);
+	int endPosPaint = pdoc->Length();
+	if (lineStyleLast < cs.LinesDisplayed())
+		endPosPaint = pdoc->LineStart(cs.DocFromDisplay(lineStyleLast + 1));
+
+	int xStart = vs.fixedColumnWidth - xOffset;
+	int ypos = 0;
+	if (!bufferedDraw)
+		ypos += screenLinePaintFirst * vs.lineHeight;
+	int yposScreen = screenLinePaintFirst * vs.lineHeight;
+
+	// Ensure we are styled as far as we are painting.
+	pdoc->EnsureStyledTo(endPosPaint);
+	bool paintAbandonedByStyling = paintState == paintAbandoned;
+	if (needUpdateUI) {
+		// Deselect palette by selecting a temporary palette
+		Palette palTemp;
+		surfaceWindow->SetPalette(&palTemp, true);
+
+		NotifyUpdateUI();
+		needUpdateUI = false;
+
+		RefreshStyleData();
+		RefreshPixMaps(surfaceWindow);
+		surfaceWindow->SetPalette(&palette, true);
+		pixmapLine->SetPalette(&palette, !hasFocus);
+	}
+
+	// Call priority lines wrap on a window of lines which are likely
+	// to rendered with the following paint (that is wrap the visible
+	// 	lines first).
+	int startLineToWrap = cs.DocFromDisplay(topLine) - 5;
+	if (startLineToWrap < 0)
+		startLineToWrap = -1;
+	if (WrapLines(false, startLineToWrap)) {
+		// The wrapping process has changed the height of some lines so
+		// abandon this paint for a complete repaint.
+		if (AbandonPaint()) {
+			return;
+		}
+		RefreshPixMaps(surfaceWindow);	// In case pixmaps invalidated by scrollbar change
+	}
+	PLATFORM_ASSERT(pixmapSelPattern->Initialised());
+
+	PaintSelMargin(surfaceWindow, rcArea);
+
+	PRectangle rcRightMargin = rcClient;
+	rcRightMargin.left = rcRightMargin.right - vs.rightMarginWidth;
+	if (rcArea.Intersects(rcRightMargin)) {
+		surfaceWindow->FillRectangle(rcRightMargin, vs.styles[STYLE_DEFAULT].back.allocated);
+	}
+
+	if (paintState == paintAbandoned) {
+		// Either styling or NotifyUpdateUI noticed that painting is needed
+		// outside the current painting rectangle
+		//Platform::DebugPrintf("Abandoning paint\n");
+		if (wrapState != eWrapNone) {
+			if (paintAbandonedByStyling) {
+				// Styling has spilled over a line end, such as occurs by starting a multiline
+				// comment. The width of subsequent text may have changed, so rewrap.
+				NeedWrapping(cs.DocFromDisplay(topLine));
+			}
+		}
+		return;
+	}
+	//Platform::DebugPrintf("start display %d, offset = %d\n", pdoc->Length(), xOffset);
+
+	// Do the painting
+	if (rcArea.right > vs.fixedColumnWidth) {
+
+		Surface *surface = surfaceWindow;
+		if (bufferedDraw) {
+			surface = pixmapLine;
+			PLATFORM_ASSERT(pixmapLine->Initialised());
+		}
+		surface->SetUnicodeMode(IsUnicodeMode());
+		surface->SetDBCSMode(CodePage());
+
+		int visibleLine = topLine + screenLinePaintFirst;
+
+		int posCaret = currentPos;
+		if (posDrag >= 0)
+			posCaret = posDrag;
+		int lineCaret = pdoc->LineFromPosition(posCaret);
+
+		// Remove selection margin from drawing area so text will not be drawn
+		// on it in unbuffered mode.
+		PRectangle rcTextArea = rcClient;
+		rcTextArea.left = vs.fixedColumnWidth;
+		rcTextArea.right -= vs.rightMarginWidth;
+		surfaceWindow->SetClip(rcTextArea);
+
+		// Loop on visible lines
+		//double durLayout = 0.0;
+		//double durPaint = 0.0;
+		//double durCopy = 0.0;
+		//ElapsedTime etWhole;
+		int lineDocPrevious = -1;	// Used to avoid laying out one document line multiple times
+		AutoLineLayout ll(llc, 0);
+		SelectionLineIterator lineIterator(this);
+		while (visibleLine < cs.LinesDisplayed() && yposScreen < rcArea.bottom) {
+
+			int lineDoc = cs.DocFromDisplay(visibleLine);
+			// Only visible lines should be handled by the code within the loop
+			PLATFORM_ASSERT(cs.GetVisible(lineDoc));
+			int lineStartSet = cs.DisplayFromDoc(lineDoc);
+			int subLine = visibleLine - lineStartSet;
+
+			// Copy this line and its styles from the document into local arrays
+			// and determine the x position at which each character starts.
+			//ElapsedTime et;
+			if (lineDoc != lineDocPrevious) {
+				ll.Set(0);
+				// For rectangular selection this accesses the layout cache so should be after layout returned.
+				lineIterator.SetAt(lineDoc);
+				ll.Set(RetrieveLineLayout(lineDoc));
+				LayoutLine(lineDoc, surface, vs, ll, wrapWidth);
+				lineDocPrevious = lineDoc;
+			}
+			//durLayout += et.Duration(true);
+
+			if (ll) {
+				if (selType == selStream) {
+					ll->selStart = SelectionStart();
+					ll->selEnd = SelectionEnd();
+				} else {
+					ll->selStart = lineIterator.startPos;
+					ll->selEnd = lineIterator.endPos;
+				}
+				ll->containsCaret = lineDoc == lineCaret;
+				if (hideSelection) {
+					ll->selStart = -1;
+					ll->selEnd = -1;
+					ll->containsCaret = false;
+				}
+
+				GetHotSpotRange(ll->hsStart, ll->hsEnd);
+
+				PRectangle rcLine = rcClient;
+				rcLine.top = ypos;
+				rcLine.bottom = ypos + vs.lineHeight;
+
+				Range rangeLine(pdoc->LineStart(lineDoc), pdoc->LineStart(lineDoc + 1));
+				// Highlight the current braces if any
+				ll->SetBracesHighlight(rangeLine, braces, static_cast<char>(bracesMatchStyle),
+				        highlightGuideColumn * vs.spaceWidth);
+
+				// Draw the line
+				DrawLine(surface, vs, lineDoc, visibleLine, xStart, rcLine, ll, subLine);
+				//durPaint += et.Duration(true);
+
+				// Restore the previous styles for the brace highlights in case layout is in cache.
+				ll->RestoreBracesHighlight(rangeLine, braces);
+
+				bool expanded = cs.GetExpanded(lineDoc);
+				if ((foldFlags & SC_FOLDFLAG_BOX) == 0) {
+					// Paint the line above the fold
+					if ((expanded && (foldFlags & SC_FOLDFLAG_LINEBEFORE_EXPANDED))
+					        ||
+					        (!expanded && (foldFlags & SC_FOLDFLAG_LINEBEFORE_CONTRACTED))) {
+						if (pdoc->GetLevel(lineDoc) & SC_FOLDLEVELHEADERFLAG) {
+							PRectangle rcFoldLine = rcLine;
+							rcFoldLine.bottom = rcFoldLine.top + 1;
+							surface->FillRectangle(rcFoldLine, vs.styles[STYLE_DEFAULT].fore.allocated);
+						}
+					}
+					// Paint the line below the fold
+					if ((expanded && (foldFlags & SC_FOLDFLAG_LINEAFTER_EXPANDED))
+					        ||
+					        (!expanded && (foldFlags & SC_FOLDFLAG_LINEAFTER_CONTRACTED))) {
+						if (pdoc->GetLevel(lineDoc) & SC_FOLDLEVELHEADERFLAG) {
+							PRectangle rcFoldLine = rcLine;
+							rcFoldLine.top = rcFoldLine.bottom - 1;
+							surface->FillRectangle(rcFoldLine, vs.styles[STYLE_DEFAULT].fore.allocated);
+						}
+					}
+				} else {
+					int FoldLevelCurr = (pdoc->GetLevel(lineDoc) & SC_FOLDLEVELNUMBERMASK) - SC_FOLDLEVELBASE;
+					int FoldLevelPrev = (pdoc->GetLevel(lineDoc - 1) & SC_FOLDLEVELNUMBERMASK) - SC_FOLDLEVELBASE;
+					int FoldLevelFlags = (pdoc->GetLevel(lineDoc) & ~SC_FOLDLEVELNUMBERMASK) & ~(0xFFF0000);
+					int indentationStep = pdoc->IndentSize();
+					// Draw line above fold
+					if ((FoldLevelPrev < FoldLevelCurr)
+					        ||
+					        (FoldLevelFlags & SC_FOLDLEVELBOXHEADERFLAG
+					         &&
+					         (pdoc->GetLevel(lineDoc - 1) & SC_FOLDLEVELBOXFOOTERFLAG) == 0)) {
+						PRectangle rcFoldLine = rcLine;
+						rcFoldLine.bottom = rcFoldLine.top + 1;
+						rcFoldLine.left += xStart + FoldLevelCurr * vs.spaceWidth * indentationStep - 1;
+						surface->FillRectangle(rcFoldLine, vs.styles[STYLE_DEFAULT].fore.allocated);
+					}
+
+					// Line below the fold (or below a contracted fold)
+					if (FoldLevelFlags & SC_FOLDLEVELBOXFOOTERFLAG
+					        ||
+					        (!expanded && (foldFlags & SC_FOLDFLAG_LINEAFTER_CONTRACTED))) {
+						PRectangle rcFoldLine = rcLine;
+						rcFoldLine.top = rcFoldLine.bottom - 1;
+						rcFoldLine.left += xStart + (FoldLevelCurr) * vs.spaceWidth * indentationStep - 1;
+						surface->FillRectangle(rcFoldLine, vs.styles[STYLE_DEFAULT].fore.allocated);
+					}
+
+					PRectangle rcBoxLine = rcLine;
+					// Draw vertical line for every fold level
+					for (int i = 0; i <= FoldLevelCurr; i++) {
+						rcBoxLine.left = xStart + i * vs.spaceWidth * indentationStep - 1;
+						rcBoxLine.right = rcBoxLine.left + 1;
+						surface->FillRectangle(rcBoxLine, vs.styles[STYLE_DEFAULT].fore.allocated);
+					}
+				}
+
+				// Draw the Caret
+				if (lineDoc == lineCaret) {
+					int offset = Platform::Minimum(posCaret - rangeLine.start, ll->maxLineLength);
+					if (ll->InLine(offset, subLine)) {
+						int xposCaret = ll->positions[offset] - ll->positions[ll->LineStart(subLine)] + xStart;
+
+						if (actualWrapVisualStartIndent != 0) {
+							int lineStart = ll->LineStart(subLine);
+							if (lineStart != 0)	// Wrapped
+								xposCaret += actualWrapVisualStartIndent * vs.aveCharWidth;
+						}
+						if ((xposCaret >= 0) && (vs.caretWidth > 0) && (vs.caretStyle != CARETSTYLE_INVISIBLE) &&
+						        ((posDrag >= 0) || (caret.active && caret.on))) {
+							bool caretAtEOF = false;
+							bool caretAtEOL = false;
+							bool drawBlockCaret = false;
+							int widthOverstrikeCaret;
+							int caretWidthOffset = 0;
+							PRectangle rcCaret = rcLine;
+
+							if (posCaret == pdoc->Length())	{   // At end of document
+								caretAtEOF = true;
+								widthOverstrikeCaret = vs.aveCharWidth;
+							} else if ((posCaret - rangeLine.start) >= ll->numCharsInLine) {	// At end of line
+								caretAtEOL = true;
+								widthOverstrikeCaret = vs.aveCharWidth;
+							} else {
+								widthOverstrikeCaret = ll->positions[offset + 1] - ll->positions[offset];
+							}
+							if (widthOverstrikeCaret < 3)	// Make sure its visible
+								widthOverstrikeCaret = 3;
+
+							if (offset > ll->LineStart(subLine))
+								caretWidthOffset = 1;	// Move back so overlaps both character cells.
+							if (posDrag >= 0) {
+								/* Dragging text, use a line caret */
+								rcCaret.left = xposCaret - caretWidthOffset;
+								rcCaret.right = rcCaret.left + vs.caretWidth;
+							} else if (inOverstrike) {
+								/* Overstrike (insert mode), use a modified bar caret */
+								rcCaret.top = rcCaret.bottom - 2;
+								rcCaret.left = xposCaret + 1;
+								rcCaret.right = rcCaret.left + widthOverstrikeCaret - 1;
+							} else if (vs.caretStyle == CARETSTYLE_BLOCK) {
+								/* Block caret */
+								rcCaret.left = xposCaret;
+								if (!caretAtEOL && !caretAtEOF && (ll->chars[offset] != '\t') && !(IsControlCharacter(ll->chars[offset]))) {
+									drawBlockCaret = true;
+									rcCaret.right = xposCaret + widthOverstrikeCaret;
+								} else {
+									rcCaret.right = xposCaret + vs.aveCharWidth;
+								}
+							} else {
+								/* Line caret */
+								rcCaret.left = xposCaret - caretWidthOffset;
+								rcCaret.right = rcCaret.left + vs.caretWidth;
+							}
+							if (drawBlockCaret) {
+								DrawBlockCaret(surface, vs, ll, subLine, xStart, offset, posCaret, rcCaret);
+							} else {
+								surface->FillRectangle(rcCaret, vs.caretcolour.allocated);
+							}
+						}
+					}
+				}
+
+				if (bufferedDraw) {
+					Point from(vs.fixedColumnWidth, 0);
+					PRectangle rcCopyArea(vs.fixedColumnWidth, yposScreen,
+					        rcClient.right, yposScreen + vs.lineHeight);
+					surfaceWindow->Copy(rcCopyArea, from, *pixmapLine);
+				}
+				//durCopy += et.Duration(true);
+			}
+
+			if (!bufferedDraw) {
+				ypos += vs.lineHeight;
+			}
+
+			yposScreen += vs.lineHeight;
+			visibleLine++;
+
+			lineWidthMaxSeen = Platform::Maximum(
+			            lineWidthMaxSeen, ll->positions[ll->numCharsInLine]);
+			//gdk_flush();
+		}
+		ll.Set(0);
+		//if (durPaint < 0.00000001)
+		//	durPaint = 0.00000001;
+
+		// Right column limit indicator
+		PRectangle rcBeyondEOF = rcClient;
+		rcBeyondEOF.left = vs.fixedColumnWidth;
+		rcBeyondEOF.right = rcBeyondEOF.right;
+		rcBeyondEOF.top = (cs.LinesDisplayed() - topLine) * vs.lineHeight;
+		if (rcBeyondEOF.top < rcBeyondEOF.bottom) {
+			surfaceWindow->FillRectangle(rcBeyondEOF, vs.styles[STYLE_DEFAULT].back.allocated);
+			if (vs.edgeState == EDGE_LINE) {
+				int edgeX = theEdge * vs.spaceWidth;
+				rcBeyondEOF.left = edgeX + xStart;
+				rcBeyondEOF.right = rcBeyondEOF.left + 1;
+				surfaceWindow->FillRectangle(rcBeyondEOF, vs.edgecolour.allocated);
+			}
+		}
+		//Platform::DebugPrintf(
+		//"Layout:%9.6g    Paint:%9.6g    Ratio:%9.6g   Copy:%9.6g   Total:%9.6g\n",
+		//durLayout, durPaint, durLayout / durPaint, durCopy, etWhole.Duration());
+		NotifyPainted();
+	}
+}
+
+// Space (3 space characters) between line numbers and text when printing.
+#define lineNumberPrintSpace "   "
+
+ColourDesired InvertedLight(ColourDesired orig) {
+	unsigned int r = orig.GetRed();
+	unsigned int g = orig.GetGreen();
+	unsigned int b = orig.GetBlue();
+	unsigned int l = (r + g + b) / 3; 	// There is a better calculation for this that matches human eye
+	unsigned int il = 0xff - l;
+	if (l == 0)
+		return ColourDesired(0xff, 0xff, 0xff);
+	r = r * il / l;
+	g = g * il / l;
+	b = b * il / l;
+	return ColourDesired(Platform::Minimum(r, 0xff), Platform::Minimum(g, 0xff), Platform::Minimum(b, 0xff));
+}
+
+// This is mostly copied from the Paint method but with some things omitted
+// such as the margin markers, line numbers, selection and caret
+// Should be merged back into a combined Draw method.
+long Editor::FormatRange(bool draw, RangeToFormat *pfr) {
+	if (!pfr)
+		return 0;
+
+	AutoSurface surface(pfr->hdc, this);
+	if (!surface)
+		return 0;
+	AutoSurface surfaceMeasure(pfr->hdcTarget, this);
+	if (!surfaceMeasure) {
+		return 0;
+	}
+
+	// Can't use measurements cached for screen
+	posCache.Clear();
+
+	ViewStyle vsPrint(vs);
+
+	// Modify the view style for printing as do not normally want any of the transient features to be printed
+	// Printing supports only the line number margin.
+	int lineNumberIndex = -1;
+	for (int margin = 0; margin < ViewStyle::margins; margin++) {
+		if ((vsPrint.ms[margin].style == SC_MARGIN_NUMBER) && (vsPrint.ms[margin].width > 0)) {
+			lineNumberIndex = margin;
+		} else {
+			vsPrint.ms[margin].width = 0;
+		}
+	}
+	vsPrint.showMarkedLines = false;
+	vsPrint.fixedColumnWidth = 0;
+	vsPrint.zoomLevel = printMagnification;
+	vsPrint.viewIndentationGuides = ivNone;
+	// Don't show the selection when printing
+	vsPrint.selbackset = false;
+	vsPrint.selforeset = false;
+	vsPrint.selAlpha = SC_ALPHA_NOALPHA;
+	vsPrint.whitespaceBackgroundSet = false;
+	vsPrint.whitespaceForegroundSet = false;
+	vsPrint.showCaretLineBackground = false;
+
+	// Set colours for printing according to users settings
+	for (size_t sty = 0;sty < vsPrint.stylesSize;sty++) {
+		if (printColourMode == SC_PRINT_INVERTLIGHT) {
+			vsPrint.styles[sty].fore.desired = InvertedLight(vsPrint.styles[sty].fore.desired);
+			vsPrint.styles[sty].back.desired = InvertedLight(vsPrint.styles[sty].back.desired);
+		} else if (printColourMode == SC_PRINT_BLACKONWHITE) {
+			vsPrint.styles[sty].fore.desired = ColourDesired(0, 0, 0);
+			vsPrint.styles[sty].back.desired = ColourDesired(0xff, 0xff, 0xff);
+		} else if (printColourMode == SC_PRINT_COLOURONWHITE) {
+			vsPrint.styles[sty].back.desired = ColourDesired(0xff, 0xff, 0xff);
+		} else if (printColourMode == SC_PRINT_COLOURONWHITEDEFAULTBG) {
+			if (sty <= STYLE_DEFAULT) {
+				vsPrint.styles[sty].back.desired = ColourDesired(0xff, 0xff, 0xff);
+			}
+		}
+	}
+	// White background for the line numbers
+	vsPrint.styles[STYLE_LINENUMBER].back.desired = ColourDesired(0xff, 0xff, 0xff);
+
+	vsPrint.Refresh(*surfaceMeasure);
+	// Determining width must hapen after fonts have been realised in Refresh
+	int lineNumberWidth = 0;
+	if (lineNumberIndex >= 0) {
+		lineNumberWidth = surfaceMeasure->WidthText(vsPrint.styles[STYLE_LINENUMBER].font,
+		        "99999" lineNumberPrintSpace, 5 + istrlen(lineNumberPrintSpace));
+		vsPrint.ms[lineNumberIndex].width = lineNumberWidth;
+		vsPrint.Refresh(*surfaceMeasure);	// Recalculate fixedColumnWidth
+	}
+	// Ensure colours are set up
+	vsPrint.RefreshColourPalette(palette, true);
+	vsPrint.RefreshColourPalette(palette, false);
+
+	int linePrintStart = pdoc->LineFromPosition(pfr->chrg.cpMin);
+	int linePrintLast = linePrintStart + (pfr->rc.bottom - pfr->rc.top) / vsPrint.lineHeight - 1;
+	if (linePrintLast < linePrintStart)
+		linePrintLast = linePrintStart;
+	int linePrintMax = pdoc->LineFromPosition(pfr->chrg.cpMax);
+	if (linePrintLast > linePrintMax)
+		linePrintLast = linePrintMax;
+	//Platform::DebugPrintf("Formatting lines=[%0d,%0d,%0d] top=%0d bottom=%0d line=%0d %0d\n",
+	//      linePrintStart, linePrintLast, linePrintMax, pfr->rc.top, pfr->rc.bottom, vsPrint.lineHeight,
+	//      surfaceMeasure->Height(vsPrint.styles[STYLE_LINENUMBER].font));
+	int endPosPrint = pdoc->Length();
+	if (linePrintLast < pdoc->LinesTotal())
+		endPosPrint = pdoc->LineStart(linePrintLast + 1);
+
+	// Ensure we are styled to where we are formatting.
+	pdoc->EnsureStyledTo(endPosPrint);
+
+	int xStart = vsPrint.fixedColumnWidth + pfr->rc.left;
+	int ypos = pfr->rc.top;
+
+	int lineDoc = linePrintStart;
+
+	int nPrintPos = pfr->chrg.cpMin;
+	int visibleLine = 0;
+	int widthPrint = pfr->rc.Width() - vsPrint.fixedColumnWidth;
+	if (printWrapState == eWrapNone)
+		widthPrint = LineLayout::wrapWidthInfinite;
+
+	while (lineDoc <= linePrintLast && ypos < pfr->rc.bottom) {
+
+		// When printing, the hdc and hdcTarget may be the same, so
+		// changing the state of surfaceMeasure may change the underlying
+		// state of surface. Therefore, any cached state is discarded before
+		// using each surface.
+		surfaceMeasure->FlushCachedState();
+
+		// Copy this line and its styles from the document into local arrays
+		// and determine the x position at which each character starts.
+		LineLayout ll(8000);
+		LayoutLine(lineDoc, surfaceMeasure, vsPrint, &ll, widthPrint);
+
+		ll.selStart = -1;
+		ll.selEnd = -1;
+		ll.containsCaret = false;
+
+		PRectangle rcLine;
+		rcLine.left = pfr->rc.left;
+		rcLine.top = ypos;
+		rcLine.right = pfr->rc.right - 1;
+		rcLine.bottom = ypos + vsPrint.lineHeight;
+
+		// When document line is wrapped over multiple display lines, find where
+		// to start printing from to ensure a particular position is on the first
+		// line of the page.
+		if (visibleLine == 0) {
+			int startWithinLine = nPrintPos - pdoc->LineStart(lineDoc);
+			for (int iwl = 0; iwl < ll.lines - 1; iwl++) {
+				if (ll.LineStart(iwl) <= startWithinLine && ll.LineStart(iwl + 1) >= startWithinLine) {
+					visibleLine = -iwl;
+				}
+			}
+
+			if (ll.lines > 1 && startWithinLine >= ll.LineStart(ll.lines - 1)) {
+				visibleLine = -(ll.lines - 1);
+			}
+		}
+
+		if (draw && lineNumberWidth &&
+		        (ypos + vsPrint.lineHeight <= pfr->rc.bottom) &&
+		        (visibleLine >= 0)) {
+			char number[100];
+			sprintf(number, "%d" lineNumberPrintSpace, lineDoc + 1);
+			PRectangle rcNumber = rcLine;
+			rcNumber.right = rcNumber.left + lineNumberWidth;
+			// Right justify
+			rcNumber.left = rcNumber.right - surfaceMeasure->WidthText(
+			            vsPrint.styles[STYLE_LINENUMBER].font, number, istrlen(number));
+			surface->FlushCachedState();
+			surface->DrawTextNoClip(rcNumber, vsPrint.styles[STYLE_LINENUMBER].font,
+			        ypos + vsPrint.maxAscent, number, istrlen(number),
+			        vsPrint.styles[STYLE_LINENUMBER].fore.allocated,
+			        vsPrint.styles[STYLE_LINENUMBER].back.allocated);
+		}
+
+		// Draw the line
+		surface->FlushCachedState();
+
+		for (int iwl = 0; iwl < ll.lines; iwl++) {
+			if (ypos + vsPrint.lineHeight <= pfr->rc.bottom) {
+				if (visibleLine >= 0) {
+					if (draw) {
+						rcLine.top = ypos;
+						rcLine.bottom = ypos + vsPrint.lineHeight;
+						DrawLine(surface, vsPrint, lineDoc, visibleLine, xStart, rcLine, &ll, iwl);
+					}
+					ypos += vsPrint.lineHeight;
+				}
+				visibleLine++;
+				if (iwl == ll.lines - 1)
+					nPrintPos = pdoc->LineStart(lineDoc + 1);
+				else
+					nPrintPos += ll.LineStart(iwl + 1) - ll.LineStart(iwl);
+			}
+		}
+
+		++lineDoc;
+	}
+
+	// Clear cache so measurements are not used for screen
+	posCache.Clear();
+
+	return nPrintPos;
+}
+
+int Editor::TextWidth(int style, const char *text) {
+	RefreshStyleData();
+	AutoSurface surface(this);
+	if (surface) {
+		return surface->WidthText(vs.styles[style].font, text, istrlen(text));
+	} else {
+		return 1;
+	}
+}
+
+// Empty method is overridden on GTK+ to show / hide scrollbars
+void Editor::ReconfigureScrollBars() {}
+
+void Editor::SetScrollBars() {
+	RefreshStyleData();
+
+	int nMax = MaxScrollPos();
+	int nPage = LinesOnScreen();
+	bool modified = ModifyScrollBars(nMax + nPage - 1, nPage);
+	if (modified) {
+		DwellEnd(true);
+	}
+
+	// TODO: ensure always showing as many lines as possible
+	// May not be, if, for example, window made larger
+	if (topLine > MaxScrollPos()) {
+		SetTopLine(Platform::Clamp(topLine, 0, MaxScrollPos()));
+		SetVerticalScrollPos();
+		Redraw();
+	}
+	if (modified) {
+		if (!AbandonPaint())
+			Redraw();
+	}
+	//Platform::DebugPrintf("end max = %d page = %d\n", nMax, nPage);
+}
+
+void Editor::ChangeSize() {
+	DropGraphics();
+	SetScrollBars();
+	if (wrapState != eWrapNone) {
+		PRectangle rcTextArea = GetClientRectangle();
+		rcTextArea.left = vs.fixedColumnWidth;
+		rcTextArea.right -= vs.rightMarginWidth;
+		if (wrapWidth != rcTextArea.Width()) {
+			NeedWrapping();
+			Redraw();
+		}
+	}
+}
+
+void Editor::AddChar(char ch) {
+	char s[2];
+	s[0] = ch;
+	s[1] = '\0';
+	AddCharUTF(s, 1);
+}
+
+// AddCharUTF inserts an array of bytes which may or may not be in UTF-8.
+void Editor::AddCharUTF(char *s, unsigned int len, bool treatAsDBCS) {
+	bool wasSelection = currentPos != anchor;
+	ClearSelection();
+	bool charReplaceAction = false;
+	if (inOverstrike && !wasSelection && !RangeContainsProtected(currentPos, currentPos + 1)) {
+		if (currentPos < (pdoc->Length())) {
+			if (!IsEOLChar(pdoc->CharAt(currentPos))) {
+				charReplaceAction = true;
+				pdoc->BeginUndoAction();
+				pdoc->DelChar(currentPos);
+			}
+		}
+	}
+	if (pdoc->InsertString(currentPos, s, len)) {
+		SetEmptySelection(currentPos + len);
+	}
+	if (charReplaceAction) {
+		pdoc->EndUndoAction();
+	}
+	// If in wrap mode rewrap current line so EnsureCaretVisible has accurate information
+	if (wrapState != eWrapNone) {
+		AutoSurface surface(this);
+		if (surface) {
+			WrapOneLine(surface, pdoc->LineFromPosition(currentPos));
+		}
+		SetScrollBars();
+	}
+	EnsureCaretVisible();
+	// Avoid blinking during rapid typing:
+	ShowCaretAtCurrentPosition();
+	if (!caretSticky) {
+		SetLastXChosen();
+	}
+
+	if (treatAsDBCS) {
+		NotifyChar((static_cast<unsigned char>(s[0]) << 8) |
+		        static_cast<unsigned char>(s[1]));
+	} else {
+		int byte = static_cast<unsigned char>(s[0]);
+		if ((byte < 0xC0) || (1 == len)) {
+			// Handles UTF-8 characters between 0x01 and 0x7F and single byte
+			// characters when not in UTF-8 mode.
+			// Also treats \0 and naked trail bytes 0x80 to 0xBF as valid
+			// characters representing themselves.
+		} else {
+			// Unroll 1 to 3 byte UTF-8 sequences.  See reference data at:
+			// http://www.cl.cam.ac.uk/~mgk25/unicode.html
+			// http://www.cl.cam.ac.uk/~mgk25/ucs/examples/UTF-8-test.txt
+			if (byte < 0xE0) {
+				int byte2 = static_cast<unsigned char>(s[1]);
+				if ((byte2 & 0xC0) == 0x80) {
+					// Two-byte-character lead-byte followed by a trail-byte.
+					byte = (((byte & 0x1F) << 6) | (byte2 & 0x3F));
+				}
+				// A two-byte-character lead-byte not followed by trail-byte
+				// represents itself.
+			} else if (byte < 0xF0) {
+				int byte2 = static_cast<unsigned char>(s[1]);
+				int byte3 = static_cast<unsigned char>(s[2]);
+				if (((byte2 & 0xC0) == 0x80) && ((byte3 & 0xC0) == 0x80)) {
+					// Three-byte-character lead byte followed by two trail bytes.
+					byte = (((byte & 0x0F) << 12) | ((byte2 & 0x3F) << 6) |
+					        (byte3 & 0x3F));
+				}
+				// A three-byte-character lead-byte not followed by two trail-bytes
+				// represents itself.
+			}
+		}
+		NotifyChar(byte);
+	}
+}
+
+void Editor::ClearSelection() {
+	if (!SelectionContainsProtected()) {
+		int startPos = SelectionStart();
+		if (selType == selStream) {
+			unsigned int chars = SelectionEnd() - startPos;
+			if (0 != chars) {
+				pdoc->BeginUndoAction();
+				pdoc->DeleteChars(startPos, chars);
+				pdoc->EndUndoAction();
+			}
+		} else {
+			pdoc->BeginUndoAction();
+			SelectionLineIterator lineIterator(this, false);
+			while (lineIterator.Iterate()) {
+				startPos = lineIterator.startPos;
+				unsigned int chars = lineIterator.endPos - startPos;
+				if (0 != chars) {
+					pdoc->DeleteChars(startPos, chars);
+				}
+			}
+			pdoc->EndUndoAction();
+			selType = selStream;
+		}
+		SetEmptySelection(startPos);
+	}
+}
+
+void Editor::ClearAll() {
+	pdoc->BeginUndoAction();
+	if (0 != pdoc->Length()) {
+		pdoc->DeleteChars(0, pdoc->Length());
+	}
+	if (!pdoc->IsReadOnly()) {
+		cs.Clear();
+	}
+	pdoc->EndUndoAction();
+	anchor = 0;
+	currentPos = 0;
+	SetTopLine(0);
+	SetVerticalScrollPos();
+	InvalidateStyleRedraw();
+}
+
+void Editor::ClearDocumentStyle() {
+	Decoration *deco = pdoc->decorations.root;
+	while (deco) {
+		// Save next in case deco deleted
+		Decoration *decoNext = deco->next;
+		if (deco->indicator < INDIC_CONTAINER) {
+			pdoc->decorations.SetCurrentIndicator(deco->indicator);
+			pdoc->DecorationFillRange(0, 0, pdoc->Length());
+		}
+		deco = decoNext;
+	}
+	pdoc->StartStyling(0, '\377');
+	pdoc->SetStyleFor(pdoc->Length(), 0);
+	cs.ShowAll();
+	pdoc->ClearLevels();
+}
+
+void Editor::CopyAllowLine() {
+	SelectionText selectedText;
+	CopySelectionRange(&selectedText, true);
+	CopyToClipboard(selectedText);
+}
+
+void Editor::Cut() {
+	pdoc->CheckReadOnly();
+	if (!pdoc->IsReadOnly() && !SelectionContainsProtected()) {
+		Copy();
+		ClearSelection();
+	}
+}
+
+void Editor::PasteRectangular(int pos, const char *ptr, int len) {
+	if (pdoc->IsReadOnly() || SelectionContainsProtected()) {
+		return;
+	}
+	currentPos = pos;
+	int xInsert = XFromPosition(currentPos);
+	int line = pdoc->LineFromPosition(currentPos);
+	bool prevCr = false;
+	pdoc->BeginUndoAction();
+	for (int i = 0; i < len; i++) {
+		if (IsEOLChar(ptr[i])) {
+			if ((ptr[i] == '\r') || (!prevCr))
+				line++;
+			if (line >= pdoc->LinesTotal()) {
+				if (pdoc->eolMode != SC_EOL_LF)
+					pdoc->InsertChar(pdoc->Length(), '\r');
+				if (pdoc->eolMode != SC_EOL_CR)
+					pdoc->InsertChar(pdoc->Length(), '\n');
+			}
+			// Pad the end of lines with spaces if required
+			currentPos = PositionFromLineX(line, xInsert);
+			if ((XFromPosition(currentPos) < xInsert) && (i + 1 < len)) {
+				for (int i = 0; i < xInsert - XFromPosition(currentPos); i++) {
+					pdoc->InsertChar(currentPos, ' ');
+					currentPos++;
+				}
+			}
+			prevCr = ptr[i] == '\r';
+		} else {
+			pdoc->InsertString(currentPos, ptr + i, 1);
+			currentPos++;
+			prevCr = false;
+		}
+	}
+	pdoc->EndUndoAction();
+	SetEmptySelection(pos);
+}
+
+bool Editor::CanPaste() {
+	return !pdoc->IsReadOnly() && !SelectionContainsProtected();
+}
+
+void Editor::Clear() {
+	if (currentPos == anchor) {
+		if (!RangeContainsProtected(currentPos, currentPos + 1)) {
+			DelChar();
+		}
+	} else {
+		ClearSelection();
+	}
+	SetEmptySelection(currentPos);
+}
+
+void Editor::SelectAll() {
+	SetSelection(0, pdoc->Length());
+	Redraw();
+}
+
+void Editor::Undo() {
+	if (pdoc->CanUndo()) {
+		InvalidateCaret();
+		int newPos = pdoc->Undo();
+		if (newPos >= 0)
+			SetEmptySelection(newPos);
+		EnsureCaretVisible();
+	}
+}
+
+void Editor::Redo() {
+	if (pdoc->CanRedo()) {
+		int newPos = pdoc->Redo();
+		if (newPos >= 0)
+			SetEmptySelection(newPos);
+		EnsureCaretVisible();
+	}
+}
+
+void Editor::DelChar() {
+	if (!RangeContainsProtected(currentPos, currentPos + 1)) {
+		pdoc->DelChar(currentPos);
+	}
+	// Avoid blinking during rapid typing:
+	ShowCaretAtCurrentPosition();
+}
+
+void Editor::DelCharBack(bool allowLineStartDeletion) {
+	if (currentPos == anchor) {
+		if (!RangeContainsProtected(currentPos - 1, currentPos)) {
+			int lineCurrentPos = pdoc->LineFromPosition(currentPos);
+			if (allowLineStartDeletion || (pdoc->LineStart(lineCurrentPos) != currentPos)) {
+				if (pdoc->GetColumn(currentPos) <= pdoc->GetLineIndentation(lineCurrentPos) &&
+				        pdoc->GetColumn(currentPos) > 0 && pdoc->backspaceUnindents) {
+					pdoc->BeginUndoAction();
+					int indentation = pdoc->GetLineIndentation(lineCurrentPos);
+					int indentationStep = pdoc->IndentSize();
+					if (indentation % indentationStep == 0) {
+						pdoc->SetLineIndentation(lineCurrentPos, indentation - indentationStep);
+					} else {
+						pdoc->SetLineIndentation(lineCurrentPos, indentation - (indentation % indentationStep));
+					}
+					SetEmptySelection(pdoc->GetLineIndentPosition(lineCurrentPos));
+					pdoc->EndUndoAction();
+				} else {
+					pdoc->DelCharBack(currentPos);
+				}
+			}
+		}
+	} else {
+		ClearSelection();
+		SetEmptySelection(currentPos);
+	}
+	// Avoid blinking during rapid typing:
+	ShowCaretAtCurrentPosition();
+}
+
+void Editor::NotifyFocus(bool) {}
+
+void Editor::NotifyStyleToNeeded(int endStyleNeeded) {
+	SCNotification scn = {0};
+	scn.nmhdr.code = SCN_STYLENEEDED;
+	scn.position = endStyleNeeded;
+	NotifyParent(scn);
+}
+
+void Editor::NotifyStyleNeeded(Document*, void *, int endStyleNeeded) {
+	NotifyStyleToNeeded(endStyleNeeded);
+}
+
+void Editor::NotifyChar(int ch) {
+	SCNotification scn = {0};
+	scn.nmhdr.code = SCN_CHARADDED;
+	scn.ch = ch;
+	NotifyParent(scn);
+	if (recordingMacro) {
+		char txt[2];
+		txt[0] = static_cast<char>(ch);
+		txt[1] = '\0';
+		NotifyMacroRecord(SCI_REPLACESEL, 0, reinterpret_cast<sptr_t>(txt));
+	}
+}
+
+void Editor::NotifySavePoint(bool isSavePoint) {
+	SCNotification scn = {0};
+	if (isSavePoint) {
+		scn.nmhdr.code = SCN_SAVEPOINTREACHED;
+	} else {
+		scn.nmhdr.code = SCN_SAVEPOINTLEFT;
+	}
+	NotifyParent(scn);
+}
+
+void Editor::NotifyModifyAttempt() {
+	SCNotification scn = {0};
+	scn.nmhdr.code = SCN_MODIFYATTEMPTRO;
+	NotifyParent(scn);
+}
+
+void Editor::NotifyDoubleClick(Point pt, bool shift, bool ctrl, bool alt) {
+	SCNotification scn = {0};
+	scn.nmhdr.code = SCN_DOUBLECLICK;
+	scn.line = LineFromLocation(pt);
+	scn.position = PositionFromLocationClose(pt);
+	scn.modifiers = (shift ? SCI_SHIFT : 0) | (ctrl ? SCI_CTRL : 0) |
+	        (alt ? SCI_ALT : 0);
+	NotifyParent(scn);
+}
+
+void Editor::NotifyHotSpotDoubleClicked(int position, bool shift, bool ctrl, bool alt) {
+	SCNotification scn = {0};
+	scn.nmhdr.code = SCN_HOTSPOTDOUBLECLICK;
+	scn.position = position;
+	scn.modifiers = (shift ? SCI_SHIFT : 0) | (ctrl ? SCI_CTRL : 0) |
+	        (alt ? SCI_ALT : 0);
+	NotifyParent(scn);
+}
+
+void Editor::NotifyHotSpotClicked(int position, bool shift, bool ctrl, bool alt) {
+	SCNotification scn = {0};
+	scn.nmhdr.code = SCN_HOTSPOTCLICK;
+	scn.position = position;
+	scn.modifiers = (shift ? SCI_SHIFT : 0) | (ctrl ? SCI_CTRL : 0) |
+	        (alt ? SCI_ALT : 0);
+	NotifyParent(scn);
+}
+
+void Editor::NotifyUpdateUI() {
+	SCNotification scn = {0};
+	scn.nmhdr.code = SCN_UPDATEUI;
+	NotifyParent(scn);
+}
+
+void Editor::NotifyPainted() {
+	SCNotification scn = {0};
+	scn.nmhdr.code = SCN_PAINTED;
+	NotifyParent(scn);
+}
+
+void Editor::NotifyIndicatorClick(bool click, int position, bool shift, bool ctrl, bool alt) {
+	int mask = pdoc->decorations.AllOnFor(position);
+	if ((click && mask) || pdoc->decorations.clickNotified) {
+		SCNotification scn = {0};
+		pdoc->decorations.clickNotified = click;
+		scn.nmhdr.code = click ? SCN_INDICATORCLICK : SCN_INDICATORRELEASE;
+		scn.modifiers = (shift ? SCI_SHIFT : 0) | (ctrl ? SCI_CTRL : 0) | (alt ? SCI_ALT : 0);
+		scn.position = position;
+		NotifyParent(scn);
+	}
+}
+
+bool Editor::NotifyMarginClick(Point pt, bool shift, bool ctrl, bool alt) {
+	int marginClicked = -1;
+	int x = 0;
+	for (int margin = 0; margin < ViewStyle::margins; margin++) {
+		if ((pt.x > x) && (pt.x < x + vs.ms[margin].width))
+			marginClicked = margin;
+		x += vs.ms[margin].width;
+	}
+	if ((marginClicked >= 0) && vs.ms[marginClicked].sensitive) {
+		SCNotification scn = {0};
+		scn.nmhdr.code = SCN_MARGINCLICK;
+		scn.modifiers = (shift ? SCI_SHIFT : 0) | (ctrl ? SCI_CTRL : 0) |
+		        (alt ? SCI_ALT : 0);
+		scn.position = pdoc->LineStart(LineFromLocation(pt));
+		scn.margin = marginClicked;
+		NotifyParent(scn);
+		return true;
+	} else {
+		return false;
+	}
+}
+
+void Editor::NotifyNeedShown(int pos, int len) {
+	SCNotification scn = {0};
+	scn.nmhdr.code = SCN_NEEDSHOWN;
+	scn.position = pos;
+	scn.length = len;
+	NotifyParent(scn);
+}
+
+void Editor::NotifyDwelling(Point pt, bool state) {
+	SCNotification scn = {0};
+	scn.nmhdr.code = state ? SCN_DWELLSTART : SCN_DWELLEND;
+	scn.position = PositionFromLocationClose(pt);
+	scn.x = pt.x;
+	scn.y = pt.y;
+	NotifyParent(scn);
+}
+
+void Editor::NotifyZoom() {
+	SCNotification scn = {0};
+	scn.nmhdr.code = SCN_ZOOM;
+	NotifyParent(scn);
+}
+
+// Notifications from document
+void Editor::NotifyModifyAttempt(Document*, void *) {
+	//Platform::DebugPrintf("** Modify Attempt\n");
+	NotifyModifyAttempt();
+}
+
+void Editor::NotifyMove(int position) {
+	SCNotification scn = {0};
+	scn.nmhdr.code = SCN_POSCHANGED;
+	scn.position = position;
+	NotifyParent(scn);
+}
+
+void Editor::NotifySavePoint(Document*, void *, bool atSavePoint) {
+	//Platform::DebugPrintf("** Save Point %s\n", atSavePoint ? "On" : "Off");
+	NotifySavePoint(atSavePoint);
+}
+
+void Editor::CheckModificationForWrap(DocModification mh) {
+	if (mh.modificationType & (SC_MOD_INSERTTEXT | SC_MOD_DELETETEXT)) {
+		llc.Invalidate(LineLayout::llCheckTextAndStyle);
+		if (wrapState != eWrapNone) {
+			int lineDoc = pdoc->LineFromPosition(mh.position);
+			int lines = Platform::Maximum(0, mh.linesAdded);
+			NeedWrapping(lineDoc, lineDoc + lines + 1);
+		}
+	}
+}
+
+// Move a position so it is still after the same character as before the insertion.
+static inline int MovePositionForInsertion(int position, int startInsertion, int length) {
+	if (position > startInsertion) {
+		return position + length;
+	}
+	return position;
+}
+
+// Move a position so it is still after the same character as before the deletion if that
+// character is still present else after the previous surviving character.
+static inline int MovePositionForDeletion(int position, int startDeletion, int length) {
+	if (position > startDeletion) {
+		int endDeletion = startDeletion + length;
+		if (position > endDeletion) {
+			return position - length;
+		} else {
+			return startDeletion;
+		}
+	} else {
+		return position;
+	}
+}
+
+void Editor::NotifyModified(Document*, DocModification mh, void *) {
+	needUpdateUI = true;
+	if (paintState == painting) {
+		CheckForChangeOutsidePaint(Range(mh.position, mh.position + mh.length));
+	}
+	if (mh.modificationType & SC_MOD_CHANGELINESTATE) {
+		if (paintState == painting) {
+			CheckForChangeOutsidePaint(
+			    Range(pdoc->LineStart(mh.line), pdoc->LineStart(mh.line + 1)));
+		} else {
+			// Could check that change is before last visible line.
+			Redraw();
+		}
+	}
+	if (mh.modificationType & (SC_MOD_CHANGESTYLE | SC_MOD_CHANGEINDICATOR)) {
+		if (mh.modificationType & SC_MOD_CHANGESTYLE) {
+			pdoc->IncrementStyleClock();
+		}
+		if (paintState == notPainting) {
+			if (mh.position < pdoc->LineStart(topLine)) {
+				// Styling performed before this view
+				Redraw();
+			} else {
+				InvalidateRange(mh.position, mh.position + mh.length);
+			}
+		}
+		if (mh.modificationType & SC_MOD_CHANGESTYLE) {
+			llc.Invalidate(LineLayout::llCheckTextAndStyle);
+		}
+	} else {
+		// Move selection and brace highlights
+		if (mh.modificationType & SC_MOD_INSERTTEXT) {
+			currentPos = MovePositionForInsertion(currentPos, mh.position, mh.length);
+			anchor = MovePositionForInsertion(anchor, mh.position, mh.length);
+			braces[0] = MovePositionForInsertion(braces[0], mh.position, mh.length);
+			braces[1] = MovePositionForInsertion(braces[1], mh.position, mh.length);
+		} else if (mh.modificationType & SC_MOD_DELETETEXT) {
+			currentPos = MovePositionForDeletion(currentPos, mh.position, mh.length);
+			anchor = MovePositionForDeletion(anchor, mh.position, mh.length);
+			braces[0] = MovePositionForDeletion(braces[0], mh.position, mh.length);
+			braces[1] = MovePositionForDeletion(braces[1], mh.position, mh.length);
+		}
+		if (cs.LinesDisplayed() < cs.LinesInDoc()) {
+			// Some lines are hidden so may need shown.
+			// TODO: check if the modified area is hidden.
+			if (mh.modificationType & SC_MOD_BEFOREINSERT) {
+				NotifyNeedShown(mh.position, 0);
+			} else if (mh.modificationType & SC_MOD_BEFOREDELETE) {
+				NotifyNeedShown(mh.position, mh.length);
+			}
+		}
+		if (mh.linesAdded != 0) {
+			// Update contraction state for inserted and removed lines
+			// lineOfPos should be calculated in context of state before modification, shouldn't it
+			int lineOfPos = pdoc->LineFromPosition(mh.position);
+			if (mh.linesAdded > 0) {
+				cs.InsertLines(lineOfPos, mh.linesAdded);
+			} else {
+				cs.DeleteLines(lineOfPos, -mh.linesAdded);
+			}
+		}
+		CheckModificationForWrap(mh);
+		if (mh.linesAdded != 0) {
+			// Avoid scrolling of display if change before current display
+			if (mh.position < posTopLine && !CanDeferToLastStep(mh)) {
+				int newTop = Platform::Clamp(topLine + mh.linesAdded, 0, MaxScrollPos());
+				if (newTop != topLine) {
+					SetTopLine(newTop);
+					SetVerticalScrollPos();
+				}
+			}
+
+			//Platform::DebugPrintf("** %x Doc Changed\n", this);
+			// TODO: could invalidate from mh.startModification to end of screen
+			//InvalidateRange(mh.position, mh.position + mh.length);
+			if (paintState == notPainting && !CanDeferToLastStep(mh)) {
+				Redraw();
+			}
+		} else {
+			//Platform::DebugPrintf("** %x Line Changed %d .. %d\n", this,
+			//	mh.position, mh.position + mh.length);
+			if (paintState == notPainting && mh.length && !CanEliminate(mh)) {
+				InvalidateRange(mh.position, mh.position + mh.length);
+			}
+		}
+	}
+
+	if (mh.linesAdded != 0 && !CanDeferToLastStep(mh)) {
+		SetScrollBars();
+	}
+
+	if (mh.modificationType & SC_MOD_CHANGEMARKER) {
+		if ((paintState == notPainting) || !PaintContainsMargin()) {
+			if (mh.modificationType & SC_MOD_CHANGEFOLD) {
+				// Fold changes can affect the drawing of following lines so redraw whole margin
+				RedrawSelMargin();
+			} else {
+				RedrawSelMargin(mh.line);
+			}
+		}
+	}
+
+	// NOW pay the piper WRT "deferred" visual updates
+	if (IsLastStep(mh)) {
+		SetScrollBars();
+		Redraw();
+	}
+
+	// If client wants to see this modification
+	if (mh.modificationType & modEventMask) {
+		if ((mh.modificationType & (SC_MOD_CHANGESTYLE | SC_MOD_CHANGEINDICATOR)) == 0) {
+			// Real modification made to text of document.
+			NotifyChange();	// Send EN_CHANGE
+		}
+
+		SCNotification scn = {0};
+		scn.nmhdr.code = SCN_MODIFIED;
+		scn.position = mh.position;
+		scn.modificationType = mh.modificationType;
+		scn.text = mh.text;
+		scn.length = mh.length;
+		scn.linesAdded = mh.linesAdded;
+		scn.line = mh.line;
+		scn.foldLevelNow = mh.foldLevelNow;
+		scn.foldLevelPrev = mh.foldLevelPrev;
+		NotifyParent(scn);
+	}
+}
+
+void Editor::NotifyDeleted(Document *, void *) {
+	/* Do nothing */
+}
+
+void Editor::NotifyMacroRecord(unsigned int iMessage, uptr_t wParam, sptr_t lParam) {
+
+	// Enumerates all macroable messages
+	switch (iMessage) {
+	case SCI_CUT:
+	case SCI_COPY:
+	case SCI_PASTE:
+	case SCI_CLEAR:
+	case SCI_REPLACESEL:
+	case SCI_ADDTEXT:
+	case SCI_INSERTTEXT:
+	case SCI_APPENDTEXT:
+	case SCI_CLEARALL:
+	case SCI_SELECTALL:
+	case SCI_GOTOLINE:
+	case SCI_GOTOPOS:
+	case SCI_SEARCHANCHOR:
+	case SCI_SEARCHNEXT:
+	case SCI_SEARCHPREV:
+	case SCI_LINEDOWN:
+	case SCI_LINEDOWNEXTEND:
+	case SCI_PARADOWN:
+	case SCI_PARADOWNEXTEND:
+	case SCI_LINEUP:
+	case SCI_LINEUPEXTEND:
+	case SCI_PARAUP:
+	case SCI_PARAUPEXTEND:
+	case SCI_CHARLEFT:
+	case SCI_CHARLEFTEXTEND:
+	case SCI_CHARRIGHT:
+	case SCI_CHARRIGHTEXTEND:
+	case SCI_WORDLEFT:
+	case SCI_WORDLEFTEXTEND:
+	case SCI_WORDRIGHT:
+	case SCI_WORDRIGHTEXTEND:
+	case SCI_WORDPARTLEFT:
+	case SCI_WORDPARTLEFTEXTEND:
+	case SCI_WORDPARTRIGHT:
+	case SCI_WORDPARTRIGHTEXTEND:
+	case SCI_WORDLEFTEND:
+	case SCI_WORDLEFTENDEXTEND:
+	case SCI_WORDRIGHTEND:
+	case SCI_WORDRIGHTENDEXTEND:
+	case SCI_HOME:
+	case SCI_HOMEEXTEND:
+	case SCI_LINEEND:
+	case SCI_LINEENDEXTEND:
+	case SCI_HOMEWRAP:
+	case SCI_HOMEWRAPEXTEND:
+	case SCI_LINEENDWRAP:
+	case SCI_LINEENDWRAPEXTEND:
+	case SCI_DOCUMENTSTART:
+	case SCI_DOCUMENTSTARTEXTEND:
+	case SCI_DOCUMENTEND:
+	case SCI_DOCUMENTENDEXTEND:
+	case SCI_STUTTEREDPAGEUP:
+	case SCI_STUTTEREDPAGEUPEXTEND:
+	case SCI_STUTTEREDPAGEDOWN:
+	case SCI_STUTTEREDPAGEDOWNEXTEND:
+	case SCI_PAGEUP:
+	case SCI_PAGEUPEXTEND:
+	case SCI_PAGEDOWN:
+	case SCI_PAGEDOWNEXTEND:
+	case SCI_EDITTOGGLEOVERTYPE:
+	case SCI_CANCEL:
+	case SCI_DELETEBACK:
+	case SCI_TAB:
+	case SCI_BACKTAB:
+	case SCI_FORMFEED:
+	case SCI_VCHOME:
+	case SCI_VCHOMEEXTEND:
+	case SCI_VCHOMEWRAP:
+	case SCI_VCHOMEWRAPEXTEND:
+	case SCI_DELWORDLEFT:
+	case SCI_DELWORDRIGHT:
+	case SCI_DELWORDRIGHTEND:
+	case SCI_DELLINELEFT:
+	case SCI_DELLINERIGHT:
+	case SCI_LINECOPY:
+	case SCI_LINECUT:
+	case SCI_LINEDELETE:
+	case SCI_LINETRANSPOSE:
+	case SCI_LINEDUPLICATE:
+	case SCI_LOWERCASE:
+	case SCI_UPPERCASE:
+	case SCI_LINESCROLLDOWN:
+	case SCI_LINESCROLLUP:
+	case SCI_DELETEBACKNOTLINE:
+	case SCI_HOMEDISPLAY:
+	case SCI_HOMEDISPLAYEXTEND:
+	case SCI_LINEENDDISPLAY:
+	case SCI_LINEENDDISPLAYEXTEND:
+	case SCI_SETSELECTIONMODE:
+	case SCI_LINEDOWNRECTEXTEND:
+	case SCI_LINEUPRECTEXTEND:
+	case SCI_CHARLEFTRECTEXTEND:
+	case SCI_CHARRIGHTRECTEXTEND:
+	case SCI_HOMERECTEXTEND:
+	case SCI_VCHOMERECTEXTEND:
+	case SCI_LINEENDRECTEXTEND:
+	case SCI_PAGEUPRECTEXTEND:
+	case SCI_PAGEDOWNRECTEXTEND:
+	case SCI_SELECTIONDUPLICATE:
+	case SCI_COPYALLOWLINE:
+		break;
+
+		// Filter out all others like display changes. Also, newlines are redundant
+		// with char insert messages.
+	case SCI_NEWLINE:
+	default:
+		//		printf("Filtered out %ld of macro recording\n", iMessage);
+		return ;
+	}
+
+	// Send notification
+	SCNotification scn = {0};
+	scn.nmhdr.code = SCN_MACRORECORD;
+	scn.message = iMessage;
+	scn.wParam = wParam;
+	scn.lParam = lParam;
+	NotifyParent(scn);
+}
+
+/**
+ * Force scroll and keep position relative to top of window.
+ *
+ * If stuttered = true and not already at first/last row, move to first/last row of window.
+ * If stuttered = true and already at first/last row, scroll as normal.
+ */
+void Editor::PageMove(int direction, selTypes sel, bool stuttered) {
+	int topLineNew, newPos;
+
+	// I consider only the caretYSlop, and ignore the caretYPolicy-- is that a problem?
+	int currentLine = pdoc->LineFromPosition(currentPos);
+	int topStutterLine = topLine + caretYSlop;
+	int bottomStutterLine =
+	    pdoc->LineFromPosition(PositionFromLocation(
+	                Point(lastXChosen, direction * vs.lineHeight * LinesToScroll())))
+	    - caretYSlop - 1;
+
+	if (stuttered && (direction < 0 && currentLine > topStutterLine)) {
+		topLineNew = topLine;
+		newPos = PositionFromLocation(Point(lastXChosen, vs.lineHeight * caretYSlop));
+
+	} else if (stuttered && (direction > 0 && currentLine < bottomStutterLine)) {
+		topLineNew = topLine;
+		newPos = PositionFromLocation(Point(lastXChosen, vs.lineHeight * (LinesToScroll() - caretYSlop)));
+
+	} else {
+		Point pt = LocationFromPosition(currentPos);
+
+		topLineNew = Platform::Clamp(
+		            topLine + direction * LinesToScroll(), 0, MaxScrollPos());
+		newPos = PositionFromLocation(
+		            Point(lastXChosen, pt.y + direction * (vs.lineHeight * LinesToScroll())));
+	}
+
+	if (topLineNew != topLine) {
+		SetTopLine(topLineNew);
+		MovePositionTo(newPos, sel);
+		Redraw();
+		SetVerticalScrollPos();
+	} else {
+		MovePositionTo(newPos, sel);
+	}
+}
+
+void Editor::ChangeCaseOfSelection(bool makeUpperCase) {
+	pdoc->BeginUndoAction();
+	int startCurrent = currentPos;
+	int startAnchor = anchor;
+	if (selType == selStream) {
+		pdoc->ChangeCase(Range(SelectionStart(), SelectionEnd()),
+		        makeUpperCase);
+		SetSelection(startCurrent, startAnchor);
+	} else {
+		SelectionLineIterator lineIterator(this, false);
+		while (lineIterator.Iterate()) {
+			pdoc->ChangeCase(
+			    Range(lineIterator.startPos, lineIterator.endPos),
+			    makeUpperCase);
+		}
+		// Would be nicer to keep the rectangular selection but this is complex
+		SetEmptySelection(startCurrent);
+	}
+	pdoc->EndUndoAction();
+}
+
+void Editor::LineTranspose() {
+	int line = pdoc->LineFromPosition(currentPos);
+	if (line > 0) {
+		pdoc->BeginUndoAction();
+		int startPrev = pdoc->LineStart(line - 1);
+		int endPrev = pdoc->LineEnd(line - 1);
+		int start = pdoc->LineStart(line);
+		int end = pdoc->LineEnd(line);
+		char *line1 = CopyRange(startPrev, endPrev);
+		int len1 = endPrev - startPrev;
+		char *line2 = CopyRange(start, end);
+		int len2 = end - start;
+		pdoc->DeleteChars(start, len2);
+		pdoc->DeleteChars(startPrev, len1);
+		pdoc->InsertString(startPrev, line2, len2);
+		pdoc->InsertString(start - len1 + len2, line1, len1);
+		MovePositionTo(start - len1 + len2);
+		delete []line1;
+		delete []line2;
+		pdoc->EndUndoAction();
+	}
+}
+
+void Editor::Duplicate(bool forLine) {
+	int start = SelectionStart();
+	int end = SelectionEnd();
+	if (start == end) {
+		forLine = true;
+	}
+	if (forLine) {
+		int line = pdoc->LineFromPosition(currentPos);
+		start = pdoc->LineStart(line);
+		end = pdoc->LineEnd(line);
+	}
+	char *text = CopyRange(start, end);
+	if (forLine) {
+		const char *eol = StringFromEOLMode(pdoc->eolMode);
+		pdoc->InsertCString(end, eol);
+		pdoc->InsertString(end + istrlen(eol), text, end - start);
+	} else {
+		pdoc->InsertString(end, text, end - start);
+	}
+	delete []text;
+}
+
+void Editor::CancelModes() {
+	moveExtendsSelection = false;
+}
+
+void Editor::NewLine() {
+	ClearSelection();
+	const char *eol = "\n";
+	if (pdoc->eolMode == SC_EOL_CRLF) {
+		eol = "\r\n";
+	} else if (pdoc->eolMode == SC_EOL_CR) {
+		eol = "\r";
+	} // else SC_EOL_LF -> "\n" already set
+	if (pdoc->InsertCString(currentPos, eol)) {
+		SetEmptySelection(currentPos + istrlen(eol));
+		while (*eol) {
+			NotifyChar(*eol);
+			eol++;
+		}
+	}
+	SetLastXChosen();
+	SetScrollBars();
+	EnsureCaretVisible();
+	// Avoid blinking during rapid typing:
+	ShowCaretAtCurrentPosition();
+}
+
+void Editor::CursorUpOrDown(int direction, selTypes sel) {
+	Point pt = LocationFromPosition(currentPos);
+	int posNew = PositionFromLocation(
+	            Point(lastXChosen, pt.y + direction * vs.lineHeight));
+	if (direction < 0) {
+		// Line wrapping may lead to a location on the same line, so
+		// seek back if that is the case.
+		// There is an equivalent case when moving down which skips
+		// over a line but as that does not trap the user it is fine.
+		Point ptNew = LocationFromPosition(posNew);
+		while ((posNew > 0) && (pt.y == ptNew.y)) {
+			posNew--;
+			ptNew = LocationFromPosition(posNew);
+		}
+	}
+	MovePositionTo(posNew, sel);
+}
+
+void Editor::ParaUpOrDown(int direction, selTypes sel) {
+	int lineDoc, savedPos = currentPos;
+	do {
+		MovePositionTo(direction > 0 ? pdoc->ParaDown(currentPos) : pdoc->ParaUp(currentPos), sel);
+		lineDoc = pdoc->LineFromPosition(currentPos);
+		if (direction > 0) {
+			if (currentPos >= pdoc->Length() && !cs.GetVisible(lineDoc)) {
+				if (sel == noSel) {
+					MovePositionTo(pdoc->LineEndPosition(savedPos));
+				}
+				break;
+			}
+		}
+	} while (!cs.GetVisible(lineDoc));
+}
+
+int Editor::StartEndDisplayLine(int pos, bool start) {
+	RefreshStyleData();
+	int line = pdoc->LineFromPosition(pos);
+	AutoSurface surface(this);
+	AutoLineLayout ll(llc, RetrieveLineLayout(line));
+	int posRet = INVALID_POSITION;
+	if (surface && ll) {
+		unsigned int posLineStart = pdoc->LineStart(line);
+		LayoutLine(line, surface, vs, ll, wrapWidth);
+		int posInLine = pos - posLineStart;
+		if (posInLine <= ll->maxLineLength) {
+			for (int subLine = 0; subLine < ll->lines; subLine++) {
+				if ((posInLine >= ll->LineStart(subLine)) && (posInLine <= ll->LineStart(subLine + 1))) {
+					if (start) {
+						posRet = ll->LineStart(subLine) + posLineStart;
+					} else {
+						if (subLine == ll->lines - 1)
+							posRet = ll->LineStart(subLine + 1) + posLineStart;
+						else
+							posRet = ll->LineStart(subLine + 1) + posLineStart - 1;
+					}
+				}
+			}
+		}
+	}
+	if (posRet == INVALID_POSITION) {
+		return pos;
+	} else {
+		return posRet;
+	}
+}
+
+int Editor::KeyCommand(unsigned int iMessage) {
+	switch (iMessage) {
+	case SCI_LINEDOWN:
+		CursorUpOrDown(1);
+		break;
+	case SCI_LINEDOWNEXTEND:
+		CursorUpOrDown(1, selStream);
+		break;
+	case SCI_LINEDOWNRECTEXTEND:
+		CursorUpOrDown(1, selRectangle);
+		break;
+	case SCI_PARADOWN:
+		ParaUpOrDown(1);
+		break;
+	case SCI_PARADOWNEXTEND:
+		ParaUpOrDown(1, selStream);
+		break;
+	case SCI_LINESCROLLDOWN:
+		ScrollTo(topLine + 1);
+		MoveCaretInsideView(false);
+		break;
+	case SCI_LINEUP:
+		CursorUpOrDown(-1);
+		break;
+	case SCI_LINEUPEXTEND:
+		CursorUpOrDown(-1, selStream);
+		break;
+	case SCI_LINEUPRECTEXTEND:
+		CursorUpOrDown(-1, selRectangle);
+		break;
+	case SCI_PARAUP:
+		ParaUpOrDown(-1);
+		break;
+	case SCI_PARAUPEXTEND:
+		ParaUpOrDown(-1, selStream);
+		break;
+	case SCI_LINESCROLLUP:
+		ScrollTo(topLine - 1);
+		MoveCaretInsideView(false);
+		break;
+	case SCI_CHARLEFT:
+		if (SelectionEmpty() || moveExtendsSelection) {
+			MovePositionTo(MovePositionSoVisible(currentPos - 1, -1));
+		} else {
+			MovePositionTo(SelectionStart());
+		}
+		SetLastXChosen();
+		break;
+	case SCI_CHARLEFTEXTEND:
+		MovePositionTo(MovePositionSoVisible(currentPos - 1, -1), selStream);
+		SetLastXChosen();
+		break;
+	case SCI_CHARLEFTRECTEXTEND:
+		MovePositionTo(MovePositionSoVisible(currentPos - 1, -1), selRectangle);
+		SetLastXChosen();
+		break;
+	case SCI_CHARRIGHT:
+		if (SelectionEmpty() || moveExtendsSelection) {
+			MovePositionTo(MovePositionSoVisible(currentPos + 1, 1));
+		} else {
+			MovePositionTo(SelectionEnd());
+		}
+		SetLastXChosen();
+		break;
+	case SCI_CHARRIGHTEXTEND:
+		MovePositionTo(MovePositionSoVisible(currentPos + 1, 1), selStream);
+		SetLastXChosen();
+		break;
+	case SCI_CHARRIGHTRECTEXTEND:
+		MovePositionTo(MovePositionSoVisible(currentPos + 1, 1), selRectangle);
+		SetLastXChosen();
+		break;
+	case SCI_WORDLEFT:
+		MovePositionTo(MovePositionSoVisible(pdoc->NextWordStart(currentPos, -1), -1));
+		SetLastXChosen();
+		break;
+	case SCI_WORDLEFTEXTEND:
+		MovePositionTo(MovePositionSoVisible(pdoc->NextWordStart(currentPos, -1), -1), selStream);
+		SetLastXChosen();
+		break;
+	case SCI_WORDRIGHT:
+		MovePositionTo(MovePositionSoVisible(pdoc->NextWordStart(currentPos, 1), 1));
+		SetLastXChosen();
+		break;
+	case SCI_WORDRIGHTEXTEND:
+		MovePositionTo(MovePositionSoVisible(pdoc->NextWordStart(currentPos, 1), 1), selStream);
+		SetLastXChosen();
+		break;
+
+	case SCI_WORDLEFTEND:
+		MovePositionTo(MovePositionSoVisible(pdoc->NextWordEnd(currentPos, -1), -1));
+		SetLastXChosen();
+		break;
+	case SCI_WORDLEFTENDEXTEND:
+		MovePositionTo(MovePositionSoVisible(pdoc->NextWordEnd(currentPos, -1), -1), selStream);
+		SetLastXChosen();
+		break;
+	case SCI_WORDRIGHTEND:
+		MovePositionTo(MovePositionSoVisible(pdoc->NextWordEnd(currentPos, 1), 1));
+		SetLastXChosen();
+		break;
+	case SCI_WORDRIGHTENDEXTEND:
+		MovePositionTo(MovePositionSoVisible(pdoc->NextWordEnd(currentPos, 1), 1), selStream);
+		SetLastXChosen();
+		break;
+
+	case SCI_HOME:
+		MovePositionTo(pdoc->LineStart(pdoc->LineFromPosition(currentPos)));
+		SetLastXChosen();
+		break;
+	case SCI_HOMEEXTEND:
+		MovePositionTo(pdoc->LineStart(pdoc->LineFromPosition(currentPos)), selStream);
+		SetLastXChosen();
+		break;
+	case SCI_HOMERECTEXTEND:
+		MovePositionTo(pdoc->LineStart(pdoc->LineFromPosition(currentPos)), selRectangle);
+		SetLastXChosen();
+		break;
+	case SCI_LINEEND:
+		MovePositionTo(pdoc->LineEndPosition(currentPos));
+		SetLastXChosen();
+		break;
+	case SCI_LINEENDEXTEND:
+		MovePositionTo(pdoc->LineEndPosition(currentPos), selStream);
+		SetLastXChosen();
+		break;
+	case SCI_LINEENDRECTEXTEND:
+		MovePositionTo(pdoc->LineEndPosition(currentPos), selRectangle);
+		SetLastXChosen();
+		break;
+	case SCI_HOMEWRAP: {
+			int homePos = MovePositionSoVisible(StartEndDisplayLine(currentPos, true), -1);
+			if (currentPos <= homePos)
+				homePos = pdoc->LineStart(pdoc->LineFromPosition(currentPos));
+			MovePositionTo(homePos);
+			SetLastXChosen();
+		}
+		break;
+	case SCI_HOMEWRAPEXTEND: {
+			int homePos = MovePositionSoVisible(StartEndDisplayLine(currentPos, true), -1);
+			if (currentPos <= homePos)
+				homePos = pdoc->LineStart(pdoc->LineFromPosition(currentPos));
+			MovePositionTo(homePos, selStream);
+			SetLastXChosen();
+		}
+		break;
+	case SCI_LINEENDWRAP: {
+			int endPos = MovePositionSoVisible(StartEndDisplayLine(currentPos, false), 1);
+			int realEndPos = pdoc->LineEndPosition(currentPos);
+			if (endPos > realEndPos      // if moved past visible EOLs
+			        || currentPos >= endPos) // if at end of display line already
+				endPos = realEndPos;
+			MovePositionTo(endPos);
+			SetLastXChosen();
+		}
+		break;
+	case SCI_LINEENDWRAPEXTEND: {
+			int endPos = MovePositionSoVisible(StartEndDisplayLine(currentPos, false), 1);
+			int realEndPos = pdoc->LineEndPosition(currentPos);
+			if (endPos > realEndPos      // if moved past visible EOLs
+			        || currentPos >= endPos) // if at end of display line already
+				endPos = realEndPos;
+			MovePositionTo(endPos, selStream);
+			SetLastXChosen();
+		}
+		break;
+	case SCI_DOCUMENTSTART:
+		MovePositionTo(0);
+		SetLastXChosen();
+		break;
+	case SCI_DOCUMENTSTARTEXTEND:
+		MovePositionTo(0, selStream);
+		SetLastXChosen();
+		break;
+	case SCI_DOCUMENTEND:
+		MovePositionTo(pdoc->Length());
+		SetLastXChosen();
+		break;
+	case SCI_DOCUMENTENDEXTEND:
+		MovePositionTo(pdoc->Length(), selStream);
+		SetLastXChosen();
+		break;
+	case SCI_STUTTEREDPAGEUP:
+		PageMove(-1, noSel, true);
+		break;
+	case SCI_STUTTEREDPAGEUPEXTEND:
+		PageMove(-1, selStream, true);
+		break;
+	case SCI_STUTTEREDPAGEDOWN:
+		PageMove(1, noSel, true);
+		break;
+	case SCI_STUTTEREDPAGEDOWNEXTEND:
+		PageMove(1, selStream, true);
+		break;
+	case SCI_PAGEUP:
+		PageMove(-1);
+		break;
+	case SCI_PAGEUPEXTEND:
+		PageMove(-1, selStream);
+		break;
+	case SCI_PAGEUPRECTEXTEND:
+		PageMove(-1, selRectangle);
+		break;
+	case SCI_PAGEDOWN:
+		PageMove(1);
+		break;
+	case SCI_PAGEDOWNEXTEND:
+		PageMove(1, selStream);
+		break;
+	case SCI_PAGEDOWNRECTEXTEND:
+		PageMove(1, selRectangle);
+		break;
+	case SCI_EDITTOGGLEOVERTYPE:
+		inOverstrike = !inOverstrike;
+		DropCaret();
+		ShowCaretAtCurrentPosition();
+		NotifyUpdateUI();
+		break;
+	case SCI_CANCEL:            	// Cancel any modes - handled in subclass
+		// Also unselect text
+		CancelModes();
+		break;
+	case SCI_DELETEBACK:
+		DelCharBack(true);
+		if (!caretSticky) {
+			SetLastXChosen();
+		}
+		EnsureCaretVisible();
+		break;
+	case SCI_DELETEBACKNOTLINE:
+		DelCharBack(false);
+		if (!caretSticky) {
+			SetLastXChosen();
+		}
+		EnsureCaretVisible();
+		break;
+	case SCI_TAB:
+		Indent(true);
+		if (!caretSticky) {
+			SetLastXChosen();
+		}
+		EnsureCaretVisible();
+		break;
+	case SCI_BACKTAB:
+		Indent(false);
+		if (!caretSticky) {
+			SetLastXChosen();
+		}
+		EnsureCaretVisible();
+		break;
+	case SCI_NEWLINE:
+		NewLine();
+		break;
+	case SCI_FORMFEED:
+		AddChar('\f');
+		break;
+	case SCI_VCHOME:
+		MovePositionTo(pdoc->VCHomePosition(currentPos));
+		SetLastXChosen();
+		break;
+	case SCI_VCHOMEEXTEND:
+		MovePositionTo(pdoc->VCHomePosition(currentPos), selStream);
+		SetLastXChosen();
+		break;
+	case SCI_VCHOMERECTEXTEND:
+		MovePositionTo(pdoc->VCHomePosition(currentPos), selRectangle);
+		SetLastXChosen();
+		break;
+	case SCI_VCHOMEWRAP: {
+			int homePos = pdoc->VCHomePosition(currentPos);
+			int viewLineStart = MovePositionSoVisible(StartEndDisplayLine(currentPos, true), -1);
+			if ((viewLineStart < currentPos) && (viewLineStart > homePos))
+				homePos = viewLineStart;
+
+			MovePositionTo(homePos);
+			SetLastXChosen();
+		}
+		break;
+	case SCI_VCHOMEWRAPEXTEND: {
+			int homePos = pdoc->VCHomePosition(currentPos);
+			int viewLineStart = MovePositionSoVisible(StartEndDisplayLine(currentPos, true), -1);
+			if ((viewLineStart < currentPos) && (viewLineStart > homePos))
+				homePos = viewLineStart;
+
+			MovePositionTo(homePos, selStream);
+			SetLastXChosen();
+		}
+		break;
+	case SCI_ZOOMIN:
+		if (vs.zoomLevel < 20) {
+			vs.zoomLevel++;
+			InvalidateStyleRedraw();
+			NotifyZoom();
+		}
+		break;
+	case SCI_ZOOMOUT:
+		if (vs.zoomLevel > -10) {
+			vs.zoomLevel--;
+			InvalidateStyleRedraw();
+			NotifyZoom();
+		}
+		break;
+	case SCI_DELWORDLEFT: {
+			int startWord = pdoc->NextWordStart(currentPos, -1);
+			pdoc->DeleteChars(startWord, currentPos - startWord);
+			SetLastXChosen();
+		}
+		break;
+	case SCI_DELWORDRIGHT: {
+			int endWord = pdoc->NextWordStart(currentPos, 1);
+			pdoc->DeleteChars(currentPos, endWord - currentPos);
+		}
+		break;
+	case SCI_DELWORDRIGHTEND: {
+			int endWord = pdoc->NextWordEnd(currentPos, 1);
+			pdoc->DeleteChars(currentPos, endWord - currentPos);
+		}
+		break;
+	case SCI_DELLINELEFT: {
+			int line = pdoc->LineFromPosition(currentPos);
+			int start = pdoc->LineStart(line);
+			pdoc->DeleteChars(start, currentPos - start);
+			SetLastXChosen();
+		}
+		break;
+	case SCI_DELLINERIGHT: {
+			int line = pdoc->LineFromPosition(currentPos);
+			int end = pdoc->LineEnd(line);
+			pdoc->DeleteChars(currentPos, end - currentPos);
+		}
+		break;
+	case SCI_LINECOPY: {
+			int lineStart = pdoc->LineFromPosition(SelectionStart());
+			int lineEnd = pdoc->LineFromPosition(SelectionEnd());
+			CopyRangeToClipboard(pdoc->LineStart(lineStart),
+			        pdoc->LineStart(lineEnd + 1));
+		}
+		break;
+	case SCI_LINECUT: {
+			int lineStart = pdoc->LineFromPosition(SelectionStart());
+			int lineEnd = pdoc->LineFromPosition(SelectionEnd());
+			int start = pdoc->LineStart(lineStart);
+			int end = pdoc->LineStart(lineEnd + 1);
+			SetSelection(start, end);
+			Cut();
+			SetLastXChosen();
+		}
+		break;
+	case SCI_LINEDELETE: {
+			int line = pdoc->LineFromPosition(currentPos);
+			int start = pdoc->LineStart(line);
+			int end = pdoc->LineStart(line + 1);
+			pdoc->DeleteChars(start, end - start);
+		}
+		break;
+	case SCI_LINETRANSPOSE:
+		LineTranspose();
+		break;
+	case SCI_LINEDUPLICATE:
+		Duplicate(true);
+		break;
+	case SCI_SELECTIONDUPLICATE:
+		Duplicate(false);
+		break;
+	case SCI_LOWERCASE:
+		ChangeCaseOfSelection(false);
+		break;
+	case SCI_UPPERCASE:
+		ChangeCaseOfSelection(true);
+		break;
+	case SCI_WORDPARTLEFT:
+		MovePositionTo(MovePositionSoVisible(pdoc->WordPartLeft(currentPos), -1));
+		SetLastXChosen();
+		break;
+	case SCI_WORDPARTLEFTEXTEND:
+		MovePositionTo(MovePositionSoVisible(pdoc->WordPartLeft(currentPos), -1), selStream);
+		SetLastXChosen();
+		break;
+	case SCI_WORDPARTRIGHT:
+		MovePositionTo(MovePositionSoVisible(pdoc->WordPartRight(currentPos), 1));
+		SetLastXChosen();
+		break;
+	case SCI_WORDPARTRIGHTEXTEND:
+		MovePositionTo(MovePositionSoVisible(pdoc->WordPartRight(currentPos), 1), selStream);
+		SetLastXChosen();
+		break;
+	case SCI_HOMEDISPLAY:
+		MovePositionTo(MovePositionSoVisible(
+		            StartEndDisplayLine(currentPos, true), -1));
+		SetLastXChosen();
+		break;
+	case SCI_HOMEDISPLAYEXTEND:
+		MovePositionTo(MovePositionSoVisible(
+		            StartEndDisplayLine(currentPos, true), -1), selStream);
+		SetLastXChosen();
+		break;
+	case SCI_LINEENDDISPLAY:
+		MovePositionTo(MovePositionSoVisible(
+		            StartEndDisplayLine(currentPos, false), 1));
+		SetLastXChosen();
+		break;
+	case SCI_LINEENDDISPLAYEXTEND:
+		MovePositionTo(MovePositionSoVisible(
+		            StartEndDisplayLine(currentPos, false), 1), selStream);
+		SetLastXChosen();
+		break;
+	}
+	return 0;
+}
+
+int Editor::KeyDefault(int, int) {
+	return 0;
+}
+
+int Editor::KeyDown(int key, bool shift, bool ctrl, bool alt, bool *consumed) {
+	DwellEnd(false);
+	int modifiers = (shift ? SCI_SHIFT : 0) | (ctrl ? SCI_CTRL : 0) |
+	        (alt ? SCI_ALT : 0);
+	int msg = kmap.Find(key, modifiers);
+	if (msg) {
+		if (consumed)
+			*consumed = true;
+		return WndProc(msg, 0, 0);
+	} else {
+		if (consumed)
+			*consumed = false;
+		return KeyDefault(key, modifiers);
+	}
+}
+
+void Editor::SetWhitespaceVisible(int view) {
+	vs.viewWhitespace = static_cast<WhiteSpaceVisibility>(view);
+}
+
+int Editor::GetWhitespaceVisible() {
+	return vs.viewWhitespace;
+}
+
+void Editor::Indent(bool forwards) {
+	//Platform::DebugPrintf("INdent %d\n", forwards);
+	int lineOfAnchor = pdoc->LineFromPosition(anchor);
+	int lineCurrentPos = pdoc->LineFromPosition(currentPos);
+	if (lineOfAnchor == lineCurrentPos) {
+		if (forwards) {
+			pdoc->BeginUndoAction();
+			ClearSelection();
+			if (pdoc->GetColumn(currentPos) <= pdoc->GetColumn(pdoc->GetLineIndentPosition(lineCurrentPos)) &&
+			        pdoc->tabIndents) {
+				int indentation = pdoc->GetLineIndentation(lineCurrentPos);
+				int indentationStep = pdoc->IndentSize();
+				pdoc->SetLineIndentation(lineCurrentPos, indentation + indentationStep - indentation % indentationStep);
+				SetEmptySelection(pdoc->GetLineIndentPosition(lineCurrentPos));
+			} else {
+				if (pdoc->useTabs) {
+					pdoc->InsertChar(currentPos, '\t');
+					SetEmptySelection(currentPos + 1);
+				} else {
+					int numSpaces = (pdoc->tabInChars) -
+					        (pdoc->GetColumn(currentPos) % (pdoc->tabInChars));
+					if (numSpaces < 1)
+						numSpaces = pdoc->tabInChars;
+					for (int i = 0; i < numSpaces; i++) {
+						pdoc->InsertChar(currentPos + i, ' ');
+					}
+					SetEmptySelection(currentPos + numSpaces);
+				}
+			}
+			pdoc->EndUndoAction();
+		} else {
+			if (pdoc->GetColumn(currentPos) <= pdoc->GetLineIndentation(lineCurrentPos) &&
+			        pdoc->tabIndents) {
+				pdoc->BeginUndoAction();
+				int indentation = pdoc->GetLineIndentation(lineCurrentPos);
+				int indentationStep = pdoc->IndentSize();
+				pdoc->SetLineIndentation(lineCurrentPos, indentation - indentationStep);
+				SetEmptySelection(pdoc->GetLineIndentPosition(lineCurrentPos));
+				pdoc->EndUndoAction();
+			} else {
+				int newColumn = ((pdoc->GetColumn(currentPos) - 1) / pdoc->tabInChars) *
+				        pdoc->tabInChars;
+				if (newColumn < 0)
+					newColumn = 0;
+				int newPos = currentPos;
+				while (pdoc->GetColumn(newPos) > newColumn)
+					newPos--;
+				SetEmptySelection(newPos);
+			}
+		}
+	} else {
+		int anchorPosOnLine = anchor - pdoc->LineStart(lineOfAnchor);
+		int currentPosPosOnLine = currentPos - pdoc->LineStart(lineCurrentPos);
+		// Multiple lines selected so indent / dedent
+		int lineTopSel = Platform::Minimum(lineOfAnchor, lineCurrentPos);
+		int lineBottomSel = Platform::Maximum(lineOfAnchor, lineCurrentPos);
+		if (pdoc->LineStart(lineBottomSel) == anchor || pdoc->LineStart(lineBottomSel) == currentPos)
+			lineBottomSel--;  	// If not selecting any characters on a line, do not indent
+		pdoc->BeginUndoAction();
+		pdoc->Indent(forwards, lineBottomSel, lineTopSel);
+		pdoc->EndUndoAction();
+		if (lineOfAnchor < lineCurrentPos) {
+			if (currentPosPosOnLine == 0)
+				SetSelection(pdoc->LineStart(lineCurrentPos), pdoc->LineStart(lineOfAnchor));
+			else
+				SetSelection(pdoc->LineStart(lineCurrentPos + 1), pdoc->LineStart(lineOfAnchor));
+		} else {
+			if (anchorPosOnLine == 0)
+				SetSelection(pdoc->LineStart(lineCurrentPos), pdoc->LineStart(lineOfAnchor));
+			else
+				SetSelection(pdoc->LineStart(lineCurrentPos), pdoc->LineStart(lineOfAnchor + 1));
+		}
+	}
+}
+
+/**
+ * Search of a text in the document, in the given range.
+ * @return The position of the found text, -1 if not found.
+ */
+long Editor::FindText(
+    uptr_t wParam,		///< Search modes : @c SCFIND_MATCHCASE, @c SCFIND_WHOLEWORD,
+    ///< @c SCFIND_WORDSTART, @c SCFIND_REGEXP or @c SCFIND_POSIX.
+    sptr_t lParam) {	///< @c TextToFind structure: The text to search for in the given range.
+
+	TextToFind *ft = reinterpret_cast<TextToFind *>(lParam);
+	int lengthFound = istrlen(ft->lpstrText);
+	int pos = pdoc->FindText(ft->chrg.cpMin, ft->chrg.cpMax, ft->lpstrText,
+	        (wParam & SCFIND_MATCHCASE) != 0,
+	        (wParam & SCFIND_WHOLEWORD) != 0,
+	        (wParam & SCFIND_WORDSTART) != 0,
+	        (wParam & SCFIND_REGEXP) != 0,
+	        wParam,
+	        &lengthFound);
+	if (pos != -1) {
+		ft->chrgText.cpMin = pos;
+		ft->chrgText.cpMax = pos + lengthFound;
+	}
+	return pos;
+}
+
+/**
+ * Relocatable search support : Searches relative to current selection
+ * point and sets the selection to the found text range with
+ * each search.
+ */
+/**
+ * Anchor following searches at current selection start: This allows
+ * multiple incremental interactive searches to be macro recorded
+ * while still setting the selection to found text so the find/select
+ * operation is self-contained.
+ */
+void Editor::SearchAnchor() {
+	searchAnchor = SelectionStart();
+}
+
+/**
+ * Find text from current search anchor: Must call @c SearchAnchor first.
+ * Used for next text and previous text requests.
+ * @return The position of the found text, -1 if not found.
+ */
+long Editor::SearchText(
+    unsigned int iMessage,		///< Accepts both @c SCI_SEARCHNEXT and @c SCI_SEARCHPREV.
+    uptr_t wParam,				///< Search modes : @c SCFIND_MATCHCASE, @c SCFIND_WHOLEWORD,
+    ///< @c SCFIND_WORDSTART, @c SCFIND_REGEXP or @c SCFIND_POSIX.
+    sptr_t lParam) {			///< The text to search for.
+
+	const char *txt = reinterpret_cast<char *>(lParam);
+	int pos;
+	int lengthFound = istrlen(txt);
+	if (iMessage == SCI_SEARCHNEXT) {
+		pos = pdoc->FindText(searchAnchor, pdoc->Length(), txt,
+		        (wParam & SCFIND_MATCHCASE) != 0,
+		        (wParam & SCFIND_WHOLEWORD) != 0,
+		        (wParam & SCFIND_WORDSTART) != 0,
+		        (wParam & SCFIND_REGEXP) != 0,
+		        wParam,
+		        &lengthFound);
+	} else {
+		pos = pdoc->FindText(searchAnchor, 0, txt,
+		        (wParam & SCFIND_MATCHCASE) != 0,
+		        (wParam & SCFIND_WHOLEWORD) != 0,
+		        (wParam & SCFIND_WORDSTART) != 0,
+		        (wParam & SCFIND_REGEXP) != 0,
+		        wParam,
+		        &lengthFound);
+	}
+
+	if (pos != -1) {
+		SetSelection(pos, pos + lengthFound);
+	}
+
+	return pos;
+}
+
+/**
+ * Search for text in the target range of the document.
+ * @return The position of the found text, -1 if not found.
+ */
+long Editor::SearchInTarget(const char *text, int length) {
+	int lengthFound = length;
+	int pos = pdoc->FindText(targetStart, targetEnd, text,
+	        (searchFlags & SCFIND_MATCHCASE) != 0,
+	        (searchFlags & SCFIND_WHOLEWORD) != 0,
+	        (searchFlags & SCFIND_WORDSTART) != 0,
+	        (searchFlags & SCFIND_REGEXP) != 0,
+	        searchFlags,
+	        &lengthFound);
+	if (pos != -1) {
+		targetStart = pos;
+		targetEnd = pos + lengthFound;
+	}
+	return pos;
+}
+
+void Editor::GoToLine(int lineNo) {
+	if (lineNo > pdoc->LinesTotal())
+		lineNo = pdoc->LinesTotal();
+	if (lineNo < 0)
+		lineNo = 0;
+	SetEmptySelection(pdoc->LineStart(lineNo));
+	ShowCaretAtCurrentPosition();
+	EnsureCaretVisible();
+}
+
+static bool Close(Point pt1, Point pt2) {
+	if (abs(pt1.x - pt2.x) > 3)
+		return false;
+	if (abs(pt1.y - pt2.y) > 3)
+		return false;
+	return true;
+}
+
+char *Editor::CopyRange(int start, int end) {
+	char *text = 0;
+	if (start < end) {
+		int len = end - start;
+		text = new char[len + 1];
+		if (text) {
+			for (int i = 0; i < len; i++) {
+				text[i] = pdoc->CharAt(start + i);
+			}
+			text[len] = '\0';
+		}
+	}
+	return text;
+}
+
+void Editor::CopySelectionFromRange(SelectionText *ss, bool allowLineCopy, int start, int end) {
+	bool isLine = allowLineCopy && (start == end);
+	if (isLine) {
+		int currentLine = pdoc->LineFromPosition(currentPos);
+		start = pdoc->LineStart(currentLine);
+		end = pdoc->LineEnd(currentLine);
+
+		char *text = CopyRange(start, end);
+		int textLen = text ? strlen(text) : 0;
+		// include room for \r\n\0
+		textLen += 3;
+		char *textWithEndl = new char[textLen];
+		textWithEndl[0] = '\0';
+		if (text)
+			strncat(textWithEndl, text, textLen);
+		if (pdoc->eolMode != SC_EOL_LF)
+			strncat(textWithEndl, "\r", textLen);
+		if (pdoc->eolMode != SC_EOL_CR)
+			strncat(textWithEndl, "\n", textLen);
+		ss->Set(textWithEndl, strlen(textWithEndl),
+			pdoc->dbcsCodePage, vs.styles[STYLE_DEFAULT].characterSet, false, true);
+		delete []text;
+	} else {
+		ss->Set(CopyRange(start, end), end - start + 1,
+			pdoc->dbcsCodePage, vs.styles[STYLE_DEFAULT].characterSet, false, false);
+	}
+}
+
+void Editor::CopySelectionRange(SelectionText *ss, bool allowLineCopy) {
+	if (selType == selStream) {
+		CopySelectionFromRange(ss, allowLineCopy, SelectionStart(), SelectionEnd());
+	} else {
+		char *text = 0;
+		int size = 0;
+		SelectionLineIterator lineIterator(this);
+		while (lineIterator.Iterate()) {
+			size += lineIterator.endPos - lineIterator.startPos;
+			if (selType != selLines) {
+				size++;
+				if (pdoc->eolMode == SC_EOL_CRLF) {
+					size++;
+				}
+			}
+		}
+		if (size > 0) {
+			text = new char[size + 1];
+			if (text) {
+				int j = 0;
+				lineIterator.Reset();
+				while (lineIterator.Iterate()) {
+					for (int i = lineIterator.startPos;
+					        i < lineIterator.endPos;
+					        i++) {
+						text[j++] = pdoc->CharAt(i);
+					}
+					if (selType != selLines) {
+						if (pdoc->eolMode != SC_EOL_LF) {
+							text[j++] = '\r';
+						}
+						if (pdoc->eolMode != SC_EOL_CR) {
+							text[j++] = '\n';
+						}
+					}
+				}
+				text[size] = '\0';
+			}
+		}
+		ss->Set(text, size + 1, pdoc->dbcsCodePage,
+			vs.styles[STYLE_DEFAULT].characterSet, selType == selRectangle, selType == selLines);
+	}
+}
+
+void Editor::CopyRangeToClipboard(int start, int end) {
+	start = pdoc->ClampPositionIntoDocument(start);
+	end = pdoc->ClampPositionIntoDocument(end);
+	SelectionText selectedText;
+	selectedText.Set(CopyRange(start, end), end - start + 1,
+		pdoc->dbcsCodePage, vs.styles[STYLE_DEFAULT].characterSet, false, false);
+	CopyToClipboard(selectedText);
+}
+
+void Editor::CopyText(int length, const char *text) {
+	SelectionText selectedText;
+	selectedText.Copy(text, length + 1,
+		pdoc->dbcsCodePage, vs.styles[STYLE_DEFAULT].characterSet, false, false);
+	CopyToClipboard(selectedText);
+}
+
+void Editor::SetDragPosition(int newPos) {
+	if (newPos >= 0) {
+		newPos = MovePositionOutsideChar(newPos, 1);
+		posDrop = newPos;
+	}
+	if (posDrag != newPos) {
+		caret.on = true;
+		SetTicking(true);
+		InvalidateCaret();
+		posDrag = newPos;
+		InvalidateCaret();
+	}
+}
+
+void Editor::DisplayCursor(Window::Cursor c) {
+	if (cursorMode == SC_CURSORNORMAL)
+		wMain.SetCursor(c);
+	else
+		wMain.SetCursor(static_cast<Window::Cursor>(cursorMode));
+}
+
+bool Editor::DragThreshold(Point ptStart, Point ptNow) {
+	int xMove = ptStart.x - ptNow.x;
+	int yMove = ptStart.y - ptNow.y;
+	int distanceSquared = xMove * xMove + yMove * yMove;
+	return distanceSquared > 16;
+}
+
+void Editor::StartDrag() {
+	// Always handled by subclasses
+	//SetMouseCapture(true);
+	//DisplayCursor(Window::cursorArrow);
+}
+
+void Editor::DropAt(int position, const char *value, bool moving, bool rectangular) {
+	//Platform::DebugPrintf("DropAt %d %d\n", inDragDrop, position);
+	if (inDragDrop == ddDragging)
+		dropWentOutside = false;
+
+	int positionWasInSelection = PositionInSelection(position);
+
+	bool positionOnEdgeOfSelection =
+	    (position == SelectionStart()) || (position == SelectionEnd());
+
+	if ((inDragDrop != ddDragging) || !(0 == positionWasInSelection) ||
+	        (positionOnEdgeOfSelection && !moving)) {
+
+		int selStart = SelectionStart();
+		int selEnd = SelectionEnd();
+
+		pdoc->BeginUndoAction();
+
+		int positionAfterDeletion = position;
+		if ((inDragDrop == ddDragging) && moving) {
+			// Remove dragged out text
+			if (rectangular || selType == selLines) {
+				SelectionLineIterator lineIterator(this);
+				while (lineIterator.Iterate()) {
+					if (position >= lineIterator.startPos) {
+						if (position > lineIterator.endPos) {
+							positionAfterDeletion -= lineIterator.endPos - lineIterator.startPos;
+						} else {
+							positionAfterDeletion -= position - lineIterator.startPos;
+						}
+					}
+				}
+			} else {
+				if (position > selStart) {
+					positionAfterDeletion -= selEnd - selStart;
+				}
+			}
+			ClearSelection();
+		}
+		position = positionAfterDeletion;
+
+		if (rectangular) {
+			PasteRectangular(position, value, istrlen(value));
+			pdoc->EndUndoAction();
+			// Should try to select new rectangle but it may not be a rectangle now so just select the drop position
+			SetEmptySelection(position);
+		} else {
+			position = MovePositionOutsideChar(position, currentPos - position);
+			if (pdoc->InsertCString(position, value)) {
+				SetSelection(position + istrlen(value), position);
+			}
+			pdoc->EndUndoAction();
+		}
+	} else if (inDragDrop == ddDragging) {
+		SetEmptySelection(position);
+	}
+}
+
+/**
+ * @return -1 if given position is before the selection,
+ *          1 if position is after the selection,
+ *          0 if position is inside the selection,
+ */
+int Editor::PositionInSelection(int pos) {
+	pos = MovePositionOutsideChar(pos, currentPos - pos);
+	if (pos < SelectionStart()) {
+		return -1;
+	}
+	if (pos > SelectionEnd()) {
+		return 1;
+	}
+	if (selType == selStream) {
+		return 0;
+	} else {
+		SelectionLineIterator lineIterator(this);
+		lineIterator.SetAt(pdoc->LineFromPosition(pos));
+		if (pos < lineIterator.startPos) {
+			return -1;
+		} else if (pos > lineIterator.endPos) {
+			return 1;
+		} else {
+			return 0;
+		}
+	}
+}
+
+bool Editor::PointInSelection(Point pt) {
+	int pos = PositionFromLocation(pt);
+	if (0 == PositionInSelection(pos)) {
+		// Probably inside, but we must make a finer test
+		int selStart, selEnd;
+		if (selType == selStream) {
+			selStart = SelectionStart();
+			selEnd = SelectionEnd();
+		} else {
+			SelectionLineIterator lineIterator(this);
+			lineIterator.SetAt(pdoc->LineFromPosition(pos));
+			selStart = lineIterator.startPos;
+			selEnd = lineIterator.endPos;
+		}
+		if (pos == selStart) {
+			// see if just before selection
+			Point locStart = LocationFromPosition(pos);
+			if (pt.x < locStart.x) {
+				return false;
+			}
+		}
+		if (pos == selEnd) {
+			// see if just after selection
+			Point locEnd = LocationFromPosition(pos);
+			if (pt.x > locEnd.x) {
+				return false;
+			}
+		}
+		return true;
+	}
+	return false;
+}
+
+bool Editor::PointInSelMargin(Point pt) {
+	// Really means: "Point in a margin"
+	if (vs.fixedColumnWidth > 0) {	// There is a margin
+		PRectangle rcSelMargin = GetClientRectangle();
+		rcSelMargin.right = vs.fixedColumnWidth - vs.leftMarginWidth;
+		return rcSelMargin.Contains(pt);
+	} else {
+		return false;
+	}
+}
+
+void Editor::LineSelection(int lineCurrent_, int lineAnchor_) {
+	if (lineAnchor_ < lineCurrent_) {
+		SetSelection(pdoc->LineStart(lineCurrent_ + 1),
+		        pdoc->LineStart(lineAnchor_));
+	} else if (lineAnchor_ > lineCurrent_) {
+		SetSelection(pdoc->LineStart(lineCurrent_),
+		        pdoc->LineStart(lineAnchor_ + 1));
+	} else { // Same line, select it
+		SetSelection(pdoc->LineStart(lineAnchor_ + 1),
+		        pdoc->LineStart(lineAnchor_));
+	}
+}
+
+void Editor::DwellEnd(bool mouseMoved) {
+	if (mouseMoved)
+		ticksToDwell = dwellDelay;
+	else
+		ticksToDwell = SC_TIME_FOREVER;
+	if (dwelling && (dwellDelay < SC_TIME_FOREVER)) {
+		dwelling = false;
+		NotifyDwelling(ptMouseLast, dwelling);
+	}
+}
+
+void Editor::ButtonDown(Point pt, unsigned int curTime, bool shift, bool ctrl, bool alt) {
+	//Platform::DebugPrintf("ButtonDown %d %d = %d alt=%d %d\n", curTime, lastClickTime, curTime - lastClickTime, alt, inDragDrop);
+	ptMouseLast = pt;
+	int newPos = PositionFromLocation(pt);
+	newPos = MovePositionOutsideChar(newPos, currentPos - newPos);
+	inDragDrop = ddNone;
+	moveExtendsSelection = false;
+
+	bool processed = NotifyMarginClick(pt, shift, ctrl, alt);
+	if (processed)
+		return;
+
+	NotifyIndicatorClick(true, newPos, shift, ctrl, alt);
+
+	bool inSelMargin = PointInSelMargin(pt);
+	if (shift & !inSelMargin) {
+		SetSelection(newPos);
+	}
+	if (((curTime - lastClickTime) < Platform::DoubleClickTime()) && Close(pt, lastClick)) {
+		//Platform::DebugPrintf("Double click %d %d = %d\n", curTime, lastClickTime, curTime - lastClickTime);
+		SetMouseCapture(true);
+		SetEmptySelection(newPos);
+		bool doubleClick = false;
+		// Stop mouse button bounce changing selection type
+		if (!Platform::MouseButtonBounce() || curTime != lastClickTime) {
+			if (selectionType == selChar) {
+				selectionType = selWord;
+				doubleClick = true;
+			} else if (selectionType == selWord) {
+				selectionType = selLine;
+			} else {
+				selectionType = selChar;
+				originalAnchorPos = currentPos;
+			}
+		}
+
+		if (selectionType == selWord) {
+			if (currentPos >= originalAnchorPos) {	// Moved forward
+				SetSelection(pdoc->ExtendWordSelect(currentPos, 1),
+				        pdoc->ExtendWordSelect(originalAnchorPos, -1));
+			} else {	// Moved backward
+				SetSelection(pdoc->ExtendWordSelect(currentPos, -1),
+				        pdoc->ExtendWordSelect(originalAnchorPos, 1));
+			}
+		} else if (selectionType == selLine) {
+			lineAnchor = LineFromLocation(pt);
+			SetSelection(pdoc->LineStart(lineAnchor + 1), pdoc->LineStart(lineAnchor));
+			//Platform::DebugPrintf("Triple click: %d - %d\n", anchor, currentPos);
+		} else {
+			SetEmptySelection(currentPos);
+		}
+		//Platform::DebugPrintf("Double click: %d - %d\n", anchor, currentPos);
+		if (doubleClick) {
+			NotifyDoubleClick(pt, shift, ctrl, alt);
+			if (PositionIsHotspot(newPos))
+				NotifyHotSpotDoubleClicked(newPos, shift, ctrl, alt);
+		}
+	} else {	// Single click
+		if (inSelMargin) {
+			selType = selStream;
+			if (ctrl) {
+				SelectAll();
+				lastClickTime = curTime;
+				return;
+			}
+			if (!shift) {
+				lineAnchor = LineFromLocation(pt);
+				// Single click in margin: select whole line
+				LineSelection(lineAnchor, lineAnchor);
+				SetSelection(pdoc->LineStart(lineAnchor + 1),
+				        pdoc->LineStart(lineAnchor));
+			} else {
+				// Single shift+click in margin: select from line anchor to clicked line
+				if (anchor > currentPos)
+					lineAnchor = pdoc->LineFromPosition(anchor - 1);
+				else
+					lineAnchor = pdoc->LineFromPosition(anchor);
+				int lineStart = LineFromLocation(pt);
+				LineSelection(lineStart, lineAnchor);
+				//lineAnchor = lineStart; // Keep the same anchor for ButtonMove
+			}
+
+			SetDragPosition(invalidPosition);
+			SetMouseCapture(true);
+			selectionType = selLine;
+		} else {
+			if (PointIsHotspot(pt)) {
+				NotifyHotSpotClicked(newPos, shift, ctrl, alt);
+			}
+			if (!shift) {
+				if (PointInSelection(pt) && !SelectionEmpty())
+					inDragDrop = ddInitial;
+				else
+					inDragDrop = ddNone;
+			}
+			SetMouseCapture(true);
+			if (inDragDrop != ddInitial) {
+				SetDragPosition(invalidPosition);
+				if (!shift) {
+					SetEmptySelection(newPos);
+				}
+				selType = alt ? selRectangle : selStream;
+				selectionType = selChar;
+				originalAnchorPos = currentPos;
+				SetRectangularRange();
+			}
+		}
+	}
+	lastClickTime = curTime;
+	lastXChosen = pt.x;
+	ShowCaretAtCurrentPosition();
+}
+
+bool Editor::PositionIsHotspot(int position) {
+	return vs.styles[pdoc->StyleAt(position) & pdoc->stylingBitsMask].hotspot;
+}
+
+bool Editor::PointIsHotspot(Point pt) {
+	int pos = PositionFromLocationClose(pt);
+	if (pos == INVALID_POSITION)
+		return false;
+	return PositionIsHotspot(pos);
+}
+
+void Editor::SetHotSpotRange(Point *pt) {
+	if (pt) {
+		int pos = PositionFromLocation(*pt);
+
+		// If we don't limit this to word characters then the
+		// range can encompass more than the run range and then
+		// the underline will not be drawn properly.
+		int hsStart_ = pdoc->ExtendStyleRange(pos, -1, vs.hotspotSingleLine);
+		int hsEnd_ = pdoc->ExtendStyleRange(pos, 1, vs.hotspotSingleLine);
+
+		// Only invalidate the range if the hotspot range has changed...
+		if (hsStart_ != hsStart || hsEnd_ != hsEnd) {
+			if (hsStart != -1) {
+				InvalidateRange(hsStart, hsEnd);
+			}
+			hsStart = hsStart_;
+			hsEnd = hsEnd_;
+			InvalidateRange(hsStart, hsEnd);
+		}
+	} else {
+		if (hsStart != -1) {
+			int hsStart_ = hsStart;
+			int hsEnd_ = hsEnd;
+			hsStart = -1;
+			hsEnd = -1;
+			InvalidateRange(hsStart_, hsEnd_);
+		} else {
+			hsStart = -1;
+			hsEnd = -1;
+		}
+	}
+}
+
+void Editor::GetHotSpotRange(int& hsStart_, int& hsEnd_) {
+	hsStart_ = hsStart;
+	hsEnd_ = hsEnd;
+}
+
+void Editor::ButtonMove(Point pt) {
+	if ((ptMouseLast.x != pt.x) || (ptMouseLast.y != pt.y)) {
+		DwellEnd(true);
+	}
+
+	int movePos = PositionFromLocation(pt);
+	movePos = MovePositionOutsideChar(movePos, currentPos - movePos);
+
+	if (inDragDrop == ddInitial) {
+		if (DragThreshold(ptMouseLast, pt)) {
+			SetMouseCapture(false);
+			SetDragPosition(movePos);
+			CopySelectionRange(&drag);
+			StartDrag();
+		}
+		return;
+	}
+
+	ptMouseLast = pt;
+	//Platform::DebugPrintf("Move %d %d\n", pt.x, pt.y);
+	if (HaveMouseCapture()) {
+
+		// Slow down autoscrolling/selection
+		autoScrollTimer.ticksToWait -= timer.tickSize;
+		if (autoScrollTimer.ticksToWait > 0)
+			return;
+		autoScrollTimer.ticksToWait = autoScrollDelay;
+
+		// Adjust selection
+		if (posDrag >= 0) {
+			SetDragPosition(movePos);
+		} else {
+			if (selectionType == selChar) {
+				SetSelection(movePos);
+			} else if (selectionType == selWord) {
+				// Continue selecting by word
+				if (movePos == originalAnchorPos) {	// Didn't move
+					// No need to do anything. Previously this case was lumped
+					// in with "Moved forward", but that can be harmful in this
+					// case: a handler for the NotifyDoubleClick re-adjusts
+					// the selection for a fancier definition of "word" (for
+					// example, in Perl it is useful to include the leading
+					// '$', '%' or '@' on variables for word selection). In this
+					// the ButtonMove() called via Tick() for auto-scrolling
+					// could result in the fancier word selection adjustment
+					// being unmade.
+				} else if (movePos > originalAnchorPos) {	// Moved forward
+					SetSelection(pdoc->ExtendWordSelect(movePos, 1),
+					        pdoc->ExtendWordSelect(originalAnchorPos, -1));
+				} else {	// Moved backward
+					SetSelection(pdoc->ExtendWordSelect(movePos, -1),
+					        pdoc->ExtendWordSelect(originalAnchorPos, 1));
+				}
+			} else {
+				// Continue selecting by line
+				int lineMove = LineFromLocation(pt);
+				LineSelection(lineMove, lineAnchor);
+			}
+		}
+		// While dragging to make rectangular selection, we don't want the current
+		// position to jump to the end of smaller or empty lines.
+		//xEndSelect = pt.x - vs.fixedColumnWidth + xOffset;
+		xEndSelect = XFromPosition(movePos);
+
+		// Autoscroll
+		PRectangle rcClient = GetClientRectangle();
+		if (pt.y > rcClient.bottom) {
+			int lineMove = cs.DisplayFromDoc(LineFromLocation(pt));
+			if (lineMove < 0) {
+				lineMove = cs.DisplayFromDoc(pdoc->LinesTotal() - 1);
+			}
+			ScrollTo(lineMove - LinesOnScreen() + 1);
+			Redraw();
+		} else if (pt.y < rcClient.top) {
+			int lineMove = cs.DisplayFromDoc(LineFromLocation(pt));
+			ScrollTo(lineMove - 1);
+			Redraw();
+		}
+		EnsureCaretVisible(false, false, true);
+
+		if (hsStart != -1 && !PositionIsHotspot(movePos))
+			SetHotSpotRange(NULL);
+
+	} else {
+		if (vs.fixedColumnWidth > 0) {	// There is a margin
+			if (PointInSelMargin(pt)) {
+				DisplayCursor(Window::cursorReverseArrow);
+				return; 	// No need to test for selection
+			}
+		}
+		// Display regular (drag) cursor over selection
+		if (PointInSelection(pt) && !SelectionEmpty()) {
+			DisplayCursor(Window::cursorArrow);
+		} else if (PointIsHotspot(pt)) {
+			DisplayCursor(Window::cursorHand);
+			SetHotSpotRange(&pt);
+		} else {
+			DisplayCursor(Window::cursorText);
+			SetHotSpotRange(NULL);
+		}
+	}
+}
+
+void Editor::ButtonUp(Point pt, unsigned int curTime, bool ctrl) {
+	//Platform::DebugPrintf("ButtonUp %d %d\n", HaveMouseCapture(), inDragDrop);
+	int newPos = PositionFromLocation(pt);
+	newPos = MovePositionOutsideChar(newPos, currentPos - newPos);
+	if (inDragDrop == ddInitial) {
+		inDragDrop = ddNone;
+		SetEmptySelection(newPos);
+	}
+	if (HaveMouseCapture()) {
+		if (PointInSelMargin(pt)) {
+			DisplayCursor(Window::cursorReverseArrow);
+		} else {
+			DisplayCursor(Window::cursorText);
+			SetHotSpotRange(NULL);
+		}
+		ptMouseLast = pt;
+		SetMouseCapture(false);
+		int newPos = PositionFromLocation(pt);
+		newPos = MovePositionOutsideChar(newPos, currentPos - newPos);
+		NotifyIndicatorClick(false, newPos, false, false, false);
+		if (inDragDrop == ddDragging) {
+			int selStart = SelectionStart();
+			int selEnd = SelectionEnd();
+			if (selStart < selEnd) {
+				if (drag.len) {
+					if (ctrl) {
+						if (pdoc->InsertString(newPos, drag.s, drag.len)) {
+							SetSelection(newPos, newPos + drag.len);
+						}
+					} else if (newPos < selStart) {
+						pdoc->DeleteChars(selStart, drag.len);
+						if (pdoc->InsertString(newPos, drag.s, drag.len)) {
+							SetSelection(newPos, newPos + drag.len);
+						}
+					} else if (newPos > selEnd) {
+						pdoc->DeleteChars(selStart, drag.len);
+						newPos -= drag.len;
+						if (pdoc->InsertString(newPos, drag.s, drag.len)) {
+							SetSelection(newPos, newPos + drag.len);
+						}
+					} else {
+						SetEmptySelection(newPos);
+					}
+					drag.Free();
+				}
+				selectionType = selChar;
+			}
+		} else {
+			if (selectionType == selChar) {
+				SetSelection(newPos);
+			}
+		}
+		SetRectangularRange();
+		lastClickTime = curTime;
+		lastClick = pt;
+		lastXChosen = pt.x;
+		if (selType == selStream) {
+			SetLastXChosen();
+		}
+		inDragDrop = ddNone;
+		EnsureCaretVisible(false);
+	}
+}
+
+// Called frequently to perform background UI including
+// caret blinking and automatic scrolling.
+void Editor::Tick() {
+	if (HaveMouseCapture()) {
+		// Auto scroll
+		ButtonMove(ptMouseLast);
+	}
+	if (caret.period > 0) {
+		timer.ticksToWait -= timer.tickSize;
+		if (timer.ticksToWait <= 0) {
+			caret.on = !caret.on;
+			timer.ticksToWait = caret.period;
+			if (caret.active) {
+				InvalidateCaret();
+			}
+		}
+	}
+	if (horizontalScrollBarVisible && trackLineWidth && (lineWidthMaxSeen > scrollWidth)) {
+		scrollWidth = lineWidthMaxSeen;
+		SetScrollBars();
+	}
+	if ((dwellDelay < SC_TIME_FOREVER) &&
+	        (ticksToDwell > 0) &&
+	        (!HaveMouseCapture())) {
+		ticksToDwell -= timer.tickSize;
+		if (ticksToDwell <= 0) {
+			dwelling = true;
+			NotifyDwelling(ptMouseLast, dwelling);
+		}
+	}
+}
+
+bool Editor::Idle() {
+
+	bool idleDone;
+
+	bool wrappingDone = wrapState == eWrapNone;
+
+	if (!wrappingDone) {
+		// Wrap lines during idle.
+		WrapLines(false, -1);
+		// No more wrapping
+		if (wrapStart == wrapEnd)
+			wrappingDone = true;
+	}
+
+	// Add more idle things to do here, but make sure idleDone is
+	// set correctly before the function returns. returning
+	// false will stop calling this idle funtion until SetIdle() is
+	// called again.
+
+	idleDone = wrappingDone; // && thatDone && theOtherThingDone...
+
+	return !idleDone;
+}
+
+void Editor::SetFocusState(bool focusState) {
+	hasFocus = focusState;
+	NotifyFocus(hasFocus);
+	if (hasFocus) {
+		ShowCaretAtCurrentPosition();
+	} else {
+		CancelModes();
+		DropCaret();
+	}
+}
+
+bool Editor::PaintContains(PRectangle rc) {
+	if (rc.Empty()) {
+		return true;
+	} else {
+		return rcPaint.Contains(rc);
+	}
+}
+
+bool Editor::PaintContainsMargin() {
+	PRectangle rcSelMargin = GetClientRectangle();
+	rcSelMargin.right = vs.fixedColumnWidth;
+	return PaintContains(rcSelMargin);
+}
+
+void Editor::CheckForChangeOutsidePaint(Range r) {
+	if (paintState == painting && !paintingAllText) {
+		//Platform::DebugPrintf("Checking range in paint %d-%d\n", r.start, r.end);
+		if (!r.Valid())
+			return;
+
+		PRectangle rcRange = RectangleFromRange(r.start, r.end);
+		PRectangle rcText = GetTextRectangle();
+		if (rcRange.top < rcText.top) {
+			rcRange.top = rcText.top;
+		}
+		if (rcRange.bottom > rcText.bottom) {
+			rcRange.bottom = rcText.bottom;
+		}
+
+		if (!PaintContains(rcRange)) {
+			AbandonPaint();
+		}
+	}
+}
+
+void Editor::SetBraceHighlight(Position pos0, Position pos1, int matchStyle) {
+	if ((pos0 != braces[0]) || (pos1 != braces[1]) || (matchStyle != bracesMatchStyle)) {
+		if ((braces[0] != pos0) || (matchStyle != bracesMatchStyle)) {
+			CheckForChangeOutsidePaint(Range(braces[0]));
+			CheckForChangeOutsidePaint(Range(pos0));
+			braces[0] = pos0;
+		}
+		if ((braces[1] != pos1) || (matchStyle != bracesMatchStyle)) {
+			CheckForChangeOutsidePaint(Range(braces[1]));
+			CheckForChangeOutsidePaint(Range(pos1));
+			braces[1] = pos1;
+		}
+		bracesMatchStyle = matchStyle;
+		if (paintState == notPainting) {
+			Redraw();
+		}
+	}
+}
+
+void Editor::SetDocPointer(Document *document) {
+	//Platform::DebugPrintf("** %x setdoc to %x\n", pdoc, document);
+	pdoc->RemoveWatcher(this, 0);
+	pdoc->Release();
+	if (document == NULL) {
+		pdoc = new Document();
+	} else {
+		pdoc = document;
+	}
+	pdoc->AddRef();
+
+	// Ensure all positions within document
+	selType = selStream;
+	currentPos = 0;
+	anchor = 0;
+	targetStart = 0;
+	targetEnd = 0;
+
+	braces[0] = invalidPosition;
+	braces[1] = invalidPosition;
+
+	// Reset the contraction state to fully shown.
+	cs.Clear();
+	cs.InsertLines(0, pdoc->LinesTotal() - 1);
+	llc.Deallocate();
+	NeedWrapping();
+
+	pdoc->AddWatcher(this, 0);
+	SetScrollBars();
+	Redraw();
+}
+
+/**
+ * Recursively expand a fold, making lines visible except where they have an unexpanded parent.
+ */
+void Editor::Expand(int &line, bool doExpand) {
+	int lineMaxSubord = pdoc->GetLastChild(line);
+	line++;
+	while (line <= lineMaxSubord) {
+		if (doExpand)
+			cs.SetVisible(line, line, true);
+		int level = pdoc->GetLevel(line);
+		if (level & SC_FOLDLEVELHEADERFLAG) {
+			if (doExpand && cs.GetExpanded(line)) {
+				Expand(line, true);
+			} else {
+				Expand(line, false);
+			}
+		} else {
+			line++;
+		}
+	}
+}
+
+void Editor::ToggleContraction(int line) {
+	if (line >= 0) {
+		if ((pdoc->GetLevel(line) & SC_FOLDLEVELHEADERFLAG) == 0) {
+			line = pdoc->GetFoldParent(line);
+			if (line < 0)
+				return;
+		}
+
+		if (cs.GetExpanded(line)) {
+			int lineMaxSubord = pdoc->GetLastChild(line);
+			cs.SetExpanded(line, 0);
+			if (lineMaxSubord > line) {
+				cs.SetVisible(line + 1, lineMaxSubord, false);
+
+				int lineCurrent = pdoc->LineFromPosition(currentPos);
+				if (lineCurrent > line && lineCurrent <= lineMaxSubord) {
+					// This does not re-expand the fold
+					EnsureCaretVisible();
+				}
+
+				SetScrollBars();
+				Redraw();
+			}
+
+		} else {
+			if (!(cs.GetVisible(line))) {
+				EnsureLineVisible(line, false);
+				GoToLine(line);
+			}
+			cs.SetExpanded(line, 1);
+			Expand(line, true);
+			SetScrollBars();
+			Redraw();
+		}
+	}
+}
+
+/**
+ * Recurse up from this line to find any folds that prevent this line from being visible
+ * and unfold them all.
+ */
+void Editor::EnsureLineVisible(int lineDoc, bool enforcePolicy) {
+
+	// In case in need of wrapping to ensure DisplayFromDoc works.
+	WrapLines(true, -1);
+
+	if (!cs.GetVisible(lineDoc)) {
+		int lineParent = pdoc->GetFoldParent(lineDoc);
+		if (lineParent >= 0) {
+			if (lineDoc != lineParent)
+				EnsureLineVisible(lineParent, enforcePolicy);
+			if (!cs.GetExpanded(lineParent)) {
+				cs.SetExpanded(lineParent, 1);
+				Expand(lineParent, true);
+			}
+		}
+		SetScrollBars();
+		Redraw();
+	}
+	if (enforcePolicy) {
+		int lineDisplay = cs.DisplayFromDoc(lineDoc);
+		if (visiblePolicy & VISIBLE_SLOP) {
+			if ((topLine > lineDisplay) || ((visiblePolicy & VISIBLE_STRICT) && (topLine + visibleSlop > lineDisplay))) {
+				SetTopLine(Platform::Clamp(lineDisplay - visibleSlop, 0, MaxScrollPos()));
+				SetVerticalScrollPos();
+				Redraw();
+			} else if ((lineDisplay > topLine + LinesOnScreen() - 1) ||
+			        ((visiblePolicy & VISIBLE_STRICT) && (lineDisplay > topLine + LinesOnScreen() - 1 - visibleSlop))) {
+				SetTopLine(Platform::Clamp(lineDisplay - LinesOnScreen() + 1 + visibleSlop, 0, MaxScrollPos()));
+				SetVerticalScrollPos();
+				Redraw();
+			}
+		} else {
+			if ((topLine > lineDisplay) || (lineDisplay > topLine + LinesOnScreen() - 1) || (visiblePolicy & VISIBLE_STRICT)) {
+				SetTopLine(Platform::Clamp(lineDisplay - LinesOnScreen() / 2 + 1, 0, MaxScrollPos()));
+				SetVerticalScrollPos();
+				Redraw();
+			}
+		}
+	}
+}
+
+int Editor::ReplaceTarget(bool replacePatterns, const char *text, int length) {
+	pdoc->BeginUndoAction();
+	if (length == -1)
+		length = istrlen(text);
+	if (replacePatterns) {
+		text = pdoc->SubstituteByPosition(text, &length);
+		if (!text) {
+			pdoc->EndUndoAction();
+			return 0;
+		}
+	}
+	if (targetStart != targetEnd)
+		pdoc->DeleteChars(targetStart, targetEnd - targetStart);
+	targetEnd = targetStart;
+	pdoc->InsertString(targetStart, text, length);
+	targetEnd = targetStart + length;
+	pdoc->EndUndoAction();
+	return length;
+}
+
+bool Editor::IsUnicodeMode() const {
+	return pdoc && (SC_CP_UTF8 == pdoc->dbcsCodePage);
+}
+
+int Editor::CodePage() const {
+	if (pdoc)
+		return pdoc->dbcsCodePage;
+	else
+		return 0;
+}
+
+int Editor::WrapCount(int line) {
+	AutoSurface surface(this);
+	AutoLineLayout ll(llc, RetrieveLineLayout(line));
+
+	if (surface && ll) {
+		LayoutLine(line, surface, vs, ll, wrapWidth);
+		return ll->lines;
+	} else {
+		return 1;
+	}
+}
+
+void Editor::AddStyledText(char *buffer, int appendLength) {
+	// The buffer consists of alternating character bytes and style bytes
+	size_t textLength = appendLength / 2;
+	char *text = new char[textLength];
+	if (text) {
+		size_t i;
+		for (i = 0;i < textLength;i++) {
+			text[i] = buffer[i*2];
+		}
+		pdoc->InsertString(CurrentPosition(), text, textLength);
+		for (i = 0;i < textLength;i++) {
+			text[i] = buffer[i*2+1];
+		}
+		pdoc->StartStyling(CurrentPosition(), static_cast<char>(0xff));
+		pdoc->SetStyles(textLength, text);
+		delete []text;
+	}
+	SetEmptySelection(currentPos + textLength);
+}
+
+static bool ValidMargin(unsigned long wParam) {
+	return wParam < ViewStyle::margins;
+}
+
+static char *CharPtrFromSPtr(sptr_t lParam) {
+	return reinterpret_cast<char *>(lParam);
+}
+
+void Editor::StyleSetMessage(unsigned int iMessage, uptr_t wParam, sptr_t lParam) {
+	vs.EnsureStyle(wParam);
+	switch (iMessage) {
+	case SCI_STYLESETFORE:
+		vs.styles[wParam].fore.desired = ColourDesired(lParam);
+		break;
+	case SCI_STYLESETBACK:
+		vs.styles[wParam].back.desired = ColourDesired(lParam);
+		break;
+	case SCI_STYLESETBOLD:
+		vs.styles[wParam].bold = lParam != 0;
+		break;
+	case SCI_STYLESETITALIC:
+		vs.styles[wParam].italic = lParam != 0;
+		break;
+	case SCI_STYLESETEOLFILLED:
+		vs.styles[wParam].eolFilled = lParam != 0;
+		break;
+	case SCI_STYLESETSIZE:
+		vs.styles[wParam].size = lParam;
+		break;
+	case SCI_STYLESETFONT:
+		if (lParam != 0) {
+			vs.SetStyleFontName(wParam, CharPtrFromSPtr(lParam));
+		}
+		break;
+	case SCI_STYLESETUNDERLINE:
+		vs.styles[wParam].underline = lParam != 0;
+		break;
+	case SCI_STYLESETCASE:
+		vs.styles[wParam].caseForce = static_cast<Style::ecaseForced>(lParam);
+		break;
+	case SCI_STYLESETCHARACTERSET:
+		vs.styles[wParam].characterSet = lParam;
+		break;
+	case SCI_STYLESETVISIBLE:
+		vs.styles[wParam].visible = lParam != 0;
+		break;
+	case SCI_STYLESETCHANGEABLE:
+		vs.styles[wParam].changeable = lParam != 0;
+		break;
+	case SCI_STYLESETHOTSPOT:
+		vs.styles[wParam].hotspot = lParam != 0;
+		break;
+	}
+	InvalidateStyleRedraw();
+}
+
+sptr_t Editor::StyleGetMessage(unsigned int iMessage, uptr_t wParam, sptr_t lParam) {
+	vs.EnsureStyle(wParam);
+	switch (iMessage) {
+	case SCI_STYLEGETFORE:
+		return vs.styles[wParam].fore.desired.AsLong();
+	case SCI_STYLEGETBACK:
+		return vs.styles[wParam].back.desired.AsLong();
+	case SCI_STYLEGETBOLD:
+		return vs.styles[wParam].bold ? 1 : 0;
+	case SCI_STYLEGETITALIC:
+		return vs.styles[wParam].italic ? 1 : 0;
+	case SCI_STYLEGETEOLFILLED:
+		return vs.styles[wParam].eolFilled ? 1 : 0;
+	case SCI_STYLEGETSIZE:
+		return vs.styles[wParam].size;
+	case SCI_STYLEGETFONT:
+		if (lParam != 0)
+			strcpy(CharPtrFromSPtr(lParam), vs.styles[wParam].fontName);
+		return strlen(vs.styles[wParam].fontName);
+	case SCI_STYLEGETUNDERLINE:
+		return vs.styles[wParam].underline ? 1 : 0;
+	case SCI_STYLEGETCASE:
+		return static_cast<int>(vs.styles[wParam].caseForce);
+	case SCI_STYLEGETCHARACTERSET:
+		return vs.styles[wParam].characterSet;
+	case SCI_STYLEGETVISIBLE:
+		return vs.styles[wParam].visible ? 1 : 0;
+	case SCI_STYLEGETCHANGEABLE:
+		return vs.styles[wParam].changeable ? 1 : 0;
+	case SCI_STYLEGETHOTSPOT:
+		return vs.styles[wParam].hotspot ? 1 : 0;
+	}
+	return 0;
+}
+
+sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) {
+	//Platform::DebugPrintf("S start wnd proc %d %d %d\n",iMessage, wParam, lParam);
+
+	// Optional macro recording hook
+	if (recordingMacro)
+		NotifyMacroRecord(iMessage, wParam, lParam);
+
+	switch (iMessage) {
+
+	case SCI_GETTEXT: {
+			if (lParam == 0)
+				return pdoc->Length() + 1;
+			if (wParam == 0)
+				return 0;
+			char *ptr = CharPtrFromSPtr(lParam);
+			unsigned int iChar = 0;
+			for (; iChar < wParam - 1; iChar++)
+				ptr[iChar] = pdoc->CharAt(iChar);
+			ptr[iChar] = '\0';
+			return iChar;
+		}
+
+	case SCI_SETTEXT: {
+			if (lParam == 0)
+				return 0;
+			pdoc->BeginUndoAction();
+			pdoc->DeleteChars(0, pdoc->Length());
+			SetEmptySelection(0);
+			pdoc->InsertCString(0, CharPtrFromSPtr(lParam));
+			pdoc->EndUndoAction();
+			return 1;
+		}
+
+	case SCI_GETTEXTLENGTH:
+		return pdoc->Length();
+
+	case SCI_CUT:
+		Cut();
+		SetLastXChosen();
+		break;
+
+	case SCI_COPY:
+		Copy();
+		break;
+
+	case SCI_COPYALLOWLINE:
+		CopyAllowLine();
+		break;
+
+	case SCI_COPYRANGE:
+		CopyRangeToClipboard(wParam, lParam);
+		break;
+
+	case SCI_COPYTEXT:
+		CopyText(wParam, CharPtrFromSPtr(lParam));
+		break;
+
+	case SCI_PASTE:
+		Paste();
+		if (!caretSticky) {
+			SetLastXChosen();
+		}
+		EnsureCaretVisible();
+		break;
+
+	case SCI_CLEAR:
+		Clear();
+		SetLastXChosen();
+		EnsureCaretVisible();
+		break;
+
+	case SCI_UNDO:
+		Undo();
+		SetLastXChosen();
+		break;
+
+	case SCI_CANUNDO:
+		return (pdoc->CanUndo() && !pdoc->IsReadOnly()) ? 1 : 0;
+
+	case SCI_EMPTYUNDOBUFFER:
+		pdoc->DeleteUndoHistory();
+		return 0;
+
+	case SCI_GETFIRSTVISIBLELINE:
+		return topLine;
+
+	case SCI_GETLINE: {	// Risk of overwriting the end of the buffer
+			int lineStart = pdoc->LineStart(wParam);
+			int lineEnd = pdoc->LineStart(wParam + 1);
+			if (lParam == 0) {
+				return lineEnd - lineStart;
+			}
+			char *ptr = CharPtrFromSPtr(lParam);
+			int iPlace = 0;
+			for (int iChar = lineStart; iChar < lineEnd; iChar++) {
+				ptr[iPlace++] = pdoc->CharAt(iChar);
+			}
+			return iPlace;
+		}
+
+	case SCI_GETLINECOUNT:
+		if (pdoc->LinesTotal() == 0)
+			return 1;
+		else
+			return pdoc->LinesTotal();
+
+	case SCI_GETMODIFY:
+		return !pdoc->IsSavePoint();
+
+	case SCI_SETSEL: {
+			int nStart = static_cast<int>(wParam);
+			int nEnd = static_cast<int>(lParam);
+			if (nEnd < 0)
+				nEnd = pdoc->Length();
+			if (nStart < 0)
+				nStart = nEnd; 	// Remove selection
+			selType = selStream;
+			SetSelection(nEnd, nStart);
+			EnsureCaretVisible();
+		}
+		break;
+
+	case SCI_GETSELTEXT: {
+			if (lParam == 0) {
+				if (selType == selStream) {
+					return 1 + SelectionEnd() - SelectionStart();
+				} else {
+					// TODO: why is selLines handled the slow way?
+					int size = 0;
+					int extraCharsPerLine = 0;
+					if (selType != selLines)
+						extraCharsPerLine = (pdoc->eolMode == SC_EOL_CRLF) ? 2 : 1;
+					SelectionLineIterator lineIterator(this);
+					while (lineIterator.Iterate()) {
+						size += lineIterator.endPos + extraCharsPerLine - lineIterator.startPos;
+					}
+
+					return 1 + size;
+				}
+			}
+			SelectionText selectedText;
+			CopySelectionRange(&selectedText);
+			char *ptr = CharPtrFromSPtr(lParam);
+			int iChar = 0;
+			if (selectedText.len) {
+				for (; iChar < selectedText.len; iChar++)
+					ptr[iChar] = selectedText.s[iChar];
+			} else {
+				ptr[0] = '\0';
+			}
+			return iChar;
+		}
+
+	case SCI_LINEFROMPOSITION:
+		if (static_cast<int>(wParam) < 0)
+			return 0;
+		return pdoc->LineFromPosition(wParam);
+
+	case SCI_POSITIONFROMLINE:
+		if (static_cast<int>(wParam) < 0)
+			wParam = pdoc->LineFromPosition(SelectionStart());
+		if (wParam == 0)
+			return 0; 	// Even if there is no text, there is a first line that starts at 0
+		if (static_cast<int>(wParam) > pdoc->LinesTotal())
+			return -1;
+		//if (wParam > pdoc->LineFromPosition(pdoc->Length()))	// Useful test, anyway...
+		//	return -1;
+		return pdoc->LineStart(wParam);
+
+		// Replacement of the old Scintilla interpretation of EM_LINELENGTH
+	case SCI_LINELENGTH:
+		if ((static_cast<int>(wParam) < 0) ||
+		        (static_cast<int>(wParam) > pdoc->LineFromPosition(pdoc->Length())))
+			return 0;
+		return pdoc->LineStart(wParam + 1) - pdoc->LineStart(wParam);
+
+	case SCI_REPLACESEL: {
+			if (lParam == 0)
+				return 0;
+			pdoc->BeginUndoAction();
+			ClearSelection();
+			char *replacement = CharPtrFromSPtr(lParam);
+			pdoc->InsertCString(currentPos, replacement);
+			pdoc->EndUndoAction();
+			SetEmptySelection(currentPos + istrlen(replacement));
+			EnsureCaretVisible();
+		}
+		break;
+
+	case SCI_SETTARGETSTART:
+		targetStart = wParam;
+		break;
+
+	case SCI_GETTARGETSTART:
+		return targetStart;
+
+	case SCI_SETTARGETEND:
+		targetEnd = wParam;
+		break;
+
+	case SCI_GETTARGETEND:
+		return targetEnd;
+
+	case SCI_TARGETFROMSELECTION:
+		if (currentPos < anchor) {
+			targetStart = currentPos;
+			targetEnd = anchor;
+		} else {
+			targetStart = anchor;
+			targetEnd = currentPos;
+		}
+		break;
+
+	case SCI_REPLACETARGET:
+		PLATFORM_ASSERT(lParam);
+		return ReplaceTarget(false, CharPtrFromSPtr(lParam), wParam);
+
+	case SCI_REPLACETARGETRE:
+		PLATFORM_ASSERT(lParam);
+		return ReplaceTarget(true, CharPtrFromSPtr(lParam), wParam);
+
+	case SCI_SEARCHINTARGET:
+		PLATFORM_ASSERT(lParam);
+		return SearchInTarget(CharPtrFromSPtr(lParam), wParam);
+
+	case SCI_SETSEARCHFLAGS:
+		searchFlags = wParam;
+		break;
+
+	case SCI_GETSEARCHFLAGS:
+		return searchFlags;
+
+	case SCI_POSITIONBEFORE:
+		return pdoc->MovePositionOutsideChar(wParam - 1, -1, true);
+
+	case SCI_POSITIONAFTER:
+		return pdoc->MovePositionOutsideChar(wParam + 1, 1, true);
+
+	case SCI_LINESCROLL:
+		ScrollTo(topLine + lParam);
+		HorizontalScrollTo(xOffset + wParam * vs.spaceWidth);
+		return 1;
+
+	case SCI_SETXOFFSET:
+		xOffset = wParam;
+		SetHorizontalScrollPos();
+		Redraw();
+		break;
+
+	case SCI_GETXOFFSET:
+		return xOffset;
+
+	case SCI_CHOOSECARETX:
+		SetLastXChosen();
+		break;
+
+	case SCI_SCROLLCARET:
+		EnsureCaretVisible();
+		break;
+
+	case SCI_SETREADONLY:
+		pdoc->SetReadOnly(wParam != 0);
+		return 1;
+
+	case SCI_GETREADONLY:
+		return pdoc->IsReadOnly();
+
+	case SCI_CANPASTE:
+		return CanPaste();
+
+	case SCI_POINTXFROMPOSITION:
+		if (lParam < 0) {
+			return 0;
+		} else {
+			Point pt = LocationFromPosition(lParam);
+			return pt.x;
+		}
+
+	case SCI_POINTYFROMPOSITION:
+		if (lParam < 0) {
+			return 0;
+		} else {
+			Point pt = LocationFromPosition(lParam);
+			return pt.y;
+		}
+
+	case SCI_FINDTEXT:
+		return FindText(wParam, lParam);
+
+	case SCI_GETTEXTRANGE: {
+			if (lParam == 0)
+				return 0;
+			TextRange *tr = reinterpret_cast<TextRange *>(lParam);
+			int cpMax = tr->chrg.cpMax;
+			if (cpMax == -1)
+				cpMax = pdoc->Length();
+			PLATFORM_ASSERT(cpMax <= pdoc->Length());
+			int len = cpMax - tr->chrg.cpMin; 	// No -1 as cpMin and cpMax are referring to inter character positions
+			pdoc->GetCharRange(tr->lpstrText, tr->chrg.cpMin, len);
+			// Spec says copied text is terminated with a NUL
+			tr->lpstrText[len] = '\0';
+			return len; 	// Not including NUL
+		}
+
+	case SCI_HIDESELECTION:
+		hideSelection = wParam != 0;
+		Redraw();
+		break;
+
+	case SCI_FORMATRANGE:
+		return FormatRange(wParam != 0, reinterpret_cast<RangeToFormat *>(lParam));
+
+	case SCI_GETMARGINLEFT:
+		return vs.leftMarginWidth;
+
+	case SCI_GETMARGINRIGHT:
+		return vs.rightMarginWidth;
+
+	case SCI_SETMARGINLEFT:
+		vs.leftMarginWidth = lParam;
+		InvalidateStyleRedraw();
+		break;
+
+	case SCI_SETMARGINRIGHT:
+		vs.rightMarginWidth = lParam;
+		InvalidateStyleRedraw();
+		break;
+
+		// Control specific mesages
+
+	case SCI_ADDTEXT: {
+			if (lParam == 0)
+				return 0;
+			pdoc->InsertString(CurrentPosition(), CharPtrFromSPtr(lParam), wParam);
+			SetEmptySelection(currentPos + wParam);
+			return 0;
+		}
+
+	case SCI_ADDSTYLEDTEXT:
+		if (lParam)
+			AddStyledText(CharPtrFromSPtr(lParam), wParam);
+		return 0;
+
+	case SCI_INSERTTEXT: {
+			if (lParam == 0)
+				return 0;
+			int insertPos = wParam;
+			if (static_cast<int>(wParam) == -1)
+				insertPos = CurrentPosition();
+			int newCurrent = CurrentPosition();
+			char *sz = CharPtrFromSPtr(lParam);
+			pdoc->InsertCString(insertPos, sz);
+			if (newCurrent > insertPos)
+				newCurrent += istrlen(sz);
+			SetEmptySelection(newCurrent);
+			return 0;
+		}
+
+	case SCI_APPENDTEXT:
+		pdoc->InsertString(pdoc->Length(), CharPtrFromSPtr(lParam), wParam);
+		return 0;
+
+	case SCI_CLEARALL:
+		ClearAll();
+		return 0;
+
+	case SCI_CLEARDOCUMENTSTYLE:
+		ClearDocumentStyle();
+		return 0;
+
+	case SCI_SETUNDOCOLLECTION:
+		pdoc->SetUndoCollection(wParam != 0);
+		return 0;
+
+	case SCI_GETUNDOCOLLECTION:
+		return pdoc->IsCollectingUndo();
+
+	case SCI_BEGINUNDOACTION:
+		pdoc->BeginUndoAction();
+		return 0;
+
+	case SCI_ENDUNDOACTION:
+		pdoc->EndUndoAction();
+		return 0;
+
+	case SCI_GETCARETPERIOD:
+		return caret.period;
+
+	case SCI_SETCARETPERIOD:
+		caret.period = wParam;
+		break;
+
+	case SCI_SETWORDCHARS: {
+			pdoc->SetDefaultCharClasses(false);
+			if (lParam == 0)
+				return 0;
+			pdoc->SetCharClasses(reinterpret_cast<unsigned char *>(lParam), CharClassify::ccWord);
+		}
+		break;
+
+	case SCI_SETWHITESPACECHARS: {
+			if (lParam == 0)
+				return 0;
+			pdoc->SetCharClasses(reinterpret_cast<unsigned char *>(lParam), CharClassify::ccSpace);
+		}
+		break;
+
+	case SCI_SETCHARSDEFAULT:
+		pdoc->SetDefaultCharClasses(true);
+		break;
+
+	case SCI_GETLENGTH:
+		return pdoc->Length();
+
+	case SCI_ALLOCATE:
+		pdoc->Allocate(wParam);
+		break;
+
+	case SCI_GETCHARAT:
+		return pdoc->CharAt(wParam);
+
+	case SCI_SETCURRENTPOS:
+		SetSelection(wParam, anchor);
+		break;
+
+	case SCI_GETCURRENTPOS:
+		return currentPos;
+
+	case SCI_SETANCHOR:
+		SetSelection(currentPos, wParam);
+		break;
+
+	case SCI_GETANCHOR:
+		return anchor;
+
+	case SCI_SETSELECTIONSTART:
+		SetSelection(Platform::Maximum(currentPos, wParam), wParam);
+		break;
+
+	case SCI_GETSELECTIONSTART:
+		return Platform::Minimum(anchor, currentPos);
+
+	case SCI_SETSELECTIONEND:
+		SetSelection(wParam, Platform::Minimum(anchor, wParam));
+		break;
+
+	case SCI_GETSELECTIONEND:
+		return Platform::Maximum(anchor, currentPos);
+
+	case SCI_SETPRINTMAGNIFICATION:
+		printMagnification = wParam;
+		break;
+
+	case SCI_GETPRINTMAGNIFICATION:
+		return printMagnification;
+
+	case SCI_SETPRINTCOLOURMODE:
+		printColourMode = wParam;
+		break;
+
+	case SCI_GETPRINTCOLOURMODE:
+		return printColourMode;
+
+	case SCI_SETPRINTWRAPMODE:
+		printWrapState = (wParam == SC_WRAP_WORD) ? eWrapWord : eWrapNone;
+		break;
+
+	case SCI_GETPRINTWRAPMODE:
+		return printWrapState;
+
+	case SCI_GETSTYLEAT:
+		if (static_cast<int>(wParam) >= pdoc->Length())
+			return 0;
+		else
+			return pdoc->StyleAt(wParam);
+
+	case SCI_REDO:
+		Redo();
+		break;
+
+	case SCI_SELECTALL:
+		SelectAll();
+		break;
+
+	case SCI_SETSAVEPOINT:
+		pdoc->SetSavePoint();
+		break;
+
+	case SCI_GETSTYLEDTEXT: {
+			if (lParam == 0)
+				return 0;
+			TextRange *tr = reinterpret_cast<TextRange *>(lParam);
+			int iPlace = 0;
+			for (int iChar = tr->chrg.cpMin; iChar < tr->chrg.cpMax; iChar++) {
+				tr->lpstrText[iPlace++] = pdoc->CharAt(iChar);
+				tr->lpstrText[iPlace++] = pdoc->StyleAt(iChar);
+			}
+			tr->lpstrText[iPlace] = '\0';
+			tr->lpstrText[iPlace + 1] = '\0';
+			return iPlace;
+		}
+
+	case SCI_CANREDO:
+		return (pdoc->CanRedo() && !pdoc->IsReadOnly()) ? 1 : 0;
+
+	case SCI_MARKERLINEFROMHANDLE:
+		return pdoc->LineFromHandle(wParam);
+
+	case SCI_MARKERDELETEHANDLE:
+		pdoc->DeleteMarkFromHandle(wParam);
+		break;
+
+	case SCI_GETVIEWWS:
+		return vs.viewWhitespace;
+
+	case SCI_SETVIEWWS:
+		vs.viewWhitespace = static_cast<WhiteSpaceVisibility>(wParam);
+		Redraw();
+		break;
+
+	case SCI_POSITIONFROMPOINT:
+		return PositionFromLocation(Point(wParam, lParam));
+
+	case SCI_POSITIONFROMPOINTCLOSE:
+		return PositionFromLocationClose(Point(wParam, lParam));
+
+	case SCI_GOTOLINE:
+		GoToLine(wParam);
+		break;
+
+	case SCI_GOTOPOS:
+		SetEmptySelection(wParam);
+		EnsureCaretVisible();
+		Redraw();
+		break;
+
+	case SCI_GETCURLINE: {
+			int lineCurrentPos = pdoc->LineFromPosition(currentPos);
+			int lineStart = pdoc->LineStart(lineCurrentPos);
+			unsigned int lineEnd = pdoc->LineStart(lineCurrentPos + 1);
+			if (lParam == 0) {
+				return 1 + lineEnd - lineStart;
+			}
+			PLATFORM_ASSERT(wParam > 0);
+			char *ptr = CharPtrFromSPtr(lParam);
+			unsigned int iPlace = 0;
+			for (unsigned int iChar = lineStart; iChar < lineEnd && iPlace < wParam - 1; iChar++) {
+				ptr[iPlace++] = pdoc->CharAt(iChar);
+			}
+			ptr[iPlace] = '\0';
+			return currentPos - lineStart;
+		}
+
+	case SCI_GETENDSTYLED:
+		return pdoc->GetEndStyled();
+
+	case SCI_GETEOLMODE:
+		return pdoc->eolMode;
+
+	case SCI_SETEOLMODE:
+		pdoc->eolMode = wParam;
+		break;
+
+	case SCI_STARTSTYLING:
+		pdoc->StartStyling(wParam, static_cast<char>(lParam));
+		break;
+
+	case SCI_SETSTYLING:
+		pdoc->SetStyleFor(wParam, static_cast<char>(lParam));
+		break;
+
+	case SCI_SETSTYLINGEX:             // Specify a complete styling buffer
+		if (lParam == 0)
+			return 0;
+		pdoc->SetStyles(wParam, CharPtrFromSPtr(lParam));
+		break;
+
+	case SCI_SETBUFFEREDDRAW:
+		bufferedDraw = wParam != 0;
+		break;
+
+	case SCI_GETBUFFEREDDRAW:
+		return bufferedDraw;
+
+	case SCI_GETTWOPHASEDRAW:
+		return twoPhaseDraw;
+
+	case SCI_SETTWOPHASEDRAW:
+		twoPhaseDraw = wParam != 0;
+		InvalidateStyleRedraw();
+		break;
+
+	case SCI_SETTABWIDTH:
+		if (wParam > 0) {
+			pdoc->tabInChars = wParam;
+			if (pdoc->indentInChars == 0)
+				pdoc->actualIndentInChars = pdoc->tabInChars;
+		}
+		InvalidateStyleRedraw();
+		break;
+
+	case SCI_GETTABWIDTH:
+		return pdoc->tabInChars;
+
+	case SCI_SETINDENT:
+		pdoc->indentInChars = wParam;
+		if (pdoc->indentInChars != 0)
+			pdoc->actualIndentInChars = pdoc->indentInChars;
+		else
+			pdoc->actualIndentInChars = pdoc->tabInChars;
+		InvalidateStyleRedraw();
+		break;
+
+	case SCI_GETINDENT:
+		return pdoc->indentInChars;
+
+	case SCI_SETUSETABS:
+		pdoc->useTabs = wParam != 0;
+		InvalidateStyleRedraw();
+		break;
+
+	case SCI_GETUSETABS:
+		return pdoc->useTabs;
+
+	case SCI_SETLINEINDENTATION:
+		pdoc->SetLineIndentation(wParam, lParam);
+		break;
+
+	case SCI_GETLINEINDENTATION:
+		return pdoc->GetLineIndentation(wParam);
+
+	case SCI_GETLINEINDENTPOSITION:
+		return pdoc->GetLineIndentPosition(wParam);
+
+	case SCI_SETTABINDENTS:
+		pdoc->tabIndents = wParam != 0;
+		break;
+
+	case SCI_GETTABINDENTS:
+		return pdoc->tabIndents;
+
+	case SCI_SETBACKSPACEUNINDENTS:
+		pdoc->backspaceUnindents = wParam != 0;
+		break;
+
+	case SCI_GETBACKSPACEUNINDENTS:
+		return pdoc->backspaceUnindents;
+
+	case SCI_SETMOUSEDWELLTIME:
+		dwellDelay = wParam;
+		ticksToDwell = dwellDelay;
+		break;
+
+	case SCI_GETMOUSEDWELLTIME:
+		return dwellDelay;
+
+	case SCI_WORDSTARTPOSITION:
+		return pdoc->ExtendWordSelect(wParam, -1, lParam != 0);
+
+	case SCI_WORDENDPOSITION:
+		return pdoc->ExtendWordSelect(wParam, 1, lParam != 0);
+
+	case SCI_SETWRAPMODE:
+		switch (wParam) {
+		case SC_WRAP_WORD:
+			wrapState = eWrapWord;
+			break;
+		case SC_WRAP_CHAR:
+			wrapState = eWrapChar;
+			break;
+		default:
+			wrapState = eWrapNone;
+			break;
+		}
+		xOffset = 0;
+		InvalidateStyleRedraw();
+		ReconfigureScrollBars();
+		break;
+
+	case SCI_GETWRAPMODE:
+		return wrapState;
+
+	case SCI_SETWRAPVISUALFLAGS:
+		wrapVisualFlags = wParam;
+		actualWrapVisualStartIndent = wrapVisualStartIndent;
+		if ((wrapVisualFlags & SC_WRAPVISUALFLAG_START) && (actualWrapVisualStartIndent == 0))
+			actualWrapVisualStartIndent = 1; // must indent to show start visual
+		InvalidateStyleRedraw();
+		ReconfigureScrollBars();
+		break;
+
+	case SCI_GETWRAPVISUALFLAGS:
+		return wrapVisualFlags;
+
+	case SCI_SETWRAPVISUALFLAGSLOCATION:
+		wrapVisualFlagsLocation = wParam;
+		InvalidateStyleRedraw();
+		break;
+
+	case SCI_GETWRAPVISUALFLAGSLOCATION:
+		return wrapVisualFlagsLocation;
+
+	case SCI_SETWRAPSTARTINDENT:
+		wrapVisualStartIndent = wParam;
+		actualWrapVisualStartIndent = wrapVisualStartIndent;
+		if ((wrapVisualFlags & SC_WRAPVISUALFLAG_START) && (actualWrapVisualStartIndent == 0))
+			actualWrapVisualStartIndent = 1; // must indent to show start visual
+		InvalidateStyleRedraw();
+		ReconfigureScrollBars();
+		break;
+
+	case SCI_GETWRAPSTARTINDENT:
+		return wrapVisualStartIndent;
+
+	case SCI_SETLAYOUTCACHE:
+		llc.SetLevel(wParam);
+		break;
+
+	case SCI_GETLAYOUTCACHE:
+		return llc.GetLevel();
+
+	case SCI_SETPOSITIONCACHE:
+		posCache.SetSize(wParam);
+		break;
+
+	case SCI_GETPOSITIONCACHE:
+		return posCache.GetSize();
+
+	case SCI_SETSCROLLWIDTH:
+		PLATFORM_ASSERT(wParam > 0);
+		if ((wParam > 0) && (wParam != static_cast<unsigned int >(scrollWidth))) {
+			lineWidthMaxSeen = 0;
+			scrollWidth = wParam;
+			SetScrollBars();
+		}
+		break;
+
+	case SCI_GETSCROLLWIDTH:
+		return scrollWidth;
+
+	case SCI_SETSCROLLWIDTHTRACKING:
+		trackLineWidth = wParam != 0;
+		break;
+
+	case SCI_GETSCROLLWIDTHTRACKING:
+		return trackLineWidth;
+
+	case SCI_LINESJOIN:
+		LinesJoin();
+		break;
+
+	case SCI_LINESSPLIT:
+		LinesSplit(wParam);
+		break;
+
+	case SCI_TEXTWIDTH:
+		PLATFORM_ASSERT(wParam < vs.stylesSize);
+		PLATFORM_ASSERT(lParam);
+		return TextWidth(wParam, CharPtrFromSPtr(lParam));
+
+	case SCI_TEXTHEIGHT:
+		return vs.lineHeight;
+
+	case SCI_SETENDATLASTLINE:
+		PLATFORM_ASSERT((wParam == 0) || (wParam == 1));
+		if (endAtLastLine != (wParam != 0)) {
+			endAtLastLine = wParam != 0;
+			SetScrollBars();
+		}
+		break;
+
+	case SCI_GETENDATLASTLINE:
+		return endAtLastLine;
+
+	case SCI_SETCARETSTICKY:
+		PLATFORM_ASSERT((wParam == 0) || (wParam == 1));
+		if (caretSticky != (wParam != 0)) {
+			caretSticky = wParam != 0;
+		}
+		break;
+
+	case SCI_GETCARETSTICKY:
+		return caretSticky;
+
+	case SCI_TOGGLECARETSTICKY:
+		caretSticky = !caretSticky;
+		break;
+
+	case SCI_GETCOLUMN:
+		return pdoc->GetColumn(wParam);
+
+	case SCI_FINDCOLUMN:
+		return pdoc->FindColumn(wParam, lParam);
+
+	case SCI_SETHSCROLLBAR :
+		if (horizontalScrollBarVisible != (wParam != 0)) {
+			horizontalScrollBarVisible = wParam != 0;
+			SetScrollBars();
+			ReconfigureScrollBars();
+		}
+		break;
+
+	case SCI_GETHSCROLLBAR:
+		return horizontalScrollBarVisible;
+
+	case SCI_SETVSCROLLBAR:
+		if (verticalScrollBarVisible != (wParam != 0)) {
+			verticalScrollBarVisible = wParam != 0;
+			SetScrollBars();
+			ReconfigureScrollBars();
+		}
+		break;
+
+	case SCI_GETVSCROLLBAR:
+		return verticalScrollBarVisible;
+
+	case SCI_SETINDENTATIONGUIDES:
+		vs.viewIndentationGuides = IndentView(wParam);
+		Redraw();
+		break;
+
+	case SCI_GETINDENTATIONGUIDES:
+		return vs.viewIndentationGuides;
+
+	case SCI_SETHIGHLIGHTGUIDE:
+		if ((highlightGuideColumn != static_cast<int>(wParam)) || (wParam > 0)) {
+			highlightGuideColumn = wParam;
+			Redraw();
+		}
+		break;
+
+	case SCI_GETHIGHLIGHTGUIDE:
+		return highlightGuideColumn;
+
+	case SCI_GETLINEENDPOSITION:
+		return pdoc->LineEnd(wParam);
+
+	case SCI_SETCODEPAGE:
+		if (ValidCodePage(wParam)) {
+			pdoc->dbcsCodePage = wParam;
+			InvalidateStyleRedraw();
+		}
+		break;
+
+	case SCI_GETCODEPAGE:
+		return pdoc->dbcsCodePage;
+
+	case SCI_SETUSEPALETTE:
+		palette.allowRealization = wParam != 0;
+		InvalidateStyleRedraw();
+		break;
+
+	case SCI_GETUSEPALETTE:
+		return palette.allowRealization;
+
+		// Marker definition and setting
+	case SCI_MARKERDEFINE:
+		if (wParam <= MARKER_MAX)
+			vs.markers[wParam].markType = lParam;
+		InvalidateStyleData();
+		RedrawSelMargin();
+		break;
+	case SCI_MARKERSETFORE:
+		if (wParam <= MARKER_MAX)
+			vs.markers[wParam].fore.desired = ColourDesired(lParam);
+		InvalidateStyleData();
+		RedrawSelMargin();
+		break;
+	case SCI_MARKERSETBACK:
+		if (wParam <= MARKER_MAX)
+			vs.markers[wParam].back.desired = ColourDesired(lParam);
+		InvalidateStyleData();
+		RedrawSelMargin();
+		break;
+	case SCI_MARKERSETALPHA:
+		if (wParam <= MARKER_MAX)
+			vs.markers[wParam].alpha = lParam;
+		InvalidateStyleRedraw();
+		break;
+	case SCI_MARKERADD: {
+			int markerID = pdoc->AddMark(wParam, lParam);
+			return markerID;
+		}
+	case SCI_MARKERADDSET:
+		if (lParam != 0)
+			pdoc->AddMarkSet(wParam, lParam);
+		break;
+
+	case SCI_MARKERDELETE:
+		pdoc->DeleteMark(wParam, lParam);
+		break;
+
+	case SCI_MARKERDELETEALL:
+		pdoc->DeleteAllMarks(static_cast<int>(wParam));
+		break;
+
+	case SCI_MARKERGET:
+		return pdoc->GetMark(wParam);
+
+	case SCI_MARKERNEXT: {
+			int lt = pdoc->LinesTotal();
+			for (int iLine = wParam; iLine < lt; iLine++) {
+				if ((pdoc->GetMark(iLine) & lParam) != 0)
+					return iLine;
+			}
+		}
+		return -1;
+
+	case SCI_MARKERPREVIOUS: {
+			for (int iLine = wParam; iLine >= 0; iLine--) {
+				if ((pdoc->GetMark(iLine) & lParam) != 0)
+					return iLine;
+			}
+		}
+		return -1;
+
+	case SCI_MARKERDEFINEPIXMAP:
+		if (wParam <= MARKER_MAX) {
+			vs.markers[wParam].SetXPM(CharPtrFromSPtr(lParam));
+		};
+		InvalidateStyleData();
+		RedrawSelMargin();
+		break;
+
+	case SCI_SETMARGINTYPEN:
+		if (ValidMargin(wParam)) {
+			vs.ms[wParam].style = lParam;
+			InvalidateStyleRedraw();
+		}
+		break;
+
+	case SCI_GETMARGINTYPEN:
+		if (ValidMargin(wParam))
+			return vs.ms[wParam].style;
+		else
+			return 0;
+
+	case SCI_SETMARGINWIDTHN:
+		if (ValidMargin(wParam)) {
+			// Short-circuit if the width is unchanged, to avoid unnecessary redraw.
+			if (vs.ms[wParam].width != lParam) {
+				vs.ms[wParam].width = lParam;
+				InvalidateStyleRedraw();
+			}
+		}
+		break;
+
+	case SCI_GETMARGINWIDTHN:
+		if (ValidMargin(wParam))
+			return vs.ms[wParam].width;
+		else
+			return 0;
+
+	case SCI_SETMARGINMASKN:
+		if (ValidMargin(wParam)) {
+			vs.ms[wParam].mask = lParam;
+			InvalidateStyleRedraw();
+		}
+		break;
+
+	case SCI_GETMARGINMASKN:
+		if (ValidMargin(wParam))
+			return vs.ms[wParam].mask;
+		else
+			return 0;
+
+	case SCI_SETMARGINSENSITIVEN:
+		if (ValidMargin(wParam)) {
+			vs.ms[wParam].sensitive = lParam != 0;
+			InvalidateStyleRedraw();
+		}
+		break;
+
+	case SCI_GETMARGINSENSITIVEN:
+		if (ValidMargin(wParam))
+			return vs.ms[wParam].sensitive ? 1 : 0;
+		else
+			return 0;
+
+	case SCI_STYLECLEARALL:
+		vs.ClearStyles();
+		InvalidateStyleRedraw();
+		break;
+
+	case SCI_STYLESETFORE:
+	case SCI_STYLESETBACK:
+	case SCI_STYLESETBOLD:
+	case SCI_STYLESETITALIC:
+	case SCI_STYLESETEOLFILLED:
+	case SCI_STYLESETSIZE:
+	case SCI_STYLESETFONT:
+	case SCI_STYLESETUNDERLINE:
+	case SCI_STYLESETCASE:
+	case SCI_STYLESETCHARACTERSET:
+	case SCI_STYLESETVISIBLE:
+	case SCI_STYLESETCHANGEABLE:
+	case SCI_STYLESETHOTSPOT:
+		StyleSetMessage(iMessage, wParam, lParam);
+		break;
+
+	case SCI_STYLEGETFORE:
+	case SCI_STYLEGETBACK:
+	case SCI_STYLEGETBOLD:
+	case SCI_STYLEGETITALIC:
+	case SCI_STYLEGETEOLFILLED:
+	case SCI_STYLEGETSIZE:
+	case SCI_STYLEGETFONT:
+	case SCI_STYLEGETUNDERLINE:
+	case SCI_STYLEGETCASE:
+	case SCI_STYLEGETCHARACTERSET:
+	case SCI_STYLEGETVISIBLE:
+	case SCI_STYLEGETCHANGEABLE:
+	case SCI_STYLEGETHOTSPOT:
+		return StyleGetMessage(iMessage, wParam, lParam);
+
+	case SCI_STYLERESETDEFAULT:
+		vs.ResetDefaultStyle();
+		InvalidateStyleRedraw();
+		break;
+	case SCI_SETSTYLEBITS:
+		vs.EnsureStyle((1 << wParam) - 1);
+		pdoc->SetStylingBits(wParam);
+		break;
+
+	case SCI_GETSTYLEBITS:
+		return pdoc->stylingBits;
+
+	case SCI_SETLINESTATE:
+		return pdoc->SetLineState(wParam, lParam);
+
+	case SCI_GETLINESTATE:
+		return pdoc->GetLineState(wParam);
+
+	case SCI_GETMAXLINESTATE:
+		return pdoc->GetMaxLineState();
+
+	case SCI_GETCARETLINEVISIBLE:
+		return vs.showCaretLineBackground;
+	case SCI_SETCARETLINEVISIBLE:
+		vs.showCaretLineBackground = wParam != 0;
+		InvalidateStyleRedraw();
+		break;
+	case SCI_GETCARETLINEBACK:
+		return vs.caretLineBackground.desired.AsLong();
+	case SCI_SETCARETLINEBACK:
+		vs.caretLineBackground.desired = wParam;
+		InvalidateStyleRedraw();
+		break;
+	case SCI_GETCARETLINEBACKALPHA:
+		return vs.caretLineAlpha;
+	case SCI_SETCARETLINEBACKALPHA:
+		vs.caretLineAlpha = wParam;
+		InvalidateStyleRedraw();
+		break;
+
+		// Folding messages
+
+	case SCI_VISIBLEFROMDOCLINE:
+		return cs.DisplayFromDoc(wParam);
+
+	case SCI_DOCLINEFROMVISIBLE:
+		return cs.DocFromDisplay(wParam);
+
+	case SCI_WRAPCOUNT:
+		return WrapCount(wParam);
+
+	case SCI_SETFOLDLEVEL: {
+			int prev = pdoc->SetLevel(wParam, lParam);
+			if (prev != lParam)
+				RedrawSelMargin();
+			return prev;
+		}
+
+	case SCI_GETFOLDLEVEL:
+		return pdoc->GetLevel(wParam);
+
+	case SCI_GETLASTCHILD:
+		return pdoc->GetLastChild(wParam, lParam);
+
+	case SCI_GETFOLDPARENT:
+		return pdoc->GetFoldParent(wParam);
+
+	case SCI_SHOWLINES:
+		cs.SetVisible(wParam, lParam, true);
+		SetScrollBars();
+		Redraw();
+		break;
+
+	case SCI_HIDELINES:
+		if (wParam > 0)
+			cs.SetVisible(wParam, lParam, false);
+		SetScrollBars();
+		Redraw();
+		break;
+
+	case SCI_GETLINEVISIBLE:
+		return cs.GetVisible(wParam);
+
+	case SCI_SETFOLDEXPANDED:
+		if (cs.SetExpanded(wParam, lParam != 0)) {
+			RedrawSelMargin();
+		}
+		break;
+
+	case SCI_GETFOLDEXPANDED:
+		return cs.GetExpanded(wParam);
+
+	case SCI_SETFOLDFLAGS:
+		foldFlags = wParam;
+		Redraw();
+		break;
+
+	case SCI_TOGGLEFOLD:
+		ToggleContraction(wParam);
+		break;
+
+	case SCI_ENSUREVISIBLE:
+		EnsureLineVisible(wParam, false);
+		break;
+
+	case SCI_ENSUREVISIBLEENFORCEPOLICY:
+		EnsureLineVisible(wParam, true);
+		break;
+
+	case SCI_SEARCHANCHOR:
+		SearchAnchor();
+		break;
+
+	case SCI_SEARCHNEXT:
+	case SCI_SEARCHPREV:
+		return SearchText(iMessage, wParam, lParam);
+
+#ifdef INCLUDE_DEPRECATED_FEATURES
+	case SCI_SETCARETPOLICY:  	// Deprecated
+		caretXPolicy = caretYPolicy = wParam;
+		caretXSlop = caretYSlop = lParam;
+		break;
+#endif
+
+	case SCI_SETXCARETPOLICY:
+		caretXPolicy = wParam;
+		caretXSlop = lParam;
+		break;
+
+	case SCI_SETYCARETPOLICY:
+		caretYPolicy = wParam;
+		caretYSlop = lParam;
+		break;
+
+	case SCI_SETVISIBLEPOLICY:
+		visiblePolicy = wParam;
+		visibleSlop = lParam;
+		break;
+
+	case SCI_LINESONSCREEN:
+		return LinesOnScreen();
+
+	case SCI_SETSELFORE:
+		vs.selforeset = wParam != 0;
+		vs.selforeground.desired = ColourDesired(lParam);
+		InvalidateStyleRedraw();
+		break;
+
+	case SCI_SETSELBACK:
+		vs.selbackset = wParam != 0;
+		vs.selbackground.desired = ColourDesired(lParam);
+		InvalidateStyleRedraw();
+		break;
+
+	case SCI_SETSELALPHA:
+		vs.selAlpha = wParam;
+		InvalidateStyleRedraw();
+		break;
+
+	case SCI_GETSELALPHA:
+		return vs.selAlpha;
+
+	case SCI_GETSELEOLFILLED:
+		return vs.selEOLFilled;
+
+	case SCI_SETSELEOLFILLED:
+		vs.selEOLFilled = wParam != 0;
+		InvalidateStyleRedraw();
+		break;
+
+	case SCI_SETWHITESPACEFORE:
+		vs.whitespaceForegroundSet = wParam != 0;
+		vs.whitespaceForeground.desired = ColourDesired(lParam);
+		InvalidateStyleRedraw();
+		break;
+
+	case SCI_SETWHITESPACEBACK:
+		vs.whitespaceBackgroundSet = wParam != 0;
+		vs.whitespaceBackground.desired = ColourDesired(lParam);
+		InvalidateStyleRedraw();
+		break;
+
+	case SCI_SETCARETFORE:
+		vs.caretcolour.desired = ColourDesired(wParam);
+		InvalidateStyleRedraw();
+		break;
+
+	case SCI_GETCARETFORE:
+		return vs.caretcolour.desired.AsLong();
+
+	case SCI_SETCARETSTYLE:
+		if (wParam >= CARETSTYLE_INVISIBLE && wParam <= CARETSTYLE_BLOCK)
+			vs.caretStyle = wParam;
+		else
+			/* Default to the line caret */
+			vs.caretStyle = CARETSTYLE_LINE;
+		InvalidateStyleRedraw();
+		break;
+
+	case SCI_GETCARETSTYLE:
+		return vs.caretStyle;
+
+	case SCI_SETCARETWIDTH:
+		if (wParam <= 0)
+			vs.caretWidth = 0;
+		else if (wParam >= 3)
+			vs.caretWidth = 3;
+		else
+			vs.caretWidth = wParam;
+		InvalidateStyleRedraw();
+		break;
+
+	case SCI_GETCARETWIDTH:
+		return vs.caretWidth;
+
+	case SCI_ASSIGNCMDKEY:
+		kmap.AssignCmdKey(Platform::LowShortFromLong(wParam),
+		        Platform::HighShortFromLong(wParam), lParam);
+		break;
+
+	case SCI_CLEARCMDKEY:
+		kmap.AssignCmdKey(Platform::LowShortFromLong(wParam),
+		        Platform::HighShortFromLong(wParam), SCI_NULL);
+		break;
+
+	case SCI_CLEARALLCMDKEYS:
+		kmap.Clear();
+		break;
+
+	case SCI_INDICSETSTYLE:
+		if (wParam <= INDIC_MAX) {
+			vs.indicators[wParam].style = lParam;
+			InvalidateStyleRedraw();
+		}
+		break;
+
+	case SCI_INDICGETSTYLE:
+		return (wParam <= INDIC_MAX) ? vs.indicators[wParam].style : 0;
+
+	case SCI_INDICSETFORE:
+		if (wParam <= INDIC_MAX) {
+			vs.indicators[wParam].fore.desired = ColourDesired(lParam);
+			InvalidateStyleRedraw();
+		}
+		break;
+
+	case SCI_INDICGETFORE:
+		return (wParam <= INDIC_MAX) ? vs.indicators[wParam].fore.desired.AsLong() : 0;
+
+	case SCI_INDICSETUNDER:
+		if (wParam <= INDIC_MAX) {
+			vs.indicators[wParam].under = lParam != 0;
+			InvalidateStyleRedraw();
+		}
+		break;
+
+	case SCI_INDICGETUNDER:
+		return (wParam <= INDIC_MAX) ? vs.indicators[wParam].under : 0;
+
+	case SCI_SETINDICATORCURRENT:
+		pdoc->decorations.SetCurrentIndicator(wParam);
+		break;
+	case SCI_GETINDICATORCURRENT:
+		return pdoc->decorations.GetCurrentIndicator();
+	case SCI_SETINDICATORVALUE:
+		pdoc->decorations.SetCurrentValue(wParam);
+		break;
+	case SCI_GETINDICATORVALUE:
+		return pdoc->decorations.GetCurrentValue();
+
+	case SCI_INDICATORFILLRANGE:
+		pdoc->DecorationFillRange(wParam, pdoc->decorations.GetCurrentValue(), lParam);
+		break;
+
+	case SCI_INDICATORCLEARRANGE:
+		pdoc->DecorationFillRange(wParam, 0, lParam);
+		break;
+
+	case SCI_INDICATORALLONFOR:
+		return pdoc->decorations.AllOnFor(wParam);
+
+	case SCI_INDICATORVALUEAT:
+		return pdoc->decorations.ValueAt(wParam, lParam);
+
+	case SCI_INDICATORSTART:
+		return pdoc->decorations.Start(wParam, lParam);
+
+	case SCI_INDICATOREND:
+		return pdoc->decorations.End(wParam, lParam);
+
+	case SCI_LINEDOWN:
+	case SCI_LINEDOWNEXTEND:
+	case SCI_PARADOWN:
+	case SCI_PARADOWNEXTEND:
+	case SCI_LINEUP:
+	case SCI_LINEUPEXTEND:
+	case SCI_PARAUP:
+	case SCI_PARAUPEXTEND:
+	case SCI_CHARLEFT:
+	case SCI_CHARLEFTEXTEND:
+	case SCI_CHARRIGHT:
+	case SCI_CHARRIGHTEXTEND:
+	case SCI_WORDLEFT:
+	case SCI_WORDLEFTEXTEND:
+	case SCI_WORDRIGHT:
+	case SCI_WORDRIGHTEXTEND:
+	case SCI_WORDLEFTEND:
+	case SCI_WORDLEFTENDEXTEND:
+	case SCI_WORDRIGHTEND:
+	case SCI_WORDRIGHTENDEXTEND:
+	case SCI_HOME:
+	case SCI_HOMEEXTEND:
+	case SCI_LINEEND:
+	case SCI_LINEENDEXTEND:
+	case SCI_HOMEWRAP:
+	case SCI_HOMEWRAPEXTEND:
+	case SCI_LINEENDWRAP:
+	case SCI_LINEENDWRAPEXTEND:
+	case SCI_DOCUMENTSTART:
+	case SCI_DOCUMENTSTARTEXTEND:
+	case SCI_DOCUMENTEND:
+	case SCI_DOCUMENTENDEXTEND:
+
+	case SCI_STUTTEREDPAGEUP:
+	case SCI_STUTTEREDPAGEUPEXTEND:
+	case SCI_STUTTEREDPAGEDOWN:
+	case SCI_STUTTEREDPAGEDOWNEXTEND:
+
+	case SCI_PAGEUP:
+	case SCI_PAGEUPEXTEND:
+	case SCI_PAGEDOWN:
+	case SCI_PAGEDOWNEXTEND:
+	case SCI_EDITTOGGLEOVERTYPE:
+	case SCI_CANCEL:
+	case SCI_DELETEBACK:
+	case SCI_TAB:
+	case SCI_BACKTAB:
+	case SCI_NEWLINE:
+	case SCI_FORMFEED:
+	case SCI_VCHOME:
+	case SCI_VCHOMEEXTEND:
+	case SCI_VCHOMEWRAP:
+	case SCI_VCHOMEWRAPEXTEND:
+	case SCI_ZOOMIN:
+	case SCI_ZOOMOUT:
+	case SCI_DELWORDLEFT:
+	case SCI_DELWORDRIGHT:
+	case SCI_DELWORDRIGHTEND:
+	case SCI_DELLINELEFT:
+	case SCI_DELLINERIGHT:
+	case SCI_LINECOPY:
+	case SCI_LINECUT:
+	case SCI_LINEDELETE:
+	case SCI_LINETRANSPOSE:
+	case SCI_LINEDUPLICATE:
+	case SCI_LOWERCASE:
+	case SCI_UPPERCASE:
+	case SCI_LINESCROLLDOWN:
+	case SCI_LINESCROLLUP:
+	case SCI_WORDPARTLEFT:
+	case SCI_WORDPARTLEFTEXTEND:
+	case SCI_WORDPARTRIGHT:
+	case SCI_WORDPARTRIGHTEXTEND:
+	case SCI_DELETEBACKNOTLINE:
+	case SCI_HOMEDISPLAY:
+	case SCI_HOMEDISPLAYEXTEND:
+	case SCI_LINEENDDISPLAY:
+	case SCI_LINEENDDISPLAYEXTEND:
+	case SCI_LINEDOWNRECTEXTEND:
+	case SCI_LINEUPRECTEXTEND:
+	case SCI_CHARLEFTRECTEXTEND:
+	case SCI_CHARRIGHTRECTEXTEND:
+	case SCI_HOMERECTEXTEND:
+	case SCI_VCHOMERECTEXTEND:
+	case SCI_LINEENDRECTEXTEND:
+	case SCI_PAGEUPRECTEXTEND:
+	case SCI_PAGEDOWNRECTEXTEND:
+	case SCI_SELECTIONDUPLICATE:
+		return KeyCommand(iMessage);
+
+	case SCI_BRACEHIGHLIGHT:
+		SetBraceHighlight(static_cast<int>(wParam), lParam, STYLE_BRACELIGHT);
+		break;
+
+	case SCI_BRACEBADLIGHT:
+		SetBraceHighlight(static_cast<int>(wParam), -1, STYLE_BRACEBAD);
+		break;
+
+	case SCI_BRACEMATCH:
+		// wParam is position of char to find brace for,
+		// lParam is maximum amount of text to restyle to find it
+		return pdoc->BraceMatch(wParam, lParam);
+
+	case SCI_GETVIEWEOL:
+		return vs.viewEOL;
+
+	case SCI_SETVIEWEOL:
+		vs.viewEOL = wParam != 0;
+		InvalidateStyleRedraw();
+		break;
+
+	case SCI_SETZOOM:
+		vs.zoomLevel = wParam;
+		InvalidateStyleRedraw();
+		NotifyZoom();
+		break;
+
+	case SCI_GETZOOM:
+		return vs.zoomLevel;
+
+	case SCI_GETEDGECOLUMN:
+		return theEdge;
+
+	case SCI_SETEDGECOLUMN:
+		theEdge = wParam;
+		InvalidateStyleRedraw();
+		break;
+
+	case SCI_GETEDGEMODE:
+		return vs.edgeState;
+
+	case SCI_SETEDGEMODE:
+		vs.edgeState = wParam;
+		InvalidateStyleRedraw();
+		break;
+
+	case SCI_GETEDGECOLOUR:
+		return vs.edgecolour.desired.AsLong();
+
+	case SCI_SETEDGECOLOUR:
+		vs.edgecolour.desired = ColourDesired(wParam);
+		InvalidateStyleRedraw();
+		break;
+
+	case SCI_GETDOCPOINTER:
+		return reinterpret_cast<sptr_t>(pdoc);
+
+	case SCI_SETDOCPOINTER:
+		CancelModes();
+		SetDocPointer(reinterpret_cast<Document *>(lParam));
+		return 0;
+
+	case SCI_CREATEDOCUMENT: {
+			Document *doc = new Document();
+			if (doc) {
+				doc->AddRef();
+			}
+			return reinterpret_cast<sptr_t>(doc);
+		}
+
+	case SCI_ADDREFDOCUMENT:
+		(reinterpret_cast<Document *>(lParam))->AddRef();
+		break;
+
+	case SCI_RELEASEDOCUMENT:
+		(reinterpret_cast<Document *>(lParam))->Release();
+		break;
+
+	case SCI_SETMODEVENTMASK:
+		modEventMask = wParam;
+		return 0;
+
+	case SCI_GETMODEVENTMASK:
+		return modEventMask;
+
+	case SCI_CONVERTEOLS:
+		pdoc->ConvertLineEnds(wParam);
+		SetSelection(currentPos, anchor);	// Ensure selection inside document
+		return 0;
+
+	case SCI_SETLENGTHFORENCODE:
+		lengthForEncode = wParam;
+		return 0;
+
+	case SCI_SELECTIONISRECTANGLE:
+		return selType == selRectangle ? 1 : 0;
+
+	case SCI_SETSELECTIONMODE: {
+			switch (wParam) {
+			case SC_SEL_STREAM:
+				moveExtendsSelection = !moveExtendsSelection || (selType != selStream);
+				selType = selStream;
+				break;
+			case SC_SEL_RECTANGLE:
+				moveExtendsSelection = !moveExtendsSelection || (selType != selRectangle);
+				selType = selRectangle;
+				break;
+			case SC_SEL_LINES:
+				moveExtendsSelection = !moveExtendsSelection || (selType != selLines);
+				selType = selLines;
+				break;
+			default:
+				moveExtendsSelection = !moveExtendsSelection || (selType != selStream);
+				selType = selStream;
+			}
+			InvalidateSelection(currentPos, anchor, true);
+		}
+	case SCI_GETSELECTIONMODE:
+		switch (selType) {
+		case selStream:
+			return SC_SEL_STREAM;
+		case selRectangle:
+			return SC_SEL_RECTANGLE;
+		case selLines:
+			return SC_SEL_LINES;
+		default:	// ?!
+			return SC_SEL_STREAM;
+		}
+	case SCI_GETLINESELSTARTPOSITION: {
+			SelectionLineIterator lineIterator(this);
+			lineIterator.SetAt(wParam);
+			return lineIterator.startPos;
+		}
+	case SCI_GETLINESELENDPOSITION: {
+			SelectionLineIterator lineIterator(this);
+			lineIterator.SetAt(wParam);
+			return lineIterator.endPos;
+		}
+
+	case SCI_SETOVERTYPE:
+		inOverstrike = wParam != 0;
+		break;
+
+	case SCI_GETOVERTYPE:
+		return inOverstrike ? 1 : 0;
+
+	case SCI_SETFOCUS:
+		SetFocusState(wParam != 0);
+		break;
+
+	case SCI_GETFOCUS:
+		return hasFocus;
+
+	case SCI_SETSTATUS:
+		errorStatus = wParam;
+		break;
+
+	case SCI_GETSTATUS:
+		return errorStatus;
+
+	case SCI_SETMOUSEDOWNCAPTURES:
+		mouseDownCaptures = wParam != 0;
+		break;
+
+	case SCI_GETMOUSEDOWNCAPTURES:
+		return mouseDownCaptures;
+
+	case SCI_SETCURSOR:
+		cursorMode = wParam;
+		DisplayCursor(Window::cursorText);
+		break;
+
+	case SCI_GETCURSOR:
+		return cursorMode;
+
+	case SCI_SETCONTROLCHARSYMBOL:
+		controlCharSymbol = wParam;
+		break;
+
+	case SCI_GETCONTROLCHARSYMBOL:
+		return controlCharSymbol;
+
+	case SCI_STARTRECORD:
+		recordingMacro = true;
+		return 0;
+
+	case SCI_STOPRECORD:
+		recordingMacro = false;
+		return 0;
+
+	case SCI_MOVECARETINSIDEVIEW:
+		MoveCaretInsideView();
+		break;
+
+	case SCI_SETFOLDMARGINCOLOUR:
+		vs.foldmarginColourSet = wParam != 0;
+		vs.foldmarginColour.desired = ColourDesired(lParam);
+		InvalidateStyleRedraw();
+		break;
+
+	case SCI_SETFOLDMARGINHICOLOUR:
+		vs.foldmarginHighlightColourSet = wParam != 0;
+		vs.foldmarginHighlightColour.desired = ColourDesired(lParam);
+		InvalidateStyleRedraw();
+		break;
+
+	case SCI_SETHOTSPOTACTIVEFORE:
+		vs.hotspotForegroundSet = wParam != 0;
+		vs.hotspotForeground.desired = ColourDesired(lParam);
+		InvalidateStyleRedraw();
+		break;
+
+	case SCI_GETHOTSPOTACTIVEFORE:
+		return vs.hotspotForeground.desired.AsLong();
+
+	case SCI_SETHOTSPOTACTIVEBACK:
+		vs.hotspotBackgroundSet = wParam != 0;
+		vs.hotspotBackground.desired = ColourDesired(lParam);
+		InvalidateStyleRedraw();
+		break;
+
+	case SCI_GETHOTSPOTACTIVEBACK:
+		return vs.hotspotBackground.desired.AsLong();
+
+	case SCI_SETHOTSPOTACTIVEUNDERLINE:
+		vs.hotspotUnderline = wParam != 0;
+		InvalidateStyleRedraw();
+		break;
+
+	case SCI_GETHOTSPOTACTIVEUNDERLINE:
+		return vs.hotspotUnderline ? 1 : 0;
+
+	case SCI_SETHOTSPOTSINGLELINE:
+		vs.hotspotSingleLine = wParam != 0;
+		InvalidateStyleRedraw();
+		break;
+
+	case SCI_GETHOTSPOTSINGLELINE:
+		return vs.hotspotSingleLine ? 1 : 0;
+
+	case SCI_SETPASTECONVERTENDINGS:
+		convertPastes = wParam != 0;
+		break;
+
+	case SCI_GETPASTECONVERTENDINGS:
+		return convertPastes ? 1 : 0;
+
+	case SCI_GETCHARACTERPOINTER:
+		return reinterpret_cast<sptr_t>(pdoc->BufferPointer());
+
+	default:
+		return DefWndProc(iMessage, wParam, lParam);
+	}
+	//Platform::DebugPrintf("end wnd proc\n");
+	return 0l;
+}

Added: trunk/plugins/scintilla/scintilla/ExternalLexer.h
==============================================================================
--- (empty file)
+++ trunk/plugins/scintilla/scintilla/ExternalLexer.h	Wed Apr  8 07:16:46 2009
@@ -0,0 +1,103 @@
+// Scintilla source code edit control
+/** @file ExternalLexer.h
+ ** Support external lexers in DLLs.
+ **/
+// Copyright 2001 Simon Steele <ss pnotepad org>, portions copyright Neil Hodgson.
+// The License.txt file describes the conditions under which this software may be distributed.
+
+#ifndef EXTERNALLEXER_H
+#define EXTERNALLEXER_H
+
+#if PLAT_WIN
+#define EXT_LEXER_DECL __stdcall
+#else
+#define EXT_LEXER_DECL
+#endif
+
+#ifdef SCI_NAMESPACE
+namespace Scintilla {
+#endif
+
+// External Lexer function definitions...
+typedef void (EXT_LEXER_DECL *ExtLexerFunction)(unsigned int lexer, unsigned int startPos, int length, int initStyle,
+                  char *words[], WindowID window, char *props);
+typedef void (EXT_LEXER_DECL *ExtFoldFunction)(unsigned int lexer, unsigned int startPos, int length, int initStyle,
+                  char *words[], WindowID window, char *props);
+typedef void* (EXT_LEXER_DECL *GetLexerFunction)(unsigned int Index);
+typedef int (EXT_LEXER_DECL *GetLexerCountFn)();
+typedef void (EXT_LEXER_DECL *GetLexerNameFn)(unsigned int Index, char *name, int buflength);
+
+//class DynamicLibrary;
+
+/// Sub-class of LexerModule to use an external lexer.
+class ExternalLexerModule : protected LexerModule {
+protected:
+	ExtLexerFunction fneLexer;
+	ExtFoldFunction fneFolder;
+	int externalLanguage;
+	char name[100];
+public:
+	ExternalLexerModule(int language_, LexerFunction fnLexer_, 
+		const char *languageName_=0, LexerFunction fnFolder_=0) : LexerModule(language_, fnLexer_, 0, fnFolder_){
+		strncpy(name, languageName_, sizeof(name));
+		languageName = name;
+	};
+	virtual void Lex(unsigned int startPos, int lengthDoc, int initStyle,
+					WordList *keywordlists[], Accessor &styler) const;
+	virtual void Fold(unsigned int startPos, int lengthDoc, int initStyle,
+					WordList *keywordlists[], Accessor &styler) const;
+	virtual void SetExternal(ExtLexerFunction fLexer, ExtFoldFunction fFolder, int index);
+};
+
+/// LexerMinder points to an ExternalLexerModule - so we don't leak them.
+class LexerMinder {
+public:
+	ExternalLexerModule *self;
+	LexerMinder *next;
+};
+
+/// LexerLibrary exists for every External Lexer DLL, contains LexerMinders.
+class LexerLibrary {
+	DynamicLibrary	*lib;
+	LexerMinder		*first;
+	LexerMinder		*last;
+
+public:
+	LexerLibrary(const char* ModuleName);
+	~LexerLibrary();
+	void Release();
+	
+	LexerLibrary	*next;
+	SString			m_sModuleName;
+};
+
+/// LexerManager manages external lexers, contains LexerLibrarys.
+class LexerManager {
+public:
+	~LexerManager();
+	
+	static LexerManager *GetInstance();
+	static void DeleteInstance();
+	
+	void Load(const char* path);
+	void Clear();
+
+private:
+	LexerManager();
+	static LexerManager *theInstance;
+
+	void LoadLexerLibrary(const char* module);
+	LexerLibrary *first;
+	LexerLibrary *last;
+};
+
+class LMMinder {
+public:
+	~LMMinder();
+};
+
+#ifdef SCI_NAMESPACE
+}
+#endif
+
+#endif

Added: trunk/plugins/scintilla/scintilla/Indicator.h
==============================================================================
--- (empty file)
+++ trunk/plugins/scintilla/scintilla/Indicator.h	Wed Apr  8 07:16:46 2009
@@ -0,0 +1,31 @@
+// Scintilla source code edit control
+/** @file Indicator.h
+ ** Defines the style of indicators which are text decorations such as underlining.
+ **/
+// Copyright 1998-2001 by Neil Hodgson <neilh scintilla org>
+// The License.txt file describes the conditions under which this software may be distributed.
+
+#ifndef INDICATOR_H
+#define INDICATOR_H
+
+#ifdef SCI_NAMESPACE
+namespace Scintilla {
+#endif
+
+/**
+ */
+class Indicator {
+public:
+	int style;
+	bool under;
+	ColourPair fore;
+	Indicator() : style(INDIC_PLAIN), under(false), fore(ColourDesired(0,0,0)) {
+	}
+	void Draw(Surface *surface, const PRectangle &rc, const PRectangle &rcLine);
+};
+
+#ifdef SCI_NAMESPACE
+}
+#endif
+
+#endif

Added: trunk/plugins/scintilla/scintilla/LexAsm.cxx
==============================================================================
--- (empty file)
+++ trunk/plugins/scintilla/scintilla/LexAsm.cxx	Wed Apr  8 07:16:46 2009
@@ -0,0 +1,180 @@
+// Scintilla source code edit control
+/** @file LexAsm.cxx
+ ** Lexer for Assembler, just for the MASM syntax
+ ** Written by The Black Horus
+ ** Enhancements and NASM stuff by Kein-Hong Man, 2003-10
+ ** SCE_ASM_COMMENTBLOCK and SCE_ASM_CHARACTER are for future GNU as colouring
+ **/
+// Copyright 1998-2003 by Neil Hodgson <neilh scintilla org>
+// The License.txt file describes the conditions under which this software may be distributed.
+
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include <stdio.h>
+#include <stdarg.h>
+
+#include "Platform.h"
+
+#include "PropSet.h"
+#include "Accessor.h"
+#include "StyleContext.h"
+#include "KeyWords.h"
+#include "Scintilla.h"
+#include "SciLexer.h"
+
+#ifdef SCI_NAMESPACE
+using namespace Scintilla;
+#endif
+
+static inline bool IsAWordChar(const int ch) {
+	return (ch < 0x80) && (isalnum(ch) || ch == '.' ||
+		ch == '_' || ch == '?');
+}
+
+static inline bool IsAWordStart(const int ch) {
+	return (ch < 0x80) && (isalnum(ch) || ch == '_' || ch == '.' ||
+		ch == '%' || ch == '@' || ch == '$' || ch == '?');
+}
+
+static inline bool IsAsmOperator(const int ch) {
+	if ((ch < 0x80) && (isalnum(ch)))
+		return false;
+	// '.' left out as it is used to make up numbers
+	if (ch == '*' || ch == '/' || ch == '-' || ch == '+' ||
+		ch == '(' || ch == ')' || ch == '=' || ch == '^' ||
+		ch == '[' || ch == ']' || ch == '<' || ch == '&' ||
+		ch == '>' || ch == ',' || ch == '|' || ch == '~' ||
+		ch == '%' || ch == ':')
+		return true;
+	return false;
+}
+
+static void ColouriseAsmDoc(unsigned int startPos, int length, int initStyle, WordList *keywordlists[],
+                            Accessor &styler) {
+
+	WordList &cpuInstruction = *keywordlists[0];
+	WordList &mathInstruction = *keywordlists[1];
+	WordList &registers = *keywordlists[2];
+	WordList &directive = *keywordlists[3];
+	WordList &directiveOperand = *keywordlists[4];
+	WordList &extInstruction = *keywordlists[5];
+
+	// Do not leak onto next line
+	if (initStyle == SCE_ASM_STRINGEOL)
+		initStyle = SCE_ASM_DEFAULT;
+
+	StyleContext sc(startPos, length, initStyle, styler);
+
+	for (; sc.More(); sc.Forward())
+	{
+
+		// Prevent SCE_ASM_STRINGEOL from leaking back to previous line
+		if (sc.atLineStart && (sc.state == SCE_ASM_STRING)) {
+			sc.SetState(SCE_ASM_STRING);
+		} else if (sc.atLineStart && (sc.state == SCE_ASM_CHARACTER)) {
+			sc.SetState(SCE_ASM_CHARACTER);
+		}
+
+		// Handle line continuation generically.
+		if (sc.ch == '\\') {
+			if (sc.chNext == '\n' || sc.chNext == '\r') {
+				sc.Forward();
+				if (sc.ch == '\r' && sc.chNext == '\n') {
+					sc.Forward();
+				}
+				continue;
+			}
+		}
+
+		// Determine if the current state should terminate.
+		if (sc.state == SCE_ASM_OPERATOR) {
+			if (!IsAsmOperator(sc.ch)) {
+			    sc.SetState(SCE_ASM_DEFAULT);
+			}
+		}else if (sc.state == SCE_ASM_NUMBER) {
+			if (!IsAWordChar(sc.ch)) {
+				sc.SetState(SCE_ASM_DEFAULT);
+			}
+		} else if (sc.state == SCE_ASM_IDENTIFIER) {
+			if (!IsAWordChar(sc.ch) ) {
+				char s[100];
+				sc.GetCurrentLowered(s, sizeof(s));
+
+				if (cpuInstruction.InList(s)) {
+					sc.ChangeState(SCE_ASM_CPUINSTRUCTION);
+				} else if (mathInstruction.InList(s)) {
+					sc.ChangeState(SCE_ASM_MATHINSTRUCTION);
+				} else if (registers.InList(s)) {
+					sc.ChangeState(SCE_ASM_REGISTER);
+				}  else if (directive.InList(s)) {
+					sc.ChangeState(SCE_ASM_DIRECTIVE);
+				} else if (directiveOperand.InList(s)) {
+					sc.ChangeState(SCE_ASM_DIRECTIVEOPERAND);
+				} else if (extInstruction.InList(s)) {
+					sc.ChangeState(SCE_ASM_EXTINSTRUCTION);
+				}
+				sc.SetState(SCE_ASM_DEFAULT);
+			}
+		}
+		else if (sc.state == SCE_ASM_COMMENT ) {
+			if (sc.atLineEnd) {
+				sc.SetState(SCE_ASM_DEFAULT);
+			}
+		} else if (sc.state == SCE_ASM_STRING) {
+			if (sc.ch == '\\') {
+				if (sc.chNext == '\"' || sc.chNext == '\'' || sc.chNext == '\\') {
+					sc.Forward();
+				}
+			} else if (sc.ch == '\"') {
+				sc.ForwardSetState(SCE_ASM_DEFAULT);
+			} else if (sc.atLineEnd) {
+				sc.ChangeState(SCE_ASM_STRINGEOL);
+				sc.ForwardSetState(SCE_ASM_DEFAULT);
+			}
+		} else if (sc.state == SCE_ASM_CHARACTER) {
+			if (sc.ch == '\\') {
+				if (sc.chNext == '\"' || sc.chNext == '\'' || sc.chNext == '\\') {
+					sc.Forward();
+				}
+			} else if (sc.ch == '\'') {
+				sc.ForwardSetState(SCE_ASM_DEFAULT);
+			} else if (sc.atLineEnd) {
+				sc.ChangeState(SCE_ASM_STRINGEOL);
+				sc.ForwardSetState(SCE_ASM_DEFAULT);
+			}
+		}
+
+		// Determine if a new state should be entered.
+		if (sc.state == SCE_ASM_DEFAULT) {
+			if (sc.ch == ';'){
+				sc.SetState(SCE_ASM_COMMENT);
+			} else if (isascii(sc.ch) && (isdigit(sc.ch) || (sc.ch == '.' && isascii(sc.chNext) && isdigit(sc.chNext)))) {
+				sc.SetState(SCE_ASM_NUMBER);
+			} else if (IsAWordStart(sc.ch)) {
+				sc.SetState(SCE_ASM_IDENTIFIER);
+			} else if (sc.ch == '\"') {
+				sc.SetState(SCE_ASM_STRING);
+			} else if (sc.ch == '\'') {
+				sc.SetState(SCE_ASM_CHARACTER);
+			} else if (IsAsmOperator(sc.ch)) {
+				sc.SetState(SCE_ASM_OPERATOR);
+			}
+		}
+
+	}
+	sc.Complete();
+}
+
+static const char * const asmWordListDesc[] = {
+	"CPU instructions",
+	"FPU instructions",
+	"Registers",
+	"Directives",
+	"Directive operands",
+	"Extended instructions",
+	0
+};
+
+LexerModule lmAsm(SCLEX_ASM, ColouriseAsmDoc, "asm", 0, asmWordListDesc);
+

Added: trunk/plugins/scintilla/scintilla/LexBash.cxx
==============================================================================
--- (empty file)
+++ trunk/plugins/scintilla/scintilla/LexBash.cxx	Wed Apr  8 07:16:46 2009
@@ -0,0 +1,532 @@
+// Scintilla source code edit control
+/** @file LexBash.cxx
+ ** Lexer for Bash.
+ **/
+// Copyright 2004-2008 by Neil Hodgson <neilh scintilla org>
+// Adapted from LexPerl by Kein-Hong Man 2004
+// The License.txt file describes the conditions under which this software may be distributed.
+
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include <stdio.h>
+#include <stdarg.h>
+
+#include "Platform.h"
+
+#include "PropSet.h"
+#include "Accessor.h"
+#include "StyleContext.h"
+#include "KeyWords.h"
+#include "Scintilla.h"
+#include "SciLexer.h"
+#include "CharacterSet.h"
+
+#ifdef SCI_NAMESPACE
+using namespace Scintilla;
+#endif
+
+#define HERE_DELIM_MAX 256
+
+// define this if you want 'invalid octals' to be marked as errors
+// usually, this is not a good idea, permissive lexing is better
+#undef PEDANTIC_OCTAL
+
+#define BASH_BASE_ERROR		65
+#define BASH_BASE_DECIMAL	66
+#define BASH_BASE_HEX		67
+#ifdef PEDANTIC_OCTAL
+#define BASH_BASE_OCTAL		68
+#define BASH_BASE_OCTAL_ERROR	69
+#endif
+
+static inline int translateBashDigit(int ch) {
+	if (ch >= '0' && ch <= '9') {
+		return ch - '0';
+	} else if (ch >= 'a' && ch <= 'z') {
+		return ch - 'a' + 10;
+	} else if (ch >= 'A' && ch <= 'Z') {
+		return ch - 'A' + 36;
+	} else if (ch == '@') {
+		return 62;
+	} else if (ch == '_') {
+		return 63;
+	}
+	return BASH_BASE_ERROR;
+}
+
+static inline int getBashNumberBase(char *s) {
+	int i = 0;
+	int base = 0;
+	while (*s) {
+		base = base * 10 + (*s++ - '0');
+		i++;
+	}
+	if (base > 64 || i > 2) {
+		return BASH_BASE_ERROR;
+	}
+	return base;
+}
+
+static int opposite(int ch) {
+	if (ch == '(') return ')';
+	if (ch == '[') return ']';
+	if (ch == '{') return '}';
+	if (ch == '<') return '>';
+	return ch;
+}
+
+static void ColouriseBashDoc(unsigned int startPos, int length, int initStyle,
+							 WordList *keywordlists[], Accessor &styler) {
+
+	WordList &keywords = *keywordlists[0];
+
+	CharacterSet setWordStart(CharacterSet::setAlpha, "_");
+	// note that [+-] are often parts of identifiers in shell scripts
+	CharacterSet setWord(CharacterSet::setAlphaNum, "._+-");
+	CharacterSet setBashOperator(CharacterSet::setNone, "^&\\%()-+=|{}[]:;>,*/<?!.~@");
+	CharacterSet setSingleCharOp(CharacterSet::setNone, "rwxoRWXOezsfdlpSbctugkTBMACahGLNn");
+	CharacterSet setParam(CharacterSet::setAlphaNum, "$_");
+	CharacterSet setHereDoc(CharacterSet::setAlpha, "_\\-+!");
+	CharacterSet setHereDoc2(CharacterSet::setAlphaNum, "_-+!");
+	CharacterSet setLeftShift(CharacterSet::setDigits, "=$");
+
+	class HereDocCls {	// Class to manage HERE document elements
+	public:
+		int State;		// 0: '<<' encountered
+		// 1: collect the delimiter
+		// 2: here doc text (lines after the delimiter)
+		int Quote;		// the char after '<<'
+		bool Quoted;		// true if Quote in ('\'','"','`')
+		bool Indent;		// indented delimiter (for <<-)
+		int DelimiterLength;	// strlen(Delimiter)
+		char *Delimiter;	// the Delimiter, 256: sizeof PL_tokenbuf
+		HereDocCls() {
+			State = 0;
+			Quote = 0;
+			Quoted = false;
+			Indent = 0;
+			DelimiterLength = 0;
+			Delimiter = new char[HERE_DELIM_MAX];
+			Delimiter[0] = '\0';
+		}
+		void Append(int ch) {
+			Delimiter[DelimiterLength++] = static_cast<char>(ch);
+			Delimiter[DelimiterLength] = '\0';
+		}
+		~HereDocCls() {
+			delete []Delimiter;
+		}
+	};
+	HereDocCls HereDoc;
+
+	class QuoteCls {	// Class to manage quote pairs (simplified vs LexPerl)
+		public:
+		int Count;
+		int Up, Down;
+		QuoteCls() {
+			Count = 0;
+			Up    = '\0';
+			Down  = '\0';
+		}
+		void Open(int u) {
+			Count++;
+			Up    = u;
+			Down  = opposite(Up);
+		}
+		void Start(int u) {
+			Count = 0;
+			Open(u);
+		}
+	};
+	QuoteCls Quote;
+
+	int numBase = 0;
+	int digit;
+	unsigned int endPos = startPos + length;
+
+	// Backtrack to beginning of style if required...
+	// If in a long distance lexical state, backtrack to find quote characters
+	if (initStyle == SCE_SH_HERE_Q) {
+		while ((startPos > 1) && (styler.StyleAt(startPos) != SCE_SH_HERE_DELIM)) {
+			startPos--;
+		}
+		startPos = styler.LineStart(styler.GetLine(startPos));
+		initStyle = styler.StyleAt(startPos - 1);
+	}
+	// Bash strings can be multi-line with embedded newlines, so backtrack.
+	// Bash numbers have additional state during lexing, so backtrack too.
+	if (initStyle == SCE_SH_STRING
+	 || initStyle == SCE_SH_BACKTICKS
+	 || initStyle == SCE_SH_CHARACTER
+	 || initStyle == SCE_SH_NUMBER
+	 || initStyle == SCE_SH_IDENTIFIER
+	 || initStyle == SCE_SH_COMMENTLINE) {
+		while ((startPos > 1) && (styler.StyleAt(startPos - 1) == initStyle)) {
+			startPos--;
+		}
+		initStyle = SCE_SH_DEFAULT;
+	}
+
+	StyleContext sc(startPos, endPos - startPos, initStyle, styler);
+
+	for (; sc.More(); sc.Forward()) {
+
+		// Determine if the current state should terminate.
+		switch (sc.state) {
+			case SCE_SH_OPERATOR:
+				sc.SetState(SCE_SH_DEFAULT);
+				break;
+			case SCE_SH_WORD:
+				// "." never used in Bash variable names but used in file names
+				if (!setWord.Contains(sc.ch)) {
+					char s[1000];
+					sc.GetCurrent(s, sizeof(s));
+					if (s[0] != '-' &&	// for file operators
+						!keywords.InList(s)) {
+						sc.ChangeState(SCE_SH_IDENTIFIER);
+					}
+					sc.SetState(SCE_SH_DEFAULT);
+				}
+				break;
+			case SCE_SH_IDENTIFIER:
+				if (sc.chPrev == '\\') {	// for escaped chars
+					sc.ForwardSetState(SCE_SH_DEFAULT);
+				} else if (!setWord.Contains(sc.ch)) {
+					sc.SetState(SCE_SH_DEFAULT);
+				}
+				break;
+			case SCE_SH_NUMBER:
+				digit = translateBashDigit(sc.ch);
+				if (numBase == BASH_BASE_DECIMAL) {
+					if (sc.ch == '#') {
+						char s[10];
+						sc.GetCurrent(s, sizeof(s));
+						numBase = getBashNumberBase(s);
+						if (numBase != BASH_BASE_ERROR)
+							break;
+					} else if (IsADigit(sc.ch))
+						break;
+				} else if (numBase == BASH_BASE_HEX) {
+					if (IsADigit(sc.ch, 16))
+						break;
+#ifdef PEDANTIC_OCTAL
+				} else if (numBase == BASH_BASE_OCTAL ||
+						   numBase == BASH_BASE_OCTAL_ERROR) {
+					if (digit <= 7)
+						break;
+					if (digit <= 9) {
+						numBase = BASH_BASE_OCTAL_ERROR;
+						break;
+					}
+#endif
+				} else if (numBase == BASH_BASE_ERROR) {
+					if (digit <= 9)
+						break;
+				} else {	// DD#DDDD number style handling
+					if (digit != BASH_BASE_ERROR) {
+						if (numBase <= 36) {
+							// case-insensitive if base<=36
+							if (digit >= 36) digit -= 26;
+						}
+						if (digit < numBase)
+							break;
+						if (digit <= 9) {
+							numBase = BASH_BASE_ERROR;
+							break;
+						}
+					}
+				}
+				// fallthrough when number is at an end or error
+				if (numBase == BASH_BASE_ERROR
+#ifdef PEDANTIC_OCTAL
+					|| numBase == BASH_BASE_OCTAL_ERROR
+#endif
+				) {
+					sc.ChangeState(SCE_SH_ERROR);
+				}
+				sc.SetState(SCE_SH_DEFAULT);
+				break;
+			case SCE_SH_COMMENTLINE:
+				if (sc.ch == '\\' && (sc.chNext == '\r' || sc.chNext == '\n')) {
+					// comment continuation
+					sc.Forward();
+					if (sc.ch == '\r' && sc.chNext == '\n') {
+						sc.Forward();
+					}
+				} else if (sc.atLineEnd) {
+					sc.ForwardSetState(SCE_SH_DEFAULT);
+				}
+				break;
+			case SCE_SH_HERE_DELIM:
+				// From Bash info:
+				// ---------------
+				// Specifier format is: <<[-]WORD
+				// Optional '-' is for removal of leading tabs from here-doc.
+				// Whitespace acceptable after <<[-] operator
+				//
+				if (HereDoc.State == 0) { // '<<' encountered
+					HereDoc.Quote = sc.chNext;
+					HereDoc.Quoted = false;
+					HereDoc.DelimiterLength = 0;
+					HereDoc.Delimiter[HereDoc.DelimiterLength] = '\0';
+					if (sc.chNext == '\'' || sc.chNext == '\"') {	// a quoted here-doc delimiter (' or ")
+						sc.Forward();
+						HereDoc.Quoted = true;
+						HereDoc.State = 1;
+					} else if (!HereDoc.Indent && sc.chNext == '-') {	// <<- indent case
+						HereDoc.Indent = true;
+					} else if (setHereDoc.Contains(sc.chNext)) {
+						// an unquoted here-doc delimiter, no special handling
+						// TODO check what exactly bash considers part of the delim
+						HereDoc.State = 1;
+					} else if (sc.chNext == '<') {	// HERE string <<<
+						sc.Forward();
+						sc.ForwardSetState(SCE_SH_DEFAULT);
+					} else if (IsASpace(sc.chNext)) {
+						// eat whitespace
+					} else if (setLeftShift.Contains(sc.chNext)) {
+						// left shift << or <<= operator cases
+						sc.ChangeState(SCE_SH_OPERATOR);
+						sc.ForwardSetState(SCE_SH_DEFAULT);
+					} else {
+						// symbols terminates; deprecated zero-length delimiter
+						HereDoc.State = 1;
+					}
+				} else if (HereDoc.State == 1) { // collect the delimiter
+					if (HereDoc.Quoted) { // a quoted here-doc delimiter
+						if (sc.ch == HereDoc.Quote) { // closing quote => end of delimiter
+							sc.ForwardSetState(SCE_SH_DEFAULT);
+						} else {
+							if (sc.ch == '\\' && sc.chNext == HereDoc.Quote) { // escaped quote
+								sc.Forward();
+							}
+							HereDoc.Append(sc.ch);
+						}
+					} else { // an unquoted here-doc delimiter
+						if (setHereDoc2.Contains(sc.ch)) {
+							HereDoc.Append(sc.ch);
+						} else if (sc.ch == '\\') {
+							// skip escape prefix
+						} else {
+							sc.SetState(SCE_SH_DEFAULT);
+						}
+					}
+					if (HereDoc.DelimiterLength >= HERE_DELIM_MAX - 1) {	// force blowup
+						sc.SetState(SCE_SH_ERROR);
+						HereDoc.State = 0;
+					}
+				}
+				break;
+			case SCE_SH_HERE_Q:
+				// HereDoc.State == 2
+				if (sc.atLineStart) {
+					sc.SetState(SCE_SH_HERE_Q);
+					int prefixws = 0;
+					while (IsASpace(sc.ch) && !sc.atLineEnd) {	// whitespace prefix
+						sc.Forward();
+						prefixws++;
+					}
+					if (prefixws > 0)
+						sc.SetState(SCE_SH_HERE_Q);
+					while (!sc.atLineEnd) {
+						sc.Forward();
+					}
+					char s[HERE_DELIM_MAX];
+					sc.GetCurrent(s, sizeof(s));
+					if (strcmp(HereDoc.Delimiter, s) == 0) {
+						if ((prefixws > 0 && HereDoc.Indent) ||	// indentation rule
+							(prefixws == 0 && !HereDoc.Indent)) {
+							sc.SetState(SCE_SH_DEFAULT);
+							break;
+						}
+					}
+				}
+				break;
+			case SCE_SH_SCALAR:	// variable names
+				if (!setParam.Contains(sc.ch)) {
+					if (sc.LengthCurrent() == 1) {
+						// Special variable: $(, $_ etc.
+						sc.ForwardSetState(SCE_SH_DEFAULT);
+					} else {
+						sc.SetState(SCE_SH_DEFAULT);
+					}
+				}
+				break;
+			case SCE_SH_STRING:	// delimited styles
+			case SCE_SH_CHARACTER:
+			case SCE_SH_BACKTICKS:
+			case SCE_SH_PARAM:
+				if (sc.ch == '\\' && Quote.Up != '\\') {
+					sc.Forward();
+				} else if (sc.ch == Quote.Down) {
+					Quote.Count--;
+					if (Quote.Count == 0) {
+						sc.ForwardSetState(SCE_SH_DEFAULT);
+					}
+				} else if (sc.ch == Quote.Up) {
+					Quote.Count++;
+				}
+				break;
+		}
+
+		// Must check end of HereDoc state 1 before default state is handled
+		if (HereDoc.State == 1 && sc.atLineEnd) {
+			// Begin of here-doc (the line after the here-doc delimiter):
+			// Lexically, the here-doc starts from the next line after the >>, but the
+			// first line of here-doc seem to follow the style of the last EOL sequence
+			HereDoc.State = 2;
+			if (HereDoc.Quoted) {
+				if (sc.state == SCE_SH_HERE_DELIM) {
+					// Missing quote at end of string! We are stricter than bash.
+					// Colour here-doc anyway while marking this bit as an error.
+					sc.ChangeState(SCE_SH_ERROR);
+				}
+				// HereDoc.Quote always == '\''
+			}
+			sc.SetState(SCE_SH_HERE_Q);
+		}
+
+		// Determine if a new state should be entered.
+		if (sc.state == SCE_SH_DEFAULT) {
+			if (sc.ch == '\\') {	// escaped character
+				sc.SetState(SCE_SH_IDENTIFIER);
+			} else if (IsADigit(sc.ch)) {
+				sc.SetState(SCE_SH_NUMBER);
+				numBase = BASH_BASE_DECIMAL;
+				if (sc.ch == '0') {	// hex,octal
+					if (sc.chNext == 'x' || sc.chNext == 'X') {
+						numBase = BASH_BASE_HEX;
+						sc.Forward();
+					} else if (IsADigit(sc.chNext)) {
+#ifdef PEDANTIC_OCTAL
+						numBase = BASH_BASE_OCTAL;
+#else
+						numBase = BASH_BASE_HEX;
+#endif
+					}
+				}
+			} else if (setWordStart.Contains(sc.ch)) {
+				sc.SetState(SCE_SH_WORD);
+			} else if (sc.ch == '#') {
+				sc.SetState(SCE_SH_COMMENTLINE);
+			} else if (sc.ch == '\"') {
+				sc.SetState(SCE_SH_STRING);
+				Quote.Start(sc.ch);
+			} else if (sc.ch == '\'') {
+				sc.SetState(SCE_SH_CHARACTER);
+				Quote.Start(sc.ch);
+			} else if (sc.ch == '`') {
+				sc.SetState(SCE_SH_BACKTICKS);
+				Quote.Start(sc.ch);
+			} else if (sc.ch == '$') {
+				sc.SetState(SCE_SH_SCALAR);
+				sc.Forward();
+				if (sc.ch == '{') {
+					sc.ChangeState(SCE_SH_PARAM);
+				} else if (sc.ch == '\'') {
+					sc.ChangeState(SCE_SH_CHARACTER);
+				} else if (sc.ch == '"') {
+					sc.ChangeState(SCE_SH_STRING);
+				} else if (sc.ch == '(' || sc.ch == '`') {
+					sc.ChangeState(SCE_SH_BACKTICKS);
+					if (sc.chNext == '(') {	// $(( is lexed as operator
+						sc.ChangeState(SCE_SH_OPERATOR);
+					}
+				} else {
+					continue;	// scalar has no delimiter pair
+				}
+				// fallthrough, open delim for $[{'"(`]
+				Quote.Start(sc.ch);
+			} else if (sc.Match('<', '<')) {
+				sc.SetState(SCE_SH_HERE_DELIM);
+				HereDoc.State = 0;
+				HereDoc.Indent = false;
+			} else if (sc.ch == '-'	&&	// one-char file test operators
+					   setSingleCharOp.Contains(sc.chNext) &&
+					   !setWord.Contains(sc.GetRelative(2)) &&
+					   IsASpace(sc.chPrev)) {
+				sc.SetState(SCE_SH_WORD);
+				sc.Forward();
+			} else if (setBashOperator.Contains(sc.ch)) {
+				sc.SetState(SCE_SH_OPERATOR);
+			}
+		}
+	}
+	sc.Complete();
+}
+
+static bool IsCommentLine(int line, Accessor &styler) {
+	int pos = styler.LineStart(line);
+	int eol_pos = styler.LineStart(line + 1) - 1;
+	for (int i = pos; i < eol_pos; i++) {
+		char ch = styler[i];
+		if (ch == '#')
+			return true;
+		else if (ch != ' ' && ch != '\t')
+			return false;
+	}
+	return false;
+}
+
+static void FoldBashDoc(unsigned int startPos, int length, int, WordList *[],
+						Accessor &styler) {
+	bool foldComment = styler.GetPropertyInt("fold.comment") != 0;
+	bool foldCompact = styler.GetPropertyInt("fold.compact", 1) != 0;
+	unsigned int endPos = startPos + length;
+	int visibleChars = 0;
+	int lineCurrent = styler.GetLine(startPos);
+	int levelPrev = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK;
+	int levelCurrent = levelPrev;
+	char chNext = styler[startPos];
+	int styleNext = styler.StyleAt(startPos);
+	for (unsigned int i = startPos; i < endPos; i++) {
+		char ch = chNext;
+		chNext = styler.SafeGetCharAt(i + 1);
+		int style = styleNext;
+		styleNext = styler.StyleAt(i + 1);
+		bool atEOL = (ch == '\r' && chNext != '\n') || (ch == '\n');
+		// Comment folding
+		if (foldComment && atEOL && IsCommentLine(lineCurrent, styler))
+		{
+			if (!IsCommentLine(lineCurrent - 1, styler)
+				&& IsCommentLine(lineCurrent + 1, styler))
+				levelCurrent++;
+			else if (IsCommentLine(lineCurrent - 1, styler)
+					 && !IsCommentLine(lineCurrent + 1, styler))
+				levelCurrent--;
+		}
+		if (style == SCE_SH_OPERATOR) {
+			if (ch == '{') {
+				levelCurrent++;
+			} else if (ch == '}') {
+				levelCurrent--;
+			}
+		}
+		if (atEOL) {
+			int lev = levelPrev;
+			if (visibleChars == 0 && foldCompact)
+				lev |= SC_FOLDLEVELWHITEFLAG;
+			if ((levelCurrent > levelPrev) && (visibleChars > 0))
+				lev |= SC_FOLDLEVELHEADERFLAG;
+			if (lev != styler.LevelAt(lineCurrent)) {
+				styler.SetLevel(lineCurrent, lev);
+			}
+			lineCurrent++;
+			levelPrev = levelCurrent;
+			visibleChars = 0;
+		}
+		if (!isspacechar(ch))
+			visibleChars++;
+	}
+	// Fill in the real level of the next line, keeping the current flags as they will be filled in later
+	int flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK;
+	styler.SetLevel(lineCurrent, levelPrev | flagsNext);
+}
+
+static const char * const bashWordListDesc[] = {
+	"Keywords",
+	0
+};
+
+LexerModule lmBash(SCLEX_BASH, ColouriseBashDoc, "bash", FoldBashDoc, bashWordListDesc);

Added: trunk/plugins/scintilla/scintilla/LexBasic.cxx
==============================================================================
--- (empty file)
+++ trunk/plugins/scintilla/scintilla/LexBasic.cxx	Wed Apr  8 07:16:46 2009
@@ -0,0 +1,373 @@
+// Scintilla source code edit control
+/** @file LexBasic.cxx
+ ** Lexer for BlitzBasic and PureBasic.
+ **/
+// Copyright 1998-2003 by Neil Hodgson <neilh scintilla org>
+// The License.txt file describes the conditions under which this software may be distributed.
+
+// This tries to be a unified Lexer/Folder for all the BlitzBasic/BlitzMax/PurBasic basics
+// and derivatives. Once they diverge enough, might want to split it into multiple
+// lexers for more code clearity.
+//
+// Mail me (elias <at> users <dot> sf <dot> net) for any bugs.
+
+// Folding only works for simple things like functions or types.
+
+// You may want to have a look at my ctags lexer as well, if you additionally to coloring
+// and folding need to extract things like label tags in your editor.
+
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+#include <ctype.h>
+#include <stdarg.h>
+
+#include "Platform.h"
+
+#include "PropSet.h"
+#include "Accessor.h"
+#include "StyleContext.h"
+#include "KeyWords.h"
+#include "Scintilla.h"
+#include "SciLexer.h"
+
+#ifdef SCI_NAMESPACE
+using namespace Scintilla;
+#endif
+
+/* Bits:
+ * 1  - whitespace
+ * 2  - operator
+ * 4  - identifier
+ * 8  - decimal digit
+ * 16 - hex digit
+ * 32 - bin digit
+ */
+static int character_classification[128] =
+{
+    0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  1,  0,  0,  1,  0,  0,
+    0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+    1,  2,  0,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  10, 2,
+    60, 60, 28, 28, 28, 28, 28, 28, 28, 28, 2,  2,  2,  2,  2,  2,
+    2,  20, 20, 20, 20, 20, 20, 4,  4,  4,  4,  4,  4,  4,  4,  4,
+    4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  2,  2,  2,  2,  4,
+    2,  20, 20, 20, 20, 20, 20, 4,  4,  4,  4,  4,  4,  4,  4,  4,
+    4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  2,  2,  2,  2,  0
+};
+
+static bool IsSpace(int c) {
+	return c < 128 && (character_classification[c] & 1);
+}
+
+static bool IsOperator(int c) {
+	return c < 128 && (character_classification[c] & 2);
+}
+
+static bool IsIdentifier(int c) {
+	return c < 128 && (character_classification[c] & 4);
+}
+
+static bool IsDigit(int c) {
+	return c < 128 && (character_classification[c] & 8);
+}
+
+static bool IsHexDigit(int c) {
+	return c < 128 && (character_classification[c] & 16);
+}
+
+static bool IsBinDigit(int c) {
+	return c < 128 && (character_classification[c] & 32);
+}
+
+static int LowerCase(int c)
+{
+	if (c >= 'A' && c <= 'Z')
+		return 'a' + c - 'A';
+	return c;
+}
+
+static void ColouriseBasicDoc(unsigned int startPos, int length, int initStyle,
+                           WordList *keywordlists[], Accessor &styler, char comment_char) {
+	bool wasfirst = true, isfirst = true; // true if first token in a line
+	styler.StartAt(startPos);
+
+	StyleContext sc(startPos, length, initStyle, styler);
+
+	// Can't use sc.More() here else we miss the last character
+	for (; ; sc.Forward()) {
+		if (sc.state == SCE_B_IDENTIFIER) {
+			if (!IsIdentifier(sc.ch)) {
+				// Labels
+				if (wasfirst && sc.Match(':')) {
+					sc.ChangeState(SCE_B_LABEL);
+					sc.ForwardSetState(SCE_B_DEFAULT);
+				} else {
+					char s[100];
+					int kstates[4] = {
+						SCE_B_KEYWORD,
+						SCE_B_KEYWORD2,
+						SCE_B_KEYWORD3,
+						SCE_B_KEYWORD4,
+					};
+					sc.GetCurrentLowered(s, sizeof(s));
+					for (int i = 0; i < 4; i++) {
+						if (keywordlists[i]->InList(s)) {
+							sc.ChangeState(kstates[i]);
+						}
+					}
+					// Types, must set them as operator else they will be
+					// matched as number/constant
+					if (sc.Match('.') || sc.Match('$') || sc.Match('%') ||
+						sc.Match('#')) {
+						sc.SetState(SCE_B_OPERATOR);
+					} else {
+						sc.SetState(SCE_B_DEFAULT);
+					}
+				}
+			}
+		} else if (sc.state == SCE_B_OPERATOR) {
+			if (!IsOperator(sc.ch) || sc.Match('#'))
+				sc.SetState(SCE_B_DEFAULT);
+		} else if (sc.state == SCE_B_LABEL) {
+			if (!IsIdentifier(sc.ch))
+				sc.SetState(SCE_B_DEFAULT);
+		} else if (sc.state == SCE_B_CONSTANT) {
+			if (!IsIdentifier(sc.ch))
+				sc.SetState(SCE_B_DEFAULT);
+		} else if (sc.state == SCE_B_NUMBER) {
+			if (!IsDigit(sc.ch))
+				sc.SetState(SCE_B_DEFAULT);
+		} else if (sc.state == SCE_B_HEXNUMBER) {
+			if (!IsHexDigit(sc.ch))
+				sc.SetState(SCE_B_DEFAULT);
+		} else if (sc.state == SCE_B_BINNUMBER) {
+			if (!IsBinDigit(sc.ch))
+				sc.SetState(SCE_B_DEFAULT);
+		} else if (sc.state == SCE_B_STRING) {
+			if (sc.ch == '"') {
+				sc.ForwardSetState(SCE_B_DEFAULT);
+			}
+			if (sc.atLineEnd) {
+				sc.ChangeState(SCE_B_ERROR);
+				sc.SetState(SCE_B_DEFAULT);
+			}
+		} else if (sc.state == SCE_B_COMMENT || sc.state == SCE_B_PREPROCESSOR) {
+			if (sc.atLineEnd) {
+				sc.SetState(SCE_B_DEFAULT);
+			}
+		}
+
+		if (sc.atLineStart)
+			isfirst = true;
+
+		if (sc.state == SCE_B_DEFAULT || sc.state == SCE_B_ERROR) {
+			if (isfirst && sc.Match('.')) {
+				sc.SetState(SCE_B_LABEL);
+			} else if (isfirst && sc.Match('#')) {
+				wasfirst = isfirst;
+				sc.SetState(SCE_B_IDENTIFIER);
+			} else if (sc.Match(comment_char)) {
+				// Hack to make deprecated QBASIC '$Include show
+				// up in freebasic with SCE_B_PREPROCESSOR.
+				if (comment_char == '\'' && sc.Match(comment_char, '$'))
+					sc.SetState(SCE_B_PREPROCESSOR);
+				else
+					sc.SetState(SCE_B_COMMENT);
+			} else if (sc.Match('"')) {
+				sc.SetState(SCE_B_STRING);
+			} else if (IsDigit(sc.ch)) {
+				sc.SetState(SCE_B_NUMBER);
+			} else if (sc.Match('$')) {
+				sc.SetState(SCE_B_HEXNUMBER);
+			} else if (sc.Match('%')) {
+				sc.SetState(SCE_B_BINNUMBER);
+			} else if (sc.Match('#')) {
+				sc.SetState(SCE_B_CONSTANT);
+			} else if (IsOperator(sc.ch)) {
+				sc.SetState(SCE_B_OPERATOR);
+			} else if (IsIdentifier(sc.ch)) {
+				wasfirst = isfirst;
+				sc.SetState(SCE_B_IDENTIFIER);
+			} else if (!IsSpace(sc.ch)) {
+				sc.SetState(SCE_B_ERROR);
+			}
+		}
+
+		if (!IsSpace(sc.ch))
+			isfirst = false;
+
+		if (!sc.More())
+			break;
+	}
+	sc.Complete();
+}
+
+static int CheckBlitzFoldPoint(char const *token, int &level) {
+	if (!strcmp(token, "function") ||
+		!strcmp(token, "type")) {
+		level |= SC_FOLDLEVELHEADERFLAG;
+		return 1;
+	}
+	if (!strcmp(token, "end function") ||
+		!strcmp(token, "end type")) {
+		return -1;
+	}
+	return 0;
+}
+
+static int CheckPureFoldPoint(char const *token, int &level) {
+	if (!strcmp(token, "procedure") ||
+		!strcmp(token, "enumeration") ||
+		!strcmp(token, "interface") ||
+		!strcmp(token, "structure")) {
+		level |= SC_FOLDLEVELHEADERFLAG;
+		return 1;
+	}
+	if (!strcmp(token, "endprocedure") ||
+		!strcmp(token, "endenumeration") ||
+		!strcmp(token, "endinterface") ||
+		!strcmp(token, "endstructure")) {
+		return -1;
+	}
+	return 0;
+}
+
+static int CheckFreeFoldPoint(char const *token, int &level) {
+	if (!strcmp(token, "function") ||
+		!strcmp(token, "sub") ||
+		!strcmp(token, "type")) {
+		level |= SC_FOLDLEVELHEADERFLAG;
+		return 1;
+	}
+	if (!strcmp(token, "end function") ||
+		!strcmp(token, "end sub") ||
+		!strcmp(token, "end type")) {
+		return -1;
+	}
+	return 0;
+}
+
+static void FoldBasicDoc(unsigned int startPos, int length,
+	Accessor &styler, int (*CheckFoldPoint)(char const *, int &)) {
+	int line = styler.GetLine(startPos);
+	int level = styler.LevelAt(line);
+	int go = 0, done = 0;
+	int endPos = startPos + length;
+	char word[256];
+	int wordlen = 0;
+	int i;
+        bool foldCompact = styler.GetPropertyInt("fold.compact", 1) != 0;
+	// Scan for tokens at the start of the line (they may include
+	// whitespace, for tokens like "End Function"
+	for (i = startPos; i < endPos; i++) {
+		int c = styler.SafeGetCharAt(i);
+		if (!done && !go) {
+			if (wordlen) { // are we scanning a token already?
+				word[wordlen] = static_cast<char>(LowerCase(c));
+				if (!IsIdentifier(c)) { // done with token
+					word[wordlen] = '\0';
+					go = CheckFoldPoint(word, level);
+					if (!go) {
+						// Treat any whitespace as single blank, for
+						// things like "End   Function".
+						if (IsSpace(c) && IsIdentifier(word[wordlen - 1])) {
+							word[wordlen] = ' ';
+							if (wordlen < 255)
+								wordlen++;
+						}
+						else // done with this line
+							done = 1;
+					}
+				} else if (wordlen < 255) {
+					wordlen++;
+				}
+			} else { // start scanning at first non-whitespace character
+				if (!IsSpace(c)) {
+					if (IsIdentifier(c)) {
+						word[0] = static_cast<char>(LowerCase(c));
+						wordlen = 1;
+					} else // done with this line
+						done = 1;
+				}
+			}
+		}
+		if (c == '\n') { // line end
+			if (!done && wordlen == 0 && foldCompact) // line was only space
+				level |= SC_FOLDLEVELWHITEFLAG;
+			if (level != styler.LevelAt(line))
+				styler.SetLevel(line, level);
+			level += go;
+			line++;
+			// reset state
+			wordlen = 0;
+			level &= ~SC_FOLDLEVELHEADERFLAG;
+			level &= ~SC_FOLDLEVELWHITEFLAG;
+			go = 0;
+			done = 0;
+		}
+	}
+}
+
+static void ColouriseBlitzBasicDoc(unsigned int startPos, int length, int initStyle,
+                           WordList *keywordlists[], Accessor &styler) {
+	ColouriseBasicDoc(startPos, length, initStyle, keywordlists, styler, ';');
+}
+
+static void ColourisePureBasicDoc(unsigned int startPos, int length, int initStyle,
+                           WordList *keywordlists[], Accessor &styler) {
+	ColouriseBasicDoc(startPos, length, initStyle, keywordlists, styler, ';');
+}
+
+static void ColouriseFreeBasicDoc(unsigned int startPos, int length, int initStyle,
+                           WordList *keywordlists[], Accessor &styler) {
+	ColouriseBasicDoc(startPos, length, initStyle, keywordlists, styler, '\'');
+}
+
+static void FoldBlitzBasicDoc(unsigned int startPos, int length, int,
+	WordList *[], Accessor &styler) {
+	FoldBasicDoc(startPos, length, styler, CheckBlitzFoldPoint);
+}
+
+static void FoldPureBasicDoc(unsigned int startPos, int length, int,
+	WordList *[], Accessor &styler) {
+	FoldBasicDoc(startPos, length, styler, CheckPureFoldPoint);
+}
+
+static void FoldFreeBasicDoc(unsigned int startPos, int length, int,
+	WordList *[], Accessor &styler) {
+	FoldBasicDoc(startPos, length, styler, CheckFreeFoldPoint);
+}
+
+static const char * const blitzbasicWordListDesc[] = {
+	"BlitzBasic Keywords",
+	"user1",
+	"user2",
+	"user3",
+	0
+};
+
+static const char * const purebasicWordListDesc[] = {
+	"PureBasic Keywords",
+	"PureBasic PreProcessor Keywords",
+	"user defined 1",
+	"user defined 2",
+	0
+};
+
+static const char * const freebasicWordListDesc[] = {
+	"FreeBasic Keywords",
+	"FreeBasic PreProcessor Keywords",
+	"user defined 1",
+	"user defined 2",
+	0
+};
+
+LexerModule lmBlitzBasic(SCLEX_BLITZBASIC, ColouriseBlitzBasicDoc, "blitzbasic",
+	FoldBlitzBasicDoc, blitzbasicWordListDesc);
+
+LexerModule lmPureBasic(SCLEX_PUREBASIC, ColourisePureBasicDoc, "purebasic",
+	FoldPureBasicDoc, purebasicWordListDesc);
+
+LexerModule lmFreeBasic(SCLEX_FREEBASIC, ColouriseFreeBasicDoc, "freebasic",
+	FoldFreeBasicDoc, freebasicWordListDesc);
+

Added: trunk/plugins/scintilla/scintilla/LexCaml.cxx
==============================================================================
--- (empty file)
+++ trunk/plugins/scintilla/scintilla/LexCaml.cxx	Wed Apr  8 07:16:46 2009
@@ -0,0 +1,403 @@
+// Scintilla source code edit control
+/** @file LexCaml.cxx
+ ** Lexer for Objective Caml.
+ **/
+// Copyright 2005 by Robert Roessler <robertr rftp com>
+// The License.txt file describes the conditions under which this software may be distributed.
+/*	Release History
+	20050204 Initial release.
+	20050205 Quick compiler standards/"cleanliness" adjustment.
+	20050206 Added cast for IsLeadByte().
+	20050209 Changes to "external" build support.
+	20050306 Fix for 1st-char-in-doc "corner" case.
+	20050502 Fix for [harmless] one-past-the-end coloring.
+	20050515 Refined numeric token recognition logic.
+	20051125 Added 2nd "optional" keywords class.
+	20051129 Support "magic" (read-only) comments for RCaml.
+	20051204 Swtich to using StyleContext infrastructure.
+*/
+
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include <stdio.h>
+#include <stdarg.h>
+
+#include "Platform.h"
+
+#include "PropSet.h"
+#include "Accessor.h"
+#include "StyleContext.h"
+#include "KeyWords.h"
+#include "Scintilla.h"
+#include "SciLexer.h"
+
+//	Since the Microsoft __iscsym[f] funcs are not ANSI...
+inline int  iscaml(int c) {return isalnum(c) || c == '_';}
+inline int iscamlf(int c) {return isalpha(c) || c == '_';}
+inline int iscamld(int c) {return isdigit(c) || c == '_';}
+
+static const int baseT[24] = {
+	0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,	/* A - L */
+	0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0,16	/* M - X */
+};
+
+#ifdef SCI_NAMESPACE
+using namespace Scintilla;
+#endif
+
+#ifdef BUILD_AS_EXTERNAL_LEXER
+/*
+	(actually seems to work!)
+*/
+#include "WindowAccessor.h"
+#include "ExternalLexer.h"
+
+#if PLAT_WIN
+#include <windows.h>
+#endif
+
+static void ColouriseCamlDoc(
+	unsigned int startPos, int length,
+	int initStyle,
+	WordList *keywordlists[],
+	Accessor &styler);
+
+static void FoldCamlDoc(
+	unsigned int startPos, int length,
+	int initStyle,
+	WordList *keywordlists[],
+	Accessor &styler);
+
+static void InternalLexOrFold(int lexOrFold, unsigned int startPos, int length,
+	int initStyle, char *words[], WindowID window, char *props);
+
+static const char* LexerName = "caml";
+
+#ifdef TRACE
+void Platform::DebugPrintf(const char *format, ...) {
+	char buffer[2000];
+	va_list pArguments;
+	va_start(pArguments, format);
+	vsprintf(buffer,format,pArguments);
+	va_end(pArguments);
+	Platform::DebugDisplay(buffer);
+}
+#else
+void Platform::DebugPrintf(const char *, ...) {
+}
+#endif
+
+bool Platform::IsDBCSLeadByte(int codePage, char ch) {
+	return ::IsDBCSLeadByteEx(codePage, ch) != 0;
+}
+
+long Platform::SendScintilla(WindowID w, unsigned int msg, unsigned long wParam, long lParam) {
+	return ::SendMessage(reinterpret_cast<HWND>(w), msg, wParam, lParam);
+}
+
+long Platform::SendScintillaPointer(WindowID w, unsigned int msg, unsigned long wParam, void *lParam) {
+	return ::SendMessage(reinterpret_cast<HWND>(w), msg, wParam,
+		reinterpret_cast<LPARAM>(lParam));
+}
+
+void EXT_LEXER_DECL Fold(unsigned int lexer, unsigned int startPos, int length,
+	int initStyle, char *words[], WindowID window, char *props)
+{
+	// below useless evaluation(s) to supress "not used" warnings
+	lexer;
+	// build expected data structures and do the Fold
+	InternalLexOrFold(1, startPos, length, initStyle, words, window, props);
+
+}
+
+int EXT_LEXER_DECL GetLexerCount()
+{
+	return 1;	// just us [Objective] Caml lexers here!
+}
+
+void EXT_LEXER_DECL GetLexerName(unsigned int Index, char *name, int buflength)
+{
+	// below useless evaluation(s) to supress "not used" warnings
+	Index;
+	// return as much of our lexer name as will fit (what's up with Index?)
+	if (buflength > 0) {
+		buflength--;
+		int n = strlen(LexerName);
+		if (n > buflength)
+			n = buflength;
+		memcpy(name, LexerName, n), name[n] = '\0';
+	}
+}
+
+void EXT_LEXER_DECL Lex(unsigned int lexer, unsigned int startPos, int length,
+	int initStyle, char *words[], WindowID window, char *props)
+{
+	// below useless evaluation(s) to supress "not used" warnings
+	lexer;
+	// build expected data structures and do the Lex
+	InternalLexOrFold(0, startPos, length, initStyle, words, window, props);
+}
+
+static void InternalLexOrFold(int foldOrLex, unsigned int startPos, int length,
+	int initStyle, char *words[], WindowID window, char *props)
+{
+	// create and initialize a WindowAccessor (including contained PropSet)
+	PropSet ps;
+	ps.SetMultiple(props);
+	WindowAccessor wa(window, ps);
+	// create and initialize WordList(s)
+	int nWL = 0;
+	for (; words[nWL]; nWL++) ;	// count # of WordList PTRs needed
+	WordList** wl = new WordList* [nWL + 1];// alloc WordList PTRs
+	int i = 0;
+	for (; i < nWL; i++) {
+		wl[i] = new WordList();	// (works or THROWS bad_alloc EXCEPTION)
+		wl[i]->Set(words[i]);
+	}
+	wl[i] = 0;
+	// call our "internal" folder/lexer (... then do Flush!)
+	if (foldOrLex)
+		FoldCamlDoc(startPos, length, initStyle, wl, wa);
+	else
+		ColouriseCamlDoc(startPos, length, initStyle, wl, wa);
+	wa.Flush();
+	// clean up before leaving
+	for (i = nWL - 1; i >= 0; i--)
+		delete wl[i];
+	delete [] wl;
+}
+
+static
+#endif	/* BUILD_AS_EXTERNAL_LEXER */
+
+void ColouriseCamlDoc(
+	unsigned int startPos, int length,
+	int initStyle,
+	WordList *keywordlists[],
+	Accessor &styler)
+{
+	// initialize styler
+	StyleContext sc(startPos, length, initStyle, styler);
+	// set up [initial] state info (terminating states that shouldn't "bleed")
+	int nesting = 0;
+	if (sc.state < SCE_CAML_STRING)
+		sc.state = SCE_CAML_DEFAULT;
+	if (sc.state >= SCE_CAML_COMMENT)
+		nesting = (sc.state & 0x0f) - SCE_CAML_COMMENT;
+
+	int chBase = 0, chToken = 0, chLit = 0;
+	WordList& keywords  = *keywordlists[0];
+	WordList& keywords2 = *keywordlists[1];
+	WordList& keywords3 = *keywordlists[2];
+	const int useMagic = styler.GetPropertyInt("lexer.caml.magic", 0);
+
+	// foreach char in range...
+	while (sc.More()) {
+		// set up [per-char] state info
+		int state2 = -1;		// (ASSUME no state change)
+		int chColor = sc.currentPos - 1;// (ASSUME standard coloring range)
+		bool advance = true;	// (ASSUME scanner "eats" 1 char)
+
+		// step state machine
+		switch (sc.state & 0x0f) {
+		case SCE_CAML_DEFAULT:
+			chToken = sc.currentPos;	// save [possible] token start (JIC)
+			// it's wide open; what do we have?
+			if (iscamlf(sc.ch))
+				state2 = SCE_CAML_IDENTIFIER;
+			else if (sc.Match('`') && iscamlf(sc.chNext))
+				state2 = SCE_CAML_TAGNAME;
+			else if (sc.Match('#') && isdigit(sc.chNext))
+				state2 = SCE_CAML_LINENUM;
+			else if (isdigit(sc.ch)) {
+				state2 = SCE_CAML_NUMBER, chBase = 10;
+				if (sc.Match('0') && strchr("bBoOxX", sc.chNext))
+					chBase = baseT[tolower(sc.chNext) - 'a'], sc.Forward();
+			} else if (sc.Match('\''))	/* (char literal?) */
+				state2 = SCE_CAML_CHAR, chLit = 0;
+			else if (sc.Match('\"'))
+				state2 = SCE_CAML_STRING;
+			else if (sc.Match('(', '*'))
+				state2 = SCE_CAML_COMMENT,
+					sc.ch = ' ',	// (make SURE "(*)" isn't seen as a closed comment)
+					sc.Forward();
+			else if (strchr("!?~"		/* Caml "prefix-symbol" */
+					"=<>@^|&+-*/$%"		/* Caml "infix-symbol" */
+					"()[]{};,:.#", sc.ch))	/* Caml "bracket" or ;,:.# */
+				state2 = SCE_CAML_OPERATOR;
+			break;
+
+		case SCE_CAML_IDENTIFIER:
+			// [try to] interpret as [additional] identifier char
+			if (!(iscaml(sc.ch) || sc.Match('\''))) {
+				const int n = sc.currentPos - chToken;
+				if (n < 24) {
+					// length is believable as keyword, [re-]construct token
+					char t[24];
+					for (int i = -n; i < 0; i++)
+						t[n + i] = static_cast<char>(sc.GetRelative(i));
+					t[n] = '\0';
+					// special-case "_" token as KEYWORD
+					if ((n == 1 && sc.chPrev == '_') || keywords.InList(t))
+						sc.ChangeState(SCE_CAML_KEYWORD);
+					else if (keywords2.InList(t))
+						sc.ChangeState(SCE_CAML_KEYWORD2);
+					else if (keywords3.InList(t))
+						sc.ChangeState(SCE_CAML_KEYWORD3);
+				}
+				state2 = SCE_CAML_DEFAULT, advance = false;
+			}
+			break;
+
+		case SCE_CAML_TAGNAME:
+			// [try to] interpret as [additional] tagname char
+			if (!(iscaml(sc.ch) || sc.Match('\'')))
+				state2 = SCE_CAML_DEFAULT, advance = false;
+			break;
+
+		/*case SCE_CAML_KEYWORD:
+		case SCE_CAML_KEYWORD2:
+		case SCE_CAML_KEYWORD3:
+			// [try to] interpret as [additional] keyword char
+			if (!iscaml(ch))
+				state2 = SCE_CAML_DEFAULT, advance = false;
+			break;*/
+
+		case SCE_CAML_LINENUM:
+			// [try to] interpret as [additional] linenum directive char
+			if (!isdigit(sc.ch))
+				state2 = SCE_CAML_DEFAULT, advance = false;
+			break;
+
+		case SCE_CAML_OPERATOR: {
+			// [try to] interpret as [additional] operator char
+			const char* o = 0;
+			if (iscaml(sc.ch) || isspace(sc.ch)		   /* ident or whitespace */
+				|| (o = strchr(")]};,\'\"`#", sc.ch),o)/* "termination" chars */
+				|| !strchr("!$%&*+-./:<=>? ^|~", sc.ch)/* "operator" chars */) {
+				// check for INCLUSIVE termination
+				if (o && strchr(")]};,", sc.ch)) {
+					if ((sc.Match(')') && sc.chPrev == '(')
+						|| (sc.Match(']') && sc.chPrev == '['))
+						// special-case "()" and "[]" tokens as KEYWORDS
+						sc.ChangeState(SCE_CAML_KEYWORD);
+					chColor++;
+				} else
+					advance = false;
+				state2 = SCE_CAML_DEFAULT;
+			}
+			break;
+		}
+
+		case SCE_CAML_NUMBER:
+			// [try to] interpret as [additional] numeric literal char
+			// N.B. - improperly accepts "extra" digits in base 2 or 8 literals
+			if (iscamld(sc.ch) || IsADigit(sc.ch, chBase))
+				break;
+			// how about an integer suffix?
+			if ((sc.Match('l') || sc.Match('L') || sc.Match('n'))
+				&& (iscamld(sc.chPrev) || IsADigit(sc.chPrev, chBase)))
+				break;
+			// or a floating-point literal?
+			if (chBase == 10) {
+				// with a decimal point?
+				if (sc.Match('.') && iscamld(sc.chPrev))
+					break;
+				// with an exponent? (I)
+				if ((sc.Match('e') || sc.Match('E'))
+					&& (iscamld(sc.chPrev) || sc.chPrev == '.'))
+					break;
+				// with an exponent? (II)
+				if ((sc.Match('+') || sc.Match('-'))
+					&& (sc.chPrev == 'e' || sc.chPrev == 'E'))
+					break;
+			}
+			// it looks like we have run out of number
+			state2 = SCE_CAML_DEFAULT, advance = false;
+			break;
+
+		case SCE_CAML_CHAR:
+			// [try to] interpret as [additional] char literal char
+			if (sc.Match('\\')) {
+				chLit = 1;	// (definitely IS a char literal)
+				if (sc.chPrev == '\\')
+					sc.ch = ' ';	// (so termination test isn't fooled)
+			// should we be terminating - one way or another?
+			} else if ((sc.Match('\'') && sc.chPrev != '\\') || sc.atLineEnd) {
+				state2 = SCE_CAML_DEFAULT;
+				if (sc.Match('\''))
+					chColor++;
+				else
+					sc.ChangeState(SCE_CAML_IDENTIFIER);
+			// ... maybe a char literal, maybe not
+			} else if (chLit < 1 && sc.currentPos - chToken >= 2)
+				sc.ChangeState(SCE_CAML_IDENTIFIER), advance = false;
+			break;
+
+		case SCE_CAML_STRING:
+			// [try to] interpret as [additional] string literal char
+			if (sc.Match('\\') && sc.chPrev == '\\')
+				sc.ch = ' ';	// (so '\\' doesn't cause us trouble)
+			else if (sc.Match('\"') && sc.chPrev != '\\')
+				state2 = SCE_CAML_DEFAULT, chColor++;
+			break;
+
+		case SCE_CAML_COMMENT:
+		case SCE_CAML_COMMENT1:
+		case SCE_CAML_COMMENT2:
+		case SCE_CAML_COMMENT3:
+			// we're IN a comment - does this start a NESTED comment?
+			if (sc.Match('(', '*'))
+				state2 = sc.state + 1, chToken = sc.currentPos,
+					sc.ch = ' ',	// (make SURE "(*)" isn't seen as a closed comment)
+					sc.Forward(), nesting++;
+			// [try to] interpret as [additional] comment char
+			else if (sc.Match(')') && sc.chPrev == '*') {
+				if (nesting)
+					state2 = (sc.state & 0x0f) - 1, chToken = 0, nesting--;
+				else
+					state2 = SCE_CAML_DEFAULT;
+				chColor++;
+			// enable "magic" (read-only) comment AS REQUIRED
+			} else if (useMagic && sc.currentPos - chToken == 4
+				&& sc.Match('c') && sc.chPrev == 'r' && sc.GetRelative(-2) == '@')
+				sc.state |= 0x10;	// (switch to read-only comment style)
+			break;
+		}
+
+		// handle state change and char coloring as required
+		if (state2 >= 0)
+			styler.ColourTo(chColor, sc.state), sc.ChangeState(state2);
+		// move to next char UNLESS re-scanning current char
+		if (advance)
+			sc.Forward();
+	}
+
+	// do any required terminal char coloring (JIC)
+	sc.Complete();
+}
+
+#ifdef BUILD_AS_EXTERNAL_LEXER
+static
+#endif	/* BUILD_AS_EXTERNAL_LEXER */
+void FoldCamlDoc(
+	unsigned int startPos, int length,
+	int initStyle,
+	WordList *keywordlists[],
+	Accessor &styler)
+{
+	// below useless evaluation(s) to supress "not used" warnings
+	startPos || length || initStyle || keywordlists[0] || styler.Length();
+}
+
+static const char * const camlWordListDesc[] = {
+	"Keywords",		// primary Objective Caml keywords
+	"Keywords2",	// "optional" keywords (typically from Pervasives)
+	"Keywords3",	// "optional" keywords (typically typenames)
+	0
+};
+
+#ifndef BUILD_AS_EXTERNAL_LEXER
+LexerModule lmCaml(SCLEX_CAML, ColouriseCamlDoc, "caml", FoldCamlDoc, camlWordListDesc);
+#endif	/* BUILD_AS_EXTERNAL_LEXER */

Added: trunk/plugins/scintilla/scintilla/LexNsis.cxx
==============================================================================
--- (empty file)
+++ trunk/plugins/scintilla/scintilla/LexNsis.cxx	Wed Apr  8 07:16:46 2009
@@ -0,0 +1,654 @@
+// Scintilla source code edit control
+/** @file LexNsis.cxx
+ ** Lexer for NSIS
+ **/
+// Copyright 2003 - 2005 by Angelo Mandato <angelo [at] spaceblue [dot] com>
+// Last Updated: 03/13/2005
+// The License.txt file describes the conditions under which this software may be distributed.
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include <stdio.h>
+#include <stdarg.h>
+
+#include "Platform.h"
+
+#include "PropSet.h"
+#include "Accessor.h"
+#include "KeyWords.h"
+#include "Scintilla.h"
+#include "SciLexer.h"
+
+#ifdef SCI_NAMESPACE
+using namespace Scintilla;
+#endif
+
+/*
+// located in SciLexer.h
+#define SCLEX_NSIS 43
+
+#define SCE_NSIS_DEFAULT 0
+#define SCE_NSIS_COMMENT 1
+#define SCE_NSIS_STRINGDQ 2
+#define SCE_NSIS_STRINGLQ 3
+#define SCE_NSIS_STRINGRQ 4
+#define SCE_NSIS_FUNCTION 5
+#define SCE_NSIS_VARIABLE 6
+#define SCE_NSIS_LABEL 7
+#define SCE_NSIS_USERDEFINED 8
+#define SCE_NSIS_SECTIONDEF 9
+#define SCE_NSIS_SUBSECTIONDEF 10
+#define SCE_NSIS_IFDEFINEDEF 11
+#define SCE_NSIS_MACRODEF 12
+#define SCE_NSIS_STRINGVAR 13
+#define SCE_NSIS_NUMBER 14
+// ADDED for Scintilla v1.63
+#define SCE_NSIS_SECTIONGROUP 15
+#define SCE_NSIS_PAGEEX 16
+#define SCE_NSIS_FUNCTIONDEF 17
+#define SCE_NSIS_COMMENTBOX 18
+*/
+
+static bool isNsisNumber(char ch)
+{
+  return (ch >= '0' && ch <= '9');
+}
+
+static bool isNsisChar(char ch)
+{
+  return (ch == '.' ) || (ch == '_' ) || isNsisNumber(ch) || (ch >= 'A' && ch <= 'Z') || (ch >= 'a' && ch <= 'z');
+}
+
+static bool isNsisLetter(char ch)
+{
+  return (ch >= 'A' && ch <= 'Z') || (ch >= 'a' && ch <= 'z');
+}
+
+static bool NsisNextLineHasElse(unsigned int start, unsigned int end, Accessor &styler)
+{
+  int nNextLine = -1;
+  for( unsigned int i = start; i < end; i++ )
+  {
+    char cNext = styler.SafeGetCharAt( i );
+    if( cNext == '\n' )
+    {
+      nNextLine = i+1;
+      break;
+    }
+  }
+
+  if( nNextLine == -1 ) // We never foudn the next line...
+    return false;
+
+  for( unsigned int firstChar = nNextLine; firstChar < end; firstChar++ )
+  {
+    char cNext = styler.SafeGetCharAt( firstChar );
+    if( cNext == ' ' )
+      continue;
+    if( cNext == '\t' )
+      continue;
+    if( cNext == '!' )
+    {
+      if( styler.Match(firstChar, "!else") )
+        return true;
+    }
+    break;
+  }
+
+  return false;
+}
+
+static int NsisCmp( const char *s1, const char *s2, bool bIgnoreCase )
+{
+  if( bIgnoreCase )
+     return CompareCaseInsensitive( s1, s2);
+
+  return strcmp( s1, s2 );
+}
+
+static int calculateFoldNsis(unsigned int start, unsigned int end, int foldlevel, Accessor &styler, bool bElse, bool foldUtilityCmd )
+{
+  int style = styler.StyleAt(end);
+
+  // If the word is too long, it is not what we are looking for
+  if( end - start > 20 )
+    return foldlevel;
+
+  if( foldUtilityCmd )
+  {
+    // Check the style at this point, if it is not valid, then return zero
+    if( style != SCE_NSIS_FUNCTIONDEF && style != SCE_NSIS_SECTIONDEF &&
+        style != SCE_NSIS_SUBSECTIONDEF && style != SCE_NSIS_IFDEFINEDEF &&
+        style != SCE_NSIS_MACRODEF && style != SCE_NSIS_SECTIONGROUP &&
+        style != SCE_NSIS_PAGEEX )
+          return foldlevel;
+  }
+  else
+  {
+    if( style != SCE_NSIS_FUNCTIONDEF && style != SCE_NSIS_SECTIONDEF &&
+        style != SCE_NSIS_SUBSECTIONDEF && style != SCE_NSIS_SECTIONGROUP &&
+        style != SCE_NSIS_PAGEEX )
+          return foldlevel;
+  }
+
+  int newFoldlevel = foldlevel;
+  bool bIgnoreCase = false;
+  if( styler.GetPropertyInt("nsis.ignorecase") == 1 )
+    bIgnoreCase = true;
+
+  char s[20]; // The key word we are looking for has atmost 13 characters
+  for (unsigned int i = 0; i < end - start + 1 && i < 19; i++)
+	{
+		s[i] = static_cast<char>( styler[ start + i ] );
+		s[i + 1] = '\0';
+	}
+
+  if( s[0] == '!' )
+  {
+    if( NsisCmp(s, "!ifndef", bIgnoreCase) == 0 || NsisCmp(s, "!ifdef", bIgnoreCase ) == 0 || NsisCmp(s, "!if", bIgnoreCase ) == 0 || NsisCmp(s, "!macro", bIgnoreCase ) == 0 )
+      newFoldlevel++;
+    else if( NsisCmp(s, "!endif", bIgnoreCase) == 0 || NsisCmp(s, "!macroend", bIgnoreCase ) == 0 )
+      newFoldlevel--;
+    else if( bElse && NsisCmp(s, "!else", bIgnoreCase) == 0 )
+      newFoldlevel++;
+  }
+  else
+  {
+    if( NsisCmp(s, "Section", bIgnoreCase ) == 0 || NsisCmp(s, "SectionGroup", bIgnoreCase ) == 0 || NsisCmp(s, "Function", bIgnoreCase) == 0 || NsisCmp(s, "SubSection", bIgnoreCase ) == 0 || NsisCmp(s, "PageEx", bIgnoreCase ) == 0 )
+      newFoldlevel++;
+    else if( NsisCmp(s, "SectionGroupEnd", bIgnoreCase ) == 0 || NsisCmp(s, "SubSectionEnd", bIgnoreCase ) == 0 || NsisCmp(s, "FunctionEnd", bIgnoreCase) == 0 || NsisCmp(s, "SectionEnd", bIgnoreCase ) == 0 || NsisCmp(s, "PageExEnd", bIgnoreCase ) == 0 )
+      newFoldlevel--;
+  }
+
+  return newFoldlevel;
+}
+
+static int classifyWordNsis(unsigned int start, unsigned int end, WordList *keywordLists[], Accessor &styler )
+{
+  bool bIgnoreCase = false;
+  if( styler.GetPropertyInt("nsis.ignorecase") == 1 )
+    bIgnoreCase = true;
+
+  bool bUserVars = false;
+  if( styler.GetPropertyInt("nsis.uservars") == 1 )
+    bUserVars = true;
+
+	char s[100];
+
+	WordList &Functions = *keywordLists[0];
+	WordList &Variables = *keywordLists[1];
+	WordList &Lables = *keywordLists[2];
+	WordList &UserDefined = *keywordLists[3];
+
+	for (unsigned int i = 0; i < end - start + 1 && i < 99; i++)
+	{
+    if( bIgnoreCase )
+      s[i] = static_cast<char>( tolower(styler[ start + i ] ) );
+    else
+		  s[i] = static_cast<char>( styler[ start + i ] );
+		s[i + 1] = '\0';
+	}
+
+	// Check for special words...
+	if( NsisCmp(s, "!macro", bIgnoreCase ) == 0 || NsisCmp(s, "!macroend", bIgnoreCase) == 0 ) // Covers !micro and !microend
+		return SCE_NSIS_MACRODEF;
+
+	if( NsisCmp(s, "!ifdef", bIgnoreCase ) == 0 ||  NsisCmp(s, "!ifndef", bIgnoreCase) == 0 ||  NsisCmp(s, "!endif", bIgnoreCase) == 0 )
+		return SCE_NSIS_IFDEFINEDEF;
+
+  if( NsisCmp(s, "!else", bIgnoreCase ) == 0 ) // ||  NsisCmp(s, "!ifndef", bIgnoreCase) == 0 ||  NsisCmp(s, "!endif", bIgnoreCase) == 0 )
+		return SCE_NSIS_IFDEFINEDEF;
+
+  if( NsisCmp(s, "!if", bIgnoreCase ) == 0 )
+		return SCE_NSIS_IFDEFINEDEF;
+
+  if( NsisCmp(s, "SectionGroup", bIgnoreCase) == 0 || NsisCmp(s, "SectionGroupEnd", bIgnoreCase) == 0 ) // Covers SectionGroup and SectionGroupEnd
+    return SCE_NSIS_SECTIONGROUP;
+
+	if( NsisCmp(s, "Section", bIgnoreCase ) == 0 || NsisCmp(s, "SectionEnd", bIgnoreCase) == 0 ) // Covers Section and SectionEnd
+		return SCE_NSIS_SECTIONDEF;
+
+	if( NsisCmp(s, "SubSection", bIgnoreCase) == 0 || NsisCmp(s, "SubSectionEnd", bIgnoreCase) == 0 ) // Covers SubSection and SubSectionEnd
+		return SCE_NSIS_SUBSECTIONDEF;
+
+  if( NsisCmp(s, "PageEx", bIgnoreCase) == 0 || NsisCmp(s, "PageExEnd", bIgnoreCase) == 0 ) // Covers PageEx and PageExEnd
+    return SCE_NSIS_PAGEEX;
+
+	if( NsisCmp(s, "Function", bIgnoreCase) == 0 || NsisCmp(s, "FunctionEnd", bIgnoreCase) == 0 ) // Covers Function and FunctionEnd
+		return SCE_NSIS_FUNCTIONDEF;
+
+	if ( Functions.InList(s) )
+		return SCE_NSIS_FUNCTION;
+
+	if ( Variables.InList(s) )
+		return SCE_NSIS_VARIABLE;
+
+	if ( Lables.InList(s) )
+		return SCE_NSIS_LABEL;
+
+	if( UserDefined.InList(s) )
+		return SCE_NSIS_USERDEFINED;
+
+	if( strlen(s) > 3 )
+	{
+		if( s[1] == '{' && s[strlen(s)-1] == '}' )
+			return SCE_NSIS_VARIABLE;
+	}
+
+  // See if the variable is a user defined variable
+  if( s[0] == '$' && bUserVars )
+  {
+    bool bHasSimpleNsisChars = true;
+    for (unsigned int j = 1; j < end - start + 1 && j < 99; j++)
+	  {
+      if( !isNsisChar( s[j] ) )
+      {
+        bHasSimpleNsisChars = false;
+        break;
+      }
+	  }
+
+    if( bHasSimpleNsisChars )
+      return SCE_NSIS_VARIABLE;
+  }
+
+  // To check for numbers
+  if( isNsisNumber( s[0] ) )
+  {
+    bool bHasSimpleNsisNumber = true;
+    for (unsigned int j = 1; j < end - start + 1 && j < 99; j++)
+	  {
+      if( !isNsisNumber( s[j] ) )
+      {
+        bHasSimpleNsisNumber = false;
+        break;
+      }
+	  }
+
+    if( bHasSimpleNsisNumber )
+      return SCE_NSIS_NUMBER;
+  }
+
+	return SCE_NSIS_DEFAULT;
+}
+
+static void ColouriseNsisDoc(unsigned int startPos, int length, int, WordList *keywordLists[], Accessor &styler)
+{
+	int state = SCE_NSIS_DEFAULT;
+  if( startPos > 0 )
+    state = styler.StyleAt(startPos-1); // Use the style from the previous line, usually default, but could be commentbox
+
+	styler.StartAt( startPos );
+	styler.GetLine( startPos );
+
+	unsigned int nLengthDoc = startPos + length;
+	styler.StartSegment( startPos );
+
+	char cCurrChar;
+	bool bVarInString = false;
+  bool bClassicVarInString = false;
+
+	unsigned int i;
+	for( i = startPos; i < nLengthDoc; i++ )
+	{
+		cCurrChar = styler.SafeGetCharAt( i );
+		char cNextChar = styler.SafeGetCharAt(i+1);
+
+		switch(state)
+		{
+			case SCE_NSIS_DEFAULT:
+				if( cCurrChar == ';' || cCurrChar == '#' ) // we have a comment line
+				{
+					styler.ColourTo(i-1, state );
+					state = SCE_NSIS_COMMENT;
+					break;
+				}
+				if( cCurrChar == '"' )
+				{
+					styler.ColourTo(i-1, state );
+					state = SCE_NSIS_STRINGDQ;
+					bVarInString = false;
+          bClassicVarInString = false;
+					break;
+				}
+				if( cCurrChar == '\'' )
+				{
+					styler.ColourTo(i-1, state );
+					state = SCE_NSIS_STRINGRQ;
+					bVarInString = false;
+          bClassicVarInString = false;
+					break;
+				}
+				if( cCurrChar == '`' )
+				{
+					styler.ColourTo(i-1, state );
+					state = SCE_NSIS_STRINGLQ;
+					bVarInString = false;
+          bClassicVarInString = false;
+					break;
+				}
+
+				// NSIS KeyWord,Function, Variable, UserDefined:
+				if( cCurrChar == '$' || isNsisChar(cCurrChar) || cCurrChar == '!' )
+				{
+					styler.ColourTo(i-1,state);
+				  state = SCE_NSIS_FUNCTION;
+
+          // If it is a number, we must check and set style here first...
+          if( isNsisNumber(cCurrChar) && (cNextChar == '\t' || cNextChar == ' ' || cNextChar == '\r' || cNextChar == '\n' ) )
+              styler.ColourTo( i, SCE_NSIS_NUMBER);
+
+					break;
+				}
+
+        if( cCurrChar == '/' && cNextChar == '*' )
+        {
+          styler.ColourTo(i-1,state);
+          state = SCE_NSIS_COMMENTBOX;
+          break;
+        }
+
+				break;
+			case SCE_NSIS_COMMENT:
+				if( cNextChar == '\n' || cNextChar == '\r' )
+        {
+          // Special case:
+          if( cCurrChar == '\\' )
+          {
+            styler.ColourTo(i-2,state);
+            styler.ColourTo(i,SCE_NSIS_DEFAULT);
+          }
+          else
+          {
+				    styler.ColourTo(i,state);
+            state = SCE_NSIS_DEFAULT;
+          }
+        }
+				break;
+			case SCE_NSIS_STRINGDQ:
+      case SCE_NSIS_STRINGLQ:
+      case SCE_NSIS_STRINGRQ:
+
+        if( styler.SafeGetCharAt(i-1) == '\\' && styler.SafeGetCharAt(i-2) == '$' )
+          break; // Ignore the next character, even if it is a quote of some sort
+
+        if( cCurrChar == '"' && state == SCE_NSIS_STRINGDQ )
+				{
+					styler.ColourTo(i,state);
+				  state = SCE_NSIS_DEFAULT;
+          break;
+				}
+
+        if( cCurrChar == '`' && state == SCE_NSIS_STRINGLQ )
+        {
+					styler.ColourTo(i,state);
+				  state = SCE_NSIS_DEFAULT;
+          break;
+				}
+
+        if( cCurrChar == '\'' && state == SCE_NSIS_STRINGRQ )
+				{
+					styler.ColourTo(i,state);
+				  state = SCE_NSIS_DEFAULT;
+          break;
+				}
+
+        if( cNextChar == '\r' || cNextChar == '\n' )
+        {
+          int nCurLine = styler.GetLine(i+1);
+          int nBack = i;
+          // We need to check if the previous line has a \ in it...
+          bool bNextLine = false;
+
+          while( nBack > 0 )
+          {
+            if( styler.GetLine(nBack) != nCurLine )
+              break;
+
+            char cTemp = styler.SafeGetCharAt(nBack, 'a'); // Letter 'a' is safe here
+
+            if( cTemp == '\\' )
+            {
+              bNextLine = true;
+              break;
+            }
+            if( cTemp != '\r' && cTemp != '\n' && cTemp != '\t' && cTemp != ' ' )
+              break;
+
+            nBack--;
+          }
+
+          if( bNextLine )
+          {
+            styler.ColourTo(i+1,state);
+          }
+          if( bNextLine == false )
+          {
+            styler.ColourTo(i,state);
+				    state = SCE_NSIS_DEFAULT;
+          }
+        }
+				break;
+
+			case SCE_NSIS_FUNCTION:
+
+				// NSIS KeyWord:
+        if( cCurrChar == '$' )
+          state = SCE_NSIS_DEFAULT;
+        else if( cCurrChar == '\\' && (cNextChar == 'n' || cNextChar == 'r' || cNextChar == 't' ) )
+          state = SCE_NSIS_DEFAULT;
+				else if( (isNsisChar(cCurrChar) && !isNsisChar( cNextChar) && cNextChar != '}') || cCurrChar == '}' )
+				{
+					state = classifyWordNsis( styler.GetStartSegment(), i, keywordLists, styler );
+					styler.ColourTo( i, state);
+					state = SCE_NSIS_DEFAULT;
+				}
+				else if( !isNsisChar( cCurrChar ) && cCurrChar != '{' && cCurrChar != '}' )
+				{
+          if( classifyWordNsis( styler.GetStartSegment(), i-1, keywordLists, styler) == SCE_NSIS_NUMBER )
+             styler.ColourTo( i-1, SCE_NSIS_NUMBER );
+
+					state = SCE_NSIS_DEFAULT;
+
+					if( cCurrChar == '"' )
+					{
+						state = SCE_NSIS_STRINGDQ;
+						bVarInString = false;
+            bClassicVarInString = false;
+					}
+					else if( cCurrChar == '`' )
+					{
+						state = SCE_NSIS_STRINGLQ;
+						bVarInString = false;
+            bClassicVarInString = false;
+					}
+					else if( cCurrChar == '\'' )
+					{
+						state = SCE_NSIS_STRINGRQ;
+						bVarInString = false;
+            bClassicVarInString = false;
+					}
+					else if( cCurrChar == '#' || cCurrChar == ';' )
+          {
+						state = SCE_NSIS_COMMENT;
+          }
+				}
+				break;
+      case SCE_NSIS_COMMENTBOX:
+
+        if( styler.SafeGetCharAt(i-1) == '*' && cCurrChar == '/' )
+        {
+          styler.ColourTo(i,state);
+          state = SCE_NSIS_DEFAULT;
+        }
+        break;
+		}
+
+		if( state == SCE_NSIS_COMMENT || state == SCE_NSIS_COMMENTBOX )
+		{
+			styler.ColourTo(i,state);
+		}
+		else if( state == SCE_NSIS_STRINGDQ || state == SCE_NSIS_STRINGLQ || state == SCE_NSIS_STRINGRQ )
+		{
+      bool bIngoreNextDollarSign = false;
+      bool bUserVars = false;
+      if( styler.GetPropertyInt("nsis.uservars") == 1 )
+        bUserVars = true;
+
+      if( bVarInString && cCurrChar == '$' )
+      {
+        bVarInString = false;
+        bIngoreNextDollarSign = true;
+      }
+      else if( bVarInString && cCurrChar == '\\' && (cNextChar == 'n' || cNextChar == 'r' || cNextChar == 't' || cNextChar == '"' || cNextChar == '`' || cNextChar == '\'' ) )
+      {
+        styler.ColourTo( i+1, SCE_NSIS_STRINGVAR);
+        bVarInString = false;
+        bIngoreNextDollarSign = false;
+      }
+
+      // Covers "$INSTDIR and user vars like $MYVAR"
+      else if( bVarInString && !isNsisChar(cNextChar) )
+      {
+        int nWordState = classifyWordNsis( styler.GetStartSegment(), i, keywordLists, styler);
+				if( nWordState == SCE_NSIS_VARIABLE )
+					styler.ColourTo( i, SCE_NSIS_STRINGVAR);
+        else if( bUserVars )
+          styler.ColourTo( i, SCE_NSIS_STRINGVAR);
+        bVarInString = false;
+      }
+      // Covers "${TEST}..."
+      else if( bClassicVarInString && cNextChar == '}' )
+      {
+        styler.ColourTo( i+1, SCE_NSIS_STRINGVAR);
+				bClassicVarInString = false;
+      }
+
+      // Start of var in string
+			if( !bIngoreNextDollarSign && cCurrChar == '$' && cNextChar == '{' )
+			{
+				styler.ColourTo( i-1, state);
+				bClassicVarInString = true;
+        bVarInString = false;
+			}
+      else if( !bIngoreNextDollarSign && cCurrChar == '$' )
+      {
+        styler.ColourTo( i-1, state);
+        bVarInString = true;
+        bClassicVarInString = false;
+      }
+		}
+	}
+
+  // Colourise remaining document
+	styler.ColourTo(nLengthDoc-1,state);
+}
+
+static void FoldNsisDoc(unsigned int startPos, int length, int, WordList *[], Accessor &styler)
+{
+	// No folding enabled, no reason to continue...
+	if( styler.GetPropertyInt("fold") == 0 )
+		return;
+
+  bool foldAtElse = styler.GetPropertyInt("fold.at.else", 0) == 1;
+  bool foldUtilityCmd = styler.GetPropertyInt("nsis.foldutilcmd", 1) == 1;
+  bool blockComment = false;
+
+  int lineCurrent = styler.GetLine(startPos);
+  unsigned int safeStartPos = styler.LineStart( lineCurrent );
+
+  bool bArg1 = true;
+  int nWordStart = -1;
+
+  int levelCurrent = SC_FOLDLEVELBASE;
+	if (lineCurrent > 0)
+		levelCurrent = styler.LevelAt(lineCurrent-1) >> 16;
+	int levelNext = levelCurrent;
+  int style = styler.StyleAt(safeStartPos);
+  if( style == SCE_NSIS_COMMENTBOX )
+  {
+    if( styler.SafeGetCharAt(safeStartPos) == '/' && styler.SafeGetCharAt(safeStartPos+1) == '*' )
+      levelNext++;
+    blockComment = true;
+  }
+
+  for (unsigned int i = safeStartPos; i < startPos + length; i++)
+	{
+    char chCurr = styler.SafeGetCharAt(i);
+    style = styler.StyleAt(i);
+    if( blockComment && style != SCE_NSIS_COMMENTBOX )
+    {
+      levelNext--;
+      blockComment = false;
+    }
+    else if( !blockComment && style == SCE_NSIS_COMMENTBOX )
+    {
+      levelNext++;
+      blockComment = true;
+    }
+
+    if( bArg1 && !blockComment)
+    {
+      if( nWordStart == -1 && (isNsisLetter(chCurr) || chCurr == '!') )
+      {
+        nWordStart = i;
+      }
+      else if( isNsisLetter(chCurr) == false && nWordStart > -1 )
+      {
+        int newLevel = calculateFoldNsis( nWordStart, i-1, levelNext, styler, foldAtElse, foldUtilityCmd );
+
+        if( newLevel == levelNext )
+        {
+          if( foldAtElse && foldUtilityCmd )
+          {
+            if( NsisNextLineHasElse(i, startPos + length, styler) )
+              levelNext--;
+          }
+        }
+        else
+          levelNext = newLevel;
+        bArg1 = false;
+      }
+    }
+
+    if( chCurr == '\n' )
+    {
+      if( bArg1 && foldAtElse && foldUtilityCmd && !blockComment )
+      {
+        if( NsisNextLineHasElse(i, startPos + length, styler) )
+          levelNext--;
+      }
+
+      // If we are on a new line...
+      int levelUse = levelCurrent;
+			int lev = levelUse | levelNext << 16;
+      if (levelUse < levelNext )
+				lev |= SC_FOLDLEVELHEADERFLAG;
+			if (lev != styler.LevelAt(lineCurrent))
+				styler.SetLevel(lineCurrent, lev);
+
+			lineCurrent++;
+			levelCurrent = levelNext;
+      bArg1 = true; // New line, lets look at first argument again
+      nWordStart = -1;
+    }
+  }
+
+	int levelUse = levelCurrent;
+	int lev = levelUse | levelNext << 16;
+	if (levelUse < levelNext)
+		lev |= SC_FOLDLEVELHEADERFLAG;
+	if (lev != styler.LevelAt(lineCurrent))
+		styler.SetLevel(lineCurrent, lev);
+}
+
+static const char * const nsisWordLists[] = {
+	"Functions",
+	"Variables",
+	"Lables",
+	"UserDefined",
+	0, };
+
+
+LexerModule lmNsis(SCLEX_NSIS, ColouriseNsisDoc, "nsis", FoldNsisDoc, nsisWordLists);
+

Added: trunk/plugins/scintilla/scintilla/LexScriptol.cxx
==============================================================================
--- (empty file)
+++ trunk/plugins/scintilla/scintilla/LexScriptol.cxx	Wed Apr  8 07:16:46 2009
@@ -0,0 +1,408 @@
+// Scintilla source code edit control
+/** @file LexScriptol.cxx
+ ** Lexer for Scriptol.
+ **/
+
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include <stdio.h>
+#include <stdarg.h>
+
+#include "Platform.h"
+
+#include "PropSet.h"
+#include "Accessor.h"
+#include "KeyWords.h"
+#include "Scintilla.h"
+#include "SciLexer.h"
+
+#ifdef SCI_NAMESPACE
+using namespace Scintilla;
+#endif
+
+static void ClassifyWordSol(unsigned int start, unsigned int end, WordList &keywords, Accessor &styler, char *prevWord)
+{
+    char s[100];
+    bool wordIsNumber = isdigit(styler[start]) != 0;
+    for (unsigned int i = 0; i < end - start + 1 && i < 30; i++)
+     {
+           s[i] = styler[start + i];
+           s[i + 1] = '\0';
+     }
+    char chAttr = SCE_SCRIPTOL_IDENTIFIER;
+    if (0 == strcmp(prevWord, "class"))       chAttr = SCE_SCRIPTOL_CLASSNAME;
+    else if (wordIsNumber)                    chAttr = SCE_SCRIPTOL_NUMBER;
+    else if (keywords.InList(s))              chAttr = SCE_SCRIPTOL_KEYWORD;
+    else for (unsigned int i = 0; i < end - start + 1; i++)  // test dotted idents
+    {
+        if (styler[start + i] == '.')
+        {
+            styler.ColourTo(start + i - 1, chAttr);
+            styler.ColourTo(start + i, SCE_SCRIPTOL_OPERATOR);
+        }
+    }
+    styler.ColourTo(end, chAttr);
+    strcpy(prevWord, s);
+}
+
+static bool IsSolComment(Accessor &styler, int pos, int len)
+{
+   char c;
+   if(len > 0)
+   {
+     c = styler[pos];
+     if(c == '`') return true;
+     if(len > 1)
+     {
+        if(c == '/')
+        {
+          c = styler[pos + 1];
+          if(c == '/') return true;
+          if(c == '*') return true;
+        }
+     }
+   }
+   return false;
+}
+
+static bool IsSolStringStart(char ch)
+{
+    if (ch == '\'' || ch == '"')  return true;
+    return false;
+}
+
+static bool IsSolWordStart(char ch)
+{
+    return (iswordchar(ch) && !IsSolStringStart(ch));
+}
+
+
+static int GetSolStringState(Accessor &styler, int i, int *nextIndex)
+{
+	char ch = styler.SafeGetCharAt(i);
+	char chNext = styler.SafeGetCharAt(i + 1);
+
+        if (ch != '\"' && ch != '\'')
+        {
+            *nextIndex = i + 1;
+            return SCE_SCRIPTOL_DEFAULT;
+	}
+        // ch is either single or double quotes in string
+        // code below seem non-sense but is here for future extensions
+	if (ch == chNext && ch == styler.SafeGetCharAt(i + 2))
+        {
+          *nextIndex = i + 3;
+          if(ch == '\"') return SCE_SCRIPTOL_TRIPLE;
+          if(ch == '\'') return SCE_SCRIPTOL_TRIPLE;
+          return SCE_SCRIPTOL_STRING;
+	}
+        else
+        {
+          *nextIndex = i + 1;
+          if (ch == '"') return SCE_SCRIPTOL_STRING;
+          else           return SCE_SCRIPTOL_STRING;
+	}
+}
+
+
+static void ColouriseSolDoc(unsigned int startPos, int length, int initStyle,
+                            WordList *keywordlists[], Accessor &styler)
+ {
+
+	int lengthDoc = startPos + length;
+        char stringType = '\"';
+
+	if (startPos > 0)
+        {
+            int lineCurrent = styler.GetLine(startPos);
+            if (lineCurrent > 0)
+            {
+              startPos = styler.LineStart(lineCurrent-1);
+              if (startPos == 0) initStyle = SCE_SCRIPTOL_DEFAULT;
+              else               initStyle = styler.StyleAt(startPos-1);
+            }
+	}
+
+	styler.StartAt(startPos, 127);
+
+	WordList &keywords = *keywordlists[0];
+
+	int whingeLevel = styler.GetPropertyInt("tab.timmy.whinge.level");
+	char prevWord[200];
+	prevWord[0] = '\0';
+        if (length == 0)  return;
+
+	int state = initStyle & 31;
+
+	int nextIndex = 0;
+        char chPrev  = ' ';
+        char chPrev2 = ' ';
+        char chNext  = styler[startPos];
+	styler.StartSegment(startPos);
+	bool atStartLine = true;
+	int spaceFlags = 0;
+	for (int i = startPos; i < lengthDoc; i++)
+        {
+
+         if (atStartLine)
+         {
+         char chBad = static_cast<char>(64);
+         char chGood = static_cast<char>(0);
+         char chFlags = chGood;
+
+         if (whingeLevel == 1)
+         {
+             chFlags = (spaceFlags & wsInconsistent) ? chBad : chGood;
+         }
+         else if (whingeLevel == 2)
+         {
+             chFlags = (spaceFlags & wsSpaceTab) ? chBad : chGood;
+         }
+         else if (whingeLevel == 3)
+         {
+             chFlags = (spaceFlags & wsSpace) ? chBad : chGood;
+         }
+         else if (whingeLevel == 4)
+         {
+              chFlags = (spaceFlags & wsTab) ? chBad : chGood;
+         }
+         styler.SetFlags(chFlags, static_cast<char>(state));
+         atStartLine = false;
+       }
+
+       char ch = chNext;
+       chNext = styler.SafeGetCharAt(i + 1);
+
+       if ((ch == '\r' && chNext != '\n') || (ch == '\n') || (i == lengthDoc))
+       {
+          if ((state == SCE_SCRIPTOL_DEFAULT) ||
+              (state == SCE_SCRIPTOL_TRIPLE) ||
+              (state == SCE_SCRIPTOL_COMMENTBLOCK))
+          {
+              styler.ColourTo(i, state);
+          }
+          atStartLine = true;
+        }
+
+        if (styler.IsLeadByte(ch))
+         {
+             chNext = styler.SafeGetCharAt(i + 2);
+             chPrev  = ' ';
+             chPrev2 = ' ';
+             i += 1;
+             continue;
+         }
+
+        if (state == SCE_SCRIPTOL_STRINGEOL)
+         {
+             if (ch != '\r' && ch != '\n')
+             {
+                    styler.ColourTo(i - 1, state);
+                    state = SCE_SCRIPTOL_DEFAULT;
+             }
+         }
+
+        if (state == SCE_SCRIPTOL_DEFAULT)
+         {
+            if (IsSolWordStart(ch))
+            {
+                 styler.ColourTo(i - 1, state);
+                 state = SCE_SCRIPTOL_KEYWORD;
+            }
+            else if (ch == '`')
+            {
+                styler.ColourTo(i - 1, state);
+                state = SCE_SCRIPTOL_COMMENTLINE;
+            }
+            else if (ch == '/')
+            {
+                styler.ColourTo(i - 1, state);
+                if(chNext == '/') state = SCE_SCRIPTOL_CSTYLE;
+                if(chNext == '*') state = SCE_SCRIPTOL_COMMENTBLOCK;
+            }
+
+            else if (IsSolStringStart(ch))
+            {
+               styler.ColourTo(i - 1, state);
+               state = GetSolStringState(styler, i, &nextIndex);
+               if(state == SCE_SCRIPTOL_STRING)
+               {
+                 stringType = ch;
+               }
+               if (nextIndex != i + 1)
+               {
+                   i = nextIndex - 1;
+                   ch = ' ';
+                   chPrev = ' ';
+                   chNext = styler.SafeGetCharAt(i + 1);
+               }
+           }
+            else if (isoperator(ch))
+            {
+                 styler.ColourTo(i - 1, state);
+                 styler.ColourTo(i, SCE_SCRIPTOL_OPERATOR);
+            }
+          }
+          else if (state == SCE_SCRIPTOL_KEYWORD)
+          {
+              if (!iswordchar(ch))
+              {
+                 ClassifyWordSol(styler.GetStartSegment(), i - 1, keywords, styler, prevWord);
+                 state = SCE_SCRIPTOL_DEFAULT;
+                 if (ch == '`')
+                 {
+                     state = chNext == '`' ? SCE_SCRIPTOL_PERSISTENT : SCE_SCRIPTOL_COMMENTLINE;
+                 }
+                 else if (IsSolStringStart(ch))
+                 {
+                    styler.ColourTo(i - 1, state);
+                    state = GetSolStringState(styler, i, &nextIndex);
+                    if (nextIndex != i + 1)
+                    {
+                       i = nextIndex - 1;
+                       ch = ' ';
+                       chPrev = ' ';
+                       chNext = styler.SafeGetCharAt(i + 1);
+                     }
+                 }
+                 else if (isoperator(ch))
+                 {
+                     styler.ColourTo(i, SCE_SCRIPTOL_OPERATOR);
+                 }
+             }
+          }
+          else
+          {
+            if (state == SCE_SCRIPTOL_COMMENTLINE ||
+                state == SCE_SCRIPTOL_PERSISTENT ||
+                state == SCE_SCRIPTOL_CSTYLE)
+            {
+                 if (ch == '\r' || ch == '\n')
+                 {
+                     styler.ColourTo(i - 1, state);
+                     state = SCE_SCRIPTOL_DEFAULT;
+                 }
+            }
+            else if(state == SCE_SCRIPTOL_COMMENTBLOCK)
+            {
+              if(chPrev == '*' && ch == '/')
+              {
+                styler.ColourTo(i, state);
+                state = SCE_SCRIPTOL_DEFAULT;
+              }
+            }
+            else if ((state == SCE_SCRIPTOL_STRING) ||
+                     (state == SCE_SCRIPTOL_CHARACTER))
+            {
+               if ((ch == '\r' || ch == '\n') && (chPrev != '\\'))
+                {
+                    styler.ColourTo(i - 1, state);
+                    state = SCE_SCRIPTOL_STRINGEOL;
+                }
+                else if (ch == '\\')
+                {
+                   if (chNext == '\"' || chNext == '\'' || chNext == '\\')
+                   {
+                        i++;
+                        ch = chNext;
+                        chNext = styler.SafeGetCharAt(i + 1);
+                   }
+                 }
+                else if ((ch == '\"') || (ch == '\''))
+                {
+                    // must match the entered quote type
+                    if(ch == stringType)
+                    {
+                      styler.ColourTo(i, state);
+                      state = SCE_SCRIPTOL_DEFAULT;
+                    }
+                 }
+             }
+             else if (state == SCE_SCRIPTOL_TRIPLE)
+             {
+                if ((ch == '\'' && chPrev == '\'' && chPrev2 == '\'') ||
+                    (ch == '\"' && chPrev == '\"' && chPrev2 == '\"'))
+                 {
+                    styler.ColourTo(i, state);
+                    state = SCE_SCRIPTOL_DEFAULT;
+                 }
+             }
+            
+           }
+          chPrev2 = chPrev;
+          chPrev = ch;
+	}
+        if (state == SCE_SCRIPTOL_KEYWORD)
+        {
+            ClassifyWordSol(styler.GetStartSegment(),
+                 lengthDoc-1, keywords, styler, prevWord);
+	}
+        else
+        {
+            styler.ColourTo(lengthDoc-1, state);
+	}
+}
+
+static void FoldSolDoc(unsigned int startPos, int length, int initStyle,
+						   WordList *[], Accessor &styler)
+ {
+	int lengthDoc = startPos + length;
+
+	int lineCurrent = styler.GetLine(startPos);
+	if (startPos > 0)
+        {
+          if (lineCurrent > 0)
+          {
+               lineCurrent--;
+               startPos = styler.LineStart(lineCurrent);
+               if (startPos == 0)
+                    initStyle = SCE_SCRIPTOL_DEFAULT;
+               else
+                    initStyle = styler.StyleAt(startPos-1);
+           }
+	}
+	int state = initStyle & 31;
+	int spaceFlags = 0;
+        int indentCurrent = styler.IndentAmount(lineCurrent, &spaceFlags, IsSolComment);
+        if ((state == SCE_SCRIPTOL_TRIPLE))
+             indentCurrent |= SC_FOLDLEVELWHITEFLAG;
+	char chNext = styler[startPos];
+	for (int i = startPos; i < lengthDoc; i++)
+         {
+		char ch = chNext;
+		chNext = styler.SafeGetCharAt(i + 1);
+		int style = styler.StyleAt(i) & 31;
+
+		if ((ch == '\r' && chNext != '\n') || (ch == '\n') || (i == lengthDoc))
+                {
+                   int lev = indentCurrent;
+                   int indentNext = styler.IndentAmount(lineCurrent + 1, &spaceFlags, IsSolComment);
+                   if (style == SCE_SCRIPTOL_TRIPLE)
+                        indentNext |= SC_FOLDLEVELWHITEFLAG;
+                   if (!(indentCurrent & SC_FOLDLEVELWHITEFLAG))
+                    {
+                        // Only non whitespace lines can be headers
+                        if ((indentCurrent & SC_FOLDLEVELNUMBERMASK) < (indentNext & SC_FOLDLEVELNUMBERMASK))
+                        {
+                              lev |= SC_FOLDLEVELHEADERFLAG;
+                        }
+                        else if (indentNext & SC_FOLDLEVELWHITEFLAG)
+                        {
+                             // Line after is blank so check the next - maybe should continue further?
+                             int spaceFlags2 = 0;
+                             int indentNext2 = styler.IndentAmount(lineCurrent + 2, &spaceFlags2, IsSolComment);
+                             if ((indentCurrent & SC_FOLDLEVELNUMBERMASK) < (indentNext2 & SC_FOLDLEVELNUMBERMASK))
+                             {
+                                   lev |= SC_FOLDLEVELHEADERFLAG;
+                              }
+                        }
+                    }
+                   indentCurrent = indentNext;
+                   styler.SetLevel(lineCurrent, lev);
+                   lineCurrent++;
+		}
+	}
+}
+
+LexerModule lmScriptol(SCLEX_SCRIPTOL, ColouriseSolDoc, "scriptol", FoldSolDoc);

Added: trunk/plugins/scintilla/scintilla/LexTCL.cxx
==============================================================================
--- (empty file)
+++ trunk/plugins/scintilla/scintilla/LexTCL.cxx	Wed Apr  8 07:16:46 2009
@@ -0,0 +1,366 @@
+// Scintilla source code edit control
+/** @file LexTCL.cxx
+ ** Lexer for TCL language.
+ **/
+// Copyright 1998-2001 by Andre Arpin <arpin kingston net>
+// The License.txt file describes the conditions under which this software may be distributed.
+
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include <stdarg.h>
+#include <stdio.h>
+
+#include "Platform.h"
+
+#include "PropSet.h"
+#include "Accessor.h"
+#include "StyleContext.h"
+#include "KeyWords.h"
+#include "Scintilla.h"
+#include "SciLexer.h"
+
+#ifdef SCI_NAMESPACE
+using namespace Scintilla;
+#endif
+
+// Extended to accept accented characters
+static inline bool IsAWordChar(int ch) {
+	return ch >= 0x80 ||
+        (isalnum(ch) || ch == '_' || ch ==':' || ch=='.'); // : name space separator
+}
+
+static inline bool IsAWordStart(int ch) {
+	return ch >= 0x80 || (ch ==':' || isalpha(ch) || ch == '_');
+}
+
+static inline bool IsANumberChar(int ch) {
+	// Not exactly following number definition (several dots are seen as OK, etc.)
+	// but probably enough in most cases.
+	return (ch < 0x80) &&
+	       (IsADigit(ch, 0x10) || toupper(ch) == 'E' ||
+	        ch == '.' || ch == '-' || ch == '+');
+}
+
+static void ColouriseTCLDoc(unsigned int startPos, int length, int , WordList *keywordlists[], Accessor &styler) {
+#define  isComment(s) (s==SCE_TCL_COMMENT || s==SCE_TCL_COMMENTLINE || s==SCE_TCL_COMMENT_BOX || s==SCE_TCL_BLOCK_COMMENT)
+	bool foldComment = styler.GetPropertyInt("fold.comment") != 0;
+	bool commentLevel = false;
+    bool subBrace = false; // substitution begin with a brace ${.....}
+	enum tLineState {LS_DEFAULT, LS_OPEN_COMMENT, LS_OPEN_DOUBLE_QUOTE, LS_COMMENT_BOX, LS_MASK_STATE = 0xf, 
+        LS_COMMAND_EXPECTED = 16, LS_BRACE_ONLY = 32 } lineState = LS_DEFAULT;
+	bool prevSlash = false;
+	int currentLevel = 0;
+    bool expected = 0;
+    bool subParen = 0;
+
+	int currentLine = styler.GetLine(startPos);
+    if (currentLine > 0)
+        currentLine--;
+	length += startPos - styler.LineStart(currentLine);
+	// make sure lines overlap
+	startPos = styler.LineStart(currentLine);
+
+	WordList &keywords = *keywordlists[0];
+	WordList &keywords2 = *keywordlists[1];
+	WordList &keywords3 = *keywordlists[2];
+	WordList &keywords4 = *keywordlists[3];
+	WordList &keywords5 = *keywordlists[4];
+	WordList &keywords6 = *keywordlists[5];
+	WordList &keywords7 = *keywordlists[6];
+    WordList &keywords8 = *keywordlists[7];
+    WordList &keywords9 = *keywordlists[8];
+
+	if (currentLine > 0) {
+        int ls = styler.GetLineState(currentLine - 1);
+		lineState = tLineState(ls & LS_MASK_STATE);
+		expected = LS_COMMAND_EXPECTED == tLineState(ls & LS_COMMAND_EXPECTED);
+        subBrace = LS_BRACE_ONLY == tLineState(ls & LS_BRACE_ONLY);
+		currentLevel = styler.LevelAt(currentLine - 1) >> 17;
+		commentLevel = (styler.LevelAt(currentLine - 1) >> 16) & 1;
+	} else
+		styler.SetLevel(0, SC_FOLDLEVELBASE | SC_FOLDLEVELHEADERFLAG);
+	bool visibleChars = false;
+
+	int previousLevel = currentLevel;
+    StyleContext sc(startPos, length, SCE_TCL_DEFAULT, styler);
+	for (; ; sc.Forward()) {
+next:
+        if (sc.ch=='\r' && sc.chNext == '\n') // only ignore \r on PC process on the mac 
+            continue;
+        bool atEnd = !sc.More();  // make sure we coloured the last word
+        if (lineState != LS_DEFAULT) {
+            sc.SetState(SCE_TCL_DEFAULT);
+            if (lineState == LS_OPEN_COMMENT)
+                sc.SetState(SCE_TCL_COMMENTLINE);
+            else if (lineState == LS_OPEN_DOUBLE_QUOTE)
+                sc.SetState(SCE_TCL_IN_QUOTE);
+            else if (lineState == LS_COMMENT_BOX && (sc.ch == '#' || (sc.ch == ' ' && sc.chNext=='#')))
+                sc.SetState(SCE_TCL_COMMENT_BOX);
+            lineState = LS_DEFAULT;
+        }
+        if (subBrace) { // ${ overrides every thing even \ except }
+            if (sc.ch == '}') {
+                subBrace = false;
+                sc.SetState(SCE_TCL_OPERATOR);
+                sc.ForwardSetState(SCE_TCL_DEFAULT);
+                goto next;
+            }
+            else
+                sc.SetState(SCE_TCL_SUB_BRACE);
+            if (!sc.atLineEnd)
+                continue;
+        } else if (sc.state == SCE_TCL_DEFAULT || sc.state ==SCE_TCL_OPERATOR) {
+            expected &= isspacechar(static_cast<unsigned char>(sc.ch)) || IsAWordStart(sc.ch) || sc.ch =='#';
+        } else if (sc.state == SCE_TCL_SUBSTITUTION) {
+            switch(sc.ch) {
+            case '(':
+                subParen=true;
+                sc.SetState(SCE_TCL_OPERATOR);
+                sc.ForwardSetState(SCE_TCL_SUBSTITUTION);
+                continue;
+            case ')':
+                sc.SetState(SCE_TCL_OPERATOR);
+                subParen=false;
+                continue;
+            case '$':
+                continue;
+            case ',':
+                sc.SetState(SCE_TCL_OPERATOR);
+                if (subParen)
+                    sc.ForwardSetState(SCE_TCL_SUBSTITUTION);
+                continue;
+            default :
+                // maybe spaces should be allowed ???
+                if (!IsAWordChar(sc.ch)) { // probably the code is wrong
+                    sc.SetState(SCE_TCL_DEFAULT);
+                    subParen = 0;
+                }
+                break;
+            }
+        } else if (isComment(sc.state)) {
+        } else if (!IsAWordChar(sc.ch)) {
+            if ((sc.state == SCE_TCL_IDENTIFIER && expected) ||  sc.state == SCE_TCL_MODIFIER) {
+                char w[100];
+                char *s=w;
+                sc.GetCurrent(w, sizeof(w));
+                if (w[strlen(w)-1]=='\r')
+                    w[strlen(w)-1]=0;
+                while(*s == ':') // ignore leading : like in ::set a 10
+                    ++s;
+                bool quote = sc.state == SCE_TCL_IN_QUOTE;
+                if (commentLevel  || expected) {
+                    if (keywords.InList(s)) {
+                        sc.ChangeState(quote ? SCE_TCL_WORD_IN_QUOTE : SCE_TCL_WORD);
+                    } else if (keywords2.InList(s)) {
+                        sc.ChangeState(quote ? SCE_TCL_WORD_IN_QUOTE : SCE_TCL_WORD2);
+                    } else if (keywords3.InList(s)) {
+                        sc.ChangeState(quote ? SCE_TCL_WORD_IN_QUOTE : SCE_TCL_WORD3);
+                    } else if (keywords4.InList(s)) {
+                        sc.ChangeState(quote ? SCE_TCL_WORD_IN_QUOTE : SCE_TCL_WORD4);
+                    } else if (sc.GetRelative(-static_cast<int>(strlen(s))-1) == '{' &&
+                        keywords5.InList(s) && sc.ch == '}') { // {keyword} exactly no spaces
+                            sc.ChangeState(SCE_TCL_EXPAND);
+                    }
+                    if (keywords6.InList(s)) {
+                        sc.ChangeState(SCE_TCL_WORD5);
+                    } else if (keywords7.InList(s)) {
+                        sc.ChangeState(SCE_TCL_WORD6);
+                    } else if (keywords8.InList(s)) {
+                        sc.ChangeState(SCE_TCL_WORD7);
+                    } else if (keywords9.InList(s)) {
+                        sc.ChangeState(SCE_TCL_WORD8);
+                    } 
+                }
+                expected = false;
+                sc.SetState(quote ? SCE_TCL_IN_QUOTE : SCE_TCL_DEFAULT);
+            } else if (sc.state == SCE_TCL_MODIFIER || sc.state == SCE_TCL_IDENTIFIER) {
+                sc.SetState(SCE_TCL_DEFAULT);
+            }
+        }
+		if (atEnd)
+			break;
+        if (sc.atLineEnd) {
+            lineState = LS_DEFAULT;
+			currentLine = styler.GetLine(sc.currentPos);
+			if (foldComment && sc.state!=SCE_TCL_COMMENT && isComment(sc.state)) {
+				if (currentLevel == 0) {
+					++currentLevel;
+					commentLevel = true;
+				}
+			} else {
+				if (visibleChars && commentLevel) {
+					--currentLevel;
+					--previousLevel;
+					commentLevel = false;
+				}
+			}
+			int flag = 0;
+			if (!visibleChars)
+				flag = SC_FOLDLEVELWHITEFLAG;
+			if (currentLevel > previousLevel)
+				flag = SC_FOLDLEVELHEADERFLAG;
+			styler.SetLevel(currentLine, flag + previousLevel + SC_FOLDLEVELBASE + (currentLevel << 17) + (commentLevel << 16));
+
+			// Update the line state, so it can be seen by next line
+			if (sc.state == SCE_TCL_IN_QUOTE)
+				lineState = LS_OPEN_DOUBLE_QUOTE;
+			else {
+			     if (prevSlash) {
+				    if (isComment(sc.state))
+					    lineState = LS_OPEN_COMMENT;
+                } else if (sc.state == SCE_TCL_COMMENT_BOX)
+                    lineState = LS_COMMENT_BOX;
+			}
+            styler.SetLineState(currentLine, 
+                (subBrace ? LS_BRACE_ONLY : 0) |
+                (expected ? LS_COMMAND_EXPECTED : 0)  | lineState);
+            if (lineState == LS_COMMENT_BOX)
+                sc.ForwardSetState(SCE_TCL_COMMENT_BOX);
+            else if (lineState == LS_OPEN_DOUBLE_QUOTE)
+                sc.ForwardSetState(SCE_TCL_IN_QUOTE);
+            else
+                sc.ForwardSetState(SCE_TCL_DEFAULT);
+			prevSlash = false;
+			previousLevel = currentLevel;
+			goto next;
+		}
+
+		if (prevSlash) {
+            prevSlash = false;
+            if (sc.ch == '#' && IsANumberChar(sc.chNext))
+                sc.ForwardSetState(SCE_TCL_NUMBER);
+            continue;
+		}
+        prevSlash = sc.ch == '\\';
+        if (isComment(sc.state))
+            continue;
+		if (sc.atLineStart) {
+			visibleChars = false;
+			if (sc.state!=SCE_TCL_IN_QUOTE && !isComment(sc.state))
+            {
+				sc.SetState(SCE_TCL_DEFAULT);
+                expected = IsAWordStart(sc.ch)|| isspacechar(static_cast<unsigned char>(sc.ch));
+            }
+		}
+
+		switch (sc.state) {
+		case SCE_TCL_NUMBER:
+			if (!IsANumberChar(sc.ch))
+				sc.SetState(SCE_TCL_DEFAULT);
+			break;
+		case SCE_TCL_IN_QUOTE:
+			if (sc.ch == '"') {
+				sc.ForwardSetState(SCE_TCL_DEFAULT);
+				visibleChars = true; // necessary if a " is the first and only character on a line
+				goto next;
+			} else if (sc.ch == '[' || sc.ch == ']' || sc.ch == '$') {
+				sc.SetState(SCE_TCL_OPERATOR);
+                expected = sc.ch == '[';
+                sc.ForwardSetState(SCE_TCL_IN_QUOTE);
+				goto next;
+			}
+            continue;
+        case SCE_TCL_OPERATOR:
+			sc.SetState(SCE_TCL_DEFAULT);
+			break;
+		}
+
+		if (sc.ch == '#') {
+			if (visibleChars) {
+                if (sc.state != SCE_TCL_IN_QUOTE && expected)
+					sc.SetState(SCE_TCL_COMMENT);
+			} else {
+                sc.SetState(SCE_TCL_COMMENTLINE);
+                if (sc.chNext == '~')
+                    sc.SetState(SCE_TCL_BLOCK_COMMENT);
+                if (sc.atLineStart && (sc.chNext == '#' || sc.chNext == '-'))
+                        sc.SetState(SCE_TCL_COMMENT_BOX);
+            }
+        }
+
+		if (!isspacechar(static_cast<unsigned char>(sc.ch))) {
+			visibleChars = true;
+		}
+
+		if (sc.ch == '\\') {
+			prevSlash = true;
+			continue;		
+		}
+
+		// Determine if a new state should be entered.
+		if (sc.state == SCE_TCL_DEFAULT) {
+            if (IsAWordStart(sc.ch)) {
+				sc.SetState(SCE_TCL_IDENTIFIER);
+			} else if (IsADigit(sc.ch) && !IsAWordChar(sc.chPrev)) {
+				sc.SetState(SCE_TCL_NUMBER);
+			} else {
+				switch (sc.ch) {
+				case '\"':
+					sc.SetState(SCE_TCL_IN_QUOTE);
+					break;
+				case '{':
+					sc.SetState(SCE_TCL_OPERATOR);
+					expected = true;
+					++currentLevel;
+					break;
+				case '}':
+					sc.SetState(SCE_TCL_OPERATOR);
+					--currentLevel;
+					break;
+				case '[':
+                    expected = true;
+				case ']':
+				case '(':
+				case ')':
+					sc.SetState(SCE_TCL_OPERATOR);
+					break;
+				case ';':
+                    expected = true;
+					break;
+                case '$':
+                    subParen = 0;
+                    if (sc.chNext != '{') {
+                        sc.SetState(SCE_TCL_SUBSTITUTION);
+                    } 
+                    else {
+                        sc.SetState(SCE_TCL_OPERATOR);  // $
+                        sc.Forward();  // {
+                        sc.ForwardSetState(SCE_TCL_SUB_BRACE);
+                        subBrace = true;
+                    }
+                    break;
+                case '#':
+                    if ((isspacechar(static_cast<unsigned char>(sc.chPrev))||
+                            isoperator(static_cast<char>(sc.chPrev))) && IsADigit(sc.chNext,0x10))
+                        sc.SetState(SCE_TCL_NUMBER);
+                    break;
+                case '-':
+                    sc.SetState(IsADigit(sc.chNext)? SCE_TCL_NUMBER: SCE_TCL_MODIFIER);
+                    break;
+                default:
+                    if (isoperator(static_cast<char>(sc.ch))) {
+                        sc.SetState(SCE_TCL_OPERATOR);
+                    }
+				}
+			}
+		}
+	}
+	sc.Complete();
+}
+
+static const char * const tclWordListDesc[] = {
+            "TCL Keywords",
+            "TK Keywords",
+            "iTCL Keywords",
+            "tkCommands",
+            "expand"
+            "user1",
+            "user2",
+            "user3",
+            "user4",
+            0
+        };
+
+// this code supports folding in the colourizer
+LexerModule lmTCL(SCLEX_TCL, ColouriseTCLDoc, "tcl", 0, tclWordListDesc);

Added: trunk/plugins/scintilla/scintilla/LexYAML.cxx
==============================================================================
--- (empty file)
+++ trunk/plugins/scintilla/scintilla/LexYAML.cxx	Wed Apr  8 07:16:46 2009
@@ -0,0 +1,314 @@
+// Scintilla source code edit control
+/** @file LexYAML.cxx
+ ** Lexer for YAML.
+ **/
+// Copyright 2003- by Sean O'Dell <sean celsoft com>
+// Release under the same license as Scintilla/SciTE.
+
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include <stdio.h>
+#include <stdarg.h>
+
+#include "Platform.h"
+
+#include "PropSet.h"
+#include "Accessor.h"
+#include "StyleContext.h"
+#include "KeyWords.h"
+#include "Scintilla.h"
+#include "SciLexer.h"
+
+#ifdef SCI_NAMESPACE
+using namespace Scintilla;
+#endif
+
+static const char * const yamlWordListDesc[] = {
+	"Keywords",
+	0
+};
+
+static inline bool AtEOL(Accessor &styler, unsigned int i) {
+	return (styler[i] == '\n') ||
+		((styler[i] == '\r') && (styler.SafeGetCharAt(i + 1) != '\n'));
+}
+
+static unsigned int SpaceCount(char* lineBuffer) {
+	if (lineBuffer == NULL)
+		return 0;
+
+	char* headBuffer = lineBuffer;
+
+	while (*headBuffer == ' ')
+		headBuffer++;
+
+	return headBuffer - lineBuffer;
+}
+
+#define YAML_STATE_BITSIZE 16
+#define YAML_STATE_MASK			(0xFFFF0000)
+#define YAML_STATE_DOCUMENT		(1 << YAML_STATE_BITSIZE)
+#define YAML_STATE_VALUE			(2 << YAML_STATE_BITSIZE)
+#define YAML_STATE_COMMENT		(3 << YAML_STATE_BITSIZE)
+#define YAML_STATE_TEXT_PARENT	(4 << YAML_STATE_BITSIZE)
+#define YAML_STATE_TEXT			(5 << YAML_STATE_BITSIZE)
+
+static void ColouriseYAMLLine(
+	char *lineBuffer,
+	unsigned int currentLine,
+	unsigned int lengthLine,
+	unsigned int startLine,
+	unsigned int endPos,
+	WordList &keywords,
+	Accessor &styler) {
+
+	unsigned int i = 0;
+	bool bInQuotes = false;
+	unsigned int indentAmount = SpaceCount(lineBuffer);
+
+	if (currentLine > 0) {
+		int parentLineState = styler.GetLineState(currentLine - 1);
+
+		if ((parentLineState&YAML_STATE_MASK) == YAML_STATE_TEXT || (parentLineState&YAML_STATE_MASK) == YAML_STATE_TEXT_PARENT) {
+			unsigned int parentIndentAmount = parentLineState&(~YAML_STATE_MASK);
+			if (indentAmount > parentIndentAmount) {
+				styler.SetLineState(currentLine, YAML_STATE_TEXT | parentIndentAmount);
+				styler.ColourTo(endPos, SCE_YAML_TEXT);
+				return;
+			}
+		}
+	}
+	styler.SetLineState(currentLine, 0);
+	if (strncmp(lineBuffer, "---", 3) == 0) {	// Document marker
+		styler.SetLineState(currentLine, YAML_STATE_DOCUMENT);
+		styler.ColourTo(endPos, SCE_YAML_DOCUMENT);
+		return;
+	}
+	// Skip initial spaces
+	while ((i < lengthLine) && lineBuffer[i] == ' ') { // YAML always uses space, never TABS or anything else
+		i++;
+	}
+	if (lineBuffer[i] == '\t') { // if we skipped all spaces, and we are NOT inside a text block, this is wrong
+		styler.ColourTo(endPos, SCE_YAML_ERROR);
+		return;
+	}
+	if (lineBuffer[i] == '#') {	// Comment
+		styler.SetLineState(currentLine, YAML_STATE_COMMENT);
+		styler.ColourTo(endPos, SCE_YAML_COMMENT);
+		return;
+	}
+	while (i < lengthLine) {
+		if (lineBuffer[i] == '\'' || lineBuffer[i] == '\"') {
+			bInQuotes = !bInQuotes;
+		} else if (lineBuffer[i] == ':' && !bInQuotes) {
+			styler.ColourTo(startLine + i - 1, SCE_YAML_IDENTIFIER);
+			styler.ColourTo(startLine + i, SCE_YAML_OPERATOR);
+			// Non-folding scalar
+			i++;
+			while ((i < lengthLine) && isspacechar(lineBuffer[i]))
+				i++;
+			unsigned int endValue = lengthLine - 1;
+			while ((endValue >= i) && isspacechar(lineBuffer[endValue]))
+				endValue--;
+			lineBuffer[endValue + 1] = '\0';
+			if (lineBuffer[i] == '|' || lineBuffer[i] == '>') {
+				i++;
+				if (lineBuffer[i] == '+' || lineBuffer[i] == '-')
+					i++;
+				while ((i < lengthLine) && isspacechar(lineBuffer[i]))
+					i++;
+				if (lineBuffer[i] == '\0') {
+					styler.SetLineState(currentLine, YAML_STATE_TEXT_PARENT | indentAmount);
+					styler.ColourTo(endPos, SCE_YAML_DEFAULT);
+					return;
+				} else if (lineBuffer[i] == '#') {
+					styler.SetLineState(currentLine, YAML_STATE_TEXT_PARENT | indentAmount);
+					styler.ColourTo(startLine + i - 1, SCE_YAML_DEFAULT);
+					styler.ColourTo(endPos, SCE_YAML_COMMENT);
+					return;
+				} else {
+					styler.ColourTo(endPos, SCE_YAML_ERROR);
+					return;
+				}
+			} else if (lineBuffer[i] == '#') {
+				styler.ColourTo(startLine + i - 1, SCE_YAML_DEFAULT);
+				styler.ColourTo(endPos, SCE_YAML_COMMENT);
+				return;
+			}
+			styler.SetLineState(currentLine, YAML_STATE_VALUE);
+			if (lineBuffer[i] == '&' || lineBuffer[i] == '*') {
+				styler.ColourTo(endPos, SCE_YAML_REFERENCE);
+				return;
+			}
+			if (keywords.InList(&lineBuffer[i])) { // Convertible value (true/false, etc.)
+				styler.ColourTo(endPos, SCE_YAML_KEYWORD);
+				return;
+			} else {
+				unsigned int i2 = i;
+				while ((i < lengthLine) && lineBuffer[i]) {
+					if (!(isascii(lineBuffer[i]) && isdigit(lineBuffer[i])) && lineBuffer[i] != '-' && lineBuffer[i] != '.' && lineBuffer[i] != ',') {
+						styler.ColourTo(endPos, SCE_YAML_DEFAULT);
+						return;
+					}
+					i++;
+				}
+				if (i > i2) {
+					styler.ColourTo(endPos, SCE_YAML_NUMBER);
+					return;
+				}
+			}
+			break; // shouldn't get here, but just in case, the rest of the line is coloured the default
+		}
+		i++;
+	}
+	styler.ColourTo(endPos, SCE_YAML_DEFAULT);
+}
+
+static void ColouriseYAMLDoc(unsigned int startPos, int length, int, WordList *keywordLists[], Accessor &styler) {
+	char lineBuffer[1024];
+	styler.StartAt(startPos);
+	styler.StartSegment(startPos);
+	unsigned int linePos = 0;
+	unsigned int startLine = startPos;
+	unsigned int endPos = startPos + length;
+	unsigned int maxPos = styler.Length();
+	unsigned int lineCurrent = styler.GetLine(startPos);
+
+	for (unsigned int i = startPos; i < maxPos && i < endPos; i++) {
+		lineBuffer[linePos++] = styler[i];
+		if (AtEOL(styler, i) || (linePos >= sizeof(lineBuffer) - 1)) {
+			// End of line (or of line buffer) met, colourise it
+			lineBuffer[linePos] = '\0';
+			ColouriseYAMLLine(lineBuffer, lineCurrent, linePos, startLine, i, *keywordLists[0], styler);
+			linePos = 0;
+			startLine = i + 1;
+			lineCurrent++;
+		}
+	}
+	if (linePos > 0) {	// Last line does not have ending characters
+		ColouriseYAMLLine(lineBuffer, lineCurrent, linePos, startLine, startPos + length - 1, *keywordLists[0], styler);
+	}
+}
+
+static bool IsCommentLine(int line, Accessor &styler) {
+	int pos = styler.LineStart(line);
+	if (styler[pos] == '#')
+		return true;
+	return false;
+}
+
+static void FoldYAMLDoc(unsigned int startPos, int length, int /*initStyle - unused*/,
+                      WordList *[], Accessor &styler) {
+	const int maxPos = startPos + length;
+	const int maxLines = styler.GetLine(maxPos - 1);             // Requested last line
+	const int docLines = styler.GetLine(styler.Length() - 1);  // Available last line
+	const bool foldComment = styler.GetPropertyInt("fold.comment.yaml") != 0;
+
+	// Backtrack to previous non-blank line so we can determine indent level
+	// for any white space lines
+	// and so we can fix any preceding fold level (which is why we go back
+	// at least one line in all cases)
+	int spaceFlags = 0;
+	int lineCurrent = styler.GetLine(startPos);
+	int indentCurrent = styler.IndentAmount(lineCurrent, &spaceFlags, NULL);
+	while (lineCurrent > 0) {
+		lineCurrent--;
+		indentCurrent = styler.IndentAmount(lineCurrent, &spaceFlags, NULL);
+		if (!(indentCurrent & SC_FOLDLEVELWHITEFLAG) &&
+		        (!IsCommentLine(lineCurrent, styler)))
+			break;
+	}
+	int indentCurrentLevel = indentCurrent & SC_FOLDLEVELNUMBERMASK;
+
+	// Set up initial loop state
+	int prevComment = 0;
+	if (lineCurrent >= 1)
+		prevComment = foldComment && IsCommentLine(lineCurrent - 1, styler);
+
+	// Process all characters to end of requested range
+	// or comment that hangs over the end of the range.  Cap processing in all cases
+	// to end of document (in case of unclosed comment at end).
+	while ((lineCurrent <= docLines) && ((lineCurrent <= maxLines) || prevComment)) {
+
+		// Gather info
+		int lev = indentCurrent;
+		int lineNext = lineCurrent + 1;
+		int indentNext = indentCurrent;
+		if (lineNext <= docLines) {
+			// Information about next line is only available if not at end of document
+			indentNext = styler.IndentAmount(lineNext, &spaceFlags, NULL);
+	}
+		const int comment = foldComment && IsCommentLine(lineCurrent, styler);
+		const int comment_start = (comment && !prevComment && (lineNext <= docLines) &&
+		                           IsCommentLine(lineNext, styler) && (lev > SC_FOLDLEVELBASE));
+		const int comment_continue = (comment && prevComment);
+		if (!comment)
+			indentCurrentLevel = indentCurrent & SC_FOLDLEVELNUMBERMASK;
+		if (indentNext & SC_FOLDLEVELWHITEFLAG)
+			indentNext = SC_FOLDLEVELWHITEFLAG | indentCurrentLevel;
+
+		if (comment_start) {
+			// Place fold point at start of a block of comments
+			lev |= SC_FOLDLEVELHEADERFLAG;
+		} else if (comment_continue) {
+			// Add level to rest of lines in the block
+			lev = lev + 1;
+		}
+
+		// Skip past any blank lines for next indent level info; we skip also
+		// comments (all comments, not just those starting in column 0)
+		// which effectively folds them into surrounding code rather
+		// than screwing up folding.
+
+		while ((lineNext < docLines) &&
+		        ((indentNext & SC_FOLDLEVELWHITEFLAG) ||
+		         (lineNext <= docLines && IsCommentLine(lineNext, styler)))) {
+
+			lineNext++;
+			indentNext = styler.IndentAmount(lineNext, &spaceFlags, NULL);
+		}
+
+		const int levelAfterComments = indentNext & SC_FOLDLEVELNUMBERMASK;
+		const int levelBeforeComments = Platform::Maximum(indentCurrentLevel,levelAfterComments);
+
+		// Now set all the indent levels on the lines we skipped
+		// Do this from end to start.  Once we encounter one line
+		// which is indented more than the line after the end of
+		// the comment-block, use the level of the block before
+
+		int skipLine = lineNext;
+		int skipLevel = levelAfterComments;
+
+		while (--skipLine > lineCurrent) {
+			int skipLineIndent = styler.IndentAmount(skipLine, &spaceFlags, NULL);
+
+			if ((skipLineIndent & SC_FOLDLEVELNUMBERMASK) > levelAfterComments)
+				skipLevel = levelBeforeComments;
+
+			int whiteFlag = skipLineIndent & SC_FOLDLEVELWHITEFLAG;
+
+			styler.SetLevel(skipLine, skipLevel | whiteFlag);
+		}
+
+		// Set fold header on non-comment line
+		if (!comment && !(indentCurrent & SC_FOLDLEVELWHITEFLAG) ) {
+			if ((indentCurrent & SC_FOLDLEVELNUMBERMASK) < (indentNext & SC_FOLDLEVELNUMBERMASK))
+				lev |= SC_FOLDLEVELHEADERFLAG;
+		}
+
+		// Keep track of block comment state of previous line
+		prevComment = comment_start || comment_continue;
+
+		// Set fold level for this line and move to next line
+		styler.SetLevel(lineCurrent, lev);
+		indentCurrent = indentNext;
+		lineCurrent = lineNext;
+	}
+
+	// NOTE: Cannot set level of last line here because indentCurrent doesn't have
+	// header flag set; the loop above is crafted to take care of this case!
+	//styler.SetLevel(lineCurrent, indentCurrent);
+}
+
+LexerModule lmYAML(SCLEX_YAML, ColouriseYAMLDoc, "yaml", FoldYAMLDoc, yamlWordListDesc);

Added: trunk/plugins/scintilla/scintilla/Partitioning.h
==============================================================================
--- (empty file)
+++ trunk/plugins/scintilla/scintilla/Partitioning.h	Wed Apr  8 07:16:46 2009
@@ -0,0 +1,184 @@
+// Scintilla source code edit control
+/** @file Partitioning.h
+ ** Data structure used to partition an interval. Used for holding line start/end positions.
+ **/
+// Copyright 1998-2007 by Neil Hodgson <neilh scintilla org>
+// The License.txt file describes the conditions under which this software may be distributed.
+
+#ifndef PARTITIONING_H
+#define PARTITIONING_H
+
+/// A split vector of integers with a method for adding a value to all elements 
+/// in a range.
+/// Used by the Partitioning class.
+
+class SplitVectorWithRangeAdd : public SplitVector<int> {
+public:
+	SplitVectorWithRangeAdd(int growSize_) {
+		SetGrowSize(growSize_);
+		ReAllocate(growSize_);
+	}
+	~SplitVectorWithRangeAdd() {
+	}
+	void RangeAddDelta(int start, int end, int delta) {
+		// end is 1 past end, so end-start is number of elements to change
+		int i = 0;
+		int rangeLength = end - start;
+		int range1Length = rangeLength;
+		int part1Left = part1Length - start;
+		if (range1Length > part1Left)
+			range1Length = part1Left;
+		while (i < range1Length) {
+			body[start++] += delta;
+			i++;
+		}
+		start += gapLength;
+		while (i < rangeLength) {
+			body[start++] += delta;
+			i++;
+		}
+	}
+};
+
+/// Divide an interval into multiple partitions.
+/// Useful for breaking a document down into sections such as lines.
+
+class Partitioning {
+private:
+	// To avoid calculating all the partition positions whenever any text is inserted
+	// there may be a step somewhere in the list.
+	int stepPartition;
+	int stepLength;
+	SplitVectorWithRangeAdd *body;
+
+	// Move step forward
+	void ApplyStep(int partitionUpTo) {
+		if (stepLength != 0) {
+			body->RangeAddDelta(stepPartition+1, partitionUpTo + 1, stepLength);
+		}
+		stepPartition = partitionUpTo;
+		if (stepPartition >= body->Length()-1) {
+			stepPartition = body->Length()-1;
+			stepLength = 0;
+		}
+	}
+
+	// Move step backward
+	void BackStep(int partitionDownTo) {
+		if (stepLength != 0) {
+			body->RangeAddDelta(partitionDownTo+1, stepPartition+1, -stepLength);
+		}
+		stepPartition = partitionDownTo;
+	}
+
+	void Allocate(int growSize) {
+		body = new SplitVectorWithRangeAdd(growSize);
+		stepPartition = 0;
+		stepLength = 0;
+		body->Insert(0, 0);	// This value stays 0 for ever
+		body->Insert(1, 0);	// This is the end of the first partition and will be the start of the second
+	}
+
+public:
+	Partitioning(int growSize) {
+		Allocate(growSize);
+	}
+
+	~Partitioning() {
+		delete body;
+		body = 0;
+	}
+
+	int Partitions() const {
+		return body->Length()-1;
+	}
+
+	void InsertPartition(int partition, int pos) {
+		if (stepPartition < partition) {
+			ApplyStep(partition);
+		}
+		body->Insert(partition, pos);
+		stepPartition++;
+	}
+
+	void SetPartitionStartPosition(int partition, int pos) {
+		ApplyStep(partition+1);
+		if ((partition < 0) || (partition > body->Length())) {
+			return;
+		}
+		body->SetValueAt(partition, pos);
+	}
+
+	void InsertText(int partitionInsert, int delta) {
+		// Point all the partitions after the insertion point further along in the buffer
+		if (stepLength != 0) {
+			if (partitionInsert >= stepPartition) {
+				// Fill in up to the new insertion point
+				ApplyStep(partitionInsert);
+				stepLength += delta;
+			} else if (partitionInsert >= (stepPartition - body->Length() / 10)) {
+				// Close to step but before so move step back
+				BackStep(partitionInsert);
+				stepLength += delta;
+			} else {
+				ApplyStep(body->Length()-1);
+				stepPartition = partitionInsert;
+				stepLength = delta;
+			}
+		} else {
+			stepPartition = partitionInsert;
+			stepLength = delta;
+		}
+	}
+
+	void RemovePartition(int partition) {
+		if (partition > stepPartition) {
+			ApplyStep(partition);
+			stepPartition--;
+		} else {
+			stepPartition--;
+		}
+		body->Delete(partition);
+	}
+
+	int PositionFromPartition(int partition) const {
+		PLATFORM_ASSERT(partition >= 0);
+		PLATFORM_ASSERT(partition < body->Length());
+		if ((partition < 0) || (partition >= body->Length())) {
+			return 0;
+		}
+		int pos = body->ValueAt(partition);
+		if (partition > stepPartition)
+			pos += stepLength;
+		return pos;
+	}
+
+	int PartitionFromPosition(int pos) {
+		if (body->Length() <= 1)
+			return 0;
+		if (pos >= (PositionFromPartition(body->Length()-1)))
+			return body->Length() - 1 - 1;
+		int lower = 0;
+		int upper = body->Length()-1;
+		do {
+			int middle = (upper + lower + 1) / 2; 	// Round high
+			int posMiddle = body->ValueAt(middle);
+			if (middle > stepPartition)
+				posMiddle += stepLength;
+			if (pos < posMiddle) {
+				upper = middle - 1;
+			} else {
+				lower = middle;
+			}
+		} while (lower < upper);
+		return lower;
+	}
+
+	void DeleteAll() {
+		int growSize = body->GetGrowSize();
+		delete body;
+		Allocate(growSize);
+	}
+};
+
+#endif

Added: trunk/plugins/scintilla/scintilla/README.sync
==============================================================================
--- (empty file)
+++ trunk/plugins/scintilla/scintilla/README.sync	Wed Apr  8 07:16:46 2009
@@ -0,0 +1,19 @@
+	
+	HOW TO UPDATE SCINTILLA in ANJUTA
+	
+	
+1 -	Checkout scintilla from CVS "in" the directory anjuta/scintilla (or 
+	make a symlink (ln -s from to) if you already have scintilla checkout elsewhere).
+	
+	cvs -z3 -d :pserver:anonymous cvs sourceforge net:/cvsroot/scintilla co \
+	scintilla
+
+
+2 -	Run: "make update-scintilla" 
+
+
+3 -	Run "cvs update" in /anjuta/scintilla/ directory. There you will notice
+	any newly added files (particulary LexXXX.cpp files). Add them in CVS.
+	
+	
+4 -	Proceed as usual: check for errors during build and commit.

Added: trunk/plugins/scintilla/scintilla/include/Accessor.h
==============================================================================
--- (empty file)
+++ trunk/plugins/scintilla/scintilla/include/Accessor.h	Wed Apr  8 07:16:46 2009
@@ -0,0 +1,79 @@
+// Scintilla source code edit control
+/** @file Accessor.h
+ ** Rapid easy access to contents of a Scintilla.
+ **/
+// Copyright 1998-2001 by Neil Hodgson <neilh scintilla org>
+// The License.txt file describes the conditions under which this software may be distributed.
+
+enum { wsSpace = 1, wsTab = 2, wsSpaceTab = 4, wsInconsistent=8};
+
+class Accessor;
+
+typedef bool (*PFNIsCommentLeader)(Accessor &styler, int pos, int len);
+
+/**
+ * Interface to data in a Scintilla.
+ */
+class Accessor {
+protected:
+	enum {extremePosition=0x7FFFFFFF};
+	/** @a bufferSize is a trade off between time taken to copy the characters
+	 * and retrieval overhead.
+	 * @a slopSize positions the buffer before the desired position
+	 * in case there is some backtracking. */
+	enum {bufferSize=4000, slopSize=bufferSize/8};
+	char buf[bufferSize+1];
+	int startPos;
+	int endPos;
+	int codePage;	
+
+	virtual bool InternalIsLeadByte(char ch)=0;
+	virtual void Fill(int position)=0;
+
+public:
+	Accessor() : startPos(extremePosition), endPos(0), codePage(0) {}
+	virtual ~Accessor() {}
+	char operator[](int position) {
+		if (position < startPos || position >= endPos) {
+			Fill(position);
+		}
+		return buf[position - startPos];
+	}
+	/** Safe version of operator[], returning a defined value for invalid position. */
+	char SafeGetCharAt(int position, char chDefault=' ') {
+		if (position < startPos || position >= endPos) {
+			Fill(position);
+			if (position < startPos || position >= endPos) {
+				// Position is outside range of document 
+				return chDefault;
+			}
+		}
+		return buf[position - startPos];
+	}
+	bool IsLeadByte(char ch) {
+		return codePage && InternalIsLeadByte(ch);
+	}
+	void SetCodePage(int codePage_) { codePage = codePage_; }
+
+	virtual bool Match(int pos, const char *s)=0;
+	virtual char StyleAt(int position)=0;
+	virtual int GetLine(int position)=0;
+	virtual int LineStart(int line)=0;
+	virtual int LevelAt(int line)=0;
+	virtual int Length()=0;
+	virtual void Flush()=0;
+	virtual int GetLineState(int line)=0;
+	virtual int SetLineState(int line, int state)=0;
+	virtual int GetPropertyInt(const char *key, int defaultValue=0)=0;
+	virtual char *GetProperties()=0;
+
+	// Style setting
+	virtual void StartAt(unsigned int start, char chMask=31)=0;
+	virtual void SetFlags(char chFlags_, char chWhile_)=0;
+	virtual unsigned int GetStartSegment()=0;
+	virtual void StartSegment(unsigned int pos)=0;
+	virtual void ColourTo(unsigned int pos, int chAttr)=0;
+	virtual void SetLevel(int line, int level)=0;
+	virtual int IndentAmount(int line, int *flags, PFNIsCommentLeader pfnIsCommentLeader = 0)=0;
+	virtual void IndicatorFill(int start, int end, int indicator, int value)=0;
+};

Added: trunk/plugins/scintilla/scintilla/include/Face.py
==============================================================================
--- (empty file)
+++ trunk/plugins/scintilla/scintilla/include/Face.py	Wed Apr  8 07:16:46 2009
@@ -0,0 +1,107 @@
+# Module for reading and parsing Scintilla.iface file
+import string
+
+def sanitiseLine(line):
+	if line[-1:] == '\n': line = line[:-1]
+	if string.find(line, "##") != -1:
+		line = line[:string.find(line, "##")]
+	line = string.strip(line)
+	return line
+	
+def decodeFunction(featureVal):
+	retType, rest = string.split(featureVal, " ", 1)
+	nameIdent, params = string.split(rest, "(")
+	name, value = string.split(nameIdent, "=")
+	params, rest = string.split(params, ")")
+	param1, param2 = string.split(params, ",")[0:2]
+	return retType, name, value, param1, param2
+	
+def decodeEvent(featureVal):
+	retType, rest = string.split(featureVal, " ", 1)
+	nameIdent, params = string.split(rest, "(")
+	name, value = string.split(nameIdent, "=")
+	return retType, name, value
+	
+def decodeParam(p):
+	param = string.strip(p)
+	type = ""
+	name = ""
+	value = ""
+	if " " in param:
+		type, nv = string.split(param, " ")
+		if "=" in nv:
+			name, value = string.split(nv, "=")
+		else:
+			name = nv
+	return type, name, value
+
+class Face:
+
+	def __init__(self):
+		self.order = []
+		self.features = {}
+		self.values = {}
+		self.events = {}
+		
+	def ReadFromFile(self, name):
+		currentCategory = ""
+		currentComment = []
+		currentCommentFinished = 0
+		file = open(name)
+		for line in file.readlines():
+			line = sanitiseLine(line)
+			if line:
+				if line[0] == "#":
+					if line[1] == " ":
+						if currentCommentFinished:
+							currentComment = []
+							currentCommentFinished = 0
+						currentComment.append(line[2:])
+				else:
+					currentCommentFinished = 1
+					featureType, featureVal = string.split(line, " ", 1)
+					if featureType in ["fun", "get", "set"]:
+						retType, name, value, param1, param2 = decodeFunction(featureVal)
+						p1 = decodeParam(param1)
+						p2 = decodeParam(param2)
+						self.features[name] = { 
+							"FeatureType": featureType, 
+							"ReturnType": retType,
+							"Value": value, 
+							"Param1Type": p1[0], "Param1Name": p1[1], "Param1Value": p1[2], 
+							"Param2Type": p2[0],	"Param2Name": p2[1], "Param2Value": p2[2],
+							"Category": currentCategory, "Comment": currentComment
+						}
+						if self.values.has_key(value):
+							raise "Duplicate value " + value + " " + name
+						self.values[value] = 1
+						self.order.append(name)
+					elif featureType == "evt":
+						retType, name, value = decodeEvent(featureVal)
+						self.features[name] = { 
+							"FeatureType": featureType, 
+							"ReturnType": retType,
+							"Value": value, 
+							"Category": currentCategory, "Comment": currentComment
+						}
+						if self.events.has_key(value):
+							raise "Duplicate event " + value + " " + name
+						self.events[value] = 1
+						self.order.append(name)
+					elif featureType == "cat":
+						currentCategory = featureVal
+					elif featureType == "val":
+						name, value = string.split(featureVal, "=", 1)
+						self.features[name] = { 
+							"FeatureType": featureType, 
+							"Category": currentCategory, 
+							"Value": value }
+						self.order.append(name)
+					elif featureType == "enu" or featureType == "lex":
+						name, value = string.split(featureVal, "=", 1)
+						self.features[name] = { 
+							"FeatureType": featureType, 
+							"Category": currentCategory, 
+							"Value": value }
+						self.order.append(name)
+

Added: trunk/plugins/scintilla/scintilla/include/HFacer.py
==============================================================================
--- (empty file)
+++ trunk/plugins/scintilla/scintilla/include/HFacer.py	Wed Apr  8 07:16:46 2009
@@ -0,0 +1,76 @@
+# HFacer.py - regenerate the Scintilla.h and SciLexer.h files from the Scintilla.iface interface
+# definition file.
+# The header files are copied to a temporary file apart from the section between a //++Autogenerated
+# comment and a //--Autogenerated comment which is generated by the printHFile and printLexHFile
+# functions. After the temporary file is created, it is copied back to the original file name.
+
+import string
+import sys
+import os
+import Face
+
+def Contains(s,sub):
+	return string.find(s, sub) != -1
+
+def printLexHFile(f,out):
+	for name in f.order:
+		v = f.features[name]
+		if v["FeatureType"] in ["val"]:
+			if Contains(name, "SCE_") or Contains(name, "SCLEX_"):
+				out.write("#define " + name + " " + v["Value"] + "\n")
+
+def printHFile(f,out):
+	for name in f.order:
+		v = f.features[name]
+		if v["Category"] != "Deprecated":
+			if v["FeatureType"] in ["fun", "get", "set"]:
+				featureDefineName = "SCI_" + string.upper(name)
+				out.write("#define " + featureDefineName + " " + v["Value"] + "\n")
+			elif v["FeatureType"] in ["evt"]:
+				featureDefineName = "SCN_" + string.upper(name)
+				out.write("#define " + featureDefineName + " " + v["Value"] + "\n")
+			elif v["FeatureType"] in ["val"]:
+				if not (Contains(name, "SCE_") or Contains(name, "SCLEX_")):
+					out.write("#define " + name + " " + v["Value"] + "\n")
+
+def CopyWithInsertion(input, output, genfn, definition):
+	copying = 1
+	for line in input.readlines():
+		if copying:
+			output.write(line)
+		if Contains(line, "//++Autogenerated"):
+			copying = 0
+			genfn(definition, output)
+		if Contains(line, "//--Autogenerated"):
+			copying = 1
+			output.write(line)
+
+def contents(filename):
+	f = file(filename)
+	t = f.read()
+	f.close()
+	return t
+
+def Regenerate(filename, genfn, definition):
+	inText = contents(filename)
+	tempname = "HFacer.tmp"
+	out = open(tempname,"w")
+	hfile = open(filename)
+	CopyWithInsertion(hfile, out, genfn, definition)
+	out.close()
+	hfile.close()
+	outText = contents(tempname)
+	if inText == outText:
+		os.unlink(tempname)
+	else:
+		os.unlink(filename)
+		os.rename(tempname, filename)
+
+f = Face.Face()
+try:
+	f.ReadFromFile("Scintilla.iface")
+	Regenerate("Scintilla.h", printHFile, f)
+	Regenerate("SciLexer.h", printLexHFile, f)
+	print "Maximum ID is", max([x for x in f.values if int(x) < 3000])
+except:
+	raise

Added: trunk/plugins/scintilla/scintilla/include/KeyWords.h
==============================================================================
--- (empty file)
+++ trunk/plugins/scintilla/scintilla/include/KeyWords.h	Wed Apr  8 07:16:46 2009
@@ -0,0 +1,90 @@
+// Scintilla source code edit control
+/** @file KeyWords.h
+ ** Colourise for particular languages.
+ **/
+// Copyright 1998-2001 by Neil Hodgson <neilh scintilla org>
+// The License.txt file describes the conditions under which this software may be distributed.
+
+#ifdef SCI_NAMESPACE
+namespace Scintilla {
+#endif
+
+typedef void (*LexerFunction)(unsigned int startPos, int lengthDoc, int initStyle,
+                  WordList *keywordlists[], Accessor &styler);
+                  
+/**
+ * A LexerModule is responsible for lexing and folding a particular language.
+ * The class maintains a list of LexerModules which can be searched to find a
+ * module appropriate to a particular language.
+ */
+class LexerModule {
+protected:
+	const LexerModule *next;
+	int language;
+	LexerFunction fnLexer;
+	LexerFunction fnFolder;
+	const char * const * wordListDescriptions;
+	int styleBits;
+
+	static const LexerModule *base;
+	static int nextLanguage;
+
+public:
+	const char *languageName;
+	LexerModule(int language_, 
+		LexerFunction fnLexer_, 
+		const char *languageName_=0, 
+		LexerFunction fnFolder_=0,
+		const char * const wordListDescriptions_[] = NULL,
+		int styleBits_=5);
+	virtual ~LexerModule() {
+	}
+	int GetLanguage() const { return language; }
+
+	// -1 is returned if no WordList information is available
+	int GetNumWordLists() const;
+	const char *GetWordListDescription(int index) const;
+
+	int GetStyleBitsNeeded() const;
+
+	virtual void Lex(unsigned int startPos, int lengthDoc, int initStyle,
+                  WordList *keywordlists[], Accessor &styler) const;
+	virtual void Fold(unsigned int startPos, int lengthDoc, int initStyle,
+                  WordList *keywordlists[], Accessor &styler) const;
+	static const LexerModule *Find(int language);
+	static const LexerModule *Find(const char *languageName);
+};
+
+#ifdef SCI_NAMESPACE
+}
+#endif
+
+/**
+ * Check if a character is a space.
+ * This is ASCII specific but is safe with chars >= 0x80.
+ */
+inline bool isspacechar(unsigned char ch) {
+    return (ch == ' ') || ((ch >= 0x09) && (ch <= 0x0d));
+}
+
+inline bool iswordchar(char ch) {
+	return isascii(ch) && (isalnum(ch) || ch == '.' || ch == '_');
+}
+
+inline bool iswordstart(char ch) {
+	return isascii(ch) && (isalnum(ch) || ch == '_');
+}
+
+inline bool isoperator(char ch) {
+	if (isascii(ch) && isalnum(ch))
+		return false;
+	// '.' left out as it is used to make up numbers
+	if (ch == '%' || ch == '^' || ch == '&' || ch == '*' ||
+	        ch == '(' || ch == ')' || ch == '-' || ch == '+' ||
+	        ch == '=' || ch == '|' || ch == '{' || ch == '}' ||
+	        ch == '[' || ch == ']' || ch == ':' || ch == ';' ||
+	        ch == '<' || ch == '>' || ch == ',' || ch == '/' ||
+	        ch == '?' || ch == '!' || ch == '.' || ch == '~')
+		return true;
+	return false;
+}

Added: trunk/plugins/scintilla/scintilla/include/Makefile.am
==============================================================================
--- (empty file)
+++ trunk/plugins/scintilla/scintilla/include/Makefile.am	Wed Apr  8 07:16:46 2009
@@ -0,0 +1,20 @@
+
+## Process this file with automake to produce Makefile.in
+
+scintilla_AM_CPPFLAGS = \
+	Accessor.h \
+	KeyWords.h \
+	Platform.h \
+	PropSet.h \
+	SciLexer.h \
+	Scintilla.h \
+	ScintillaWidget.h \
+	WindowAccessor.h \
+	SString.h
+
+EXTRA_DIST = $(scintilla_AM_CPPFLAGS) \
+	Face.py \
+	HFacer.py \
+	Scintilla.iface
+
+

Added: trunk/plugins/scintilla/scintilla/include/Makefile.in
==============================================================================
--- (empty file)
+++ trunk/plugins/scintilla/scintilla/include/Makefile.in	Wed Apr  8 07:16:46 2009
@@ -0,0 +1,414 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ SET_MAKE@
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ../../../..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = plugins/scintilla/scintilla/include
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+SOURCES =
+DIST_SOURCES =
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ALL_LINGUAS = @ALL_LINGUAS@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AM_CFLAGS = @AM_CFLAGS@
+AM_CXXFLAGS = @AM_CXXFLAGS@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BINUTILS_REQUIRED = @BINUTILS_REQUIRED@
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DATADIRNAME = @DATADIRNAME@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+EXTRA_CFLAGS = @EXTRA_CFLAGS@
+FGREP = @FGREP@
+GCONFTOOL = @GCONFTOOL@
+GCONF_SCHEMAS_INSTALL_FALSE = @GCONF_SCHEMAS_INSTALL_FALSE@
+GCONF_SCHEMAS_INSTALL_TRUE = @GCONF_SCHEMAS_INSTALL_TRUE@
+GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@
+GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+GMOFILES = @GMOFILES@
+GMSGFMT = @GMSGFMT@
+GRAPHVIZ_CFLAGS = @GRAPHVIZ_CFLAGS@
+GRAPHVIZ_LIBS = @GRAPHVIZ_LIBS@
+GREP = @GREP@
+HAVE_GRAPHVIZ_FALSE = @HAVE_GRAPHVIZ_FALSE@
+HAVE_GRAPHVIZ_TRUE = @HAVE_GRAPHVIZ_TRUE@
+HAVE_PLUGIN_SCINTILLA_FALSE = @HAVE_PLUGIN_SCINTILLA_FALSE@
+HAVE_PLUGIN_SCINTILLA_TRUE = @HAVE_PLUGIN_SCINTILLA_TRUE@
+HAVE_PLUGIN_VALGRIND_FALSE = @HAVE_PLUGIN_VALGRIND_FALSE@
+HAVE_PLUGIN_VALGRIND_TRUE = @HAVE_PLUGIN_VALGRIND_TRUE@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INSTOBJEXT = @INSTOBJEXT@
+INTLLIBS = @INTLLIBS@
+INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@
+INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@
+INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@
+INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
+INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@
+INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@
+INTLTOOL_MERGE = @INTLTOOL_MERGE@
+INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@
+INTLTOOL_PERL = @INTLTOOL_PERL@
+INTLTOOL_POLICY_RULE = @INTLTOOL_POLICY_RULE@
+INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@
+INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@
+INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@
+INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@
+INTLTOOL_SERVICE_RULE = @INTLTOOL_SERVICE_RULE@
+INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@
+INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@
+INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@
+INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@
+INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@
+INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@
+INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBANJUTA_CFLAGS = @LIBANJUTA_CFLAGS@
+LIBANJUTA_LIBS = @LIBANJUTA_LIBS@
+LIBGRAPHVIZ_REQUIRED = @LIBGRAPHVIZ_REQUIRED@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
+MAKEINFO = @MAKEINFO@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MSGFMT = @MSGFMT@
+MSGFMT_OPTS = @MSGFMT_OPTS@
+MSGMERGE = @MSGMERGE@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PLUGIN_VALGRIND_LIBS = @PLUGIN_VALGRIND_LIBS@
+POFILES = @POFILES@
+POSUB = @POSUB@
+PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
+PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+WARN_CFLAGS = @WARN_CFLAGS@
+WARN_CXXFLAGS = @WARN_CXXFLAGS@
+XGETTEXT = @XGETTEXT@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+anjuta_data_dir = @anjuta_data_dir@
+anjuta_glade_dir = @anjuta_glade_dir@
+anjuta_image_dir = @anjuta_image_dir@
+anjuta_plugin_dir = @anjuta_plugin_dir@
+anjuta_ui_dir = @anjuta_ui_dir@
+anjutadatadir = @anjutadatadir@
+anjutalibdir = @anjutalibdir@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+scintilla_AM_CPPFLAGS = \
+	Accessor.h \
+	KeyWords.h \
+	Platform.h \
+	PropSet.h \
+	SciLexer.h \
+	Scintilla.h \
+	ScintillaWidget.h \
+	WindowAccessor.h \
+	SString.h
+
+EXTRA_DIST = $(scintilla_AM_CPPFLAGS) \
+	Face.py \
+	HFacer.py \
+	Scintilla.iface
+
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  plugins/scintilla/scintilla/include/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu  plugins/scintilla/scintilla/include/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+distclean-libtool:
+	-rm -f libtool
+uninstall-info-am:
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkdir_p) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-libtool
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-exec-am:
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-info-am
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+	distclean distclean-generic distclean-libtool distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-data install-data-am install-exec install-exec-am \
+	install-info install-info-am install-man install-strip \
+	installcheck installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-generic \
+	mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \
+	uninstall-info-am
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:

Added: trunk/plugins/scintilla/scintilla/include/Platform.h
==============================================================================
--- (empty file)
+++ trunk/plugins/scintilla/scintilla/include/Platform.h	Wed Apr  8 07:16:46 2009
@@ -0,0 +1,555 @@
+// Scintilla source code edit control
+/** @file Platform.h
+ ** Interface to platform facilities. Also includes some basic utilities.
+ ** Implemented in PlatGTK.cxx for GTK+/Linux, PlatWin.cxx for Windows, and PlatWX.cxx for wxWindows.
+ **/
+// Copyright 1998-2003 by Neil Hodgson <neilh scintilla org>
+// The License.txt file describes the conditions under which this software may be distributed.
+
+#ifndef PLATFORM_H
+#define PLATFORM_H
+
+// PLAT_GTK = GTK+ on Linux or Win32
+// PLAT_GTK_WIN32 is defined additionally when running PLAT_GTK under Win32
+// PLAT_WIN = Win32 API on Win32 OS
+// PLAT_WX is wxWindows on any supported platform
+
+#define PLAT_GTK 0
+#define PLAT_GTK_WIN32 0
+#define PLAT_MACOSX 0
+#define PLAT_WIN 0
+#define PLAT_WX  0
+#define PLAT_FOX 0
+
+#if defined(FOX)
+#undef PLAT_FOX
+#define PLAT_FOX 1
+
+#elif defined(__WX__)
+#undef PLAT_WX
+#define PLAT_WX  1
+
+#elif defined(GTK)
+#undef PLAT_GTK
+#define PLAT_GTK 1
+
+#if defined(__WIN32__) || defined(_MSC_VER)
+#undef PLAT_GTK_WIN32
+#define PLAT_GTK_WIN32 1
+#endif
+
+#elif defined(MACOSX)
+#undef PLAT_MACOSX
+#define PLAT_MACOSX 1
+
+#else
+#undef PLAT_WIN
+#define PLAT_WIN 1
+
+#endif
+
+#ifdef SCI_NAMESPACE
+namespace Scintilla {
+#endif
+
+// Underlying the implementation of the platform classes are platform specific types.
+// Sometimes these need to be passed around by client code so they are defined here
+
+typedef void *FontID;
+typedef void *SurfaceID;
+typedef void *WindowID;
+typedef void *MenuID;
+typedef void *TickerID;
+typedef void *Function;
+typedef void *IdlerID;
+
+/**
+ * A geometric point class.
+ * Point is exactly the same as the Win32 POINT and GTK+ GdkPoint so can be used interchangeably.
+ */
+class Point {
+public:
+	int x;
+	int y;
+
+	explicit Point(int x_=0, int y_=0) : x(x_), y(y_) {
+	}
+
+	// Other automatically defined methods (assignment, copy constructor, destructor) are fine
+
+	static Point FromLong(long lpoint);
+};
+
+/**
+ * A geometric rectangle class.
+ * PRectangle is exactly the same as the Win32 RECT so can be used interchangeably.
+ * PRectangles contain their top and left sides, but not their right and bottom sides.
+ */
+class PRectangle {
+public:
+	int left;
+	int top;
+	int right;
+	int bottom;
+
+	PRectangle(int left_=0, int top_=0, int right_=0, int bottom_ = 0) :
+		left(left_), top(top_), right(right_), bottom(bottom_) {
+	}
+
+	// Other automatically defined methods (assignment, copy constructor, destructor) are fine
+
+	bool operator==(PRectangle &rc) {
+		return (rc.left == left) && (rc.right == right) &&
+			(rc.top == top) && (rc.bottom == bottom);
+	}
+	bool Contains(Point pt) {
+		return (pt.x >= left) && (pt.x <= right) &&
+			(pt.y >= top) && (pt.y <= bottom);
+	}
+	bool Contains(PRectangle rc) {
+		return (rc.left >= left) && (rc.right <= right) &&
+			(rc.top >= top) && (rc.bottom <= bottom);
+	}
+	bool Intersects(PRectangle other) {
+		return (right > other.left) && (left < other.right) &&
+			(bottom > other.top) && (top < other.bottom);
+	}
+	void Move(int xDelta, int yDelta) {
+		left += xDelta;
+		top += yDelta;
+		right += xDelta;
+		bottom += yDelta;
+	}
+	int Width() { return right - left; }
+	int Height() { return bottom - top; }
+	bool Empty() {
+		return (Height() <= 0) || (Width() <= 0);
+	}
+};
+
+/**
+ * In some circumstances, including Win32 in paletted mode and GTK+, each colour
+ * must be allocated before use. The desired colours are held in the ColourDesired class,
+ * and after allocation the allocation entry is stored in the ColourAllocated class. In other
+ * circumstances, such as Win32 in true colour mode, the allocation process just copies
+ * the RGB values from the desired to the allocated class.
+ * As each desired colour requires allocation before it can be used, the ColourPair class
+ * holds both a ColourDesired and a ColourAllocated
+ * The Palette class is responsible for managing the palette of colours which contains a
+ * list of ColourPair objects and performs the allocation.
+ */
+
+/**
+ * Holds a desired RGB colour.
+ */
+class ColourDesired {
+	long co;
+public:
+	ColourDesired(long lcol=0) {
+		co = lcol;
+	}
+
+	ColourDesired(unsigned int red, unsigned int green, unsigned int blue) {
+		Set(red, green, blue);
+	}
+
+	bool operator==(const ColourDesired &other) const {
+		return co == other.co;
+	}
+
+	void Set(long lcol) {
+		co = lcol;
+	}
+
+	void Set(unsigned int red, unsigned int green, unsigned int blue) {
+		co = red | (green << 8) | (blue << 16);
+	}
+
+	static inline unsigned int ValueOfHex(const char ch) {
+		if (ch >= '0' && ch <= '9')
+			return ch - '0';
+		else if (ch >= 'A' && ch <= 'F')
+			return ch - 'A' + 10;
+		else if (ch >= 'a' && ch <= 'f')
+			return ch - 'a' + 10;
+		else
+			return 0;
+	}
+
+	void Set(const char *val) {
+		if (*val == '#') {
+			val++;
+		}
+		unsigned int r = ValueOfHex(val[0]) * 16 + ValueOfHex(val[1]);
+		unsigned int g = ValueOfHex(val[2]) * 16 + ValueOfHex(val[3]);
+		unsigned int b = ValueOfHex(val[4]) * 16 + ValueOfHex(val[5]);
+		Set(r, g, b);
+	}
+
+	long AsLong() const {
+		return co;
+	}
+
+	unsigned int GetRed() {
+		return co & 0xff;
+	}
+
+	unsigned int GetGreen() {
+		return (co >> 8) & 0xff;
+	}
+
+	unsigned int GetBlue() {
+		return (co >> 16) & 0xff;
+	}
+};
+
+/**
+ * Holds an allocated RGB colour which may be an approximation to the desired colour.
+ */
+class ColourAllocated {
+	long coAllocated;
+
+public:
+
+	ColourAllocated(long lcol=0) {
+		coAllocated = lcol;
+	}
+
+	void Set(long lcol) {
+		coAllocated = lcol;
+	}
+
+	long AsLong() const {
+		return coAllocated;
+	}
+};
+
+/**
+ * Colour pairs hold a desired colour and an allocated colour.
+ */
+struct ColourPair {
+	ColourDesired desired;
+	ColourAllocated allocated;
+
+	ColourPair(ColourDesired desired_=ColourDesired(0,0,0)) {
+		desired = desired_;
+		allocated.Set(desired.AsLong());
+	}
+	void Copy() {
+		allocated.Set(desired.AsLong());
+	}
+};
+
+class Window;	// Forward declaration for Palette
+
+/**
+ * Colour palette management.
+ */
+class Palette {
+	int used;
+	int size;
+	ColourPair *entries;
+#if PLAT_GTK
+	void *allocatedPalette; // GdkColor *
+	int allocatedLen;
+#endif
+	// Private so Palette objects can not be copied
+	Palette(const Palette &) {}
+	Palette &operator=(const Palette &) { return *this; }
+public:
+#if PLAT_WIN
+	void *hpal;
+#endif
+	bool allowRealization;
+
+	Palette();
+	~Palette();
+
+	void Release();
+
+	/**
+	 * This method either adds a colour to the list of wanted colours (want==true)
+	 * or retrieves the allocated colour back to the ColourPair.
+	 * This is one method to make it easier to keep the code for wanting and retrieving in sync.
+	 */
+	void WantFind(ColourPair &cp, bool want);
+
+	void Allocate(Window &w);
+};
+
+/**
+ * Font management.
+ */
+class Font {
+protected:
+	FontID id;
+#if PLAT_WX
+	int ascent;
+#endif
+	// Private so Font objects can not be copied
+	Font(const Font &) {}
+	Font &operator=(const Font &) { id=0; return *this; }
+public:
+	Font();
+	virtual ~Font();
+
+	virtual void Create(const char *faceName, int characterSet, int size,
+		bool bold, bool italic, bool extraFontFlag=false);
+	virtual void Release();
+
+	FontID GetID() { return id; }
+	// Alias another font - caller guarantees not to Release
+	void SetID(FontID id_) { id = id_; }
+	friend class Surface;
+        friend class SurfaceImpl;
+};
+
+/**
+ * A surface abstracts a place to draw.
+ */
+class Surface {
+private:
+	// Private so Surface objects can not be copied
+	Surface(const Surface &) {}
+	Surface &operator=(const Surface &) { return *this; }
+public:
+	Surface() {};
+	virtual ~Surface() {};
+	static Surface *Allocate();
+
+	virtual void Init(WindowID wid)=0;
+	virtual void Init(SurfaceID sid, WindowID wid)=0;
+	virtual void InitPixMap(int width, int height, Surface *surface_, WindowID wid)=0;
+
+	virtual void Release()=0;
+	virtual bool Initialised()=0;
+	virtual void PenColour(ColourAllocated fore)=0;
+	virtual int LogPixelsY()=0;
+	virtual int DeviceHeightFont(int points)=0;
+	virtual void MoveTo(int x_, int y_)=0;
+	virtual void LineTo(int x_, int y_)=0;
+	virtual void Polygon(Point *pts, int npts, ColourAllocated fore, ColourAllocated back)=0;
+	virtual void RectangleDraw(PRectangle rc, ColourAllocated fore, ColourAllocated back)=0;
+	virtual void FillRectangle(PRectangle rc, ColourAllocated back)=0;
+	virtual void FillRectangle(PRectangle rc, Surface &surfacePattern)=0;
+	virtual void RoundedRectangle(PRectangle rc, ColourAllocated fore, ColourAllocated back)=0;
+	virtual void AlphaRectangle(PRectangle rc, int cornerSize, ColourAllocated fill, int alphaFill,
+		ColourAllocated outline, int alphaOutline, int flags)=0;
+	virtual void Ellipse(PRectangle rc, ColourAllocated fore, ColourAllocated back)=0;
+	virtual void Copy(PRectangle rc, Point from, Surface &surfaceSource)=0;
+
+	virtual void DrawTextNoClip(PRectangle rc, Font &font_, int ybase, const char *s, int len, ColourAllocated fore, ColourAllocated back)=0;
+	virtual void DrawTextClipped(PRectangle rc, Font &font_, int ybase, const char *s, int len, ColourAllocated fore, ColourAllocated back)=0;
+	virtual void DrawTextTransparent(PRectangle rc, Font &font_, int ybase, const char *s, int len, ColourAllocated fore)=0;
+	virtual void MeasureWidths(Font &font_, const char *s, int len, int *positions)=0;
+	virtual int WidthText(Font &font_, const char *s, int len)=0;
+	virtual int WidthChar(Font &font_, char ch)=0;
+	virtual int Ascent(Font &font_)=0;
+	virtual int Descent(Font &font_)=0;
+	virtual int InternalLeading(Font &font_)=0;
+	virtual int ExternalLeading(Font &font_)=0;
+	virtual int Height(Font &font_)=0;
+	virtual int AverageCharWidth(Font &font_)=0;
+
+	virtual int SetPalette(Palette *pal, bool inBackGround)=0;
+	virtual void SetClip(PRectangle rc)=0;
+	virtual void FlushCachedState()=0;
+
+	virtual void SetUnicodeMode(bool unicodeMode_)=0;
+	virtual void SetDBCSMode(int codePage)=0;
+};
+
+/**
+ * A simple callback action passing one piece of untyped user data.
+ */
+typedef void (*CallBackAction)(void*);
+
+/**
+ * Class to hide the details of window manipulation.
+ * Does not own the window which will normally have a longer life than this object.
+ */
+class Window {
+protected:
+	WindowID id;
+#if PLAT_MACOSX
+	void *windowRef;
+	void *control;
+#endif
+public:
+	Window() : id(0), cursorLast(cursorInvalid) {
+#if PLAT_MACOSX
+	  windowRef = 0;
+	  control = 0;
+#endif
+	}
+	Window(const Window &source) : id(source.id), cursorLast(cursorInvalid) {
+#if PLAT_MACOSX
+	  windowRef = 0;
+	  control = 0;
+#endif
+	}
+	virtual ~Window();
+	Window &operator=(WindowID id_) {
+		id = id_;
+		return *this;
+	}
+	WindowID GetID() const { return id; }
+	bool Created() const { return id != 0; }
+	void Destroy();
+	bool HasFocus();
+	PRectangle GetPosition();
+	void SetPosition(PRectangle rc);
+	void SetPositionRelative(PRectangle rc, Window relativeTo);
+	PRectangle GetClientPosition();
+	void Show(bool show=true);
+	void InvalidateAll();
+	void InvalidateRectangle(PRectangle rc);
+	virtual void SetFont(Font &font);
+	enum Cursor { cursorInvalid, cursorText, cursorArrow, cursorUp, cursorWait, cursorHoriz, cursorVert, cursorReverseArrow, cursorHand };
+	void SetCursor(Cursor curs);
+	void SetTitle(const char *s);
+	PRectangle GetMonitorRect(Point pt);
+#if PLAT_MACOSX
+	void SetWindow(void *ref) { windowRef = ref; };
+	void SetControl(void *_control) { control = _control; };
+#endif
+private:
+	Cursor cursorLast;
+};
+
+/**
+ * Listbox management.
+ */
+
+class ListBox : public Window {
+public:
+	ListBox();
+	virtual ~ListBox();
+	static ListBox *Allocate();
+
+	virtual void SetFont(Font &font)=0;
+	virtual void Create(Window &parent, int ctrlID, Point location, int lineHeight_, bool unicodeMode_)=0;
+	virtual void SetAverageCharWidth(int width)=0;
+	virtual void SetVisibleRows(int rows)=0;
+	virtual int GetVisibleRows() const=0;
+	virtual PRectangle GetDesiredRect()=0;
+	virtual int CaretFromEdge()=0;
+	virtual void Clear()=0;
+	virtual void Append(char *s, int type = -1)=0;
+	virtual int Length()=0;
+	virtual void Select(int n)=0;
+	virtual int GetSelection()=0;
+	virtual int Find(const char *prefix)=0;
+	virtual void GetValue(int n, char *value, int len)=0;
+	virtual void RegisterImage(int type, const char *xpm_data)=0;
+	virtual void ClearRegisteredImages()=0;
+	virtual void SetDoubleClickAction(CallBackAction, void *)=0;
+	virtual void SetList(const char* list, char separator, char typesep)=0;
+};
+
+/**
+ * Menu management.
+ */
+class Menu {
+	MenuID id;
+public:
+	Menu();
+	MenuID GetID() { return id; }
+	void CreatePopUp();
+	void Destroy();
+	void Show(Point pt, Window &w);
+};
+
+class ElapsedTime {
+	long bigBit;
+	long littleBit;
+public:
+	ElapsedTime();
+	double Duration(bool reset=false);
+};
+
+/**
+ * Dynamic Library (DLL/SO/...) loading
+ */
+class DynamicLibrary {
+public:
+	virtual ~DynamicLibrary() {};
+
+	/// @return Pointer to function "name", or NULL on failure.
+	virtual Function FindFunction(const char *name) = 0;
+
+	/// @return true if the library was loaded successfully.
+	virtual bool IsValid() = 0;
+
+	/// @return An instance of a DynamicLibrary subclass with "modulePath" loaded.
+	static DynamicLibrary *Load(const char *modulePath);
+};
+
+/**
+ * Platform class used to retrieve system wide parameters such as double click speed
+ * and chrome colour. Not a creatable object, more of a module with several functions.
+ */
+class Platform {
+	// Private so Platform objects can not be copied
+	Platform(const Platform &) {}
+	Platform &operator=(const Platform &) { return *this; }
+public:
+	// Should be private because no new Platforms are ever created
+	// but gcc warns about this
+	Platform() {}
+	~Platform() {}
+	static ColourDesired Chrome();
+	static ColourDesired ChromeHighlight();
+	static const char *DefaultFont();
+	static int DefaultFontSize();
+	static unsigned int DoubleClickTime();
+	static bool MouseButtonBounce();
+	static void DebugDisplay(const char *s);
+	static bool IsKeyDown(int key);
+	static long SendScintilla(
+		WindowID w, unsigned int msg, unsigned long wParam=0, long lParam=0);
+	static long SendScintillaPointer(
+		WindowID w, unsigned int msg, unsigned long wParam=0, void *lParam=0);
+	static bool IsDBCSLeadByte(int codePage, char ch);
+	static int DBCSCharLength(int codePage, const char *s);
+	static int DBCSCharMaxLength();
+
+	// These are utility functions not really tied to a platform
+	static int Minimum(int a, int b);
+	static int Maximum(int a, int b);
+	// Next three assume 16 bit shorts and 32 bit longs
+	static long LongFromTwoShorts(short a,short b) {
+		return (a) | ((b) << 16);
+	}
+	static short HighShortFromLong(long x) {
+		return static_cast<short>(x >> 16);
+	}
+	static short LowShortFromLong(long x) {
+		return static_cast<short>(x & 0xffff);
+	}
+	static void DebugPrintf(const char *format, ...);
+	static bool ShowAssertionPopUps(bool assertionPopUps_);
+	static void Assert(const char *c, const char *file, int line);
+	static int Clamp(int val, int minVal, int maxVal);
+};
+
+#ifdef  NDEBUG
+#define PLATFORM_ASSERT(c) ((void)0)
+#else
+#ifdef SCI_NAMESPACE
+#define PLATFORM_ASSERT(c) ((c) ? (void)(0) : Scintilla::Platform::Assert(#c, __FILE__, __LINE__))
+#else
+#define PLATFORM_ASSERT(c) ((c) ? (void)(0) : Platform::Assert(#c, __FILE__, __LINE__))
+#endif
+#endif
+
+#ifdef SCI_NAMESPACE
+}
+#endif
+
+// Shut up annoying Visual C++ warnings:
+#ifdef _MSC_VER
+#pragma warning(disable: 4244 4309 4514 4710)
+#endif
+
+#endif

Added: trunk/plugins/scintilla/scintilla/include/PropSet.h
==============================================================================
--- (empty file)
+++ trunk/plugins/scintilla/scintilla/include/PropSet.h	Wed Apr  8 07:16:46 2009
@@ -0,0 +1,104 @@
+// Scintilla source code edit control
+/** @file PropSet.h
+ ** A Java style properties file module.
+ **/
+// Copyright 1998-2002 by Neil Hodgson <neilh scintilla org>
+// The License.txt file describes the conditions under which this software may be distributed.
+
+#ifndef PROPSET_H
+#define PROPSET_H
+#include "SString.h"
+
+bool EqualCaseInsensitive(const char *a, const char *b);
+
+bool isprefix(const char *target, const char *prefix);
+
+#ifdef SCI_NAMESPACE
+namespace Scintilla {
+#endif
+
+struct Property {
+	unsigned int hash;
+	char *key;
+	char *val;
+	Property *next;
+	Property() : hash(0), key(0), val(0), next(0) {}
+};
+
+/**
+ */
+class PropSet {
+protected:
+	enum { hashRoots=31 };
+	Property *props[hashRoots];
+	Property *enumnext;
+	int enumhash;
+	static unsigned int HashString(const char *s, size_t len) {
+		unsigned int ret = 0;
+		while (len--) {
+			ret <<= 4;
+			ret ^= *s;
+			s++;
+		}
+		return ret;
+	}
+
+public:
+	PropSet *superPS;
+	PropSet();
+	~PropSet();
+	void Set(const char *key, const char *val, int lenKey=-1, int lenVal=-1);
+	void Set(const char *keyVal);
+	void Unset(const char *key, int lenKey=-1);
+	void SetMultiple(const char *s);
+	SString Get(const char *key) const;
+	SString GetExpanded(const char *key) const;
+	SString Expand(const char *withVars, int maxExpands=100) const;
+	int GetInt(const char *key, int defaultValue=0) const;
+	void Clear();
+	char *ToString() const;	// Caller must delete[] the return value
+
+private:
+	// copy-value semantics not implemented
+	PropSet(const PropSet &copy);
+	void operator=(const PropSet &assign);
+};
+
+/**
+ */
+class WordList {
+public:
+	// Each word contains at least one character - a empty word acts as sentinel at the end.
+	char **words;
+	char *list;
+	int len;
+	bool onlyLineEnds;	///< Delimited by any white space or only line ends
+	bool sorted;
+	int starts[256];
+	WordList(bool onlyLineEnds_ = false) :
+		words(0), list(0), len(0), onlyLineEnds(onlyLineEnds_),
+		sorted(false)
+		{}
+	~WordList() { Clear(); }
+	operator bool() { return len ? true : false; }
+	void Clear();
+	void Set(const char *s);
+	bool InList(const char *s);
+	bool InListAbbreviated(const char *s, const char marker);
+};
+
+inline bool IsAlphabetic(unsigned int ch) {
+	return ((ch >= 'A') && (ch <= 'Z')) || ((ch >= 'a') && (ch <= 'z'));
+}
+
+#ifdef SCI_NAMESPACE
+}
+#endif
+
+#ifdef _MSC_VER
+// Visual C++ doesn't like the private copy idiom for disabling
+// the default copy constructor and operator=, but it's fine.
+#pragma warning(disable: 4511 4512)
+#endif
+
+#endif

Added: trunk/plugins/scintilla/scintilla/include/SString.h
==============================================================================
--- (empty file)
+++ trunk/plugins/scintilla/scintilla/include/SString.h	Wed Apr  8 07:16:46 2009
@@ -0,0 +1,307 @@
+// SciTE - Scintilla based Text Editor
+/** @file SString.h
+ ** A simple string class.
+ **/
+// Copyright 1998-2004 by Neil Hodgson <neilh scintilla org>
+// The License.txt file describes the conditions under which this software may be distributed.
+
+#ifndef SSTRING_H
+#define SSTRING_H
+
+
+#include <string.h>
+
+// These functions are implemented because each platform calls them something different.
+int CompareCaseInsensitive(const char *a, const char *b);
+int CompareNCaseInsensitive(const char *a, const char *b, size_t len);
+bool EqualCaseInsensitive(const char *a, const char *b);
+
+#ifdef SCI_NAMESPACE
+namespace Scintilla {
+#endif
+
+// Define another string class.
+// While it would be 'better' to use std::string, that doubles the executable size.
+// An SString may contain embedded nul characters.
+
+/**
+ * Base class from which the two other classes (SBuffer & SString)
+ * are derived.
+ */
+class SContainer {
+public:
+	/** Type of string lengths (sizes) and positions (indexes). */
+	typedef size_t lenpos_t;
+	/** Out of bounds value indicating that the string argument should be measured. */
+	enum { measure_length=0xffffffffU};
+
+protected:
+	char *s;				///< The C string
+	lenpos_t sSize;			///< The size of the buffer, less 1: ie. the maximum size of the string
+
+	SContainer() : s(0), sSize(0) {}
+	~SContainer() {
+		delete []s;	// Suppose it was allocated using StringAllocate
+		s = 0;
+		sSize = 0;
+	}
+	/** Size of buffer. */
+	lenpos_t size() const {
+		if (s) {
+			return sSize;
+		} else {
+			return 0;
+		}
+	}
+public:
+	/**
+	 * Allocate uninitialized memory big enough to fit a string of the given length.
+	 * @return the pointer to the new string
+	 */
+	static char *StringAllocate(lenpos_t len);
+	/**
+	 * Duplicate a buffer/C string.
+	 * Allocate memory of the given size, or big enough to fit the string if length isn't given;
+	 * then copy the given string in the allocated memory.
+	 * @return the pointer to the new string
+	 */
+	static char *StringAllocate(
+		const char *s,			///< The string to duplicate
+		lenpos_t len=measure_length);	///< The length of memory to allocate. Optional.
+};
+
+
+/**
+ * @brief A string buffer class.
+ *
+ * Main use is to ask an API the length of a string it can provide,
+ * then to allocate a buffer of the given size, and to provide this buffer
+ * to the API to put the string.
+ * This class is intended to be shortlived, to be transformed as SString
+ * as soon as it holds the string, so it has little members.
+ * Note: we assume the buffer is filled by the API. If the length can be shorter,
+ * we should set sLen to strlen(sb.ptr()) in related SString constructor and assignment.
+ */
+class SBuffer : protected SContainer {
+public:
+	SBuffer(lenpos_t len) {
+		s = StringAllocate(len);
+		if (s) {
+			*s = '\0';
+		sSize = len;
+		} else {
+			sSize = 0;
+		}
+	}
+private:
+	/// Copy constructor
+	// Here only to be on the safe size, user should avoid returning SBuffer values.
+	SBuffer(const SBuffer &source) : SContainer() {
+		s = StringAllocate(source.s, source.sSize);
+		sSize = (s) ? source.sSize : 0;
+	}
+	/// Default assignment operator
+	// Same here, shouldn't be used
+	SBuffer &operator=(const SBuffer &source) {
+		if (this != &source) {
+			delete []s;
+			s = StringAllocate(source.s, source.sSize);
+			sSize = (s) ? source.sSize : 0;
+		}
+		return *this;
+	}
+public:
+	/** Provide direct read/write access to buffer. */
+	char *ptr() {
+	    return s;
+	}
+	/** Ownership of the buffer have been taken, so release it. */
+	void reset() {
+		s = 0;
+		sSize = 0;
+	}
+	/** Size of buffer. */
+	lenpos_t size() const {
+		return SContainer::size();
+	}
+};
+
+
+/**
+ * @brief A simple string class.
+ *
+ * Hold the length of the string for quick operations,
+ * can have a buffer bigger than the string to avoid too many memory allocations and copies.
+ * May have embedded zeroes as a result of @a substitute, but relies too heavily on C string
+ * functions to allow reliable manipulations of these strings, other than simple appends, etc.
+ */
+class SString : public SContainer {
+	lenpos_t sLen;			///< The size of the string in s
+	lenpos_t sizeGrowth;	///< Minimum growth size when appending strings
+	enum { sizeGrowthDefault = 64 };
+
+	bool grow(lenpos_t lenNew);
+	SString &assign(const char *sOther, lenpos_t sSize_=measure_length);
+
+public:
+	SString() : sLen(0), sizeGrowth(sizeGrowthDefault) {}
+	SString(const SString &source) : SContainer(), sizeGrowth(sizeGrowthDefault) {
+		s = StringAllocate(source.s, source.sLen);
+		sSize = sLen = (s) ? source.sLen : 0;
+	}
+	SString(const char *s_) : sizeGrowth(sizeGrowthDefault) {
+		s = StringAllocate(s_);
+		sSize = sLen = (s) ? strlen(s) : 0;
+	}
+	SString(SBuffer &buf) : sizeGrowth(sizeGrowthDefault) {
+		s = buf.ptr();
+		sSize = sLen = buf.size();
+		// Consumes the given buffer!
+		buf.reset();
+	}
+	SString(const char *s_, lenpos_t first, lenpos_t last) : sizeGrowth(sizeGrowthDefault) {
+		// note: expects the "last" argument to point one beyond the range end (a la STL iterators)
+		s = StringAllocate(s_ + first, last - first);
+		sSize = sLen = (s) ? last - first : 0;
+	}
+	SString(int i);
+	SString(double d, int precision);
+	~SString() {
+		sLen = 0;
+	}
+	void clear() {
+		if (s) {
+			*s = '\0';
+		}
+		sLen = 0;
+	}
+	/** Size of buffer. */
+	lenpos_t size() const {
+		return SContainer::size();
+	}
+	/** Size of string in buffer. */
+	lenpos_t length() const {
+		return sLen;
+	}
+	/** Read access to a character of the string. */
+	char operator[](lenpos_t i) const {
+		return (s && i < sSize) ? s[i] : '\0';
+	}
+	SString &operator=(const char *source) {
+		return assign(source);
+	}
+	SString &operator=(const SString &source) {
+		if (this != &source) {
+			assign(source.s, source.sLen);
+		}
+		return *this;
+	}
+	bool operator==(const SString &sOther) const;
+	bool operator!=(const SString &sOther) const {
+		return !operator==(sOther);
+	}
+	bool operator==(const char *sOther) const;
+	bool operator!=(const char *sOther) const {
+		return !operator==(sOther);
+	}
+	bool contains(char ch) const {
+		return (s && *s) ? strchr(s, ch) != 0 : false;
+	}
+	void setsizegrowth(lenpos_t sizeGrowth_) {
+		sizeGrowth = sizeGrowth_;
+	}
+	const char *c_str() const {
+		return s ? s : "";
+	}
+
+	/** Attach to a string allocated by means of StringAlloc(len). */
+	SString &attach(char *s_, lenpos_t sLen_ = measure_length, lenpos_t sSize_ = measure_length) {
+		delete []s;
+		s = s_;
+		if (!s) {
+			sLen = sSize = 0;
+		}
+		else
+		{
+			sLen = (sLen_ == measure_length ? strlen(s) : sLen_);
+			sSize = (sSize_ == measure_length ? sLen + 1 : sSize_);
+		}
+		return *this;
+	}
+
+	/** Give ownership of buffer to caller which must use delete[] to free buffer. */
+	char *detach() {
+		char *sRet = s;
+		s = 0;
+		sSize = 0;
+		sLen = 0;
+		return sRet;
+	}
+	SString substr(lenpos_t subPos, lenpos_t subLen=measure_length) const;
+	SString &lowercase(lenpos_t subPos = 0, lenpos_t subLen=measure_length);
+	SString &uppercase(lenpos_t subPos = 0, lenpos_t subLen=measure_length);
+	SString &append(const char *sOther, lenpos_t sLenOther=measure_length, char sep = '\0');
+	SString &operator+=(const char *sOther) {
+		return append(sOther, static_cast<lenpos_t>(measure_length));
+	}
+	SString &operator+=(const SString &sOther) {
+		return append(sOther.s, sOther.sLen);
+	}
+	SString &operator+=(char ch) {
+		return append(&ch, 1);
+	}
+	SString &appendwithseparator(const char *sOther, char sep) {
+		return append(sOther, strlen(sOther), sep);
+	}
+	SString &insert(lenpos_t pos, const char *sOther, lenpos_t sLenOther=measure_length);
+
+	/**
+	 * Remove @a len characters from the @a pos position, included.
+	 * Characters at pos + len and beyond replace characters at pos.
+	 * If @a len is 0, or greater than the length of the string
+	 * starting at @a pos, the string is just truncated at @a pos.
+	 */
+	void remove(lenpos_t pos, lenpos_t len);
+
+	SString &change(lenpos_t pos, char ch) {
+		if (pos < sLen) {					// character changed must be in string bounds
+			*(s + pos) = ch;
+		}
+		return *this;
+	}
+	/** Read an integral numeric value from the string. */
+	int value() const {
+		return s ? atoi(s) : 0;
+	}
+	bool startswith(const char *prefix);
+	bool endswith(const char *suffix);
+	int search(const char *sFind, lenpos_t start=0) const;
+	bool contains(const char *sFind) const {
+		return search(sFind) >= 0;
+	}
+	int substitute(char chFind, char chReplace);
+	int substitute(const char *sFind, const char *sReplace);
+	int remove(const char *sFind) {
+		return substitute(sFind, "");
+	}
+};
+
+
+/**
+ * Duplicate a C string.
+ * Allocate memory of the given size, or big enough to fit the string if length isn't given;
+ * then copy the given string in the allocated memory.
+ * @return the pointer to the new string
+ */
+inline char *StringDup(
+	const char *s,			///< The string to duplicate
+	SContainer::lenpos_t len=SContainer::measure_length)	///< The length of memory to allocate. Optional.
+{
+	return SContainer::StringAllocate(s, len);
+}
+
+#ifdef SCI_NAMESPACE
+}
+#endif
+
+#endif

Added: trunk/plugins/scintilla/scintilla/include/SciLexer.h
==============================================================================
--- (empty file)
+++ trunk/plugins/scintilla/scintilla/include/SciLexer.h	Wed Apr  8 07:16:46 2009
@@ -0,0 +1,1278 @@
+// Scintilla source code edit control
+/** @file SciLexer.h
+ ** Interface to the added lexer functions in the SciLexer version of the edit control.
+ **/
+// Copyright 1998-2002 by Neil Hodgson <neilh scintilla org>
+// The License.txt file describes the conditions under which this software may be distributed.
+
+// Most of this file is automatically generated from the Scintilla.iface interface definition
+// file which contains any comments about the definitions. HFacer.py does the generation.
+
+#ifndef SCILEXER_H
+#define SCILEXER_H
+
+// SciLexer features - not in standard Scintilla
+
+//++Autogenerated -- start of section automatically generated from Scintilla.iface
+#define SCLEX_CONTAINER 0
+#define SCLEX_NULL 1
+#define SCLEX_PYTHON 2
+#define SCLEX_CPP 3
+#define SCLEX_HTML 4
+#define SCLEX_XML 5
+#define SCLEX_PERL 6
+#define SCLEX_SQL 7
+#define SCLEX_VB 8
+#define SCLEX_PROPERTIES 9
+#define SCLEX_ERRORLIST 10
+#define SCLEX_MAKEFILE 11
+#define SCLEX_BATCH 12
+#define SCLEX_XCODE 13
+#define SCLEX_LATEX 14
+#define SCLEX_LUA 15
+#define SCLEX_DIFF 16
+#define SCLEX_CONF 17
+#define SCLEX_PASCAL 18
+#define SCLEX_AVE 19
+#define SCLEX_ADA 20
+#define SCLEX_LISP 21
+#define SCLEX_RUBY 22
+#define SCLEX_EIFFEL 23
+#define SCLEX_EIFFELKW 24
+#define SCLEX_TCL 25
+#define SCLEX_NNCRONTAB 26
+#define SCLEX_BULLANT 27
+#define SCLEX_VBSCRIPT 28
+#define SCLEX_BAAN 31
+#define SCLEX_MATLAB 32
+#define SCLEX_SCRIPTOL 33
+#define SCLEX_ASM 34
+#define SCLEX_CPPNOCASE 35
+#define SCLEX_FORTRAN 36
+#define SCLEX_F77 37
+#define SCLEX_CSS 38
+#define SCLEX_POV 39
+#define SCLEX_LOUT 40
+#define SCLEX_ESCRIPT 41
+#define SCLEX_PS 42
+#define SCLEX_NSIS 43
+#define SCLEX_MMIXAL 44
+#define SCLEX_CLW 45
+#define SCLEX_CLWNOCASE 46
+#define SCLEX_LOT 47
+#define SCLEX_YAML 48
+#define SCLEX_TEX 49
+#define SCLEX_METAPOST 50
+#define SCLEX_POWERBASIC 51
+#define SCLEX_FORTH 52
+#define SCLEX_ERLANG 53
+#define SCLEX_OCTAVE 54
+#define SCLEX_MSSQL 55
+#define SCLEX_VERILOG 56
+#define SCLEX_KIX 57
+#define SCLEX_GUI4CLI 58
+#define SCLEX_SPECMAN 59
+#define SCLEX_AU3 60
+#define SCLEX_APDL 61
+#define SCLEX_BASH 62
+#define SCLEX_ASN1 63
+#define SCLEX_VHDL 64
+#define SCLEX_CAML 65
+#define SCLEX_BLITZBASIC 66
+#define SCLEX_PUREBASIC 67
+#define SCLEX_HASKELL 68
+#define SCLEX_PHPSCRIPT 69
+#define SCLEX_TADS3 70
+#define SCLEX_REBOL 71
+#define SCLEX_SMALLTALK 72
+#define SCLEX_FLAGSHIP 73
+#define SCLEX_CSOUND 74
+#define SCLEX_FREEBASIC 75
+#define SCLEX_INNOSETUP 76
+#define SCLEX_OPAL 77
+#define SCLEX_SPICE 78
+#define SCLEX_D 79
+#define SCLEX_CMAKE 80
+#define SCLEX_GAP 81
+#define SCLEX_PLM 82
+#define SCLEX_PROGRESS 83
+#define SCLEX_ABAQUS 84
+#define SCLEX_ASYMPTOTE 85
+#define SCLEX_R 86
+#define SCLEX_MAGIK 87
+#define SCLEX_POWERSHELL 88
+#define SCLEX_MYSQL 89
+#define SCLEX_PO 90
+#define SCLEX_AUTOMATIC 1000
+#define SCE_P_DEFAULT 0
+#define SCE_P_COMMENTLINE 1
+#define SCE_P_NUMBER 2
+#define SCE_P_STRING 3
+#define SCE_P_CHARACTER 4
+#define SCE_P_WORD 5
+#define SCE_P_TRIPLE 6
+#define SCE_P_TRIPLEDOUBLE 7
+#define SCE_P_CLASSNAME 8
+#define SCE_P_DEFNAME 9
+#define SCE_P_OPERATOR 10
+#define SCE_P_IDENTIFIER 11
+#define SCE_P_COMMENTBLOCK 12
+#define SCE_P_STRINGEOL 13
+#define SCE_P_WORD2 14
+#define SCE_P_DECORATOR 15
+#define SCE_C_DEFAULT 0
+#define SCE_C_COMMENT 1
+#define SCE_C_COMMENTLINE 2
+#define SCE_C_COMMENTDOC 3
+#define SCE_C_NUMBER 4
+#define SCE_C_WORD 5
+#define SCE_C_STRING 6
+#define SCE_C_CHARACTER 7
+#define SCE_C_UUID 8
+#define SCE_C_PREPROCESSOR 9
+#define SCE_C_OPERATOR 10
+#define SCE_C_IDENTIFIER 11
+#define SCE_C_STRINGEOL 12
+#define SCE_C_VERBATIM 13
+#define SCE_C_REGEX 14
+#define SCE_C_COMMENTLINEDOC 15
+#define SCE_C_WORD2 16
+#define SCE_C_COMMENTDOCKEYWORD 17
+#define SCE_C_COMMENTDOCKEYWORDERROR 18
+#define SCE_C_GLOBALCLASS 19
+#define SCE_D_DEFAULT 0
+#define SCE_D_COMMENT 1
+#define SCE_D_COMMENTLINE 2
+#define SCE_D_COMMENTDOC 3
+#define SCE_D_COMMENTNESTED 4
+#define SCE_D_NUMBER 5
+#define SCE_D_WORD 6
+#define SCE_D_WORD2 7
+#define SCE_D_WORD3 8
+#define SCE_D_TYPEDEF 9
+#define SCE_D_STRING 10
+#define SCE_D_STRINGEOL 11
+#define SCE_D_CHARACTER 12
+#define SCE_D_OPERATOR 13
+#define SCE_D_IDENTIFIER 14
+#define SCE_D_COMMENTLINEDOC 15
+#define SCE_D_COMMENTDOCKEYWORD 16
+#define SCE_D_COMMENTDOCKEYWORDERROR 17
+#define SCE_TCL_DEFAULT 0
+#define SCE_TCL_COMMENT 1
+#define SCE_TCL_COMMENTLINE 2
+#define SCE_TCL_NUMBER 3
+#define SCE_TCL_WORD_IN_QUOTE 4
+#define SCE_TCL_IN_QUOTE 5
+#define SCE_TCL_OPERATOR 6
+#define SCE_TCL_IDENTIFIER 7
+#define SCE_TCL_SUBSTITUTION 8
+#define SCE_TCL_SUB_BRACE 9
+#define SCE_TCL_MODIFIER 10
+#define SCE_TCL_EXPAND 11
+#define SCE_TCL_WORD 12
+#define SCE_TCL_WORD2 13
+#define SCE_TCL_WORD3 14
+#define SCE_TCL_WORD4 15
+#define SCE_TCL_WORD5 16
+#define SCE_TCL_WORD6 17
+#define SCE_TCL_WORD7 18
+#define SCE_TCL_WORD8 19
+#define SCE_TCL_COMMENT_BOX 20
+#define SCE_TCL_BLOCK_COMMENT 21
+#define SCE_H_DEFAULT 0
+#define SCE_H_TAG 1
+#define SCE_H_TAGUNKNOWN 2
+#define SCE_H_ATTRIBUTE 3
+#define SCE_H_ATTRIBUTEUNKNOWN 4
+#define SCE_H_NUMBER 5
+#define SCE_H_DOUBLESTRING 6
+#define SCE_H_SINGLESTRING 7
+#define SCE_H_OTHER 8
+#define SCE_H_COMMENT 9
+#define SCE_H_ENTITY 10
+#define SCE_H_TAGEND 11
+#define SCE_H_XMLSTART 12
+#define SCE_H_XMLEND 13
+#define SCE_H_SCRIPT 14
+#define SCE_H_ASP 15
+#define SCE_H_ASPAT 16
+#define SCE_H_CDATA 17
+#define SCE_H_QUESTION 18
+#define SCE_H_VALUE 19
+#define SCE_H_XCCOMMENT 20
+#define SCE_H_SGML_DEFAULT 21
+#define SCE_H_SGML_COMMAND 22
+#define SCE_H_SGML_1ST_PARAM 23
+#define SCE_H_SGML_DOUBLESTRING 24
+#define SCE_H_SGML_SIMPLESTRING 25
+#define SCE_H_SGML_ERROR 26
+#define SCE_H_SGML_SPECIAL 27
+#define SCE_H_SGML_ENTITY 28
+#define SCE_H_SGML_COMMENT 29
+#define SCE_H_SGML_1ST_PARAM_COMMENT 30
+#define SCE_H_SGML_BLOCK_DEFAULT 31
+#define SCE_HJ_START 40
+#define SCE_HJ_DEFAULT 41
+#define SCE_HJ_COMMENT 42
+#define SCE_HJ_COMMENTLINE 43
+#define SCE_HJ_COMMENTDOC 44
+#define SCE_HJ_NUMBER 45
+#define SCE_HJ_WORD 46
+#define SCE_HJ_KEYWORD 47
+#define SCE_HJ_DOUBLESTRING 48
+#define SCE_HJ_SINGLESTRING 49
+#define SCE_HJ_SYMBOLS 50
+#define SCE_HJ_STRINGEOL 51
+#define SCE_HJ_REGEX 52
+#define SCE_HJA_START 55
+#define SCE_HJA_DEFAULT 56
+#define SCE_HJA_COMMENT 57
+#define SCE_HJA_COMMENTLINE 58
+#define SCE_HJA_COMMENTDOC 59
+#define SCE_HJA_NUMBER 60
+#define SCE_HJA_WORD 61
+#define SCE_HJA_KEYWORD 62
+#define SCE_HJA_DOUBLESTRING 63
+#define SCE_HJA_SINGLESTRING 64
+#define SCE_HJA_SYMBOLS 65
+#define SCE_HJA_STRINGEOL 66
+#define SCE_HJA_REGEX 67
+#define SCE_HB_START 70
+#define SCE_HB_DEFAULT 71
+#define SCE_HB_COMMENTLINE 72
+#define SCE_HB_NUMBER 73
+#define SCE_HB_WORD 74
+#define SCE_HB_STRING 75
+#define SCE_HB_IDENTIFIER 76
+#define SCE_HB_STRINGEOL 77
+#define SCE_HBA_START 80
+#define SCE_HBA_DEFAULT 81
+#define SCE_HBA_COMMENTLINE 82
+#define SCE_HBA_NUMBER 83
+#define SCE_HBA_WORD 84
+#define SCE_HBA_STRING 85
+#define SCE_HBA_IDENTIFIER 86
+#define SCE_HBA_STRINGEOL 87
+#define SCE_HP_START 90
+#define SCE_HP_DEFAULT 91
+#define SCE_HP_COMMENTLINE 92
+#define SCE_HP_NUMBER 93
+#define SCE_HP_STRING 94
+#define SCE_HP_CHARACTER 95
+#define SCE_HP_WORD 96
+#define SCE_HP_TRIPLE 97
+#define SCE_HP_TRIPLEDOUBLE 98
+#define SCE_HP_CLASSNAME 99
+#define SCE_HP_DEFNAME 100
+#define SCE_HP_OPERATOR 101
+#define SCE_HP_IDENTIFIER 102
+#define SCE_HPHP_COMPLEX_VARIABLE 104
+#define SCE_HPA_START 105
+#define SCE_HPA_DEFAULT 106
+#define SCE_HPA_COMMENTLINE 107
+#define SCE_HPA_NUMBER 108
+#define SCE_HPA_STRING 109
+#define SCE_HPA_CHARACTER 110
+#define SCE_HPA_WORD 111
+#define SCE_HPA_TRIPLE 112
+#define SCE_HPA_TRIPLEDOUBLE 113
+#define SCE_HPA_CLASSNAME 114
+#define SCE_HPA_DEFNAME 115
+#define SCE_HPA_OPERATOR 116
+#define SCE_HPA_IDENTIFIER 117
+#define SCE_HPHP_DEFAULT 118
+#define SCE_HPHP_HSTRING 119
+#define SCE_HPHP_SIMPLESTRING 120
+#define SCE_HPHP_WORD 121
+#define SCE_HPHP_NUMBER 122
+#define SCE_HPHP_VARIABLE 123
+#define SCE_HPHP_COMMENT 124
+#define SCE_HPHP_COMMENTLINE 125
+#define SCE_HPHP_HSTRING_VARIABLE 126
+#define SCE_HPHP_OPERATOR 127
+#define SCE_PL_DEFAULT 0
+#define SCE_PL_ERROR 1
+#define SCE_PL_COMMENTLINE 2
+#define SCE_PL_POD 3
+#define SCE_PL_NUMBER 4
+#define SCE_PL_WORD 5
+#define SCE_PL_STRING 6
+#define SCE_PL_CHARACTER 7
+#define SCE_PL_PUNCTUATION 8
+#define SCE_PL_PREPROCESSOR 9
+#define SCE_PL_OPERATOR 10
+#define SCE_PL_IDENTIFIER 11
+#define SCE_PL_SCALAR 12
+#define SCE_PL_ARRAY 13
+#define SCE_PL_HASH 14
+#define SCE_PL_SYMBOLTABLE 15
+#define SCE_PL_VARIABLE_INDEXER 16
+#define SCE_PL_REGEX 17
+#define SCE_PL_REGSUBST 18
+#define SCE_PL_LONGQUOTE 19
+#define SCE_PL_BACKTICKS 20
+#define SCE_PL_DATASECTION 21
+#define SCE_PL_HERE_DELIM 22
+#define SCE_PL_HERE_Q 23
+#define SCE_PL_HERE_QQ 24
+#define SCE_PL_HERE_QX 25
+#define SCE_PL_STRING_Q 26
+#define SCE_PL_STRING_QQ 27
+#define SCE_PL_STRING_QX 28
+#define SCE_PL_STRING_QR 29
+#define SCE_PL_STRING_QW 30
+#define SCE_PL_POD_VERB 31
+#define SCE_PL_SUB_PROTOTYPE 40
+#define SCE_PL_FORMAT_IDENT 41
+#define SCE_PL_FORMAT 42
+#define SCE_RB_DEFAULT 0
+#define SCE_RB_ERROR 1
+#define SCE_RB_COMMENTLINE 2
+#define SCE_RB_POD 3
+#define SCE_RB_NUMBER 4
+#define SCE_RB_WORD 5
+#define SCE_RB_STRING 6
+#define SCE_RB_CHARACTER 7
+#define SCE_RB_CLASSNAME 8
+#define SCE_RB_DEFNAME 9
+#define SCE_RB_OPERATOR 10
+#define SCE_RB_IDENTIFIER 11
+#define SCE_RB_REGEX 12
+#define SCE_RB_GLOBAL 13
+#define SCE_RB_SYMBOL 14
+#define SCE_RB_MODULE_NAME 15
+#define SCE_RB_INSTANCE_VAR 16
+#define SCE_RB_CLASS_VAR 17
+#define SCE_RB_BACKTICKS 18
+#define SCE_RB_DATASECTION 19
+#define SCE_RB_HERE_DELIM 20
+#define SCE_RB_HERE_Q 21
+#define SCE_RB_HERE_QQ 22
+#define SCE_RB_HERE_QX 23
+#define SCE_RB_STRING_Q 24
+#define SCE_RB_STRING_QQ 25
+#define SCE_RB_STRING_QX 26
+#define SCE_RB_STRING_QR 27
+#define SCE_RB_STRING_QW 28
+#define SCE_RB_WORD_DEMOTED 29
+#define SCE_RB_STDIN 30
+#define SCE_RB_STDOUT 31
+#define SCE_RB_STDERR 40
+#define SCE_RB_UPPER_BOUND 41
+#define SCE_B_DEFAULT 0
+#define SCE_B_COMMENT 1
+#define SCE_B_NUMBER 2
+#define SCE_B_KEYWORD 3
+#define SCE_B_STRING 4
+#define SCE_B_PREPROCESSOR 5
+#define SCE_B_OPERATOR 6
+#define SCE_B_IDENTIFIER 7
+#define SCE_B_DATE 8
+#define SCE_B_STRINGEOL 9
+#define SCE_B_KEYWORD2 10
+#define SCE_B_KEYWORD3 11
+#define SCE_B_KEYWORD4 12
+#define SCE_B_CONSTANT 13
+#define SCE_B_ASM 14
+#define SCE_B_LABEL 15
+#define SCE_B_ERROR 16
+#define SCE_B_HEXNUMBER 17
+#define SCE_B_BINNUMBER 18
+#define SCE_PROPS_DEFAULT 0
+#define SCE_PROPS_COMMENT 1
+#define SCE_PROPS_SECTION 2
+#define SCE_PROPS_ASSIGNMENT 3
+#define SCE_PROPS_DEFVAL 4
+#define SCE_PROPS_KEY 5
+#define SCE_L_DEFAULT 0
+#define SCE_L_COMMAND 1
+#define SCE_L_TAG 2
+#define SCE_L_MATH 3
+#define SCE_L_COMMENT 4
+#define SCE_LUA_DEFAULT 0
+#define SCE_LUA_COMMENT 1
+#define SCE_LUA_COMMENTLINE 2
+#define SCE_LUA_COMMENTDOC 3
+#define SCE_LUA_NUMBER 4
+#define SCE_LUA_WORD 5
+#define SCE_LUA_STRING 6
+#define SCE_LUA_CHARACTER 7
+#define SCE_LUA_LITERALSTRING 8
+#define SCE_LUA_PREPROCESSOR 9
+#define SCE_LUA_OPERATOR 10
+#define SCE_LUA_IDENTIFIER 11
+#define SCE_LUA_STRINGEOL 12
+#define SCE_LUA_WORD2 13
+#define SCE_LUA_WORD3 14
+#define SCE_LUA_WORD4 15
+#define SCE_LUA_WORD5 16
+#define SCE_LUA_WORD6 17
+#define SCE_LUA_WORD7 18
+#define SCE_LUA_WORD8 19
+#define SCE_ERR_DEFAULT 0
+#define SCE_ERR_PYTHON 1
+#define SCE_ERR_GCC 2
+#define SCE_ERR_MS 3
+#define SCE_ERR_CMD 4
+#define SCE_ERR_BORLAND 5
+#define SCE_ERR_PERL 6
+#define SCE_ERR_NET 7
+#define SCE_ERR_LUA 8
+#define SCE_ERR_CTAG 9
+#define SCE_ERR_DIFF_CHANGED 10
+#define SCE_ERR_DIFF_ADDITION 11
+#define SCE_ERR_DIFF_DELETION 12
+#define SCE_ERR_DIFF_MESSAGE 13
+#define SCE_ERR_PHP 14
+#define SCE_ERR_ELF 15
+#define SCE_ERR_IFC 16
+#define SCE_ERR_IFORT 17
+#define SCE_ERR_ABSF 18
+#define SCE_ERR_TIDY 19
+#define SCE_ERR_JAVA_STACK 20
+#define SCE_ERR_VALUE 21
+#define SCE_BAT_DEFAULT 0
+#define SCE_BAT_COMMENT 1
+#define SCE_BAT_WORD 2
+#define SCE_BAT_LABEL 3
+#define SCE_BAT_HIDE 4
+#define SCE_BAT_COMMAND 5
+#define SCE_BAT_IDENTIFIER 6
+#define SCE_BAT_OPERATOR 7
+#define SCE_MAKE_DEFAULT 0
+#define SCE_MAKE_COMMENT 1
+#define SCE_MAKE_PREPROCESSOR 2
+#define SCE_MAKE_IDENTIFIER 3
+#define SCE_MAKE_OPERATOR 4
+#define SCE_MAKE_TARGET 5
+#define SCE_MAKE_IDEOL 9
+#define SCE_DIFF_DEFAULT 0
+#define SCE_DIFF_COMMENT 1
+#define SCE_DIFF_COMMAND 2
+#define SCE_DIFF_HEADER 3
+#define SCE_DIFF_POSITION 4
+#define SCE_DIFF_DELETED 5
+#define SCE_DIFF_ADDED 6
+#define SCE_DIFF_CHANGED 7
+#define SCE_CONF_DEFAULT 0
+#define SCE_CONF_COMMENT 1
+#define SCE_CONF_NUMBER 2
+#define SCE_CONF_IDENTIFIER 3
+#define SCE_CONF_EXTENSION 4
+#define SCE_CONF_PARAMETER 5
+#define SCE_CONF_STRING 6
+#define SCE_CONF_OPERATOR 7
+#define SCE_CONF_IP 8
+#define SCE_CONF_DIRECTIVE 9
+#define SCE_AVE_DEFAULT 0
+#define SCE_AVE_COMMENT 1
+#define SCE_AVE_NUMBER 2
+#define SCE_AVE_WORD 3
+#define SCE_AVE_STRING 6
+#define SCE_AVE_ENUM 7
+#define SCE_AVE_STRINGEOL 8
+#define SCE_AVE_IDENTIFIER 9
+#define SCE_AVE_OPERATOR 10
+#define SCE_AVE_WORD1 11
+#define SCE_AVE_WORD2 12
+#define SCE_AVE_WORD3 13
+#define SCE_AVE_WORD4 14
+#define SCE_AVE_WORD5 15
+#define SCE_AVE_WORD6 16
+#define SCE_ADA_DEFAULT 0
+#define SCE_ADA_WORD 1
+#define SCE_ADA_IDENTIFIER 2
+#define SCE_ADA_NUMBER 3
+#define SCE_ADA_DELIMITER 4
+#define SCE_ADA_CHARACTER 5
+#define SCE_ADA_CHARACTEREOL 6
+#define SCE_ADA_STRING 7
+#define SCE_ADA_STRINGEOL 8
+#define SCE_ADA_LABEL 9
+#define SCE_ADA_COMMENTLINE 10
+#define SCE_ADA_ILLEGAL 11
+#define SCE_BAAN_DEFAULT 0
+#define SCE_BAAN_COMMENT 1
+#define SCE_BAAN_COMMENTDOC 2
+#define SCE_BAAN_NUMBER 3
+#define SCE_BAAN_WORD 4
+#define SCE_BAAN_STRING 5
+#define SCE_BAAN_PREPROCESSOR 6
+#define SCE_BAAN_OPERATOR 7
+#define SCE_BAAN_IDENTIFIER 8
+#define SCE_BAAN_STRINGEOL 9
+#define SCE_BAAN_WORD2 10
+#define SCE_LISP_DEFAULT 0
+#define SCE_LISP_COMMENT 1
+#define SCE_LISP_NUMBER 2
+#define SCE_LISP_KEYWORD 3
+#define SCE_LISP_KEYWORD_KW 4
+#define SCE_LISP_SYMBOL 5
+#define SCE_LISP_STRING 6
+#define SCE_LISP_STRINGEOL 8
+#define SCE_LISP_IDENTIFIER 9
+#define SCE_LISP_OPERATOR 10
+#define SCE_LISP_SPECIAL 11
+#define SCE_LISP_MULTI_COMMENT 12
+#define SCE_EIFFEL_DEFAULT 0
+#define SCE_EIFFEL_COMMENTLINE 1
+#define SCE_EIFFEL_NUMBER 2
+#define SCE_EIFFEL_WORD 3
+#define SCE_EIFFEL_STRING 4
+#define SCE_EIFFEL_CHARACTER 5
+#define SCE_EIFFEL_OPERATOR 6
+#define SCE_EIFFEL_IDENTIFIER 7
+#define SCE_EIFFEL_STRINGEOL 8
+#define SCE_NNCRONTAB_DEFAULT 0
+#define SCE_NNCRONTAB_COMMENT 1
+#define SCE_NNCRONTAB_TASK 2
+#define SCE_NNCRONTAB_SECTION 3
+#define SCE_NNCRONTAB_KEYWORD 4
+#define SCE_NNCRONTAB_MODIFIER 5
+#define SCE_NNCRONTAB_ASTERISK 6
+#define SCE_NNCRONTAB_NUMBER 7
+#define SCE_NNCRONTAB_STRING 8
+#define SCE_NNCRONTAB_ENVIRONMENT 9
+#define SCE_NNCRONTAB_IDENTIFIER 10
+#define SCE_FORTH_DEFAULT 0
+#define SCE_FORTH_COMMENT 1
+#define SCE_FORTH_COMMENT_ML 2
+#define SCE_FORTH_IDENTIFIER 3
+#define SCE_FORTH_CONTROL 4
+#define SCE_FORTH_KEYWORD 5
+#define SCE_FORTH_DEFWORD 6
+#define SCE_FORTH_PREWORD1 7
+#define SCE_FORTH_PREWORD2 8
+#define SCE_FORTH_NUMBER 9
+#define SCE_FORTH_STRING 10
+#define SCE_FORTH_LOCALE 11
+#define SCE_MATLAB_DEFAULT 0
+#define SCE_MATLAB_COMMENT 1
+#define SCE_MATLAB_COMMAND 2
+#define SCE_MATLAB_NUMBER 3
+#define SCE_MATLAB_KEYWORD 4
+#define SCE_MATLAB_STRING 5
+#define SCE_MATLAB_OPERATOR 6
+#define SCE_MATLAB_IDENTIFIER 7
+#define SCE_MATLAB_DOUBLEQUOTESTRING 8
+#define SCE_SCRIPTOL_DEFAULT 0
+#define SCE_SCRIPTOL_WHITE 1
+#define SCE_SCRIPTOL_COMMENTLINE 2
+#define SCE_SCRIPTOL_PERSISTENT 3
+#define SCE_SCRIPTOL_CSTYLE 4
+#define SCE_SCRIPTOL_COMMENTBLOCK 5
+#define SCE_SCRIPTOL_NUMBER 6
+#define SCE_SCRIPTOL_STRING 7
+#define SCE_SCRIPTOL_CHARACTER 8
+#define SCE_SCRIPTOL_STRINGEOL 9
+#define SCE_SCRIPTOL_KEYWORD 10
+#define SCE_SCRIPTOL_OPERATOR 11
+#define SCE_SCRIPTOL_IDENTIFIER 12
+#define SCE_SCRIPTOL_TRIPLE 13
+#define SCE_SCRIPTOL_CLASSNAME 14
+#define SCE_SCRIPTOL_PREPROCESSOR 15
+#define SCE_ASM_DEFAULT 0
+#define SCE_ASM_COMMENT 1
+#define SCE_ASM_NUMBER 2
+#define SCE_ASM_STRING 3
+#define SCE_ASM_OPERATOR 4
+#define SCE_ASM_IDENTIFIER 5
+#define SCE_ASM_CPUINSTRUCTION 6
+#define SCE_ASM_MATHINSTRUCTION 7
+#define SCE_ASM_REGISTER 8
+#define SCE_ASM_DIRECTIVE 9
+#define SCE_ASM_DIRECTIVEOPERAND 10
+#define SCE_ASM_COMMENTBLOCK 11
+#define SCE_ASM_CHARACTER 12
+#define SCE_ASM_STRINGEOL 13
+#define SCE_ASM_EXTINSTRUCTION 14
+#define SCE_F_DEFAULT 0
+#define SCE_F_COMMENT 1
+#define SCE_F_NUMBER 2
+#define SCE_F_STRING1 3
+#define SCE_F_STRING2 4
+#define SCE_F_STRINGEOL 5
+#define SCE_F_OPERATOR 6
+#define SCE_F_IDENTIFIER 7
+#define SCE_F_WORD 8
+#define SCE_F_WORD2 9
+#define SCE_F_WORD3 10
+#define SCE_F_PREPROCESSOR 11
+#define SCE_F_OPERATOR2 12
+#define SCE_F_LABEL 13
+#define SCE_F_CONTINUATION 14
+#define SCE_CSS_DEFAULT 0
+#define SCE_CSS_TAG 1
+#define SCE_CSS_CLASS 2
+#define SCE_CSS_PSEUDOCLASS 3
+#define SCE_CSS_UNKNOWN_PSEUDOCLASS 4
+#define SCE_CSS_OPERATOR 5
+#define SCE_CSS_IDENTIFIER 6
+#define SCE_CSS_UNKNOWN_IDENTIFIER 7
+#define SCE_CSS_VALUE 8
+#define SCE_CSS_COMMENT 9
+#define SCE_CSS_ID 10
+#define SCE_CSS_IMPORTANT 11
+#define SCE_CSS_DIRECTIVE 12
+#define SCE_CSS_DOUBLESTRING 13
+#define SCE_CSS_SINGLESTRING 14
+#define SCE_CSS_IDENTIFIER2 15
+#define SCE_CSS_ATTRIBUTE 16
+#define SCE_CSS_IDENTIFIER3 17
+#define SCE_CSS_PSEUDOELEMENT 18
+#define SCE_CSS_EXTENDED_IDENTIFIER 19
+#define SCE_CSS_EXTENDED_PSEUDOCLASS 20
+#define SCE_CSS_EXTENDED_PSEUDOELEMENT 21
+#define SCE_POV_DEFAULT 0
+#define SCE_POV_COMMENT 1
+#define SCE_POV_COMMENTLINE 2
+#define SCE_POV_NUMBER 3
+#define SCE_POV_OPERATOR 4
+#define SCE_POV_IDENTIFIER 5
+#define SCE_POV_STRING 6
+#define SCE_POV_STRINGEOL 7
+#define SCE_POV_DIRECTIVE 8
+#define SCE_POV_BADDIRECTIVE 9
+#define SCE_POV_WORD2 10
+#define SCE_POV_WORD3 11
+#define SCE_POV_WORD4 12
+#define SCE_POV_WORD5 13
+#define SCE_POV_WORD6 14
+#define SCE_POV_WORD7 15
+#define SCE_POV_WORD8 16
+#define SCE_LOUT_DEFAULT 0
+#define SCE_LOUT_COMMENT 1
+#define SCE_LOUT_NUMBER 2
+#define SCE_LOUT_WORD 3
+#define SCE_LOUT_WORD2 4
+#define SCE_LOUT_WORD3 5
+#define SCE_LOUT_WORD4 6
+#define SCE_LOUT_STRING 7
+#define SCE_LOUT_OPERATOR 8
+#define SCE_LOUT_IDENTIFIER 9
+#define SCE_LOUT_STRINGEOL 10
+#define SCE_ESCRIPT_DEFAULT 0
+#define SCE_ESCRIPT_COMMENT 1
+#define SCE_ESCRIPT_COMMENTLINE 2
+#define SCE_ESCRIPT_COMMENTDOC 3
+#define SCE_ESCRIPT_NUMBER 4
+#define SCE_ESCRIPT_WORD 5
+#define SCE_ESCRIPT_STRING 6
+#define SCE_ESCRIPT_OPERATOR 7
+#define SCE_ESCRIPT_IDENTIFIER 8
+#define SCE_ESCRIPT_BRACE 9
+#define SCE_ESCRIPT_WORD2 10
+#define SCE_ESCRIPT_WORD3 11
+#define SCE_PS_DEFAULT 0
+#define SCE_PS_COMMENT 1
+#define SCE_PS_DSC_COMMENT 2
+#define SCE_PS_DSC_VALUE 3
+#define SCE_PS_NUMBER 4
+#define SCE_PS_NAME 5
+#define SCE_PS_KEYWORD 6
+#define SCE_PS_LITERAL 7
+#define SCE_PS_IMMEVAL 8
+#define SCE_PS_PAREN_ARRAY 9
+#define SCE_PS_PAREN_DICT 10
+#define SCE_PS_PAREN_PROC 11
+#define SCE_PS_TEXT 12
+#define SCE_PS_HEXSTRING 13
+#define SCE_PS_BASE85STRING 14
+#define SCE_PS_BADSTRINGCHAR 15
+#define SCE_NSIS_DEFAULT 0
+#define SCE_NSIS_COMMENT 1
+#define SCE_NSIS_STRINGDQ 2
+#define SCE_NSIS_STRINGLQ 3
+#define SCE_NSIS_STRINGRQ 4
+#define SCE_NSIS_FUNCTION 5
+#define SCE_NSIS_VARIABLE 6
+#define SCE_NSIS_LABEL 7
+#define SCE_NSIS_USERDEFINED 8
+#define SCE_NSIS_SECTIONDEF 9
+#define SCE_NSIS_SUBSECTIONDEF 10
+#define SCE_NSIS_IFDEFINEDEF 11
+#define SCE_NSIS_MACRODEF 12
+#define SCE_NSIS_STRINGVAR 13
+#define SCE_NSIS_NUMBER 14
+#define SCE_NSIS_SECTIONGROUP 15
+#define SCE_NSIS_PAGEEX 16
+#define SCE_NSIS_FUNCTIONDEF 17
+#define SCE_NSIS_COMMENTBOX 18
+#define SCE_MMIXAL_LEADWS 0
+#define SCE_MMIXAL_COMMENT 1
+#define SCE_MMIXAL_LABEL 2
+#define SCE_MMIXAL_OPCODE 3
+#define SCE_MMIXAL_OPCODE_PRE 4
+#define SCE_MMIXAL_OPCODE_VALID 5
+#define SCE_MMIXAL_OPCODE_UNKNOWN 6
+#define SCE_MMIXAL_OPCODE_POST 7
+#define SCE_MMIXAL_OPERANDS 8
+#define SCE_MMIXAL_NUMBER 9
+#define SCE_MMIXAL_REF 10
+#define SCE_MMIXAL_CHAR 11
+#define SCE_MMIXAL_STRING 12
+#define SCE_MMIXAL_REGISTER 13
+#define SCE_MMIXAL_HEX 14
+#define SCE_MMIXAL_OPERATOR 15
+#define SCE_MMIXAL_SYMBOL 16
+#define SCE_MMIXAL_INCLUDE 17
+#define SCE_CLW_DEFAULT 0
+#define SCE_CLW_LABEL 1
+#define SCE_CLW_COMMENT 2
+#define SCE_CLW_STRING 3
+#define SCE_CLW_USER_IDENTIFIER 4
+#define SCE_CLW_INTEGER_CONSTANT 5
+#define SCE_CLW_REAL_CONSTANT 6
+#define SCE_CLW_PICTURE_STRING 7
+#define SCE_CLW_KEYWORD 8
+#define SCE_CLW_COMPILER_DIRECTIVE 9
+#define SCE_CLW_RUNTIME_EXPRESSIONS 10
+#define SCE_CLW_BUILTIN_PROCEDURES_FUNCTION 11
+#define SCE_CLW_STRUCTURE_DATA_TYPE 12
+#define SCE_CLW_ATTRIBUTE 13
+#define SCE_CLW_STANDARD_EQUATE 14
+#define SCE_CLW_ERROR 15
+#define SCE_CLW_DEPRECATED 16
+#define SCE_LOT_DEFAULT 0
+#define SCE_LOT_HEADER 1
+#define SCE_LOT_BREAK 2
+#define SCE_LOT_SET 3
+#define SCE_LOT_PASS 4
+#define SCE_LOT_FAIL 5
+#define SCE_LOT_ABORT 6
+#define SCE_YAML_DEFAULT 0
+#define SCE_YAML_COMMENT 1
+#define SCE_YAML_IDENTIFIER 2
+#define SCE_YAML_KEYWORD 3
+#define SCE_YAML_NUMBER 4
+#define SCE_YAML_REFERENCE 5
+#define SCE_YAML_DOCUMENT 6
+#define SCE_YAML_TEXT 7
+#define SCE_YAML_ERROR 8
+#define SCE_YAML_OPERATOR 9
+#define SCE_TEX_DEFAULT 0
+#define SCE_TEX_SPECIAL 1
+#define SCE_TEX_GROUP 2
+#define SCE_TEX_SYMBOL 3
+#define SCE_TEX_COMMAND 4
+#define SCE_TEX_TEXT 5
+#define SCE_METAPOST_DEFAULT 0
+#define SCE_METAPOST_SPECIAL 1
+#define SCE_METAPOST_GROUP 2
+#define SCE_METAPOST_SYMBOL 3
+#define SCE_METAPOST_COMMAND 4
+#define SCE_METAPOST_TEXT 5
+#define SCE_METAPOST_EXTRA 6
+#define SCE_ERLANG_DEFAULT 0
+#define SCE_ERLANG_COMMENT 1
+#define SCE_ERLANG_VARIABLE 2
+#define SCE_ERLANG_NUMBER 3
+#define SCE_ERLANG_KEYWORD 4
+#define SCE_ERLANG_STRING 5
+#define SCE_ERLANG_OPERATOR 6
+#define SCE_ERLANG_ATOM 7
+#define SCE_ERLANG_FUNCTION_NAME 8
+#define SCE_ERLANG_CHARACTER 9
+#define SCE_ERLANG_MACRO 10
+#define SCE_ERLANG_RECORD 11
+#define SCE_ERLANG_SEPARATOR 12
+#define SCE_ERLANG_NODE_NAME 13
+#define SCE_ERLANG_UNKNOWN 31
+#define SCE_MSSQL_DEFAULT 0
+#define SCE_MSSQL_COMMENT 1
+#define SCE_MSSQL_LINE_COMMENT 2
+#define SCE_MSSQL_NUMBER 3
+#define SCE_MSSQL_STRING 4
+#define SCE_MSSQL_OPERATOR 5
+#define SCE_MSSQL_IDENTIFIER 6
+#define SCE_MSSQL_VARIABLE 7
+#define SCE_MSSQL_COLUMN_NAME 8
+#define SCE_MSSQL_STATEMENT 9
+#define SCE_MSSQL_DATATYPE 10
+#define SCE_MSSQL_SYSTABLE 11
+#define SCE_MSSQL_GLOBAL_VARIABLE 12
+#define SCE_MSSQL_FUNCTION 13
+#define SCE_MSSQL_STORED_PROCEDURE 14
+#define SCE_MSSQL_DEFAULT_PREF_DATATYPE 15
+#define SCE_MSSQL_COLUMN_NAME_2 16
+#define SCE_V_DEFAULT 0
+#define SCE_V_COMMENT 1
+#define SCE_V_COMMENTLINE 2
+#define SCE_V_COMMENTLINEBANG 3
+#define SCE_V_NUMBER 4
+#define SCE_V_WORD 5
+#define SCE_V_STRING 6
+#define SCE_V_WORD2 7
+#define SCE_V_WORD3 8
+#define SCE_V_PREPROCESSOR 9
+#define SCE_V_OPERATOR 10
+#define SCE_V_IDENTIFIER 11
+#define SCE_V_STRINGEOL 12
+#define SCE_V_USER 19
+#define SCE_KIX_DEFAULT 0
+#define SCE_KIX_COMMENT 1
+#define SCE_KIX_STRING1 2
+#define SCE_KIX_STRING2 3
+#define SCE_KIX_NUMBER 4
+#define SCE_KIX_VAR 5
+#define SCE_KIX_MACRO 6
+#define SCE_KIX_KEYWORD 7
+#define SCE_KIX_FUNCTIONS 8
+#define SCE_KIX_OPERATOR 9
+#define SCE_KIX_IDENTIFIER 31
+#define SCE_GC_DEFAULT 0
+#define SCE_GC_COMMENTLINE 1
+#define SCE_GC_COMMENTBLOCK 2
+#define SCE_GC_GLOBAL 3
+#define SCE_GC_EVENT 4
+#define SCE_GC_ATTRIBUTE 5
+#define SCE_GC_CONTROL 6
+#define SCE_GC_COMMAND 7
+#define SCE_GC_STRING 8
+#define SCE_GC_OPERATOR 9
+#define SCE_SN_DEFAULT 0
+#define SCE_SN_CODE 1
+#define SCE_SN_COMMENTLINE 2
+#define SCE_SN_COMMENTLINEBANG 3
+#define SCE_SN_NUMBER 4
+#define SCE_SN_WORD 5
+#define SCE_SN_STRING 6
+#define SCE_SN_WORD2 7
+#define SCE_SN_WORD3 8
+#define SCE_SN_PREPROCESSOR 9
+#define SCE_SN_OPERATOR 10
+#define SCE_SN_IDENTIFIER 11
+#define SCE_SN_STRINGEOL 12
+#define SCE_SN_REGEXTAG 13
+#define SCE_SN_SIGNAL 14
+#define SCE_SN_USER 19
+#define SCE_AU3_DEFAULT 0
+#define SCE_AU3_COMMENT 1
+#define SCE_AU3_COMMENTBLOCK 2
+#define SCE_AU3_NUMBER 3
+#define SCE_AU3_FUNCTION 4
+#define SCE_AU3_KEYWORD 5
+#define SCE_AU3_MACRO 6
+#define SCE_AU3_STRING 7
+#define SCE_AU3_OPERATOR 8
+#define SCE_AU3_VARIABLE 9
+#define SCE_AU3_SENT 10
+#define SCE_AU3_PREPROCESSOR 11
+#define SCE_AU3_SPECIAL 12
+#define SCE_AU3_EXPAND 13
+#define SCE_AU3_COMOBJ 14
+#define SCE_AU3_UDF 15
+#define SCE_APDL_DEFAULT 0
+#define SCE_APDL_COMMENT 1
+#define SCE_APDL_COMMENTBLOCK 2
+#define SCE_APDL_NUMBER 3
+#define SCE_APDL_STRING 4
+#define SCE_APDL_OPERATOR 5
+#define SCE_APDL_WORD 6
+#define SCE_APDL_PROCESSOR 7
+#define SCE_APDL_COMMAND 8
+#define SCE_APDL_SLASHCOMMAND 9
+#define SCE_APDL_STARCOMMAND 10
+#define SCE_APDL_ARGUMENT 11
+#define SCE_APDL_FUNCTION 12
+#define SCE_SH_DEFAULT 0
+#define SCE_SH_ERROR 1
+#define SCE_SH_COMMENTLINE 2
+#define SCE_SH_NUMBER 3
+#define SCE_SH_WORD 4
+#define SCE_SH_STRING 5
+#define SCE_SH_CHARACTER 6
+#define SCE_SH_OPERATOR 7
+#define SCE_SH_IDENTIFIER 8
+#define SCE_SH_SCALAR 9
+#define SCE_SH_PARAM 10
+#define SCE_SH_BACKTICKS 11
+#define SCE_SH_HERE_DELIM 12
+#define SCE_SH_HERE_Q 13
+#define SCE_ASN1_DEFAULT 0
+#define SCE_ASN1_COMMENT 1
+#define SCE_ASN1_IDENTIFIER 2
+#define SCE_ASN1_STRING 3
+#define SCE_ASN1_OID 4
+#define SCE_ASN1_SCALAR 5
+#define SCE_ASN1_KEYWORD 6
+#define SCE_ASN1_ATTRIBUTE 7
+#define SCE_ASN1_DESCRIPTOR 8
+#define SCE_ASN1_TYPE 9
+#define SCE_ASN1_OPERATOR 10
+#define SCE_VHDL_DEFAULT 0
+#define SCE_VHDL_COMMENT 1
+#define SCE_VHDL_COMMENTLINEBANG 2
+#define SCE_VHDL_NUMBER 3
+#define SCE_VHDL_STRING 4
+#define SCE_VHDL_OPERATOR 5
+#define SCE_VHDL_IDENTIFIER 6
+#define SCE_VHDL_STRINGEOL 7
+#define SCE_VHDL_KEYWORD 8
+#define SCE_VHDL_STDOPERATOR 9
+#define SCE_VHDL_ATTRIBUTE 10
+#define SCE_VHDL_STDFUNCTION 11
+#define SCE_VHDL_STDPACKAGE 12
+#define SCE_VHDL_STDTYPE 13
+#define SCE_VHDL_USERWORD 14
+#define SCE_CAML_DEFAULT 0
+#define SCE_CAML_IDENTIFIER 1
+#define SCE_CAML_TAGNAME 2
+#define SCE_CAML_KEYWORD 3
+#define SCE_CAML_KEYWORD2 4
+#define SCE_CAML_KEYWORD3 5
+#define SCE_CAML_LINENUM 6
+#define SCE_CAML_OPERATOR 7
+#define SCE_CAML_NUMBER 8
+#define SCE_CAML_CHAR 9
+#define SCE_CAML_STRING 11
+#define SCE_CAML_COMMENT 12
+#define SCE_CAML_COMMENT1 13
+#define SCE_CAML_COMMENT2 14
+#define SCE_CAML_COMMENT3 15
+#define SCE_HA_DEFAULT 0
+#define SCE_HA_IDENTIFIER 1
+#define SCE_HA_KEYWORD 2
+#define SCE_HA_NUMBER 3
+#define SCE_HA_STRING 4
+#define SCE_HA_CHARACTER 5
+#define SCE_HA_CLASS 6
+#define SCE_HA_MODULE 7
+#define SCE_HA_CAPITAL 8
+#define SCE_HA_DATA 9
+#define SCE_HA_IMPORT 10
+#define SCE_HA_OPERATOR 11
+#define SCE_HA_INSTANCE 12
+#define SCE_HA_COMMENTLINE 13
+#define SCE_HA_COMMENTBLOCK 14
+#define SCE_HA_COMMENTBLOCK2 15
+#define SCE_HA_COMMENTBLOCK3 16
+#define SCE_T3_DEFAULT 0
+#define SCE_T3_X_DEFAULT 1
+#define SCE_T3_PREPROCESSOR 2
+#define SCE_T3_BLOCK_COMMENT 3
+#define SCE_T3_LINE_COMMENT 4
+#define SCE_T3_OPERATOR 5
+#define SCE_T3_KEYWORD 6
+#define SCE_T3_NUMBER 7
+#define SCE_T3_IDENTIFIER 8
+#define SCE_T3_S_STRING 9
+#define SCE_T3_D_STRING 10
+#define SCE_T3_X_STRING 11
+#define SCE_T3_LIB_DIRECTIVE 12
+#define SCE_T3_MSG_PARAM 13
+#define SCE_T3_HTML_TAG 14
+#define SCE_T3_HTML_DEFAULT 15
+#define SCE_T3_HTML_STRING 16
+#define SCE_T3_USER1 17
+#define SCE_T3_USER2 18
+#define SCE_T3_USER3 19
+#define SCE_T3_BRACE 20
+#define SCE_REBOL_DEFAULT 0
+#define SCE_REBOL_COMMENTLINE 1
+#define SCE_REBOL_COMMENTBLOCK 2
+#define SCE_REBOL_PREFACE 3
+#define SCE_REBOL_OPERATOR 4
+#define SCE_REBOL_CHARACTER 5
+#define SCE_REBOL_QUOTEDSTRING 6
+#define SCE_REBOL_BRACEDSTRING 7
+#define SCE_REBOL_NUMBER 8
+#define SCE_REBOL_PAIR 9
+#define SCE_REBOL_TUPLE 10
+#define SCE_REBOL_BINARY 11
+#define SCE_REBOL_MONEY 12
+#define SCE_REBOL_ISSUE 13
+#define SCE_REBOL_TAG 14
+#define SCE_REBOL_FILE 15
+#define SCE_REBOL_EMAIL 16
+#define SCE_REBOL_URL 17
+#define SCE_REBOL_DATE 18
+#define SCE_REBOL_TIME 19
+#define SCE_REBOL_IDENTIFIER 20
+#define SCE_REBOL_WORD 21
+#define SCE_REBOL_WORD2 22
+#define SCE_REBOL_WORD3 23
+#define SCE_REBOL_WORD4 24
+#define SCE_REBOL_WORD5 25
+#define SCE_REBOL_WORD6 26
+#define SCE_REBOL_WORD7 27
+#define SCE_REBOL_WORD8 28
+#define SCE_SQL_DEFAULT 0
+#define SCE_SQL_COMMENT 1
+#define SCE_SQL_COMMENTLINE 2
+#define SCE_SQL_COMMENTDOC 3
+#define SCE_SQL_NUMBER 4
+#define SCE_SQL_WORD 5
+#define SCE_SQL_STRING 6
+#define SCE_SQL_CHARACTER 7
+#define SCE_SQL_SQLPLUS 8
+#define SCE_SQL_SQLPLUS_PROMPT 9
+#define SCE_SQL_OPERATOR 10
+#define SCE_SQL_IDENTIFIER 11
+#define SCE_SQL_SQLPLUS_COMMENT 13
+#define SCE_SQL_COMMENTLINEDOC 15
+#define SCE_SQL_WORD2 16
+#define SCE_SQL_COMMENTDOCKEYWORD 17
+#define SCE_SQL_COMMENTDOCKEYWORDERROR 18
+#define SCE_SQL_USER1 19
+#define SCE_SQL_USER2 20
+#define SCE_SQL_USER3 21
+#define SCE_SQL_USER4 22
+#define SCE_SQL_QUOTEDIDENTIFIER 23
+#define SCE_ST_DEFAULT 0
+#define SCE_ST_STRING 1
+#define SCE_ST_NUMBER 2
+#define SCE_ST_COMMENT 3
+#define SCE_ST_SYMBOL 4
+#define SCE_ST_BINARY 5
+#define SCE_ST_BOOL 6
+#define SCE_ST_SELF 7
+#define SCE_ST_SUPER 8
+#define SCE_ST_NIL 9
+#define SCE_ST_GLOBAL 10
+#define SCE_ST_RETURN 11
+#define SCE_ST_SPECIAL 12
+#define SCE_ST_KWSEND 13
+#define SCE_ST_ASSIGN 14
+#define SCE_ST_CHARACTER 15
+#define SCE_ST_SPEC_SEL 16
+#define SCE_FS_DEFAULT 0
+#define SCE_FS_COMMENT 1
+#define SCE_FS_COMMENTLINE 2
+#define SCE_FS_COMMENTDOC 3
+#define SCE_FS_COMMENTLINEDOC 4
+#define SCE_FS_COMMENTDOCKEYWORD 5
+#define SCE_FS_COMMENTDOCKEYWORDERROR 6
+#define SCE_FS_KEYWORD 7
+#define SCE_FS_KEYWORD2 8
+#define SCE_FS_KEYWORD3 9
+#define SCE_FS_KEYWORD4 10
+#define SCE_FS_NUMBER 11
+#define SCE_FS_STRING 12
+#define SCE_FS_PREPROCESSOR 13
+#define SCE_FS_OPERATOR 14
+#define SCE_FS_IDENTIFIER 15
+#define SCE_FS_DATE 16
+#define SCE_FS_STRINGEOL 17
+#define SCE_FS_CONSTANT 18
+#define SCE_FS_ASM 19
+#define SCE_FS_LABEL 20
+#define SCE_FS_ERROR 21
+#define SCE_FS_HEXNUMBER 22
+#define SCE_FS_BINNUMBER 23
+#define SCE_CSOUND_DEFAULT 0
+#define SCE_CSOUND_COMMENT 1
+#define SCE_CSOUND_NUMBER 2
+#define SCE_CSOUND_OPERATOR 3
+#define SCE_CSOUND_INSTR 4
+#define SCE_CSOUND_IDENTIFIER 5
+#define SCE_CSOUND_OPCODE 6
+#define SCE_CSOUND_HEADERSTMT 7
+#define SCE_CSOUND_USERKEYWORD 8
+#define SCE_CSOUND_COMMENTBLOCK 9
+#define SCE_CSOUND_PARAM 10
+#define SCE_CSOUND_ARATE_VAR 11
+#define SCE_CSOUND_KRATE_VAR 12
+#define SCE_CSOUND_IRATE_VAR 13
+#define SCE_CSOUND_GLOBAL_VAR 14
+#define SCE_CSOUND_STRINGEOL 15
+#define SCE_INNO_DEFAULT 0
+#define SCE_INNO_COMMENT 1
+#define SCE_INNO_KEYWORD 2
+#define SCE_INNO_PARAMETER 3
+#define SCE_INNO_SECTION 4
+#define SCE_INNO_PREPROC 5
+#define SCE_INNO_PREPROC_INLINE 6
+#define SCE_INNO_COMMENT_PASCAL 7
+#define SCE_INNO_KEYWORD_PASCAL 8
+#define SCE_INNO_KEYWORD_USER 9
+#define SCE_INNO_STRING_DOUBLE 10
+#define SCE_INNO_STRING_SINGLE 11
+#define SCE_INNO_IDENTIFIER 12
+#define SCE_OPAL_SPACE 0
+#define SCE_OPAL_COMMENT_BLOCK 1
+#define SCE_OPAL_COMMENT_LINE 2
+#define SCE_OPAL_INTEGER 3
+#define SCE_OPAL_KEYWORD 4
+#define SCE_OPAL_SORT 5
+#define SCE_OPAL_STRING 6
+#define SCE_OPAL_PAR 7
+#define SCE_OPAL_BOOL_CONST 8
+#define SCE_OPAL_DEFAULT 32
+#define SCE_SPICE_DEFAULT 0
+#define SCE_SPICE_IDENTIFIER 1
+#define SCE_SPICE_KEYWORD 2
+#define SCE_SPICE_KEYWORD2 3
+#define SCE_SPICE_KEYWORD3 4
+#define SCE_SPICE_NUMBER 5
+#define SCE_SPICE_DELIMITER 6
+#define SCE_SPICE_VALUE 7
+#define SCE_SPICE_COMMENTLINE 8
+#define SCE_CMAKE_DEFAULT 0
+#define SCE_CMAKE_COMMENT 1
+#define SCE_CMAKE_STRINGDQ 2
+#define SCE_CMAKE_STRINGLQ 3
+#define SCE_CMAKE_STRINGRQ 4
+#define SCE_CMAKE_COMMANDS 5
+#define SCE_CMAKE_PARAMETERS 6
+#define SCE_CMAKE_VARIABLE 7
+#define SCE_CMAKE_USERDEFINED 8
+#define SCE_CMAKE_WHILEDEF 9
+#define SCE_CMAKE_FOREACHDEF 10
+#define SCE_CMAKE_IFDEFINEDEF 11
+#define SCE_CMAKE_MACRODEF 12
+#define SCE_CMAKE_STRINGVAR 13
+#define SCE_CMAKE_NUMBER 14
+#define SCE_GAP_DEFAULT 0
+#define SCE_GAP_IDENTIFIER 1
+#define SCE_GAP_KEYWORD 2
+#define SCE_GAP_KEYWORD2 3
+#define SCE_GAP_KEYWORD3 4
+#define SCE_GAP_KEYWORD4 5
+#define SCE_GAP_STRING 6
+#define SCE_GAP_CHAR 7
+#define SCE_GAP_OPERATOR 8
+#define SCE_GAP_COMMENT 9
+#define SCE_GAP_NUMBER 10
+#define SCE_GAP_STRINGEOL 11
+#define SCE_PLM_DEFAULT 0
+#define SCE_PLM_COMMENT 1
+#define SCE_PLM_STRING 2
+#define SCE_PLM_NUMBER 3
+#define SCE_PLM_IDENTIFIER 4
+#define SCE_PLM_OPERATOR 5
+#define SCE_PLM_CONTROL 6
+#define SCE_PLM_KEYWORD 7
+#define SCE_4GL_DEFAULT 0
+#define SCE_4GL_NUMBER 1
+#define SCE_4GL_WORD 2
+#define SCE_4GL_STRING 3
+#define SCE_4GL_CHARACTER 4
+#define SCE_4GL_PREPROCESSOR 5
+#define SCE_4GL_OPERATOR 6
+#define SCE_4GL_IDENTIFIER 7
+#define SCE_4GL_BLOCK 8
+#define SCE_4GL_END 9
+#define SCE_4GL_COMMENT1 10
+#define SCE_4GL_COMMENT2 11
+#define SCE_4GL_COMMENT3 12
+#define SCE_4GL_COMMENT4 13
+#define SCE_4GL_COMMENT5 14
+#define SCE_4GL_COMMENT6 15
+#define SCE_4GL_DEFAULT_ 16
+#define SCE_4GL_NUMBER_ 17
+#define SCE_4GL_WORD_ 18
+#define SCE_4GL_STRING_ 19
+#define SCE_4GL_CHARACTER_ 20
+#define SCE_4GL_PREPROCESSOR_ 21
+#define SCE_4GL_OPERATOR_ 22
+#define SCE_4GL_IDENTIFIER_ 23
+#define SCE_4GL_BLOCK_ 24
+#define SCE_4GL_END_ 25
+#define SCE_4GL_COMMENT1_ 26
+#define SCE_4GL_COMMENT2_ 27
+#define SCE_4GL_COMMENT3_ 28
+#define SCE_4GL_COMMENT4_ 29
+#define SCE_4GL_COMMENT5_ 30
+#define SCE_4GL_COMMENT6_ 31
+#define SCE_ABAQUS_DEFAULT 0
+#define SCE_ABAQUS_COMMENT 1
+#define SCE_ABAQUS_COMMENTBLOCK 2
+#define SCE_ABAQUS_NUMBER 3
+#define SCE_ABAQUS_STRING 4
+#define SCE_ABAQUS_OPERATOR 5
+#define SCE_ABAQUS_WORD 6
+#define SCE_ABAQUS_PROCESSOR 7
+#define SCE_ABAQUS_COMMAND 8
+#define SCE_ABAQUS_SLASHCOMMAND 9
+#define SCE_ABAQUS_STARCOMMAND 10
+#define SCE_ABAQUS_ARGUMENT 11
+#define SCE_ABAQUS_FUNCTION 12
+#define SCE_ASY_DEFAULT 0
+#define SCE_ASY_COMMENT 1
+#define SCE_ASY_COMMENTLINE 2
+#define SCE_ASY_NUMBER 3
+#define SCE_ASY_WORD 4
+#define SCE_ASY_STRING 5
+#define SCE_ASY_CHARACTER 6
+#define SCE_ASY_OPERATOR 7
+#define SCE_ASY_IDENTIFIER 8
+#define SCE_ASY_STRINGEOL 9
+#define SCE_ASY_COMMENTLINEDOC 10
+#define SCE_ASY_WORD2 11
+#define SCE_R_DEFAULT 0
+#define SCE_R_COMMENT 1
+#define SCE_R_KWORD 2
+#define SCE_R_BASEKWORD 3
+#define SCE_R_OTHERKWORD 4
+#define SCE_R_NUMBER 5
+#define SCE_R_STRING 6
+#define SCE_R_STRING2 7
+#define SCE_R_OPERATOR 8
+#define SCE_R_IDENTIFIER 9
+#define SCE_R_INFIX 10
+#define SCE_R_INFIXEOL 11
+#define SCE_MAGIK_DEFAULT 0
+#define SCE_MAGIK_COMMENT 1
+#define SCE_MAGIK_HYPER_COMMENT 16
+#define SCE_MAGIK_STRING 2
+#define SCE_MAGIK_CHARACTER 3
+#define SCE_MAGIK_NUMBER 4
+#define SCE_MAGIK_IDENTIFIER 5
+#define SCE_MAGIK_OPERATOR 6
+#define SCE_MAGIK_FLOW 7
+#define SCE_MAGIK_CONTAINER 8
+#define SCE_MAGIK_BRACKET_BLOCK 9
+#define SCE_MAGIK_BRACE_BLOCK 10
+#define SCE_MAGIK_SQBRACKET_BLOCK 11
+#define SCE_MAGIK_UNKNOWN_KEYWORD 12
+#define SCE_MAGIK_KEYWORD 13
+#define SCE_MAGIK_PRAGMA 14
+#define SCE_MAGIK_SYMBOL 15
+#define SCE_POWERSHELL_DEFAULT 0
+#define SCE_POWERSHELL_COMMENT 1
+#define SCE_POWERSHELL_STRING 2
+#define SCE_POWERSHELL_CHARACTER 3
+#define SCE_POWERSHELL_NUMBER 4
+#define SCE_POWERSHELL_VARIABLE 5
+#define SCE_POWERSHELL_OPERATOR 6
+#define SCE_POWERSHELL_IDENTIFIER 7
+#define SCE_POWERSHELL_KEYWORD 8
+#define SCE_POWERSHELL_CMDLET 9
+#define SCE_POWERSHELL_ALIAS 10
+#define SCE_MYSQL_DEFAULT 0
+#define SCE_MYSQL_COMMENT 1
+#define SCE_MYSQL_COMMENTLINE 2
+#define SCE_MYSQL_VARIABLE 3
+#define SCE_MYSQL_SYSTEMVARIABLE 4
+#define SCE_MYSQL_KNOWNSYSTEMVARIABLE 5
+#define SCE_MYSQL_NUMBER 6
+#define SCE_MYSQL_MAJORKEYWORD 7
+#define SCE_MYSQL_KEYWORD 8
+#define SCE_MYSQL_DATABASEOBJECT 9
+#define SCE_MYSQL_PROCEDUREKEYWORD 10
+#define SCE_MYSQL_STRING 11
+#define SCE_MYSQL_SQSTRING 12
+#define SCE_MYSQL_DQSTRING 13
+#define SCE_MYSQL_OPERATOR 14
+#define SCE_MYSQL_FUNCTION 15
+#define SCE_MYSQL_IDENTIFIER 16
+#define SCE_MYSQL_QUOTEDIDENTIFIER 17
+#define SCE_MYSQL_USER1 18
+#define SCE_MYSQL_USER2 19
+#define SCE_MYSQL_USER3 20
+#define SCE_PO_DEFAULT 0
+#define SCE_PO_COMMENT 1
+#define SCE_PO_MSGID 2
+#define SCE_PO_MSGID_TEXT 3
+#define SCE_PO_MSGSTR 4
+#define SCE_PO_MSGSTR_TEXT 5
+#define SCE_PO_MSGCTXT 6
+#define SCE_PO_MSGCTXT_TEXT 7
+#define SCE_PO_FUZZY 8
+#define SCLEX_ASP 29
+#define SCLEX_PHP 30
+//--Autogenerated -- end of section automatically generated from Scintilla.iface
+
+#endif

Added: trunk/plugins/scintilla/scintilla/include/Scintilla.h
==============================================================================
--- (empty file)
+++ trunk/plugins/scintilla/scintilla/include/Scintilla.h	Wed Apr  8 07:16:46 2009
@@ -0,0 +1,854 @@
+// Scintilla source code edit control
+/** @file Scintilla.h
+ ** Interface to the edit control.
+ **/
+// Copyright 1998-2003 by Neil Hodgson <neilh scintilla org>
+// The License.txt file describes the conditions under which this software may be distributed.
+
+// Most of this file is automatically generated from the Scintilla.iface interface definition
+// file which contains any comments about the definitions. HFacer.py does the generation.
+
+#ifndef SCINTILLA_H
+#define SCINTILLA_H
+
+#if LCCWIN
+typedef BOOL bool;
+#endif
+
+#if PLAT_WIN
+// Return false on failure:
+bool Scintilla_RegisterClasses(void *hInstance);
+bool Scintilla_ReleaseResources();
+#endif
+int Scintilla_LinkLexers();
+
+// Here should be placed typedefs for uptr_t, an unsigned integer type large enough to
+// hold a pointer and sptr_t, a signed integer large enough to hold a pointer.
+// May need to be changed for 64 bit platforms.
+#if _MSC_VER >= 1300
+#include <BaseTsd.h>
+#endif
+#ifdef HAVE_STDINT_H
+#include <stdint.h>
+typedef uintptr_t uptr_t;
+typedef intptr_t sptr_t;
+#else
+#ifdef MAXULONG_PTR
+typedef ULONG_PTR uptr_t;
+typedef LONG_PTR sptr_t;
+#else
+typedef unsigned long uptr_t;
+typedef long sptr_t;
+#endif
+#endif
+
+typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam, sptr_t lParam);
+
+//++Autogenerated -- start of section automatically generated from Scintilla.iface
+#define INVALID_POSITION -1
+#define SCI_START 2000
+#define SCI_OPTIONAL_START 3000
+#define SCI_LEXER_START 4000
+#define SCI_ADDTEXT 2001
+#define SCI_ADDSTYLEDTEXT 2002
+#define SCI_INSERTTEXT 2003
+#define SCI_CLEARALL 2004
+#define SCI_CLEARDOCUMENTSTYLE 2005
+#define SCI_GETLENGTH 2006
+#define SCI_GETCHARAT 2007
+#define SCI_GETCURRENTPOS 2008
+#define SCI_GETANCHOR 2009
+#define SCI_GETSTYLEAT 2010
+#define SCI_REDO 2011
+#define SCI_SETUNDOCOLLECTION 2012
+#define SCI_SELECTALL 2013
+#define SCI_SETSAVEPOINT 2014
+#define SCI_GETSTYLEDTEXT 2015
+#define SCI_CANREDO 2016
+#define SCI_MARKERLINEFROMHANDLE 2017
+#define SCI_MARKERDELETEHANDLE 2018
+#define SCI_GETUNDOCOLLECTION 2019
+#define SCWS_INVISIBLE 0
+#define SCWS_VISIBLEALWAYS 1
+#define SCWS_VISIBLEAFTERINDENT 2
+#define SCI_GETVIEWWS 2020
+#define SCI_SETVIEWWS 2021
+#define SCI_POSITIONFROMPOINT 2022
+#define SCI_POSITIONFROMPOINTCLOSE 2023
+#define SCI_GOTOLINE 2024
+#define SCI_GOTOPOS 2025
+#define SCI_SETANCHOR 2026
+#define SCI_GETCURLINE 2027
+#define SCI_GETENDSTYLED 2028
+#define SC_EOL_CRLF 0
+#define SC_EOL_CR 1
+#define SC_EOL_LF 2
+#define SCI_CONVERTEOLS 2029
+#define SCI_GETEOLMODE 2030
+#define SCI_SETEOLMODE 2031
+#define SCI_STARTSTYLING 2032
+#define SCI_SETSTYLING 2033
+#define SCI_GETBUFFEREDDRAW 2034
+#define SCI_SETBUFFEREDDRAW 2035
+#define SCI_SETTABWIDTH 2036
+#define SCI_GETTABWIDTH 2121
+#define SC_CP_UTF8 65001
+#define SC_CP_DBCS 1
+#define SCI_SETCODEPAGE 2037
+#define SCI_SETUSEPALETTE 2039
+#define MARKER_MAX 31
+#define SC_MARK_CIRCLE 0
+#define SC_MARK_ROUNDRECT 1
+#define SC_MARK_ARROW 2
+#define SC_MARK_SMALLRECT 3
+#define SC_MARK_SHORTARROW 4
+#define SC_MARK_EMPTY 5
+#define SC_MARK_ARROWDOWN 6
+#define SC_MARK_MINUS 7
+#define SC_MARK_PLUS 8
+#define SC_MARK_VLINE 9
+#define SC_MARK_LCORNER 10
+#define SC_MARK_TCORNER 11
+#define SC_MARK_BOXPLUS 12
+#define SC_MARK_BOXPLUSCONNECTED 13
+#define SC_MARK_BOXMINUS 14
+#define SC_MARK_BOXMINUSCONNECTED 15
+#define SC_MARK_LCORNERCURVE 16
+#define SC_MARK_TCORNERCURVE 17
+#define SC_MARK_CIRCLEPLUS 18
+#define SC_MARK_CIRCLEPLUSCONNECTED 19
+#define SC_MARK_CIRCLEMINUS 20
+#define SC_MARK_CIRCLEMINUSCONNECTED 21
+#define SC_MARK_BACKGROUND 22
+#define SC_MARK_DOTDOTDOT 23
+#define SC_MARK_ARROWS 24
+#define SC_MARK_PIXMAP 25
+#define SC_MARK_FULLRECT 26
+#define SC_MARK_LEFTRECT 27
+#define SC_MARK_CHARACTER 10000
+#define SC_MARKNUM_FOLDEREND 25
+#define SC_MARKNUM_FOLDEROPENMID 26
+#define SC_MARKNUM_FOLDERMIDTAIL 27
+#define SC_MARKNUM_FOLDERTAIL 28
+#define SC_MARKNUM_FOLDERSUB 29
+#define SC_MARKNUM_FOLDER 30
+#define SC_MARKNUM_FOLDEROPEN 31
+#define SC_MASK_FOLDERS 0xFE000000
+#define SCI_MARKERDEFINE 2040
+#define SCI_MARKERSETFORE 2041
+#define SCI_MARKERSETBACK 2042
+#define SCI_MARKERADD 2043
+#define SCI_MARKERDELETE 2044
+#define SCI_MARKERDELETEALL 2045
+#define SCI_MARKERGET 2046
+#define SCI_MARKERNEXT 2047
+#define SCI_MARKERPREVIOUS 2048
+#define SCI_MARKERDEFINEPIXMAP 2049
+#define SCI_MARKERADDSET 2466
+#define SCI_MARKERSETALPHA 2476
+#define SC_MARGIN_SYMBOL 0
+#define SC_MARGIN_NUMBER 1
+#define SC_MARGIN_BACK 2
+#define SC_MARGIN_FORE 3
+#define SCI_SETMARGINTYPEN 2240
+#define SCI_GETMARGINTYPEN 2241
+#define SCI_SETMARGINWIDTHN 2242
+#define SCI_GETMARGINWIDTHN 2243
+#define SCI_SETMARGINMASKN 2244
+#define SCI_GETMARGINMASKN 2245
+#define SCI_SETMARGINSENSITIVEN 2246
+#define SCI_GETMARGINSENSITIVEN 2247
+#define STYLE_DEFAULT 32
+#define STYLE_LINENUMBER 33
+#define STYLE_BRACELIGHT 34
+#define STYLE_BRACEBAD 35
+#define STYLE_CONTROLCHAR 36
+#define STYLE_INDENTGUIDE 37
+#define STYLE_CALLTIP 38
+#define STYLE_LASTPREDEFINED 39
+#define STYLE_MAX 255
+#define SC_CHARSET_ANSI 0
+#define SC_CHARSET_DEFAULT 1
+#define SC_CHARSET_BALTIC 186
+#define SC_CHARSET_CHINESEBIG5 136
+#define SC_CHARSET_EASTEUROPE 238
+#define SC_CHARSET_GB2312 134
+#define SC_CHARSET_GREEK 161
+#define SC_CHARSET_HANGUL 129
+#define SC_CHARSET_MAC 77
+#define SC_CHARSET_OEM 255
+#define SC_CHARSET_RUSSIAN 204
+#define SC_CHARSET_CYRILLIC 1251
+#define SC_CHARSET_SHIFTJIS 128
+#define SC_CHARSET_SYMBOL 2
+#define SC_CHARSET_TURKISH 162
+#define SC_CHARSET_JOHAB 130
+#define SC_CHARSET_HEBREW 177
+#define SC_CHARSET_ARABIC 178
+#define SC_CHARSET_VIETNAMESE 163
+#define SC_CHARSET_THAI 222
+#define SC_CHARSET_8859_15 1000
+#define SCI_STYLECLEARALL 2050
+#define SCI_STYLESETFORE 2051
+#define SCI_STYLESETBACK 2052
+#define SCI_STYLESETBOLD 2053
+#define SCI_STYLESETITALIC 2054
+#define SCI_STYLESETSIZE 2055
+#define SCI_STYLESETFONT 2056
+#define SCI_STYLESETEOLFILLED 2057
+#define SCI_STYLERESETDEFAULT 2058
+#define SCI_STYLESETUNDERLINE 2059
+#define SC_CASE_MIXED 0
+#define SC_CASE_UPPER 1
+#define SC_CASE_LOWER 2
+#define SCI_STYLEGETFORE 2481
+#define SCI_STYLEGETBACK 2482
+#define SCI_STYLEGETBOLD 2483
+#define SCI_STYLEGETITALIC 2484
+#define SCI_STYLEGETSIZE 2485
+#define SCI_STYLEGETFONT 2486
+#define SCI_STYLEGETEOLFILLED 2487
+#define SCI_STYLEGETUNDERLINE 2488
+#define SCI_STYLEGETCASE 2489
+#define SCI_STYLEGETCHARACTERSET 2490
+#define SCI_STYLEGETVISIBLE 2491
+#define SCI_STYLEGETCHANGEABLE 2492
+#define SCI_STYLEGETHOTSPOT 2493
+#define SCI_STYLESETCASE 2060
+#define SCI_STYLESETCHARACTERSET 2066
+#define SCI_STYLESETHOTSPOT 2409
+#define SCI_SETSELFORE 2067
+#define SCI_SETSELBACK 2068
+#define SCI_GETSELALPHA 2477
+#define SCI_SETSELALPHA 2478
+#define SCI_GETSELEOLFILLED 2479
+#define SCI_SETSELEOLFILLED 2480
+#define SCI_SETCARETFORE 2069
+#define SCI_ASSIGNCMDKEY 2070
+#define SCI_CLEARCMDKEY 2071
+#define SCI_CLEARALLCMDKEYS 2072
+#define SCI_SETSTYLINGEX 2073
+#define SCI_STYLESETVISIBLE 2074
+#define SCI_GETCARETPERIOD 2075
+#define SCI_SETCARETPERIOD 2076
+#define SCI_SETWORDCHARS 2077
+#define SCI_BEGINUNDOACTION 2078
+#define SCI_ENDUNDOACTION 2079
+#define INDIC_PLAIN 0
+#define INDIC_SQUIGGLE 1
+#define INDIC_TT 2
+#define INDIC_DIAGONAL 3
+#define INDIC_STRIKE 4
+#define INDIC_HIDDEN 5
+#define INDIC_BOX 6
+#define INDIC_ROUNDBOX 7
+#define INDIC_MAX 31
+#define INDIC_CONTAINER 8
+#define INDIC0_MASK 0x20
+#define INDIC1_MASK 0x40
+#define INDIC2_MASK 0x80
+#define INDICS_MASK 0xE0
+#define SCI_INDICSETSTYLE 2080
+#define SCI_INDICGETSTYLE 2081
+#define SCI_INDICSETFORE 2082
+#define SCI_INDICGETFORE 2083
+#define SCI_INDICSETUNDER 2510
+#define SCI_INDICGETUNDER 2511
+#define SCI_SETWHITESPACEFORE 2084
+#define SCI_SETWHITESPACEBACK 2085
+#define SCI_SETSTYLEBITS 2090
+#define SCI_GETSTYLEBITS 2091
+#define SCI_SETLINESTATE 2092
+#define SCI_GETLINESTATE 2093
+#define SCI_GETMAXLINESTATE 2094
+#define SCI_GETCARETLINEVISIBLE 2095
+#define SCI_SETCARETLINEVISIBLE 2096
+#define SCI_GETCARETLINEBACK 2097
+#define SCI_SETCARETLINEBACK 2098
+#define SCI_STYLESETCHANGEABLE 2099
+#define SCI_AUTOCSHOW 2100
+#define SCI_AUTOCCANCEL 2101
+#define SCI_AUTOCACTIVE 2102
+#define SCI_AUTOCPOSSTART 2103
+#define SCI_AUTOCCOMPLETE 2104
+#define SCI_AUTOCSTOPS 2105
+#define SCI_AUTOCSETSEPARATOR 2106
+#define SCI_AUTOCGETSEPARATOR 2107
+#define SCI_AUTOCSELECT 2108
+#define SCI_AUTOCSETCANCELATSTART 2110
+#define SCI_AUTOCGETCANCELATSTART 2111
+#define SCI_AUTOCSETFILLUPS 2112
+#define SCI_AUTOCSETCHOOSESINGLE 2113
+#define SCI_AUTOCGETCHOOSESINGLE 2114
+#define SCI_AUTOCSETIGNORECASE 2115
+#define SCI_AUTOCGETIGNORECASE 2116
+#define SCI_USERLISTSHOW 2117
+#define SCI_AUTOCSETAUTOHIDE 2118
+#define SCI_AUTOCGETAUTOHIDE 2119
+#define SCI_AUTOCSETDROPRESTOFWORD 2270
+#define SCI_AUTOCGETDROPRESTOFWORD 2271
+#define SCI_REGISTERIMAGE 2405
+#define SCI_CLEARREGISTEREDIMAGES 2408
+#define SCI_AUTOCGETTYPESEPARATOR 2285
+#define SCI_AUTOCSETTYPESEPARATOR 2286
+#define SCI_AUTOCSETMAXWIDTH 2208
+#define SCI_AUTOCGETMAXWIDTH 2209
+#define SCI_AUTOCSETMAXHEIGHT 2210
+#define SCI_AUTOCGETMAXHEIGHT 2211
+#define SCI_SETINDENT 2122
+#define SCI_GETINDENT 2123
+#define SCI_SETUSETABS 2124
+#define SCI_GETUSETABS 2125
+#define SCI_SETLINEINDENTATION 2126
+#define SCI_GETLINEINDENTATION 2127
+#define SCI_GETLINEINDENTPOSITION 2128
+#define SCI_GETCOLUMN 2129
+#define SCI_SETHSCROLLBAR 2130
+#define SCI_GETHSCROLLBAR 2131
+#define SC_IV_NONE 0
+#define SC_IV_REAL 1
+#define SC_IV_LOOKFORWARD 2
+#define SC_IV_LOOKBOTH 3
+#define SCI_SETINDENTATIONGUIDES 2132
+#define SCI_GETINDENTATIONGUIDES 2133
+#define SCI_SETHIGHLIGHTGUIDE 2134
+#define SCI_GETHIGHLIGHTGUIDE 2135
+#define SCI_GETLINEENDPOSITION 2136
+#define SCI_GETCODEPAGE 2137
+#define SCI_GETCARETFORE 2138
+#define SCI_GETUSEPALETTE 2139
+#define SCI_GETREADONLY 2140
+#define SCI_SETCURRENTPOS 2141
+#define SCI_SETSELECTIONSTART 2142
+#define SCI_GETSELECTIONSTART 2143
+#define SCI_SETSELECTIONEND 2144
+#define SCI_GETSELECTIONEND 2145
+#define SCI_SETPRINTMAGNIFICATION 2146
+#define SCI_GETPRINTMAGNIFICATION 2147
+#define SC_PRINT_NORMAL 0
+#define SC_PRINT_INVERTLIGHT 1
+#define SC_PRINT_BLACKONWHITE 2
+#define SC_PRINT_COLOURONWHITE 3
+#define SC_PRINT_COLOURONWHITEDEFAULTBG 4
+#define SCI_SETPRINTCOLOURMODE 2148
+#define SCI_GETPRINTCOLOURMODE 2149
+#define SCFIND_WHOLEWORD 2
+#define SCFIND_MATCHCASE 4
+#define SCFIND_WORDSTART 0x00100000
+#define SCFIND_REGEXP 0x00200000
+#define SCFIND_POSIX 0x00400000
+#define SCI_FINDTEXT 2150
+#define SCI_FORMATRANGE 2151
+#define SCI_GETFIRSTVISIBLELINE 2152
+#define SCI_GETLINE 2153
+#define SCI_GETLINECOUNT 2154
+#define SCI_SETMARGINLEFT 2155
+#define SCI_GETMARGINLEFT 2156
+#define SCI_SETMARGINRIGHT 2157
+#define SCI_GETMARGINRIGHT 2158
+#define SCI_GETMODIFY 2159
+#define SCI_SETSEL 2160
+#define SCI_GETSELTEXT 2161
+#define SCI_GETTEXTRANGE 2162
+#define SCI_HIDESELECTION 2163
+#define SCI_POINTXFROMPOSITION 2164
+#define SCI_POINTYFROMPOSITION 2165
+#define SCI_LINEFROMPOSITION 2166
+#define SCI_POSITIONFROMLINE 2167
+#define SCI_LINESCROLL 2168
+#define SCI_SCROLLCARET 2169
+#define SCI_REPLACESEL 2170
+#define SCI_SETREADONLY 2171
+#define SCI_NULL 2172
+#define SCI_CANPASTE 2173
+#define SCI_CANUNDO 2174
+#define SCI_EMPTYUNDOBUFFER 2175
+#define SCI_UNDO 2176
+#define SCI_CUT 2177
+#define SCI_COPY 2178
+#define SCI_PASTE 2179
+#define SCI_CLEAR 2180
+#define SCI_SETTEXT 2181
+#define SCI_GETTEXT 2182
+#define SCI_GETTEXTLENGTH 2183
+#define SCI_GETDIRECTFUNCTION 2184
+#define SCI_GETDIRECTPOINTER 2185
+#define SCI_SETOVERTYPE 2186
+#define SCI_GETOVERTYPE 2187
+#define SCI_SETCARETWIDTH 2188
+#define SCI_GETCARETWIDTH 2189
+#define SCI_SETTARGETSTART 2190
+#define SCI_GETTARGETSTART 2191
+#define SCI_SETTARGETEND 2192
+#define SCI_GETTARGETEND 2193
+#define SCI_REPLACETARGET 2194
+#define SCI_REPLACETARGETRE 2195
+#define SCI_SEARCHINTARGET 2197
+#define SCI_SETSEARCHFLAGS 2198
+#define SCI_GETSEARCHFLAGS 2199
+#define SCI_CALLTIPSHOW 2200
+#define SCI_CALLTIPCANCEL 2201
+#define SCI_CALLTIPACTIVE 2202
+#define SCI_CALLTIPPOSSTART 2203
+#define SCI_CALLTIPSETHLT 2204
+#define SCI_CALLTIPSETBACK 2205
+#define SCI_CALLTIPSETFORE 2206
+#define SCI_CALLTIPSETFOREHLT 2207
+#define SCI_CALLTIPUSESTYLE 2212
+#define SCI_VISIBLEFROMDOCLINE 2220
+#define SCI_DOCLINEFROMVISIBLE 2221
+#define SCI_WRAPCOUNT 2235
+#define SC_FOLDLEVELBASE 0x400
+#define SC_FOLDLEVELWHITEFLAG 0x1000
+#define SC_FOLDLEVELHEADERFLAG 0x2000
+#define SC_FOLDLEVELBOXHEADERFLAG 0x4000
+#define SC_FOLDLEVELBOXFOOTERFLAG 0x8000
+#define SC_FOLDLEVELCONTRACTED 0x10000
+#define SC_FOLDLEVELUNINDENT 0x20000
+#define SC_FOLDLEVELNUMBERMASK 0x0FFF
+#define SCI_SETFOLDLEVEL 2222
+#define SCI_GETFOLDLEVEL 2223
+#define SCI_GETLASTCHILD 2224
+#define SCI_GETFOLDPARENT 2225
+#define SCI_SHOWLINES 2226
+#define SCI_HIDELINES 2227
+#define SCI_GETLINEVISIBLE 2228
+#define SCI_SETFOLDEXPANDED 2229
+#define SCI_GETFOLDEXPANDED 2230
+#define SCI_TOGGLEFOLD 2231
+#define SCI_ENSUREVISIBLE 2232
+#define SC_FOLDFLAG_LINEBEFORE_EXPANDED 0x0002
+#define SC_FOLDFLAG_LINEBEFORE_CONTRACTED 0x0004
+#define SC_FOLDFLAG_LINEAFTER_EXPANDED 0x0008
+#define SC_FOLDFLAG_LINEAFTER_CONTRACTED 0x0010
+#define SC_FOLDFLAG_LEVELNUMBERS 0x0040
+#define SC_FOLDFLAG_BOX 0x0001
+#define SCI_SETFOLDFLAGS 2233
+#define SCI_ENSUREVISIBLEENFORCEPOLICY 2234
+#define SCI_SETTABINDENTS 2260
+#define SCI_GETTABINDENTS 2261
+#define SCI_SETBACKSPACEUNINDENTS 2262
+#define SCI_GETBACKSPACEUNINDENTS 2263
+#define SC_TIME_FOREVER 10000000
+#define SCI_SETMOUSEDWELLTIME 2264
+#define SCI_GETMOUSEDWELLTIME 2265
+#define SCI_WORDSTARTPOSITION 2266
+#define SCI_WORDENDPOSITION 2267
+#define SC_WRAP_NONE 0
+#define SC_WRAP_WORD 1
+#define SC_WRAP_CHAR 2
+#define SCI_SETWRAPMODE 2268
+#define SCI_GETWRAPMODE 2269
+#define SC_WRAPVISUALFLAG_NONE 0x0000
+#define SC_WRAPVISUALFLAG_END 0x0001
+#define SC_WRAPVISUALFLAG_START 0x0002
+#define SCI_SETWRAPVISUALFLAGS 2460
+#define SCI_GETWRAPVISUALFLAGS 2461
+#define SC_WRAPVISUALFLAGLOC_DEFAULT 0x0000
+#define SC_WRAPVISUALFLAGLOC_END_BY_TEXT 0x0001
+#define SC_WRAPVISUALFLAGLOC_START_BY_TEXT 0x0002
+#define SCI_SETWRAPVISUALFLAGSLOCATION 2462
+#define SCI_GETWRAPVISUALFLAGSLOCATION 2463
+#define SCI_SETWRAPSTARTINDENT 2464
+#define SCI_GETWRAPSTARTINDENT 2465
+#define SC_CACHE_NONE 0
+#define SC_CACHE_CARET 1
+#define SC_CACHE_PAGE 2
+#define SC_CACHE_DOCUMENT 3
+#define SCI_SETLAYOUTCACHE 2272
+#define SCI_GETLAYOUTCACHE 2273
+#define SCI_SETSCROLLWIDTH 2274
+#define SCI_GETSCROLLWIDTH 2275
+#define SCI_SETSCROLLWIDTHTRACKING 2516
+#define SCI_GETSCROLLWIDTHTRACKING 2517
+#define SCI_TEXTWIDTH 2276
+#define SCI_SETENDATLASTLINE 2277
+#define SCI_GETENDATLASTLINE 2278
+#define SCI_TEXTHEIGHT 2279
+#define SCI_SETVSCROLLBAR 2280
+#define SCI_GETVSCROLLBAR 2281
+#define SCI_APPENDTEXT 2282
+#define SCI_GETTWOPHASEDRAW 2283
+#define SCI_SETTWOPHASEDRAW 2284
+#define SCI_TARGETFROMSELECTION 2287
+#define SCI_LINESJOIN 2288
+#define SCI_LINESSPLIT 2289
+#define SCI_SETFOLDMARGINCOLOUR 2290
+#define SCI_SETFOLDMARGINHICOLOUR 2291
+#define SCI_LINEDOWN 2300
+#define SCI_LINEDOWNEXTEND 2301
+#define SCI_LINEUP 2302
+#define SCI_LINEUPEXTEND 2303
+#define SCI_CHARLEFT 2304
+#define SCI_CHARLEFTEXTEND 2305
+#define SCI_CHARRIGHT 2306
+#define SCI_CHARRIGHTEXTEND 2307
+#define SCI_WORDLEFT 2308
+#define SCI_WORDLEFTEXTEND 2309
+#define SCI_WORDRIGHT 2310
+#define SCI_WORDRIGHTEXTEND 2311
+#define SCI_HOME 2312
+#define SCI_HOMEEXTEND 2313
+#define SCI_LINEEND 2314
+#define SCI_LINEENDEXTEND 2315
+#define SCI_DOCUMENTSTART 2316
+#define SCI_DOCUMENTSTARTEXTEND 2317
+#define SCI_DOCUMENTEND 2318
+#define SCI_DOCUMENTENDEXTEND 2319
+#define SCI_PAGEUP 2320
+#define SCI_PAGEUPEXTEND 2321
+#define SCI_PAGEDOWN 2322
+#define SCI_PAGEDOWNEXTEND 2323
+#define SCI_EDITTOGGLEOVERTYPE 2324
+#define SCI_CANCEL 2325
+#define SCI_DELETEBACK 2326
+#define SCI_TAB 2327
+#define SCI_BACKTAB 2328
+#define SCI_NEWLINE 2329
+#define SCI_FORMFEED 2330
+#define SCI_VCHOME 2331
+#define SCI_VCHOMEEXTEND 2332
+#define SCI_ZOOMIN 2333
+#define SCI_ZOOMOUT 2334
+#define SCI_DELWORDLEFT 2335
+#define SCI_DELWORDRIGHT 2336
+#define SCI_DELWORDRIGHTEND 2518
+#define SCI_LINECUT 2337
+#define SCI_LINEDELETE 2338
+#define SCI_LINETRANSPOSE 2339
+#define SCI_LINEDUPLICATE 2404
+#define SCI_LOWERCASE 2340
+#define SCI_UPPERCASE 2341
+#define SCI_LINESCROLLDOWN 2342
+#define SCI_LINESCROLLUP 2343
+#define SCI_DELETEBACKNOTLINE 2344
+#define SCI_HOMEDISPLAY 2345
+#define SCI_HOMEDISPLAYEXTEND 2346
+#define SCI_LINEENDDISPLAY 2347
+#define SCI_LINEENDDISPLAYEXTEND 2348
+#define SCI_HOMEWRAP 2349
+#define SCI_HOMEWRAPEXTEND 2450
+#define SCI_LINEENDWRAP 2451
+#define SCI_LINEENDWRAPEXTEND 2452
+#define SCI_VCHOMEWRAP 2453
+#define SCI_VCHOMEWRAPEXTEND 2454
+#define SCI_LINECOPY 2455
+#define SCI_MOVECARETINSIDEVIEW 2401
+#define SCI_LINELENGTH 2350
+#define SCI_BRACEHIGHLIGHT 2351
+#define SCI_BRACEBADLIGHT 2352
+#define SCI_BRACEMATCH 2353
+#define SCI_GETVIEWEOL 2355
+#define SCI_SETVIEWEOL 2356
+#define SCI_GETDOCPOINTER 2357
+#define SCI_SETDOCPOINTER 2358
+#define SCI_SETMODEVENTMASK 2359
+#define EDGE_NONE 0
+#define EDGE_LINE 1
+#define EDGE_BACKGROUND 2
+#define SCI_GETEDGECOLUMN 2360
+#define SCI_SETEDGECOLUMN 2361
+#define SCI_GETEDGEMODE 2362
+#define SCI_SETEDGEMODE 2363
+#define SCI_GETEDGECOLOUR 2364
+#define SCI_SETEDGECOLOUR 2365
+#define SCI_SEARCHANCHOR 2366
+#define SCI_SEARCHNEXT 2367
+#define SCI_SEARCHPREV 2368
+#define SCI_LINESONSCREEN 2370
+#define SCI_USEPOPUP 2371
+#define SCI_SELECTIONISRECTANGLE 2372
+#define SCI_SETZOOM 2373
+#define SCI_GETZOOM 2374
+#define SCI_CREATEDOCUMENT 2375
+#define SCI_ADDREFDOCUMENT 2376
+#define SCI_RELEASEDOCUMENT 2377
+#define SCI_GETMODEVENTMASK 2378
+#define SCI_SETFOCUS 2380
+#define SCI_GETFOCUS 2381
+#define SCI_SETSTATUS 2382
+#define SCI_GETSTATUS 2383
+#define SCI_SETMOUSEDOWNCAPTURES 2384
+#define SCI_GETMOUSEDOWNCAPTURES 2385
+#define SC_CURSORNORMAL -1
+#define SC_CURSORWAIT 4
+#define SCI_SETCURSOR 2386
+#define SCI_GETCURSOR 2387
+#define SCI_SETCONTROLCHARSYMBOL 2388
+#define SCI_GETCONTROLCHARSYMBOL 2389
+#define SCI_WORDPARTLEFT 2390
+#define SCI_WORDPARTLEFTEXTEND 2391
+#define SCI_WORDPARTRIGHT 2392
+#define SCI_WORDPARTRIGHTEXTEND 2393
+#define VISIBLE_SLOP 0x01
+#define VISIBLE_STRICT 0x04
+#define SCI_SETVISIBLEPOLICY 2394
+#define SCI_DELLINELEFT 2395
+#define SCI_DELLINERIGHT 2396
+#define SCI_SETXOFFSET 2397
+#define SCI_GETXOFFSET 2398
+#define SCI_CHOOSECARETX 2399
+#define SCI_GRABFOCUS 2400
+#define CARET_SLOP 0x01
+#define CARET_STRICT 0x04
+#define CARET_JUMPS 0x10
+#define CARET_EVEN 0x08
+#define SCI_SETXCARETPOLICY 2402
+#define SCI_SETYCARETPOLICY 2403
+#define SCI_SETPRINTWRAPMODE 2406
+#define SCI_GETPRINTWRAPMODE 2407
+#define SCI_SETHOTSPOTACTIVEFORE 2410
+#define SCI_GETHOTSPOTACTIVEFORE 2494
+#define SCI_SETHOTSPOTACTIVEBACK 2411
+#define SCI_GETHOTSPOTACTIVEBACK 2495
+#define SCI_SETHOTSPOTACTIVEUNDERLINE 2412
+#define SCI_GETHOTSPOTACTIVEUNDERLINE 2496
+#define SCI_SETHOTSPOTSINGLELINE 2421
+#define SCI_GETHOTSPOTSINGLELINE 2497
+#define SCI_PARADOWN 2413
+#define SCI_PARADOWNEXTEND 2414
+#define SCI_PARAUP 2415
+#define SCI_PARAUPEXTEND 2416
+#define SCI_POSITIONBEFORE 2417
+#define SCI_POSITIONAFTER 2418
+#define SCI_COPYRANGE 2419
+#define SCI_COPYTEXT 2420
+#define SC_SEL_STREAM 0
+#define SC_SEL_RECTANGLE 1
+#define SC_SEL_LINES 2
+#define SCI_SETSELECTIONMODE 2422
+#define SCI_GETSELECTIONMODE 2423
+#define SCI_GETLINESELSTARTPOSITION 2424
+#define SCI_GETLINESELENDPOSITION 2425
+#define SCI_LINEDOWNRECTEXTEND 2426
+#define SCI_LINEUPRECTEXTEND 2427
+#define SCI_CHARLEFTRECTEXTEND 2428
+#define SCI_CHARRIGHTRECTEXTEND 2429
+#define SCI_HOMERECTEXTEND 2430
+#define SCI_VCHOMERECTEXTEND 2431
+#define SCI_LINEENDRECTEXTEND 2432
+#define SCI_PAGEUPRECTEXTEND 2433
+#define SCI_PAGEDOWNRECTEXTEND 2434
+#define SCI_STUTTEREDPAGEUP 2435
+#define SCI_STUTTEREDPAGEUPEXTEND 2436
+#define SCI_STUTTEREDPAGEDOWN 2437
+#define SCI_STUTTEREDPAGEDOWNEXTEND 2438
+#define SCI_WORDLEFTEND 2439
+#define SCI_WORDLEFTENDEXTEND 2440
+#define SCI_WORDRIGHTEND 2441
+#define SCI_WORDRIGHTENDEXTEND 2442
+#define SCI_SETWHITESPACECHARS 2443
+#define SCI_SETCHARSDEFAULT 2444
+#define SCI_AUTOCGETCURRENT 2445
+#define SCI_ALLOCATE 2446
+#define SCI_TARGETASUTF8 2447
+#define SCI_SETLENGTHFORENCODE 2448
+#define SCI_ENCODEDFROMUTF8 2449
+#define SCI_FINDCOLUMN 2456
+#define SCI_GETCARETSTICKY 2457
+#define SCI_SETCARETSTICKY 2458
+#define SCI_TOGGLECARETSTICKY 2459
+#define SCI_SETPASTECONVERTENDINGS 2467
+#define SCI_GETPASTECONVERTENDINGS 2468
+#define SCI_SELECTIONDUPLICATE 2469
+#define SC_ALPHA_TRANSPARENT 0
+#define SC_ALPHA_OPAQUE 255
+#define SC_ALPHA_NOALPHA 256
+#define SCI_SETCARETLINEBACKALPHA 2470
+#define SCI_GETCARETLINEBACKALPHA 2471
+#define CARETSTYLE_INVISIBLE 0
+#define CARETSTYLE_LINE 1
+#define CARETSTYLE_BLOCK 2
+#define SCI_SETCARETSTYLE 2512
+#define SCI_GETCARETSTYLE 2513
+#define SCI_SETINDICATORCURRENT 2500
+#define SCI_GETINDICATORCURRENT 2501
+#define SCI_SETINDICATORVALUE 2502
+#define SCI_GETINDICATORVALUE 2503
+#define SCI_INDICATORFILLRANGE 2504
+#define SCI_INDICATORCLEARRANGE 2505
+#define SCI_INDICATORALLONFOR 2506
+#define SCI_INDICATORVALUEAT 2507
+#define SCI_INDICATORSTART 2508
+#define SCI_INDICATOREND 2509
+#define SCI_SETPOSITIONCACHE 2514
+#define SCI_GETPOSITIONCACHE 2515
+#define SCI_COPYALLOWLINE 2519
+#define SCI_GETCHARACTERPOINTER 2520
+#define SCI_SETKEYSUNICODE 2521
+#define SCI_GETKEYSUNICODE 2522
+#define SCI_STARTRECORD 3001
+#define SCI_STOPRECORD 3002
+#define SCI_SETLEXER 4001
+#define SCI_GETLEXER 4002
+#define SCI_COLOURISE 4003
+#define SCI_SETPROPERTY 4004
+#define KEYWORDSET_MAX 8
+#define SCI_SETKEYWORDS 4005
+#define SCI_SETLEXERLANGUAGE 4006
+#define SCI_LOADLEXERLIBRARY 4007
+#define SCI_GETPROPERTY 4008
+#define SCI_GETPROPERTYEXPANDED 4009
+#define SCI_GETPROPERTYINT 4010
+#define SCI_GETSTYLEBITSNEEDED 4011
+#define SC_MOD_INSERTTEXT 0x1
+#define SC_MOD_DELETETEXT 0x2
+#define SC_MOD_CHANGESTYLE 0x4
+#define SC_MOD_CHANGEFOLD 0x8
+#define SC_PERFORMED_USER 0x10
+#define SC_PERFORMED_UNDO 0x20
+#define SC_PERFORMED_REDO 0x40
+#define SC_MULTISTEPUNDOREDO 0x80
+#define SC_LASTSTEPINUNDOREDO 0x100
+#define SC_MOD_CHANGEMARKER 0x200
+#define SC_MOD_BEFOREINSERT 0x400
+#define SC_MOD_BEFOREDELETE 0x800
+#define SC_MULTILINEUNDOREDO 0x1000
+#define SC_STARTACTION 0x2000
+#define SC_MOD_CHANGEINDICATOR 0x4000
+#define SC_MOD_CHANGELINESTATE 0x8000
+#define SC_MODEVENTMASKALL 0xFFFF
+#define SCEN_CHANGE 768
+#define SCEN_SETFOCUS 512
+#define SCEN_KILLFOCUS 256
+#define SCK_DOWN 300
+#define SCK_UP 301
+#define SCK_LEFT 302
+#define SCK_RIGHT 303
+#define SCK_HOME 304
+#define SCK_END 305
+#define SCK_PRIOR 306
+#define SCK_NEXT 307
+#define SCK_DELETE 308
+#define SCK_INSERT 309
+#define SCK_ESCAPE 7
+#define SCK_BACK 8
+#define SCK_TAB 9
+#define SCK_RETURN 13
+#define SCK_ADD 310
+#define SCK_SUBTRACT 311
+#define SCK_DIVIDE 312
+#define SCK_WIN 313
+#define SCK_RWIN 314
+#define SCK_MENU 315
+#define SCMOD_NORM 0
+#define SCMOD_SHIFT 1
+#define SCMOD_CTRL 2
+#define SCMOD_ALT 4
+#define SCN_STYLENEEDED 2000
+#define SCN_CHARADDED 2001
+#define SCN_SAVEPOINTREACHED 2002
+#define SCN_SAVEPOINTLEFT 2003
+#define SCN_MODIFYATTEMPTRO 2004
+#define SCN_KEY 2005
+#define SCN_DOUBLECLICK 2006
+#define SCN_UPDATEUI 2007
+#define SCN_MODIFIED 2008
+#define SCN_MACRORECORD 2009
+#define SCN_MARGINCLICK 2010
+#define SCN_NEEDSHOWN 2011
+#define SCN_PAINTED 2013
+#define SCN_USERLISTSELECTION 2014
+#define SCN_URIDROPPED 2015
+#define SCN_DWELLSTART 2016
+#define SCN_DWELLEND 2017
+#define SCN_ZOOM 2018
+#define SCN_HOTSPOTCLICK 2019
+#define SCN_HOTSPOTDOUBLECLICK 2020
+#define SCN_CALLTIPCLICK 2021
+#define SCN_AUTOCSELECTION 2022
+#define SCN_INDICATORCLICK 2023
+#define SCN_INDICATORRELEASE 2024
+#define SCN_AUTOCCANCELLED 2025
+//--Autogenerated -- end of section automatically generated from Scintilla.iface
+
+// These structures are defined to be exactly the same shape as the Win32
+// CHARRANGE, TEXTRANGE, FINDTEXTEX, FORMATRANGE, and NMHDR structs.
+// So older code that treats Scintilla as a RichEdit will work.
+
+#ifdef SCI_NAMESPACE
+namespace Scintilla {
+#endif
+
+struct CharacterRange {
+	long cpMin;
+	long cpMax;
+};
+
+struct TextRange {
+	struct CharacterRange chrg;
+	char *lpstrText;
+};
+
+struct TextToFind {
+	struct CharacterRange chrg;
+	char *lpstrText;
+	struct CharacterRange chrgText;
+};
+
+#ifdef PLATFORM_H
+
+// This structure is used in printing and requires some of the graphics types
+// from Platform.h.  Not needed by most client code.
+
+struct RangeToFormat {
+	SurfaceID hdc;
+	SurfaceID hdcTarget;
+	PRectangle rc;
+	PRectangle rcPage;
+	CharacterRange chrg;
+};
+
+#endif
+
+struct NotifyHeader {
+	// Compatible with Windows NMHDR.
+	// hwndFrom is really an environment specific window handle or pointer
+	// but most clients of Scintilla.h do not have this type visible.
+	void *hwndFrom;
+	uptr_t idFrom;
+	unsigned int code;
+};
+
+struct SCNotification {
+	struct NotifyHeader nmhdr;
+	int position;	// SCN_STYLENEEDED, SCN_MODIFIED, SCN_DWELLSTART, SCN_DWELLEND
+	int ch;		// SCN_CHARADDED, SCN_KEY
+	int modifiers;	// SCN_KEY
+	int modificationType;	// SCN_MODIFIED
+	const char *text;	// SCN_MODIFIED, SCN_USERLISTSELECTION, SCN_AUTOCSELECTION
+	int length;		// SCN_MODIFIED
+	int linesAdded;	// SCN_MODIFIED
+	int message;	// SCN_MACRORECORD
+	uptr_t wParam;	// SCN_MACRORECORD
+	sptr_t lParam;	// SCN_MACRORECORD
+	int line;		// SCN_MODIFIED
+	int foldLevelNow;	// SCN_MODIFIED
+	int foldLevelPrev;	// SCN_MODIFIED
+	int margin;		// SCN_MARGINCLICK
+	int listType;	// SCN_USERLISTSELECTION
+	int x;			// SCN_DWELLSTART, SCN_DWELLEND
+	int y;		// SCN_DWELLSTART, SCN_DWELLEND
+};
+
+#ifdef SCI_NAMESPACE
+}
+#endif
+
+// Deprecation section listing all API features that are deprecated and will
+// will be removed completely in a future version.
+// To enable these features define INCLUDE_DEPRECATED_FEATURES
+
+#ifdef INCLUDE_DEPRECATED_FEATURES
+
+#define SCI_SETCARETPOLICY 2369
+#define CARET_CENTER 0x02
+#define CARET_XEVEN 0x08
+#define CARET_XJUMPS 0x10
+
+#define SCN_POSCHANGED 2012
+#define SCN_CHECKBRACE 2007
+
+#endif
+
+#endif

Added: trunk/plugins/scintilla/scintilla/include/Scintilla.iface
==============================================================================
--- (empty file)
+++ trunk/plugins/scintilla/scintilla/include/Scintilla.iface	Wed Apr  8 07:16:46 2009
@@ -0,0 +1,3393 @@
+## First line may be used for shbang
+
+## This file defines the interface to Scintilla
+
+## Copyright 2000-2003 by Neil Hodgson <neilh scintilla org>
+## The License.txt file describes the conditions under which this software may be distributed.
+
+## A line starting with ## is a pure comment and should be stripped by readers.
+## A line starting with #! is for future shbang use
+## A line starting with # followed by a space is a documentation comment and refers
+## to the next feature definition.
+
+## Each feature is defined by a line starting with fun, get, set, val or evt.
+##     cat -> start a category
+##     fun -> a function
+##     get -> a property get function
+##     set -> a property set function
+##     val -> definition of a constant
+##     evt -> an event
+##     enu -> associate an enumeration with a set of vals with a prefix
+##     lex -> associate a lexer with the lexical classes it produces
+##
+## All other feature names should be ignored. They may be defined in the future.
+## A property may have a set function, a get function or both. Each will have
+## "Get" or "Set" in their names and the corresponding name will have the obvious switch.
+## A property may be subscripted, in which case the first parameter is the subscript.
+## fun, get, and set features have a strict syntax:
+## <featureType><ws><returnType><ws><name>[=<number](<param>,<param>)
+## where <ws> stands for white space.
+## param may be empty (null value) or is <paramType><ws><paramName>[=<value>]
+## Additional white space is allowed between elements.
+## The syntax for evt is <featureType><ws><returnType><ws><name>[=<number]([<param>[,<param>]*])
+## Feature names that contain an underscore are defined by Windows, so in these
+## cases, using the Windows definition is preferred where available.
+## The feature numbers are stable so features will not be renumbered.
+## Features may be removed but they will go through a period of deprecation
+## before removal which is signalled by moving them into the Deprecated category.
+##
+## enu has the syntax enu<ws><enumeration>=<prefix>[<ws><prefix>]* where all the val
+## features in this file starting with a given <prefix> are considered part of the
+## enumeration.
+##
+## lex has the syntax lex<ws><name>=<lexerVal><ws><prefix>[<ws><prefix>]*
+## where name is a reasonably capitalised (Python, XML) identifier or UI name,
+## lexerVal is the val used to specify the lexer, and the list of prefixes is similar
+## to enu. The name may not be the same as that used within the lexer so the lexerVal
+## should be used to tie these entities together.
+
+## Types:
+##     void
+##     int
+##     bool -> integer, 1=true, 0=false
+##     position -> integer position in a document
+##     colour -> colour integer containing red, green and blue bytes.
+##     string -> pointer to const character
+##     stringresult -> pointer to character, NULL-> return size of result
+##     cells -> pointer to array of cells, each cell containing a style byte and character byte
+##     textrange -> range of a min and a max position with an output string
+##     findtext -> searchrange, text -> foundposition
+##     keymod -> integer containing key in low half and modifiers in high half
+##     formatrange
+## Types no longer used:
+##     findtextex -> searchrange
+##     charrange -> range of a min and a max position
+##     charrangeresult -> like charrange, but output param
+##     countedstring
+##     point -> x,y
+##     pointresult  -> like point, but output param
+##     rectangle -> left,top,right,bottom
+## Client code should ignore definitions containing types it does not understand, except
+## for possibly #defining the constants
+
+## Line numbers and positions start at 0.
+## String arguments may contain NUL ('\0') characters where the calls provide a length
+## argument and retrieve NUL characters. All retrieved strings except for those retrieved
+## by GetLine also have a NUL appended but client code should calculate the size that
+## will be returned rather than relying upon the NUL whenever possible. Allow for the
+## extra NUL character when allocating buffers. The size to allocate for a stringresult
+## can be determined by calling with a NULL (0) pointer.
+
+cat Basics
+
+################################################
+## For Scintilla.h
+val INVALID_POSITION=-1
+# Define start of Scintilla messages to be greater than all Windows edit (EM_*) messages
+# as many EM_ messages can be used although that use is deprecated.
+val SCI_START=2000
+val SCI_OPTIONAL_START=3000
+val SCI_LEXER_START=4000
+
+# Add text to the document at current position.
+fun void AddText=2001(int length, string text)
+
+# Add array of cells to document.
+fun void AddStyledText=2002(int length, cells c)
+
+# Insert string at a position.
+fun void InsertText=2003(position pos, string text)
+
+# Delete all text in the document.
+fun void ClearAll=2004(,)
+
+# Set all style bytes to 0, remove all folding information.
+fun void ClearDocumentStyle=2005(,)
+
+# Returns the number of bytes in the document.
+get int GetLength=2006(,)
+
+# Returns the character byte at the position.
+get int GetCharAt=2007(position pos,)
+
+# Returns the position of the caret.
+get position GetCurrentPos=2008(,)
+
+# Returns the position of the opposite end of the selection to the caret.
+get position GetAnchor=2009(,)
+
+# Returns the style byte at the position.
+get int GetStyleAt=2010(position pos,)
+
+# Redoes the next action on the undo history.
+fun void Redo=2011(,)
+
+# Choose between collecting actions into the undo
+# history and discarding them.
+set void SetUndoCollection=2012(bool collectUndo,)
+
+# Select all the text in the document.
+fun void SelectAll=2013(,)
+
+# Remember the current position in the undo history as the position
+# at which the document was saved.
+fun void SetSavePoint=2014(,)
+
+# Retrieve a buffer of cells.
+# Returns the number of bytes in the buffer not including terminating NULs.
+fun int GetStyledText=2015(, textrange tr)
+
+# Are there any redoable actions in the undo history?
+fun bool CanRedo=2016(,)
+
+# Retrieve the line number at which a particular marker is located.
+fun int MarkerLineFromHandle=2017(int handle,)
+
+# Delete a marker.
+fun void MarkerDeleteHandle=2018(int handle,)
+
+# Is undo history being collected?
+get bool GetUndoCollection=2019(,)
+
+enu WhiteSpace=SCWS_
+val SCWS_INVISIBLE=0
+val SCWS_VISIBLEALWAYS=1
+val SCWS_VISIBLEAFTERINDENT=2
+
+# Are white space characters currently visible?
+# Returns one of SCWS_* constants.
+get int GetViewWS=2020(,)
+
+# Make white space characters invisible, always visible or visible outside indentation.
+set void SetViewWS=2021(int viewWS,)
+
+# Find the position from a point within the window.
+fun position PositionFromPoint=2022(int x, int y)
+
+# Find the position from a point within the window but return
+# INVALID_POSITION if not close to text.
+fun position PositionFromPointClose=2023(int x, int y)
+
+# Set caret to start of a line and ensure it is visible.
+fun void GotoLine=2024(int line,)
+
+# Set caret to a position and ensure it is visible.
+fun void GotoPos=2025(position pos,)
+
+# Set the selection anchor to a position. The anchor is the opposite
+# end of the selection from the caret.
+set void SetAnchor=2026(position posAnchor,)
+
+# Retrieve the text of the line containing the caret.
+# Returns the index of the caret on the line.
+fun int GetCurLine=2027(int length, stringresult text)
+
+# Retrieve the position of the last correctly styled character.
+get position GetEndStyled=2028(,)
+
+enu EndOfLine=SC_EOL_
+val SC_EOL_CRLF=0
+val SC_EOL_CR=1
+val SC_EOL_LF=2
+
+# Convert all line endings in the document to one mode.
+fun void ConvertEOLs=2029(int eolMode,)
+
+# Retrieve the current end of line mode - one of CRLF, CR, or LF.
+get int GetEOLMode=2030(,)
+
+# Set the current end of line mode.
+set void SetEOLMode=2031(int eolMode,)
+
+# Set the current styling position to pos and the styling mask to mask.
+# The styling mask can be used to protect some bits in each styling byte from modification.
+fun void StartStyling=2032(position pos, int mask)
+
+# Change style from current styling position for length characters to a style
+# and move the current styling position to after this newly styled segment.
+fun void SetStyling=2033(int length, int style)
+
+# Is drawing done first into a buffer or direct to the screen?
+get bool GetBufferedDraw=2034(,)
+
+# If drawing is buffered then each line of text is drawn into a bitmap buffer
+# before drawing it to the screen to avoid flicker.
+set void SetBufferedDraw=2035(bool buffered,)
+
+# Change the visible size of a tab to be a multiple of the width of a space character.
+set void SetTabWidth=2036(int tabWidth,)
+
+# Retrieve the visible size of a tab.
+get int GetTabWidth=2121(,)
+
+# The SC_CP_UTF8 value can be used to enter Unicode mode.
+# This is the same value as CP_UTF8 in Windows
+val SC_CP_UTF8=65001
+
+# The SC_CP_DBCS value can be used to indicate a DBCS mode for GTK+.
+val SC_CP_DBCS=1
+
+# Set the code page used to interpret the bytes of the document as characters.
+# The SC_CP_UTF8 value can be used to enter Unicode mode.
+set void SetCodePage=2037(int codePage,)
+
+# In palette mode, Scintilla uses the environment's palette calls to display
+# more colours. This may lead to ugly displays.
+set void SetUsePalette=2039(bool usePalette,)
+
+enu MarkerSymbol=SC_MARK_
+val MARKER_MAX=31
+val SC_MARK_CIRCLE=0
+val SC_MARK_ROUNDRECT=1
+val SC_MARK_ARROW=2
+val SC_MARK_SMALLRECT=3
+val SC_MARK_SHORTARROW=4
+val SC_MARK_EMPTY=5
+val SC_MARK_ARROWDOWN=6
+val SC_MARK_MINUS=7
+val SC_MARK_PLUS=8
+
+# Shapes used for outlining column.
+val SC_MARK_VLINE=9
+val SC_MARK_LCORNER=10
+val SC_MARK_TCORNER=11
+val SC_MARK_BOXPLUS=12
+val SC_MARK_BOXPLUSCONNECTED=13
+val SC_MARK_BOXMINUS=14
+val SC_MARK_BOXMINUSCONNECTED=15
+val SC_MARK_LCORNERCURVE=16
+val SC_MARK_TCORNERCURVE=17
+val SC_MARK_CIRCLEPLUS=18
+val SC_MARK_CIRCLEPLUSCONNECTED=19
+val SC_MARK_CIRCLEMINUS=20
+val SC_MARK_CIRCLEMINUSCONNECTED=21
+
+# Invisible mark that only sets the line background color.
+val SC_MARK_BACKGROUND=22
+val SC_MARK_DOTDOTDOT=23
+val SC_MARK_ARROWS=24
+val SC_MARK_PIXMAP=25
+val SC_MARK_FULLRECT=26
+val SC_MARK_LEFTRECT=27
+
+val SC_MARK_CHARACTER=10000
+
+enu MarkerOutline=SC_MARKNUM_
+# Markers used for outlining column.
+val SC_MARKNUM_FOLDEREND=25
+val SC_MARKNUM_FOLDEROPENMID=26
+val SC_MARKNUM_FOLDERMIDTAIL=27
+val SC_MARKNUM_FOLDERTAIL=28
+val SC_MARKNUM_FOLDERSUB=29
+val SC_MARKNUM_FOLDER=30
+val SC_MARKNUM_FOLDEROPEN=31
+
+val SC_MASK_FOLDERS=0xFE000000
+
+# Set the symbol used for a particular marker number.
+fun void MarkerDefine=2040(int markerNumber, int markerSymbol)
+
+# Set the foreground colour used for a particular marker number.
+fun void MarkerSetFore=2041(int markerNumber, colour fore)
+
+# Set the background colour used for a particular marker number.
+fun void MarkerSetBack=2042(int markerNumber, colour back)
+
+# Add a marker to a line, returning an ID which can be used to find or delete the marker.
+fun int MarkerAdd=2043(int line, int markerNumber)
+
+# Delete a marker from a line.
+fun void MarkerDelete=2044(int line, int markerNumber)
+
+# Delete all markers with a particular number from all lines.
+fun void MarkerDeleteAll=2045(int markerNumber,)
+
+# Get a bit mask of all the markers set on a line.
+fun int MarkerGet=2046(int line,)
+
+# Find the next line after lineStart that includes a marker in mask.
+fun int MarkerNext=2047(int lineStart, int markerMask)
+
+# Find the previous line before lineStart that includes a marker in mask.
+fun int MarkerPrevious=2048(int lineStart, int markerMask)
+
+# Define a marker from a pixmap.
+fun void MarkerDefinePixmap=2049(int markerNumber, string pixmap)
+
+# Add a set of markers to a line.
+fun void MarkerAddSet=2466(int line, int set)
+
+# Set the alpha used for a marker that is drawn in the text area, not the margin.
+fun void MarkerSetAlpha=2476(int markerNumber, int alpha)
+
+enu MarginType=SC_MARGIN_
+val SC_MARGIN_SYMBOL=0
+val SC_MARGIN_NUMBER=1
+val SC_MARGIN_BACK=2
+val SC_MARGIN_FORE=3
+
+# Set a margin to be either numeric or symbolic.
+set void SetMarginTypeN=2240(int margin, int marginType)
+
+# Retrieve the type of a margin.
+get int GetMarginTypeN=2241(int margin,)
+
+# Set the width of a margin to a width expressed in pixels.
+set void SetMarginWidthN=2242(int margin, int pixelWidth)
+
+# Retrieve the width of a margin in pixels.
+get int GetMarginWidthN=2243(int margin,)
+
+# Set a mask that determines which markers are displayed in a margin.
+set void SetMarginMaskN=2244(int margin, int mask)
+
+# Retrieve the marker mask of a margin.
+get int GetMarginMaskN=2245(int margin,)
+
+# Make a margin sensitive or insensitive to mouse clicks.
+set void SetMarginSensitiveN=2246(int margin, bool sensitive)
+
+# Retrieve the mouse click sensitivity of a margin.
+get bool GetMarginSensitiveN=2247(int margin,)
+
+# Styles in range 32..38 are predefined for parts of the UI and are not used as normal styles.
+# Style 39 is for future use.
+enu StylesCommon=STYLE_
+val STYLE_DEFAULT=32
+val STYLE_LINENUMBER=33
+val STYLE_BRACELIGHT=34
+val STYLE_BRACEBAD=35
+val STYLE_CONTROLCHAR=36
+val STYLE_INDENTGUIDE=37
+val STYLE_CALLTIP=38
+val STYLE_LASTPREDEFINED=39
+val STYLE_MAX=255
+
+# Character set identifiers are used in StyleSetCharacterSet.
+# The values are the same as the Windows *_CHARSET values.
+enu CharacterSet=SC_CHARSET_
+val SC_CHARSET_ANSI=0
+val SC_CHARSET_DEFAULT=1
+val SC_CHARSET_BALTIC=186
+val SC_CHARSET_CHINESEBIG5=136
+val SC_CHARSET_EASTEUROPE=238
+val SC_CHARSET_GB2312=134
+val SC_CHARSET_GREEK=161
+val SC_CHARSET_HANGUL=129
+val SC_CHARSET_MAC=77
+val SC_CHARSET_OEM=255
+val SC_CHARSET_RUSSIAN=204
+val SC_CHARSET_CYRILLIC=1251
+val SC_CHARSET_SHIFTJIS=128
+val SC_CHARSET_SYMBOL=2
+val SC_CHARSET_TURKISH=162
+val SC_CHARSET_JOHAB=130
+val SC_CHARSET_HEBREW=177
+val SC_CHARSET_ARABIC=178
+val SC_CHARSET_VIETNAMESE=163
+val SC_CHARSET_THAI=222
+val SC_CHARSET_8859_15=1000
+
+# Clear all the styles and make equivalent to the global default style.
+set void StyleClearAll=2050(,)
+
+# Set the foreground colour of a style.
+set void StyleSetFore=2051(int style, colour fore)
+
+# Set the background colour of a style.
+set void StyleSetBack=2052(int style, colour back)
+
+# Set a style to be bold or not.
+set void StyleSetBold=2053(int style, bool bold)
+
+# Set a style to be italic or not.
+set void StyleSetItalic=2054(int style, bool italic)
+
+# Set the size of characters of a style.
+set void StyleSetSize=2055(int style, int sizePoints)
+
+# Set the font of a style.
+set void StyleSetFont=2056(int style, string fontName)
+
+# Set a style to have its end of line filled or not.
+set void StyleSetEOLFilled=2057(int style, bool filled)
+
+# Reset the default style to its state at startup
+fun void StyleResetDefault=2058(,)
+
+# Set a style to be underlined or not.
+set void StyleSetUnderline=2059(int style, bool underline)
+
+enu CaseVisible=SC_CASE_
+val SC_CASE_MIXED=0
+val SC_CASE_UPPER=1
+val SC_CASE_LOWER=2
+
+# Get the foreground colour of a style.
+get colour StyleGetFore=2481(int style,)
+
+# Get the background colour of a style.
+get colour StyleGetBack=2482(int style,)
+
+# Get is a style bold or not.
+get bool StyleGetBold=2483(int style,)
+
+# Get is a style italic or not.
+get bool StyleGetItalic=2484(int style,)
+
+# Get the size of characters of a style.
+get int StyleGetSize=2485(int style,)
+
+# Get the font of a style.
+# Returns the length of the fontName
+fun int StyleGetFont=2486(int style, stringresult fontName)
+
+# Get is a style to have its end of line filled or not.
+get bool StyleGetEOLFilled=2487(int style,)
+
+# Get is a style underlined or not.
+get bool StyleGetUnderline=2488(int style,)
+
+# Get is a style mixed case, or to force upper or lower case.
+get int StyleGetCase=2489(int style,)
+
+# Get the character get of the font in a style.
+get int StyleGetCharacterSet=2490(int style,)
+
+# Get is a style visible or not.
+get bool StyleGetVisible=2491(int style,)
+
+# Get is a style changeable or not (read only).
+# Experimental feature, currently buggy.
+get bool StyleGetChangeable=2492(int style,)
+
+# Get is a style a hotspot or not.
+get bool StyleGetHotSpot=2493(int style,)
+
+# Set a style to be mixed case, or to force upper or lower case.
+set void StyleSetCase=2060(int style, int caseForce)
+
+# Set the character set of the font in a style.
+set void StyleSetCharacterSet=2066(int style, int characterSet)
+
+# Set a style to be a hotspot or not.
+set void StyleSetHotSpot=2409(int style, bool hotspot)
+
+# Set the foreground colour of the selection and whether to use this setting.
+fun void SetSelFore=2067(bool useSetting, colour fore)
+
+# Set the background colour of the selection and whether to use this setting.
+fun void SetSelBack=2068(bool useSetting, colour back)
+
+# Get the alpha of the selection.
+get int GetSelAlpha=2477(,)
+
+# Set the alpha of the selection.
+set void SetSelAlpha=2478(int alpha,)
+
+# Is the selection end of line filled?
+get bool GetSelEOLFilled=2479(,)
+
+# Set the selection to have its end of line filled or not.
+set void SetSelEOLFilled=2480(bool filled,)
+
+# Set the foreground colour of the caret.
+set void SetCaretFore=2069(colour fore,)
+
+# When key+modifier combination km is pressed perform msg.
+fun void AssignCmdKey=2070(keymod km, int msg)
+
+# When key+modifier combination km is pressed do nothing.
+fun void ClearCmdKey=2071(keymod km,)
+
+# Drop all key mappings.
+fun void ClearAllCmdKeys=2072(,)
+
+# Set the styles for a segment of the document.
+fun void SetStylingEx=2073(int length, string styles)
+
+# Set a style to be visible or not.
+set void StyleSetVisible=2074(int style, bool visible)
+
+# Get the time in milliseconds that the caret is on and off.
+get int GetCaretPeriod=2075(,)
+
+# Get the time in milliseconds that the caret is on and off. 0 = steady on.
+set void SetCaretPeriod=2076(int periodMilliseconds,)
+
+# Set the set of characters making up words for when moving or selecting by word.
+# First sets defaults like SetCharsDefault.
+set void SetWordChars=2077(, string characters)
+
+# Start a sequence of actions that is undone and redone as a unit.
+# May be nested.
+fun void BeginUndoAction=2078(,)
+
+# End a sequence of actions that is undone and redone as a unit.
+fun void EndUndoAction=2079(,)
+
+# Indicator style enumeration and some constants
+enu IndicatorStyle=INDIC_
+val INDIC_PLAIN=0
+val INDIC_SQUIGGLE=1
+val INDIC_TT=2
+val INDIC_DIAGONAL=3
+val INDIC_STRIKE=4
+val INDIC_HIDDEN=5
+val INDIC_BOX=6
+val INDIC_ROUNDBOX=7
+val INDIC_MAX=31
+val INDIC_CONTAINER=8
+val INDIC0_MASK=0x20
+val INDIC1_MASK=0x40
+val INDIC2_MASK=0x80
+val INDICS_MASK=0xE0
+
+# Set an indicator to plain, squiggle or TT.
+set void IndicSetStyle=2080(int indic, int style)
+
+# Retrieve the style of an indicator.
+get int IndicGetStyle=2081(int indic,)
+
+# Set the foreground colour of an indicator.
+set void IndicSetFore=2082(int indic, colour fore)
+
+# Retrieve the foreground colour of an indicator.
+get colour IndicGetFore=2083(int indic,)
+
+# Set an indicator to draw under text or over(default).
+set void IndicSetUnder=2510(int indic, bool under)
+
+# Retrieve whether indicator drawn under or over text.
+get bool IndicGetUnder=2511(int indic,)
+
+# Set the foreground colour of all whitespace and whether to use this setting.
+fun void SetWhitespaceFore=2084(bool useSetting, colour fore)
+
+# Set the background colour of all whitespace and whether to use this setting.
+fun void SetWhitespaceBack=2085(bool useSetting, colour back)
+
+# Divide each styling byte into lexical class bits (default: 5) and indicator
+# bits (default: 3). If a lexer requires more than 32 lexical states, then this
+# is used to expand the possible states.
+set void SetStyleBits=2090(int bits,)
+
+# Retrieve number of bits in style bytes used to hold the lexical state.
+get int GetStyleBits=2091(,)
+
+# Used to hold extra styling information for each line.
+set void SetLineState=2092(int line, int state)
+
+# Retrieve the extra styling information for a line.
+get int GetLineState=2093(int line,)
+
+# Retrieve the last line number that has line state.
+get int GetMaxLineState=2094(,)
+
+# Is the background of the line containing the caret in a different colour?
+get bool GetCaretLineVisible=2095(,)
+
+# Display the background of the line containing the caret in a different colour.
+set void SetCaretLineVisible=2096(bool show,)
+
+# Get the colour of the background of the line containing the caret.
+get colour GetCaretLineBack=2097(,)
+
+# Set the colour of the background of the line containing the caret.
+set void SetCaretLineBack=2098(colour back,)
+
+# Set a style to be changeable or not (read only).
+# Experimental feature, currently buggy.
+set void StyleSetChangeable=2099(int style, bool changeable)
+
+# Display a auto-completion list.
+# The lenEntered parameter indicates how many characters before
+# the caret should be used to provide context.
+fun void AutoCShow=2100(int lenEntered, string itemList)
+
+# Remove the auto-completion list from the screen.
+fun void AutoCCancel=2101(,)
+
+# Is there an auto-completion list visible?
+fun bool AutoCActive=2102(,)
+
+# Retrieve the position of the caret when the auto-completion list was displayed.
+fun position AutoCPosStart=2103(,)
+
+# User has selected an item so remove the list and insert the selection.
+fun void AutoCComplete=2104(,)
+
+# Define a set of character that when typed cancel the auto-completion list.
+fun void AutoCStops=2105(, string characterSet)
+
+# Change the separator character in the string setting up an auto-completion list.
+# Default is space but can be changed if items contain space.
+set void AutoCSetSeparator=2106(int separatorCharacter,)
+
+# Retrieve the auto-completion list separator character.
+get int AutoCGetSeparator=2107(,)
+
+# Select the item in the auto-completion list that starts with a string.
+fun void AutoCSelect=2108(, string text)
+
+# Should the auto-completion list be cancelled if the user backspaces to a
+# position before where the box was created.
+set void AutoCSetCancelAtStart=2110(bool cancel,)
+
+# Retrieve whether auto-completion cancelled by backspacing before start.
+get bool AutoCGetCancelAtStart=2111(,)
+
+# Define a set of characters that when typed will cause the autocompletion to
+# choose the selected item.
+set void AutoCSetFillUps=2112(, string characterSet)
+
+# Should a single item auto-completion list automatically choose the item.
+set void AutoCSetChooseSingle=2113(bool chooseSingle,)
+
+# Retrieve whether a single item auto-completion list automatically choose the item.
+get bool AutoCGetChooseSingle=2114(,)
+
+# Set whether case is significant when performing auto-completion searches.
+set void AutoCSetIgnoreCase=2115(bool ignoreCase,)
+
+# Retrieve state of ignore case flag.
+get bool AutoCGetIgnoreCase=2116(,)
+
+# Display a list of strings and send notification when user chooses one.
+fun void UserListShow=2117(int listType, string itemList)
+
+# Set whether or not autocompletion is hidden automatically when nothing matches.
+set void AutoCSetAutoHide=2118(bool autoHide,)
+
+# Retrieve whether or not autocompletion is hidden automatically when nothing matches.
+get bool AutoCGetAutoHide=2119(,)
+
+# Set whether or not autocompletion deletes any word characters
+# after the inserted text upon completion.
+set void AutoCSetDropRestOfWord=2270(bool dropRestOfWord,)
+
+# Retrieve whether or not autocompletion deletes any word characters
+# after the inserted text upon completion.
+get bool AutoCGetDropRestOfWord=2271(,)
+
+# Register an XPM image for use in autocompletion lists.
+fun void RegisterImage=2405(int type, string xpmData)
+
+# Clear all the registered XPM images.
+fun void ClearRegisteredImages=2408(,)
+
+# Retrieve the auto-completion list type-separator character.
+get int AutoCGetTypeSeparator=2285(,)
+
+# Change the type-separator character in the string setting up an auto-completion list.
+# Default is '?' but can be changed if items contain '?'.
+set void AutoCSetTypeSeparator=2286(int separatorCharacter,)
+
+# Set the maximum width, in characters, of auto-completion and user lists.
+# Set to 0 to autosize to fit longest item, which is the default.
+set void AutoCSetMaxWidth=2208(int characterCount,)
+
+# Get the maximum width, in characters, of auto-completion and user lists.
+get int AutoCGetMaxWidth=2209(,)
+
+# Set the maximum height, in rows, of auto-completion and user lists.
+# The default is 5 rows.
+set void AutoCSetMaxHeight=2210(int rowCount,)
+
+# Set the maximum height, in rows, of auto-completion and user lists.
+get int AutoCGetMaxHeight=2211(,)
+
+# Set the number of spaces used for one level of indentation.
+set void SetIndent=2122(int indentSize,)
+
+# Retrieve indentation size.
+get int GetIndent=2123(,)
+
+# Indentation will only use space characters if useTabs is false, otherwise
+# it will use a combination of tabs and spaces.
+set void SetUseTabs=2124(bool useTabs,)
+
+# Retrieve whether tabs will be used in indentation.
+get bool GetUseTabs=2125(,)
+
+# Change the indentation of a line to a number of columns.
+set void SetLineIndentation=2126(int line, int indentSize)
+
+# Retrieve the number of columns that a line is indented.
+get int GetLineIndentation=2127(int line,)
+
+# Retrieve the position before the first non indentation character on a line.
+get position GetLineIndentPosition=2128(int line,)
+
+# Retrieve the column number of a position, taking tab width into account.
+get int GetColumn=2129(position pos,)
+
+# Show or hide the horizontal scroll bar.
+set void SetHScrollBar=2130(bool show,)
+
+# Is the horizontal scroll bar visible?
+get bool GetHScrollBar=2131(,)
+
+enu IndentView=SC_IV_
+val SC_IV_NONE=0
+val SC_IV_REAL=1
+val SC_IV_LOOKFORWARD=2
+val SC_IV_LOOKBOTH=3
+
+# Show or hide indentation guides.
+set void SetIndentationGuides=2132(int indentView,)
+
+# Are the indentation guides visible?
+get int GetIndentationGuides=2133(,)
+
+# Set the highlighted indentation guide column.
+# 0 = no highlighted guide.
+set void SetHighlightGuide=2134(int column,)
+
+# Get the highlighted indentation guide column.
+get int GetHighlightGuide=2135(,)
+
+# Get the position after the last visible characters on a line.
+get int GetLineEndPosition=2136(int line,)
+
+# Get the code page used to interpret the bytes of the document as characters.
+get int GetCodePage=2137(,)
+
+# Get the foreground colour of the caret.
+get colour GetCaretFore=2138(,)
+
+# In palette mode?
+get bool GetUsePalette=2139(,)
+
+# In read-only mode?
+get bool GetReadOnly=2140(,)
+
+# Sets the position of the caret.
+set void SetCurrentPos=2141(position pos,)
+
+# Sets the position that starts the selection - this becomes the anchor.
+set void SetSelectionStart=2142(position pos,)
+
+# Returns the position at the start of the selection.
+get position GetSelectionStart=2143(,)
+
+# Sets the position that ends the selection - this becomes the currentPosition.
+set void SetSelectionEnd=2144(position pos,)
+
+# Returns the position at the end of the selection.
+get position GetSelectionEnd=2145(,)
+
+# Sets the print magnification added to the point size of each style for printing.
+set void SetPrintMagnification=2146(int magnification,)
+
+# Returns the print magnification.
+get int GetPrintMagnification=2147(,)
+
+enu PrintOption=SC_PRINT_
+# PrintColourMode - use same colours as screen.
+val SC_PRINT_NORMAL=0
+# PrintColourMode - invert the light value of each style for printing.
+val SC_PRINT_INVERTLIGHT=1
+# PrintColourMode - force black text on white background for printing.
+val SC_PRINT_BLACKONWHITE=2
+# PrintColourMode - text stays coloured, but all background is forced to be white for printing.
+val SC_PRINT_COLOURONWHITE=3
+# PrintColourMode - only the default-background is forced to be white for printing.
+val SC_PRINT_COLOURONWHITEDEFAULTBG=4
+
+# Modify colours when printing for clearer printed text.
+set void SetPrintColourMode=2148(int mode,)
+
+# Returns the print colour mode.
+get int GetPrintColourMode=2149(,)
+
+enu FindOption=SCFIND_
+val SCFIND_WHOLEWORD=2
+val SCFIND_MATCHCASE=4
+val SCFIND_WORDSTART=0x00100000
+val SCFIND_REGEXP=0x00200000
+val SCFIND_POSIX=0x00400000
+
+# Find some text in the document.
+fun position FindText=2150(int flags, findtext ft)
+
+# On Windows, will draw the document into a display context such as a printer.
+fun position FormatRange=2151(bool draw, formatrange fr)
+
+# Retrieve the display line at the top of the display.
+get int GetFirstVisibleLine=2152(,)
+
+# Retrieve the contents of a line.
+# Returns the length of the line.
+fun int GetLine=2153(int line, stringresult text)
+
+# Returns the number of lines in the document. There is always at least one.
+get int GetLineCount=2154(,)
+
+# Sets the size in pixels of the left margin.
+set void SetMarginLeft=2155(, int pixelWidth)
+
+# Returns the size in pixels of the left margin.
+get int GetMarginLeft=2156(,)
+
+# Sets the size in pixels of the right margin.
+set void SetMarginRight=2157(, int pixelWidth)
+
+# Returns the size in pixels of the right margin.
+get int GetMarginRight=2158(,)
+
+# Is the document different from when it was last saved?
+get bool GetModify=2159(,)
+
+# Select a range of text.
+fun void SetSel=2160(position start, position end)
+
+# Retrieve the selected text.
+# Return the length of the text.
+fun int GetSelText=2161(, stringresult text)
+
+# Retrieve a range of text.
+# Return the length of the text.
+fun int GetTextRange=2162(, textrange tr)
+
+# Draw the selection in normal style or with selection highlighted.
+fun void HideSelection=2163(bool normal,)
+
+# Retrieve the x value of the point in the window where a position is displayed.
+fun int PointXFromPosition=2164(, position pos)
+
+# Retrieve the y value of the point in the window where a position is displayed.
+fun int PointYFromPosition=2165(, position pos)
+
+# Retrieve the line containing a position.
+fun int LineFromPosition=2166(position pos,)
+
+# Retrieve the position at the start of a line.
+fun position PositionFromLine=2167(int line,)
+
+# Scroll horizontally and vertically.
+fun void LineScroll=2168(int columns, int lines)
+
+# Ensure the caret is visible.
+fun void ScrollCaret=2169(,)
+
+# Replace the selected text with the argument text.
+fun void ReplaceSel=2170(, string text)
+
+# Set to read only or read write.
+set void SetReadOnly=2171(bool readOnly,)
+
+# Null operation.
+fun void Null=2172(,)
+
+# Will a paste succeed?
+fun bool CanPaste=2173(,)
+
+# Are there any undoable actions in the undo history?
+fun bool CanUndo=2174(,)
+
+# Delete the undo history.
+fun void EmptyUndoBuffer=2175(,)
+
+# Undo one action in the undo history.
+fun void Undo=2176(,)
+
+# Cut the selection to the clipboard.
+fun void Cut=2177(,)
+
+# Copy the selection to the clipboard.
+fun void Copy=2178(,)
+
+# Paste the contents of the clipboard into the document replacing the selection.
+fun void Paste=2179(,)
+
+# Clear the selection.
+fun void Clear=2180(,)
+
+# Replace the contents of the document with the argument text.
+fun void SetText=2181(, string text)
+
+# Retrieve all the text in the document.
+# Returns number of characters retrieved.
+fun int GetText=2182(int length, stringresult text)
+
+# Retrieve the number of characters in the document.
+get int GetTextLength=2183(,)
+
+# Retrieve a pointer to a function that processes messages for this Scintilla.
+get int GetDirectFunction=2184(,)
+
+# Retrieve a pointer value to use as the first argument when calling
+# the function returned by GetDirectFunction.
+get int GetDirectPointer=2185(,)
+
+# Set to overtype (true) or insert mode.
+set void SetOvertype=2186(bool overtype,)
+
+# Returns true if overtype mode is active otherwise false is returned.
+get bool GetOvertype=2187(,)
+
+# Set the width of the insert mode caret.
+set void SetCaretWidth=2188(int pixelWidth,)
+
+# Returns the width of the insert mode caret.
+get int GetCaretWidth=2189(,)
+
+# Sets the position that starts the target which is used for updating the
+# document without affecting the scroll position.
+set void SetTargetStart=2190(position pos,)
+
+# Get the position that starts the target.
+get position GetTargetStart=2191(,)
+
+# Sets the position that ends the target which is used for updating the
+# document without affecting the scroll position.
+set void SetTargetEnd=2192(position pos,)
+
+# Get the position that ends the target.
+get position GetTargetEnd=2193(,)
+
+# Replace the target text with the argument text.
+# Text is counted so it can contain NULs.
+# Returns the length of the replacement text.
+fun int ReplaceTarget=2194(int length, string text)
+
+# Replace the target text with the argument text after \d processing.
+# Text is counted so it can contain NULs.
+# Looks for \d where d is between 1 and 9 and replaces these with the strings
+# matched in the last search operation which were surrounded by \( and \).
+# Returns the length of the replacement text including any change
+# caused by processing the \d patterns.
+fun int ReplaceTargetRE=2195(int length, string text)
+
+# Search for a counted string in the target and set the target to the found
+# range. Text is counted so it can contain NULs.
+# Returns length of range or -1 for failure in which case target is not moved.
+fun int SearchInTarget=2197(int length, string text)
+
+# Set the search flags used by SearchInTarget.
+set void SetSearchFlags=2198(int flags,)
+
+# Get the search flags used by SearchInTarget.
+get int GetSearchFlags=2199(,)
+
+# Show a call tip containing a definition near position pos.
+fun void CallTipShow=2200(position pos, string definition)
+
+# Remove the call tip from the screen.
+fun void CallTipCancel=2201(,)
+
+# Is there an active call tip?
+fun bool CallTipActive=2202(,)
+
+# Retrieve the position where the caret was before displaying the call tip.
+fun position CallTipPosStart=2203(,)
+
+# Highlight a segment of the definition.
+fun void CallTipSetHlt=2204(int start, int end)
+
+# Set the background colour for the call tip.
+set void CallTipSetBack=2205(colour back,)
+
+# Set the foreground colour for the call tip.
+set void CallTipSetFore=2206(colour fore,)
+
+# Set the foreground colour for the highlighted part of the call tip.
+set void CallTipSetForeHlt=2207(colour fore,)
+
+# Enable use of STYLE_CALLTIP and set call tip tab size in pixels.
+set void CallTipUseStyle=2212(int tabSize,)
+
+# Find the display line of a document line taking hidden lines into account.
+fun int VisibleFromDocLine=2220(int line,)
+
+# Find the document line of a display line taking hidden lines into account.
+fun int DocLineFromVisible=2221(int lineDisplay,)
+
+# The number of display lines needed to wrap a document line
+fun int WrapCount=2235(int line,)
+
+enu FoldLevel=SC_FOLDLEVEL
+val SC_FOLDLEVELBASE=0x400
+val SC_FOLDLEVELWHITEFLAG=0x1000
+val SC_FOLDLEVELHEADERFLAG=0x2000
+val SC_FOLDLEVELBOXHEADERFLAG=0x4000
+val SC_FOLDLEVELBOXFOOTERFLAG=0x8000
+val SC_FOLDLEVELCONTRACTED=0x10000
+val SC_FOLDLEVELUNINDENT=0x20000
+val SC_FOLDLEVELNUMBERMASK=0x0FFF
+
+# Set the fold level of a line.
+# This encodes an integer level along with flags indicating whether the
+# line is a header and whether it is effectively white space.
+set void SetFoldLevel=2222(int line, int level)
+
+# Retrieve the fold level of a line.
+get int GetFoldLevel=2223(int line,)
+
+# Find the last child line of a header line.
+get int GetLastChild=2224(int line, int level)
+
+# Find the parent line of a child line.
+get int GetFoldParent=2225(int line,)
+
+# Make a range of lines visible.
+fun void ShowLines=2226(int lineStart, int lineEnd)
+
+# Make a range of lines invisible.
+fun void HideLines=2227(int lineStart, int lineEnd)
+
+# Is a line visible?
+get bool GetLineVisible=2228(int line,)
+
+# Show the children of a header line.
+set void SetFoldExpanded=2229(int line, bool expanded)
+
+# Is a header line expanded?
+get bool GetFoldExpanded=2230(int line,)
+
+# Switch a header line between expanded and contracted.
+fun void ToggleFold=2231(int line,)
+
+# Ensure a particular line is visible by expanding any header line hiding it.
+fun void EnsureVisible=2232(int line,)
+
+enu FoldFlag=SC_FOLDFLAG_
+val SC_FOLDFLAG_LINEBEFORE_EXPANDED=0x0002
+val SC_FOLDFLAG_LINEBEFORE_CONTRACTED=0x0004
+val SC_FOLDFLAG_LINEAFTER_EXPANDED=0x0008
+val SC_FOLDFLAG_LINEAFTER_CONTRACTED=0x0010
+val SC_FOLDFLAG_LEVELNUMBERS=0x0040
+val SC_FOLDFLAG_BOX=0x0001
+
+# Set some style options for folding.
+fun void SetFoldFlags=2233(int flags,)
+
+# Ensure a particular line is visible by expanding any header line hiding it.
+# Use the currently set visibility policy to determine which range to display.
+fun void EnsureVisibleEnforcePolicy=2234(int line,)
+
+# Sets whether a tab pressed when caret is within indentation indents.
+set void SetTabIndents=2260(bool tabIndents,)
+
+# Does a tab pressed when caret is within indentation indent?
+get bool GetTabIndents=2261(,)
+
+# Sets whether a backspace pressed when caret is within indentation unindents.
+set void SetBackSpaceUnIndents=2262(bool bsUnIndents,)
+
+# Does a backspace pressed when caret is within indentation unindent?
+get bool GetBackSpaceUnIndents=2263(,)
+
+val SC_TIME_FOREVER=10000000
+
+# Sets the time the mouse must sit still to generate a mouse dwell event.
+set void SetMouseDwellTime=2264(int periodMilliseconds,)
+
+# Retrieve the time the mouse must sit still to generate a mouse dwell event.
+get int GetMouseDwellTime=2265(,)
+
+# Get position of start of word.
+fun int WordStartPosition=2266(position pos, bool onlyWordCharacters)
+
+# Get position of end of word.
+fun int WordEndPosition=2267(position pos, bool onlyWordCharacters)
+
+enu Wrap=SC_WRAP_
+val SC_WRAP_NONE=0
+val SC_WRAP_WORD=1
+val SC_WRAP_CHAR=2
+
+# Sets whether text is word wrapped.
+set void SetWrapMode=2268(int mode,)
+
+# Retrieve whether text is word wrapped.
+get int GetWrapMode=2269(,)
+
+enu WrapVisualFlag=SC_WRAPVISUALFLAG_
+val SC_WRAPVISUALFLAG_NONE=0x0000
+val SC_WRAPVISUALFLAG_END=0x0001
+val SC_WRAPVISUALFLAG_START=0x0002
+
+# Set the display mode of visual flags for wrapped lines.
+set void SetWrapVisualFlags=2460(int wrapVisualFlags,)
+
+# Retrive the display mode of visual flags for wrapped lines.
+get int GetWrapVisualFlags=2461(,)
+
+enu WrapVisualLocation=SC_WRAPVISUALFLAGLOC_
+val SC_WRAPVISUALFLAGLOC_DEFAULT=0x0000
+val SC_WRAPVISUALFLAGLOC_END_BY_TEXT=0x0001
+val SC_WRAPVISUALFLAGLOC_START_BY_TEXT=0x0002
+
+# Set the location of visual flags for wrapped lines.
+set void SetWrapVisualFlagsLocation=2462(int wrapVisualFlagsLocation,)
+
+# Retrive the location of visual flags for wrapped lines.
+get int GetWrapVisualFlagsLocation=2463(,)
+
+# Set the start indent for wrapped lines.
+set void SetWrapStartIndent=2464(int indent,)
+
+# Retrive the start indent for wrapped lines.
+get int GetWrapStartIndent=2465(,)
+
+enu LineCache=SC_CACHE_
+val SC_CACHE_NONE=0
+val SC_CACHE_CARET=1
+val SC_CACHE_PAGE=2
+val SC_CACHE_DOCUMENT=3
+
+# Sets the degree of caching of layout information.
+set void SetLayoutCache=2272(int mode,)
+
+# Retrieve the degree of caching of layout information.
+get int GetLayoutCache=2273(,)
+
+# Sets the document width assumed for scrolling.
+set void SetScrollWidth=2274(int pixelWidth,)
+
+# Retrieve the document width assumed for scrolling.
+get int GetScrollWidth=2275(,)
+
+# Sets whether the maximum width line displayed is used to set scroll width.
+set void SetScrollWidthTracking=2516(bool tracking,)
+
+# Retrieve whether the scroll width tracks wide lines.
+get bool GetScrollWidthTracking=2517(,)
+
+# Measure the pixel width of some text in a particular style.
+# NUL terminated text argument.
+# Does not handle tab or control characters.
+fun int TextWidth=2276(int style, string text)
+
+# Sets the scroll range so that maximum scroll position has
+# the last line at the bottom of the view (default).
+# Setting this to false allows scrolling one page below the last line.
+set void SetEndAtLastLine=2277(bool endAtLastLine,)
+
+# Retrieve whether the maximum scroll position has the last
+# line at the bottom of the view.
+get bool GetEndAtLastLine=2278(,)
+
+# Retrieve the height of a particular line of text in pixels.
+fun int TextHeight=2279(int line,)
+
+# Show or hide the vertical scroll bar.
+set void SetVScrollBar=2280(bool show,)
+
+# Is the vertical scroll bar visible?
+get bool GetVScrollBar=2281(,)
+
+# Append a string to the end of the document without changing the selection.
+fun void AppendText=2282(int length, string text)
+
+# Is drawing done in two phases with backgrounds drawn before faoregrounds?
+get bool GetTwoPhaseDraw=2283(,)
+
+# In twoPhaseDraw mode, drawing is performed in two phases, first the background
+# and then the foreground. This avoids chopping off characters that overlap the next run.
+set void SetTwoPhaseDraw=2284(bool twoPhase,)
+
+# Make the target range start and end be the same as the selection range start and end.
+fun void TargetFromSelection=2287(,)
+
+# Join the lines in the target.
+fun void LinesJoin=2288(,)
+
+# Split the lines in the target into lines that are less wide than pixelWidth
+# where possible.
+fun void LinesSplit=2289(int pixelWidth,)
+
+# Set the colours used as a chequerboard pattern in the fold margin
+fun void SetFoldMarginColour=2290(bool useSetting, colour back)
+fun void SetFoldMarginHiColour=2291(bool useSetting, colour fore)
+
+## New messages go here
+
+## Start of key messages
+# Move caret down one line.
+fun void LineDown=2300(,)
+
+# Move caret down one line extending selection to new caret position.
+fun void LineDownExtend=2301(,)
+
+# Move caret up one line.
+fun void LineUp=2302(,)
+
+# Move caret up one line extending selection to new caret position.
+fun void LineUpExtend=2303(,)
+
+# Move caret left one character.
+fun void CharLeft=2304(,)
+
+# Move caret left one character extending selection to new caret position.
+fun void CharLeftExtend=2305(,)
+
+# Move caret right one character.
+fun void CharRight=2306(,)
+
+# Move caret right one character extending selection to new caret position.
+fun void CharRightExtend=2307(,)
+
+# Move caret left one word.
+fun void WordLeft=2308(,)
+
+# Move caret left one word extending selection to new caret position.
+fun void WordLeftExtend=2309(,)
+
+# Move caret right one word.
+fun void WordRight=2310(,)
+
+# Move caret right one word extending selection to new caret position.
+fun void WordRightExtend=2311(,)
+
+# Move caret to first position on line.
+fun void Home=2312(,)
+
+# Move caret to first position on line extending selection to new caret position.
+fun void HomeExtend=2313(,)
+
+# Move caret to last position on line.
+fun void LineEnd=2314(,)
+
+# Move caret to last position on line extending selection to new caret position.
+fun void LineEndExtend=2315(,)
+
+# Move caret to first position in document.
+fun void DocumentStart=2316(,)
+
+# Move caret to first position in document extending selection to new caret position.
+fun void DocumentStartExtend=2317(,)
+
+# Move caret to last position in document.
+fun void DocumentEnd=2318(,)
+
+# Move caret to last position in document extending selection to new caret position.
+fun void DocumentEndExtend=2319(,)
+
+# Move caret one page up.
+fun void PageUp=2320(,)
+
+# Move caret one page up extending selection to new caret position.
+fun void PageUpExtend=2321(,)
+
+# Move caret one page down.
+fun void PageDown=2322(,)
+
+# Move caret one page down extending selection to new caret position.
+fun void PageDownExtend=2323(,)
+
+# Switch from insert to overtype mode or the reverse.
+fun void EditToggleOvertype=2324(,)
+
+# Cancel any modes such as call tip or auto-completion list display.
+fun void Cancel=2325(,)
+
+# Delete the selection or if no selection, the character before the caret.
+fun void DeleteBack=2326(,)
+
+# If selection is empty or all on one line replace the selection with a tab character.
+# If more than one line selected, indent the lines.
+fun void Tab=2327(,)
+
+# Dedent the selected lines.
+fun void BackTab=2328(,)
+
+# Insert a new line, may use a CRLF, CR or LF depending on EOL mode.
+fun void NewLine=2329(,)
+
+# Insert a Form Feed character.
+fun void FormFeed=2330(,)
+
+# Move caret to before first visible character on line.
+# If already there move to first character on line.
+fun void VCHome=2331(,)
+
+# Like VCHome but extending selection to new caret position.
+fun void VCHomeExtend=2332(,)
+
+# Magnify the displayed text by increasing the sizes by 1 point.
+fun void ZoomIn=2333(,)
+
+# Make the displayed text smaller by decreasing the sizes by 1 point.
+fun void ZoomOut=2334(,)
+
+# Delete the word to the left of the caret.
+fun void DelWordLeft=2335(,)
+
+# Delete the word to the right of the caret.
+fun void DelWordRight=2336(,)
+
+# Delete the word to the right of the caret, but not the trailing non-word characters.
+fun void DelWordRightEnd=2518(,)
+
+# Cut the line containing the caret.
+fun void LineCut=2337(,)
+
+# Delete the line containing the caret.
+fun void LineDelete=2338(,)
+
+# Switch the current line with the previous.
+fun void LineTranspose=2339(,)
+
+# Duplicate the current line.
+fun void LineDuplicate=2404(,)
+
+# Transform the selection to lower case.
+fun void LowerCase=2340(,)
+
+# Transform the selection to upper case.
+fun void UpperCase=2341(,)
+
+# Scroll the document down, keeping the caret visible.
+fun void LineScrollDown=2342(,)
+
+# Scroll the document up, keeping the caret visible.
+fun void LineScrollUp=2343(,)
+
+# Delete the selection or if no selection, the character before the caret.
+# Will not delete the character before at the start of a line.
+fun void DeleteBackNotLine=2344(,)
+
+# Move caret to first position on display line.
+fun void HomeDisplay=2345(,)
+
+# Move caret to first position on display line extending selection to
+# new caret position.
+fun void HomeDisplayExtend=2346(,)
+
+# Move caret to last position on display line.
+fun void LineEndDisplay=2347(,)
+
+# Move caret to last position on display line extending selection to new
+# caret position.
+fun void LineEndDisplayExtend=2348(,)
+
+# These are like their namesakes Home(Extend)?, LineEnd(Extend)?, VCHome(Extend)?
+# except they behave differently when word-wrap is enabled:
+# They go first to the start / end of the display line, like (Home|LineEnd)Display
+# The difference is that, the cursor is already at the point, it goes on to the start
+# or end of the document line, as appropriate for (Home|LineEnd|VCHome)(Extend)?.
+
+fun void HomeWrap=2349(,)
+fun void HomeWrapExtend=2450(,)
+fun void LineEndWrap=2451(,)
+fun void LineEndWrapExtend=2452(,)
+fun void VCHomeWrap=2453(,)
+fun void VCHomeWrapExtend=2454(,)
+
+# Copy the line containing the caret.
+fun void LineCopy=2455(,)
+
+# Move the caret inside current view if it's not there already.
+fun void MoveCaretInsideView=2401(,)
+
+# How many characters are on a line, including end of line characters?
+fun int LineLength=2350(int line,)
+
+# Highlight the characters at two positions.
+fun void BraceHighlight=2351(position pos1, position pos2)
+
+# Highlight the character at a position indicating there is no matching brace.
+fun void BraceBadLight=2352(position pos,)
+
+# Find the position of a matching brace or INVALID_POSITION if no match.
+fun position BraceMatch=2353(position pos,)
+
+# Are the end of line characters visible?
+get bool GetViewEOL=2355(,)
+
+# Make the end of line characters visible or invisible.
+set void SetViewEOL=2356(bool visible,)
+
+# Retrieve a pointer to the document object.
+get int GetDocPointer=2357(,)
+
+# Change the document object used.
+set void SetDocPointer=2358(, int pointer)
+
+# Set which document modification events are sent to the container.
+set void SetModEventMask=2359(int mask,)
+
+enu EdgeVisualStyle=EDGE_
+val EDGE_NONE=0
+val EDGE_LINE=1
+val EDGE_BACKGROUND=2
+
+# Retrieve the column number which text should be kept within.
+get int GetEdgeColumn=2360(,)
+
+# Set the column number of the edge.
+# If text goes past the edge then it is highlighted.
+set void SetEdgeColumn=2361(int column,)
+
+# Retrieve the edge highlight mode.
+get int GetEdgeMode=2362(,)
+
+# The edge may be displayed by a line (EDGE_LINE) or by highlighting text that
+# goes beyond it (EDGE_BACKGROUND) or not displayed at all (EDGE_NONE).
+set void SetEdgeMode=2363(int mode,)
+
+# Retrieve the colour used in edge indication.
+get colour GetEdgeColour=2364(,)
+
+# Change the colour used in edge indication.
+set void SetEdgeColour=2365(colour edgeColour,)
+
+# Sets the current caret position to be the search anchor.
+fun void SearchAnchor=2366(,)
+
+# Find some text starting at the search anchor.
+# Does not ensure the selection is visible.
+fun int SearchNext=2367(int flags, string text)
+
+# Find some text starting at the search anchor and moving backwards.
+# Does not ensure the selection is visible.
+fun int SearchPrev=2368(int flags, string text)
+
+# Retrieves the number of lines completely visible.
+get int LinesOnScreen=2370(,)
+
+# Set whether a pop up menu is displayed automatically when the user presses
+# the wrong mouse button.
+fun void UsePopUp=2371(bool allowPopUp,)
+
+# Is the selection rectangular? The alternative is the more common stream selection.
+get bool SelectionIsRectangle=2372(,)
+
+# Set the zoom level. This number of points is added to the size of all fonts.
+# It may be positive to magnify or negative to reduce.
+set void SetZoom=2373(int zoom,)
+# Retrieve the zoom level.
+get int GetZoom=2374(,)
+
+# Create a new document object.
+# Starts with reference count of 1 and not selected into editor.
+fun int CreateDocument=2375(,)
+# Extend life of document.
+fun void AddRefDocument=2376(, int doc)
+# Release a reference to the document, deleting document if it fades to black.
+fun void ReleaseDocument=2377(, int doc)
+
+# Get which document modification events are sent to the container.
+get int GetModEventMask=2378(,)
+
+# Change internal focus flag.
+set void SetFocus=2380(bool focus,)
+# Get internal focus flag.
+get bool GetFocus=2381(,)
+
+# Change error status - 0 = OK.
+set void SetStatus=2382(int statusCode,)
+# Get error status.
+get int GetStatus=2383(,)
+
+# Set whether the mouse is captured when its button is pressed.
+set void SetMouseDownCaptures=2384(bool captures,)
+# Get whether mouse gets captured.
+get bool GetMouseDownCaptures=2385(,)
+
+enu CursorShape=SC_CURSOR
+val SC_CURSORNORMAL=-1
+val SC_CURSORWAIT=4
+# Sets the cursor to one of the SC_CURSOR* values.
+set void SetCursor=2386(int cursorType,)
+# Get cursor type.
+get int GetCursor=2387(,)
+
+# Change the way control characters are displayed:
+# If symbol is < 32, keep the drawn way, else, use the given character.
+set void SetControlCharSymbol=2388(int symbol,)
+# Get the way control characters are displayed.
+get int GetControlCharSymbol=2389(,)
+
+# Move to the previous change in capitalisation.
+fun void WordPartLeft=2390(,)
+# Move to the previous change in capitalisation extending selection
+# to new caret position.
+fun void WordPartLeftExtend=2391(,)
+# Move to the change next in capitalisation.
+fun void WordPartRight=2392(,)
+# Move to the next change in capitalisation extending selection
+# to new caret position.
+fun void WordPartRightExtend=2393(,)
+
+# Constants for use with SetVisiblePolicy, similar to SetCaretPolicy.
+val VISIBLE_SLOP=0x01
+val VISIBLE_STRICT=0x04
+# Set the way the display area is determined when a particular line
+# is to be moved to by Find, FindNext, GotoLine, etc.
+fun void SetVisiblePolicy=2394(int visiblePolicy, int visibleSlop)
+
+# Delete back from the current position to the start of the line.
+fun void DelLineLeft=2395(,)
+
+# Delete forwards from the current position to the end of the line.
+fun void DelLineRight=2396(,)
+
+# Get and Set the xOffset (ie, horizonal scroll position).
+set void SetXOffset=2397(int newOffset,)
+get int GetXOffset=2398(,)
+
+# Set the last x chosen value to be the caret x position.
+fun void ChooseCaretX=2399(,)
+
+# Set the focus to this Scintilla widget.
+fun void GrabFocus=2400(,)
+
+enu CaretPolicy=CARET_
+# Caret policy, used by SetXCaretPolicy and SetYCaretPolicy.
+# If CARET_SLOP is set, we can define a slop value: caretSlop.
+# This value defines an unwanted zone (UZ) where the caret is... unwanted.
+# This zone is defined as a number of pixels near the vertical margins,
+# and as a number of lines near the horizontal margins.
+# By keeping the caret away from the edges, it is seen within its context,
+# so it is likely that the identifier that the caret is on can be completely seen,
+# and that the current line is seen with some of the lines following it which are
+# often dependent on that line.
+val CARET_SLOP=0x01
+# If CARET_STRICT is set, the policy is enforced... strictly.
+# The caret is centred on the display if slop is not set,
+# and cannot go in the UZ if slop is set.
+val CARET_STRICT=0x04
+# If CARET_JUMPS is set, the display is moved more energetically
+# so the caret can move in the same direction longer before the policy is applied again.
+val CARET_JUMPS=0x10
+# If CARET_EVEN is not set, instead of having symmetrical UZs,
+# the left and bottom UZs are extended up to right and top UZs respectively.
+# This way, we favour the displaying of useful information: the begining of lines,
+# where most code reside, and the lines after the caret, eg. the body of a function.
+val CARET_EVEN=0x08
+
+# Set the way the caret is kept visible when going sideway.
+# The exclusion zone is given in pixels.
+fun void SetXCaretPolicy=2402(int caretPolicy, int caretSlop)
+
+# Set the way the line the caret is on is kept visible.
+# The exclusion zone is given in lines.
+fun void SetYCaretPolicy=2403(int caretPolicy, int caretSlop)
+
+# Set printing to line wrapped (SC_WRAP_WORD) or not line wrapped (SC_WRAP_NONE).
+set void SetPrintWrapMode=2406(int mode,)
+
+# Is printing line wrapped?
+get int GetPrintWrapMode=2407(,)
+
+# Set a fore colour for active hotspots.
+set void SetHotspotActiveFore=2410(bool useSetting, colour fore)
+
+# Get the fore colour for active hotspots.
+get colour GetHotspotActiveFore=2494(,)
+
+# Set a back colour for active hotspots.
+set void SetHotspotActiveBack=2411(bool useSetting, colour back)
+
+# Get the back colour for active hotspots.
+get colour GetHotspotActiveBack=2495(,)
+
+# Enable / Disable underlining active hotspots.
+set void SetHotspotActiveUnderline=2412(bool underline,)
+
+# Get whether underlining for active hotspots.
+get bool GetHotspotActiveUnderline=2496(,)
+
+# Limit hotspots to single line so hotspots on two lines don't merge.
+set void SetHotspotSingleLine=2421(bool singleLine,)
+
+# Get the HotspotSingleLine property
+get bool GetHotspotSingleLine=2497(,)
+
+# Move caret between paragraphs (delimited by empty lines).
+fun void ParaDown=2413(,)
+fun void ParaDownExtend=2414(,)
+fun void ParaUp=2415(,)
+fun void ParaUpExtend=2416(,)
+
+# Given a valid document position, return the previous position taking code
+# page into account. Returns 0 if passed 0.
+fun position PositionBefore=2417(position pos,)
+
+# Given a valid document position, return the next position taking code
+# page into account. Maximum value returned is the last position in the document.
+fun position PositionAfter=2418(position pos,)
+
+# Copy a range of text to the clipboard. Positions are clipped into the document.
+fun void CopyRange=2419(position start, position end)
+
+# Copy argument text to the clipboard.
+fun void CopyText=2420(int length, string text)
+
+enu SelectionMode=SC_SEL_
+val SC_SEL_STREAM=0
+val SC_SEL_RECTANGLE=1
+val SC_SEL_LINES=2
+
+# Set the selection mode to stream (SC_SEL_STREAM) or rectangular (SC_SEL_RECTANGLE) or
+# by lines (SC_SEL_LINES).
+set void SetSelectionMode=2422(int mode,)
+
+# Get the mode of the current selection.
+get int GetSelectionMode=2423(,)
+
+# Retrieve the position of the start of the selection at the given line (INVALID_POSITION if no selection on this line).
+fun position GetLineSelStartPosition=2424(int line,)
+
+# Retrieve the position of the end of the selection at the given line (INVALID_POSITION if no selection on this line).
+fun position GetLineSelEndPosition=2425(int line,)
+
+## RectExtended rectangular selection moves
+# Move caret down one line, extending rectangular selection to new caret position.
+fun void LineDownRectExtend=2426(,)
+
+# Move caret up one line, extending rectangular selection to new caret position.
+fun void LineUpRectExtend=2427(,)
+
+# Move caret left one character, extending rectangular selection to new caret position.
+fun void CharLeftRectExtend=2428(,)
+
+# Move caret right one character, extending rectangular selection to new caret position.
+fun void CharRightRectExtend=2429(,)
+
+# Move caret to first position on line, extending rectangular selection to new caret position.
+fun void HomeRectExtend=2430(,)
+
+# Move caret to before first visible character on line.
+# If already there move to first character on line.
+# In either case, extend rectangular selection to new caret position.
+fun void VCHomeRectExtend=2431(,)
+
+# Move caret to last position on line, extending rectangular selection to new caret position.
+fun void LineEndRectExtend=2432(,)
+
+# Move caret one page up, extending rectangular selection to new caret position.
+fun void PageUpRectExtend=2433(,)
+
+# Move caret one page down, extending rectangular selection to new caret position.
+fun void PageDownRectExtend=2434(,)
+
+
+# Move caret to top of page, or one page up if already at top of page.
+fun void StutteredPageUp=2435(,)
+
+# Move caret to top of page, or one page up if already at top of page, extending selection to new caret position.
+fun void StutteredPageUpExtend=2436(,)
+
+# Move caret to bottom of page, or one page down if already at bottom of page.
+fun void StutteredPageDown=2437(,)
+
+# Move caret to bottom of page, or one page down if already at bottom of page, extending selection to new caret position.
+fun void StutteredPageDownExtend=2438(,)
+
+
+# Move caret left one word, position cursor at end of word.
+fun void WordLeftEnd=2439(,)
+
+# Move caret left one word, position cursor at end of word, extending selection to new caret position.
+fun void WordLeftEndExtend=2440(,)
+
+# Move caret right one word, position cursor at end of word.
+fun void WordRightEnd=2441(,)
+
+# Move caret right one word, position cursor at end of word, extending selection to new caret position.
+fun void WordRightEndExtend=2442(,)
+
+# Set the set of characters making up whitespace for when moving or selecting by word.
+# Should be called after SetWordChars.
+set void SetWhitespaceChars=2443(, string characters)
+
+# Reset the set of characters for whitespace and word characters to the defaults.
+fun void SetCharsDefault=2444(,)
+
+# Get currently selected item position in the auto-completion list
+fun int AutoCGetCurrent=2445(,)
+
+# Enlarge the document to a particular size of text bytes.
+fun void Allocate=2446(int bytes,)
+
+# Returns the target converted to UTF8.
+# Return the length in bytes.
+fun int TargetAsUTF8=2447(, stringresult s)
+
+# Set the length of the utf8 argument for calling EncodedFromUTF8.
+# Set to -1 and the string will be measured to the first nul.
+fun void SetLengthForEncode=2448(int bytes,)
+
+# Translates a UTF8 string into the document encoding.
+# Return the length of the result in bytes.
+# On error return 0.
+fun int EncodedFromUTF8=2449(string utf8, stringresult encoded)
+
+# Find the position of a column on a line taking into account tabs and
+# multi-byte characters. If beyond end of line, return line end position.
+fun int FindColumn=2456(int line, int column)
+
+# Can the caret preferred x position only be changed by explicit movement commands?
+get bool GetCaretSticky=2457(,)
+
+# Stop the caret preferred x position changing when the user types.
+set void SetCaretSticky=2458(bool useCaretStickyBehaviour,)
+
+# Switch between sticky and non-sticky: meant to be bound to a key.
+fun void ToggleCaretSticky=2459(,)
+
+# Enable/Disable convert-on-paste for line endings
+set void SetPasteConvertEndings=2467(bool convert,)
+
+# Get convert-on-paste setting
+get bool GetPasteConvertEndings=2468(,)
+
+# Duplicate the selection. If selection empty duplicate the line containing the caret.
+fun void SelectionDuplicate=2469(,)
+
+val SC_ALPHA_TRANSPARENT=0
+val SC_ALPHA_OPAQUE=255
+val SC_ALPHA_NOALPHA=256
+
+# Set background alpha of the caret line.
+set void SetCaretLineBackAlpha=2470(int alpha,)
+
+# Get the background alpha of the caret line.
+get int GetCaretLineBackAlpha=2471(,)
+
+enu CaretStyle=CARETSTYLE_
+val CARETSTYLE_INVISIBLE=0
+val CARETSTYLE_LINE=1
+val CARETSTYLE_BLOCK=2
+
+# Set the style of the caret to be drawn.
+set void SetCaretStyle=2512(int caretStyle,)
+
+# Returns the current style of the caret.
+get int GetCaretStyle=2513(,)
+
+# Set the indicator used for IndicatorFillRange and IndicatorClearRange
+set void SetIndicatorCurrent=2500(int indicator,)
+
+# Get the current indicator
+get int GetIndicatorCurrent=2501(,)
+
+# Set the value used for IndicatorFillRange
+set void SetIndicatorValue=2502(int value,)
+
+# Get the current indicator vaue
+get int GetIndicatorValue=2503(,)
+
+# Turn a indicator on over a range.
+fun void IndicatorFillRange=2504(int position, int fillLength)
+
+# Turn a indicator off over a range.
+fun void IndicatorClearRange=2505(int position, int clearLength)
+
+# Are any indicators present at position?
+fun int IndicatorAllOnFor=2506(int position,)
+
+# What value does a particular indicator have at at a position?
+fun int IndicatorValueAt=2507(int indicator, int position)
+
+# Where does a particular indicator start?
+fun int IndicatorStart=2508(int indicator, int position)
+
+# Where does a particular indicator end?
+fun int IndicatorEnd=2509(int indicator, int position)
+
+# Set number of entries in position cache
+set void SetPositionCache=2514(int size,)
+
+# How many entries are allocated to the position cache?
+get int GetPositionCache=2515(,)
+
+# Copy the selection, if selection empty copy the line with the caret
+fun void CopyAllowLine=2519(,)
+
+# Compact the document buffer and return a read-only pointer to the
+# characters in the document.
+get int GetCharacterPointer=2520(,)
+
+# Always interpret keyboard input as Unicode
+set void SetKeysUnicode=2521(bool keysUnicode,)
+
+# Are keys always interpreted as Unicode?
+get bool GetKeysUnicode=2522(,)
+
+# Start notifying the container of all key presses and commands.
+fun void StartRecord=3001(,)
+
+# Stop notifying the container of all key presses and commands.
+fun void StopRecord=3002(,)
+
+# Set the lexing language of the document.
+set void SetLexer=4001(int lexer,)
+
+# Retrieve the lexing language of the document.
+get int GetLexer=4002(,)
+
+# Colourise a segment of the document using the current lexing language.
+fun void Colourise=4003(position start, position end)
+
+# Set up a value that may be used by a lexer for some optional feature.
+set void SetProperty=4004(string key, string value)
+
+# Maximum value of keywordSet parameter of SetKeyWords.
+val KEYWORDSET_MAX=8
+
+# Set up the key words used by the lexer.
+set void SetKeyWords=4005(int keywordSet, string keyWords)
+
+# Set the lexing language of the document based on string name.
+set void SetLexerLanguage=4006(, string language)
+
+# Load a lexer library (dll / so).
+fun void LoadLexerLibrary=4007(, string path)
+
+# Retrieve a "property" value previously set with SetProperty.
+fun int GetProperty=4008(string key, stringresult buf)
+
+# Retrieve a "property" value previously set with SetProperty,
+# with "$()" variable replacement on returned buffer.
+fun int GetPropertyExpanded=4009(string key, stringresult buf)
+
+# Retrieve a "property" value previously set with SetProperty,
+# interpreted as an int AFTER any "$()" variable replacement.
+get int GetPropertyInt=4010(string key,)
+
+# Retrieve the number of bits the current lexer needs for styling.
+get int GetStyleBitsNeeded=4011(,)
+
+# Notifications
+# Type of modification and the action which caused the modification.
+# These are defined as a bit mask to make it easy to specify which notifications are wanted.
+# One bit is set from each of SC_MOD_* and SC_PERFORMED_*.
+enu ModificationFlags=SC_MOD_ SC_PERFORMED_ SC_LAST
+val SC_MOD_INSERTTEXT=0x1
+val SC_MOD_DELETETEXT=0x2
+val SC_MOD_CHANGESTYLE=0x4
+val SC_MOD_CHANGEFOLD=0x8
+val SC_PERFORMED_USER=0x10
+val SC_PERFORMED_UNDO=0x20
+val SC_PERFORMED_REDO=0x40
+val SC_MULTISTEPUNDOREDO=0x80
+val SC_LASTSTEPINUNDOREDO=0x100
+val SC_MOD_CHANGEMARKER=0x200
+val SC_MOD_BEFOREINSERT=0x400
+val SC_MOD_BEFOREDELETE=0x800
+val SC_MULTILINEUNDOREDO=0x1000
+val SC_STARTACTION=0x2000
+val SC_MOD_CHANGEINDICATOR=0x4000
+val SC_MOD_CHANGELINESTATE=0x8000
+val SC_MODEVENTMASKALL=0xFFFF
+
+# For compatibility, these go through the COMMAND notification rather than NOTIFY
+# and should have had exactly the same values as the EN_* constants.
+# Unfortunately the SETFOCUS and KILLFOCUS are flipped over from EN_*
+# As clients depend on these constants, this will not be changed.
+val SCEN_CHANGE=768
+val SCEN_SETFOCUS=512
+val SCEN_KILLFOCUS=256
+
+# Symbolic key codes and modifier flags.
+# ASCII and other printable characters below 256.
+# Extended keys above 300.
+
+enu Keys=SCK_
+val SCK_DOWN=300
+val SCK_UP=301
+val SCK_LEFT=302
+val SCK_RIGHT=303
+val SCK_HOME=304
+val SCK_END=305
+val SCK_PRIOR=306
+val SCK_NEXT=307
+val SCK_DELETE=308
+val SCK_INSERT=309
+val SCK_ESCAPE=7
+val SCK_BACK=8
+val SCK_TAB=9
+val SCK_RETURN=13
+val SCK_ADD=310
+val SCK_SUBTRACT=311
+val SCK_DIVIDE=312
+val SCK_WIN=313
+val SCK_RWIN=314
+val SCK_MENU=315
+
+enu KeyMod=SCMOD_
+val SCMOD_NORM=0
+val SCMOD_SHIFT=1
+val SCMOD_CTRL=2
+val SCMOD_ALT=4
+
+################################################
+# For SciLexer.h
+enu Lexer=SCLEX_
+val SCLEX_CONTAINER=0
+val SCLEX_NULL=1
+val SCLEX_PYTHON=2
+val SCLEX_CPP=3
+val SCLEX_HTML=4
+val SCLEX_XML=5
+val SCLEX_PERL=6
+val SCLEX_SQL=7
+val SCLEX_VB=8
+val SCLEX_PROPERTIES=9
+val SCLEX_ERRORLIST=10
+val SCLEX_MAKEFILE=11
+val SCLEX_BATCH=12
+val SCLEX_XCODE=13
+val SCLEX_LATEX=14
+val SCLEX_LUA=15
+val SCLEX_DIFF=16
+val SCLEX_CONF=17
+val SCLEX_PASCAL=18
+val SCLEX_AVE=19
+val SCLEX_ADA=20
+val SCLEX_LISP=21
+val SCLEX_RUBY=22
+val SCLEX_EIFFEL=23
+val SCLEX_EIFFELKW=24
+val SCLEX_TCL=25
+val SCLEX_NNCRONTAB=26
+val SCLEX_BULLANT=27
+val SCLEX_VBSCRIPT=28
+val SCLEX_BAAN=31
+val SCLEX_MATLAB=32
+val SCLEX_SCRIPTOL=33
+val SCLEX_ASM=34
+val SCLEX_CPPNOCASE=35
+val SCLEX_FORTRAN=36
+val SCLEX_F77=37
+val SCLEX_CSS=38
+val SCLEX_POV=39
+val SCLEX_LOUT=40
+val SCLEX_ESCRIPT=41
+val SCLEX_PS=42
+val SCLEX_NSIS=43
+val SCLEX_MMIXAL=44
+val SCLEX_CLW=45
+val SCLEX_CLWNOCASE=46
+val SCLEX_LOT=47
+val SCLEX_YAML=48
+val SCLEX_TEX=49
+val SCLEX_METAPOST=50
+val SCLEX_POWERBASIC=51
+val SCLEX_FORTH=52
+val SCLEX_ERLANG=53
+val SCLEX_OCTAVE=54
+val SCLEX_MSSQL=55
+val SCLEX_VERILOG=56
+val SCLEX_KIX=57
+val SCLEX_GUI4CLI=58
+val SCLEX_SPECMAN=59
+val SCLEX_AU3=60
+val SCLEX_APDL=61
+val SCLEX_BASH=62
+val SCLEX_ASN1=63
+val SCLEX_VHDL=64
+val SCLEX_CAML=65
+val SCLEX_BLITZBASIC=66
+val SCLEX_PUREBASIC=67
+val SCLEX_HASKELL=68
+val SCLEX_PHPSCRIPT=69
+val SCLEX_TADS3=70
+val SCLEX_REBOL=71
+val SCLEX_SMALLTALK=72
+val SCLEX_FLAGSHIP=73
+val SCLEX_CSOUND=74
+val SCLEX_FREEBASIC=75
+val SCLEX_INNOSETUP=76
+val SCLEX_OPAL=77
+val SCLEX_SPICE=78
+val SCLEX_D=79
+val SCLEX_CMAKE=80
+val SCLEX_GAP=81
+val SCLEX_PLM=82
+val SCLEX_PROGRESS=83
+val SCLEX_ABAQUS=84
+val SCLEX_ASYMPTOTE=85
+val SCLEX_R=86
+val SCLEX_MAGIK=87
+val SCLEX_POWERSHELL=88
+val SCLEX_MYSQL=89
+val SCLEX_PO=90
+
+# When a lexer specifies its language as SCLEX_AUTOMATIC it receives a
+# value assigned in sequence from SCLEX_AUTOMATIC+1.
+val SCLEX_AUTOMATIC=1000
+# Lexical states for SCLEX_PYTHON
+lex Python=SCLEX_PYTHON SCE_P_
+val SCE_P_DEFAULT=0
+val SCE_P_COMMENTLINE=1
+val SCE_P_NUMBER=2
+val SCE_P_STRING=3
+val SCE_P_CHARACTER=4
+val SCE_P_WORD=5
+val SCE_P_TRIPLE=6
+val SCE_P_TRIPLEDOUBLE=7
+val SCE_P_CLASSNAME=8
+val SCE_P_DEFNAME=9
+val SCE_P_OPERATOR=10
+val SCE_P_IDENTIFIER=11
+val SCE_P_COMMENTBLOCK=12
+val SCE_P_STRINGEOL=13
+val SCE_P_WORD2=14
+val SCE_P_DECORATOR=15
+# Lexical states for SCLEX_CPP
+lex Cpp=SCLEX_CPP SCE_C_
+lex Pascal=SCLEX_PASCAL SCE_C_
+lex BullAnt=SCLEX_BULLANT SCE_C_
+val SCE_C_DEFAULT=0
+val SCE_C_COMMENT=1
+val SCE_C_COMMENTLINE=2
+val SCE_C_COMMENTDOC=3
+val SCE_C_NUMBER=4
+val SCE_C_WORD=5
+val SCE_C_STRING=6
+val SCE_C_CHARACTER=7
+val SCE_C_UUID=8
+val SCE_C_PREPROCESSOR=9
+val SCE_C_OPERATOR=10
+val SCE_C_IDENTIFIER=11
+val SCE_C_STRINGEOL=12
+val SCE_C_VERBATIM=13
+val SCE_C_REGEX=14
+val SCE_C_COMMENTLINEDOC=15
+val SCE_C_WORD2=16
+val SCE_C_COMMENTDOCKEYWORD=17
+val SCE_C_COMMENTDOCKEYWORDERROR=18
+val SCE_C_GLOBALCLASS=19
+# Lexical states for SCLEX_D
+lex D=SCLEX_D SCE_D_
+val SCE_D_DEFAULT=0
+val SCE_D_COMMENT=1
+val SCE_D_COMMENTLINE=2
+val SCE_D_COMMENTDOC=3
+val SCE_D_COMMENTNESTED=4
+val SCE_D_NUMBER=5
+val SCE_D_WORD=6
+val SCE_D_WORD2=7
+val SCE_D_WORD3=8
+val SCE_D_TYPEDEF=9
+val SCE_D_STRING=10
+val SCE_D_STRINGEOL=11
+val SCE_D_CHARACTER=12
+val SCE_D_OPERATOR=13
+val SCE_D_IDENTIFIER=14
+val SCE_D_COMMENTLINEDOC=15
+val SCE_D_COMMENTDOCKEYWORD=16
+val SCE_D_COMMENTDOCKEYWORDERROR=17
+# Lexical states for SCLEX_TCL
+lex TCL=SCLEX_TCL SCE_TCL_
+val SCE_TCL_DEFAULT=0
+val SCE_TCL_COMMENT=1
+val SCE_TCL_COMMENTLINE=2
+val SCE_TCL_NUMBER=3
+val SCE_TCL_WORD_IN_QUOTE=4
+val SCE_TCL_IN_QUOTE=5
+val SCE_TCL_OPERATOR=6
+val SCE_TCL_IDENTIFIER=7
+val SCE_TCL_SUBSTITUTION=8
+val SCE_TCL_SUB_BRACE=9
+val SCE_TCL_MODIFIER=10
+val SCE_TCL_EXPAND=11
+val SCE_TCL_WORD=12
+val SCE_TCL_WORD2=13
+val SCE_TCL_WORD3=14
+val SCE_TCL_WORD4=15
+val SCE_TCL_WORD5=16
+val SCE_TCL_WORD6=17
+val SCE_TCL_WORD7=18
+val SCE_TCL_WORD8=19
+val SCE_TCL_COMMENT_BOX=20
+val SCE_TCL_BLOCK_COMMENT=21
+# Lexical states for SCLEX_HTML, SCLEX_XML
+lex HTML=SCLEX_HTML SCE_H
+lex XML=SCLEX_XML SCE_H
+lex ASP=SCLEX_ASP SCE_H
+lex PHP=SCLEX_PHP SCE_H
+val SCE_H_DEFAULT=0
+val SCE_H_TAG=1
+val SCE_H_TAGUNKNOWN=2
+val SCE_H_ATTRIBUTE=3
+val SCE_H_ATTRIBUTEUNKNOWN=4
+val SCE_H_NUMBER=5
+val SCE_H_DOUBLESTRING=6
+val SCE_H_SINGLESTRING=7
+val SCE_H_OTHER=8
+val SCE_H_COMMENT=9
+val SCE_H_ENTITY=10
+# XML and ASP
+val SCE_H_TAGEND=11
+val SCE_H_XMLSTART=12
+val SCE_H_XMLEND=13
+val SCE_H_SCRIPT=14
+val SCE_H_ASP=15
+val SCE_H_ASPAT=16
+val SCE_H_CDATA=17
+val SCE_H_QUESTION=18
+# More HTML
+val SCE_H_VALUE=19
+# X-Code
+val SCE_H_XCCOMMENT=20
+# SGML
+val SCE_H_SGML_DEFAULT=21
+val SCE_H_SGML_COMMAND=22
+val SCE_H_SGML_1ST_PARAM=23
+val SCE_H_SGML_DOUBLESTRING=24
+val SCE_H_SGML_SIMPLESTRING=25
+val SCE_H_SGML_ERROR=26
+val SCE_H_SGML_SPECIAL=27
+val SCE_H_SGML_ENTITY=28
+val SCE_H_SGML_COMMENT=29
+val SCE_H_SGML_1ST_PARAM_COMMENT=30
+val SCE_H_SGML_BLOCK_DEFAULT=31
+# Embedded Javascript
+val SCE_HJ_START=40
+val SCE_HJ_DEFAULT=41
+val SCE_HJ_COMMENT=42
+val SCE_HJ_COMMENTLINE=43
+val SCE_HJ_COMMENTDOC=44
+val SCE_HJ_NUMBER=45
+val SCE_HJ_WORD=46
+val SCE_HJ_KEYWORD=47
+val SCE_HJ_DOUBLESTRING=48
+val SCE_HJ_SINGLESTRING=49
+val SCE_HJ_SYMBOLS=50
+val SCE_HJ_STRINGEOL=51
+val SCE_HJ_REGEX=52
+# ASP Javascript
+val SCE_HJA_START=55
+val SCE_HJA_DEFAULT=56
+val SCE_HJA_COMMENT=57
+val SCE_HJA_COMMENTLINE=58
+val SCE_HJA_COMMENTDOC=59
+val SCE_HJA_NUMBER=60
+val SCE_HJA_WORD=61
+val SCE_HJA_KEYWORD=62
+val SCE_HJA_DOUBLESTRING=63
+val SCE_HJA_SINGLESTRING=64
+val SCE_HJA_SYMBOLS=65
+val SCE_HJA_STRINGEOL=66
+val SCE_HJA_REGEX=67
+# Embedded VBScript
+val SCE_HB_START=70
+val SCE_HB_DEFAULT=71
+val SCE_HB_COMMENTLINE=72
+val SCE_HB_NUMBER=73
+val SCE_HB_WORD=74
+val SCE_HB_STRING=75
+val SCE_HB_IDENTIFIER=76
+val SCE_HB_STRINGEOL=77
+# ASP VBScript
+val SCE_HBA_START=80
+val SCE_HBA_DEFAULT=81
+val SCE_HBA_COMMENTLINE=82
+val SCE_HBA_NUMBER=83
+val SCE_HBA_WORD=84
+val SCE_HBA_STRING=85
+val SCE_HBA_IDENTIFIER=86
+val SCE_HBA_STRINGEOL=87
+# Embedded Python
+val SCE_HP_START=90
+val SCE_HP_DEFAULT=91
+val SCE_HP_COMMENTLINE=92
+val SCE_HP_NUMBER=93
+val SCE_HP_STRING=94
+val SCE_HP_CHARACTER=95
+val SCE_HP_WORD=96
+val SCE_HP_TRIPLE=97
+val SCE_HP_TRIPLEDOUBLE=98
+val SCE_HP_CLASSNAME=99
+val SCE_HP_DEFNAME=100
+val SCE_HP_OPERATOR=101
+val SCE_HP_IDENTIFIER=102
+# PHP
+val SCE_HPHP_COMPLEX_VARIABLE=104
+# ASP Python
+val SCE_HPA_START=105
+val SCE_HPA_DEFAULT=106
+val SCE_HPA_COMMENTLINE=107
+val SCE_HPA_NUMBER=108
+val SCE_HPA_STRING=109
+val SCE_HPA_CHARACTER=110
+val SCE_HPA_WORD=111
+val SCE_HPA_TRIPLE=112
+val SCE_HPA_TRIPLEDOUBLE=113
+val SCE_HPA_CLASSNAME=114
+val SCE_HPA_DEFNAME=115
+val SCE_HPA_OPERATOR=116
+val SCE_HPA_IDENTIFIER=117
+# PHP
+val SCE_HPHP_DEFAULT=118
+val SCE_HPHP_HSTRING=119
+val SCE_HPHP_SIMPLESTRING=120
+val SCE_HPHP_WORD=121
+val SCE_HPHP_NUMBER=122
+val SCE_HPHP_VARIABLE=123
+val SCE_HPHP_COMMENT=124
+val SCE_HPHP_COMMENTLINE=125
+val SCE_HPHP_HSTRING_VARIABLE=126
+val SCE_HPHP_OPERATOR=127
+# Lexical states for SCLEX_PERL
+lex Perl=SCLEX_PERL SCE_PL_
+val SCE_PL_DEFAULT=0
+val SCE_PL_ERROR=1
+val SCE_PL_COMMENTLINE=2
+val SCE_PL_POD=3
+val SCE_PL_NUMBER=4
+val SCE_PL_WORD=5
+val SCE_PL_STRING=6
+val SCE_PL_CHARACTER=7
+val SCE_PL_PUNCTUATION=8
+val SCE_PL_PREPROCESSOR=9
+val SCE_PL_OPERATOR=10
+val SCE_PL_IDENTIFIER=11
+val SCE_PL_SCALAR=12
+val SCE_PL_ARRAY=13
+val SCE_PL_HASH=14
+val SCE_PL_SYMBOLTABLE=15
+val SCE_PL_VARIABLE_INDEXER=16
+val SCE_PL_REGEX=17
+val SCE_PL_REGSUBST=18
+val SCE_PL_LONGQUOTE=19
+val SCE_PL_BACKTICKS=20
+val SCE_PL_DATASECTION=21
+val SCE_PL_HERE_DELIM=22
+val SCE_PL_HERE_Q=23
+val SCE_PL_HERE_QQ=24
+val SCE_PL_HERE_QX=25
+val SCE_PL_STRING_Q=26
+val SCE_PL_STRING_QQ=27
+val SCE_PL_STRING_QX=28
+val SCE_PL_STRING_QR=29
+val SCE_PL_STRING_QW=30
+val SCE_PL_POD_VERB=31
+val SCE_PL_SUB_PROTOTYPE=40
+val SCE_PL_FORMAT_IDENT=41
+val SCE_PL_FORMAT=42
+# Lexical states for SCLEX_RUBY
+lex Ruby=SCLEX_RUBY SCE_RB_
+val SCE_RB_DEFAULT=0
+val SCE_RB_ERROR=1
+val SCE_RB_COMMENTLINE=2
+val SCE_RB_POD=3
+val SCE_RB_NUMBER=4
+val SCE_RB_WORD=5
+val SCE_RB_STRING=6
+val SCE_RB_CHARACTER=7
+val SCE_RB_CLASSNAME=8
+val SCE_RB_DEFNAME=9
+val SCE_RB_OPERATOR=10
+val SCE_RB_IDENTIFIER=11
+val SCE_RB_REGEX=12
+val SCE_RB_GLOBAL=13
+val SCE_RB_SYMBOL=14
+val SCE_RB_MODULE_NAME=15
+val SCE_RB_INSTANCE_VAR=16
+val SCE_RB_CLASS_VAR=17
+val SCE_RB_BACKTICKS=18
+val SCE_RB_DATASECTION=19
+val SCE_RB_HERE_DELIM=20
+val SCE_RB_HERE_Q=21
+val SCE_RB_HERE_QQ=22
+val SCE_RB_HERE_QX=23
+val SCE_RB_STRING_Q=24
+val SCE_RB_STRING_QQ=25
+val SCE_RB_STRING_QX=26
+val SCE_RB_STRING_QR=27
+val SCE_RB_STRING_QW=28
+val SCE_RB_WORD_DEMOTED=29
+val SCE_RB_STDIN=30
+val SCE_RB_STDOUT=31
+val SCE_RB_STDERR=40
+val SCE_RB_UPPER_BOUND=41
+# Lexical states for SCLEX_VB, SCLEX_VBSCRIPT, SCLEX_POWERBASIC
+lex VB=SCLEX_VB SCE_B_
+lex VBScript=SCLEX_VBSCRIPT SCE_B_
+lex PowerBasic=SCLEX_POWERBASIC SCE_B_
+val SCE_B_DEFAULT=0
+val SCE_B_COMMENT=1
+val SCE_B_NUMBER=2
+val SCE_B_KEYWORD=3
+val SCE_B_STRING=4
+val SCE_B_PREPROCESSOR=5
+val SCE_B_OPERATOR=6
+val SCE_B_IDENTIFIER=7
+val SCE_B_DATE=8
+val SCE_B_STRINGEOL=9
+val SCE_B_KEYWORD2=10
+val SCE_B_KEYWORD3=11
+val SCE_B_KEYWORD4=12
+val SCE_B_CONSTANT=13
+val SCE_B_ASM=14
+val SCE_B_LABEL=15
+val SCE_B_ERROR=16
+val SCE_B_HEXNUMBER=17
+val SCE_B_BINNUMBER=18
+# Lexical states for SCLEX_PROPERTIES
+lex Properties=SCLEX_PROPERTIES SCE_PROPS_
+val SCE_PROPS_DEFAULT=0
+val SCE_PROPS_COMMENT=1
+val SCE_PROPS_SECTION=2
+val SCE_PROPS_ASSIGNMENT=3
+val SCE_PROPS_DEFVAL=4
+val SCE_PROPS_KEY=5
+# Lexical states for SCLEX_LATEX
+lex LaTeX=SCLEX_LATEX SCE_L_
+val SCE_L_DEFAULT=0
+val SCE_L_COMMAND=1
+val SCE_L_TAG=2
+val SCE_L_MATH=3
+val SCE_L_COMMENT=4
+# Lexical states for SCLEX_LUA
+lex Lua=SCLEX_LUA SCE_LUA_
+val SCE_LUA_DEFAULT=0
+val SCE_LUA_COMMENT=1
+val SCE_LUA_COMMENTLINE=2
+val SCE_LUA_COMMENTDOC=3
+val SCE_LUA_NUMBER=4
+val SCE_LUA_WORD=5
+val SCE_LUA_STRING=6
+val SCE_LUA_CHARACTER=7
+val SCE_LUA_LITERALSTRING=8
+val SCE_LUA_PREPROCESSOR=9
+val SCE_LUA_OPERATOR=10
+val SCE_LUA_IDENTIFIER=11
+val SCE_LUA_STRINGEOL=12
+val SCE_LUA_WORD2=13
+val SCE_LUA_WORD3=14
+val SCE_LUA_WORD4=15
+val SCE_LUA_WORD5=16
+val SCE_LUA_WORD6=17
+val SCE_LUA_WORD7=18
+val SCE_LUA_WORD8=19
+# Lexical states for SCLEX_ERRORLIST
+lex ErrorList=SCLEX_ERRORLIST SCE_ERR_
+val SCE_ERR_DEFAULT=0
+val SCE_ERR_PYTHON=1
+val SCE_ERR_GCC=2
+val SCE_ERR_MS=3
+val SCE_ERR_CMD=4
+val SCE_ERR_BORLAND=5
+val SCE_ERR_PERL=6
+val SCE_ERR_NET=7
+val SCE_ERR_LUA=8
+val SCE_ERR_CTAG=9
+val SCE_ERR_DIFF_CHANGED=10
+val SCE_ERR_DIFF_ADDITION=11
+val SCE_ERR_DIFF_DELETION=12
+val SCE_ERR_DIFF_MESSAGE=13
+val SCE_ERR_PHP=14
+val SCE_ERR_ELF=15
+val SCE_ERR_IFC=16
+val SCE_ERR_IFORT=17
+val SCE_ERR_ABSF=18
+val SCE_ERR_TIDY=19
+val SCE_ERR_JAVA_STACK=20
+val SCE_ERR_VALUE=21
+# Lexical states for SCLEX_BATCH
+lex Batch=SCLEX_BATCH SCE_BAT_
+val SCE_BAT_DEFAULT=0
+val SCE_BAT_COMMENT=1
+val SCE_BAT_WORD=2
+val SCE_BAT_LABEL=3
+val SCE_BAT_HIDE=4
+val SCE_BAT_COMMAND=5
+val SCE_BAT_IDENTIFIER=6
+val SCE_BAT_OPERATOR=7
+# Lexical states for SCLEX_MAKEFILE
+lex MakeFile=SCLEX_MAKEFILE SCE_MAKE_
+val SCE_MAKE_DEFAULT=0
+val SCE_MAKE_COMMENT=1
+val SCE_MAKE_PREPROCESSOR=2
+val SCE_MAKE_IDENTIFIER=3
+val SCE_MAKE_OPERATOR=4
+val SCE_MAKE_TARGET=5
+val SCE_MAKE_IDEOL=9
+# Lexical states for SCLEX_DIFF
+lex Diff=SCLEX_DIFF SCE_DIFF_
+val SCE_DIFF_DEFAULT=0
+val SCE_DIFF_COMMENT=1
+val SCE_DIFF_COMMAND=2
+val SCE_DIFF_HEADER=3
+val SCE_DIFF_POSITION=4
+val SCE_DIFF_DELETED=5
+val SCE_DIFF_ADDED=6
+val SCE_DIFF_CHANGED=7
+# Lexical states for SCLEX_CONF (Apache Configuration Files Lexer)
+lex Conf=SCLEX_CONF SCE_CONF_
+val SCE_CONF_DEFAULT=0
+val SCE_CONF_COMMENT=1
+val SCE_CONF_NUMBER=2
+val SCE_CONF_IDENTIFIER=3
+val SCE_CONF_EXTENSION=4
+val SCE_CONF_PARAMETER=5
+val SCE_CONF_STRING=6
+val SCE_CONF_OPERATOR=7
+val SCE_CONF_IP=8
+val SCE_CONF_DIRECTIVE=9
+# Lexical states for SCLEX_AVE, Avenue
+lex Avenue=SCLEX_AVE SCE_AVE_
+val SCE_AVE_DEFAULT=0
+val SCE_AVE_COMMENT=1
+val SCE_AVE_NUMBER=2
+val SCE_AVE_WORD=3
+val SCE_AVE_STRING=6
+val SCE_AVE_ENUM=7
+val SCE_AVE_STRINGEOL=8
+val SCE_AVE_IDENTIFIER=9
+val SCE_AVE_OPERATOR=10
+val SCE_AVE_WORD1=11
+val SCE_AVE_WORD2=12
+val SCE_AVE_WORD3=13
+val SCE_AVE_WORD4=14
+val SCE_AVE_WORD5=15
+val SCE_AVE_WORD6=16
+# Lexical states for SCLEX_ADA
+lex Ada=SCLEX_ADA SCE_ADA_
+val SCE_ADA_DEFAULT=0
+val SCE_ADA_WORD=1
+val SCE_ADA_IDENTIFIER=2
+val SCE_ADA_NUMBER=3
+val SCE_ADA_DELIMITER=4
+val SCE_ADA_CHARACTER=5
+val SCE_ADA_CHARACTEREOL=6
+val SCE_ADA_STRING=7
+val SCE_ADA_STRINGEOL=8
+val SCE_ADA_LABEL=9
+val SCE_ADA_COMMENTLINE=10
+val SCE_ADA_ILLEGAL=11
+# Lexical states for SCLEX_BAAN
+lex Baan=SCLEX_BAAN SCE_BAAN_
+val SCE_BAAN_DEFAULT=0
+val SCE_BAAN_COMMENT=1
+val SCE_BAAN_COMMENTDOC=2
+val SCE_BAAN_NUMBER=3
+val SCE_BAAN_WORD=4
+val SCE_BAAN_STRING=5
+val SCE_BAAN_PREPROCESSOR=6
+val SCE_BAAN_OPERATOR=7
+val SCE_BAAN_IDENTIFIER=8
+val SCE_BAAN_STRINGEOL=9
+val SCE_BAAN_WORD2=10
+# Lexical states for SCLEX_LISP
+lex Lisp=SCLEX_LISP SCE_LISP_
+val SCE_LISP_DEFAULT=0
+val SCE_LISP_COMMENT=1
+val SCE_LISP_NUMBER=2
+val SCE_LISP_KEYWORD=3
+val SCE_LISP_KEYWORD_KW=4
+val SCE_LISP_SYMBOL=5
+val SCE_LISP_STRING=6
+val SCE_LISP_STRINGEOL=8
+val SCE_LISP_IDENTIFIER=9
+val SCE_LISP_OPERATOR=10
+val SCE_LISP_SPECIAL=11
+val SCE_LISP_MULTI_COMMENT=12
+# Lexical states for SCLEX_EIFFEL and SCLEX_EIFFELKW
+lex Eiffel=SCLEX_EIFFEL SCE_EIFFEL_
+lex EiffelKW=SCLEX_EIFFELKW SCE_EIFFEL_
+val SCE_EIFFEL_DEFAULT=0
+val SCE_EIFFEL_COMMENTLINE=1
+val SCE_EIFFEL_NUMBER=2
+val SCE_EIFFEL_WORD=3
+val SCE_EIFFEL_STRING=4
+val SCE_EIFFEL_CHARACTER=5
+val SCE_EIFFEL_OPERATOR=6
+val SCE_EIFFEL_IDENTIFIER=7
+val SCE_EIFFEL_STRINGEOL=8
+# Lexical states for SCLEX_NNCRONTAB (nnCron crontab Lexer)
+lex NNCronTab=SCLEX_NNCRONTAB SCE_NNCRONTAB_
+val SCE_NNCRONTAB_DEFAULT=0
+val SCE_NNCRONTAB_COMMENT=1
+val SCE_NNCRONTAB_TASK=2
+val SCE_NNCRONTAB_SECTION=3
+val SCE_NNCRONTAB_KEYWORD=4
+val SCE_NNCRONTAB_MODIFIER=5
+val SCE_NNCRONTAB_ASTERISK=6
+val SCE_NNCRONTAB_NUMBER=7
+val SCE_NNCRONTAB_STRING=8
+val SCE_NNCRONTAB_ENVIRONMENT=9
+val SCE_NNCRONTAB_IDENTIFIER=10
+# Lexical states for SCLEX_FORTH (Forth Lexer)
+lex Forth=SCLEX_FORTH SCE_FORTH_
+val SCE_FORTH_DEFAULT=0
+val SCE_FORTH_COMMENT=1
+val SCE_FORTH_COMMENT_ML=2
+val SCE_FORTH_IDENTIFIER=3
+val SCE_FORTH_CONTROL=4
+val SCE_FORTH_KEYWORD=5
+val SCE_FORTH_DEFWORD=6
+val SCE_FORTH_PREWORD1=7
+val SCE_FORTH_PREWORD2=8
+val SCE_FORTH_NUMBER=9
+val SCE_FORTH_STRING=10
+val SCE_FORTH_LOCALE=11
+# Lexical states for SCLEX_MATLAB
+lex MatLab=SCLEX_MATLAB SCE_MATLAB_
+val SCE_MATLAB_DEFAULT=0
+val SCE_MATLAB_COMMENT=1
+val SCE_MATLAB_COMMAND=2
+val SCE_MATLAB_NUMBER=3
+val SCE_MATLAB_KEYWORD=4
+# single quoted string
+val SCE_MATLAB_STRING=5
+val SCE_MATLAB_OPERATOR=6
+val SCE_MATLAB_IDENTIFIER=7
+val SCE_MATLAB_DOUBLEQUOTESTRING=8
+# Lexical states for SCLEX_SCRIPTOL
+lex Sol=SCLEX_SCRIPTOL SCE_SCRIPTOL_
+val SCE_SCRIPTOL_DEFAULT=0
+val SCE_SCRIPTOL_WHITE=1
+val SCE_SCRIPTOL_COMMENTLINE=2
+val SCE_SCRIPTOL_PERSISTENT=3
+val SCE_SCRIPTOL_CSTYLE=4
+val SCE_SCRIPTOL_COMMENTBLOCK=5
+val SCE_SCRIPTOL_NUMBER=6
+val SCE_SCRIPTOL_STRING=7
+val SCE_SCRIPTOL_CHARACTER=8
+val SCE_SCRIPTOL_STRINGEOL=9
+val SCE_SCRIPTOL_KEYWORD=10
+val SCE_SCRIPTOL_OPERATOR=11
+val SCE_SCRIPTOL_IDENTIFIER=12
+val SCE_SCRIPTOL_TRIPLE=13
+val SCE_SCRIPTOL_CLASSNAME=14
+val SCE_SCRIPTOL_PREPROCESSOR=15
+# Lexical states for SCLEX_ASM
+lex Asm=SCLEX_ASM SCE_ASM_
+val SCE_ASM_DEFAULT=0
+val SCE_ASM_COMMENT=1
+val SCE_ASM_NUMBER=2
+val SCE_ASM_STRING=3
+val SCE_ASM_OPERATOR=4
+val SCE_ASM_IDENTIFIER=5
+val SCE_ASM_CPUINSTRUCTION=6
+val SCE_ASM_MATHINSTRUCTION=7
+val SCE_ASM_REGISTER=8
+val SCE_ASM_DIRECTIVE=9
+val SCE_ASM_DIRECTIVEOPERAND=10
+val SCE_ASM_COMMENTBLOCK=11
+val SCE_ASM_CHARACTER=12
+val SCE_ASM_STRINGEOL=13
+val SCE_ASM_EXTINSTRUCTION=14
+# Lexical states for SCLEX_FORTRAN
+lex Fortran=SCLEX_FORTRAN SCE_F_
+lex F77=SCLEX_F77 SCE_F_
+val SCE_F_DEFAULT=0
+val SCE_F_COMMENT=1
+val SCE_F_NUMBER=2
+val SCE_F_STRING1=3
+val SCE_F_STRING2=4
+val SCE_F_STRINGEOL=5
+val SCE_F_OPERATOR=6
+val SCE_F_IDENTIFIER=7
+val SCE_F_WORD=8
+val SCE_F_WORD2=9
+val SCE_F_WORD3=10
+val SCE_F_PREPROCESSOR=11
+val SCE_F_OPERATOR2=12
+val SCE_F_LABEL=13
+val SCE_F_CONTINUATION=14
+# Lexical states for SCLEX_CSS
+lex CSS=SCLEX_CSS SCE_CSS_
+val SCE_CSS_DEFAULT=0
+val SCE_CSS_TAG=1
+val SCE_CSS_CLASS=2
+val SCE_CSS_PSEUDOCLASS=3
+val SCE_CSS_UNKNOWN_PSEUDOCLASS=4
+val SCE_CSS_OPERATOR=5
+val SCE_CSS_IDENTIFIER=6
+val SCE_CSS_UNKNOWN_IDENTIFIER=7
+val SCE_CSS_VALUE=8
+val SCE_CSS_COMMENT=9
+val SCE_CSS_ID=10
+val SCE_CSS_IMPORTANT=11
+val SCE_CSS_DIRECTIVE=12
+val SCE_CSS_DOUBLESTRING=13
+val SCE_CSS_SINGLESTRING=14
+val SCE_CSS_IDENTIFIER2=15
+val SCE_CSS_ATTRIBUTE=16
+val SCE_CSS_IDENTIFIER3=17
+val SCE_CSS_PSEUDOELEMENT=18
+val SCE_CSS_EXTENDED_IDENTIFIER=19
+val SCE_CSS_EXTENDED_PSEUDOCLASS=20
+val SCE_CSS_EXTENDED_PSEUDOELEMENT=21
+# Lexical states for SCLEX_POV
+lex POV=SCLEX_POV SCE_POV_
+val SCE_POV_DEFAULT=0
+val SCE_POV_COMMENT=1
+val SCE_POV_COMMENTLINE=2
+val SCE_POV_NUMBER=3
+val SCE_POV_OPERATOR=4
+val SCE_POV_IDENTIFIER=5
+val SCE_POV_STRING=6
+val SCE_POV_STRINGEOL=7
+val SCE_POV_DIRECTIVE=8
+val SCE_POV_BADDIRECTIVE=9
+val SCE_POV_WORD2=10
+val SCE_POV_WORD3=11
+val SCE_POV_WORD4=12
+val SCE_POV_WORD5=13
+val SCE_POV_WORD6=14
+val SCE_POV_WORD7=15
+val SCE_POV_WORD8=16
+# Lexical states for SCLEX_LOUT
+lex LOUT=SCLEX_LOUT SCE_LOUT_
+val SCE_LOUT_DEFAULT=0
+val SCE_LOUT_COMMENT=1
+val SCE_LOUT_NUMBER=2
+val SCE_LOUT_WORD=3
+val SCE_LOUT_WORD2=4
+val SCE_LOUT_WORD3=5
+val SCE_LOUT_WORD4=6
+val SCE_LOUT_STRING=7
+val SCE_LOUT_OPERATOR=8
+val SCE_LOUT_IDENTIFIER=9
+val SCE_LOUT_STRINGEOL=10
+# Lexical states for SCLEX_ESCRIPT
+lex ESCRIPT=SCLEX_ESCRIPT SCE_ESCRIPT_
+val SCE_ESCRIPT_DEFAULT=0
+val SCE_ESCRIPT_COMMENT=1
+val SCE_ESCRIPT_COMMENTLINE=2
+val SCE_ESCRIPT_COMMENTDOC=3
+val SCE_ESCRIPT_NUMBER=4
+val SCE_ESCRIPT_WORD=5
+val SCE_ESCRIPT_STRING=6
+val SCE_ESCRIPT_OPERATOR=7
+val SCE_ESCRIPT_IDENTIFIER=8
+val SCE_ESCRIPT_BRACE=9
+val SCE_ESCRIPT_WORD2=10
+val SCE_ESCRIPT_WORD3=11
+# Lexical states for SCLEX_PS
+lex PS=SCLEX_PS SCE_PS_
+val SCE_PS_DEFAULT=0
+val SCE_PS_COMMENT=1
+val SCE_PS_DSC_COMMENT=2
+val SCE_PS_DSC_VALUE=3
+val SCE_PS_NUMBER=4
+val SCE_PS_NAME=5
+val SCE_PS_KEYWORD=6
+val SCE_PS_LITERAL=7
+val SCE_PS_IMMEVAL=8
+val SCE_PS_PAREN_ARRAY=9
+val SCE_PS_PAREN_DICT=10
+val SCE_PS_PAREN_PROC=11
+val SCE_PS_TEXT=12
+val SCE_PS_HEXSTRING=13
+val SCE_PS_BASE85STRING=14
+val SCE_PS_BADSTRINGCHAR=15
+# Lexical states for SCLEX_NSIS
+lex NSIS=SCLEX_NSIS SCE_NSIS_
+val SCE_NSIS_DEFAULT=0
+val SCE_NSIS_COMMENT=1
+val SCE_NSIS_STRINGDQ=2
+val SCE_NSIS_STRINGLQ=3
+val SCE_NSIS_STRINGRQ=4
+val SCE_NSIS_FUNCTION=5
+val SCE_NSIS_VARIABLE=6
+val SCE_NSIS_LABEL=7
+val SCE_NSIS_USERDEFINED=8
+val SCE_NSIS_SECTIONDEF=9
+val SCE_NSIS_SUBSECTIONDEF=10
+val SCE_NSIS_IFDEFINEDEF=11
+val SCE_NSIS_MACRODEF=12
+val SCE_NSIS_STRINGVAR=13
+val SCE_NSIS_NUMBER=14
+val SCE_NSIS_SECTIONGROUP=15
+val SCE_NSIS_PAGEEX=16
+val SCE_NSIS_FUNCTIONDEF=17
+val SCE_NSIS_COMMENTBOX=18
+# Lexical states for SCLEX_MMIXAL
+lex MMIXAL=SCLEX_MMIXAL SCE_MMIXAL_
+val SCE_MMIXAL_LEADWS=0
+val SCE_MMIXAL_COMMENT=1
+val SCE_MMIXAL_LABEL=2
+val SCE_MMIXAL_OPCODE=3
+val SCE_MMIXAL_OPCODE_PRE=4
+val SCE_MMIXAL_OPCODE_VALID=5
+val SCE_MMIXAL_OPCODE_UNKNOWN=6
+val SCE_MMIXAL_OPCODE_POST=7
+val SCE_MMIXAL_OPERANDS=8
+val SCE_MMIXAL_NUMBER=9
+val SCE_MMIXAL_REF=10
+val SCE_MMIXAL_CHAR=11
+val SCE_MMIXAL_STRING=12
+val SCE_MMIXAL_REGISTER=13
+val SCE_MMIXAL_HEX=14
+val SCE_MMIXAL_OPERATOR=15
+val SCE_MMIXAL_SYMBOL=16
+val SCE_MMIXAL_INCLUDE=17
+# Lexical states for SCLEX_CLW
+lex Clarion=SCLEX_CLW SCE_CLW_
+val SCE_CLW_DEFAULT=0
+val SCE_CLW_LABEL=1
+val SCE_CLW_COMMENT=2
+val SCE_CLW_STRING=3
+val SCE_CLW_USER_IDENTIFIER=4
+val SCE_CLW_INTEGER_CONSTANT=5
+val SCE_CLW_REAL_CONSTANT=6
+val SCE_CLW_PICTURE_STRING=7
+val SCE_CLW_KEYWORD=8
+val SCE_CLW_COMPILER_DIRECTIVE=9
+val SCE_CLW_RUNTIME_EXPRESSIONS=10
+val SCE_CLW_BUILTIN_PROCEDURES_FUNCTION=11
+val SCE_CLW_STRUCTURE_DATA_TYPE=12
+val SCE_CLW_ATTRIBUTE=13
+val SCE_CLW_STANDARD_EQUATE=14
+val SCE_CLW_ERROR=15
+val SCE_CLW_DEPRECATED=16
+# Lexical states for SCLEX_LOT
+lex LOT=SCLEX_LOT SCE_LOT_
+val SCE_LOT_DEFAULT=0
+val SCE_LOT_HEADER=1
+val SCE_LOT_BREAK=2
+val SCE_LOT_SET=3
+val SCE_LOT_PASS=4
+val SCE_LOT_FAIL=5
+val SCE_LOT_ABORT=6
+# Lexical states for SCLEX_YAML
+lex YAML=SCLEX_YAML SCE_YAML_
+val SCE_YAML_DEFAULT=0
+val SCE_YAML_COMMENT=1
+val SCE_YAML_IDENTIFIER=2
+val SCE_YAML_KEYWORD=3
+val SCE_YAML_NUMBER=4
+val SCE_YAML_REFERENCE=5
+val SCE_YAML_DOCUMENT=6
+val SCE_YAML_TEXT=7
+val SCE_YAML_ERROR=8
+val SCE_YAML_OPERATOR=9
+# Lexical states for SCLEX_TEX
+lex TeX=SCLEX_TEX SCE_TEX_
+val SCE_TEX_DEFAULT=0
+val SCE_TEX_SPECIAL=1
+val SCE_TEX_GROUP=2
+val SCE_TEX_SYMBOL=3
+val SCE_TEX_COMMAND=4
+val SCE_TEX_TEXT=5
+lex Metapost=SCLEX_METAPOST SCE_METAPOST_
+val SCE_METAPOST_DEFAULT=0
+val SCE_METAPOST_SPECIAL=1
+val SCE_METAPOST_GROUP=2
+val SCE_METAPOST_SYMBOL=3
+val SCE_METAPOST_COMMAND=4
+val SCE_METAPOST_TEXT=5
+val SCE_METAPOST_EXTRA=6
+# Lexical states for SCLEX_ERLANG
+lex Erlang=SCLEX_ERLANG SCE_ERLANG_
+val SCE_ERLANG_DEFAULT=0
+val SCE_ERLANG_COMMENT=1
+val SCE_ERLANG_VARIABLE=2
+val SCE_ERLANG_NUMBER=3
+val SCE_ERLANG_KEYWORD=4
+val SCE_ERLANG_STRING=5
+val SCE_ERLANG_OPERATOR=6
+val SCE_ERLANG_ATOM=7
+val SCE_ERLANG_FUNCTION_NAME=8
+val SCE_ERLANG_CHARACTER=9
+val SCE_ERLANG_MACRO=10
+val SCE_ERLANG_RECORD=11
+val SCE_ERLANG_SEPARATOR=12
+val SCE_ERLANG_NODE_NAME=13
+val SCE_ERLANG_UNKNOWN=31
+# Lexical states for SCLEX_OCTAVE are identical to MatLab
+lex Octave=SCLEX_OCTAVE SCE_MATLAB_
+# Lexical states for SCLEX_MSSQL
+lex MSSQL=SCLEX_MSSQL SCE_MSSQL_
+val SCE_MSSQL_DEFAULT=0
+val SCE_MSSQL_COMMENT=1
+val SCE_MSSQL_LINE_COMMENT=2
+val SCE_MSSQL_NUMBER=3
+val SCE_MSSQL_STRING=4
+val SCE_MSSQL_OPERATOR=5
+val SCE_MSSQL_IDENTIFIER=6
+val SCE_MSSQL_VARIABLE=7
+val SCE_MSSQL_COLUMN_NAME=8
+val SCE_MSSQL_STATEMENT=9
+val SCE_MSSQL_DATATYPE=10
+val SCE_MSSQL_SYSTABLE=11
+val SCE_MSSQL_GLOBAL_VARIABLE=12
+val SCE_MSSQL_FUNCTION=13
+val SCE_MSSQL_STORED_PROCEDURE=14
+val SCE_MSSQL_DEFAULT_PREF_DATATYPE=15
+val SCE_MSSQL_COLUMN_NAME_2=16
+# Lexical states for SCLEX_VERILOG
+lex Verilog=SCLEX_VERILOG SCE_V_
+val SCE_V_DEFAULT=0
+val SCE_V_COMMENT=1
+val SCE_V_COMMENTLINE=2
+val SCE_V_COMMENTLINEBANG=3
+val SCE_V_NUMBER=4
+val SCE_V_WORD=5
+val SCE_V_STRING=6
+val SCE_V_WORD2=7
+val SCE_V_WORD3=8
+val SCE_V_PREPROCESSOR=9
+val SCE_V_OPERATOR=10
+val SCE_V_IDENTIFIER=11
+val SCE_V_STRINGEOL=12
+val SCE_V_USER=19
+# Lexical states for SCLEX_KIX
+lex Kix=SCLEX_KIX SCE_KIX_
+val SCE_KIX_DEFAULT=0
+val SCE_KIX_COMMENT=1
+val SCE_KIX_STRING1=2
+val SCE_KIX_STRING2=3
+val SCE_KIX_NUMBER=4
+val SCE_KIX_VAR=5
+val SCE_KIX_MACRO=6
+val SCE_KIX_KEYWORD=7
+val SCE_KIX_FUNCTIONS=8
+val SCE_KIX_OPERATOR=9
+val SCE_KIX_IDENTIFIER=31
+# Lexical states for SCLEX_GUI4CLI
+val SCE_GC_DEFAULT=0
+val SCE_GC_COMMENTLINE=1
+val SCE_GC_COMMENTBLOCK=2
+val SCE_GC_GLOBAL=3
+val SCE_GC_EVENT=4
+val SCE_GC_ATTRIBUTE=5
+val SCE_GC_CONTROL=6
+val SCE_GC_COMMAND=7
+val SCE_GC_STRING=8
+val SCE_GC_OPERATOR=9
+# Lexical states for SCLEX_SPECMAN
+lex Specman=SCLEX_SPECMAN SCE_SN_
+val SCE_SN_DEFAULT=0
+val SCE_SN_CODE=1
+val SCE_SN_COMMENTLINE=2
+val SCE_SN_COMMENTLINEBANG=3
+val SCE_SN_NUMBER=4
+val SCE_SN_WORD=5
+val SCE_SN_STRING=6
+val SCE_SN_WORD2=7
+val SCE_SN_WORD3=8
+val SCE_SN_PREPROCESSOR=9
+val SCE_SN_OPERATOR=10
+val SCE_SN_IDENTIFIER=11
+val SCE_SN_STRINGEOL=12
+val SCE_SN_REGEXTAG=13
+val SCE_SN_SIGNAL=14
+val SCE_SN_USER=19
+# Lexical states for SCLEX_AU3
+lex Au3=SCLEX_AU3 SCE_AU3_
+val SCE_AU3_DEFAULT=0
+val SCE_AU3_COMMENT=1
+val SCE_AU3_COMMENTBLOCK=2
+val SCE_AU3_NUMBER=3
+val SCE_AU3_FUNCTION=4
+val SCE_AU3_KEYWORD=5
+val SCE_AU3_MACRO=6
+val SCE_AU3_STRING=7
+val SCE_AU3_OPERATOR=8
+val SCE_AU3_VARIABLE=9
+val SCE_AU3_SENT=10
+val SCE_AU3_PREPROCESSOR=11
+val SCE_AU3_SPECIAL=12
+val SCE_AU3_EXPAND=13
+val SCE_AU3_COMOBJ=14
+val SCE_AU3_UDF=15
+# Lexical states for SCLEX_APDL
+lex APDL=SCLEX_APDL SCE_APDL_
+val SCE_APDL_DEFAULT=0
+val SCE_APDL_COMMENT=1
+val SCE_APDL_COMMENTBLOCK=2
+val SCE_APDL_NUMBER=3
+val SCE_APDL_STRING=4
+val SCE_APDL_OPERATOR=5
+val SCE_APDL_WORD=6
+val SCE_APDL_PROCESSOR=7
+val SCE_APDL_COMMAND=8
+val SCE_APDL_SLASHCOMMAND=9
+val SCE_APDL_STARCOMMAND=10
+val SCE_APDL_ARGUMENT=11
+val SCE_APDL_FUNCTION=12
+# Lexical states for SCLEX_BASH
+lex Bash=SCLEX_BASH SCE_SH_
+val SCE_SH_DEFAULT=0
+val SCE_SH_ERROR=1
+val SCE_SH_COMMENTLINE=2
+val SCE_SH_NUMBER=3
+val SCE_SH_WORD=4
+val SCE_SH_STRING=5
+val SCE_SH_CHARACTER=6
+val SCE_SH_OPERATOR=7
+val SCE_SH_IDENTIFIER=8
+val SCE_SH_SCALAR=9
+val SCE_SH_PARAM=10
+val SCE_SH_BACKTICKS=11
+val SCE_SH_HERE_DELIM=12
+val SCE_SH_HERE_Q=13
+# Lexical states for SCLEX_ASN1
+lex Asn1=SCLEX_ASN1 SCE_ASN1_
+val SCE_ASN1_DEFAULT=0
+val SCE_ASN1_COMMENT=1
+val SCE_ASN1_IDENTIFIER=2
+val SCE_ASN1_STRING=3
+val SCE_ASN1_OID=4
+val SCE_ASN1_SCALAR=5
+val SCE_ASN1_KEYWORD=6
+val SCE_ASN1_ATTRIBUTE=7
+val SCE_ASN1_DESCRIPTOR=8
+val SCE_ASN1_TYPE=9
+val SCE_ASN1_OPERATOR=10
+# Lexical states for SCLEX_VHDL
+lex VHDL=SCLEX_VHDL SCE_VHDL_
+val SCE_VHDL_DEFAULT=0
+val SCE_VHDL_COMMENT=1
+val SCE_VHDL_COMMENTLINEBANG=2
+val SCE_VHDL_NUMBER=3
+val SCE_VHDL_STRING=4
+val SCE_VHDL_OPERATOR=5
+val SCE_VHDL_IDENTIFIER=6
+val SCE_VHDL_STRINGEOL=7
+val SCE_VHDL_KEYWORD=8
+val SCE_VHDL_STDOPERATOR=9
+val SCE_VHDL_ATTRIBUTE=10
+val SCE_VHDL_STDFUNCTION=11
+val SCE_VHDL_STDPACKAGE=12
+val SCE_VHDL_STDTYPE=13
+val SCE_VHDL_USERWORD=14
+# Lexical states for SCLEX_CAML
+lex Caml=SCLEX_CAML SCE_CAML_
+val SCE_CAML_DEFAULT=0
+val SCE_CAML_IDENTIFIER=1
+val SCE_CAML_TAGNAME=2
+val SCE_CAML_KEYWORD=3
+val SCE_CAML_KEYWORD2=4
+val SCE_CAML_KEYWORD3=5
+val SCE_CAML_LINENUM=6
+val SCE_CAML_OPERATOR=7
+val SCE_CAML_NUMBER=8
+val SCE_CAML_CHAR=9
+val SCE_CAML_STRING=11
+val SCE_CAML_COMMENT=12
+val SCE_CAML_COMMENT1=13
+val SCE_CAML_COMMENT2=14
+val SCE_CAML_COMMENT3=15
+# Lexical states for SCLEX_HASKELL
+lex Haskell=SCLEX_HASKELL SCE_HA_
+val SCE_HA_DEFAULT=0
+val SCE_HA_IDENTIFIER=1
+val SCE_HA_KEYWORD=2
+val SCE_HA_NUMBER=3
+val SCE_HA_STRING=4
+val SCE_HA_CHARACTER=5
+val SCE_HA_CLASS=6
+val SCE_HA_MODULE=7
+val SCE_HA_CAPITAL=8
+val SCE_HA_DATA=9
+val SCE_HA_IMPORT=10
+val SCE_HA_OPERATOR=11
+val SCE_HA_INSTANCE=12
+val SCE_HA_COMMENTLINE=13
+val SCE_HA_COMMENTBLOCK=14
+val SCE_HA_COMMENTBLOCK2=15
+val SCE_HA_COMMENTBLOCK3=16
+# Lexical states of SCLEX_TADS3
+lex TADS3=SCLEX_TADS3 SCE_T3_
+val SCE_T3_DEFAULT=0
+val SCE_T3_X_DEFAULT=1
+val SCE_T3_PREPROCESSOR=2
+val SCE_T3_BLOCK_COMMENT=3
+val SCE_T3_LINE_COMMENT=4
+val SCE_T3_OPERATOR=5
+val SCE_T3_KEYWORD=6
+val SCE_T3_NUMBER=7
+val SCE_T3_IDENTIFIER=8
+val SCE_T3_S_STRING=9
+val SCE_T3_D_STRING=10
+val SCE_T3_X_STRING=11
+val SCE_T3_LIB_DIRECTIVE=12
+val SCE_T3_MSG_PARAM=13
+val SCE_T3_HTML_TAG=14
+val SCE_T3_HTML_DEFAULT=15
+val SCE_T3_HTML_STRING=16
+val SCE_T3_USER1=17
+val SCE_T3_USER2=18
+val SCE_T3_USER3=19
+val SCE_T3_BRACE=20
+# Lexical states for SCLEX_REBOL
+lex Rebol=SCLEX_REBOL SCE_REBOL_
+val SCE_REBOL_DEFAULT=0
+val SCE_REBOL_COMMENTLINE=1
+val SCE_REBOL_COMMENTBLOCK=2
+val SCE_REBOL_PREFACE=3
+val SCE_REBOL_OPERATOR=4
+val SCE_REBOL_CHARACTER=5
+val SCE_REBOL_QUOTEDSTRING=6
+val SCE_REBOL_BRACEDSTRING=7
+val SCE_REBOL_NUMBER=8
+val SCE_REBOL_PAIR=9
+val SCE_REBOL_TUPLE=10
+val SCE_REBOL_BINARY=11
+val SCE_REBOL_MONEY=12
+val SCE_REBOL_ISSUE=13
+val SCE_REBOL_TAG=14
+val SCE_REBOL_FILE=15
+val SCE_REBOL_EMAIL=16
+val SCE_REBOL_URL=17
+val SCE_REBOL_DATE=18
+val SCE_REBOL_TIME=19
+val SCE_REBOL_IDENTIFIER=20
+val SCE_REBOL_WORD=21
+val SCE_REBOL_WORD2=22
+val SCE_REBOL_WORD3=23
+val SCE_REBOL_WORD4=24
+val SCE_REBOL_WORD5=25
+val SCE_REBOL_WORD6=26
+val SCE_REBOL_WORD7=27
+val SCE_REBOL_WORD8=28
+# Lexical states for SCLEX_SQL
+lex SQL=SCLEX_SQL SCE_SQL_
+val SCE_SQL_DEFAULT=0
+val SCE_SQL_COMMENT=1
+val SCE_SQL_COMMENTLINE=2
+val SCE_SQL_COMMENTDOC=3
+val SCE_SQL_NUMBER=4
+val SCE_SQL_WORD=5
+val SCE_SQL_STRING=6
+val SCE_SQL_CHARACTER=7
+val SCE_SQL_SQLPLUS=8
+val SCE_SQL_SQLPLUS_PROMPT=9
+val SCE_SQL_OPERATOR=10
+val SCE_SQL_IDENTIFIER=11
+val SCE_SQL_SQLPLUS_COMMENT=13
+val SCE_SQL_COMMENTLINEDOC=15
+val SCE_SQL_WORD2=16
+val SCE_SQL_COMMENTDOCKEYWORD=17
+val SCE_SQL_COMMENTDOCKEYWORDERROR=18
+val SCE_SQL_USER1=19
+val SCE_SQL_USER2=20
+val SCE_SQL_USER3=21
+val SCE_SQL_USER4=22
+val SCE_SQL_QUOTEDIDENTIFIER=23
+# Lexical states for SCLEX_SMALLTALK
+lex Smalltalk=SCLEX_SMALLTALK SCE_ST_
+val SCE_ST_DEFAULT=0
+val SCE_ST_STRING=1
+val SCE_ST_NUMBER=2
+val SCE_ST_COMMENT=3
+val SCE_ST_SYMBOL=4
+val SCE_ST_BINARY=5
+val SCE_ST_BOOL=6
+val SCE_ST_SELF=7
+val SCE_ST_SUPER=8
+val SCE_ST_NIL=9
+val SCE_ST_GLOBAL=10
+val SCE_ST_RETURN=11
+val SCE_ST_SPECIAL=12
+val SCE_ST_KWSEND=13
+val SCE_ST_ASSIGN=14
+val SCE_ST_CHARACTER=15
+val SCE_ST_SPEC_SEL=16
+# Lexical states for SCLEX_FLAGSHIP (clipper)
+lex FlagShip=SCLEX_FLAGSHIP SCE_B_
+val SCE_FS_DEFAULT=0
+val SCE_FS_COMMENT=1
+val SCE_FS_COMMENTLINE=2
+val SCE_FS_COMMENTDOC=3
+val SCE_FS_COMMENTLINEDOC=4
+val SCE_FS_COMMENTDOCKEYWORD=5
+val SCE_FS_COMMENTDOCKEYWORDERROR=6
+val SCE_FS_KEYWORD=7
+val SCE_FS_KEYWORD2=8
+val SCE_FS_KEYWORD3=9
+val SCE_FS_KEYWORD4=10
+val SCE_FS_NUMBER=11
+val SCE_FS_STRING=12
+val SCE_FS_PREPROCESSOR=13
+val SCE_FS_OPERATOR=14
+val SCE_FS_IDENTIFIER=15
+val SCE_FS_DATE=16
+val SCE_FS_STRINGEOL=17
+val SCE_FS_CONSTANT=18
+val SCE_FS_ASM=19
+val SCE_FS_LABEL=20
+val SCE_FS_ERROR=21
+val SCE_FS_HEXNUMBER=22
+val SCE_FS_BINNUMBER=23
+# Lexical states for SCLEX_CSOUND
+lex Csound=SCLEX_CSOUND SCE_CSOUND_
+val SCE_CSOUND_DEFAULT=0
+val SCE_CSOUND_COMMENT=1
+val SCE_CSOUND_NUMBER=2
+val SCE_CSOUND_OPERATOR=3
+val SCE_CSOUND_INSTR=4
+val SCE_CSOUND_IDENTIFIER=5
+val SCE_CSOUND_OPCODE=6
+val SCE_CSOUND_HEADERSTMT=7
+val SCE_CSOUND_USERKEYWORD=8
+val SCE_CSOUND_COMMENTBLOCK=9
+val SCE_CSOUND_PARAM=10
+val SCE_CSOUND_ARATE_VAR=11
+val SCE_CSOUND_KRATE_VAR=12
+val SCE_CSOUND_IRATE_VAR=13
+val SCE_CSOUND_GLOBAL_VAR=14
+val SCE_CSOUND_STRINGEOL=15
+# Lexical states for SCLEX_INNOSETUP
+lex Inno=SCLEX_INNOSETUP SCE_INNO_
+val SCE_INNO_DEFAULT=0
+val SCE_INNO_COMMENT=1
+val SCE_INNO_KEYWORD=2
+val SCE_INNO_PARAMETER=3
+val SCE_INNO_SECTION=4
+val SCE_INNO_PREPROC=5
+val SCE_INNO_PREPROC_INLINE=6
+val SCE_INNO_COMMENT_PASCAL=7
+val SCE_INNO_KEYWORD_PASCAL=8
+val SCE_INNO_KEYWORD_USER=9
+val SCE_INNO_STRING_DOUBLE=10
+val SCE_INNO_STRING_SINGLE=11
+val SCE_INNO_IDENTIFIER=12
+# Lexical states for SCLEX_OPAL
+lex Opal=SCLEX_OPAL SCE_OPAL_
+val SCE_OPAL_SPACE=0
+val SCE_OPAL_COMMENT_BLOCK=1
+val SCE_OPAL_COMMENT_LINE=2
+val SCE_OPAL_INTEGER=3
+val SCE_OPAL_KEYWORD=4
+val SCE_OPAL_SORT=5
+val SCE_OPAL_STRING=6
+val SCE_OPAL_PAR=7
+val SCE_OPAL_BOOL_CONST=8
+val SCE_OPAL_DEFAULT=32
+# Lexical states for SCLEX_SPICE
+lex Spice=SCLEX_SPICE SCE_SPICE_
+val SCE_SPICE_DEFAULT=0
+val SCE_SPICE_IDENTIFIER=1
+val SCE_SPICE_KEYWORD=2
+val SCE_SPICE_KEYWORD2=3
+val SCE_SPICE_KEYWORD3=4
+val SCE_SPICE_NUMBER=5
+val SCE_SPICE_DELIMITER=6
+val SCE_SPICE_VALUE=7
+val SCE_SPICE_COMMENTLINE=8
+# Lexical states for SCLEX_CMAKE
+lex CMAKE=SCLEX_CMAKE SCE_CMAKE_
+val SCE_CMAKE_DEFAULT=0
+val SCE_CMAKE_COMMENT=1
+val SCE_CMAKE_STRINGDQ=2
+val SCE_CMAKE_STRINGLQ=3
+val SCE_CMAKE_STRINGRQ=4
+val SCE_CMAKE_COMMANDS=5
+val SCE_CMAKE_PARAMETERS=6
+val SCE_CMAKE_VARIABLE=7
+val SCE_CMAKE_USERDEFINED=8
+val SCE_CMAKE_WHILEDEF=9
+val SCE_CMAKE_FOREACHDEF=10
+val SCE_CMAKE_IFDEFINEDEF=11
+val SCE_CMAKE_MACRODEF=12
+val SCE_CMAKE_STRINGVAR=13
+val SCE_CMAKE_NUMBER=14
+# Lexical states for SCLEX_GAP
+lex Gap=SCLEX_GAP SCE_GAP_
+val SCE_GAP_DEFAULT=0
+val SCE_GAP_IDENTIFIER=1
+val SCE_GAP_KEYWORD=2
+val SCE_GAP_KEYWORD2=3
+val SCE_GAP_KEYWORD3=4
+val SCE_GAP_KEYWORD4=5
+val SCE_GAP_STRING=6
+val SCE_GAP_CHAR=7
+val SCE_GAP_OPERATOR=8
+val SCE_GAP_COMMENT=9
+val SCE_GAP_NUMBER=10
+val SCE_GAP_STRINGEOL=11
+# Lexical state for SCLEX_PLM
+lex PLM=SCLEX_PLM SCE_PLM_
+val SCE_PLM_DEFAULT=0
+val SCE_PLM_COMMENT=1
+val SCE_PLM_STRING=2
+val SCE_PLM_NUMBER=3
+val SCE_PLM_IDENTIFIER=4
+val SCE_PLM_OPERATOR=5
+val SCE_PLM_CONTROL=6
+val SCE_PLM_KEYWORD=7
+# Lexical state for SCLEX_PROGRESS
+lex Progress=SCLEX_PROGRESS SCE_4GL_
+val SCE_4GL_DEFAULT=0
+val SCE_4GL_NUMBER=1
+val SCE_4GL_WORD=2
+val SCE_4GL_STRING=3
+val SCE_4GL_CHARACTER=4
+val SCE_4GL_PREPROCESSOR=5
+val SCE_4GL_OPERATOR=6
+val SCE_4GL_IDENTIFIER=7
+val SCE_4GL_BLOCK=8
+val SCE_4GL_END=9
+val SCE_4GL_COMMENT1=10
+val SCE_4GL_COMMENT2=11
+val SCE_4GL_COMMENT3=12
+val SCE_4GL_COMMENT4=13
+val SCE_4GL_COMMENT5=14
+val SCE_4GL_COMMENT6=15
+val SCE_4GL_DEFAULT_=16
+val SCE_4GL_NUMBER_=17
+val SCE_4GL_WORD_=18
+val SCE_4GL_STRING_=19
+val SCE_4GL_CHARACTER_=20
+val SCE_4GL_PREPROCESSOR_=21
+val SCE_4GL_OPERATOR_=22
+val SCE_4GL_IDENTIFIER_=23
+val SCE_4GL_BLOCK_=24
+val SCE_4GL_END_=25
+val SCE_4GL_COMMENT1_=26
+val SCE_4GL_COMMENT2_=27
+val SCE_4GL_COMMENT3_=28
+val SCE_4GL_COMMENT4_=29
+val SCE_4GL_COMMENT5_=30
+val SCE_4GL_COMMENT6_=31
+# Lexical states for SCLEX_ABAQUS
+lex ABAQUS=SCLEX_ABAQUS SCE_ABAQUS_
+val SCE_ABAQUS_DEFAULT=0
+val SCE_ABAQUS_COMMENT=1
+val SCE_ABAQUS_COMMENTBLOCK=2
+val SCE_ABAQUS_NUMBER=3
+val SCE_ABAQUS_STRING=4
+val SCE_ABAQUS_OPERATOR=5
+val SCE_ABAQUS_WORD=6
+val SCE_ABAQUS_PROCESSOR=7
+val SCE_ABAQUS_COMMAND=8
+val SCE_ABAQUS_SLASHCOMMAND=9
+val SCE_ABAQUS_STARCOMMAND=10
+val SCE_ABAQUS_ARGUMENT=11
+val SCE_ABAQUS_FUNCTION=12
+# Lexical states for SCLEX_ASYMPTOTE
+lex Asymptote=SCLEX_ASYMPTOTE SCE_ASY_
+val SCE_ASY_DEFAULT=0
+val SCE_ASY_COMMENT=1
+val SCE_ASY_COMMENTLINE=2
+val SCE_ASY_NUMBER=3
+val SCE_ASY_WORD=4
+val SCE_ASY_STRING=5
+val SCE_ASY_CHARACTER=6
+val SCE_ASY_OPERATOR=7
+val SCE_ASY_IDENTIFIER=8
+val SCE_ASY_STRINGEOL=9
+val SCE_ASY_COMMENTLINEDOC=10
+val SCE_ASY_WORD2=11
+# Lexical states for SCLEX_R
+lex R=SCLEX_R SCE_R_
+val SCE_R_DEFAULT=0
+val SCE_R_COMMENT=1
+val SCE_R_KWORD=2
+val SCE_R_BASEKWORD=3
+val SCE_R_OTHERKWORD=4
+val SCE_R_NUMBER=5
+val SCE_R_STRING=6
+val SCE_R_STRING2=7
+val SCE_R_OPERATOR=8
+val SCE_R_IDENTIFIER=9
+val SCE_R_INFIX=10
+val SCE_R_INFIXEOL=11
+# Lexical state for SCLEX_MAGIKSF
+lex MagikSF=SCLEX_MAGIKSF SCE_MAGIK_
+val SCE_MAGIK_DEFAULT=0
+val SCE_MAGIK_COMMENT=1
+val SCE_MAGIK_HYPER_COMMENT=16
+val SCE_MAGIK_STRING=2
+val SCE_MAGIK_CHARACTER=3
+val SCE_MAGIK_NUMBER=4
+val SCE_MAGIK_IDENTIFIER=5
+val SCE_MAGIK_OPERATOR=6
+val SCE_MAGIK_FLOW=7
+val SCE_MAGIK_CONTAINER=8
+val SCE_MAGIK_BRACKET_BLOCK=9
+val SCE_MAGIK_BRACE_BLOCK=10
+val SCE_MAGIK_SQBRACKET_BLOCK=11
+val SCE_MAGIK_UNKNOWN_KEYWORD=12
+val SCE_MAGIK_KEYWORD=13
+val SCE_MAGIK_PRAGMA=14
+val SCE_MAGIK_SYMBOL=15
+# Lexical state for SCLEX_POWERSHELL
+lex PowerShell=SCLEX_POWERSHELL SCE_POWERSHELL_
+val SCE_POWERSHELL_DEFAULT=0
+val SCE_POWERSHELL_COMMENT=1
+val SCE_POWERSHELL_STRING=2
+val SCE_POWERSHELL_CHARACTER=3
+val SCE_POWERSHELL_NUMBER=4
+val SCE_POWERSHELL_VARIABLE=5
+val SCE_POWERSHELL_OPERATOR=6
+val SCE_POWERSHELL_IDENTIFIER=7
+val SCE_POWERSHELL_KEYWORD=8
+val SCE_POWERSHELL_CMDLET=9
+val SCE_POWERSHELL_ALIAS=10
+# Lexical state for SCLEX_MYSQL
+lex MySQL=SCLEX_MYSQL SCE_MYSQL_
+val SCE_MYSQL_DEFAULT=0
+val SCE_MYSQL_COMMENT=1
+val SCE_MYSQL_COMMENTLINE=2
+val SCE_MYSQL_VARIABLE=3
+val SCE_MYSQL_SYSTEMVARIABLE=4
+val SCE_MYSQL_KNOWNSYSTEMVARIABLE=5
+val SCE_MYSQL_NUMBER=6
+val SCE_MYSQL_MAJORKEYWORD=7
+val SCE_MYSQL_KEYWORD=8
+val SCE_MYSQL_DATABASEOBJECT=9
+val SCE_MYSQL_PROCEDUREKEYWORD=10
+val SCE_MYSQL_STRING=11
+val SCE_MYSQL_SQSTRING=12
+val SCE_MYSQL_DQSTRING=13
+val SCE_MYSQL_OPERATOR=14
+val SCE_MYSQL_FUNCTION=15
+val SCE_MYSQL_IDENTIFIER=16
+val SCE_MYSQL_QUOTEDIDENTIFIER=17
+val SCE_MYSQL_USER1=18
+val SCE_MYSQL_USER2=19
+val SCE_MYSQL_USER3=20
+# Lexical state for SCLEX_PO
+lex Po=SCLEX_PO SCE_PO_
+val SCE_PO_DEFAULT=0
+val SCE_PO_COMMENT=1
+val SCE_PO_MSGID=2
+val SCE_PO_MSGID_TEXT=3
+val SCE_PO_MSGSTR=4
+val SCE_PO_MSGSTR_TEXT=5
+val SCE_PO_MSGCTXT=6
+val SCE_PO_MSGCTXT_TEXT=7
+val SCE_PO_FUZZY=8
+
+# Events
+
+evt void StyleNeeded=2000(int position)
+evt void CharAdded=2001(int ch)
+evt void SavePointReached=2002(void)
+evt void SavePointLeft=2003(void)
+evt void ModifyAttemptRO=2004(void)
+# GTK+ Specific to work around focus and accelerator problems:
+evt void Key=2005(int ch, int modifiers)
+evt void DoubleClick=2006(void)
+evt void UpdateUI=2007(void)
+evt void Modified=2008(int position, int modificationType, string text, int length, int linesAdded, int line, int foldLevelNow, int foldLevelPrev)
+evt void MacroRecord=2009(int message, int wParam, int lParam)
+evt void MarginClick=2010(int modifiers, int position, int margin)
+evt void NeedShown=2011(int position, int length)
+evt void Painted=2013(void)
+evt void UserListSelection=2014(int listType, string text)
+evt void URIDropped=2015(string text)
+evt void DwellStart=2016(int position)
+evt void DwellEnd=2017(int position)
+evt void Zoom=2018(void)
+evt void HotSpotClick=2019(int modifiers, int position)
+evt void HotSpotDoubleClick=2020(int modifiers, int position)
+evt void CallTipClick=2021(int position)
+evt void AutoCSelection=2022(string text)
+evt void IndicatorClick=2023(int modifiers, int position)
+evt void IndicatorRelease=2024(int modifiers, int position)
+evt void AutoCCancelled=2025(void)
+
+cat Deprecated
+
+# CARET_POLICY changed in 1.47
+fun void SetCaretPolicy=2369(int caretPolicy, int caretSlop)
+val CARET_CENTER=0x02
+val CARET_XEVEN=0x08
+val CARET_XJUMPS=0x10
+
+# The old name for SCN_UPDATEUI
+val SCN_CHECKBRACE=2007
+evt void PosChanged=2012(int position)
+
+# SCLEX_HTML should be used in preference to these.
+val SCLEX_ASP=29
+val SCLEX_PHP=30

Added: trunk/plugins/scintilla/scintilla/include/ScintillaWidget.h
==============================================================================
--- (empty file)
+++ trunk/plugins/scintilla/scintilla/include/ScintillaWidget.h	Wed Apr  8 07:16:46 2009
@@ -0,0 +1,59 @@
+// Scintilla source code edit control
+/** @file ScintillaWidget.h
+ ** Definition of Scintilla widget for GTK+.
+ ** Only needed by GTK+ code but is harmless on other platforms.
+ **/
+// Copyright 1998-2001 by Neil Hodgson <neilh scintilla org>
+// The License.txt file describes the conditions under which this software may be distributed.
+
+#ifndef SCINTILLAWIDGET_H
+#define SCINTILLAWIDGET_H
+
+#if PLAT_GTK
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define SCINTILLA(obj)          G_TYPE_CHECK_INSTANCE_CAST (obj, scintilla_get_type (), ScintillaObject)
+#define SCINTILLA_CLASS(klass)  G_TYPE_CHECK_CLASS_CAST (klass, scintilla_get_type (), ScintillaClass)
+#define IS_SCINTILLA(obj)       G_TYPE_CHECK_INSTANCE_TYPE (obj, scintilla_get_type ())
+
+typedef struct _ScintillaObject ScintillaObject;
+typedef struct _ScintillaClass  ScintillaClass;
+
+struct _ScintillaObject {
+	GtkContainer cont;
+	void *pscin;
+};
+
+struct _ScintillaClass {
+	GtkContainerClass parent_class;
+
+	void (* command) (ScintillaObject *ttt);
+	void (* notify) (ScintillaObject *ttt);
+};
+
+#if GLIB_MAJOR_VERSION < 2
+GtkType		scintilla_get_type	(void);
+#else
+GType		scintilla_get_type	(void);
+#endif
+GtkWidget*	scintilla_new		(void);
+void		scintilla_set_id	(ScintillaObject *sci, uptr_t id);
+sptr_t		scintilla_send_message	(ScintillaObject *sci,unsigned int iMessage, uptr_t wParam, sptr_t lParam);
+void		scintilla_release_resources(void);
+
+#if GTK_MAJOR_VERSION < 2
+#define SCINTILLA_NOTIFY "notify"
+#else
+#define SCINTILLA_NOTIFY "sci-notify"
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
+#endif

Added: trunk/plugins/scintilla/scintilla/include/WindowAccessor.h
==============================================================================
--- (empty file)
+++ trunk/plugins/scintilla/scintilla/include/WindowAccessor.h	Wed Apr  8 07:16:46 2009
@@ -0,0 +1,66 @@
+// Scintilla source code edit control
+/** @file WindowAccessor.h
+ ** Implementation of BufferAccess and StylingAccess on a Scintilla
+ ** rapid easy access to contents of a Scintilla.
+ **/
+// Copyright 1998-2001 by Neil Hodgson <neilh scintilla org>
+// The License.txt file describes the conditions under which this software may be distributed.
+
+#ifdef SCI_NAMESPACE
+namespace Scintilla {
+#endif
+
+/**
+ */
+class WindowAccessor : public Accessor {
+	// Private so WindowAccessor objects can not be copied
+	WindowAccessor(const WindowAccessor &source) : Accessor(), props(source.props) {}
+	WindowAccessor &operator=(const WindowAccessor &) { return *this; }
+protected:
+	WindowID id;
+	PropSet &props;
+	int lenDoc;
+
+	char styleBuf[bufferSize];
+	int validLen;
+	char chFlags;
+	char chWhile;
+	unsigned int startSeg;
+
+	bool InternalIsLeadByte(char ch);
+	void Fill(int position);
+public:
+	WindowAccessor(WindowID id_, PropSet &props_) : 
+		Accessor(), id(id_), props(props_), 
+		lenDoc(-1), validLen(0), chFlags(0), chWhile(0) {
+	}
+	~WindowAccessor();
+	bool Match(int pos, const char *s);
+	char StyleAt(int position);
+	int GetLine(int position);
+	int LineStart(int line);
+	int LevelAt(int line);
+	int Length();
+	void Flush();
+	int GetLineState(int line);
+	int SetLineState(int line, int state);
+	int GetPropertyInt(const char *key, int defaultValue=0) { 
+		return props.GetInt(key, defaultValue); 
+	}
+	char *GetProperties() {
+		return props.ToString();
+	}
+
+	void StartAt(unsigned int start, char chMask=31);
+	void SetFlags(char chFlags_, char chWhile_) {chFlags = chFlags_; chWhile = chWhile_; };
+	unsigned int GetStartSegment() { return startSeg; }
+	void StartSegment(unsigned int pos);
+	void ColourTo(unsigned int pos, int chAttr);
+	void SetLevel(int line, int level);
+	int IndentAmount(int line, int *flags, PFNIsCommentLeader pfnIsCommentLeader = 0);
+	void IndicatorFill(int start, int end, int indicator, int value);
+};
+
+#ifdef SCI_NAMESPACE
+}
+#endif

Added: trunk/plugins/scintilla/text-editor-iterable.h
==============================================================================
--- (empty file)
+++ trunk/plugins/scintilla/text-editor-iterable.h	Wed Apr  8 07:16:46 2009
@@ -0,0 +1,57 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * text-editor-iterable.h
+ * Copyright (C) 2000  Kh. Naba Kumar Singh
+ * 
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+#ifndef _TEXT_EDITOR_ITERABLE_H_
+#define _TEXT_EDITOR_ITERABLE_H_
+
+#include <glib.h>
+#include "text_editor.h"
+
+G_BEGIN_DECLS
+
+#define TYPE_TEXT_EDITOR_CELL        (text_editor_cell_get_type ())
+#define TEXT_EDITOR_CELL(o)          (G_TYPE_CHECK_INSTANCE_CAST ((o), TYPE_TEXT_EDITOR_CELL, TextEditorCell))
+#define TEXT_EDITOR_CELL_CLASS(k)    (G_TYPE_CHECK_CLASS_CAST((k), TYPE_TEXT_EDITOR_CELL, TextEditorCellClass))
+#define IS_TEXT_EDITOR_CELL(o)       (G_TYPE_CHECK_INSTANCE_TYPE ((o), TYPE_TEXT_EDITOR_CELL))
+#define IS_TEXT_EDITOR_CELL_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), TYPE_TEXT_EDITOR_CELL))
+
+typedef struct _TextEditorCellPrivate TextEditorCellPrivate;
+
+typedef struct _TextEditorCell
+{
+	GObject parent;
+	TextEditorCellPrivate *priv;
+} TextEditorCell;
+
+typedef struct _TextEditorCellClass
+{
+	GObjectClass parent_class;
+} TextEditorCellClass;
+
+GType text_editor_cell_get_type (void);
+
+/* New instance of TextEditorCell */
+TextEditorCell* text_editor_cell_new (TextEditor *editor, gint position);
+TextEditor *text_editor_cell_get_editor (TextEditorCell *iter);
+void text_editor_cell_set_position (TextEditorCell *iter, gint position);
+gint text_editor_cell_get_position (TextEditorCell *iter);
+
+G_END_DECLS
+
+#endif /* _TEXT_EDITOR_ITERABLE_H_ */

Added: trunk/plugins/scintilla/text_editor.c
==============================================================================
--- (empty file)
+++ trunk/plugins/scintilla/text_editor.c	Wed Apr  8 07:16:46 2009
@@ -0,0 +1,3713 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * text_editor.c
+ * Copyright (C) 2000 - 2004  Naba Kumar
+ * 
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
+#include <sys/wait.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <string.h>
+#include <stdlib.h>
+#include <ctype.h>
+#include <gio/gio.h>
+#include <gtk/gtk.h>
+#include <gdk/gdk.h>
+#include <errno.h>
+
+#include <libanjuta/resources.h>
+#include <libanjuta/anjuta-utils.h>
+#include <libanjuta/anjuta-encodings.h>
+#include <libanjuta/anjuta-convert.h>
+#include <libanjuta/anjuta-debug.h>
+#include <libanjuta/anjuta-message-area.h>
+#include <libanjuta/anjuta-shell.h>
+#include <libanjuta/interfaces/ianjuta-document-manager.h>
+#include <libanjuta/interfaces/ianjuta-editor.h>
+#include <libanjuta/interfaces/ianjuta-editor-selection.h>
+#include <libanjuta/interfaces/ianjuta-editor-convert.h>
+#include <libanjuta/interfaces/ianjuta-editor-line-mode.h>
+#include <libanjuta/interfaces/ianjuta-editor-view.h>
+#include <libanjuta/interfaces/ianjuta-editor-folds.h>
+#include <libanjuta/interfaces/ianjuta-editor-comment.h>
+#include <libanjuta/interfaces/ianjuta-editor-zoom.h>
+#include <libanjuta/interfaces/ianjuta-editor-goto.h>
+#include <libanjuta/interfaces/ianjuta-editor-language.h>
+#include <libanjuta/interfaces/ianjuta-editor-assist.h>
+#include <libanjuta/interfaces/ianjuta-editor-search.h>
+#include <libanjuta/interfaces/ianjuta-editor-hover.h>
+#include <libanjuta/interfaces/ianjuta-editor-factory.h>
+#include <libanjuta/interfaces/ianjuta-file.h>
+#include <libanjuta/interfaces/ianjuta-file-savable.h>
+#include <libanjuta/interfaces/ianjuta-markable.h>
+#include <libanjuta/interfaces/ianjuta-indicable.h>
+#include <libanjuta/interfaces/ianjuta-print.h>
+#include <libanjuta/interfaces/ianjuta-document.h>
+
+#include "properties.h"
+#include "text_editor.h"
+#include "text_editor_cbs.h"
+#include "text-editor-iterable.h"
+#include "print.h"
+
+#define GTK
+#undef PLAT_GTK
+#define PLAT_GTK 1
+#include "Scintilla.h"
+#include "SciLexer.h"
+#include "ScintillaWidget.h"
+
+#include "lexer.h"
+#include "aneditor.h"
+#include "text_editor_prefs.h"
+
+/* Order is important, as marker with the lowest number is drawn first */
+#define TEXT_EDITOR_BOOKMARK                0
+#define TEXT_EDITOR_BREAKPOINT_DISABLED     1
+#define TEXT_EDITOR_BREAKPOINT_ENABLED      2
+#define TEXT_EDITOR_PROGRAM_COUNTER         3
+#define TEXT_EDITOR_LINEMARKER              4
+
+/* Include marker pixmaps */
+#include "anjuta-bookmark-16.xpm"
+#include "anjuta-breakpoint-disabled-16.xpm"
+#include "anjuta-breakpoint-enabled-16.xpm"
+#include "anjuta-pcmark-16.xpm"
+#include "anjuta-linemark-16.xpm"
+
+static gchar** marker_pixmap[] = 
+{
+	anjuta_bookmark_16_xpm,
+	anjuta_breakpoint_disabled_16_xpm,
+	anjuta_breakpoint_enabled_16_xpm,
+	anjuta_pcmark_16_xpm,
+	anjuta_linemark_16_xpm,
+	NULL
+};
+
+/* Editor language supports */
+static GList *supported_languages = NULL;
+static GHashTable *supported_languages_name = NULL;
+static GHashTable *supported_languages_ext = NULL;
+static GHashTable *supported_languages_by_lexer = NULL;
+
+static void text_editor_finalize (GObject *obj);
+static void text_editor_dispose (GObject *obj);
+static void text_editor_hilite_one (TextEditor * te, AnEditorID editor,
+									gboolean force);
+
+static GtkVBoxClass *parent_class;
+
+static void
+text_editor_instance_init (TextEditor *te)
+{
+	te->filename = NULL;
+	te->uri = NULL;
+	te->views = NULL;
+	te->popup_menu = NULL;
+	
+	te->monitor = NULL;
+	te->preferences = NULL;
+	te->force_hilite = NULL;
+	te->freeze_count = 0;
+	te->current_line = 0;
+	te->popup_menu = NULL;
+	te->props_base = 0;
+	te->first_time_expose = TRUE;
+	te->encoding = NULL;
+	te->notify_ids = NULL;
+	te->hover_tip_on = FALSE;
+	te->last_saved_content = NULL;
+	te->force_not_saved = FALSE;
+	te->message_area = NULL;
+}
+
+static void
+text_editor_class_init (TextEditorClass *klass)
+{
+	GObjectClass *object_class = G_OBJECT_CLASS (klass);
+	
+	parent_class = g_type_class_peek_parent (klass);
+	object_class->finalize = text_editor_finalize;
+	object_class->dispose = text_editor_dispose;
+}
+
+#if 0
+static void
+check_tm_file(TextEditor *te)
+{
+	if (NULL == te->tm_file)
+	{
+		// FIXME:
+		// te->tm_file = tm_workspace_find_object(
+		  //TM_WORK_OBJECT(app->tm_workspace), te->uri, FALSE);
+		if (NULL == te->tm_file)
+		{
+			te->tm_file = tm_source_file_new(te->uri, TRUE);
+			if (NULL != te->tm_file)
+				tm_workspace_add_object(te->tm_file);
+		}
+	}
+}
+#endif
+
+static void
+initialize_markers (TextEditor* te, GtkWidget *scintilla)
+{
+	gint marker;
+	gchar ***xpm;
+	g_return_if_fail (te != NULL);
+	
+	marker = 0;
+	for (xpm = marker_pixmap;*xpm != NULL; xpm++)
+	{
+		scintilla_send_message (SCINTILLA (scintilla), SCI_MARKERDEFINEPIXMAP,
+								marker, (sptr_t)*xpm);
+		marker++;
+	}
+}
+
+#ifdef DEBUG
+static void
+on_scintila_already_destroyed (gpointer te, GObject *obj)
+{
+	/* DEBUG_PRINT ("%s", "Scintilla object has been destroyed"); */
+}
+
+static void
+on_te_already_destroyed (gpointer te, GObject *obj)
+{
+	/* DEBUG_PRINT ("%s", "TextEditor object has been destroyed"); */
+}
+#endif
+
+void
+text_editor_add_view (TextEditor *te)
+{
+	AnEditorID editor_id;
+	GtkWidget *scintilla;
+	gint current_line;
+	gint current_point;
+	
+	if (te->views)
+	{
+		current_line = text_editor_get_current_lineno (te);
+		current_point = text_editor_get_current_position (te);
+	}
+	else
+	{
+		current_line = 0;
+		current_point = 0;
+	}
+	editor_id = aneditor_new (sci_prop_get_pointer (te->props_base));
+	scintilla = aneditor_get_widget (editor_id);
+	
+	/* Set notifications to receive */
+	scintilla_send_message (SCINTILLA (scintilla), SCI_SETMODEVENTMASK,
+							(SC_MOD_INSERTTEXT | SC_MOD_DELETETEXT), 0);
+	
+	/* Set parent, if it is not primary view */
+	if (te->views)
+	{
+		aneditor_set_parent (editor_id, GPOINTER_TO_INT(te->editor_id));
+	}
+	te->views = g_list_prepend (te->views, GINT_TO_POINTER (editor_id));
+	te->editor_id = editor_id;
+	te->scintilla = scintilla;
+	
+	/*
+	aneditor_command (te->editor_id, ANE_SETACCELGROUP,
+			  (glong) app->accel_group, 0);
+	*/
+	
+	gtk_widget_set_size_request (scintilla, 50, 50);
+	gtk_widget_show (scintilla);
+	
+	gtk_box_set_spacing (GTK_BOX (te->vbox), 3);
+	gtk_box_pack_start (GTK_BOX (te->vbox), scintilla, TRUE, TRUE, 0);
+	gtk_widget_grab_focus (scintilla);
+
+	g_signal_connect (G_OBJECT (scintilla), "event",
+			    G_CALLBACK (on_text_editor_text_event), te);
+	g_signal_connect (G_OBJECT (scintilla), "button_press_event",
+			    G_CALLBACK (on_text_editor_text_buttonpress_event), te);
+	g_signal_connect (G_OBJECT (scintilla), "key_release_event",
+			    G_CALLBACK (on_text_editor_text_keyrelease_event), te);
+	g_signal_connect_after (G_OBJECT (scintilla), "size_allocate",
+			    G_CALLBACK (on_text_editor_scintilla_size_allocate), te);
+	g_signal_connect (G_OBJECT (scintilla), "sci-notify",
+			    G_CALLBACK (on_text_editor_scintilla_notify), te);
+	g_signal_connect (G_OBJECT (scintilla), "focus_in_event",
+				G_CALLBACK (on_text_editor_scintilla_focus_in), te);
+	
+	initialize_markers (te, scintilla);
+	text_editor_hilite_one (te, editor_id, FALSE);
+	text_editor_set_line_number_width (te);
+	
+	if (current_line)
+		text_editor_goto_line (te, current_line, FALSE, TRUE);
+	if (current_point)
+		text_editor_goto_point (te, current_point);
+	
+#ifdef DEBUG
+	g_object_weak_ref (G_OBJECT (scintilla), on_scintila_already_destroyed, te);
+#endif
+}
+
+/* Remove the current view */
+void
+text_editor_remove_view (TextEditor *te)
+{
+	if (!te->editor_id)
+		return;
+	if (te->views == NULL ||
+		g_list_length (te->views) <= 1)
+		return;
+	
+	g_signal_handlers_disconnect_by_func (G_OBJECT (te->scintilla),
+				G_CALLBACK (on_text_editor_text_event), te);
+	g_signal_handlers_disconnect_by_func (G_OBJECT (te->scintilla),
+				G_CALLBACK (on_text_editor_text_buttonpress_event), te);
+	g_signal_handlers_disconnect_by_func (G_OBJECT (te->scintilla),
+				G_CALLBACK (on_text_editor_text_keyrelease_event), te);
+	g_signal_handlers_disconnect_by_func (G_OBJECT (te->scintilla),
+				G_CALLBACK (on_text_editor_scintilla_size_allocate), te);
+	g_signal_handlers_disconnect_by_func (G_OBJECT (te->scintilla),
+				G_CALLBACK (on_text_editor_scintilla_notify), te);
+	g_signal_handlers_disconnect_by_func (G_OBJECT (te->scintilla),
+				G_CALLBACK (on_text_editor_scintilla_focus_in), te);
+	
+	te->views = g_list_remove (te->views, GINT_TO_POINTER(te->editor_id));
+	gtk_container_remove (GTK_CONTAINER (te->vbox), te->scintilla);
+	aneditor_destroy(te->editor_id);
+	
+	/* Set current view */
+	if (te->views)
+	{
+		te->editor_id = GPOINTER_TO_INT(te->views->data);
+		te->scintilla = aneditor_get_widget (te->editor_id);
+		gtk_widget_grab_focus (te->scintilla);
+	}
+	else
+	{
+		gtk_box_set_spacing (GTK_BOX (te->vbox), 0);
+		te->editor_id = 0;
+		te->scintilla = NULL;
+	}
+}
+
+static void
+on_reload_dialog_response (GtkWidget *message_area, gint res, TextEditor *te)
+{
+	if (res == GTK_RESPONSE_YES)
+	{
+		text_editor_load_file (te);
+	}
+	else
+	{
+		text_editor_set_saved (te, FALSE);
+		gtk_widget_destroy (message_area);
+	}
+}
+
+static void
+on_destroy_message_area (gpointer data, GObject *finalized_object)
+{
+	TextEditor *te = (TextEditor *)data;
+	
+	te->message_area = NULL;
+	g_signal_emit_by_name (G_OBJECT (te), "update-save-ui");
+}
+
+static void
+on_close_dialog_response (GtkWidget *message_area, gint res, TextEditor *te)
+{
+	if (res == GTK_RESPONSE_YES)
+	{
+		IAnjutaDocumentManager *docman;
+		
+		docman = anjuta_shell_get_interface (te->shell, IAnjutaDocumentManager, NULL);
+		if (docman == NULL) return;
+
+		ianjuta_document_manager_remove_document (docman, IANJUTA_DOCUMENT (te), FALSE, NULL);
+	}
+	else
+	{
+		text_editor_set_saved (te, FALSE);
+		gtk_widget_destroy (message_area);
+	}
+}
+
+static void
+text_editor_set_message_area (TextEditor *te,  GtkWidget *message_area)
+{
+	if (te->message_area != NULL)
+		gtk_widget_destroy (te->message_area);
+	te->message_area = message_area;
+
+	if (te->message_area == NULL)
+		return;
+		
+	gtk_widget_show (message_area);
+	gtk_box_pack_start (GTK_BOX (te),
+						message_area,
+						FALSE,
+						FALSE,
+						0);
+	g_object_weak_ref (G_OBJECT (te->message_area),
+					   on_destroy_message_area, te);
+	
+	g_signal_emit_by_name (G_OBJECT (te), "update-save-ui");
+}
+
+static void
+on_text_editor_uri_changed (GFileMonitor *monitor,
+							GFile *file,
+							GFile *other_file,
+							GFileMonitorEvent event_type,
+							gpointer user_data)
+{
+	TextEditor *te = TEXT_EDITOR (user_data);
+	GtkWidget *message_area;
+	gchar *buff;
+	
+	/* DEBUG_PRINT ("%s", "File changed!!!"); */
+		
+	switch (event_type)
+	{
+		case G_FILE_MONITOR_EVENT_CHANGES_DONE_HINT:
+			
+			if (!anjuta_util_diff (te->uri, te->last_saved_content))
+			{
+				/* The file content is same. Remove any previous prompt for reload */
+				if (te->message_area)
+					gtk_widget_destroy (te->message_area);
+				te->message_area = NULL;
+				return;
+			}
+			/* No break here */
+
+		case G_FILE_MONITOR_EVENT_CREATED:
+			if (text_editor_is_saved (te))
+			{
+				buff = g_strdup_printf (_("The file '%s' has been changed.\n"
+								  "Do you want to reload it ?"),
+								 te->filename);
+			}
+			else
+			{
+				buff = g_strdup_printf (_("The file '%s' has been changed.\n"
+								  "Do you want to loose your changes and reload it ?"),
+								 te->filename);
+			}
+			message_area = anjuta_message_area_new (buff, GTK_STOCK_DIALOG_WARNING);
+			g_free (buff);
+			anjuta_message_area_add_button (ANJUTA_MESSAGE_AREA (message_area),
+											GTK_STOCK_REFRESH,
+											GTK_RESPONSE_YES);
+			anjuta_message_area_add_button (ANJUTA_MESSAGE_AREA (message_area),
+											GTK_STOCK_CANCEL,
+											GTK_RESPONSE_NO);
+			g_signal_connect (G_OBJECT(message_area), "response",
+							  G_CALLBACK (on_reload_dialog_response),
+							  te);
+			break;
+		case G_FILE_MONITOR_EVENT_DELETED:
+			if (text_editor_is_saved (te))
+			{
+				buff = g_strdup_printf (_
+							 ("The file '%s' has been deleted.\n"
+							  "Do you confirm and close it ?"),
+							 te->filename);
+			}
+			else
+			{
+				buff = g_strdup_printf (_
+							 ("The file '%s' has been deleted.\n"
+							  "Do you want to loose your changes and close it ?"),
+							 te->filename);
+			}
+			message_area = anjuta_message_area_new (buff, GTK_STOCK_DIALOG_WARNING);
+			g_free (buff);
+			anjuta_message_area_add_button (ANJUTA_MESSAGE_AREA (message_area),
+											GTK_STOCK_DELETE,
+											GTK_RESPONSE_YES);
+			anjuta_message_area_add_button (ANJUTA_MESSAGE_AREA (message_area),
+											GTK_STOCK_CANCEL,
+											GTK_RESPONSE_NO);
+			g_signal_connect (G_OBJECT(message_area), "response",
+							  G_CALLBACK (on_close_dialog_response),
+							  te);
+			break;
+		case G_FILE_MONITOR_EVENT_CHANGED:
+		case G_FILE_MONITOR_EVENT_ATTRIBUTE_CHANGED:
+		case G_FILE_MONITOR_EVENT_PRE_UNMOUNT:
+		case G_FILE_MONITOR_EVENT_UNMOUNTED:
+			return;
+		default:
+			g_warn_if_reached ();
+			return;
+	}
+	
+	text_editor_set_message_area (te, message_area);
+}
+
+static void
+text_editor_update_monitor (TextEditor *te, gboolean disable_it)
+{
+	if (te->monitor)
+	{
+		/* Shutdown existing monitor */
+		g_file_monitor_cancel (te->monitor);
+		te->monitor = NULL;
+	}
+	if (te->message_area) 
+	{
+		/* Remove existing message area */
+		gtk_widget_destroy (te->message_area);
+		te->message_area = NULL;
+	}
+	if (te->uri && !disable_it)
+	{
+		GFile *gio_uri;
+		GError *error = NULL;
+		/* DEBUG_PRINT ("%s", "Setting up Monitor for %s", te->uri); */
+
+		gio_uri = g_file_new_for_uri (te->uri);
+		te->monitor = g_file_monitor_file (gio_uri, 
+										G_FILE_MONITOR_NONE, 
+										NULL, 
+										&error);
+		g_signal_connect (te->monitor, "changed",
+				  G_CALLBACK (on_text_editor_uri_changed), te);
+		g_object_unref (gio_uri);
+		
+		if (error != NULL)
+		{
+			DEBUG_PRINT ("Error while setting up file monitor: %s",
+					   error->message);
+			g_error_free (error);
+		}
+		
+	}
+}
+
+GtkWidget *
+text_editor_new (AnjutaStatus *status, AnjutaPreferences *eo, AnjutaShell *shell, const gchar *uri, const gchar *name)
+{
+	gint zoom_factor;
+	static guint new_file_count;
+	TextEditor *te = TEXT_EDITOR (gtk_widget_new (TYPE_TEXT_EDITOR, NULL));
+	
+	te->status = status; 
+	te->shell = shell;
+	
+	te->preferences = eo;
+	te->props_base = text_editor_get_props();
+	if (name && strlen(name) > 0)
+		te->filename = g_strdup(name); 
+	else 
+		te->filename = g_strdup_printf ("Newfile#%d", ++new_file_count);
+	if (uri && strlen(uri) > 0)
+	{	
+		new_file_count--;
+		g_free (te->filename);
+		g_free (te->uri);
+
+		GFile *gio_uri;
+		gio_uri = g_file_new_for_uri (uri);
+		te->filename = g_file_get_basename (gio_uri);
+		g_object_unref (gio_uri);
+
+		te->uri = g_strdup (uri);
+	}
+	
+	text_editor_prefs_init (te);
+	
+	/* Create primary view */
+	te->vbox = gtk_vbox_new (TRUE, 3);
+	gtk_box_pack_end (GTK_BOX (te), te->vbox, TRUE, TRUE, 0);
+	text_editor_add_view (te);
+
+	if (te->uri)
+	{	
+		if (text_editor_load_file (te) == FALSE)
+		{
+			/* Unable to load file */
+			gtk_widget_destroy (GTK_WIDGET (te));
+			return NULL;
+		}
+	}
+	text_editor_update_controls (te);
+	
+	/* Apply font zoom separately */
+	zoom_factor = anjuta_preferences_get_int (te->preferences, TEXT_ZOOM_FACTOR);
+	/* DEBUG_PRINT ("%s", "Initializing zoom factor to: %d", zoom_factor); */
+	text_editor_set_zoom_factor (te, zoom_factor);
+	
+#ifdef DEBUG
+	g_object_weak_ref (G_OBJECT (te), on_te_already_destroyed, te);
+#endif
+	return GTK_WIDGET (te);
+}
+
+void
+text_editor_dispose (GObject *obj)
+{
+	TextEditor *te = TEXT_EDITOR (obj);
+	if (te->monitor)
+	{
+		text_editor_update_monitor (te, TRUE);
+		te->monitor = NULL;
+	}
+	if (te->popup_menu)
+	{
+		g_object_unref (te->popup_menu);
+		te->popup_menu = NULL;
+	}
+	if (te->views)
+	{
+		GtkWidget *scintilla;
+		AnEditorID editor_id;
+		GList *node;
+		
+		node = te->views;
+		while (node)
+		{
+			editor_id = GPOINTER_TO_INT (node->data);
+			scintilla = aneditor_get_widget (editor_id);
+			
+			g_signal_handlers_disconnect_by_func (G_OBJECT (scintilla),
+						G_CALLBACK (on_text_editor_text_event), te);
+			g_signal_handlers_disconnect_by_func (G_OBJECT (scintilla),
+						G_CALLBACK (on_text_editor_text_buttonpress_event), te);
+			g_signal_handlers_disconnect_by_func (G_OBJECT (scintilla),
+						G_CALLBACK (on_text_editor_text_keyrelease_event), te);
+			g_signal_handlers_disconnect_by_func (G_OBJECT (scintilla),
+						G_CALLBACK (on_text_editor_scintilla_size_allocate), te);
+			g_signal_handlers_disconnect_by_func (G_OBJECT (scintilla),
+						G_CALLBACK (on_text_editor_scintilla_notify), te);
+			g_signal_handlers_disconnect_by_func (G_OBJECT (scintilla),
+						G_CALLBACK (on_text_editor_scintilla_focus_in), te);
+			
+			aneditor_destroy (editor_id);
+			node = g_list_next (node);
+		}			
+		te->scintilla = NULL;
+		te->editor_id = 0;
+		te->views = NULL;
+	}
+	if (te->notify_ids)
+	{
+		text_editor_prefs_finalize (te);
+		te->notify_ids = NULL;
+	}
+	G_OBJECT_CLASS (parent_class)->dispose (obj);
+}
+
+void
+text_editor_finalize (GObject *obj)
+{
+	TextEditor *te = TEXT_EDITOR (obj);
+	g_free (te->filename);
+	g_free (te->uri);
+	g_free (te->force_hilite);
+	g_free (te->last_saved_content);
+	
+	G_OBJECT_CLASS (parent_class)->finalize (obj);
+}
+
+void
+text_editor_freeze (TextEditor *te)
+{
+	te->freeze_count++;
+}
+
+void
+text_editor_thaw (TextEditor *te)
+{
+	te->freeze_count--;
+	if (te->freeze_count < 0)
+		te->freeze_count = 0;
+}
+
+void
+text_editor_set_hilite_type (TextEditor * te, const gchar *file_extension)
+{
+	const gchar *past_language;
+	const gchar *curr_language;
+	
+	past_language = ianjuta_editor_language_get_language (IANJUTA_EDITOR_LANGUAGE (te), NULL);
+	
+	g_free (te->force_hilite);
+	if (file_extension)
+		te->force_hilite = g_strdup (file_extension);
+	else
+		te->force_hilite = NULL;
+	
+	curr_language = ianjuta_editor_language_get_language (IANJUTA_EDITOR_LANGUAGE (te), NULL);
+	if (past_language != curr_language)
+		g_signal_emit_by_name (te, "language-changed", curr_language);
+}
+
+static void
+text_editor_hilite_one (TextEditor * te, AnEditorID editor_id,
+						gboolean override_by_pref)
+{
+	/* If syntax highlighting is disabled ... */
+	if (override_by_pref &&
+		anjuta_preferences_get_bool (ANJUTA_PREFERENCES (te->preferences),
+									DISABLE_SYNTAX_HILIGHTING))
+	{
+		aneditor_command (editor_id, ANE_SETHILITE, (glong) "plain.txt", 0);
+	}
+	else if (te->force_hilite)
+	{
+		aneditor_command (editor_id, ANE_SETHILITE, (glong) te->force_hilite, 0);
+	}
+	else if (te->uri)
+	{
+		gchar *basename;
+		basename = g_path_get_basename (te->uri);
+		aneditor_command (editor_id, ANE_SETHILITE, (glong) basename, 0);
+		g_free (basename);
+	}
+	else if (te->filename)
+	{
+		aneditor_command (editor_id, ANE_SETHILITE, (glong) te->filename, 0);
+	}
+	else
+	{
+		aneditor_command (editor_id, ANE_SETHILITE, (glong) "plain.txt", 0);
+	} 
+}
+
+void
+text_editor_hilite (TextEditor * te, gboolean override_by_pref)
+{
+	GList *node;
+	
+	node = te->views;
+	while (node)
+	{
+		text_editor_hilite_one (te, GPOINTER_TO_INT (node->data),
+								override_by_pref);
+		node = g_list_next (node);
+	}
+}
+
+void
+text_editor_set_zoom_factor (TextEditor * te, gint zfac)
+{
+	text_editor_command (te, ANE_SETZOOM, zfac,  0);
+}
+
+TextEditorAttrib
+text_editor_get_attribute (TextEditor *te, gint position)
+{
+	int lexer;
+	int style;
+	TextEditorAttrib attrib = TEXT_EDITOR_ATTRIB_TEXT;
+	
+	lexer = scintilla_send_message (SCINTILLA (te->scintilla), SCI_GETLEXER,
+									0, 0);
+	style = scintilla_send_message (SCINTILLA (te->scintilla), SCI_GETSTYLEAT,
+									position, 0);
+	switch (lexer)
+	{
+		case SCLEX_CPP:
+			switch (style)
+			{
+				case SCE_C_CHARACTER:
+				case SCE_C_STRING:
+					attrib = TEXT_EDITOR_ATTRIB_STRING;
+					break;
+				case SCE_C_COMMENT:
+				case SCE_C_COMMENTLINE:
+				case SCE_C_COMMENTDOC:
+				case SCE_C_COMMENTLINEDOC:
+				case SCE_C_COMMENTDOCKEYWORD:
+				case SCE_C_COMMENTDOCKEYWORDERROR:
+					attrib = TEXT_EDITOR_ATTRIB_COMMENT;
+					break;
+				case SCE_C_WORD:
+					attrib = TEXT_EDITOR_ATTRIB_KEYWORD;
+					break;
+			}
+			break;
+	}
+	return attrib;
+}
+
+glong
+text_editor_find (TextEditor * te, const gchar * str, gint scope,
+				  gboolean forward, gboolean regexp,
+				  gboolean ignore_case, gboolean whole_word, gboolean wrap)
+{
+	glong ret;
+	GtkWidget *editor;
+	glong flags;
+	int current_pos, current_anchor;
+	
+	if (!te) return -1;
+	editor = te->scintilla;
+	
+	flags = (ignore_case ? 0 : SCFIND_MATCHCASE)
+		| (regexp ? SCFIND_REGEXP : 0)
+		| (whole_word ? SCFIND_WHOLEWORD : 0)
+		| (forward ? 0 : ANEFIND_REVERSE_FLAG);
+		
+	switch (scope)
+	{
+		case TEXT_EDITOR_FIND_SCOPE_WHOLE:
+				if (forward)
+				{
+					scintilla_send_message (SCINTILLA (editor), SCI_SETANCHOR,
+											0, 0);
+					scintilla_send_message (SCINTILLA (editor),
+											SCI_SETCURRENTPOS, 0, 0);
+				}
+				else
+				{
+					glong length;
+					length = scintilla_send_message (SCINTILLA (editor),
+													 SCI_GETTEXTLENGTH, 0, 0);
+					scintilla_send_message (SCINTILLA (editor),
+											SCI_SETCURRENTPOS, length-1, 0);
+					scintilla_send_message (SCINTILLA (editor),
+											SCI_SETANCHOR, length-1, 0);
+				}
+			break;
+		default:
+			break;
+	}
+	current_pos = scintilla_send_message (SCINTILLA (editor),
+										  SCI_GETCURRENTPOS, 0, 0);
+	current_anchor = scintilla_send_message (SCINTILLA (editor),
+											 SCI_GETANCHOR, 0, 0);
+	ret = aneditor_command (te->editor_id, ANE_FIND, flags, (long)str);
+	if (scope == TEXT_EDITOR_FIND_SCOPE_CURRENT && wrap && ret < 0) {
+		/* If wrap is requested, wrap it. */
+		if (forward)
+		{
+			scintilla_send_message (SCINTILLA (editor), SCI_SETANCHOR, 0, 0);
+			scintilla_send_message (SCINTILLA (editor), SCI_SETCURRENTPOS,
+									0, 0);
+		}
+		else
+		{
+			glong length;
+			length = scintilla_send_message (SCINTILLA (editor),
+											 SCI_GETTEXTLENGTH, 0, 0);
+			scintilla_send_message (SCINTILLA (editor), SCI_SETCURRENTPOS,
+									length-1, 0);
+			scintilla_send_message (SCINTILLA (editor), SCI_SETANCHOR,
+									length-1, 0);
+		}
+		ret = aneditor_command (te->editor_id, ANE_FIND, flags, (long)str);
+		/* If the text is still not found, restore current pos and anchor */
+		if (ret < 0) {
+			scintilla_send_message (SCINTILLA (editor), SCI_SETANCHOR,
+									current_anchor, 0);
+			scintilla_send_message (SCINTILLA (editor), SCI_SETCURRENTPOS,
+									current_pos, 0);
+		}
+	}
+	return ret;
+}
+
+void
+text_editor_replace_selection (TextEditor * te, const gchar* r_str)
+{
+	if (!te) return;
+	scintilla_send_message (SCINTILLA(te->scintilla), SCI_REPLACESEL, 0,
+							(long)r_str);
+}
+
+guint
+text_editor_get_total_lines (TextEditor * te)
+{
+	guint i;
+	guint count = 0;
+	if (te == NULL)
+		return 0;
+	if (IS_SCINTILLA (te->scintilla) == FALSE)
+		return 0;
+	for (i = 0;
+	     i < scintilla_send_message (SCINTILLA (te->scintilla),
+					 SCI_GETLENGTH, 0, 0); i++)
+	{
+		if (scintilla_send_message
+		    (SCINTILLA (te->scintilla), SCI_GETCHARAT, i,
+		     0) == '\n')
+			count++;
+	}
+	return count;
+}
+
+guint
+text_editor_get_current_lineno (TextEditor * te)
+{
+	guint count;
+	
+	g_return_val_if_fail (te != NULL, 0);
+
+	count =	scintilla_send_message (SCINTILLA (te->scintilla),
+					SCI_GETCURRENTPOS, 0, 0);
+	count =	scintilla_send_message (SCINTILLA (te->scintilla),
+					SCI_LINEFROMPOSITION, count, 0);
+	return linenum_scintilla_to_text_editor(count);
+}
+
+guint
+text_editor_get_position_lineno (TextEditor * te, gint position)
+{
+	guint count;
+	g_return_val_if_fail (te != NULL, 0);
+
+	count =	scintilla_send_message (SCINTILLA (te->scintilla),
+					SCI_LINEFROMPOSITION, position, 0);
+	return linenum_scintilla_to_text_editor(count);
+}
+
+guint
+text_editor_get_current_column (TextEditor * te)
+{
+	g_return_val_if_fail (te != NULL, 0);
+	return scintilla_send_message (SCINTILLA (te->scintilla),
+								   SCI_GETCOLUMN,
+								   text_editor_get_current_position (te), 0);
+}
+
+gboolean
+text_editor_get_overwrite (TextEditor * te)
+{
+	g_return_val_if_fail (te != NULL, 0);
+	return scintilla_send_message (SCINTILLA (te->scintilla),
+								   SCI_GETOVERTYPE, 0, 0);
+}
+
+guint
+text_editor_get_line_from_position (TextEditor * te, glong pos)
+{
+	guint count;
+	
+	g_return_val_if_fail (te != NULL, 0);
+
+	count =	scintilla_send_message (SCINTILLA (te->scintilla),
+					SCI_LINEFROMPOSITION, pos, 0);
+	return linenum_scintilla_to_text_editor(count);
+}
+
+glong
+text_editor_get_current_position (TextEditor * te)
+{
+	guint count;
+	
+	g_return_val_if_fail (te != NULL, 0);
+
+	count =	scintilla_send_message (SCINTILLA (te->scintilla),
+					SCI_GETCURRENTPOS, 0, 0);
+	return count;
+}
+
+gboolean
+text_editor_goto_point (TextEditor * te, glong point)
+{
+	g_return_val_if_fail (te != NULL, FALSE);
+	g_return_val_if_fail(IS_SCINTILLA (te->scintilla) == TRUE, FALSE);
+
+	scintilla_send_message (SCINTILLA (te->scintilla), SCI_GOTOPOS, point, 0);
+	return TRUE;
+}
+
+gboolean
+text_editor_goto_line (TextEditor * te, glong line,
+					   gboolean mark, gboolean ensure_visible)
+{
+	gint selpos;
+	g_return_val_if_fail (te != NULL, FALSE);
+	g_return_val_if_fail(IS_SCINTILLA (te->scintilla) == TRUE, FALSE);
+	g_return_val_if_fail(line >= 0, FALSE);
+
+	te->current_line = line;
+	if (mark) text_editor_set_line_marker (te, line);
+	if (ensure_visible)
+		scintilla_send_message (SCINTILLA (te->scintilla),
+								SCI_ENSUREVISIBLE,
+								linenum_text_editor_to_scintilla (line), 0);
+	selpos = scintilla_send_message(SCINTILLA (te->scintilla),
+									SCI_POSITIONFROMLINE,
+								linenum_text_editor_to_scintilla (line), 0);
+	scintilla_send_message (SCINTILLA (te->scintilla),
+							SCI_SETSELECTIONSTART, selpos, 0);
+	scintilla_send_message (SCINTILLA (te->scintilla),
+							SCI_SETSELECTIONEND, selpos, 0);
+	
+	/* This ensures that we have arround 5 lines visible below the mark */
+	scintilla_send_message (SCINTILLA (te->scintilla), SCI_GOTOLINE, 
+		linenum_text_editor_to_scintilla (line)+5, 0);
+	scintilla_send_message (SCINTILLA (te->scintilla), SCI_GOTOLINE, 
+		linenum_text_editor_to_scintilla (line), 0);
+	return TRUE;
+}
+
+gint
+text_editor_goto_block_start (TextEditor* te)
+{
+	gint line;
+	line = aneditor_command (te->editor_id, ANE_GETBLOCKSTARTLINE, 0, 0);
+	if (line >= 0) text_editor_goto_line (te, line, TRUE, TRUE);
+	else gdk_beep();
+	return line;
+}
+
+gint
+text_editor_goto_block_end (TextEditor* te)
+{
+	gint line;
+	line = aneditor_command (te->editor_id, ANE_GETBLOCKENDLINE, 0, 0);
+	if (line >= 0) text_editor_goto_line (te, line, TRUE, TRUE);
+	else gdk_beep();
+	return line;
+}
+
+gint
+text_editor_set_marker (TextEditor *te, glong line, gint marker)
+{
+	g_return_val_if_fail (te != NULL, -1);
+	g_return_val_if_fail(IS_SCINTILLA (te->scintilla) == TRUE, -1);
+
+	/* Scintilla interprets line+1 rather than line */
+	/* A bug perhaps */
+	/* So counterbalance it with line-1 */
+	/* Using the macros linenum_* */
+	return scintilla_send_message (SCINTILLA (te->scintilla),
+								   SCI_MARKERADD,
+								   linenum_text_editor_to_scintilla (line),
+								   marker);
+}
+
+gint
+text_editor_set_indicator (TextEditor *te, gint start,
+						   gint end, gint indicator)
+{
+	gchar ch;
+	glong indic_mask[] = {INDIC0_MASK, INDIC1_MASK, INDIC2_MASK};
+	gint current_styling_pos;
+	
+	g_return_val_if_fail (te != NULL, -1);
+	g_return_val_if_fail (IS_SCINTILLA (te->scintilla) == TRUE, -1);
+
+	if (start >= 0) {
+		end --;	/* supplied end-location is one-past the last char to process */
+		if (end < start)
+			return -1;
+
+		do
+		{
+			ch = scintilla_send_message (SCINTILLA (te->scintilla),
+										 SCI_GETCHARAT, start, 0);
+			start++;
+		} while (isspace(ch));
+		start--;
+		
+		do {
+			ch = scintilla_send_message (SCINTILLA (te->scintilla),
+										 SCI_GETCHARAT, end, 0);
+			end--;
+		} while (isspace(ch));
+		end++;
+		if (end < start) return -1;
+		
+		current_styling_pos = scintilla_send_message (SCINTILLA (te->scintilla),
+													  SCI_GETENDSTYLED, 0, 0);
+		if (indicator >= 0 && indicator < 3) {
+			char current_mask;
+			current_mask =
+				scintilla_send_message (SCINTILLA (te->scintilla),
+										SCI_GETSTYLEAT, start, 0);
+			current_mask &= INDICS_MASK;
+			current_mask |= indic_mask[indicator];
+			scintilla_send_message (SCINTILLA (te->scintilla),
+									SCI_STARTSTYLING, start, INDICS_MASK);
+			scintilla_send_message (SCINTILLA (te->scintilla),
+									SCI_SETSTYLING, end-start+1, current_mask);
+		} else {
+			scintilla_send_message (SCINTILLA (te->scintilla),
+									SCI_STARTSTYLING, start, INDICS_MASK);
+			scintilla_send_message (SCINTILLA (te->scintilla),
+									SCI_SETSTYLING, end-start+1, 0);
+		}
+		if (current_styling_pos < start)
+			scintilla_send_message (SCINTILLA (te->scintilla),
+									SCI_STARTSTYLING, current_styling_pos,
+									0x1F);
+	} else {
+		if (indicator < 0) {
+			char current_mask;
+			glong i, last, start_style_pos = 0;
+			
+			last = scintilla_send_message (SCINTILLA (te->scintilla),
+										   SCI_GETTEXTLENGTH, 0, 0);
+			current_styling_pos = scintilla_send_message (SCINTILLA (te->scintilla),
+														  SCI_GETENDSTYLED, 0, 0);
+			for (i = 0; i < last; i++)
+			{
+				current_mask =
+					scintilla_send_message (SCINTILLA (te->scintilla),
+											SCI_GETSTYLEAT, i, 0);
+				current_mask &= INDICS_MASK;
+				if (current_mask != 0)
+				{
+					if (start_style_pos == 0)
+						start_style_pos = i;
+					scintilla_send_message (SCINTILLA (te->scintilla),
+											SCI_STARTSTYLING, i, INDICS_MASK);
+					scintilla_send_message (SCINTILLA (te->scintilla),
+											SCI_SETSTYLING, 1, 0);
+				}
+			}
+			if (current_styling_pos < start_style_pos)
+				scintilla_send_message (SCINTILLA (te->scintilla),
+										SCI_STARTSTYLING, current_styling_pos,
+										0x1F);
+		}
+	}
+	return 0;
+}
+
+void
+text_editor_set_line_marker (TextEditor *te, glong line)
+{
+	g_return_if_fail (te != NULL);
+	g_return_if_fail(IS_SCINTILLA (te->scintilla) == TRUE);
+
+	// FIXME: anjuta_delete_all_marker (TEXT_EDITOR_LINEMARKER);
+	text_editor_delete_marker_all (te, TEXT_EDITOR_LINEMARKER);
+	text_editor_set_marker (te, line, TEXT_EDITOR_LINEMARKER);
+}
+
+/* Support for DOS-Files
+ *
+ * On load, Anjuta will detect DOS-files by finding <CR><LF>. 
+ * Anjuta will translate some chars >= 128 to native charset.
+ * On save the DOS_EOL_CHECK(preferences->editor) will be checked
+ * and chars >=128 will be replaced by DOS-codes, if any translation 
+ * match(see struct tr_dos in this file) and <CR><LF> will used 
+ * instead of <LF>.
+ * The DOS_EOL_CHECK-checkbox will be set on loading a DOS-file.
+ *
+ *  23.Sep.2001  Denis Boehme <boehme at syncio dot de>
+ */
+
+/*
+ * this is a translation table from unix->dos 
+ * this table will be used by filter_chars and save filtered.
+ */
+static struct {
+	unsigned char c; /* unix-char */
+	unsigned char b; /* dos-char */
+} tr_dos[]= {
+	{ 'ä 0x84 },
+	{ 'Ä, 0x8e },
+	{ 'ß, 0xe1 },
+	{ 'ü81 },
+	{ 'Ü, 0x9a },
+	{ 'ö0x94 },
+	{ 'Ö, 0x99 },
+	{ 'é 0x82 },
+	{ 'É, 0x90 },
+	{ 'è 0x9a },
+	{ 'È, 0xd4 },
+	{ 'ê 0x88 },
+	{ 'Ê, 0xd2 },
+	{ 'á 0xa0 },
+	{ 'Á, 0xb5 },
+	{ 'à 0x85 },
+	{ 'À, 0xb7 },
+	{ 'â 0x83 },
+	{ 'Â, 0xb6 },
+	{ 'úxa3 },
+	{ 'Ú, 0xe9 },
+	{ 'ùx97 },
+	{ 'Ù, 0xeb },
+	{ 'ûx96 },
+	{ 'Û, 0xea }
+};
+
+/*
+ * filter chars in buffer, by using tr_dos-table. 
+ *
+ */
+static size_t
+filter_chars_in_dos_mode(gchar *data_, size_t size )
+{
+	int k;
+	size_t i;
+	unsigned char * data = (unsigned char*)data_;
+	unsigned char * tr_map;
+
+	tr_map = (unsigned char *)malloc( 256 );
+	memset( tr_map, 0, 256 );
+	for ( k = 0; k < sizeof(tr_dos )/2 ; k++ )
+		tr_map[tr_dos[k].b] = tr_dos[k].c;
+
+	for ( i = 0; i < size; i++ )
+	{
+      		if ( (data[i] >= 128) && ( tr_map[data[i]] != 0) )
+			data[i] = tr_map[data[i]];;
+	}
+
+	if ( tr_map )
+		free( tr_map );
+
+	return size;
+}
+
+/*
+ * save buffer. filter chars and set dos-like CR/LF if dos_text is set.
+ */
+static gboolean
+save_filtered_in_dos_mode(GFileOutputStream* stream, gchar *data_,
+						  gsize size)
+{
+	gboolean result;
+	gsize i, j;
+	unsigned char *data;
+	unsigned char *tr_map;
+	int k;
+
+	/* build the translation table */
+	tr_map = malloc( 256 );
+	memset( tr_map, 0, 256 );
+	
+	for ( k = 0; k < sizeof(tr_dos)/2; k++)
+	  tr_map[tr_dos[k].c] = tr_dos[k].b;
+
+	data = (unsigned char*)data_;
+	i = 0; 
+	j = 0;
+	while ( i < size )
+	{
+		if (data[i]>=128) 
+		{
+			/* convert dos-text */
+			if ( tr_map[data[i]] != 0 )
+			{	
+				gsize bytes_written;
+				result = g_output_stream_write_all (G_OUTPUT_STREAM (stream), 
+														&tr_map[data[i]], 1, 
+														&bytes_written, 
+														NULL, NULL);
+	
+				j += bytes_written;
+			}
+			else
+			{
+				/* char not found, skip transform */
+				gsize bytes_written;
+				result = g_output_stream_write_all (G_OUTPUT_STREAM (stream), 
+														&data[i], 1, 
+														&bytes_written, 
+														NULL, NULL);
+				j += bytes_written;
+			}
+			i++;
+		} 
+		else 
+		{
+			gsize bytes_written;
+			result = g_output_stream_write_all (G_OUTPUT_STREAM (stream), 
+														&data[i], 1, 
+														&bytes_written, 
+														NULL, NULL);
+			j += bytes_written;
+			i++;
+		}
+		if (!result)
+			break;
+	}
+
+	if (tr_map)
+		free (tr_map);
+	return result;
+}
+
+static gint
+determine_editor_mode(gchar* buffer, glong size)
+{
+	gint i;
+	guint cr, lf, crlf, max_mode;
+	gint mode;
+	
+	cr = lf = crlf = 0;
+	
+	for ( i = 0; i < size ; i++ )
+	{
+		if ( buffer[i] == 0x0a ){
+			// LF
+			// mode = SC_EOF_LF;
+			lf++;
+		} else if ( buffer[i] == 0x0d ) {
+			if (i >= (size-1)) {
+				// Last char
+				// CR
+				// mode = SC_EOL_CR;
+				cr++;
+			} else {
+				if (buffer[i+1] != 0x0a) {
+					// CR
+					// mode = SC_EOL_CR;
+					cr++;
+				} else {
+					// CRLF
+					// mode = SC_EOL_CRLF;
+					crlf++;
+				}
+				i++;
+			}
+		}
+	}
+
+	/* Vote for the maximum */
+	mode = SC_EOL_LF;
+	max_mode = lf;
+	if (crlf > max_mode) {
+		mode = SC_EOL_CRLF;
+		max_mode = crlf;
+	}
+	if (cr > max_mode) {
+		mode = SC_EOL_CR;
+		max_mode = cr;
+	}
+	/* DEBUG_PRINT ("EOL chars: LR = %d, CR = %d, CRLF = %d", lf, cr, crlf); */
+	/* DEBUG_PRINT ("Autodetected Editor mode [%d]", mode); */
+	return mode;
+}
+
+static gchar *
+convert_to_utf8 (PropsID props, const gchar *content, gsize len,
+			     const AnjutaEncoding **encoding_used)
+{
+	GError* conv_error = NULL;
+	gchar* new_content;
+	gsize new_len;
+
+	new_content = anjuta_convert_to_utf8 (content, 
+										  len, 
+										  encoding_used,
+										  &new_len, 
+										  &conv_error);
+	if  (new_content == NULL)	
+	{
+		/* Last change, let's try 8859-15 */
+		*encoding_used =  
+			anjuta_encoding_get_from_charset("ISO-8859-15");
+			
+		new_content = anjuta_convert_to_utf8 (content,
+											  len,
+											  encoding_used,
+											  &new_len,
+											  &conv_error);
+	}
+	
+	if (conv_error)
+		g_error_free (conv_error);
+	
+	return new_content;
+}
+
+static gboolean
+load_from_file (TextEditor *te, gchar *uri, gchar **err)
+{
+	GFile *gio_uri;
+	GFileInputStream *stream;
+	gboolean result;
+	GFileInfo *info;
+	gsize nchars;
+	gint dos_filter, editor_mode;
+	gchar *file_content = NULL;
+	gchar *buffer = NULL;
+	guint64 size; 
+
+	scintilla_send_message (SCINTILLA (te->scintilla), SCI_CLEARALL,
+							0, 0);
+	gio_uri = g_file_new_for_uri (uri);
+	info = g_file_query_info (gio_uri,
+								G_FILE_ATTRIBUTE_STANDARD_SIZE,
+								G_FILE_QUERY_INFO_NONE,
+								NULL,
+								NULL);
+
+	if (info == NULL)
+	{
+		*err = g_strdup (_("Could not get file info"));
+		g_object_unref (gio_uri);
+
+		return FALSE;
+	}
+	size = g_file_info_get_attribute_uint64 (info, G_FILE_ATTRIBUTE_STANDARD_SIZE);
+	g_object_unref (info);
+
+	buffer = g_malloc (size + 1);
+	if (buffer == NULL && size != 0)
+	{
+		/* DEBUG_PRINT ("%s", "This file is too big. Unable to allocate memory."); */
+		*err = g_strdup (_("This file is too big. Unable to allocate memory."));
+		g_object_unref (gio_uri);
+
+		return FALSE;
+	}
+	
+	stream = g_file_read (gio_uri, NULL, NULL);
+	if (stream == NULL)
+	{
+		*err = g_strdup (_("Could not open file"));		
+		g_object_unref (gio_uri);
+
+		return FALSE;
+	}
+	/* Crude way of loading, but faster */
+	result = g_input_stream_read_all (G_INPUT_STREAM (stream), 
+										buffer, size, &nchars, NULL, NULL);
+	if (!result)
+	{
+		g_free(buffer);
+		*err = g_strdup (_("Error while reading from file"));
+		g_object_unref (gio_uri);
+
+		return FALSE;
+	}
+	
+	if (buffer)
+	{
+		buffer[size] = '\0';
+		file_content = g_strdup (buffer);
+	}
+	
+	if (size != nchars)
+	{
+		/* DEBUG_PRINT ("File size and loaded size not matching"); */
+	}
+	dos_filter = 
+		anjuta_preferences_get_bool (ANJUTA_PREFERENCES (te->preferences),
+									DOS_EOL_CHECK);
+	
+	/* Set editor mode */
+	editor_mode =  determine_editor_mode (buffer, nchars);
+	scintilla_send_message (SCINTILLA (te->scintilla),
+							SCI_SETEOLMODE, editor_mode, 0);
+
+	/* DEBUG_PRINT ("Loaded in editor mode [%d]", editor_mode); */
+
+	/* Determine character encoding and convert to utf-8*/
+	if (nchars > 0)
+	{
+		if (g_utf8_validate (buffer, nchars, NULL))
+		{
+			te->encoding = NULL;
+		}
+		else
+		{
+			gchar *converted_text;
+	
+			converted_text = convert_to_utf8 (te->props_base,
+											  buffer, nchars, &te->encoding);
+			
+			if (converted_text == NULL)
+			{
+				/* bail out */
+				g_free (buffer);
+				g_free (file_content);
+				*err = g_strdup (_("The file does not look like a text file or the file encoding is not supported."
+								   " Please check if the encoding of file is in the supported encodings list."
+								   " If not, add it from the preferences."));
+				g_object_unref (gio_uri);
+
+				return FALSE;
+			}
+			g_free (buffer);
+			buffer = converted_text;
+			nchars = strlen (converted_text);
+		}
+	}
+	if (dos_filter && editor_mode == SC_EOL_CRLF){
+		/* DEBUG_PRINT ("Filtering Extrageneous DOS characters in dos mode [Dos => Unix]"); */
+		nchars = filter_chars_in_dos_mode( buffer, nchars );
+	}
+	scintilla_send_message (SCINTILLA (te->scintilla), SCI_ADDTEXT,
+							nchars, (long) buffer);
+	
+	g_free (buffer);
+
+	/* Save the buffer as last saved content */
+	g_free (te->last_saved_content);
+	te->last_saved_content = file_content;
+	
+	g_object_unref (gio_uri);
+
+	return TRUE;
+}
+
+static gboolean
+save_to_file (TextEditor *te, gchar *uri, GError **error)
+{
+	GFileOutputStream *stream;
+	GFile *gio_uri;
+	gsize nchars, size;
+	gint strip;
+	gchar *data;
+	gboolean result;
+
+	gio_uri = g_file_new_for_uri (uri);
+	stream = g_file_replace (gio_uri, NULL, FALSE, G_FILE_CREATE_NONE, NULL, error);
+
+ 	if (stream == NULL)
+		return FALSE;
+
+	result = TRUE;
+	
+	nchars = scintilla_send_message (SCINTILLA (te->scintilla),
+									 SCI_GETLENGTH, 0, 0);
+	data =	(gchar *) aneditor_command (te->editor_id,
+										ANE_GETTEXTRANGE, 0, nchars);
+	if (data)
+	{
+		gint dos_filter, editor_mode;
+		
+		size = strlen (data);
+		
+
+		/* Save in original encoding */
+		if ((te->encoding != NULL))
+		{
+			GError *conv_error = NULL;
+			gchar* converted_file_contents = NULL;
+			gsize new_len;
+			
+			/* DEBUG_PRINT ("Using encoding %s", te->encoding); */
+			
+			/* Try to convert it from UTF-8 to original encoding */
+			converted_file_contents = anjuta_convert_from_utf8 (data, -1, 
+																te->encoding,
+																&new_len,
+																&conv_error); 
+			
+			if (conv_error != NULL)
+			{
+				/* Conversion error */
+				g_error_free (conv_error);
+			}
+			else
+			{
+				g_free (data);
+				data = converted_file_contents;
+				size = strlen (converted_file_contents);
+			}
+		}
+		else
+		{
+			/* Save in utf-8 */
+			/* DEBUG_PRINT ("Using utf-8 encoding"); */
+		}				
+		
+		/* Strip trailing spaces */
+		strip = anjuta_preferences_get_bool (te->preferences,
+											STRIP_TRAILING_SPACES);
+		if (strip)
+		{
+			while (size > 0 && isspace(data[size - 1]))
+				-- size;
+		}
+		if ((size > 1) && ('\n' != data[size-1]))
+		{
+			data[size] = '\n';
+			++ size;
+		}
+		dos_filter = anjuta_preferences_get_bool (te->preferences,
+												 DOS_EOL_CHECK);
+		editor_mode =  scintilla_send_message (SCINTILLA (te->scintilla),
+											   SCI_GETEOLMODE, 0, 0);
+		/* DEBUG_PRINT ("Saving in editor mode [%d]", editor_mode); */
+		nchars = size;
+		if (editor_mode == SC_EOL_CRLF && dos_filter)
+		{
+			/* DEBUG_PRINT ("Filtering Extrageneous DOS characters in dos mode [Unix => Dos]"); */
+			size = save_filtered_in_dos_mode (stream, data, size);
+		}
+		else
+		{
+			result = g_output_stream_write_all (G_OUTPUT_STREAM (stream), 
+														data, size, 
+														&nchars, NULL, error);
+		}
+	}
+	
+	/* Set last content saved to data */
+	g_free (te->last_saved_content);
+	te->last_saved_content = data;
+	
+	if (result)
+		result = g_output_stream_close (G_OUTPUT_STREAM (stream), NULL, error);
+	else
+		g_output_stream_close (G_OUTPUT_STREAM (stream), NULL, NULL);
+
+	g_object_unref (gio_uri);
+	
+	return result;
+}
+
+gboolean
+text_editor_load_file (TextEditor * te)
+{
+	gchar *err = NULL;
+	
+	if (te == NULL || te->filename == NULL)
+		return FALSE;
+	if (IS_SCINTILLA (te->scintilla) == FALSE)
+		return FALSE;
+	anjuta_status (te->status, _("Loading file..."), 5); 
+	
+	text_editor_freeze (te);
+	
+	// te->modified_time = time (NULL);
+	text_editor_update_monitor (te, FALSE);
+	if (load_from_file (te, te->uri, &err) == FALSE)
+	{
+		anjuta_util_dialog_error (NULL,
+								  _("Could not load file: %s\n\nDetails: %s"),
+								  te->filename, err);
+		g_free (err);
+		text_editor_thaw (te);
+		return FALSE;
+	}
+	scintilla_send_message (SCINTILLA (te->scintilla), SCI_GOTOPOS,
+							0, 0);
+	// check_tm_file(te);
+	text_editor_thaw (te);
+	te->force_not_saved = FALSE;
+	scintilla_send_message (SCINTILLA (te->scintilla),
+							SCI_SETSAVEPOINT, 0, 0);
+	scintilla_send_message (SCINTILLA (te->scintilla),
+							SCI_EMPTYUNDOBUFFER, 0, 0);
+	text_editor_set_hilite_type (te, NULL);
+	if (anjuta_preferences_get_bool (te->preferences, FOLD_ON_OPEN))
+	{
+		aneditor_command (te->editor_id, ANE_CLOSE_FOLDALL, 0, 0);
+	}
+	text_editor_set_line_number_width(te);
+	anjuta_status (te->status, _("File loaded successfully"), 5); 
+	return TRUE;
+}
+
+gboolean
+text_editor_save_file (TextEditor * te, gboolean update)
+{
+	GtkWindow *parent;
+	GError *error = NULL;
+	gboolean ret = FALSE;
+
+	g_return_val_if_fail (te != NULL, FALSE);
+	g_return_val_if_fail (IS_SCINTILLA (te->scintilla), FALSE);	
+	
+	text_editor_freeze (te);
+	text_editor_set_line_number_width(te);
+	parent = GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (te)));
+	
+	anjuta_status (te->status, _("Saving file..."), 5); 
+	text_editor_update_monitor (te, TRUE);
+	
+	if (!save_to_file (te, te->uri, &error))
+	{	
+		text_editor_thaw (te);
+		g_return_val_if_fail (error != NULL, FALSE);
+		
+		anjuta_util_dialog_error (parent,
+								  _("Could not save intermediate file %s: %s"),
+								  te->uri,
+								  error->message);
+		g_signal_emit_by_name (G_OBJECT (te), "saved", NULL);
+		g_error_free (error);
+	}
+	else
+	{
+		GFile* file = g_file_new_for_uri (te->uri);
+		/* we need to update UI with the call to scintilla */
+		text_editor_thaw (te);
+		te->force_not_saved = FALSE;
+		scintilla_send_message (SCINTILLA (te->scintilla),
+								SCI_SETSAVEPOINT, 0, 0);
+		g_signal_emit_by_name (G_OBJECT (te), "saved", file);
+		g_object_unref (file);
+		anjuta_status (te->status, _("File saved successfully"), 5);
+		ret = TRUE;
+	}
+	text_editor_update_monitor (te, FALSE);
+
+	return ret;
+}
+
+void
+text_editor_set_saved (TextEditor *te, gboolean saved)
+{
+	if (saved)
+	{
+		scintilla_send_message (SCINTILLA (te->scintilla), SCI_SETSAVEPOINT, 0, 0);
+	}
+	te->force_not_saved = !saved;
+	g_signal_emit_by_name(G_OBJECT (te), "update-save-ui");
+}
+
+gboolean
+text_editor_save_yourself (TextEditor * te, FILE * stream)
+{
+	return TRUE;
+}
+
+gboolean
+text_editor_recover_yourself (TextEditor * te, FILE * stream)
+{
+	return TRUE;
+}
+
+void
+text_editor_undo (TextEditor * te)
+{
+	scintilla_send_message (SCINTILLA (te->scintilla),
+				SCI_UNDO, 0, 0);
+}
+
+void
+text_editor_redo (TextEditor * te)
+{
+	scintilla_send_message (SCINTILLA (te->scintilla),
+				SCI_REDO, 0, 0);
+}
+
+void
+text_editor_update_controls (TextEditor * te)
+{
+#if 0 //FIXME
+	gboolean F, P, L, C, S;
+
+	if (te == NULL)
+		return;
+	S = text_editor_is_saved (te);
+	L = anjuta_launcher_is_busy (app->launcher);
+	P = app->project_dbase->project_is_open;
+
+	switch (get_file_ext_type (te->filename))
+	{
+	case FILE_TYPE_C:
+	case FILE_TYPE_CPP:
+	case FILE_TYPE_ASM:
+		F = TRUE;
+		break;
+	default:
+		F = FALSE;
+	}
+	switch (get_file_ext_type (te->filename))
+	{
+	case FILE_TYPE_C:
+	case FILE_TYPE_CPP:
+	case FILE_TYPE_HEADER:
+		C = TRUE;
+		break;
+	default:
+		C = FALSE;
+	}
+	gtk_widget_set_sensitive (te->buttons.save, !S);
+	gtk_widget_set_sensitive (te->buttons.reload,
+				  (te->uri != NULL));
+	gtk_widget_set_sensitive (te->buttons.compile, F && !L);
+	gtk_widget_set_sensitive (te->buttons.build, (F || P) && !L);
+#endif
+}
+
+gboolean
+text_editor_is_saved (TextEditor * te)
+{
+	return !(scintilla_send_message (SCINTILLA (te->scintilla),
+					 SCI_GETMODIFY, 0, 0)) && (!te->force_not_saved);
+}
+
+gboolean
+text_editor_has_selection (TextEditor * te)
+{
+	gint from, to;
+	from = scintilla_send_message (SCINTILLA (te->scintilla),
+				       SCI_GETSELECTIONSTART, 0, 0);
+	to = scintilla_send_message (SCINTILLA (te->scintilla),
+				     SCI_GETSELECTIONEND, 0, 0);
+	return (from == to) ? FALSE : TRUE;
+}
+
+glong text_editor_get_selection_start (TextEditor * te)
+{
+	return scintilla_send_message (SCINTILLA (te->scintilla),
+				       SCI_GETSELECTIONSTART, 0, 0);
+}
+	
+glong text_editor_get_selection_end (TextEditor * te)
+{
+	return scintilla_send_message (SCINTILLA (te->scintilla),
+				     SCI_GETSELECTIONEND, 0, 0);
+}
+
+gchar*
+text_editor_get_selection (TextEditor * te)
+{
+	guint from, to;
+	struct TextRange tr;
+
+	from = scintilla_send_message (SCINTILLA (te->scintilla),
+				       SCI_GETSELECTIONSTART, 0, 0);
+	to = scintilla_send_message (SCINTILLA (te->scintilla),
+				     SCI_GETSELECTIONEND, 0, 0);
+	if (from == to)
+		return NULL;
+	tr.chrg.cpMin = MIN(from, to);
+	tr.chrg.cpMax = MAX(from, to);
+	tr.lpstrText = g_malloc (sizeof(gchar)*(tr.chrg.cpMax-tr.chrg.cpMin)+5);
+	scintilla_send_message (SCINTILLA(te->scintilla), SCI_GETTEXTRANGE, 0, (long)(&tr));
+	return tr.lpstrText;
+}
+
+gboolean
+text_editor_is_marker_set (TextEditor* te, glong line, gint marker)
+{
+	gint state;
+
+	g_return_val_if_fail (te != NULL, FALSE);
+	g_return_val_if_fail (line >= 0, FALSE);
+	g_return_val_if_fail (marker < 32, FALSE);
+	
+	state = scintilla_send_message (SCINTILLA(te->scintilla),
+		SCI_MARKERGET, linenum_text_editor_to_scintilla (line), 0);
+	return ((state & (1 << marker)));
+}
+
+void
+text_editor_delete_marker_all (TextEditor *te, gint marker)
+{
+	g_return_if_fail (IS_TEXT_EDITOR (te));
+	g_return_if_fail (marker < 32);
+	scintilla_send_message (SCINTILLA (te->scintilla),
+							SCI_MARKERDELETEALL, marker, 0);
+}
+
+void
+text_editor_delete_marker (TextEditor* te, glong line, gint marker)
+{
+	g_return_if_fail (IS_TEXT_EDITOR (te));
+	g_return_if_fail (line >= 0);
+	g_return_if_fail (marker < 32);
+	
+	scintilla_send_message (SCINTILLA(te->scintilla),
+		SCI_MARKERDELETE, linenum_text_editor_to_scintilla (line), marker);
+}
+
+gint
+text_editor_line_from_handle (TextEditor* te, gint marker_handle)
+{
+	gint line;
+	
+	g_return_val_if_fail (te != NULL, -1);
+	
+	line = scintilla_send_message (SCINTILLA(te->scintilla),
+		SCI_MARKERLINEFROMHANDLE, marker_handle, 0);
+	
+	return linenum_scintilla_to_text_editor (line);
+}
+
+gint
+text_editor_get_bookmark_line( TextEditor* te, const glong nLineStart )
+{
+	return aneditor_command (te->editor_id, ANE_GETBOOKMARK_POS, nLineStart, 0);
+}
+
+gint
+text_editor_get_num_bookmarks(TextEditor* te)
+{
+	gint	nLineNo = -1 ;
+	gint	nMarkers = 0 ;
+	
+	g_return_val_if_fail (te != NULL, 0 );
+
+	while( ( nLineNo = text_editor_get_bookmark_line( te, nLineNo ) ) >= 0 )
+	{
+		//printf( "Line %d\n", nLineNo );
+		nMarkers++;
+	}
+	//printf( "out Line %d\n", nLineNo );
+	return nMarkers ;
+}
+
+/* Gets the word before just before carat */
+gchar*
+text_editor_get_word_before_carat (TextEditor *te)
+{
+	gchar buffer[512];
+	buffer[0] = '\0';
+	aneditor_command (TEXT_EDITOR (te)->editor_id,
+					  ANE_GETWORDBEFORECARAT, (glong) buffer, 512);
+	if (buffer[0] != '\0')
+		return g_strdup (buffer);
+	else
+		return NULL;
+}
+
+/*
+ *Get the current selection. If there is no selection, or if the selection
+ * is all blanks, get the word under teh cursor.
+ */
+gchar*
+text_editor_get_current_word (TextEditor *te)
+{
+	char *buf = text_editor_get_selection(te);
+	if (buf)
+	{
+		g_strstrip(buf);
+		if ('\0' == *buf)
+		{
+			g_free(buf);
+			buf = NULL;
+		}
+	}
+	if (NULL == buf)
+	{
+		int ret;
+		buf = g_new(char, 256);
+		ret = aneditor_command (te->editor_id, ANE_GETCURRENTWORD, (long)buf, 255L);
+		if (!ret)
+		{
+			g_free(buf);
+			buf = NULL;
+		}
+	}
+/*
+#ifdef DEBUG
+	if (buf)
+		DEBUG_PRINT ("Current word is '%s'", buf);
+#endif
+*/
+	return buf;
+}
+
+void
+text_editor_function_select(TextEditor *te)
+{
+	gint pos;
+	gint line;
+	gint fold_level;
+	gint start, end;	
+	gint line_count;
+	gint tmp;
+
+	line_count = scintilla_send_message(SCINTILLA(te->scintilla), 
+	                                    SCI_GETLINECOUNT, 0, 0);
+	pos = scintilla_send_message(SCINTILLA(te->scintilla), 
+	                             SCI_GETCURRENTPOS, 0, 0);
+	line = scintilla_send_message(SCINTILLA(te->scintilla),
+	                              SCI_LINEFROMPOSITION, pos, 0);
+
+	tmp = line + 1;	
+	fold_level = scintilla_send_message(SCINTILLA(te->scintilla), 
+	                                    SCI_GETFOLDLEVEL, line, 0) ;	
+	if ((fold_level & 0xFF) != 0)
+	{
+		while((fold_level & 0x10FF) != 0x1000 && line >= 0)
+			fold_level = scintilla_send_message(SCINTILLA(te->scintilla), 
+	                                    SCI_GETFOLDLEVEL, --line, 0) ;
+		start = scintilla_send_message(SCINTILLA(te->scintilla), 
+	                                    SCI_POSITIONFROMLINE, line + 1, 0);
+		line = tmp;
+		fold_level = scintilla_send_message(SCINTILLA(te->scintilla), 
+	                                        SCI_GETFOLDLEVEL, line, 0) ;
+		while((fold_level & 0x10FF) != 0x1000 && line < line_count)
+			fold_level = scintilla_send_message(SCINTILLA(te->scintilla), 
+	                                            SCI_GETFOLDLEVEL, ++line, 0) ;
+
+		end = scintilla_send_message(SCINTILLA(te->scintilla), 
+	                                 SCI_POSITIONFROMLINE, line , 0);
+		scintilla_send_message(SCINTILLA(te->scintilla), 
+	                           SCI_SETSEL, start, end) ;
+	}
+}
+
+void
+text_editor_grab_focus (TextEditor *te)
+{
+	g_return_if_fail (IS_TEXT_EDITOR (te));
+	scintilla_send_message (SCINTILLA (te->scintilla), SCI_GRABFOCUS, 0, 0);
+}
+
+void
+text_editor_set_popup_menu (TextEditor *te, GtkWidget *popup_menu)
+{
+	if (popup_menu)
+		g_object_ref (popup_menu);
+	if (te->popup_menu)
+		g_object_unref (te->popup_menu);
+	te->popup_menu = popup_menu;
+}
+
+void
+text_editor_set_busy (TextEditor *te, gboolean state)
+{
+	if (state)
+		scintilla_send_message (SCINTILLA (te->scintilla),
+								SCI_SETCURSOR, SC_CURSORWAIT, 0);
+	else
+		scintilla_send_message (SCINTILLA (te->scintilla),
+								SCI_SETCURSOR, SC_CURSORNORMAL, 0);
+}
+
+gint
+text_editor_get_props ()
+{
+	/* Built in values */
+	static PropsID props_built_in = 0;
+	
+	/* System values */
+	static PropsID props_global = 0;
+	
+	/* User values */ 
+	// static PropsID props_local = 0;
+	
+	/* Session values */
+	static PropsID props_session = 0;
+	
+	/* Instance values */
+	static PropsID props = 0;
+	
+	gchar *propdir, *propfile;
+
+	if (props)
+		return props;
+	
+	props_built_in = sci_prop_set_new ();
+	props_global = sci_prop_set_new ();
+	// props_local = sci_prop_set_new ();
+	props_session = sci_prop_set_new ();
+	props = sci_prop_set_new ();
+
+	sci_prop_clear (props_built_in);
+	sci_prop_clear (props_global);
+	// sci_prop_clear (props_local);
+	sci_prop_clear (props_session);
+	sci_prop_clear (props);
+
+	sci_prop_set_parent (props_global, props_built_in);
+	// sci_prop_set_parent (props_local, props_global);
+	// sci_prop_set_parent (props_session, props_local);
+	sci_prop_set_parent (props_session, props_global);
+	sci_prop_set_parent (props, props_session);
+	
+	propdir = g_build_filename (PACKAGE_DATA_DIR, "properties/", NULL);
+	propfile = g_build_filename (PACKAGE_DATA_DIR, "properties",
+								 "anjuta.properties", NULL);
+	/* DEBUG_PRINT ("Reading file: %s", propfile); */
+	
+	if (g_file_test (propfile, G_FILE_TEST_EXISTS) == FALSE)
+	{
+		anjuta_util_dialog_error (NULL,
+			_("Cannot load Global defaults and configuration files:\n"
+			 "%s.\n"
+			 "This may result in improper behaviour or instabilities.\n"
+			 "Anjuta will fall back to built in (limited) settings"),
+			 propfile);
+	}
+	sci_prop_read (props_global, propfile, propdir);
+	g_free (propfile);
+	g_free (propdir);
+
+	propdir = anjuta_util_get_user_config_file_path ("scintilla/",NULL);
+	propfile = anjuta_util_get_user_config_file_path ("scintilla","editor-style.properties",NULL);
+	/* DEBUG_PRINT ("Reading file: %s", propfile); */
+	
+	/* Create user.properties file, if it doesn't exist */
+	if (g_file_test (propfile, G_FILE_TEST_EXISTS) == FALSE) {
+		gchar* old_propfile = anjuta_util_get_user_config_file_path ("scintilla", "session.properties", NULL);
+		if (g_file_test (old_propfile, G_FILE_TEST_EXISTS) == TRUE)
+			anjuta_util_copy_file (old_propfile, propfile, FALSE);
+		g_free (old_propfile);
+	}
+	sci_prop_read (props_session, propfile, propdir);
+	g_free (propdir);
+	g_free (propfile);
+
+	return props;
+}
+
+void
+text_editor_set_line_number_width (TextEditor* te)
+{
+	/* Set line numbers with according to file size */
+	if (anjuta_preferences_get_bool_with_default(te->preferences,
+			"margin.linenumber.visible", FALSE))
+	{
+		int lines, line_number_width;
+		gchar* line_number;
+		gchar* line_number_dummy;
+		
+		lines = 
+			(int) scintilla_send_message
+				(SCINTILLA(te->scintilla), SCI_GETLINECOUNT, 0,0);
+		line_number = g_strdup_printf("%d", lines);
+		line_number_dummy = g_strnfill(strlen(line_number) + 1, '9');
+		line_number_width = 
+			(int) scintilla_send_message (SCINTILLA(te->scintilla),
+										  SCI_TEXTWIDTH,
+										  STYLE_LINENUMBER,
+										  (long) line_number_dummy);
+		text_editor_command (te, ANE_SETLINENUMWIDTH, line_number_width, 0);
+		g_free(line_number_dummy);
+		g_free(line_number);
+	}
+}
+
+gboolean
+text_editor_can_undo (TextEditor *te)
+{
+	g_return_val_if_fail (IS_TEXT_EDITOR (te), FALSE);
+	return scintilla_send_message (SCINTILLA (te->scintilla),
+								   SCI_CANUNDO, 0, 0);
+}
+
+gboolean
+text_editor_can_redo (TextEditor *te)
+{
+	g_return_val_if_fail (IS_TEXT_EDITOR (te), FALSE);
+	return scintilla_send_message (SCINTILLA (te->scintilla),
+								   SCI_CANREDO, 0, 0);
+}
+
+void
+text_editor_show_hover_tip (TextEditor *te, gint position, const gchar *info)
+{
+	text_editor_hide_hover_tip (te);
+	if (!te->hover_tip_on)
+	{
+		scintilla_send_message (SCINTILLA (te->scintilla), SCI_CALLTIPSHOW,
+								position, (long)info);
+		scintilla_send_message (SCINTILLA (te->scintilla), SCI_CALLTIPSETHLT,
+								strlen (info), 0);
+		te->hover_tip_on = TRUE;
+	}
+}
+
+void
+text_editor_hide_hover_tip (TextEditor *te)
+{
+	if (te->hover_tip_on)
+	{
+		scintilla_send_message (SCINTILLA (te->scintilla),
+								SCI_CALLTIPCANCEL, 0, 0);
+		te->hover_tip_on = FALSE;
+	}
+}
+
+void
+text_editor_command (TextEditor *te, gint command, glong wparam, glong lparam)
+{
+	GList *node;
+	
+	node = te->views;
+	while (node)
+	{
+		aneditor_command (GPOINTER_TO_INT (node->data), command, wparam, lparam);
+		node = g_list_next(node);
+	}
+}
+
+void
+text_editor_scintilla_command (TextEditor *te, gint command, glong wparam,
+							   glong lparam)
+{
+	GList *node;
+	
+	node = te->views;
+	while (node)
+	{
+		GtkWidget *scintilla;
+		scintilla = aneditor_get_widget (GPOINTER_TO_INT (node->data));
+		scintilla_send_message (SCINTILLA(scintilla), command, wparam, lparam);
+		node = g_list_next(node);
+	}
+}
+
+/* IAnjutaEditor interface implementation */
+
+static gint
+itext_editor_get_tab_size (IAnjutaEditor *editor, GError **e)
+{
+	return scintilla_send_message (SCINTILLA (TEXT_EDITOR (editor)->scintilla),
+								   SCI_GETTABWIDTH, 0, 0);
+}
+
+static void
+itext_editor_set_tab_size (IAnjutaEditor *editor, gint tabsize, GError **e)
+{
+	scintilla_send_message (SCINTILLA (TEXT_EDITOR (editor)->scintilla),
+							SCI_SETTABWIDTH, tabsize, 0);
+}
+
+static gboolean
+itext_editor_get_use_spaces (IAnjutaEditor *editor, GError **e)
+{
+	return !scintilla_send_message (SCINTILLA (TEXT_EDITOR (editor)->scintilla),
+								    SCI_GETUSETABS, 0, 0);
+}
+
+static void
+itext_editor_set_use_spaces (IAnjutaEditor *editor, gboolean use_spaces, GError **e)
+{
+	scintilla_send_message (SCINTILLA (TEXT_EDITOR (editor)->scintilla),
+							SCI_SETUSETABS, !use_spaces, 0);
+}
+
+static void
+itext_editor_set_auto_indent (IAnjutaEditor *editor, gboolean auto_indent, GError **e)
+{
+  text_editor_command (TEXT_EDITOR(editor), ANE_SETINDENTMAINTAIN, auto_indent, 0);
+}
+
+static void
+itext_editor_goto_line (IAnjutaEditor *editor, gint lineno, GError **e)
+{
+	text_editor_goto_line (TEXT_EDITOR (editor), lineno, FALSE, TRUE);
+	gtk_widget_grab_focus (TEXT_EDITOR (editor)->scintilla);
+}
+
+static void
+itext_editor_goto_start (IAnjutaEditor *editor, GError **e)
+{
+	text_editor_goto_point (TEXT_EDITOR (editor), 0);
+}
+
+static void
+itext_editor_goto_end (IAnjutaEditor *editor, GError **e)
+{
+	text_editor_goto_point (TEXT_EDITOR (editor), -1);
+}
+
+static void
+itext_editor_goto_position (IAnjutaEditor *editor, IAnjutaIterable *position,
+							GError **e)
+{
+	text_editor_goto_point (TEXT_EDITOR (editor),
+							text_editor_cell_get_position (TEXT_EDITOR_CELL
+														   (position)));
+}
+
+static gchar*
+itext_editor_get_text_all (IAnjutaEditor *editor, GError **e)
+{
+	TextEditor *te = TEXT_EDITOR (editor);
+	gint length = scintilla_send_message (SCINTILLA (te->scintilla),
+										  SCI_GETLENGTH, 0, 0);
+	if (length > 0)
+		return (gchar *) aneditor_command (te->editor_id, ANE_GETTEXTRANGE,
+										   0, length);
+	else
+		return NULL;
+}
+
+static gchar*
+itext_editor_get_text (IAnjutaEditor *editor, IAnjutaIterable* begin,
+					   IAnjutaIterable* end, GError **e)
+{
+	gchar *data;
+	gint start_pos = text_editor_cell_get_position (TEXT_EDITOR_CELL (begin));
+	gint end_pos = text_editor_cell_get_position (TEXT_EDITOR_CELL (end));
+	TextEditor *te = TEXT_EDITOR (editor);
+	data =	(gchar *) aneditor_command (te->editor_id, ANE_GETTEXTRANGE,
+										  start_pos, end_pos);
+	return data;
+}
+
+static IAnjutaIterable*
+itext_editor_get_position (IAnjutaEditor* editor, GError **e)
+{
+	TextEditor *te = TEXT_EDITOR (editor);
+	gint position = text_editor_get_current_position (te);
+	TextEditorCell *position_iter = text_editor_cell_new (te, position);
+	return IANJUTA_ITERABLE (position_iter);
+}
+
+static gint
+itext_editor_get_offset (IAnjutaEditor *editor, GError **e)
+{
+	gint pos;
+	IAnjutaIterable *iter = itext_editor_get_position (editor, NULL);
+	pos = ianjuta_iterable_get_position (iter, NULL);
+	g_object_unref (iter);
+	return pos;
+}
+
+static gint
+itext_editor_get_lineno (IAnjutaEditor *editor, GError **e)
+{
+	return text_editor_get_current_lineno (TEXT_EDITOR (editor));
+}
+
+static gint
+itext_editor_get_length (IAnjutaEditor *editor, GError **e)
+{
+        return aneditor_command (TEXT_EDITOR (editor)->editor_id,
+		       	ANE_GETLENGTH, 0, 0);
+}
+
+static gchar*
+itext_editor_get_current_word (IAnjutaEditor *editor, GError **e)
+{
+	gchar buffer[512];
+	buffer[0] = '\0';
+	aneditor_command (TEXT_EDITOR (editor)->editor_id,
+					  ANE_GETCURRENTWORD, (glong) buffer, 512);
+	if (buffer[0] != '\0')
+		return g_strdup (buffer);
+	else
+		return NULL;
+}
+
+static void
+itext_editor_insert (IAnjutaEditor *editor, IAnjutaIterable *position,
+					 const gchar *txt, gint length, GError **e)
+{
+	gchar *text_to_insert;
+	if (length >= 0)
+		text_to_insert = g_strndup (txt, length);
+	else
+		text_to_insert = g_strdup (txt);
+	
+	aneditor_command (TEXT_EDITOR(editor)->editor_id, ANE_INSERTTEXT,
+					  text_editor_cell_get_position
+					  (TEXT_EDITOR_CELL (position)),
+					  (long)text_to_insert);
+	g_free (text_to_insert);
+}
+
+static void
+itext_editor_append (IAnjutaEditor *editor, const gchar *txt,
+					 gint length, GError **e)
+{
+	gchar *text_to_insert;
+	if (length >= 0)
+		text_to_insert = g_strndup (txt, length);
+	else
+		text_to_insert = g_strdup (txt);
+	
+	scintilla_send_message (SCINTILLA (TEXT_EDITOR (editor)->scintilla),
+							SCI_APPENDTEXT, strlen(text_to_insert),
+							(long)text_to_insert);
+	g_free (text_to_insert);
+}
+
+static void
+itext_editor_erase (IAnjutaEditor *editor,
+					IAnjutaIterable *position_start,
+					IAnjutaIterable *position_end, GError **e)
+{
+	gint start, end;
+	
+	/* If both positions are NULL, erase all */
+	if (position_start == NULL && position_end == NULL)
+	{
+		scintilla_send_message (SCINTILLA (TEXT_EDITOR (editor)->scintilla), 
+								SCI_CLEARALL,
+								0, 0);
+		return;
+	}
+	
+	/* Determine correct start and end byte positions */
+	if (position_start)
+		start = text_editor_cell_get_position (TEXT_EDITOR_CELL (position_start));
+	else
+		start = 0;
+	
+	if (position_end)
+		end = text_editor_cell_get_position (TEXT_EDITOR_CELL (position_end));
+	else
+		end = scintilla_send_message (SCINTILLA (TEXT_EDITOR (editor)->scintilla),
+									  SCI_GETLENGTH, 0, 0);
+	if (start != end)
+	{
+		scintilla_send_message (SCINTILLA(TEXT_EDITOR (editor)->scintilla),
+								SCI_SETSEL, start, end);
+		text_editor_replace_selection (TEXT_EDITOR (editor), "");
+	}
+}
+
+static void
+itext_editor_erase_all (IAnjutaEditor *editor, GError **e)
+{
+	scintilla_send_message (SCINTILLA (TEXT_EDITOR (editor)->scintilla), 
+							SCI_CLEARALL,
+							0, 0);
+}
+
+static int
+itext_editor_get_column (IAnjutaEditor *editor, GError **e)
+{
+	return text_editor_get_current_column (TEXT_EDITOR(editor));
+}
+
+static gboolean
+itext_editor_get_overwrite (IAnjutaEditor *editor, GError **e)
+{
+	return text_editor_get_overwrite (TEXT_EDITOR (editor));
+}
+
+static void
+itext_editor_set_popup_menu (IAnjutaEditor *editor, GtkWidget* menu, GError **e)
+{
+	text_editor_set_popup_menu (TEXT_EDITOR (editor), menu);
+}
+
+static gint
+itext_editor_get_line_from_position (IAnjutaEditor *editor,
+									 IAnjutaIterable *position, GError **e)
+{
+	return text_editor_get_line_from_position (TEXT_EDITOR (editor),
+				text_editor_cell_get_position (TEXT_EDITOR_CELL (position)));
+}
+
+static IAnjutaIterable*
+itext_editor_get_line_begin_position (IAnjutaEditor *editor, gint line,
+									  GError **e)
+{
+	gint ln, byte_pos;
+	TextEditor *te;
+	
+	g_return_val_if_fail (line > 0, NULL);
+	te = TEXT_EDITOR (editor);
+	ln = linenum_text_editor_to_scintilla (line);
+	byte_pos = scintilla_send_message (SCINTILLA (te->scintilla),
+								   SCI_POSITIONFROMLINE, ln, 0);
+	return IANJUTA_ITERABLE (text_editor_cell_new (te, byte_pos));
+}
+
+static IAnjutaIterable*
+itext_editor_get_line_end_position (IAnjutaEditor *editor, gint line,
+									  GError **e)
+{
+	gint ln, byte_pos;
+	TextEditor *te;
+	
+	g_return_val_if_fail (line > 0, NULL);
+	te = TEXT_EDITOR (editor);
+	
+	ln = linenum_text_editor_to_scintilla (line);
+	byte_pos = scintilla_send_message (SCINTILLA (te->scintilla),
+								   SCI_GETLINEENDPOSITION, ln, 0);
+	return IANJUTA_ITERABLE (text_editor_cell_new (te, byte_pos));
+}
+
+static IAnjutaIterable*
+itext_editor_get_position_from_offset (IAnjutaEditor *editor, gint offset, GError **e)
+{
+	TextEditorCell *editor_cell = text_editor_cell_new (TEXT_EDITOR (editor), 0);
+	/* Set to the right utf8 character offset */
+	ianjuta_iterable_set_position (IANJUTA_ITERABLE (editor_cell), offset, NULL);
+	return IANJUTA_ITERABLE (editor_cell);
+}
+
+static IAnjutaIterable*
+itext_editor_get_start_position (IAnjutaEditor *editor, GError **e)
+{
+	TextEditorCell *editor_cell = text_editor_cell_new (TEXT_EDITOR (editor), 0);
+	return IANJUTA_ITERABLE (editor_cell);
+}
+
+static IAnjutaIterable*
+itext_editor_get_end_position (IAnjutaEditor *editor, GError **e)
+{
+	gint length = scintilla_send_message (SCINTILLA (TEXT_EDITOR (editor)->scintilla),
+										  SCI_GETLENGTH, 0, 0);
+	TextEditorCell *editor_cell = text_editor_cell_new (TEXT_EDITOR (editor),
+														length);
+	return IANJUTA_ITERABLE (editor_cell);
+}
+
+static void
+itext_editor_iface_init (IAnjutaEditorIface *iface)
+{
+	iface->get_tabsize = itext_editor_get_tab_size;
+	iface->set_tabsize = itext_editor_set_tab_size;
+	iface->get_use_spaces = itext_editor_get_use_spaces;
+	iface->set_use_spaces = itext_editor_set_use_spaces;
+	iface->set_auto_indent = itext_editor_set_auto_indent;	
+	iface->goto_line = itext_editor_goto_line;
+	iface->goto_start = itext_editor_goto_start;
+	iface->goto_end = itext_editor_goto_end;
+	iface->goto_position = itext_editor_goto_position;
+	iface->get_text_all = itext_editor_get_text_all;
+	iface->get_text = itext_editor_get_text;
+	iface->get_offset = itext_editor_get_offset;
+	iface->get_position = itext_editor_get_position;
+	iface->get_lineno = itext_editor_get_lineno;
+	iface->get_length = itext_editor_get_length;
+	iface->get_current_word = itext_editor_get_current_word;
+	iface->insert = itext_editor_insert;
+	iface->append = itext_editor_append;
+	iface->erase = itext_editor_erase;
+	iface->erase_all = itext_editor_erase_all;
+	iface->get_column = itext_editor_get_column;
+	iface->get_overwrite = itext_editor_get_overwrite;
+	iface->set_popup_menu = itext_editor_set_popup_menu;
+	iface->get_line_from_position = itext_editor_get_line_from_position;
+	iface->get_line_begin_position = itext_editor_get_line_begin_position;
+	iface->get_line_end_position = itext_editor_get_line_end_position;
+	iface->get_position_from_offset = itext_editor_get_position_from_offset;
+	iface->get_start_position = itext_editor_get_start_position;
+	iface->get_end_position = itext_editor_get_end_position;
+}
+
+static const gchar *
+idocument_get_filename (IAnjutaDocument *editor, GError **e)
+{
+	return (TEXT_EDITOR (editor))->filename;
+}
+
+static gboolean
+idocument_can_undo(IAnjutaDocument* editor, GError **e)
+{
+	return text_editor_can_undo(TEXT_EDITOR(editor));
+}
+
+static gboolean
+idocument_can_redo(IAnjutaDocument *editor, GError **e)
+{
+	return text_editor_can_redo(TEXT_EDITOR(editor));
+}
+
+static void 
+idocument_undo(IAnjutaDocument* te, GError** ee)
+{
+	text_editor_command(TEXT_EDITOR(te), ANE_UNDO, 0, 0);
+}
+
+static void 
+idocument_begin_undo_action (IAnjutaDocument* te, GError** ee)
+{
+	scintilla_send_message (SCINTILLA (TEXT_EDITOR (te)->scintilla),
+							SCI_BEGINUNDOACTION, 0, 0);
+}
+
+static void 
+idocument_end_undo_action (IAnjutaDocument* te, GError** ee)
+{
+	scintilla_send_message (SCINTILLA (TEXT_EDITOR (te)->scintilla),
+							SCI_ENDUNDOACTION, 0, 0);
+}
+
+static void 
+idocument_redo(IAnjutaDocument* te, GError** ee)
+{
+	text_editor_command(TEXT_EDITOR(te), ANE_REDO, 0, 0);
+}
+
+static void
+idocument_grab_focus (IAnjutaDocument *editor, GError **e)
+{
+	text_editor_grab_focus (TEXT_EDITOR (editor));
+}
+
+static void 
+idocument_cut(IAnjutaDocument * te, GError** ee)
+{
+	text_editor_command(TEXT_EDITOR(te), ANE_CUT, 0, 0);
+}
+
+static void 
+idocument_copy(IAnjutaDocument * te, GError** ee)
+{
+	text_editor_command(TEXT_EDITOR(te), ANE_COPY, 0, 0);
+}
+
+static void 
+idocument_paste(IAnjutaDocument * te, GError** ee)
+{
+	text_editor_command(TEXT_EDITOR(te), ANE_PASTE, 0, 0);
+}
+
+static void 
+idocument_clear(IAnjutaDocument * te, GError** ee)
+{
+	text_editor_command(TEXT_EDITOR(te), ANE_CLEAR, 0, 0);
+}
+
+static void
+idocument_iface_init(IAnjutaDocumentIface* iface)
+{
+	iface->get_filename = idocument_get_filename;
+	iface->can_undo = idocument_can_undo;
+	iface->can_redo = idocument_can_redo;
+	iface->undo = idocument_undo;
+	iface->redo = idocument_redo;
+	iface->begin_undo_action = idocument_begin_undo_action;
+	iface->end_undo_action = idocument_end_undo_action;
+	iface->grab_focus = idocument_grab_focus;
+	iface->cut = idocument_cut;
+	iface->copy = idocument_copy;
+	iface->paste = idocument_paste;
+	iface->clear = idocument_clear;
+}
+
+/* IAnjutaEditorSelection implementation */
+
+static gchar*
+iselection_get (IAnjutaEditorSelection *editor, GError **error)
+{
+	return text_editor_get_selection (TEXT_EDITOR (editor));
+}
+
+static void
+iselection_set (IAnjutaEditorSelection* edit, 
+				IAnjutaIterable* istart,
+				IAnjutaIterable* iend,
+				gboolean scroll, /* TODO: Is is possible to set this in scintilla? */
+				GError** e)
+{
+	TextEditorCell* start = TEXT_EDITOR_CELL (istart);
+	TextEditorCell* end = TEXT_EDITOR_CELL (iend);
+	int start_pos = text_editor_cell_get_position (start);
+	int end_pos = text_editor_cell_get_position (end);
+	
+	scintilla_send_message (SCINTILLA (TEXT_EDITOR (edit)->scintilla),
+						    SCI_SETSEL, start_pos, end_pos);
+}
+
+static gboolean
+iselection_has_selection (IAnjutaEditorSelection *editor, GError **e)
+{
+	return text_editor_has_selection (TEXT_EDITOR (editor));
+}
+
+static IAnjutaIterable*
+iselection_get_start (IAnjutaEditorSelection *edit, GError **e)
+{
+	gint start =  scintilla_send_message (SCINTILLA(TEXT_EDITOR(edit)->scintilla),
+										  SCI_GETSELECTIONSTART, 0, 0);
+	gint end = scintilla_send_message (SCINTILLA(TEXT_EDITOR(edit)->scintilla),
+									   SCI_GETSELECTIONEND, 0, 0);
+	if (start != end)
+	{
+		return IANJUTA_ITERABLE (text_editor_cell_new (TEXT_EDITOR (edit), start));
+	}
+	else
+		return NULL;
+}
+
+static IAnjutaIterable*
+iselection_get_end (IAnjutaEditorSelection *edit, GError **e)
+{
+	gint start =  scintilla_send_message (SCINTILLA(TEXT_EDITOR(edit)->scintilla),
+										  SCI_GETSELECTIONSTART, 0, 0);
+	gint end = scintilla_send_message (SCINTILLA(TEXT_EDITOR(edit)->scintilla),
+									   SCI_GETSELECTIONEND, 0, 0);
+	if (start != end)
+	{
+		return IANJUTA_ITERABLE (text_editor_cell_new (TEXT_EDITOR (edit), end));
+	}
+	else
+		return NULL;
+}
+
+static void
+iselection_replace (IAnjutaEditorSelection *editor, const gchar *txt,
+					gint length, GError **e)
+{
+	gchar *text_to_insert;
+	if (length >= 0)
+		text_to_insert = g_strndup (txt, length);
+	else
+		text_to_insert = g_strdup (txt);
+	
+	text_editor_replace_selection (TEXT_EDITOR (editor), text_to_insert);
+
+	g_free (text_to_insert);
+}
+
+static void
+iselection_select_all (IAnjutaEditorSelection* te, GError** ee)
+{
+	text_editor_command (TEXT_EDITOR (te), ANE_SELECTALL, 0, 0);
+}
+
+static void
+iselection_select_block (IAnjutaEditorSelection *te, GError **e)
+{
+	text_editor_command (TEXT_EDITOR(te), ANE_SELECTBLOCK, 0, 0);
+}
+
+static void
+iselection_select_function (IAnjutaEditorSelection *editor, GError **e)
+{
+	TextEditor* te = TEXT_EDITOR(editor);
+	gint pos;
+	gint line;
+	gint fold_level;
+	gint start, end;	
+	gint line_count;
+	gint tmp;
+
+	line_count = scintilla_send_message (SCINTILLA (te->scintilla), 
+										 SCI_GETLINECOUNT, 0, 0);
+	pos = scintilla_send_message (SCINTILLA (te->scintilla), 
+								  SCI_GETCURRENTPOS, 0, 0);
+	line = scintilla_send_message (SCINTILLA (te->scintilla),
+								   SCI_LINEFROMPOSITION, pos, 0);
+
+	tmp = line + 1;	
+	fold_level = scintilla_send_message (SCINTILLA (te->scintilla), 
+										 SCI_GETFOLDLEVEL, line, 0) ;	
+	if ((fold_level & 0xFF) != 0)
+	{
+		while ((fold_level & 0x10FF) != 0x1000 && line >= 0)
+			fold_level = scintilla_send_message (SCINTILLA (te->scintilla), 
+												 SCI_GETFOLDLEVEL, --line, 0) ;
+		start = scintilla_send_message (SCINTILLA (te->scintilla), 
+										SCI_POSITIONFROMLINE, line + 1, 0);
+		line = tmp;
+		fold_level = scintilla_send_message (SCINTILLA (te->scintilla), 
+											 SCI_GETFOLDLEVEL, line, 0) ;
+		while ((fold_level & 0x10FF) != 0x1000 && line < line_count)
+			fold_level = scintilla_send_message (SCINTILLA (te->scintilla), 
+												 SCI_GETFOLDLEVEL, ++line, 0) ;
+
+		end = scintilla_send_message (SCINTILLA (te->scintilla), 
+									  SCI_POSITIONFROMLINE, line , 0);
+		scintilla_send_message (SCINTILLA (te->scintilla), 
+								SCI_SETSEL, start, end) ;
+	}
+}
+
+static void
+iselection_iface_init (IAnjutaEditorSelectionIface *iface)
+{
+	iface->has_selection = iselection_has_selection;
+	iface->get = iselection_get;
+	iface->set = iselection_set;
+	iface->get_start = iselection_get_start;
+	iface->get_end = iselection_get_end;
+	iface->replace = iselection_replace;
+	iface->select_all = iselection_select_all;
+	iface->select_block = iselection_select_block;
+	iface->select_function = iselection_select_function;
+}
+
+/* IAnjutaFile implementation */
+
+static GFile*
+ifile_get_file (IAnjutaFile *editor, GError **error)
+{
+	TextEditor *text_editor;
+	text_editor = TEXT_EDITOR(editor);
+	if (text_editor->uri)
+		return g_file_new_for_uri (text_editor->uri);
+	else
+		return NULL;
+}
+
+static void
+ifile_open (IAnjutaFile *editor, GFile* file, GError **error)
+{
+	/* Close current file and open new file in this editor */
+	TextEditor* text_editor;
+	text_editor = TEXT_EDITOR(editor);
+
+	/* Remove path */
+	g_free (text_editor->uri);
+	text_editor->uri = g_file_get_uri (file);
+	g_free (text_editor->filename);
+	text_editor->filename = g_file_get_basename (file);
+	text_editor_load_file (text_editor);
+}
+
+static void
+isaveable_save (IAnjutaFileSavable* editor, GError** e)
+{
+	TextEditor *text_editor = TEXT_EDITOR(editor);
+
+	if (text_editor->uri != NULL)
+		text_editor_save_file(text_editor, FALSE);
+	else
+		g_signal_emit_by_name (G_OBJECT (text_editor), "saved", NULL);
+}
+
+static void
+isavable_save_as (IAnjutaFileSavable* editor, GFile* file, GError** e)
+{
+	const gchar *past_language;
+	const gchar *curr_language;
+	TextEditor *text_editor = TEXT_EDITOR(editor);
+	
+	past_language =
+		ianjuta_editor_language_get_language (IANJUTA_EDITOR_LANGUAGE (text_editor),
+											  NULL);
+	
+	/* Remove path */
+	g_free (text_editor->uri);
+	text_editor->uri = g_file_get_uri (file);
+	g_free (text_editor->filename);
+	text_editor->filename = g_file_get_basename (file);
+	text_editor_save_file (text_editor, FALSE);
+	text_editor_set_hilite_type (text_editor, NULL);
+	text_editor_hilite (text_editor, FALSE);
+	
+	/* We have to take care of 'language-change' signal ourself because
+	 * text_editor_set_hilite_type() only emits it for forced hilite type
+	 */
+	curr_language =
+		ianjuta_editor_language_get_language (IANJUTA_EDITOR_LANGUAGE (text_editor),
+											  NULL);
+	if (past_language != curr_language)
+		g_signal_emit_by_name (text_editor, "language-changed", curr_language);
+	
+}
+
+static gboolean
+isavable_is_dirty (IAnjutaFileSavable* editor, GError** e)
+{
+	TextEditor *text_editor = TEXT_EDITOR(editor);
+	return !text_editor_is_saved (text_editor);
+}
+
+static void
+isavable_set_dirty (IAnjutaFileSavable* editor, gboolean dirty, GError** e)
+{
+	TextEditor *text_editor = TEXT_EDITOR(editor);
+	text_editor_set_saved (text_editor, !dirty);
+}
+
+static gboolean
+isavable_is_read_only (IAnjutaFileSavable* savable, GError** e)
+{
+	/* FIXME */
+	return FALSE;
+}
+
+static gboolean
+isavable_is_conflict (IAnjutaFileSavable* savable, GError** e)
+{
+	TextEditor *te = TEXT_EDITOR(savable);
+	return  te->message_area != NULL;
+}
+
+static void
+isavable_iface_init (IAnjutaFileSavableIface *iface)
+{
+	iface->save = isaveable_save;
+	iface->save_as = isavable_save_as;
+	iface->set_dirty = isavable_set_dirty;
+	iface->is_dirty = isavable_is_dirty;
+	iface->is_read_only = isavable_is_read_only;
+	iface->is_conflict = isavable_is_conflict;
+}
+
+static void
+ifile_iface_init (IAnjutaFileIface *iface)
+{
+	iface->open = ifile_open;
+	iface->get_file = ifile_get_file;
+}
+
+/* Implementation of the IAnjutaMarkable interface */
+
+static gint
+marker_ianjuta_to_editor (IAnjutaMarkableMarker marker)
+{
+	gint mark;
+	switch (marker)
+	{
+		case IANJUTA_MARKABLE_LINEMARKER:
+			mark = TEXT_EDITOR_LINEMARKER;
+			break;
+		case IANJUTA_MARKABLE_BOOKMARK:
+			mark = TEXT_EDITOR_BOOKMARK;
+			break;
+		case IANJUTA_MARKABLE_BREAKPOINT_DISABLED:
+			mark = TEXT_EDITOR_BREAKPOINT_DISABLED;
+			break;
+		case IANJUTA_MARKABLE_BREAKPOINT_ENABLED:
+			mark = TEXT_EDITOR_BREAKPOINT_ENABLED;
+			break;
+		case IANJUTA_MARKABLE_PROGRAM_COUNTER:
+			mark = TEXT_EDITOR_PROGRAM_COUNTER;
+			break;
+		default:
+			mark = TEXT_EDITOR_LINEMARKER;
+	}
+	return mark;
+}
+
+static gint
+imarkable_mark (IAnjutaMarkable* editor, gint location,
+				IAnjutaMarkableMarker marker, GError** e)
+{
+	return text_editor_set_marker (TEXT_EDITOR (editor), location,
+								   marker_ianjuta_to_editor (marker));
+}
+
+static gint
+imarkable_location_from_handle (IAnjutaMarkable* editor, gint handle, GError** e)
+{
+	return text_editor_line_from_handle (TEXT_EDITOR (editor), handle);
+}
+
+static void
+imarkable_unmark (IAnjutaMarkable* editor, gint location,
+				  IAnjutaMarkableMarker marker, GError** e)
+{
+	text_editor_delete_marker (TEXT_EDITOR (editor), location,
+							   marker_ianjuta_to_editor (marker));
+}
+
+static gboolean
+imarkable_is_marker_set (IAnjutaMarkable* editor, gint location,
+						 IAnjutaMarkableMarker marker, GError** e)
+{
+	return text_editor_is_marker_set (TEXT_EDITOR (editor), location,
+									  marker_ianjuta_to_editor (marker));
+}
+
+static void
+imarkable_delete_all_markers (IAnjutaMarkable* editor,
+							  IAnjutaMarkableMarker marker, GError** e)
+{
+	text_editor_delete_marker_all (TEXT_EDITOR (editor),
+								   marker_ianjuta_to_editor (marker));
+}
+
+static void
+imarkable_iface_init (IAnjutaMarkableIface *iface)
+{
+	iface->mark = imarkable_mark;
+	iface->location_from_handle = imarkable_location_from_handle;
+	iface->unmark = imarkable_unmark;
+	iface->is_marker_set = imarkable_is_marker_set;
+	iface->delete_all_markers = imarkable_delete_all_markers;
+}
+
+/* IAnjutaEditorConvert implementation */
+
+static void
+iconvert_to_upper (IAnjutaEditorConvert* te, IAnjutaIterable *start_position,
+				   IAnjutaIterable *end_position, GError** ee)
+{
+	gint start, end;
+	start = text_editor_cell_get_position (TEXT_EDITOR_CELL (start_position));
+	end = text_editor_cell_get_position (TEXT_EDITOR_CELL (end_position));
+	scintilla_send_message (SCINTILLA (TEXT_EDITOR(te)->scintilla),
+							SCI_SETSEL, start, end);
+	text_editor_command (TEXT_EDITOR(te), ANE_UPRCASE, 0, 0);
+}
+
+static void
+iconvert_to_lower(IAnjutaEditorConvert* te, IAnjutaIterable *start_position,
+				  IAnjutaIterable *end_position, GError** ee)
+{
+	gint start, end;
+	start = text_editor_cell_get_position (TEXT_EDITOR_CELL (start_position));
+	end = text_editor_cell_get_position (TEXT_EDITOR_CELL (end_position));
+	scintilla_send_message (SCINTILLA (TEXT_EDITOR(te)->scintilla),
+							SCI_SETSEL, start, end);
+	text_editor_command (TEXT_EDITOR (te), ANE_LWRCASE, 0, 0);	
+}
+
+static void
+iconvert_iface_init (IAnjutaEditorConvertIface *iface)
+{
+	iface->to_lower = iconvert_to_lower;
+	iface->to_upper = iconvert_to_upper;
+}
+
+/* IAnjutaEditorLineMode implementation */
+
+static IAnjutaEditorLineModeType
+ilinemode_get (IAnjutaEditorLineMode* te, GError** err)
+{
+	glong eolmode;
+	IAnjutaEditorLineModeType retmode;
+	
+	g_return_val_if_fail (IS_TEXT_EDITOR (te), IANJUTA_EDITOR_LINE_MODE_LF);
+	
+	eolmode = scintilla_send_message (SCINTILLA (TEXT_EDITOR (te)->scintilla),
+									  SCI_GETEOLMODE, 0, 0);
+	
+	switch (eolmode) {
+		case SC_EOL_CR:
+			retmode = IANJUTA_EDITOR_LINE_MODE_CR;
+		break;
+		case SC_EOL_CRLF:
+			retmode = IANJUTA_EDITOR_LINE_MODE_CRLF;
+		break;
+		case SC_EOL_LF:
+			retmode = IANJUTA_EDITOR_LINE_MODE_LF;
+		break;
+		default:
+			retmode = IANJUTA_EDITOR_LINE_MODE_LF;
+			g_warning ("Should not be here");
+	}
+	return retmode;
+}
+
+static void
+ilinemode_set (IAnjutaEditorLineMode* te, IAnjutaEditorLineModeType mode,
+			   GError** err)
+{
+	g_return_if_fail (IS_TEXT_EDITOR (te));
+	
+	switch (mode)
+	{
+		case IANJUTA_EDITOR_LINE_MODE_LF:
+			text_editor_command(TEXT_EDITOR(te), ANE_EOL_LF, 0, 0);
+		break;
+		
+		case IANJUTA_EDITOR_LINE_MODE_CR:
+			text_editor_command(TEXT_EDITOR(te), ANE_EOL_CR, 0, 0);
+		break;
+		
+		case IANJUTA_EDITOR_LINE_MODE_CRLF:
+			text_editor_command(TEXT_EDITOR(te), ANE_EOL_CRLF, 0, 0);
+		break;
+		
+		default:
+			g_warning ("Should not reach here");
+		break;
+	}
+}
+
+static void
+ilinemode_convert (IAnjutaEditorLineMode *te, IAnjutaEditorLineModeType mode,
+				   GError **err)
+{
+	switch (mode)
+	{
+		case IANJUTA_EDITOR_LINE_MODE_LF:
+			text_editor_command (TEXT_EDITOR (te), ANE_EOL_CONVERT,
+								ANE_EOL_LF, 0);
+		break;
+		
+		case IANJUTA_EDITOR_LINE_MODE_CR:
+			text_editor_command (TEXT_EDITOR (te), ANE_EOL_CONVERT,
+								 ANE_EOL_CR, 0);
+		break;
+		
+		case IANJUTA_EDITOR_LINE_MODE_CRLF:
+			text_editor_command (TEXT_EDITOR (te), ANE_EOL_CONVERT,
+								 ANE_EOL_CRLF, 0);
+		break;
+		
+		default:
+			g_warning ("Should not reach here");
+		break;
+	}
+}
+
+static void
+ilinemode_fix (IAnjutaEditorLineMode* te, GError** err)
+{
+	IAnjutaEditorLineModeType mode = ilinemode_get (te, NULL);
+	ilinemode_convert (te, mode, NULL);
+}
+
+static void
+ilinemode_iface_init (IAnjutaEditorLineModeIface *iface)
+{
+	iface->set = ilinemode_set;
+	iface->get = ilinemode_get;
+	iface->convert = ilinemode_convert;
+	iface->fix = ilinemode_fix;
+}
+
+/* IAnjutaEditorAssist implementation */
+
+static void
+iassist_suggest (IAnjutaEditorAssist *iassist, GList* choices,
+				 IAnjutaIterable *position, int char_alignment, GError **err)
+{
+	GString *words;
+	GList *choice;
+	TextEditor *te = TEXT_EDITOR (iassist);
+	
+	g_return_if_fail (IS_TEXT_EDITOR (te));
+					 
+	if (!choices)
+	{
+		scintilla_send_message (SCINTILLA (te->scintilla), SCI_AUTOCCANCEL,
+								0, 0);
+		scintilla_send_message (SCINTILLA (te->scintilla), SCI_CALLTIPCANCEL,
+								0, 0);
+		return;
+	}
+	
+	words = g_string_sized_new (256);
+	
+	choice = choices;
+	while (choice)
+	{
+		if (choice->data)
+		{
+			if (words->len > 0)
+				g_string_append_c (words, ' ');
+			g_string_append(words, choice->data);
+		}
+		choice = g_list_next (choice);
+	}
+	scintilla_send_message (SCINTILLA (te->scintilla),
+							SCI_AUTOCSETAUTOHIDE, 1, 0);
+	scintilla_send_message (SCINTILLA (te->scintilla),
+							SCI_AUTOCSETDROPRESTOFWORD, 1, 0);
+	scintilla_send_message (SCINTILLA (te->scintilla),
+							SCI_AUTOCSETCANCELATSTART, 0, 0);
+	scintilla_send_message (SCINTILLA (te->scintilla),
+							SCI_AUTOCSETCHOOSESINGLE, 0, 0);
+						 
+	if (char_alignment == 0)
+		scintilla_send_message (SCINTILLA (te->scintilla),
+								SCI_USERLISTSHOW, 1 /* dummy */,
+								(uptr_t) words->str);
+	else
+		scintilla_send_message (SCINTILLA (te->scintilla),
+								SCI_AUTOCSHOW, char_alignment,
+								(uptr_t) words->str);
+	g_string_free (words, TRUE);
+}
+
+static GList*
+iassist_get_suggestions (IAnjutaEditorAssist *iassist, const gchar *context, GError **err)
+{
+	/* FIXME: Implement new IAnjutaEditorAssist interface */
+
+	return NULL;
+}
+
+static void 
+iassist_show_tips (IAnjutaEditorAssist *iassist, GList* tips,
+				   IAnjutaIterable *position, gint char_alignment, GError **err)
+{
+	GString *calltip;
+	GList *tip;
+	gint tips_count;
+	TextEditor *te = TEXT_EDITOR (iassist);
+	TextEditorCell *cell = TEXT_EDITOR_CELL (position);
+	gint column;
+	gint pos;
+	gint calltip_pos;
+	gint line;
+	gint calltip_lines = 0;
+	int i;
+	
+	g_return_if_fail (IS_TEXT_EDITOR (te));
+	g_return_if_fail (tips != NULL);
+	tips_count = g_list_length (tips);
+	g_return_if_fail (tips_count > 0);
+	
+	DEBUG_PRINT ("Number of calltips found %d\n", tips_count);
+	
+	calltip = g_string_sized_new (256);
+	tip = tips;
+	while (tip)
+	{
+		if (calltip->len > 0)
+			g_string_append_c (calltip, '\n');
+		g_string_append (calltip, (gchar*) tip->data);
+		tip = g_list_next (tip);
+	}
+	for (i = 0; calltip->str[i] != '\0'; i++)
+	{
+		if (calltip->str[i] == '\n')
+			calltip_lines++;
+	}
+	/* Calculate real calltip position */
+	pos = text_editor_cell_get_position (cell);
+	column = scintilla_send_message (SCINTILLA (te->scintilla),
+	                                 SCI_GETCOLUMN,
+	                                 pos, 0);
+	line = scintilla_send_message (SCINTILLA (te->scintilla),
+	                               SCI_LINEFROMPOSITION,
+	                               pos, 0);
+	/* Align calltip above function call */
+	line -= (calltip_lines + 3);
+	calltip_pos = scintilla_send_message (SCINTILLA(te->scintilla),
+	                                      SCI_POSITIONFROMLINE, line, 0) + column;
+	
+	scintilla_send_message (SCINTILLA (te->scintilla),
+							SCI_CALLTIPSHOW,
+							calltip_pos,
+							(uptr_t) calltip->str);
+	g_string_free (calltip, TRUE);
+}
+
+static void
+iassist_cancel_tips (IAnjutaEditorAssist *iassist, GError **err)
+{
+	TextEditor *te = TEXT_EDITOR (iassist);
+	scintilla_send_message (SCINTILLA (te->scintilla), SCI_CALLTIPCANCEL, 0, 0);
+}
+
+static gboolean
+iassist_tip_shown (IAnjutaEditorAssist* iassist, GError **err)
+{
+	TextEditor *te = TEXT_EDITOR (iassist);
+	return scintilla_send_message (SCINTILLA (te->scintilla),
+	                                          SCI_CALLTIPACTIVE, 0, 0);
+}
+
+static void
+iassist_hide_suggestions (IAnjutaEditorAssist *iassist, GError **err)
+{
+	TextEditor *te = TEXT_EDITOR (iassist);
+	
+	g_return_if_fail (IS_TEXT_EDITOR (te));
+	scintilla_send_message (SCINTILLA (te->scintilla), SCI_AUTOCCANCEL, 0, 0);
+}
+
+static void
+iassist_iface_init(IAnjutaEditorAssistIface* iface)
+{
+	iface->get_suggestions = iassist_get_suggestions;
+	iface->suggest = iassist_suggest;
+	iface->hide_suggestions = iassist_hide_suggestions;
+	iface->show_tips = iassist_show_tips;
+	iface->cancel_tips = iassist_cancel_tips;
+	iface->tip_shown = iassist_tip_shown;
+}
+
+/* IAnutaEditorFolds implementation */
+
+static void
+ifolds_open_all(IAnjutaEditorFolds* view, GError **e)
+{
+	text_editor_command(TEXT_EDITOR(view), ANE_OPEN_FOLDALL, 0, 0);
+}
+
+static void
+ifolds_close_all(IAnjutaEditorFolds* view, GError **e)
+{
+	text_editor_command(TEXT_EDITOR(view), ANE_CLOSE_FOLDALL, 0, 0);
+}
+
+static void
+ifolds_toggle_current(IAnjutaEditorFolds* view, GError **e)
+{
+	text_editor_command(TEXT_EDITOR(view), ANE_TOGGLE_FOLD, 0, 0);
+}
+
+static void
+ifolds_iface_init(IAnjutaEditorFoldsIface* iface)
+{
+	iface->open_all = ifolds_open_all;
+	iface->close_all = ifolds_close_all;
+	iface->toggle_current = ifolds_toggle_current;
+}
+
+/* IAnjutaEditorView implementation */
+static void
+iview_create (IAnjutaEditorView *view, GError **err)
+{
+	g_return_if_fail (IS_TEXT_EDITOR (view));
+	text_editor_add_view (TEXT_EDITOR (view));
+}
+
+static void
+iview_remove_current (IAnjutaEditorView *view, GError **err)
+{
+	g_return_if_fail (IS_TEXT_EDITOR (view));
+	text_editor_remove_view (TEXT_EDITOR (view));
+}
+
+static gint
+iview_get_count (IAnjutaEditorView *view, GError **err)
+{
+	g_return_val_if_fail (IS_TEXT_EDITOR (view), -1);
+	return g_list_length (TEXT_EDITOR (view)->views);
+}
+
+static void
+iview_iface_init (IAnjutaEditorViewIface *iface)
+{
+	iface->create = iview_create;
+	iface->remove_current = iview_remove_current;
+	iface->get_count = iview_get_count;
+}
+
+static void
+iindicable_set (IAnjutaIndicable *te, IAnjutaIterable *begin_location,
+				IAnjutaIterable *end_location,
+				IAnjutaIndicableIndicator indicator, GError **err)
+{
+	gint begin = text_editor_cell_get_position (TEXT_EDITOR_CELL (begin_location));
+	gint end = text_editor_cell_get_position (TEXT_EDITOR_CELL (end_location));
+	switch (indicator)
+	{
+		case IANJUTA_INDICABLE_NONE:
+			text_editor_set_indicator (TEXT_EDITOR (te), begin, end, -1);
+		break;
+		case IANJUTA_INDICABLE_IMPORTANT:
+			text_editor_set_indicator (TEXT_EDITOR (te), begin, end, 0);
+		break;
+		case IANJUTA_INDICABLE_WARNING:
+			text_editor_set_indicator (TEXT_EDITOR (te),  begin, end, 1);
+		break;
+		case IANJUTA_INDICABLE_CRITICAL:
+			text_editor_set_indicator (TEXT_EDITOR (te),  begin, end, 2);
+		break;
+		default:
+			g_warning ("Unsupported indicator %d", indicator);
+			text_editor_set_indicator (TEXT_EDITOR (te),  begin, end, -1);
+		break;
+	}
+}
+
+static void
+iindicable_clear (IAnjutaIndicable *te, GError **err)
+{
+	text_editor_set_indicator (TEXT_EDITOR (te), -1, -1, -1);
+}
+
+static void
+iindicable_iface_init (IAnjutaIndicableIface *iface)
+{
+	iface->set = iindicable_set;
+	iface->clear = iindicable_clear;
+}
+
+static void
+iprint_print(IAnjutaPrint* print, GError** e)
+{
+	TextEditor* te = TEXT_EDITOR(print);
+	anjuta_print(FALSE, te->preferences, te);
+}
+
+static void
+iprint_preview(IAnjutaPrint* print, GError** e)
+{
+	TextEditor* te = TEXT_EDITOR(print);
+	anjuta_print(TRUE, te->preferences, te);
+}
+
+static void
+iprint_iface_init(IAnjutaPrintIface* iface)
+{
+	iface->print = iprint_print;
+	iface->print_preview = iprint_preview;
+}
+
+static void
+icomment_block(IAnjutaEditorComment* comment, GError** e)
+{
+	TextEditor* te = TEXT_EDITOR(comment);
+    aneditor_command (te->editor_id, ANE_BLOCKCOMMENT, 0, 0);
+}
+
+static void
+icomment_stream(IAnjutaEditorComment* comment, GError** e)
+{
+	TextEditor* te = TEXT_EDITOR(comment);
+    aneditor_command (te->editor_id, ANE_STREAMCOMMENT, 0, 0);
+}
+
+static void
+icomment_box(IAnjutaEditorComment* comment, GError** e)
+{
+	TextEditor* te = TEXT_EDITOR(comment);
+    aneditor_command (te->editor_id, ANE_BOXCOMMENT, 0, 0);
+}
+
+static void
+icomment_iface_init(IAnjutaEditorCommentIface* iface)
+{
+	iface->block = icomment_block;
+	iface->box = icomment_box;
+	iface->stream = icomment_stream;
+}
+
+#define MAX_ZOOM_FACTOR 8
+#define MIN_ZOOM_FACTOR -8
+
+static void
+izoom_in(IAnjutaEditorZoom* zoom, GError** e)
+{
+	TextEditor* te = TEXT_EDITOR(zoom);
+	gint zoom_factor = anjuta_preferences_get_int (te->preferences,
+												   TEXT_ZOOM_FACTOR) + 1;
+	
+	if (zoom_factor > MAX_ZOOM_FACTOR)
+		zoom_factor = MAX_ZOOM_FACTOR;
+	else if (zoom_factor < MIN_ZOOM_FACTOR)
+		zoom_factor = MIN_ZOOM_FACTOR;
+	
+	anjuta_preferences_set_int (te->preferences, TEXT_ZOOM_FACTOR, zoom_factor);
+}
+
+static void
+izoom_out(IAnjutaEditorZoom* zoom, GError** e)
+{
+	TextEditor* te = TEXT_EDITOR(zoom);
+	gint zoom_factor = anjuta_preferences_get_int (te->preferences,
+												   TEXT_ZOOM_FACTOR) - 1;
+	
+	if (zoom_factor > MAX_ZOOM_FACTOR)
+		zoom_factor = MAX_ZOOM_FACTOR;
+	else if (zoom_factor < MIN_ZOOM_FACTOR)
+		zoom_factor = MIN_ZOOM_FACTOR;
+	
+	anjuta_preferences_set_int (te->preferences, TEXT_ZOOM_FACTOR, zoom_factor);
+}
+
+static void
+izoom_iface_init(IAnjutaEditorZoomIface* iface)
+{
+	iface->in = izoom_in;
+	iface->out = izoom_out;
+}
+
+static void
+igoto_start_block(IAnjutaEditorGoto* editor, GError** e)
+{
+	TextEditor* te = TEXT_EDITOR(editor);
+	text_editor_goto_block_start(te);
+}
+
+static void
+igoto_end_block(IAnjutaEditorGoto* editor, GError** e)
+{
+	TextEditor* te = TEXT_EDITOR(editor);
+	text_editor_goto_block_end(te);
+}
+
+static void
+igoto_matching_brace(IAnjutaEditorGoto* editor, GError** e)
+{
+	TextEditor* te = TEXT_EDITOR(editor);
+	text_editor_command (te, ANE_MATCHBRACE, 0, 0);
+}
+
+static void
+igoto_iface_init(IAnjutaEditorGotoIface* iface)
+{
+	iface->start_block = igoto_start_block;
+	iface->end_block = igoto_end_block;
+	iface->matching_brace = igoto_matching_brace;
+}
+
+static const GList*
+ilanguage_get_supported_languages (IAnjutaEditorLanguage *ilanguage,
+								   GError **err)
+{
+	if (supported_languages == NULL)
+	{
+		gchar **strv;
+		gchar **token;
+		gchar *menu_entries;
+		
+		supported_languages_name =
+			g_hash_table_new_full (g_str_hash, g_str_equal,
+								   NULL, g_free);
+		supported_languages_ext =
+			g_hash_table_new_full (g_str_hash, g_str_equal,
+								   NULL, g_free);
+		
+		supported_languages_by_lexer =
+			g_hash_table_new_full (g_str_hash, g_str_equal,
+								   g_free, NULL);
+			
+		menu_entries = sci_prop_get (text_editor_get_props (), "menu.language");
+		g_return_val_if_fail (menu_entries != NULL, NULL);
+		
+		strv = g_strsplit (menu_entries, "|", -1);
+		token = strv;
+		while (*token)
+		{
+			gchar *lexer;
+			gchar *possible_file;
+			gchar *iter;
+			gchar *name, *extension;
+			GString *lang;
+			
+			lang = g_string_new ("");
+			
+			name = *token++;
+			if (!name)
+				break;
+			
+			extension = *token++;
+			if (!extension)
+				break;
+			token++;
+			
+			if (name[0] == '#')
+				continue;
+			
+			iter = name;
+			while (*iter)
+			{
+				if (*iter == '&')
+				{
+					*iter = '_';
+				}
+				else
+				{
+					g_string_append_c (lang, g_ascii_tolower (*iter));
+				}
+				iter++;
+			}
+			
+			/* HACK: Convert the weird c++ name to cpp */
+			if (strcmp (lang->str, "c / c++") == 0)
+			{
+				g_string_assign (lang, "cpp");
+			}
+			
+			/* Updated mapping hash tables */
+			g_hash_table_insert (supported_languages_name, lang->str,
+								 g_strdup (name));
+			g_hash_table_insert (supported_languages_ext, lang->str,
+								 g_strconcat ("file.", extension, NULL));
+			/* Map lexer to language */
+			possible_file = g_strconcat ("file.", extension, NULL);
+			lexer = sci_prop_get_new_expand (TEXT_EDITOR (ilanguage)->props_base,
+											 "lexer.", possible_file);
+			g_free (possible_file);
+			if (lexer)
+			{
+				/* We only map the first (which is hopefully the true) language */
+				if (!g_hash_table_lookup (supported_languages_by_lexer, lexer))
+				{
+					/* DEBUG_PRINT ("Mapping (lexer)%s to (language)%s", lexer, lang->str); */
+					g_hash_table_insert (supported_languages_by_lexer,
+										 lexer, lang->str);
+					/* lexer is taken in the hash, so no free */
+				}
+				else
+				{
+					g_free (lexer);
+				}
+				lexer = NULL;
+			}
+			supported_languages = g_list_prepend (supported_languages,
+												  lang->str);
+			g_string_free (lang, FALSE);
+		}
+		g_strfreev (strv);
+	}
+	return supported_languages;
+}
+
+static const gchar*
+ilanguage_get_language_name (IAnjutaEditorLanguage *ilanguage,
+							 const gchar *language, GError **err)
+{
+	if (!supported_languages_name)
+		ilanguage_get_supported_languages (ilanguage, NULL);
+	
+	return g_hash_table_lookup (supported_languages_name, language);
+}
+
+static void
+ilanguage_set_language (IAnjutaEditorLanguage *ilanguage,
+						const gchar *language, GError **err)
+{
+	if (!supported_languages_ext)
+		ilanguage_get_supported_languages (ilanguage, NULL);
+
+	if (language)
+		text_editor_set_hilite_type (TEXT_EDITOR (ilanguage),
+									 g_hash_table_lookup (supported_languages_ext,
+														  language));
+	else /* Autodetect */
+		text_editor_set_hilite_type (TEXT_EDITOR (ilanguage), NULL);
+		
+	text_editor_hilite (TEXT_EDITOR (ilanguage), FALSE);
+}
+
+static const gchar*
+ilanguage_get_language (IAnjutaEditorLanguage *ilanguage, GError **err)
+{
+	const gchar *language = NULL;
+	const gchar *filename = NULL;
+	TextEditor *te = TEXT_EDITOR (ilanguage);
+	
+	if (te->force_hilite)
+		filename = te->force_hilite;
+	else if (te->filename)
+		filename = te->filename;
+	
+	if (filename)
+	{
+		gchar *lexer = NULL;
+		lexer = sci_prop_get_new_expand (te->props_base,
+										 "lexer.", filename);
+		
+		/* No lexer, no language */
+		if (lexer)
+		{
+			if (!supported_languages_by_lexer)
+				ilanguage_get_supported_languages (ilanguage, NULL);
+			
+			language = g_hash_table_lookup (supported_languages_by_lexer, lexer);
+			/* DEBUG_PRINT ("Found (language)%s for (lexer)%s", language, lexer); */
+			g_free (lexer);
+		}
+	}
+	return language;
+}
+
+static void
+ilanguage_iface_init (IAnjutaEditorLanguageIface *iface)
+{
+	iface->get_supported_languages = ilanguage_get_supported_languages;
+	iface->get_language_name = ilanguage_get_language_name;
+	iface->get_language = ilanguage_get_language;
+	iface->set_language = ilanguage_set_language;
+}
+
+static gboolean
+isearch_forward (IAnjutaEditorSearch* isearch,
+				 const gchar* search,
+				 gboolean case_sensitive,
+				 IAnjutaEditorCell* istart, 
+				 IAnjutaEditorCell* iend,
+				 IAnjutaEditorCell** iresult_start,
+				 IAnjutaEditorCell** iresult_end,
+				 GError** e)
+{
+	TextEditor *te = TEXT_EDITOR (isearch);
+	gint start = text_editor_cell_get_position (TEXT_EDITOR_CELL (istart));
+	gint end = text_editor_cell_get_position (TEXT_EDITOR_CELL (iend));
+
+	gint flags = 0;
+	gint retval;
+	
+	if (case_sensitive)
+	{
+		flags = SCFIND_MATCHCASE;
+	}
+	
+	struct TextToFind to_find;
+	
+	to_find.chrg.cpMin = start;
+	to_find.chrg.cpMax = end;
+	
+	to_find.lpstrText = (gchar*) search;
+	
+	retval = scintilla_send_message (SCINTILLA (te->scintilla),
+									 SCI_FINDTEXT, flags, (long) &to_find);
+	if (retval == -1)
+		return FALSE;
+	else
+	{
+		*iresult_start = IANJUTA_EDITOR_CELL (text_editor_cell_new (te, to_find.chrgText.cpMin));
+		*iresult_end = IANJUTA_EDITOR_CELL (text_editor_cell_new (te, to_find.chrgText.cpMax));
+		return TRUE;
+	}
+}
+
+static gboolean
+isearch_backward (IAnjutaEditorSearch* isearch,
+				  const gchar* search,
+				  gboolean case_sensitive,
+				  IAnjutaEditorCell* istart, 
+				  IAnjutaEditorCell* iend,
+				  IAnjutaEditorCell** iresult_start,
+				  IAnjutaEditorCell** iresult_end,
+				  GError** e)
+{
+	TextEditor *te = TEXT_EDITOR (isearch);
+	gint end = text_editor_cell_get_position (TEXT_EDITOR_CELL (istart));
+	gint start = text_editor_cell_get_position (TEXT_EDITOR_CELL (iend));
+
+	gint flags = 0;
+	gint retval;
+	
+	if (case_sensitive)
+	{
+		flags = SCFIND_MATCHCASE;
+	}
+	
+	struct TextToFind to_find;
+	
+	to_find.chrg.cpMin = start;
+	to_find.chrg.cpMax = end;
+	
+	to_find.lpstrText = (gchar*) search;
+	
+	retval = scintilla_send_message (SCINTILLA (te->scintilla), SCI_FINDTEXT, flags, (long) &to_find);
+	if (retval == -1)
+		return FALSE;
+	else
+	{
+		*iresult_start = IANJUTA_EDITOR_CELL (text_editor_cell_new (te, to_find.chrgText.cpMin));
+		*iresult_end = IANJUTA_EDITOR_CELL (text_editor_cell_new (te, to_find.chrgText.cpMax));
+		return TRUE;
+	}
+}
+
+static void
+isearch_iface_init(IAnjutaEditorSearchIface* iface)
+{
+	iface->forward = isearch_forward;
+	iface->backward = isearch_backward;
+}
+
+static void
+ihover_display (IAnjutaEditorHover *ihover, IAnjutaIterable *pos,
+				const gchar *info, GError **e)
+{
+	TextEditor *te = TEXT_EDITOR (ihover);
+	gint position = text_editor_cell_get_position (TEXT_EDITOR_CELL (pos));
+	g_return_if_fail (position >= 0);
+	g_return_if_fail (info != NULL);
+	text_editor_show_hover_tip (te, position, info);
+}
+
+static void
+ihover_iface_init(IAnjutaEditorHoverIface* iface)
+{
+	iface->display = ihover_display;
+}
+
+ANJUTA_TYPE_BEGIN(TextEditor, text_editor, GTK_TYPE_VBOX);
+ANJUTA_TYPE_ADD_INTERFACE(ifile, IANJUTA_TYPE_FILE);
+ANJUTA_TYPE_ADD_INTERFACE(isavable, IANJUTA_TYPE_FILE_SAVABLE);
+ANJUTA_TYPE_ADD_INTERFACE(idocument, IANJUTA_TYPE_DOCUMENT);
+ANJUTA_TYPE_ADD_INTERFACE(itext_editor, IANJUTA_TYPE_EDITOR);
+ANJUTA_TYPE_ADD_INTERFACE(ilinemode, IANJUTA_TYPE_EDITOR_LINE_MODE);
+ANJUTA_TYPE_ADD_INTERFACE(iselection, IANJUTA_TYPE_EDITOR_SELECTION);
+ANJUTA_TYPE_ADD_INTERFACE(iconvert, IANJUTA_TYPE_EDITOR_CONVERT);
+ANJUTA_TYPE_ADD_INTERFACE(iassist, IANJUTA_TYPE_EDITOR_ASSIST);
+ANJUTA_TYPE_ADD_INTERFACE(ilanguage, IANJUTA_TYPE_EDITOR_LANGUAGE);
+ANJUTA_TYPE_ADD_INTERFACE(iview, IANJUTA_TYPE_EDITOR_VIEW);
+ANJUTA_TYPE_ADD_INTERFACE(ifolds, IANJUTA_TYPE_EDITOR_FOLDS);
+ANJUTA_TYPE_ADD_INTERFACE(imarkable, IANJUTA_TYPE_MARKABLE);
+ANJUTA_TYPE_ADD_INTERFACE(iindicable, IANJUTA_TYPE_INDICABLE);
+ANJUTA_TYPE_ADD_INTERFACE(iprint, IANJUTA_TYPE_PRINT);
+ANJUTA_TYPE_ADD_INTERFACE(icomment, IANJUTA_TYPE_EDITOR_COMMENT);
+ANJUTA_TYPE_ADD_INTERFACE(izoom, IANJUTA_TYPE_EDITOR_ZOOM);
+ANJUTA_TYPE_ADD_INTERFACE(igoto, IANJUTA_TYPE_EDITOR_GOTO);
+ANJUTA_TYPE_ADD_INTERFACE(isearch, IANJUTA_TYPE_EDITOR_SEARCH);
+ANJUTA_TYPE_ADD_INTERFACE(ihover, IANJUTA_TYPE_EDITOR_HOVER);
+ANJUTA_TYPE_END;

Added: trunk/plugins/scintilla/text_editor_prefs.c
==============================================================================
--- (empty file)
+++ trunk/plugins/scintilla/text_editor_prefs.c	Wed Apr  8 07:16:46 2009
@@ -0,0 +1,475 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+    prefs.c
+    Copyright (C) 2000 Naba Kumar
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+*/
+#include <libanjuta/anjuta-preferences.h>
+#include <libanjuta/anjuta-debug.h>
+
+#include "properties.h"
+#include "text_editor_prefs.h"
+#include "text_editor_cbs.h"
+
+#define GTK
+#undef PLAT_GTK
+#define PLAT_GTK 1
+#include "Scintilla.h"
+#include "SciLexer.h"
+#include "ScintillaWidget.h"
+
+#include "lexer.h"
+#include "aneditor.h"
+
+/* Editor preferences notifications */
+
+#if 0
+
+typedef {
+	TextEditor *te;
+	gchar *key;
+	GCallback proxy;
+	gpointer proxy_data;
+	gboolean is_string;
+} PrefPassedData;
+
+static PrefPassedData*
+pref_passed_data_new (TextEditor *te, const gchar *key, gboolean is_string,
+					  GCallback *proxy, gponter proxy_data)
+{
+	PrefPassedData *pd = g_new0(PrefPassedData, 1);
+	pd->te = te;
+	pd->key = g_strdup (key);
+	pd->proxy = proxy;
+	pd->is_string = is_string;
+	pd->data1 = data1;
+	pd->data2 = data2;
+	pd->data3 = data3;
+	pd->data4 = data4;
+}
+
+static void
+pref_notify (GConfClient *gclient, guint cnxn_id,
+				   GConfEntry *entry, gpointer user_data)
+{
+	PrefPassedData *pd = (PrefPassedData*)user_data;
+	if (!is_string)
+		set_n_get_prop_int (pd->te, pd->key);
+	else
+		set_n_get_prop_string (pd->te, pd->key);
+	if (pd->proxy)
+		(pd->proxy)(data1, data2, data3, data4);
+}
+
+#endif
+
+static gint
+set_n_get_prop_int (TextEditor *te, const gchar *key)
+{
+	gint val;
+	AnjutaPreferences *pr;
+	pr = te->preferences;
+	val = anjuta_preferences_get_int (pr, key);
+	sci_prop_set_int_with_key (text_editor_get_props (), key, val);
+	return val;
+}
+
+static gint
+set_n_get_prop_bool (TextEditor *te, const gchar *key)
+{
+	gboolean val;
+	AnjutaPreferences *pr;
+	pr = te->preferences;
+	val = anjuta_preferences_get_bool (pr, key);
+	sci_prop_set_int_with_key (text_editor_get_props (), key, val);
+	return val;
+}
+
+static gchar *
+set_n_get_prop_string (TextEditor *te, const gchar *key)
+{
+	gchar *val;
+	AnjutaPreferences *pr;
+	pr = te->preferences;
+	val = anjuta_preferences_get (pr, key);
+	sci_prop_set_with_key (text_editor_get_props (), key, val);
+	return val;
+}
+
+static void
+on_notify_disable_hilite (AnjutaPreferences* prefs,
+                          const gchar* key,
+                          gboolean value,
+                          gpointer user_data)
+{
+	TextEditor *te;
+	
+	te = TEXT_EDITOR (user_data);
+	set_n_get_prop_int (te, DISABLE_SYNTAX_HILIGHTING);
+	text_editor_hilite (te, TRUE);
+}
+
+static void
+on_notify_zoom_factor(AnjutaPreferences* prefs,
+                      const gchar* key,
+                      gint value,
+                      gpointer user_data)
+{
+	TextEditor *te;
+	gint zoom_factor;
+
+	te = TEXT_EDITOR (user_data);
+	zoom_factor = set_n_get_prop_int (te, TEXT_ZOOM_FACTOR);
+	text_editor_set_zoom_factor (te, zoom_factor);
+	g_signal_emit_by_name(G_OBJECT (te), "update_ui");
+}
+
+static void
+on_notify_tab_size (AnjutaPreferences* prefs,
+                    const gchar* key,
+                    gint value,
+                    gpointer user_data)
+{
+	TextEditor *te;
+	gint tab_size;
+
+	te = TEXT_EDITOR (user_data);
+	tab_size = set_n_get_prop_int (te, TAB_SIZE);
+	text_editor_command (te, ANE_SETTABSIZE, tab_size, 0);
+}
+
+static void
+on_notify_use_tab_for_indentation(AnjutaPreferences* prefs,
+                                  const gchar* key,
+                                  gboolean value,
+                                  gpointer user_data)
+{
+	TextEditor *te;
+	gboolean use_tabs;
+
+	te = TEXT_EDITOR (user_data);
+	use_tabs = set_n_get_prop_int (te, USE_TABS);
+	text_editor_command (te, ANE_SETUSETABFORINDENT, use_tabs, 0);
+	// text_editor_scintilla_command (te, SCI_SETTABWIDTH,	use_tabs, 0);
+}
+
+static void
+on_notify_indent_size (AnjutaPreferences* prefs,
+                       const gchar* key,
+                       gint value,
+                       gpointer user_data)
+{
+	TextEditor *te;
+	gint indent_size;
+
+	te = TEXT_EDITOR (user_data);
+	indent_size = set_n_get_prop_int (te, INDENT_SIZE);
+	text_editor_command (te, ANE_SETINDENTSIZE, indent_size, 0);
+}
+
+static void
+on_notify_wrap_bookmarks(AnjutaPreferences* prefs,
+                         const gchar* key,
+                         gboolean value,
+                         gpointer user_data)
+{
+	TextEditor *te;
+	gboolean state;
+
+	te = TEXT_EDITOR (user_data);
+	state = set_n_get_prop_int (te, WRAP_BOOKMARKS);
+	text_editor_command (te, ANE_SETWRAPBOOKMARKS, state, 0);
+}
+
+static void
+on_notify_braces_check (AnjutaPreferences* prefs,
+                        const gchar* key,
+                        gboolean value,
+                        gpointer user_data)
+{
+	TextEditor *te;
+	gboolean state;
+
+	te = TEXT_EDITOR (user_data);
+	state = set_n_get_prop_int (te, BRACES_CHECK);
+	text_editor_command (te, ANE_SETINDENTBRACESCHECK, state, 0);
+}
+
+static void
+on_notify_indent_maintain (AnjutaPreferences* prefs,
+                           const gchar* key,
+                           gboolean value,
+                           gpointer user_data)
+{
+	TextEditor *te;
+	gboolean state;
+
+	te = TEXT_EDITOR (user_data);
+	state = set_n_get_prop_int (te, INDENT_MAINTAIN);
+	text_editor_command (te, ANE_SETINDENTMAINTAIN, state, 0);
+}
+
+static void
+on_notify_tab_indents (AnjutaPreferences* prefs,
+                       const gchar* key,
+                       gboolean value,
+                       gpointer user_data)
+{
+	TextEditor *te;
+	gboolean state;
+
+	te = TEXT_EDITOR (user_data);
+	state = set_n_get_prop_int (te, TAB_INDENTS);
+	text_editor_command (te, ANE_SETTABINDENTS, state, 0);
+}
+
+static void
+on_notify_backspace_unindents (AnjutaPreferences* prefs,
+                               const gchar* key,
+                               gboolean value,
+                               gpointer user_data)
+{
+	TextEditor *te;
+	gboolean state;
+
+	te = TEXT_EDITOR (user_data);
+	state = set_n_get_prop_int (te, BACKSPACE_UNINDENTS);
+	text_editor_command (te, ANE_SETBACKSPACEUNINDENTS, state, 0);
+}
+
+static void
+on_notify_view_eols (AnjutaPreferences* prefs,
+                     const gchar* key,
+                     gint value,
+                     gpointer user_data)
+{
+	TextEditor *te;
+	gboolean state;
+
+	te = TEXT_EDITOR (user_data);
+	state = set_n_get_prop_int (te, VIEW_EOL);
+	text_editor_command (te, ANE_VIEWEOL, state, 0);
+}
+
+static void
+on_notify_view_whitespaces (AnjutaPreferences* prefs,
+                            const gchar* key,
+                            gint value,
+                            gpointer user_data)
+{
+	TextEditor *te;
+	gboolean state;
+
+	te = TEXT_EDITOR (user_data);
+	state = set_n_get_prop_int (te, VIEW_WHITE_SPACES);
+	text_editor_command (te, ANE_VIEWSPACE, state, 0);
+}
+
+static void
+on_notify_view_linewrap (AnjutaPreferences* prefs,
+                         const gchar* key,
+                         gint value,
+                         gpointer user_data)
+{
+	TextEditor *te;
+	gboolean state;
+
+	te = TEXT_EDITOR (user_data);
+	state = set_n_get_prop_int (te, VIEW_LINE_WRAP);
+	text_editor_command (te, ANE_LINEWRAP, state, 0);
+}
+
+static void
+on_notify_view_indentation_guides (AnjutaPreferences* prefs,
+                                   const gchar* key,
+                                   gint value,
+                                   gpointer user_data)
+{
+	TextEditor *te;
+	gboolean state;
+
+	te = TEXT_EDITOR (user_data);
+	state = set_n_get_prop_int (te, VIEW_INDENTATION_GUIDES);
+	text_editor_command (te, ANE_VIEWGUIDES, state, 0);
+}
+
+static void
+on_notify_view_folds (AnjutaPreferences* prefs,
+                      const gchar* key,
+                      gint value,
+                      gpointer user_data)
+{
+	TextEditor *te;
+	gboolean state;
+
+	te = TEXT_EDITOR (user_data);
+	state = set_n_get_prop_int (te, VIEW_FOLD_MARGIN);
+	text_editor_command (te, ANE_FOLDMARGIN, state, 0);
+}
+
+static void
+on_notify_view_markers (AnjutaPreferences* prefs,
+                        const gchar* key,
+                        gint value,
+                        gpointer user_data)
+{
+	TextEditor *te;
+	gboolean state;
+
+	te = TEXT_EDITOR (user_data);
+	state = set_n_get_prop_int (te, VIEW_MARKER_MARGIN);
+	text_editor_command (te, ANE_SELMARGIN, state, 0);
+}
+
+static void
+on_notify_view_linenums (AnjutaPreferences* prefs,
+                         const gchar* key,
+                         gint value,
+                         gpointer user_data)
+{
+	TextEditor *te;
+	gboolean state;
+
+	te = TEXT_EDITOR (user_data);
+	state = set_n_get_prop_int (te, VIEW_LINENUMBERS_MARGIN);
+	text_editor_command (te, ANE_LINENUMBERMARGIN, state, 0);
+	/* text_editor_set_line_number_width (te); */
+}
+
+static void
+on_notify_fold_symbols (AnjutaPreferences* prefs,
+                        const gchar* key,
+                        gint value,
+                        gpointer user_data)
+{
+	TextEditor *te;
+	gchar *symbols;
+
+	te = TEXT_EDITOR (user_data);
+	symbols = set_n_get_prop_string (te, FOLD_SYMBOLS);
+	text_editor_command (te, ANE_SETFOLDSYMBOLS, (long)symbols, 0);
+	g_free (symbols);
+}
+
+static void
+on_notify_fold_underline (AnjutaPreferences* prefs,
+                          const gchar* key,
+                          gint value,
+                          gpointer user_data)
+{
+	TextEditor *te;
+	gboolean state;
+
+	te = TEXT_EDITOR (user_data);
+	state = set_n_get_prop_int (te, FOLD_UNDERLINE);
+	text_editor_command (te, ANE_SETFOLDUNDERLINE, state, 0);
+}
+
+static void
+on_notify_edge_column (AnjutaPreferences* prefs,
+                       const gchar* key,
+                       gint value,
+                       gpointer user_data)
+{
+	TextEditor *te;
+	gint size;
+
+	te = TEXT_EDITOR (user_data);
+	size = set_n_get_prop_int (te, EDGE_COLUMN);
+	text_editor_command (te, ANE_SETEDGECOLUMN, size, 0);
+}
+
+#define REGISTER_NOTIFY(key, func, type) \
+	notify_id = anjuta_preferences_notify_add_##type (te->preferences, \
+											   key, func, te, NULL); \
+	te->notify_ids = g_list_prepend (te->notify_ids, \
+										   GUINT_TO_POINTER (notify_id));
+
+void
+text_editor_prefs_init (TextEditor *te)
+{
+	gint val;
+	guint notify_id;
+	
+	/* Sync prefs from gconf to props */
+	set_n_get_prop_int (te, TAB_SIZE);
+	set_n_get_prop_int (te, TEXT_ZOOM_FACTOR);
+	set_n_get_prop_int (te, INDENT_SIZE);
+	set_n_get_prop_bool (te, USE_TABS);
+	set_n_get_prop_bool (te, DISABLE_SYNTAX_HILIGHTING);
+	set_n_get_prop_bool (te, WRAP_BOOKMARKS);
+	set_n_get_prop_bool (te, BRACES_CHECK);
+
+	
+	/* This one is special */
+	val = set_n_get_prop_bool (te, INDENT_MAINTAIN);
+	if (val)
+		sci_prop_set_int_with_key (te->props_base, INDENT_MAINTAIN".*", 1);
+	else
+		sci_prop_set_int_with_key (te->props_base, INDENT_MAINTAIN".*", 0);
+	
+	set_n_get_prop_bool (te, TAB_INDENTS);
+	set_n_get_prop_bool (te, BACKSPACE_UNINDENTS);
+	
+	set_n_get_prop_bool (te, VIEW_EOL);
+	set_n_get_prop_bool (te, VIEW_LINE_WRAP);
+	set_n_get_prop_bool (te, VIEW_WHITE_SPACES);
+	set_n_get_prop_bool (te, VIEW_INDENTATION_GUIDES);
+	set_n_get_prop_bool (te, VIEW_FOLD_MARGIN);
+	set_n_get_prop_bool (te, VIEW_MARKER_MARGIN);
+	set_n_get_prop_bool (te, VIEW_LINENUMBERS_MARGIN);
+	g_free (set_n_get_prop_string (te, FOLD_SYMBOLS));
+	set_n_get_prop_bool (te, FOLD_UNDERLINE);
+	set_n_get_prop_int (te, EDGE_COLUMN);
+	
+	/* Register gconf notifications */
+	REGISTER_NOTIFY (TAB_SIZE, on_notify_tab_size, int);
+	REGISTER_NOTIFY (TEXT_ZOOM_FACTOR, on_notify_zoom_factor, int);
+	REGISTER_NOTIFY (INDENT_SIZE, on_notify_indent_size, int);
+	REGISTER_NOTIFY (USE_TABS, on_notify_use_tab_for_indentation, bool);
+	REGISTER_NOTIFY (DISABLE_SYNTAX_HILIGHTING, on_notify_disable_hilite, bool);
+	/* REGISTER_NOTIFY (INDENT_AUTOMATIC, on_notify_automatic_indentation); */
+	REGISTER_NOTIFY (WRAP_BOOKMARKS, on_notify_wrap_bookmarks, bool);
+	REGISTER_NOTIFY (BRACES_CHECK, on_notify_braces_check, bool);
+	REGISTER_NOTIFY (INDENT_MAINTAIN, on_notify_indent_maintain, bool);
+	REGISTER_NOTIFY (TAB_INDENTS, on_notify_tab_indents, bool);
+	REGISTER_NOTIFY (BACKSPACE_UNINDENTS, on_notify_backspace_unindents, bool);
+	REGISTER_NOTIFY (VIEW_EOL, on_notify_view_eols, bool);
+	REGISTER_NOTIFY (VIEW_LINE_WRAP, on_notify_view_linewrap, bool);
+	REGISTER_NOTIFY (VIEW_WHITE_SPACES, on_notify_view_whitespaces, bool);
+	REGISTER_NOTIFY (VIEW_INDENTATION_GUIDES, on_notify_view_indentation_guides, bool);
+	REGISTER_NOTIFY (VIEW_FOLD_MARGIN, on_notify_view_folds, bool);
+	REGISTER_NOTIFY (VIEW_MARKER_MARGIN, on_notify_view_markers, bool);
+	REGISTER_NOTIFY (VIEW_LINENUMBERS_MARGIN, on_notify_view_linenums, bool);
+	REGISTER_NOTIFY (FOLD_SYMBOLS, on_notify_fold_symbols, bool);
+	REGISTER_NOTIFY (FOLD_UNDERLINE, on_notify_fold_underline, bool);
+	REGISTER_NOTIFY (EDGE_COLUMN, on_notify_edge_column, int);
+}
+
+void
+text_editor_prefs_finalize (TextEditor *te)
+{
+	GList *node;
+	node = te->notify_ids;
+	while (node)
+	{
+		anjuta_preferences_notify_remove (te->preferences,
+										  GPOINTER_TO_UINT (node->data));
+		node = g_list_next (node);
+	}
+	g_list_free (te->notify_ids);
+	te->notify_ids = NULL;
+}

Added: trunk/plugins/scintilla/text_editor_prefs.h
==============================================================================
--- (empty file)
+++ trunk/plugins/scintilla/text_editor_prefs.h	Wed Apr  8 07:16:46 2009
@@ -0,0 +1,29 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+    prefs.h
+    Copyright (C) 2000 Naba Kumar
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+*/
+
+#ifndef _TEXT_EDITOR_PREFS_H_
+#define _TEXT_EDITOR_PREFS_H_
+
+#include "text_editor.h"
+
+void text_editor_prefs_init (TextEditor *te);
+void text_editor_prefs_finalize (TextEditor *te);
+
+#endif

Modified: trunk/plugins/scratchbox/Makefile
==============================================================================
--- trunk/plugins/scratchbox/Makefile	(original)
+++ trunk/plugins/scratchbox/Makefile	Wed Apr  8 07:16:46 2009
@@ -89,6 +89,8 @@
 AMDEP_FALSE = #
 AMDEP_TRUE = 
 AMTAR = ${SHELL} /home/jhs/devel/anjuta-extras/missing --run tar
+AM_CFLAGS =  -Wall -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wno-sign-compare 
+AM_CXXFLAGS =  -g -O2 -Wall -Wno-unused -Wshadow -Woverloaded-virtual 
 AR = ar
 AUTOCONF = ${SHELL} /home/jhs/devel/anjuta-extras/missing --run autoconf
 AUTOHEADER = ${SHELL} /home/jhs/devel/anjuta-extras/missing --run autoheader
@@ -102,6 +104,10 @@
 CFLAGS = -g -O2
 CPP = gcc -E
 CPPFLAGS = 
+CXX = g++
+CXXCPP = g++ -E
+CXXDEPMODE = depmode=gcc3
+CXXFLAGS = -g -O2
 CYGPATH_W = echo
 DATADIRNAME = share
 DEFS = -DHAVE_CONFIG_H
@@ -128,6 +134,8 @@
 GREP = /bin/grep
 HAVE_GRAPHVIZ_FALSE = #
 HAVE_GRAPHVIZ_TRUE = 
+HAVE_PLUGIN_SCINTILLA_FALSE = #
+HAVE_PLUGIN_SCINTILLA_TRUE = 
 HAVE_PLUGIN_VALGRIND_FALSE = #
 HAVE_PLUGIN_VALGRIND_TRUE = 
 INSTALL_DATA = ${INSTALL} -m 644
@@ -170,9 +178,9 @@
 LIPO = 
 LN_S = ln -s
 LTLIBOBJS = 
-MAINT = #
-MAINTAINER_MODE_FALSE = 
-MAINTAINER_MODE_TRUE = #
+MAINT = 
+MAINTAINER_MODE_FALSE = #
+MAINTAINER_MODE_TRUE = 
 MAKEINFO = ${SHELL} /home/jhs/devel/anjuta-extras/missing --run makeinfo
 MKINSTALLDIRS = ./mkinstalldirs
 MSGFMT = /usr/bin/msgfmt
@@ -204,11 +212,16 @@
 STRIP = strip
 USE_NLS = yes
 VERSION = 2.27.0
+WARN_CFLAGS = -Wall -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wno-sign-compare 
+WARN_CXXFLAGS = -g -O2 -Wall -Wno-unused -Wshadow -Woverloaded-virtual 
 XGETTEXT = /usr/bin/xgettext
 ac_ct_CC = gcc
+ac_ct_CXX = g++
 ac_ct_DUMPBIN = 
 am__fastdepCC_FALSE = #
 am__fastdepCC_TRUE = 
+am__fastdepCXX_FALSE = #
+am__fastdepCXX_TRUE = 
 am__include = include
 am__leading_dot = .
 am__quote = 
@@ -250,7 +263,7 @@
 mkdir_p = mkdir -p --
 oldincludedir = /usr/include
 pdfdir = ${docdir}
-prefix = /usr/local
+prefix = /usr
 program_transform_name = s,x,x,
 psdir = ${docdir}
 sbindir = ${exec_prefix}/sbin
@@ -308,7 +321,7 @@
 
 .SUFFIXES:
 .SUFFIXES: .c .lo .o .obj
-$(srcdir)/Makefile.in: # $(srcdir)/Makefile.am  $(am__configure_deps)
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
 	@for dep in $?; do \
 	  case '$(am__configure_deps)' in \
 	    *$$dep*) \
@@ -333,9 +346,9 @@
 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 
-$(top_srcdir)/configure: # $(am__configure_deps)
+$(top_srcdir)/configure:  $(am__configure_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4): # $(am__aclocal_m4_deps)
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 install-pluginLTLIBRARIES: $(plugin_LTLIBRARIES)
 	@$(NORMAL_INSTALL)

Modified: trunk/plugins/scratchbox/Makefile.in
==============================================================================
--- trunk/plugins/scratchbox/Makefile.in	(original)
+++ trunk/plugins/scratchbox/Makefile.in	Wed Apr  8 07:16:46 2009
@@ -89,6 +89,8 @@
 AMDEP_FALSE = @AMDEP_FALSE@
 AMDEP_TRUE = @AMDEP_TRUE@
 AMTAR = @AMTAR@
+AM_CFLAGS = @AM_CFLAGS@
+AM_CXXFLAGS = @AM_CXXFLAGS@
 AR = @AR@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
@@ -102,6 +104,10 @@
 CFLAGS = @CFLAGS@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DATADIRNAME = @DATADIRNAME@
 DEFS = @DEFS@
@@ -128,6 +134,8 @@
 GREP = @GREP@
 HAVE_GRAPHVIZ_FALSE = @HAVE_GRAPHVIZ_FALSE@
 HAVE_GRAPHVIZ_TRUE = @HAVE_GRAPHVIZ_TRUE@
+HAVE_PLUGIN_SCINTILLA_FALSE = @HAVE_PLUGIN_SCINTILLA_FALSE@
+HAVE_PLUGIN_SCINTILLA_TRUE = @HAVE_PLUGIN_SCINTILLA_TRUE@
 HAVE_PLUGIN_VALGRIND_FALSE = @HAVE_PLUGIN_VALGRIND_FALSE@
 HAVE_PLUGIN_VALGRIND_TRUE = @HAVE_PLUGIN_VALGRIND_TRUE@
 INSTALL_DATA = @INSTALL_DATA@
@@ -204,11 +212,16 @@
 STRIP = @STRIP@
 USE_NLS = @USE_NLS@
 VERSION = @VERSION@
+WARN_CFLAGS = @WARN_CFLAGS@
+WARN_CXXFLAGS = @WARN_CXXFLAGS@
 XGETTEXT = @XGETTEXT@
 ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
 am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@

Modified: trunk/plugins/valgrind/Makefile
==============================================================================
--- trunk/plugins/valgrind/Makefile	(original)
+++ trunk/plugins/valgrind/Makefile	Wed Apr  8 07:16:46 2009
@@ -128,6 +128,8 @@
 AMDEP_FALSE = #
 AMDEP_TRUE = 
 AMTAR = ${SHELL} /home/jhs/devel/anjuta-extras/missing --run tar
+AM_CFLAGS =  -Wall -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wno-sign-compare 
+AM_CXXFLAGS =  -g -O2 -Wall -Wno-unused -Wshadow -Woverloaded-virtual 
 AR = ar
 AUTOCONF = ${SHELL} /home/jhs/devel/anjuta-extras/missing --run autoconf
 AUTOHEADER = ${SHELL} /home/jhs/devel/anjuta-extras/missing --run autoheader
@@ -141,6 +143,10 @@
 CFLAGS = -g -O2
 CPP = gcc -E
 CPPFLAGS = 
+CXX = g++
+CXXCPP = g++ -E
+CXXDEPMODE = depmode=gcc3
+CXXFLAGS = -g -O2
 CYGPATH_W = echo
 DATADIRNAME = share
 DEFS = -DHAVE_CONFIG_H
@@ -167,6 +173,8 @@
 GREP = /bin/grep
 HAVE_GRAPHVIZ_FALSE = #
 HAVE_GRAPHVIZ_TRUE = 
+HAVE_PLUGIN_SCINTILLA_FALSE = #
+HAVE_PLUGIN_SCINTILLA_TRUE = 
 HAVE_PLUGIN_VALGRIND_FALSE = #
 HAVE_PLUGIN_VALGRIND_TRUE = 
 INSTALL_DATA = ${INSTALL} -m 644
@@ -209,9 +217,9 @@
 LIPO = 
 LN_S = ln -s
 LTLIBOBJS = 
-MAINT = #
-MAINTAINER_MODE_FALSE = 
-MAINTAINER_MODE_TRUE = #
+MAINT = 
+MAINTAINER_MODE_FALSE = #
+MAINTAINER_MODE_TRUE = 
 MAKEINFO = ${SHELL} /home/jhs/devel/anjuta-extras/missing --run makeinfo
 MKINSTALLDIRS = ./mkinstalldirs
 MSGFMT = /usr/bin/msgfmt
@@ -243,11 +251,16 @@
 STRIP = strip
 USE_NLS = yes
 VERSION = 2.27.0
+WARN_CFLAGS = -Wall -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wno-sign-compare 
+WARN_CXXFLAGS = -g -O2 -Wall -Wno-unused -Wshadow -Woverloaded-virtual 
 XGETTEXT = /usr/bin/xgettext
 ac_ct_CC = gcc
+ac_ct_CXX = g++
 ac_ct_DUMPBIN = 
 am__fastdepCC_FALSE = #
 am__fastdepCC_TRUE = 
+am__fastdepCXX_FALSE = #
+am__fastdepCXX_TRUE = 
 am__include = include
 am__leading_dot = .
 am__quote = 
@@ -289,7 +302,7 @@
 mkdir_p = mkdir -p --
 oldincludedir = /usr/include
 pdfdir = ${docdir}
-prefix = /usr/local
+prefix = /usr
 program_transform_name = s,x,x,
 psdir = ${docdir}
 sbindir = ${exec_prefix}/sbin
@@ -421,7 +434,7 @@
 
 .SUFFIXES:
 .SUFFIXES: .c .lo .o .obj
-$(srcdir)/Makefile.in: # $(srcdir)/Makefile.am  $(am__configure_deps)
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
 	@for dep in $?; do \
 	  case '$(am__configure_deps)' in \
 	    *$$dep*) \
@@ -446,9 +459,9 @@
 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 
-$(top_srcdir)/configure: # $(am__configure_deps)
+$(top_srcdir)/configure:  $(am__configure_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4): # $(am__aclocal_m4_deps)
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 install-pluginLTLIBRARIES: $(plugin_LTLIBRARIES)
 	@$(NORMAL_INSTALL)

Modified: trunk/plugins/valgrind/Makefile.in
==============================================================================
--- trunk/plugins/valgrind/Makefile.in	(original)
+++ trunk/plugins/valgrind/Makefile.in	Wed Apr  8 07:16:46 2009
@@ -128,6 +128,8 @@
 AMDEP_FALSE = @AMDEP_FALSE@
 AMDEP_TRUE = @AMDEP_TRUE@
 AMTAR = @AMTAR@
+AM_CFLAGS = @AM_CFLAGS@
+AM_CXXFLAGS = @AM_CXXFLAGS@
 AR = @AR@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
@@ -141,6 +143,10 @@
 CFLAGS = @CFLAGS@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DATADIRNAME = @DATADIRNAME@
 DEFS = @DEFS@
@@ -167,6 +173,8 @@
 GREP = @GREP@
 HAVE_GRAPHVIZ_FALSE = @HAVE_GRAPHVIZ_FALSE@
 HAVE_GRAPHVIZ_TRUE = @HAVE_GRAPHVIZ_TRUE@
+HAVE_PLUGIN_SCINTILLA_FALSE = @HAVE_PLUGIN_SCINTILLA_FALSE@
+HAVE_PLUGIN_SCINTILLA_TRUE = @HAVE_PLUGIN_SCINTILLA_TRUE@
 HAVE_PLUGIN_VALGRIND_FALSE = @HAVE_PLUGIN_VALGRIND_FALSE@
 HAVE_PLUGIN_VALGRIND_TRUE = @HAVE_PLUGIN_VALGRIND_TRUE@
 INSTALL_DATA = @INSTALL_DATA@
@@ -243,11 +251,16 @@
 STRIP = @STRIP@
 USE_NLS = @USE_NLS@
 VERSION = @VERSION@
+WARN_CFLAGS = @WARN_CFLAGS@
+WARN_CXXFLAGS = @WARN_CXXFLAGS@
 XGETTEXT = @XGETTEXT@
 ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
 am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@

Modified: trunk/po/POTFILES
==============================================================================
--- trunk/po/POTFILES	(original)
+++ trunk/po/POTFILES	Wed Apr  8 07:16:46 2009
@@ -1,152 +1,5 @@
-	../anjuta.desktop.in.in \
-	../libanjuta/anjuta-c-module.c \
-	../libanjuta/anjuta-c-plugin-factory.c \
-	../libanjuta/anjuta-convert.c \
-	../libanjuta/anjuta-encodings.c \
-	../libanjuta/anjuta-launcher.c \
-	../libanjuta/anjuta-plugin.c \
-	../libanjuta/anjuta-plugin-description.c \
-	../libanjuta/anjuta-plugin-handle.c \
-	../libanjuta/anjuta-plugin-manager.c \
-	../libanjuta/anjuta-profile.c \
-	../libanjuta/anjuta-preferences.c \
-	../libanjuta/anjuta-preferences-dialog.c \
-	../libanjuta/anjuta-save-prompt.c \
-	../libanjuta/anjuta-serializer.c \
-	../libanjuta/anjuta-session.c \
-	../libanjuta/anjuta-shell.c \
-	../libanjuta/anjuta-status.c \
-	../libanjuta/anjuta-ui.c \
-	../libanjuta/anjuta-utils.c \
-	../libanjuta/anjuta-vcs-status-tree-view.c \
-	../libanjuta/cell-renderer-captioned-image.c \
-	../libanjuta/e-splash.c \
-	../libanjuta/resources.c \
-	../plugins/build-basic-autotools/anjuta-build-basic-autotools-plugin.glade \
-	../plugins/build-basic-autotools/build-options.c \
-	../plugins/build-basic-autotools/configuration-list.c \
-	../plugins/build-basic-autotools/executer.c \
-	../plugins/build-basic-autotools/plugin.c \
-	../plugins/build-basic-autotools/program.c \
 	../plugins/class-inheritance/class-inherit.c \
 	../plugins/class-inheritance/plugin.c \
-	../plugins/class-gen/anjuta-class-gen-plugin.glade \
-	../plugins/class-gen/cell-renderer-flags.c \
-	../plugins/class-gen/combo-flags.c \
-	../plugins/class-gen/element-editor.c \
-	../plugins/class-gen/generator.c \
-	../plugins/class-gen/plugin.c \
-	../plugins/class-gen/transform.c \
-	../plugins/class-gen/validator.c \
-	../plugins/class-gen/window.c \
-	../plugins/cvs-plugin/anjuta-cvs-plugin.glade \
-	../plugins/cvs-plugin/cvs-actions.c \
-	../plugins/cvs-plugin/cvs-callbacks.c \
-	../plugins/cvs-plugin/cvs-execute.c \
-	../plugins/cvs-plugin/plugin.c \
-	../plugins/debug-manager/anjuta-debug-manager.glade \
-	../plugins/debug-manager/breakpoints.c \
-	../plugins/debug-manager/chunk_view.c \
-	../plugins/debug-manager/data_buffer.c \
-	../plugins/debug-manager/data_view.c \
-	../plugins/debug-manager/debug_tree.c \
-	../plugins/debug-manager/disassemble.c \
-	../plugins/debug-manager/info.c \
-	../plugins/debug-manager/locals.c \
-	../plugins/debug-manager/memory.c \
-	../plugins/debug-manager/plugin.c \
-	../plugins/debug-manager/queue.c \
-	../plugins/debug-manager/registers.c \
-	../plugins/debug-manager/sexy-icon-entry.c \
-	../plugins/debug-manager/sharedlib.c \
-	../plugins/debug-manager/signals.c \
-	../plugins/debug-manager/sparse_buffer.c \
-	../plugins/debug-manager/sparse_view.c \
-	../plugins/debug-manager/stack_trace.c \
-	../plugins/debug-manager/start.c \
-	../plugins/debug-manager/threads.c \
-	../plugins/debug-manager/utilities.c \
-	../plugins/debug-manager/watch.c \
-	../plugins/devhelp/plugin.c \
-	../plugins/document-manager/action-callbacks.c \
-	../plugins/document-manager/anjuta-bookmarks.c \
-	../plugins/document-manager/anjuta-docman.c \
-	../plugins/document-manager/anjuta-document-manager.glade \
-	../plugins/document-manager/plugin.c \
-	../plugins/document-manager/search-box.c \
-	../plugins/file-loader/anjuta-recent-chooser-menu.c \
-	../plugins/file-loader/plugin.c \
-	../plugins/file-manager/file-manager.glade \
-	../plugins/file-manager/file-model.c \
-	../plugins/file-manager/file-view.c \
-	../plugins/file-manager/plugin.c \
-	../plugins/file-wizard/anjuta-file-wizard.glade \
-	../plugins/file-wizard/file.c \
-	../plugins/file-wizard/plugin.c \
-	../plugins/gbf-am/gbf-am-config.c \
-	../plugins/gbf-am/gbf-am-dialogs.glade \
-	../plugins/gbf-am/gbf-am-project.c \
-	../plugins/gbf-am/gbf-am-properties.c \
-	../plugins/gbf-mkfile/gbf-mkfile-config.c \
-	../plugins/gbf-mkfile/gbf-mkfile-project.c \
-	../plugins/gbf-mkfile/gbf-mkfile-properties.c \
-	../plugins/gdb/anjuta-gdb.glade \
-	../plugins/gdb/debugger.c \
-	../plugins/gdb/plugin.c \
-	../plugins/gdb/utilities.c \
-	../plugins/git/anjuta-git.glade \
-	../plugins/git/git-add-dialog.c \
-	../plugins/git/git-add-remote-dialog.c \
-	../plugins/git/git-bisect-dialog.c \
-	../plugins/git/git-cat-file-menu.c \
-	../plugins/git/git-checkout-files-dialog.c \
-	../plugins/git/git-commit-dialog.c \
-	../plugins/git/git-create-branch-dialog.c \
-	../plugins/git/git-create-tag-dialog.c \
-	../plugins/git/git-delete-branch-dialog.c \
-	../plugins/git/git-fetch-dialog.c \
-	../plugins/git/git-log-dialog.c \
-	../plugins/git/git-merge-dialog.c \
-	../plugins/git/git-pull-dialog.c \
-	../plugins/git/git-rebase-dialog.c \
-	../plugins/git/git-remove-dialog.c \
-	../plugins/git/git-reset-dialog.c \
-	../plugins/git/git-resolve-dialog.c \
-	../plugins/git/git-revert-dialog.c \
-	../plugins/git/git-switch-dialog.c \
-	../plugins/git/git-ui-utils.c \
-	../plugins/git/git-unstage-dialog.c \
-	../plugins/git/plugin.c \
-	../plugins/glade/anjuta-glade.glade \
-	../plugins/glade/designer-associations-item.c \
-	../plugins/glade/plugin.c \
-	../plugins/glade/anjuta-design-document.c \
-	../plugins/gtodo/add_edit_item.c \
-	../plugins/gtodo/callback.c \
-	../plugins/gtodo/export.c \
-	../plugins/gtodo/interface.c \
-	../plugins/gtodo/libgtodo.c \
-	../plugins/gtodo/list_tooltip.c \
-	../plugins/gtodo/mcategory.c \
-	../plugins/gtodo/notification.c \
-	../plugins/gtodo/plugin.c \
-	../plugins/gtodo/preferences.c \
-	../plugins/gtodo/tasklists.c \
-	../plugins/gtodo/todo_db.c \
-	../plugins/macro/anjuta-macro.glade \
-	../plugins/macro/macro-actions.c \
-	../plugins/macro/macro-db.c \
-	../plugins/macro/macro-dialog.c \
-	../plugins/macro/macro-edit.c \
-	../plugins/macro/macro-util.c \
-	../plugins/macro/plugin.c \
-	../plugins/message-view/anjuta-message-manager-plugin.glade \
-	../plugins/message-view/anjuta-msgman.c \
-	../plugins/message-view/message-view.c \
-	../plugins/message-view/plugin.c \
-	../plugins/patch/patch-plugin.c \
-	../plugins/patch/patch-plugin.glade \
-	../plugins/patch/plugin.c \
 	../plugins/profiler/gprof-call-graph-block.c \
 	../plugins/profiler/gprof-call-graph-block-entry.c \
 	../plugins/profiler/gprof-call-graph.c \
@@ -165,72 +18,12 @@
 	../plugins/profiler/profiler-function-call-tree.glade \
 	../plugins/profiler/profiler.glade \
 	../plugins/profiler/string-utils.c \
-	../plugins/project-import/plugin.c \
-	../plugins/project-import/project-import.glade \
-	../plugins/project-import/project-import-dialog.c \
-	../plugins/project-manager/create_dialogs.glade \
-	../plugins/project-manager/gbf-project-model.c \
-	../plugins/project-manager/gbf-project-util.c \
-	../plugins/project-manager/plugin.c \
-	../plugins/project-wizard/anjuta-project-wizard.ui \
-	../plugins/project-wizard/druid.c \
-	../plugins/project-wizard/install.c \
-	../plugins/project-wizard/plugin.c \
-	../plugins/project-wizard/property.c \
-	../plugins/project-wizard/templates/translatable-strings.h \
-	../plugins/run-program/anjuta-run-program.glade \
-	../plugins/run-program/execute.c \
-	../plugins/run-program/parameters.c \
-	../plugins/run-program/plugin.c \
-	../plugins/sample1/plugin.c \
 	../plugins/scintilla/anjuta-editor-scintilla.glade \
 	../plugins/scintilla/print.c \
 	../plugins/scintilla/plugin.c \
 	../plugins/scintilla/text_editor.c \
 	../plugins/scratchbox/anjuta-scratchbox.glade \
 	../plugins/scratchbox/plugin.c \
-	../plugins/search/anjuta-search.glade \
-	../plugins/search/plugin.c \
-	../plugins/search/search_preferences.c \
-	../plugins/search/search-replace.c \
-	../plugins/search/search-replace_backend.c \
-	../plugins/sourceview/sourceview.c \
-	../plugins/sourceview/sourceview-io.c \
-	../plugins/sourceview/sourceview-print.c \
-	../plugins/sourceview/anjuta-editor-sourceview.ui \
-	../plugins/starter/plugin.c \
-	../plugins/starter/starter.c \
-	../plugins/subversion/anjuta-subversion.glade \
-	../plugins/subversion/plugin.c \
-	../plugins/subversion/subversion-add-dialog.c \
-	../plugins/subversion/subversion-commit-dialog.c \
-	../plugins/subversion/subversion-copy-dialog.c \
-	../plugins/subversion/subversion-diff-dialog.c \
-	../plugins/subversion/subversion-log-dialog.c \
-	../plugins/subversion/subversion-merge-dialog.c \
-	../plugins/subversion/subversion-remove-dialog.c \
-	../plugins/subversion/subversion-resolve-dialog.c \
-	../plugins/subversion/subversion-revert-dialog.c \
-	../plugins/subversion/subversion-switch-dialog.c \
-	../plugins/subversion/subversion-ui-utils.c \
-	../plugins/subversion/subversion-update-dialog.c \
-	../plugins/subversion/svn-command.c \
-	../plugins/symbol-db/plugin.c \
-	../plugins/symbol-db/symbol-db-prefs.c \
-	../plugins/symbol-db/symbol-db-system.c \
-	../plugins/symbol-db/symbol-db-view-locals.c \
-	../plugins/symbol-db/symbol-db-view.c \
-	../plugins/symbol-db/anjuta-symbol-db.glade \
-	../plugins/terminal/anjuta-terminal-plugin.glade \
-	../plugins/terminal/terminal.c \
-	../plugins/tools/anjuta-tools.glade \
-	../plugins/tools/dialog.c \
-	../plugins/tools/editor.c \
-	../plugins/tools/execute.c \
-	../plugins/tools/fileop.c \
-	../plugins/tools/plugin.c \
-	../plugins/tools/variable.c \
-	../plugins/tools/tool.c \
 	../plugins/valgrind/anjuta-valgrind.glade \
 	../plugins/valgrind/plugin.c \
 	../plugins/valgrind/preferences.c \
@@ -243,62 +36,9 @@
 	../plugins/valgrind/vgmemcheckprefs.c \
 	../plugins/valgrind/vgrule-editor.c \
 	../plugins/valgrind/vgrule-list.c \
-	../src/about.c \
-	../src/action-callbacks.c \
-	../src/anjuta.c \
-	../src/anjuta.glade \
-	../src/anjuta-actions.h \
-	../src/anjuta-app.c \
-	../src/main.c \
-	../libanjuta/anjuta-save-prompt.c \
-	../plugins/debug-manager/breakpoints.c \
-	../plugins/debug-manager/debug_tree.c \
-	../plugins/debug-manager/info.c \
-	../plugins/debug-manager/locals.c \
-	../plugins/debug-manager/memory.c \
-	../plugins/debug-manager/registers.c \
-	../plugins/debug-manager/sharedlib.c \
-	../plugins/debug-manager/signals.c \
-	../plugins/debug-manager/stack_trace.c \
-	../plugins/debug-manager/start.c \
-	../plugins/debug-manager/watch.c \
-	../plugins/language-support-cpp-java/anjuta-language-cpp-java.glade \
-	../plugins/language-support-cpp-java/plugin.c \
-	../plugins/sourceview/plugin.c \
-	../plugins/gdb/anjuta-gdb.plugin.in \
-	../plugins/git/git.plugin.in \
-	../plugins/devhelp/anjuta-devhelp.plugin.in \
-	../plugins/document-manager/anjuta-document-manager.plugin.in \
-	../plugins/file-wizard/anjuta-file-wizard.plugin.in \
-	../plugins/file-manager/file-manager.plugin.in \
-	../plugins/subversion/anjuta-subversion.plugin.in \
 	../plugins/class-inheritance/anjuta-class-inheritance.plugin.in \
-	../plugins/glade/anjuta-glade.plugin.in \
-	../plugins/gtodo/anjuta-gtodo.plugin.in \
-	../plugins/macro/anjuta-macro.plugin.in \
-	../plugins/patch/anjuta-patch.plugin.in \
-	../plugins/tools/anjuta-tools.plugin.in \
 	../plugins/sample1/anjuta-sample.plugin.in \
-	../plugins/build-basic-autotools/anjuta-build-basic-autotools.plugin.in \
-	../plugins/terminal/anjuta-terminal.plugin.in \
-	../plugins/cvs-plugin/anjuta-cvs.plugin.in \
-	../plugins/project-import/anjuta-project-import.plugin.in \
-	../plugins/sourceview/sourceview.plugin.in \
-	../plugins/scintilla/anjuta-editor.plugin.in \
-	../plugins/scratchbox/anjuta-scratchbox.plugin.in \
-	../plugins/starter/anjuta-starter.plugin.in \
-	../plugins/language-support-cpp-java/anjuta-language-cpp-java.plugin.in \
-	../plugins/project-wizard/anjuta-project-wizard.plugin.in \
 	../plugins/profiler/profiler.plugin.in \
-	../plugins/search/anjuta-search.plugin.in \
-	../plugins/class-gen/anjuta-class-gen.plugin.in \
-	../plugins/project-manager/anjuta-project-manager.plugin.in \
-	../plugins/symbol-db/symbol-db.plugin.in \
-	../plugins/message-view/anjuta-message-manager.plugin.in \
+	../plugins/scintilla/anjuta-editor.plugin.in \
 	../plugins/valgrind/anjuta-valgrind.plugin.in \
-	../plugins/file-loader/anjuta-loader.plugin.in \
-	../plugins/debug-manager/anjuta-debug-manager.plugin.in \
-	../plugins/run-program/anjuta-run-program.plugin.in \
-	../plugins/language-manager/language-manager.plugin.in \
-	../plugins/gbf-mkfile/gbf-mkfile.plugin.in \
-	../plugins/gbf-am/gbf-am.plugin.in
+	../plugins/scratchbox/anjuta-scratchbox.plugin.in

Modified: trunk/po/POTFILES.in
==============================================================================
--- trunk/po/POTFILES.in	(original)
+++ trunk/po/POTFILES.in	Wed Apr  8 07:16:46 2009
@@ -21,6 +21,10 @@
 plugins/profiler/profiler-function-call-tree.glade
 plugins/profiler/profiler.glade
 plugins/profiler/string-utils.c
+plugins/scintilla/anjuta-editor-scintilla.glade
+plugins/scintilla/print.c
+plugins/scintilla/plugin.c
+plugins/scintilla/text_editor.c
 plugins/scratchbox/anjuta-scratchbox.glade
 plugins/scratchbox/plugin.c
 plugins/valgrind/anjuta-valgrind.glade
@@ -38,4 +42,6 @@
 [type: gettext/ini]plugins/class-inheritance/anjuta-class-inheritance.plugin.in
 [type: gettext/ini]plugins/sample1/anjuta-sample.plugin.in
 [type: gettext/ini]plugins/profiler/profiler.plugin.in
+[type: gettext/ini]plugins/scintilla/anjuta-editor.plugin.in
 [type: gettext/ini]plugins/valgrind/anjuta-valgrind.plugin.in
+[type: gettext/ini]plugins/scratchbox/anjuta-scratchbox.plugin.in



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