OSDN Git Service

<identify>、<number>、<boolean>を解釈するそれぞれの部分字句解析を行うLexerを追加。
authorderui <derutakayu@user.sourceforge.jp>
Sun, 17 Jan 2010 11:58:38 +0000 (20:58 +0900)
committerderui <derutakayu@user.sourceforge.jp>
Sun, 17 Jan 2010 11:58:38 +0000 (20:58 +0900)
コンテナの追加を一般化したunicode::Appendを追加。
term::に各termを追加。<number>に利用する各テンプレートも追加。

冗長になっていたunicode::UniStringへの追加をunicode::Appendを利用するように全面的に書き換えた。
各テストを追加。

38 files changed:
Makefile
Makefile.in
Rakefile
Rakefile.in
autom4te.cache/output.0
autom4te.cache/requests
autom4te.cache/traces.0
config.log
lib/crtp.h
lib/range.h
lib/smart_ptr.h
src/lexeme.cpp
src/lexeme.h
src/lexer/boolean_lexer.cpp [new file with mode: 0755]
src/lexer/boolean_lexer.h [new file with mode: 0755]
src/lexer/charactor_lexer.cpp
src/lexer/identifier_lexer.cpp [new file with mode: 0755]
src/lexer/identifier_lexer.h
src/lexer/inline_hex_escape_lexer.cpp
src/lexer/inline_hex_escape_lexer.h
src/lexer/inner_hex_lexer.cpp
src/lexer/number_lexer.cpp [new file with mode: 0755]
src/lexer/number_lexer.cpp.bk [deleted file]
src/lexer/number_lexer.h
src/lexer/number_lexer_detail_templates.h [new file with mode: 0644]
src/lexer/string_lexer.cpp
src/lexer/string_lexer.h
src/lexer/term_checker.cpp
src/lexer/term_checker.h
src/lexer/term_lexer.h
src/unicode.cpp
src/unicode.h
test/boolean_lexer_test.cpp [new file with mode: 0755]
test/identifier_lexer_test.cpp [new file with mode: 0755]
test/inline_hex_escape_lexer_test.cpp
test/number_lexer_test.cpp [new file with mode: 0755]
test/string_lexer_test.cpp
test/unicode_test.cpp

index 101eaad..b102303 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -31,9 +31,9 @@ PRE_UNINSTALL = :
 POST_UNINSTALL = :
 subdir = .
 DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
-       $(srcdir)/Makefile.in $(srcdir)/config.h.in \
-       $(top_srcdir)/configure $(top_srcdir)/src/Rakefile.in AUTHORS \
-       COPYING ChangeLog INSTALL NEWS depcomp install-sh missing \
+       $(srcdir)/Makefile.in $(srcdir)/Rakefile.in \
+       $(srcdir)/config.h.in $(top_srcdir)/configure AUTHORS COPYING \
+       ChangeLog INSTALL NEWS depcomp install-sh missing \
        mkinstalldirs
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/configure.in
@@ -43,7 +43,7 @@ am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
  configure.lineno config.status.lineno
 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
 CONFIG_HEADER = config.h
-CONFIG_CLEAN_FILES = src/Rakefile
+CONFIG_CLEAN_FILES = Rakefile
 SOURCES =
 DIST_SOURCES =
 RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
@@ -215,7 +215,7 @@ $(srcdir)/config.h.in:  $(am__configure_deps)
 
 distclean-hdr:
        -rm -f config.h stamp-h1
-src/Rakefile: $(top_builddir)/config.status $(top_srcdir)/src/Rakefile.in
+Rakefile: $(top_builddir)/config.status $(srcdir)/Rakefile.in
        cd $(top_builddir) && $(SHELL) ./config.status $@
 
 # This directory's subdirectories are mostly independent; you can cd
index 870ab07..70b6679 100644 (file)
@@ -31,9 +31,9 @@ PRE_UNINSTALL = :
 POST_UNINSTALL = :
 subdir = .
 DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
-       $(srcdir)/Makefile.in $(srcdir)/config.h.in \
-       $(top_srcdir)/configure $(top_srcdir)/src/Rakefile.in AUTHORS \
-       COPYING ChangeLog INSTALL NEWS depcomp install-sh missing \
+       $(srcdir)/Makefile.in $(srcdir)/Rakefile.in \
+       $(srcdir)/config.h.in $(top_srcdir)/configure AUTHORS COPYING \
+       ChangeLog INSTALL NEWS depcomp install-sh missing \
        mkinstalldirs
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/configure.in
@@ -43,7 +43,7 @@ am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
  configure.lineno config.status.lineno
 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
 CONFIG_HEADER = config.h
-CONFIG_CLEAN_FILES = src/Rakefile
+CONFIG_CLEAN_FILES = Rakefile
 SOURCES =
 DIST_SOURCES =
 RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
@@ -215,7 +215,7 @@ $(srcdir)/config.h.in:  $(am__configure_deps)
 
 distclean-hdr:
        -rm -f config.h stamp-h1
-src/Rakefile: $(top_builddir)/config.status $(top_srcdir)/src/Rakefile.in
+Rakefile: $(top_builddir)/config.status $(srcdir)/Rakefile.in
        cd $(top_builddir) && $(SHELL) ./config.status $@
 
 # This directory's subdirectories are mostly independent; you can cd
index 163da29..c592350 100644 (file)
--- a/Rakefile
+++ b/Rakefile
@@ -15,18 +15,20 @@ includes += "-I. -I."
 
 # lists of compile dependency objects
 SRCS = FileList["./src/**/*.cpp", "./lib/**/*.cpp"]
+SRCS_ALL = FileList[SRCS, "./src/**/*.h", "./lib/**/*.h"]
 OBJS = SRCS.ext("o")
-DEPS = SRCS.ext("po")
+DEPS = SRCS.ext("mf")
 TEST_SRCS = FileList["./test/*.cpp"]
 TEST_OBJECTS = TEST_SRCS.ext("o")
 TEST_OBJECTS.include(OBJS)
-TEST_DEPS = TEST_SRCS.ext("po")
+TEST_DEPS = TEST_SRCS.ext("mf")
 TEST_PROGRAMS = TEST_SRCS.ext("")
 
 EXEEXT = ""
 
 # lists of clean objects
 CLEAN.include(OBJS, TEST_OBJECTS)
+CLEAN.include(".depend.mf")
 CLOBBER.include(TEST_PROGRAMS)
 
 task "default" => ["compile"]
@@ -37,32 +39,51 @@ task "compile" => OBJS do |t|
 end
 
 rule "_test#{EXEEXT}" => TEST_OBJECTS do |t|
+  fullpath = File.expand_path t.name
   base = File.split(t.name);
   base[1] = File.basename(base[1], EXEEXT) + ".o"
-  sh "#{CC} -o #{t.name} #{ldflags} #{cflags} #{includes} #{OBJS.join(' ')} ./test/gtest/gtest-all.o #{File.join(base)} "
+  sh "#{CC} -o #{File.expand_path(t.name)} #{ldflags} #{cflags} #{includes} #{OBJS.join(' ')} ./test/gtest/gtest-all.o #{File.join(base)} "
 end
 
 rule '.o' => '.cpp' do |t|
+  fullpath = File.expand_path t.source
   depname = File.split(t.source)
-  depname[1] = File.basename(depname[1], ".cpp") + ".po"
-  sh "#{CC} -MD -MF #{File.join(depname[0], depname[1])} #{ldflags} #{cflags} #{includes} -c #{t.source} -o #{t.name}"
+  depname[1] = File.basename(depname[1], ".cpp") + ".mf"
+  sh "#{CC} #{ldflags} #{cflags} #{includes} -c #{fullpath} -o #{t.name}"
 end
 
-rule '.h' => '.cpp' do |t|
-end
+# -MM による依存性の抽出を行います。既存の依存性については、
+file ".depend.mf" => SRCS do |t|
+  rm t.name if File.exists? t.name
 
-loader = Rake::MakefileLoader.new
-DEPS.each do |f|
-  loader.load(f) if File.exists? f
-end
+  t.prerequisites.each do |f|
+    depname = File.split(f)
+    depname[1] = File.basename(depname[1], ".cpp") + ".mf"
+    sh "#{CC} -MM -MF #{File.join(depname[0], depname[1])} #{ldflags} #{cflags} #{includes} #{f}"
 
-TEST_DEPS.each do |f|
-  loader.load(f) if File.exists? f
+    replace_make_to_rake File.join(depname[0], depname[1]), t.name
+    # sh "cat #{File.join(depname[0], depname[1])} >> #{t.name}"
+    rm File.join(depname[0], depname[1])
+  end
 end
 
+import ".depend.mf"
+
 desc "run all test program in `TEST_PROGRAMS`"
 task :test_execute => TEST_PROGRAMS do |t|
   t.prerequisites.each { |f|
     sh "#{f} --gtest_color=yes"
   }
 end
+
+# Makefile形式のデータを、複数行から一行形式に変換します。
+def replace_make_to_rake(make_base_file, to_file)
+  file_data = File.read make_base_file
+
+  file_data = file_data.gsub(/\r\n|\r|\n/, "\n")
+  file_data = file_data.gsub(/\\\s+/, " ")
+  file_data = file_data.split "\n"
+  open(to_file, "a") do |d|
+    (file_data.select {|f| !f.empty? }).each { |x| d << x << "\n"}
+  end
+end
index 767832b..ac9a5e5 100644 (file)
@@ -15,18 +15,20 @@ includes += "-I. -I@top_srcdir@"
 
 # lists of compile dependency objects
 SRCS = FileList["@top_srcdir@/src/**/*.cpp", "@top_srcdir@/lib/**/*.cpp"]
+SRCS_ALL = FileList[SRCS, "@top_srcdir@/src/**/*.h", "@top_srcdir@/lib/**/*.h"]
 OBJS = SRCS.ext("o")
-DEPS = SRCS.ext("po")
+DEPS = SRCS.ext("mf")
 TEST_SRCS = FileList["@top_srcdir@/test/*.cpp"]
 TEST_OBJECTS = TEST_SRCS.ext("o")
 TEST_OBJECTS.include(OBJS)
-TEST_DEPS = TEST_SRCS.ext("po")
+TEST_DEPS = TEST_SRCS.ext("mf")
 TEST_PROGRAMS = TEST_SRCS.ext("@EXEEXT@")
 
 EXEEXT = "@EXEEXT@"
 
 # lists of clean objects
 CLEAN.include(OBJS, TEST_OBJECTS)
+CLEAN.include(".depend.mf")
 CLOBBER.include(TEST_PROGRAMS)
 
 task "default" => ["compile"]
@@ -37,32 +39,51 @@ task "compile" => OBJS do |t|
 end
 
 rule "_test#{EXEEXT}" => TEST_OBJECTS do |t|
+  fullpath = File.expand_path t.name
   base = File.split(t.name);
   base[1] = File.basename(base[1], EXEEXT) + ".o"
-  sh "#{CC} -o #{t.name} #{ldflags} #{cflags} #{includes} #{OBJS.join(' ')} ./test/gtest/gtest-all.o #{File.join(base)} "
+  sh "#{CC} -o #{File.expand_path(t.name)} #{ldflags} #{cflags} #{includes} #{OBJS.join(' ')} ./test/gtest/gtest-all.o #{File.join(base)} "
 end
 
 rule '.o' => '.cpp' do |t|
+  fullpath = File.expand_path t.source
   depname = File.split(t.source)
-  depname[1] = File.basename(depname[1], ".cpp") + ".po"
-  sh "#{CC} -MD -MF #{File.join(depname[0], depname[1])} #{ldflags} #{cflags} #{includes} -c #{t.source} -o #{t.name}"
+  depname[1] = File.basename(depname[1], ".cpp") + ".mf"
+  sh "#{CC} #{ldflags} #{cflags} #{includes} -c #{fullpath} -o #{t.name}"
 end
 
-rule '.h' => '.cpp' do |t|
-end
+# -MM による依存性の抽出を行います。既存の依存性については、
+file ".depend.mf" => SRCS do |t|
+  rm t.name if File.exists? t.name
 
-loader = Rake::MakefileLoader.new
-DEPS.each do |f|
-  loader.load(f) if File.exists? f
-end
+  t.prerequisites.each do |f|
+    depname = File.split(f)
+    depname[1] = File.basename(depname[1], ".cpp") + ".mf"
+    sh "#{CC} -MM -MF #{File.join(depname[0], depname[1])} #{ldflags} #{cflags} #{includes} #{f}"
 
-TEST_DEPS.each do |f|
-  loader.load(f) if File.exists? f
+    replace_make_to_rake File.join(depname[0], depname[1]), t.name
+    # sh "cat #{File.join(depname[0], depname[1])} >> #{t.name}"
+    rm File.join(depname[0], depname[1])
+  end
 end
 
+import ".depend.mf"
+
 desc "run all test program in `TEST_PROGRAMS`"
 task :test_execute => TEST_PROGRAMS do |t|
   t.prerequisites.each { |f|
     sh "#{f} --gtest_color=yes"
   }
 end
+
+# Makefile形式のデータを、複数行から一行形式に変換します。
+def replace_make_to_rake(make_base_file, to_file)
+  file_data = File.read make_base_file
+
+  file_data = file_data.gsub(/\r\n|\r|\n/, "\n")
+  file_data = file_data.gsub(/\\\s+/, " ")
+  file_data = file_data.split "\n"
+  open(to_file, "a") do |d|
+    (file_data.select {|f| !f.empty? }).each { |x| d << x << "\n"}
+  end
+end
index 64a22d6..148d610 100644 (file)
@@ -1,22 +1,20 @@
 @%:@! /bin/sh
 @%:@ Guess values for system-dependent variables and create Makefiles.
-@%:@ Generated by GNU Autoconf 2.64 for utakata 0.0.1.
+@%:@ Generated by GNU Autoconf 2.63 for utakata 0.0.1.
 @%:@
 @%:@ Report bugs to <BUG-REPORT-ADDRESS>.
 @%:@ 
 @%:@ Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-@%:@ 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
-@%:@ Foundation, Inc.
-@%:@ 
+@%:@ 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
 @%:@ This configure script is free software; the Free Software Foundation
 @%:@ gives unlimited permission to copy, distribute and modify it.
-## -------------------- ##
-## M4sh Initialization. ##
-## -------------------- ##
+## --------------------- ##
+## M4sh Initialization.  ##
+## --------------------- ##
 
 # Be more Bourne compatible
 DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
   emulate sh
   NULLCMD=:
   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
@@ -24,15 +22,23 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
   alias -g '${1+"$@"}'='"$@"'
   setopt NO_GLOB_SUBST
 else
-  case `(set -o) 2>/dev/null` in @%:@(
-  *posix*) :
-    set -o posix ;; @%:@(
-  *) :
-     ;;
+  case `(set -o) 2>/dev/null` in
+  *posix*) set -o posix ;;
 esac
+
 fi
 
 
+
+
+# PATH needs CR
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
 as_nl='
 '
 export as_nl
@@ -40,13 +46,7 @@ export as_nl
 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
-# Prefer a ksh shell builtin over an external printf program on Solaris,
-# but without wasting forks for bash or zsh.
-if test -z "$BASH_VERSION$ZSH_VERSION" \
-    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
-  as_echo='print -r --'
-  as_echo_n='print -rn --'
-elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
   as_echo='printf %s\n'
   as_echo_n='printf %s'
 else
@@ -57,7 +57,7 @@ else
     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
     as_echo_n_body='eval
       arg=$1;
-      case $arg in @%:@(
+      case $arg in
       *"$as_nl"*)
        expr "X$arg" : "X\\(.*\\)$as_nl";
        arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
@@ -80,6 +80,13 @@ if test "${PATH_SEPARATOR+set}" != set; then
   }
 fi
 
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+  as_unset=unset
+else
+  as_unset=false
+fi
+
 
 # IFS
 # We need space, tab and new line, in precisely that order.  Quoting is
@@ -89,15 +96,15 @@ fi
 IFS=" ""       $as_nl"
 
 # Find who we are.  Look in the path if we contain no directory separator.
-case $0 in @%:@((
+case $0 in
   *[\\/]* ) as_myself=$0 ;;
   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-  done
+  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
 IFS=$as_save_IFS
 
      ;;
@@ -109,16 +116,12 @@ if test "x$as_myself" = x; then
 fi
 if test ! -f "$as_myself"; then
   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
-  exit 1
+  { (exit 1); exit 1; }
 fi
 
-# Unset variables that we do not need and which cause bugs (e.g. in
-# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
-# suppresses any "Segmentation fault" message there.  '((' could
-# trigger a bug in pdksh 5.2.14.
-for as_var in BASH_ENV ENV MAIL MAILPATH
-do eval test x\${$as_var+set} = xset \
-  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+# Work around bugs in pre-3.0 UWIN ksh.
+for as_var in ENV MAIL MAILPATH
+do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
 done
 PS1='$ '
 PS2='> '
@@ -130,300 +133,330 @@ export LC_ALL
 LANGUAGE=C
 export LANGUAGE
 
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+        X"$0" : 'X\(//\)$' \| \
+        X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{
+           s//\1/
+           q
+         }
+         /^X\/\(\/\/\)$/{
+           s//\1/
+           q
+         }
+         /^X\/\(\/\).*/{
+           s//\1/
+           q
+         }
+         s/.*/./; q'`
+
 # CDPATH.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+$as_unset CDPATH
+
 
 if test "x$CONFIG_SHELL" = x; then
-  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
-  emulate sh
-  NULLCMD=:
-  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
-  # is contrary to our usage.  Disable this feature.
-  alias -g '\${1+\"\$@\"}'='\"\$@\"'
-  setopt NO_GLOB_SUBST
+  if (eval ":") 2>/dev/null; then
+  as_have_required=yes
 else
-  case \`(set -o) 2>/dev/null\` in @%:@(
-  *posix*) :
-    set -o posix ;; @%:@(
-  *) :
-     ;;
-esac
+  as_have_required=no
 fi
-"
-  as_required="as_fn_return () { (exit \$1); }
-as_fn_success () { as_fn_return 0; }
-as_fn_failure () { as_fn_return 1; }
-as_fn_ret_success () { return 0; }
-as_fn_ret_failure () { return 1; }
+
+  if test $as_have_required = yes &&    (eval ":
+(as_func_return () {
+  (exit \$1)
+}
+as_func_success () {
+  as_func_return 0
+}
+as_func_failure () {
+  as_func_return 1
+}
+as_func_ret_success () {
+  return 0
+}
+as_func_ret_failure () {
+  return 1
+}
 
 exitcode=0
-as_fn_success || { exitcode=1; echo as_fn_success failed.; }
-as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
-as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
-as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
-if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
-  
+if as_func_success; then
+  :
 else
-  exitcode=1; echo positional parameters were not saved.
+  exitcode=1
+  echo as_func_success failed.
 fi
-test x\$exitcode = x0 || exit 1"
-  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
-  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
-  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
-  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
-test \$(( 1 + 1 )) = 2 || exit 1"
-  if (eval "$as_required") 2>/dev/null; then :
-  as_have_required=yes
+
+if as_func_failure; then
+  exitcode=1
+  echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+  :
 else
-  as_have_required=no
+  exitcode=1
+  echo as_func_ret_success failed.
 fi
-  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
-  
+
+if as_func_ret_failure; then
+  exitcode=1
+  echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
+  :
 else
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-as_found=false
+  exitcode=1
+  echo positional parameters were not saved.
+fi
+
+test \$exitcode = 0) || { (exit 1); exit 1; }
+
+(
+  as_lineno_1=\$LINENO
+  as_lineno_2=\$LINENO
+  test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
+  test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
+") 2> /dev/null; then
+  :
+else
+  as_candidate_shells=
+    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  as_found=:
-  case $as_dir in @%:@(
+  case $as_dir in
         /*)
           for as_base in sh bash ksh sh5; do
-            # Try only shells that exist, to save several forks.
-            as_shell=$as_dir/$as_base
-            if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
-                   { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
-  CONFIG_SHELL=$as_shell as_have_required=yes
-                  if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
-  break 2
-fi
-fi
+            as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
           done;;
        esac
-  as_found=false
 done
-$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
-             { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
-  CONFIG_SHELL=$SHELL as_have_required=yes
-fi; }
 IFS=$as_save_IFS
 
 
-      if test "x$CONFIG_SHELL" != x; then :
-  # We cannot yet assume a decent shell, so we have to provide a
-       # neutralization value for shells without unset; and this also
-       # works around shells that cannot unset nonexistent variables.
-       BASH_ENV=/dev/null
-       ENV=/dev/null
-       (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
-       export CONFIG_SHELL
-       exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
-fi
+      for as_shell in $as_candidate_shells $SHELL; do
+        # Try only shells that exist, to save several forks.
+        if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+               { ("$as_shell") 2> /dev/null <<\_ASEOF
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in
+  *posix*) set -o posix ;;
+esac
 
-    if test x$as_have_required = xno; then :
-  $as_echo "$0: This script requires a shell more modern than all"
-  $as_echo "$0: the shells that I found on your system."
-  if test x${ZSH_VERSION+set} = xset ; then
-    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
-    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
-  else
-    $as_echo "$0: Please tell bug-autoconf@gnu.org and BUG-REPORT-ADDRESS
-$0: about your system, including any error possibly output
-$0: before this message. Then install a modern shell, or
-$0: manually run the script under such a shell if you do
-$0: have one."
-  fi
-  exit 1
-fi
 fi
+
+
+:
+_ASEOF
+}; then
+  CONFIG_SHELL=$as_shell
+              as_have_required=yes
+              if { "$as_shell" 2> /dev/null <<\_ASEOF
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in
+  *posix*) set -o posix ;;
+esac
+
 fi
-SHELL=${CONFIG_SHELL-/bin/sh}
-export SHELL
-# Unset more variables known to interfere with behavior of common tools.
-CLICOLOR_FORCE= GREP_OPTIONS=
-unset CLICOLOR_FORCE GREP_OPTIONS
 
-## --------------------- ##
-## M4sh Shell Functions. ##
-## --------------------- ##
-@%:@ as_fn_unset VAR
-@%:@ ---------------
-@%:@ Portably unset VAR.
-as_fn_unset ()
-{
-  { eval $1=; unset $1;}
+
+:
+(as_func_return () {
+  (exit $1)
+}
+as_func_success () {
+  as_func_return 0
+}
+as_func_failure () {
+  as_func_return 1
+}
+as_func_ret_success () {
+  return 0
+}
+as_func_ret_failure () {
+  return 1
 }
-as_unset=as_fn_unset
 
-@%:@ as_fn_set_status STATUS
-@%:@ -----------------------
-@%:@ Set $? to STATUS, without forking.
-as_fn_set_status ()
-{
-  return $1
-} @%:@ as_fn_set_status
+exitcode=0
+if as_func_success; then
+  :
+else
+  exitcode=1
+  echo as_func_success failed.
+fi
 
-@%:@ as_fn_exit STATUS
-@%:@ -----------------
-@%:@ Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
-as_fn_exit ()
-{
-  set +e
-  as_fn_set_status $1
-  exit $1
-} @%:@ as_fn_exit
-
-@%:@ as_fn_mkdir_p
-@%:@ -------------
-@%:@ Create "$as_dir" as a directory, including parents if necessary.
-as_fn_mkdir_p ()
-{
+if as_func_failure; then
+  exitcode=1
+  echo as_func_failure succeeded.
+fi
 
-  case $as_dir in #(
-  -*) as_dir=./$as_dir;;
-  esac
-  test -d "$as_dir" || eval $as_mkdir_p || {
-    as_dirs=
-    while :; do
-      case $as_dir in #(
-      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
-      *) as_qdir=$as_dir;;
-      esac
-      as_dirs="'$as_qdir' $as_dirs"
-      as_dir=`$as_dirname -- "$as_dir" ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-        X"$as_dir" : 'X\(//\)[^/]' \| \
-        X"$as_dir" : 'X\(//\)$' \| \
-        X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_dir" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-           s//\1/
-           q
-         }
-         /^X\(\/\/\)[^/].*/{
-           s//\1/
-           q
-         }
-         /^X\(\/\/\)$/{
-           s//\1/
-           q
-         }
-         /^X\(\/\).*/{
-           s//\1/
-           q
-         }
-         s/.*/./; q'`
-      test -d "$as_dir" && break
-    done
-    test -z "$as_dirs" || eval "mkdir $as_dirs"
-  } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
-
-
-} @%:@ as_fn_mkdir_p
-@%:@ as_fn_append VAR VALUE
-@%:@ ----------------------
-@%:@ Append the text in VALUE to the end of the definition contained in VAR. Take
-@%:@ advantage of any shell optimizations that allow amortized linear growth over
-@%:@ repeated appends, instead of the typical quadratic growth present in naive
-@%:@ implementations.
-if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
-  eval 'as_fn_append ()
-  {
-    eval $1+=\$2
-  }'
+if as_func_ret_success; then
+  :
 else
-  as_fn_append ()
-  {
-    eval $1=\$$1\$2
-  }
-fi # as_fn_append
-
-@%:@ as_fn_arith ARG...
-@%:@ ------------------
-@%:@ Perform arithmetic evaluation on the ARGs, and store the result in the
-@%:@ global $as_val. Take advantage of shells that can avoid forks. The arguments
-@%:@ must be portable across $(()) and expr.
-if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
-  eval 'as_fn_arith ()
-  {
-    as_val=$(( $* ))
-  }'
+  exitcode=1
+  echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+  exitcode=1
+  echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = "$1" ); then
+  :
 else
-  as_fn_arith ()
-  {
-    as_val=`expr "$@" || test $? -eq 1`
-  }
-fi # as_fn_arith
+  exitcode=1
+  echo positional parameters were not saved.
+fi
 
+test $exitcode = 0) || { (exit 1); exit 1; }
 
-@%:@ as_fn_error ERROR [LINENO LOG_FD]
-@%:@ ---------------------------------
-@%:@ Output "`basename @S|@0`: error: ERROR" to stderr. If LINENO and LOG_FD are
-@%:@ provided, also output the error to LOG_FD, referencing LINENO. Then exit the
-@%:@ script with status $?, using 1 if that was 0.
-as_fn_error ()
-{
-  as_status=$?; test $as_status -eq 0 && as_status=1
-  if test "$3"; then
-    as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-    $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
-  fi
-  $as_echo "$as_me: error: $1" >&2
-  as_fn_exit $as_status
-} @%:@ as_fn_error
+(
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
 
-if expr a : '\(a\)' >/dev/null 2>&1 &&
-   test "X`expr 00001 : '.*\(...\)'`" = X001; then
-  as_expr=expr
+_ASEOF
+}; then
+  break
+fi
+
+fi
+
+      done
+
+      if test "x$CONFIG_SHELL" != x; then
+  for as_var in BASH_ENV ENV
+       do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+       done
+       export CONFIG_SHELL
+       exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
+fi
+
+
+    if test $as_have_required = no; then
+  echo This script requires a shell more modern than all the
+      echo shells that I found on your system.  Please install a
+      echo modern shell, or manually run the script under such a
+      echo shell if you do have one.
+      { (exit 1); exit 1; }
+fi
+
+    
+fi
+
+fi
+
+
+
+(eval "as_func_return () {
+  (exit \$1)
+}
+as_func_success () {
+  as_func_return 0
+}
+as_func_failure () {
+  as_func_return 1
+}
+as_func_ret_success () {
+  return 0
+}
+as_func_ret_failure () {
+  return 1
+}
+
+exitcode=0
+if as_func_success; then
+  :
 else
-  as_expr=false
+  exitcode=1
+  echo as_func_success failed.
 fi
 
-if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
-  as_basename=basename
+if as_func_failure; then
+  exitcode=1
+  echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+  :
 else
-  as_basename=false
+  exitcode=1
+  echo as_func_ret_success failed.
 fi
 
-if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
-  as_dirname=dirname
+if as_func_ret_failure; then
+  exitcode=1
+  echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
+  :
 else
-  as_dirname=false
+  exitcode=1
+  echo positional parameters were not saved.
 fi
 
-as_me=`$as_basename -- "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
-        X"$0" : 'X\(//\)$' \| \
-        X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$0" |
-    sed '/^.*\/\([^/][^/]*\)\/*$/{
-           s//\1/
-           q
-         }
-         /^X\/\(\/\/\)$/{
-           s//\1/
-           q
-         }
-         /^X\/\(\/\).*/{
-           s//\1/
-           q
-         }
-         s/.*/./; q'`
+test \$exitcode = 0") || {
+  echo No shell found that supports shell functions.
+  echo Please tell bug-autoconf@gnu.org about your system,
+  echo including any error possibly output before this message.
+  echo This can help us improve future autoconf versions.
+  echo Configuration will now proceed without shell functions.
+}
+
 
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
 
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
 
-  as_lineno_1=$LINENO as_lineno_1a=$LINENO
-  as_lineno_2=$LINENO as_lineno_2a=$LINENO
-  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
-  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
-  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
+  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+  # uniformly replaced by the line number.  The first 'sed' inserts a
+  # line-number line after each line using $LINENO; the second 'sed'
+  # does the real work.  The second script uses 'N' to pair each
+  # line-number line with the line containing $LINENO, and appends
+  # trailing '-' during substitution so that $LINENO is not a special
+  # case at line end.
+  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+  # scripts with optimization help from Paolo Bonzini.  Blame Lee
+  # E. McMahon (1931-1989) for sed's syntax.  :-)
   sed -n '
     p
     /[$]LINENO/=
@@ -440,7 +473,8 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits
       s/-\n.*//
     ' >$as_me.lineno &&
   chmod +x "$as_me.lineno" ||
-    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+   { (exit 1); exit 1; }; }
 
   # Don't try to exec as it changes $[0], causing all sort of problems
   # (the dirname of $[0] is not the place where we might find the
@@ -450,18 +484,29 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits
   exit
 }
 
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+  as_dirname=dirname
+else
+  as_dirname=false
+fi
+
 ECHO_C= ECHO_N= ECHO_T=
-case `echo -n x` in @%:@(((((
+case `echo -n x` in
 -n*)
-  case `echo 'xy\c'` in
+  case `echo 'x\c'` in
   *c*) ECHO_T='        ';;     # ECHO_T is single tab character.
-  xy)  ECHO_C='\c';;
-  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
-       ECHO_T='        ';;
+  *)   ECHO_C='\c';;
   esac;;
 *)
   ECHO_N='-n';;
 esac
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
+  as_expr=expr
+else
+  as_expr=false
+fi
 
 rm -f conf$$ conf$$.exe conf$$.file
 if test -d conf$$.dir; then
@@ -491,7 +536,7 @@ rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
 rmdir conf$$.dir 2>/dev/null
 
 if mkdir -p . 2>/dev/null; then
-  as_mkdir_p='mkdir -p "$as_dir"'
+  as_mkdir_p=:
 else
   test -d ./-p && rmdir ./-p
   as_mkdir_p=false
@@ -510,10 +555,10 @@ else
       if test -d "$1"; then
        test -d "$1/.";
       else
-       case $1 in @%:@(
+       case $1 in
        -*)set "./$1";;
        esac;
-       case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in @%:@((
+       case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
        ???[sx]*):;;*)false;;esac;fi
     '\'' sh
   '
@@ -527,6 +572,7 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
 
 
+
 exec 7<&0 </dev/null 6>&1
 
 # Name of the host.
@@ -545,6 +591,7 @@ cross_compiling=no
 subdirs=
 MFLAGS=
 MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
 
 # Identity of this package.
 PACKAGE_NAME='utakata'
@@ -552,7 +599,6 @@ PACKAGE_TARNAME='utakata'
 PACKAGE_VERSION='0.0.1'
 PACKAGE_STRING='utakata 0.0.1'
 PACKAGE_BUGREPORT='BUG-REPORT-ADDRESS'
-PACKAGE_URL=''
 
 ac_unique_file="."
 # Factoring default headers for most tests.
@@ -596,9 +642,21 @@ LIB@&t@OBJS
 EGREP
 GREP
 CPP
+am__fastdepCC_FALSE
+am__fastdepCC_TRUE
+CCDEPMODE
 ac_ct_CC
 CFLAGS
 CC
+am__fastdepCXX_FALSE
+am__fastdepCXX_TRUE
+CXXDEPMODE
+AMDEPBACKSLASH
+AMDEP_FALSE
+AMDEP_TRUE
+am__quote
+am__include
+DEPDIR
 OBJEXT
 EXEEXT
 ac_ct_CXX
@@ -606,6 +664,29 @@ CPPFLAGS
 LDFLAGS
 CXXFLAGS
 CXX
+am__untar
+am__tar
+AMTAR
+am__leading_dot
+SET_MAKE
+AWK
+mkdir_p
+MKDIR_P
+INSTALL_STRIP_PROGRAM
+STRIP
+install_sh
+MAKEINFO
+AUTOHEADER
+AUTOMAKE
+AUTOCONF
+ACLOCAL
+VERSION
+PACKAGE
+CYGPATH_W
+am__isrc
+INSTALL_DATA
+INSTALL_SCRIPT
+INSTALL_PROGRAM
 target_alias
 host_alias
 build_alias
@@ -636,7 +717,6 @@ bindir
 program_transform_name
 prefix
 exec_prefix
-PACKAGE_URL
 PACKAGE_BUGREPORT
 PACKAGE_STRING
 PACKAGE_VERSION
@@ -647,6 +727,7 @@ SHELL'
 ac_subst_files=''
 ac_user_opts='
 enable_option_checking
+enable_dependency_tracking
 '
       ac_precious_vars='build_alias
 host_alias
@@ -768,7 +849,8 @@ do
     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
     # Reject names that are not valid shell variable names.
     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      as_fn_error "invalid feature name: $ac_useropt"
+      { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
+   { (exit 1); exit 1; }; }
     ac_useropt_orig=$ac_useropt
     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
     case $ac_user_opts in
@@ -794,7 +876,8 @@ do
     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
     # Reject names that are not valid shell variable names.
     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      as_fn_error "invalid feature name: $ac_useropt"
+      { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
+   { (exit 1); exit 1; }; }
     ac_useropt_orig=$ac_useropt
     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
     case $ac_user_opts in
@@ -998,7 +1081,8 @@ do
     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
     # Reject names that are not valid shell variable names.
     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      as_fn_error "invalid package name: $ac_useropt"
+      { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2
+   { (exit 1); exit 1; }; }
     ac_useropt_orig=$ac_useropt
     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
     case $ac_user_opts in
@@ -1014,7 +1098,8 @@ do
     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
     # Reject names that are not valid shell variable names.
     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      as_fn_error "invalid package name: $ac_useropt"
+      { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2
+   { (exit 1); exit 1; }; }
     ac_useropt_orig=$ac_useropt
     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
     case $ac_user_opts in
@@ -1044,17 +1129,17 @@ do
   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
     x_libraries=$ac_optarg ;;
 
-  -*) as_fn_error "unrecognized option: \`$ac_option'
-Try \`$0 --help' for more information."
+  -*) { $as_echo "$as_me: error: unrecognized option: $ac_option
+Try \`$0 --help' for more information." >&2
+   { (exit 1); exit 1; }; }
     ;;
 
   *=*)
     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
     # Reject names that are not valid shell variable names.
-    case $ac_envvar in #(
-      '' | [0-9]* | *[!_$as_cr_alnum]* )
-      as_fn_error "invalid variable name: \`$ac_envvar'" ;;
-    esac
+    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
+      { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2
+   { (exit 1); exit 1; }; }
     eval $ac_envvar=\$ac_optarg
     export $ac_envvar ;;
 
@@ -1071,13 +1156,15 @@ done
 
 if test -n "$ac_prev"; then
   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
-  as_fn_error "missing argument to $ac_option"
+  { $as_echo "$as_me: error: missing argument to $ac_option" >&2
+   { (exit 1); exit 1; }; }
 fi
 
 if test -n "$ac_unrecognized_opts"; then
   case $enable_option_checking in
     no) ;;
-    fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
+    fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2
+   { (exit 1); exit 1; }; } ;;
     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
   esac
 fi
@@ -1100,7 +1187,8 @@ do
     [\\/$]* | ?:[\\/]* )  continue;;
     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
   esac
-  as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
+  { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+   { (exit 1); exit 1; }; }
 done
 
 # There might be people who depend on the old broken behavior: `$host'
@@ -1130,9 +1218,11 @@ test "$silent" = yes && exec 6>/dev/null
 ac_pwd=`pwd` && test -n "$ac_pwd" &&
 ac_ls_di=`ls -di .` &&
 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
-  as_fn_error "working directory cannot be determined"
+  { $as_echo "$as_me: error: working directory cannot be determined" >&2
+   { (exit 1); exit 1; }; }
 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
-  as_fn_error "pwd does not report name of working directory"
+  { $as_echo "$as_me: error: pwd does not report name of working directory" >&2
+   { (exit 1); exit 1; }; }
 
 
 # Find the source files, if location was not specified.
@@ -1171,11 +1261,13 @@ else
 fi
 if test ! -r "$srcdir/$ac_unique_file"; then
   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
-  as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
+  { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
+   { (exit 1); exit 1; }; }
 fi
 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
 ac_abs_confdir=`(
-       cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
+       cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2
+   { (exit 1); exit 1; }; }
        pwd)`
 # When building in place, set srcdir=.
 if test "$ac_abs_confdir" = "$ac_pwd"; then
@@ -1257,6 +1349,11 @@ Fine tuning of the installation directories:
 _ACEOF
 
   cat <<\_ACEOF
+
+Program names:
+  --program-prefix=PREFIX            prepend PREFIX to installed program names
+  --program-suffix=SUFFIX            append SUFFIX to installed program names
+  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
 _ACEOF
 fi
 
@@ -1266,6 +1363,13 @@ if test -n "$ac_init_help"; then
    esac
   cat <<\_ACEOF
 
+Optional Features:
+  --disable-option-checking  ignore unrecognized --enable/--with options
+  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
+  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
+  --disable-dependency-tracking  speeds up one-time build
+  --enable-dependency-tracking   do not reject slow dependency extractors
+
 Some influential environment variables:
   CXX         C++ compiler command
   CXXFLAGS    C++ compiler flags
@@ -1345,264 +1449,21 @@ test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
 utakata configure 0.0.1
-generated by GNU Autoconf 2.64
+generated by GNU Autoconf 2.63
 
-Copyright (C) 2009 Free Software Foundation, Inc.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
 This configure script is free software; the Free Software Foundation
 gives unlimited permission to copy, distribute and modify it.
 _ACEOF
   exit
 fi
-
-## ------------------------ ##
-## Autoconf initialization. ##
-## ------------------------ ##
-
-@%:@ ac_fn_cxx_try_compile LINENO
-@%:@ ----------------------------
-@%:@ Try to compile conftest.$ac_ext, and return whether this succeeded.
-ac_fn_cxx_try_compile ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  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:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_compile") 2>conftest.err
-  ac_status=$?
-  if test -s conftest.err; then
-    grep -v '^ *+' conftest.err >conftest.er1
-    cat conftest.er1 >&5
-    mv -f conftest.er1 conftest.err
-  fi
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } && {
-        test -z "$ac_cxx_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then :
-  ac_retval=0
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_retval=1
-fi
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-  return $ac_retval
-
-} @%:@ ac_fn_cxx_try_compile
-
-@%:@ ac_fn_c_try_compile LINENO
-@%:@ --------------------------
-@%:@ Try to compile conftest.$ac_ext, and return whether this succeeded.
-ac_fn_c_try_compile ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  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:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_compile") 2>conftest.err
-  ac_status=$?
-  if test -s conftest.err; then
-    grep -v '^ *+' conftest.err >conftest.er1
-    cat conftest.er1 >&5
-    mv -f conftest.er1 conftest.err
-  fi
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then :
-  ac_retval=0
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_retval=1
-fi
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-  return $ac_retval
-
-} @%:@ ac_fn_c_try_compile
-
-@%:@ ac_fn_c_check_type LINENO TYPE VAR INCLUDES
-@%:@ -------------------------------------------
-@%:@ Tests whether TYPE exists after having included INCLUDES, setting cache
-@%:@ variable VAR accordingly.
-ac_fn_c_check_type ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
-  $as_echo_n "(cached) " >&6
-else
-  eval "$3=no"
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$4
-int
-main ()
-{
-if (sizeof ($2))
-        return 0;
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$4
-int
-main ()
-{
-if (sizeof (($2)))
-           return 0;
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  
-else
-  eval "$3=yes"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-eval ac_res=\$$3
-              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-
-} @%:@ ac_fn_c_check_type
-
-@%:@ ac_fn_c_try_cpp LINENO
-@%:@ ----------------------
-@%:@ Try to preprocess conftest.$ac_ext, and return whether this succeeded.
-ac_fn_c_try_cpp ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  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:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
-  ac_status=$?
-  if test -s conftest.err; then
-    grep -v '^ *+' conftest.err >conftest.er1
-    cat conftest.er1 >&5
-    mv -f conftest.er1 conftest.err
-  fi
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } >/dev/null && {
-        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       }; then :
-  ac_retval=0
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-    ac_retval=1
-fi
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-  return $ac_retval
-
-} @%:@ ac_fn_c_try_cpp
-
-@%:@ ac_fn_c_try_run LINENO
-@%:@ ----------------------
-@%:@ Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
-@%:@ that executables *can* be run.
-ac_fn_c_try_run ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  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:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } && { 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:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; }; then :
-  ac_retval=0
-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
-
-       ac_retval=$ac_status
-fi
-  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-  return $ac_retval
-
-} @%:@ ac_fn_c_try_run
-
-@%:@ ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
-@%:@ -------------------------------------------------------
-@%:@ Tests whether HEADER exists and can be compiled using the include files in
-@%:@ INCLUDES, setting the cache variable VAR accordingly.
-ac_fn_c_check_header_compile ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$4
-@%:@include <$2>
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  eval "$3=yes"
-else
-  eval "$3=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-eval ac_res=\$$3
-              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-
-} @%:@ ac_fn_c_check_header_compile
 cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
 It was created by utakata $as_me 0.0.1, which was
-generated by GNU Autoconf 2.64.  Invocation command line was
+generated by GNU Autoconf 2.63.  Invocation command line was
 
   $ $0 $@
 
@@ -1610,9 +1471,9 @@ _ACEOF
 exec 5>>config.log
 {
 cat <<_ASUNAME
-## --------- ##
-## Platform. ##
-## --------- ##
+@%:@@%:@ --------- @%:@@%:@
+@%:@@%:@ Platform. @%:@@%:@
+@%:@@%:@ --------- @%:@@%:@
 
 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
 uname -m = `(uname -m) 2>/dev/null || echo unknown`
@@ -1638,8 +1499,8 @@ for as_dir in $PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-    $as_echo "PATH: $as_dir"
-  done
+  $as_echo "PATH: $as_dir"
+done
 IFS=$as_save_IFS
 
 } >&5
@@ -1647,9 +1508,9 @@ IFS=$as_save_IFS
 cat >&5 <<_ACEOF
 
 
-## ----------- ##
-## Core tests. ##
-## ----------- ##
+@%:@@%:@ ----------- @%:@@%:@
+@%:@@%:@ Core tests. @%:@@%:@
+@%:@@%:@ ----------- @%:@@%:@
 
 _ACEOF
 
@@ -1676,9 +1537,9 @@ do
       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
     esac
     case $ac_pass in
-    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
+    1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
     2)
-      as_fn_append ac_configure_args1 " '$ac_arg'"
+      ac_configure_args1="$ac_configure_args1 '$ac_arg'"
       if test $ac_must_keep_next = true; then
        ac_must_keep_next=false # Got value, back to normal.
       else
@@ -1694,13 +1555,13 @@ do
          -* ) ac_must_keep_next=true ;;
        esac
       fi
-      as_fn_append ac_configure_args " '$ac_arg'"
+      ac_configure_args="$ac_configure_args '$ac_arg'"
       ;;
     esac
   done
 done
-{ ac_configure_args0=; unset ac_configure_args0;}
-{ ac_configure_args1=; unset ac_configure_args1;}
+$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
+$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
 
 # When interrupted or exit'd, cleanup temporary files, and complete
 # config.log.  We remove comments because anyway the quotes in there
@@ -1713,9 +1574,9 @@ trap 'exit_status=$?
     echo
 
     cat <<\_ASBOX
-## ---------------- ##
-## Cache variables. ##
-## ---------------- ##
+@%:@@%:@ ---------------- @%:@@%:@
+@%:@@%:@ Cache variables. @%:@@%:@
+@%:@@%:@ ---------------- @%:@@%:@
 _ASBOX
     echo
     # The following way of writing the cache mishandles newlines in values,
@@ -1725,13 +1586,13 @@ _ASBOX
     case $ac_val in #(
     *${as_nl}*)
       case $ac_var in #(
-      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+      *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
       esac
       case $ac_var in #(
       _ | IFS | as_nl) ;; #(
       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
-      *) { eval $ac_var=; unset $ac_var;} ;;
+      *) $as_unset $ac_var ;;
       esac ;;
     esac
   done
@@ -1751,9 +1612,9 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
     echo
 
     cat <<\_ASBOX
-## ----------------- ##
-## Output variables. ##
-## ----------------- ##
+@%:@@%:@ ----------------- @%:@@%:@
+@%:@@%:@ Output variables. @%:@@%:@
+@%:@@%:@ ----------------- @%:@@%:@
 _ASBOX
     echo
     for ac_var in $ac_subst_vars
@@ -1768,9 +1629,9 @@ _ASBOX
 
     if test -n "$ac_subst_files"; then
       cat <<\_ASBOX
-## ------------------- ##
-## File substitutions. ##
-## ------------------- ##
+@%:@@%:@ ------------------- @%:@@%:@
+@%:@@%:@ File substitutions. @%:@@%:@
+@%:@@%:@ ------------------- @%:@@%:@
 _ASBOX
       echo
       for ac_var in $ac_subst_files
@@ -1786,9 +1647,9 @@ _ASBOX
 
     if test -s confdefs.h; then
       cat <<\_ASBOX
-## ----------- ##
-## confdefs.h. ##
-## ----------- ##
+@%:@@%:@ ----------- @%:@@%:@
+@%:@@%:@ confdefs.h. @%:@@%:@
+@%:@@%:@ ----------- @%:@@%:@
 _ASBOX
       echo
       cat confdefs.h
@@ -1803,39 +1664,37 @@ _ASBOX
     exit $exit_status
 ' 0
 for ac_signal in 1 2 13 15; do
-  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
+  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
 done
 ac_signal=0
 
 # confdefs.h avoids OS command line length limits that DEFS can exceed.
 rm -f -r conftest* confdefs.h
 
-$as_echo "/* confdefs.h */" > confdefs.h
-
 # Predefined preprocessor variables.
 
 cat >>confdefs.h <<_ACEOF
 @%:@define PACKAGE_NAME "$PACKAGE_NAME"
 _ACEOF
 
+
 cat >>confdefs.h <<_ACEOF
 @%:@define PACKAGE_TARNAME "$PACKAGE_TARNAME"
 _ACEOF
 
+
 cat >>confdefs.h <<_ACEOF
 @%:@define PACKAGE_VERSION "$PACKAGE_VERSION"
 _ACEOF
 
+
 cat >>confdefs.h <<_ACEOF
 @%:@define PACKAGE_STRING "$PACKAGE_STRING"
 _ACEOF
 
-cat >>confdefs.h <<_ACEOF
-@%:@define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
-_ACEOF
 
 cat >>confdefs.h <<_ACEOF
-@%:@define PACKAGE_URL "$PACKAGE_URL"
+@%:@define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
 _ACEOF
 
 
@@ -1856,7 +1715,7 @@ for ac_site_file in "$ac_site_file1" "$ac_site_file2"
 do
   test "x$ac_site_file" = xNONE && continue
   if test -r "$ac_site_file"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
+    { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
     sed 's/^/| /' "$ac_site_file" >&5
     . "$ac_site_file"
@@ -1867,7 +1726,7 @@ if test -r "$cache_file"; then
   # Some versions of bash will fail to source /dev/null (special
   # files actually), so we avoid doing that.
   if test -f "$cache_file"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
+    { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5
 $as_echo "$as_me: loading cache $cache_file" >&6;}
     case $cache_file in
       [\\/]* | ?:[\\/]* ) . "$cache_file";;
@@ -1875,7 +1734,7 @@ $as_echo "$as_me: loading cache $cache_file" >&6;}
     esac
   fi
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
+  { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5
 $as_echo "$as_me: creating cache $cache_file" >&6;}
   >$cache_file
 fi
@@ -1890,11 +1749,11 @@ for ac_var in $ac_precious_vars; do
   eval ac_new_val=\$ac_env_${ac_var}_value
   case $ac_old_set,$ac_new_set in
     set,)
-      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+      { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
       ac_cache_corrupted=: ;;
     ,set)
-      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
+      { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
       ac_cache_corrupted=: ;;
     ,);;
@@ -1904,17 +1763,17 @@ $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
        ac_old_val_w=`echo x $ac_old_val`
        ac_new_val_w=`echo x $ac_new_val`
        if test "$ac_old_val_w" != "$ac_new_val_w"; then
-         { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
+         { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
          ac_cache_corrupted=:
        else
-         { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
+         { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
          eval $ac_var=\$ac_old_val
        fi
-       { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
+       { $as_echo "$as_me:$LINENO:   former value:  \`$ac_old_val'" >&5
 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
-       { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
+       { $as_echo "$as_me:$LINENO:   current value: \`$ac_new_val'" >&5
 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
       fi;;
   esac
@@ -1926,20 +1785,43 @@ $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
     esac
     case " $ac_configure_args " in
       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
-      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
+      *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
     esac
   fi
 done
 if $ac_cache_corrupted; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+  { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
+  { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
-  as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
+  { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
+$as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
+   { (exit 1); exit 1; }; }
 fi
-## -------------------- ##
-## Main body of script. ##
-## -------------------- ##
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
 
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
@@ -1951,6 +1833,496 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 ac_config_headers="$ac_config_headers config.h"
 
+am__api_version='1.10'
+
+ac_aux_dir=
+for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
+  if test -f "$ac_dir/install-sh"; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install-sh -c"
+    break
+  elif test -f "$ac_dir/install.sh"; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install.sh -c"
+    break
+  elif test -f "$ac_dir/shtool"; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/shtool install -c"
+    break
+  fi
+done
+if test -z "$ac_aux_dir"; then
+  { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
+$as_echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
+ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
+ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
+
+
+# Find a good install program.  We prefer a C program (faster),
+# so one script is as good as another.  But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
+# ./install, which can be erroneously created by make from ./install.sh.
+# Reject install programs that cannot install multiple files.
+{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
+$as_echo_n "checking for a BSD-compatible install... " >&6; }
+if test -z "$INSTALL"; then
+if test "${ac_cv_path_install+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in
+  ./ | .// | /cC/* | \
+  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+  ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
+  /usr/ucb/* ) ;;
+  *)
+    # OSF1 and SCO ODT 3.0 have their own names for install.
+    # Don't use installbsd from OSF since it installs stuff as root
+    # by default.
+    for ac_prog in ginstall scoinst install; do
+      for ac_exec_ext in '' $ac_executable_extensions; do
+       if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
+         if test $ac_prog = install &&
+           grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+           # AIX install.  It has an incompatible calling convention.
+           :
+         elif test $ac_prog = install &&
+           grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+           # program-specific install script used by HP pwplus--don't use.
+           :
+         else
+           rm -rf conftest.one conftest.two conftest.dir
+           echo one > conftest.one
+           echo two > conftest.two
+           mkdir conftest.dir
+           if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
+             test -s conftest.one && test -s conftest.two &&
+             test -s conftest.dir/conftest.one &&
+             test -s conftest.dir/conftest.two
+           then
+             ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+             break 3
+           fi
+         fi
+       fi
+      done
+    done
+    ;;
+esac
+
+done
+IFS=$as_save_IFS
+
+rm -rf conftest.one conftest.two conftest.dir
+
+fi
+  if test "${ac_cv_path_install+set}" = set; then
+    INSTALL=$ac_cv_path_install
+  else
+    # As a last resort, use the slow shell script.  Don't cache a
+    # value for INSTALL within a source directory, because that will
+    # break other packages using the cache if that directory is
+    # removed, or if the value is a relative name.
+    INSTALL=$ac_install_sh
+  fi
+fi
+{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5
+$as_echo "$INSTALL" >&6; }
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+{ $as_echo "$as_me:$LINENO: checking whether build environment is sane" >&5
+$as_echo_n "checking whether build environment is sane... " >&6; }
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments.  Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
+   if test "$*" = "X"; then
+      # -L didn't work.
+      set X `ls -t $srcdir/configure conftest.file`
+   fi
+   rm -f conftest.file
+   if test "$*" != "X $srcdir/configure conftest.file" \
+      && test "$*" != "X conftest.file $srcdir/configure"; then
+
+      # If neither matched, then we have a broken ls.  This can happen
+      # if, for instance, CONFIG_SHELL is bash and it inherits a
+      # broken ls alias from the environment.  This has actually
+      # happened.  Such a system could not be considered "sane".
+      { { $as_echo "$as_me:$LINENO: error: ls -t appears to fail.  Make sure there is not a broken
+alias in your environment" >&5
+$as_echo "$as_me: error: ls -t appears to fail.  Make sure there is not a broken
+alias in your environment" >&2;}
+   { (exit 1); exit 1; }; }
+   fi
+
+   test "$2" = conftest.file
+   )
+then
+   # Ok.
+   :
+else
+   { { $as_echo "$as_me:$LINENO: error: newly created file is older than distributed files!
+Check your system clock" >&5
+$as_echo "$as_me: error: newly created file is older than distributed files!
+Check your system clock" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+{ $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+test "$program_prefix" != NONE &&
+  program_transform_name="s&^&$program_prefix&;$program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+  program_transform_name="s&\$&$program_suffix&;$program_transform_name"
+# Double any \ or $.
+# By default was `s,x,x', remove it if useless.
+ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
+program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
+
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+
+test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+  am_missing_run="$MISSING --run "
+else
+  am_missing_run=
+  { $as_echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
+$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
+fi
+
+{ $as_echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5
+$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
+if test -z "$MKDIR_P"; then
+  if test "${ac_cv_path_mkdir+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_prog in mkdir gmkdir; do
+        for ac_exec_ext in '' $ac_executable_extensions; do
+          { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
+          case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
+            'mkdir (GNU coreutils) '* | \
+            'mkdir (coreutils) '* | \
+            'mkdir (fileutils) '4.1*)
+              ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
+              break 3;;
+          esac
+        done
+       done
+done
+IFS=$as_save_IFS
+
+fi
+
+  if test "${ac_cv_path_mkdir+set}" = set; then
+    MKDIR_P="$ac_cv_path_mkdir -p"
+  else
+    # As a last resort, use the slow shell script.  Don't cache a
+    # value for MKDIR_P within a source directory, because that will
+    # break other packages using the cache if that directory is
+    # removed, or if the value is a relative name.
+    test -d ./--version && rmdir ./--version
+    MKDIR_P="$ac_install_sh -d"
+  fi
+fi
+{ $as_echo "$as_me:$LINENO: result: $MKDIR_P" >&5
+$as_echo "$MKDIR_P" >&6; }
+
+mkdir_p="$MKDIR_P"
+case $mkdir_p in
+  [\\/$]* | ?:[\\/]*) ;;
+  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
+
+for ac_prog in gawk mawk nawk awk
+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_AWK+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$AWK"; then
+  ac_cv_prog_AWK="$AWK" # 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_AWK="$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
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+  { $as_echo "$as_me:$LINENO: result: $AWK" >&5
+$as_echo "$AWK" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$AWK" && break
+done
+
+{ $as_echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
+set x ${MAKE-make}
+ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.make <<\_ACEOF
+SHELL = /bin/sh
+all:
+       @echo '@@@%%%=$(MAKE)=@@@%%%'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+case `${MAKE-make} -f conftest.make 2>/dev/null` in
+  *@@@%%%=?*=@@@%%%*)
+    eval ac_cv_prog_make_${ac_make}_set=yes;;
+  *)
+    eval ac_cv_prog_make_${ac_make}_set=no;;
+esac
+rm -f conftest.make
+fi
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
+  { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+  SET_MAKE=
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+  SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+  am__leading_dot=.
+else
+  am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+  # is not polluted with repeated "-I."
+  am__isrc=' -I$(srcdir)'
+  # test to see if srcdir already configured
+  if test -f $srcdir/config.status; then
+    { { $as_echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
+$as_echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
+   { (exit 1); exit 1; }; }
+  fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+  if (cygpath --version) >/dev/null 2>/dev/null; then
+    CYGPATH_W='cygpath -w'
+  else
+    CYGPATH_W=echo
+  fi
+fi
+
+
+# Define the identity of the package.
+ PACKAGE='utakata'
+ VERSION='0.0.1'
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define PACKAGE "$PACKAGE"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+@%:@define VERSION "$VERSION"
+_ACEOF
+
+# Some tools Automake needs.
+
+ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
+
+
+AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
+
+
+AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
+
+
+AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
+
+
+MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+
+install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
+
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'.  However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+if test "$cross_compiling" != no; then
+  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_n "(cached) " >&6
+else
+  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
+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
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+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; }
+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
+{ $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
+  $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.
+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_STRIP="strip"
+    $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_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_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
+
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+
+# We need awk for the "check" target.  The system "awk" is bad on
+# some platforms.
+# Always define AMTAR for backward compatibility.
+
+AMTAR=${AMTAR-"${am_missing_run}tar"}
+
+am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
+
+
+
+
+
 
 # Checks for programs.
 ac_ext=cpp
@@ -1967,9 +2339,9 @@ if test -z "$CXX"; then
   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:${as_lineno-$LINENO}: checking for $ac_word" >&5
+{ $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 :
+if test "${ac_cv_prog_CXX+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CXX"; then
@@ -1980,24 +2352,24 @@ 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
+  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:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-  done
+done
 IFS=$as_save_IFS
 
 fi
 fi
 CXX=$ac_cv_prog_CXX
 if test -n "$CXX"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
+  { $as_echo "$as_me:$LINENO: result: $CXX" >&5
 $as_echo "$CXX" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+  { $as_echo "$as_me:$LINENO: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
@@ -2011,9 +2383,9 @@ if test -z "$CXX"; then
 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:${as_lineno-$LINENO}: checking for $ac_word" >&5
+{ $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 :
+if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_CXX"; then
@@ -2024,24 +2396,24 @@ 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
+  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:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-  done
+done
 IFS=$as_save_IFS
 
 fi
 fi
 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
 if test -n "$ac_ct_CXX"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
+  { $as_echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
 $as_echo "$ac_ct_CXX" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+  { $as_echo "$as_me:$LINENO: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
@@ -2054,7 +2426,7 @@ done
   else
     case $cross_compiling:$ac_tool_warned in
 yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+{ $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
@@ -2065,49 +2437,64 @@ fi
   fi
 fi
 # Provide some information about the compiler.
-$as_echo "$as_me:${as_lineno-$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
-for ac_option in --version -v -V -qversion; do
-  { { ac_try="$ac_compiler $ac_option >&5"
+{ (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:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+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=$?
-  if test -s conftest.err; then
-    sed '10a\
-... rest of stderr output deleted ...
-         10q' conftest.err >conftest.er1
-    cat conftest.er1 >&5
-    rm -f conftest.er1 conftest.err
-  fi
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }
-done
+  $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); }
 
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-@%:@include <stdio.h>
+
 int
 main ()
 {
-FILE *f = fopen ("conftest.out", "w");
- return ferror (f) || fclose (f) != 0;
 
   ;
   return 0;
 }
 _ACEOF
 ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out"
+ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
 # Try to create an executable without -o first, disregard a.out.
 # It will help us diagnose broken compilers, and finding out an intuition
 # of exeext.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler default output file name" >&5
+{ $as_echo "$as_me:$LINENO: checking for C++ compiler default output file name" >&5
 $as_echo_n "checking for C++ compiler default output file name... " >&6; }
 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
 
@@ -2124,17 +2511,17 @@ do
 done
 rm -f $ac_rmfiles
 
-if { ac_try="$ac_link_default"
+if { (ac_try="$ac_link_default"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
   (eval "$ac_link_default") 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then :
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
@@ -2151,7 +2538,7 @@ do
        # certainly right.
        break;;
     *.* )
-       if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
+        if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
        then :; else
           ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
        fi
@@ -2170,75 +2557,84 @@ test "$ac_cv_exeext" = no && ac_cv_exeext=
 else
   ac_file=''
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
+
+{ $as_echo "$as_me:$LINENO: result: $ac_file" >&5
 $as_echo "$ac_file" >&6; }
-if test -z "$ac_file"; then :
+if test -z "$ac_file"; then
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ as_fn_set_status 77
-as_fn_error "C++ compiler cannot create executables
-See \`config.log' for more details." "$LINENO" 5; }; }
+{ { $as_echo "$as_me:$LINENO: error: C++ compiler cannot create executables
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: C++ compiler cannot create executables
+See \`config.log' for more details." >&2;}
+   { (exit 77); exit 77; }; }; }
 fi
+
 ac_exeext=$ac_cv_exeext
 
 # Check that the compiler produces executables we can run.  If not, either
 # the compiler is broken, or we cross compile.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C++ compiler works" >&5
+{ $as_echo "$as_me:$LINENO: checking whether the C++ compiler works" >&5
 $as_echo_n "checking whether the C++ compiler works... " >&6; }
+# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
 # If not cross compiling, check that we can run a simple program.
 if test "$cross_compiling" != yes; then
   if { ac_try='./$ac_file'
-  { case "(($ac_try" in
+  { (case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
+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:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; }; then
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
     cross_compiling=no
   else
     if test "$cross_compiling" = maybe; then
        cross_compiling=yes
     else
-       { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+       { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "cannot run C++ compiled programs.
+{ { $as_echo "$as_me:$LINENO: error: cannot run C++ compiled programs.
 If you meant to cross compile, use \`--host'.
-See \`config.log' for more details." "$LINENO" 5; }
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: cannot run C++ compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }; }
     fi
   fi
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+{ $as_echo "$as_me:$LINENO: result: yes" >&5
 $as_echo "yes" >&6; }
 
-rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out
+rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
 ac_clean_files=$ac_clean_files_save
 # Check that the compiler produces executables we can run.  If not, either
 # the compiler is broken, or we cross compile.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
+{ $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
 $as_echo_n "checking whether we are cross compiling... " >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
+{ $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5
 $as_echo "$cross_compiling" >&6; }
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
+{ $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5
 $as_echo_n "checking for suffix of executables... " >&6; }
-if { ac_try="$ac_link"
+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:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
   (eval "$ac_link") 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then :
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
   # If both `conftest.exe' and `conftest' are `present' (well, observable)
 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
 # work properly (i.e., refer to `conftest.exe'), while it won't with
@@ -2253,24 +2649,32 @@ for ac_file in conftest.exe conftest conftest.*; do
   esac
 done
 else
-  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details." "$LINENO" 5; }
+{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }; }
 fi
+
 rm -f conftest$ac_cv_exeext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
 $as_echo "$ac_cv_exeext" >&6; }
 
 rm -f conftest.$ac_ext
 EXEEXT=$ac_cv_exeext
 ac_exeext=$EXEEXT
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
+{ $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5
 $as_echo_n "checking for suffix of object files... " >&6; }
-if test "${ac_cv_objext+set}" = set; then :
+if test "${ac_cv_objext+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 int
@@ -2282,17 +2686,17 @@ main ()
 }
 _ACEOF
 rm -f conftest.o conftest.obj
-if { ac_try="$ac_compile"
+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:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
   (eval "$ac_compile") 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then :
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
   for ac_file in conftest.o conftest.obj conftest.*; do
   test -f "$ac_file" || continue;
   case $ac_file in
@@ -2305,23 +2709,31 @@ else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." "$LINENO" 5; }
+{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }; }
 fi
+
 rm -f conftest.$ac_cv_objext conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
 $as_echo "$ac_cv_objext" >&6; }
 OBJEXT=$ac_cv_objext
 ac_objext=$OBJEXT
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
+{ $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 :
+if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 int
@@ -2335,16 +2747,37 @@ main ()
   return 0;
 }
 _ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
+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
-  ac_compiler_gnu=no
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_compiler_gnu=no
 fi
+
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
+{ $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
@@ -2353,16 +2786,20 @@ else
 fi
 ac_test_CXXFLAGS=${CXXFLAGS+set}
 ac_save_CXXFLAGS=$CXXFLAGS
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
+{ $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 :
+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 confdefs.h - <<_ACEOF >conftest.$ac_ext
+   cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 int
@@ -2373,11 +2810,35 @@ main ()
   return 0;
 }
 _ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
+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
-  CXXFLAGS=""
-      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       CXXFLAGS=""
+      cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 int
@@ -2388,12 +2849,36 @@ main ()
   return 0;
 }
 _ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
-  
+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
-  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_cxx_werror_flag=$ac_save_cxx_werror_flag
         CXXFLAGS="-g"
-        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+        cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 int
@@ -2404,17 +2889,42 @@ main ()
   return 0;
 }
 _ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
+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
+
+       
 fi
+
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
+
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
+
 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:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
+{ $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
@@ -2436,6 +2946,176 @@ 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
+DEPDIR="${am__leading_dot}deps"
+
+ac_config_commands="$ac_config_commands depfiles"
+
+
+am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+       @echo done
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+{ $as_echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
+$as_echo_n "checking for style of include used by $am_make... " >&6; }
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# We grep out `Entering directory' and `Leaving directory'
+# messages which can occur if `w' ends up in MAKEFLAGS.
+# In particular we don't look at `^make:' because GNU make might
+# be invoked under some other name (usually "gmake"), in which
+# case it prints its new name instead of `make'.
+if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
+   am__include=include
+   am__quote=
+   _am_result=GNU
+fi
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+   echo '.include "confinc"' > confmf
+   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
+      am__include=.include
+      am__quote="\""
+      _am_result=BSD
+   fi
+fi
+
+
+{ $as_echo "$as_me:$LINENO: result: $_am_result" >&5
+$as_echo "$_am_result" >&6; }
+rm -f confinc confmf
+
+@%:@ Check whether --enable-dependency-tracking was given.
+if test "${enable_dependency_tracking+set}" = set; then
+  enableval=$enable_dependency_tracking; 
+fi
+
+if test "x$enable_dependency_tracking" != xno; then
+  am_depcomp="$ac_aux_dir/depcomp"
+  AMDEPBACKSLASH='\'
+fi
+ if test "x$enable_dependency_tracking" != xno; then
+  AMDEP_TRUE=
+  AMDEP_FALSE='#'
+else
+  AMDEP_TRUE='#'
+  AMDEP_FALSE=
+fi
+
+
+
+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_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
+
+  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
+
+    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/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+       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
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_CXX_dependencies_compiler_type=none
+fi
+
+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
+
+ 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
+
 
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
@@ -2445,9 +3125,9 @@ 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:${as_lineno-$LINENO}: checking for $ac_word" >&5
+{ $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_CC+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
@@ -2458,24 +3138,24 @@ 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
+  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:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-  done
+done
 IFS=$as_save_IFS
 
 fi
 fi
 CC=$ac_cv_prog_CC
 if test -n "$CC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+  { $as_echo "$as_me:$LINENO: result: $CC" >&5
 $as_echo "$CC" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+  { $as_echo "$as_me:$LINENO: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
@@ -2485,9 +3165,9 @@ 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:${as_lineno-$LINENO}: checking for $ac_word" >&5
+{ $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_CC+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_CC"; then
@@ -2498,24 +3178,24 @@ 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
+  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:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-  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:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+  { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
 $as_echo "$ac_ct_CC" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+  { $as_echo "$as_me:$LINENO: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
@@ -2524,7 +3204,7 @@ fi
   else
     case $cross_compiling:$ac_tool_warned in
 yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+{ $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
@@ -2538,9 +3218,9 @@ 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:${as_lineno-$LINENO}: checking for $ac_word" >&5
+{ $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_CC+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
@@ -2551,24 +3231,24 @@ 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
+  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:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-  done
+done
 IFS=$as_save_IFS
 
 fi
 fi
 CC=$ac_cv_prog_CC
 if test -n "$CC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+  { $as_echo "$as_me:$LINENO: result: $CC" >&5
 $as_echo "$CC" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+  { $as_echo "$as_me:$LINENO: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
@@ -2578,9 +3258,9 @@ 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:${as_lineno-$LINENO}: checking for $ac_word" >&5
+{ $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_CC+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
@@ -2592,18 +3272,18 @@ 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
+  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:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-  done
+done
 IFS=$as_save_IFS
 
 if test $ac_prog_rejected = yes; then
@@ -2622,10 +3302,10 @@ fi
 fi
 CC=$ac_cv_prog_CC
 if test -n "$CC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+  { $as_echo "$as_me:$LINENO: result: $CC" >&5
 $as_echo "$CC" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+  { $as_echo "$as_me:$LINENO: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
@@ -2637,9 +3317,9 @@ if test -z "$CC"; then
   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:${as_lineno-$LINENO}: checking for $ac_word" >&5
+{ $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_CC+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
@@ -2650,24 +3330,24 @@ 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
+  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:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-  done
+done
 IFS=$as_save_IFS
 
 fi
 fi
 CC=$ac_cv_prog_CC
 if test -n "$CC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+  { $as_echo "$as_me:$LINENO: result: $CC" >&5
 $as_echo "$CC" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+  { $as_echo "$as_me:$LINENO: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
@@ -2681,9 +3361,9 @@ if test -z "$CC"; then
 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:${as_lineno-$LINENO}: checking for $ac_word" >&5
+{ $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_CC+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_CC"; then
@@ -2694,24 +3374,24 @@ 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
+  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:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-  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:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+  { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
 $as_echo "$ac_ct_CC" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+  { $as_echo "$as_me:$LINENO: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
@@ -2724,7 +3404,7 @@ done
   else
     case $cross_compiling:$ac_tool_warned in
 yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+{ $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
@@ -2735,42 +3415,62 @@ fi
 fi
 
 
-test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "no acceptable C compiler found in \$PATH
-See \`config.log' for more details." "$LINENO" 5; }
+{ { $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:${as_lineno-$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
-for ac_option in --version -v -V -qversion; do
-  { { ac_try="$ac_compiler $ac_option >&5"
+{ (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:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+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=$?
-  if test -s conftest.err; then
-    sed '10a\
-... rest of stderr output deleted ...
-         10q' conftest.err >conftest.er1
-    cat conftest.er1 >&5
-    rm -f conftest.er1 conftest.err
-  fi
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }
-done
+  $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:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
+{ $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 :
+if test "${ac_cv_c_compiler_gnu+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 int
@@ -2784,16 +3484,37 @@ main ()
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+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_compiler_gnu=yes
 else
-  ac_compiler_gnu=no
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_compiler_gnu=no
 fi
+
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 ac_cv_c_compiler_gnu=$ac_compiler_gnu
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
+{ $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
@@ -2802,16 +3523,20 @@ else
 fi
 ac_test_CFLAGS=${CFLAGS+set}
 ac_save_CFLAGS=$CFLAGS
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
+{ $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 :
+if test "${ac_cv_prog_cc_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"
-   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+   cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 int
@@ -2822,11 +3547,35 @@ main ()
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+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_g=yes
 else
-  CFLAGS=""
-      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       CFLAGS=""
+      cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 int
@@ -2837,12 +3586,36 @@ main ()
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  
+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
+  :
 else
-  ac_c_werror_flag=$ac_save_c_werror_flag
+  $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"
-        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+        cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 int
@@ -2853,17 +3626,42 @@ main ()
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+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_g=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       
 fi
+
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
+
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 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:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+{ $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
@@ -2880,14 +3678,18 @@ else
     CFLAGS=
   fi
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
+{ $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 :
+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 confdefs.h - <<_ACEOF >conftest.$ac_ext
+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>
@@ -2944,10 +3746,33 @@ for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
        -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
 do
   CC="$ac_save_CC $ac_arg"
-  if ac_fn_c_try_compile "$LINENO"; then :
+  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
+
+rm -f core conftest.err conftest.$ac_objext 
   test "x$ac_cv_prog_cc_c89" != "xno" && break
 done
 rm -f conftest.$ac_ext
@@ -2957,19 +3782,17 @@ fi
 # AC_CACHE_VAL
 case "x$ac_cv_prog_cc_c89" in
   x)
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+    { $as_echo "$as_me:$LINENO: result: none needed" >&5
 $as_echo "none needed" >&6; } ;;
   xno)
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+    { $as_echo "$as_me:$LINENO: result: unsupported" >&5
 $as_echo "unsupported" >&6; } ;;
   *)
     CC="$CC $ac_cv_prog_cc_c89"
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
+    { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
 esac
-if test "x$ac_cv_prog_cc_c89" != xno; then :
-  
-fi
+
 
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
@@ -2977,6 +3800,114 @@ 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
+  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/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+       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
+
+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
+
+ 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
+
+
 
 
 # Checks for libraries.
@@ -2990,14 +3921,14 @@ 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:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
+{ $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 "${ac_cv_prog_CPP+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
       # Double quotes because CPP needs to be expanded
@@ -3012,7 +3943,11 @@ do
   # <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 confdefs.h - <<_ACEOF >conftest.$ac_ext
+  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>
@@ -3021,34 +3956,78 @@ do
 @%:@endif
                     Syntax error
 _ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-  
+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
+
   # 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 confdefs.h - <<_ACEOF >conftest.$ac_ext
+  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_fn_c_try_cpp "$LINENO"; then :
+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
 
 done
 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
 rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then :
+if $ac_preproc_ok; then
   break
 fi
 
@@ -3060,7 +4039,7 @@ fi
 else
   ac_cv_prog_CPP=$CPP
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
+{ $as_echo "$as_me:$LINENO: result: $CPP" >&5
 $as_echo "$CPP" >&6; }
 ac_preproc_ok=false
 for ac_c_preproc_warn_flag in '' yes
@@ -3071,7 +4050,11 @@ do
   # <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 confdefs.h - <<_ACEOF >conftest.$ac_ext
+  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>
@@ -3080,40 +4063,87 @@ do
 @%:@endif
                     Syntax error
 _ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-  
+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
+
   # 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 confdefs.h - <<_ACEOF >conftest.$ac_ext
+  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_fn_c_try_cpp "$LINENO"; then :
+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
 
 done
 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
 rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then :
-  
+if $ac_preproc_ok; then
+  :
 else
-  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details." "$LINENO" 5; }
+{ { $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_ext=c
@@ -3123,9 +4153,9 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
+{ $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 "${ac_cv_path_GREP+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
   if test -z "$GREP"; then
@@ -3136,7 +4166,7 @@ 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_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
@@ -3156,7 +4186,7 @@ case `"$ac_path_GREP" --version 2>&1` in
     $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
-    as_fn_arith $ac_count + 1 && ac_count=$as_val
+    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"
@@ -3171,24 +4201,26 @@ esac
       $ac_path_GREP_found && break 3
     done
   done
-  done
+done
 IFS=$as_save_IFS
   if test -z "$ac_cv_path_GREP"; then
-    as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+    { { $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
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
+{ $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:${as_lineno-$LINENO}: checking for egrep" >&5
+{ $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 :
+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
@@ -3202,7 +4234,7 @@ 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_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
@@ -3222,7 +4254,7 @@ case `"$ac_path_EGREP" --version 2>&1` in
     $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
-    as_fn_arith $ac_count + 1 && ac_count=$as_val
+    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"
@@ -3237,10 +4269,12 @@ esac
       $ac_path_EGREP_found && break 3
     done
   done
-  done
+done
 IFS=$as_save_IFS
   if test -z "$ac_cv_path_EGREP"; then
-    as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+    { { $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
@@ -3248,17 +4282,21 @@ fi
 
    fi
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
 $as_echo "$ac_cv_path_EGREP" >&6; }
  EGREP="$ac_cv_path_EGREP"
  
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
+{ $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 :
+if test "${ac_cv_header_stdc+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  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>
@@ -3273,23 +4311,48 @@ main ()
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+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
 else
-  ac_cv_header_stdc=no
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_cv_header_stdc=no
 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 confdefs.h - <<_ACEOF >conftest.$ac_ext
+  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>
 
 _ACEOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "memchr" >/dev/null 2>&1; then :
-  
+  $EGREP "memchr" >/dev/null 2>&1; then
+  :
 else
   ac_cv_header_stdc=no
 fi
@@ -3299,14 +4362,18 @@ fi
 
 if test $ac_cv_header_stdc = yes; then
   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  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 :
-  
+  $EGREP "free" >/dev/null 2>&1; then
+  :
 else
   ac_cv_header_stdc=no
 fi
@@ -3316,10 +4383,14 @@ 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 :
+  if test "$cross_compiling" = yes; then
   :
 else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  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>
@@ -3346,34 +4417,118 @@ main ()
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-  
+rm -f 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>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (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
-  ac_cv_header_stdc=no
+  $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 -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
+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:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
+{ $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
   
-$as_echo "@%:@define STDC_HEADERS 1" >>confdefs.h
+cat >>confdefs.h <<\_ACEOF
+@%:@define STDC_HEADERS 1
+_ACEOF
 
 fi
 
 # 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`
-ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
-"
-eval as_val=\$$as_ac_Header
-   if test "x$as_val" = x""yes; then :
+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
+
+@%:@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
+  $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
@@ -3383,12 +4538,16 @@ fi
 done
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
+{ $as_echo "$as_me:$LINENO: checking for stdbool.h that conforms to C99" >&5
 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
-if test "${ac_cv_header_stdbool_h+set}" = set; then :
+if test "${ac_cv_header_stdbool_h+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 #include <stdbool.h>
@@ -3468,17 +4627,131 @@ main ()
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+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_stdbool_h=yes
 else
-  ac_cv_header_stdbool_h=no
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_cv_header_stdbool_h=no
 fi
+
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdbool_h" >&5
 $as_echo "$ac_cv_header_stdbool_h" >&6; }
-ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
-if test "x$ac_cv_type__Bool" = x""yes; then :
+{ $as_echo "$as_me:$LINENO: checking for _Bool" >&5
+$as_echo_n "checking for _Bool... " >&6; }
+if test "${ac_cv_type__Bool+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_type__Bool=no
+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
+int
+main ()
+{
+if (sizeof (_Bool))
+       return 0;
+  ;
+  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
+  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
+int
+main ()
+{
+if (sizeof ((_Bool)))
+         return 0;
+  ;
+  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
+  :
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_cv_type__Bool=yes
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
+$as_echo "$ac_cv_type__Bool" >&6; }
+if test "x$ac_cv_type__Bool" = x""yes; then
   
 cat >>confdefs.h <<_ACEOF
 @%:@define HAVE__BOOL 1
@@ -3489,18 +4762,24 @@ fi
 
 if test $ac_cv_header_stdbool_h = yes; then
   
-$as_echo "@%:@define HAVE_STDBOOL_H 1" >>confdefs.h
+cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_STDBOOL_H 1
+_ACEOF
 
 fi
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
+{ $as_echo "$as_me:$LINENO: checking for inline" >&5
 $as_echo_n "checking for inline... " >&6; }
-if test "${ac_cv_c_inline+set}" = set; then :
+if test "${ac_cv_c_inline+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
   ac_cv_c_inline=no
 for ac_kw in inline __inline__ __inline; do
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 #ifndef __cplusplus
 typedef int foo_t;
@@ -3509,17 +4788,41 @@ $ac_kw foo_t foo () {return 0; }
 #endif
 
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+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_c_inline=$ac_kw
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       
 fi
+
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
   test "$ac_cv_c_inline" != no && break
 done
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
 $as_echo "$ac_cv_c_inline" >&6; }
 
+
 case $ac_cv_c_inline in
   inline | yes) ;;
   *)
@@ -3535,9 +4838,102 @@ _ACEOF
     ;;
 esac
 
-ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
-if test "x$ac_cv_type_size_t" = x""yes; then :
-  
+{ $as_echo "$as_me:$LINENO: checking for size_t" >&5
+$as_echo_n "checking for size_t... " >&6; }
+if test "${ac_cv_type_size_t+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_type_size_t=no
+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
+int
+main ()
+{
+if (sizeof (size_t))
+       return 0;
+  ;
+  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
+  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
+int
+main ()
+{
+if (sizeof ((size_t)))
+         return 0;
+  ;
+  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
+  :
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_cv_type_size_t=yes
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
+$as_echo "$ac_cv_type_size_t" >&6; }
+if test "x$ac_cv_type_size_t" = x""yes; then
+  :
 else
   
 cat >>confdefs.h <<_ACEOF
@@ -3549,7 +4945,7 @@ fi
 
 # Checks for library functions.
 
-ac_config_files="$ac_config_files Makefile src/Rakefile test/Rakefile test/Makefile"
+ac_config_files="$ac_config_files Makefile Rakefile"
 
 cat >confcache <<\_ACEOF
 # This file is a shell script that caches the results of configure
@@ -3578,13 +4974,13 @@ _ACEOF
     case $ac_val in #(
     *${as_nl}*)
       case $ac_var in #(
-      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+      *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
       esac
       case $ac_var in #(
       _ | IFS | as_nl) ;; #(
       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
-      *) { eval $ac_var=; unset $ac_var;} ;;
+      *) $as_unset $ac_var ;;
       esac ;;
     esac
   done
@@ -3592,8 +4988,8 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
   (set) 2>&1 |
     case $as_nl`(ac_space=' '; set) 2>&1` in #(
     *${as_nl}ac_space=\ *)
-      # `set' does not quote correctly, so add quotesdouble-quote
-      # substitution turns \\\\ into \\, and sed turns \\ into \.
+      # `set' does not quote correctly, so add quotes (double-quote
+      # substitution turns \\\\ into \\, and sed turns \\ into \).
       sed -n \
        "s/'/'\\\\''/g;
          s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
@@ -3616,11 +5012,11 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
   if test -w "$cache_file"; then
     test "x$cache_file" != "x/dev/null" &&
-      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
+      { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5
 $as_echo "$as_me: updating cache $cache_file" >&6;}
     cat confcache >$cache_file
   else
-    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
+    { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
   fi
 fi
@@ -3640,23 +5036,43 @@ for ac_i in : $LIB@&t@OBJS; do test "x$ac_i" = x: && continue
   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
   #    will be set to the directory where LIBOBJS objects are built.
-  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
-  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
+  ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+  ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
 done
 LIB@&t@OBJS=$ac_libobjs
 
 LTLIBOBJS=$ac_ltlibobjs
 
 
+if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"AMDEP\" was never defined.
+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
+$as_echo "$as_me: error: conditional \"am__fastdepCC\" 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
 ac_clean_files_save=$ac_clean_files
 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
+{ $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
-as_write_fail=0
-cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
+cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 #! $SHELL
 # Generated by $as_me.
 # Run this file to recreate the current configuration.
@@ -3666,18 +5082,17 @@ cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
 debug=false
 ac_cs_recheck=false
 ac_cs_silent=false
-
 SHELL=\${CONFIG_SHELL-$SHELL}
-export SHELL
-_ASEOF
-cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
-## -------------------- ##
-## M4sh Initialization. ##
-## -------------------- ##
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+## --------------------- ##
+## M4sh Initialization.  ##
+## --------------------- ##
 
 # Be more Bourne compatible
 DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
   emulate sh
   NULLCMD=:
   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
@@ -3685,15 +5100,23 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
   alias -g '${1+"$@"}'='"$@"'
   setopt NO_GLOB_SUBST
 else
-  case `(set -o) 2>/dev/null` in @%:@(
-  *posix*) :
-    set -o posix ;; @%:@(
-  *) :
-     ;;
+  case `(set -o) 2>/dev/null` in
+  *posix*) set -o posix ;;
 esac
+
 fi
 
 
+
+
+# PATH needs CR
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
 as_nl='
 '
 export as_nl
@@ -3701,13 +5124,7 @@ export as_nl
 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
-# Prefer a ksh shell builtin over an external printf program on Solaris,
-# but without wasting forks for bash or zsh.
-if test -z "$BASH_VERSION$ZSH_VERSION" \
-    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
-  as_echo='print -r --'
-  as_echo_n='print -rn --'
-elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
   as_echo='printf %s\n'
   as_echo_n='printf %s'
 else
@@ -3718,7 +5135,7 @@ else
     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
     as_echo_n_body='eval
       arg=$1;
-      case $arg in @%:@(
+      case $arg in
       *"$as_nl"*)
        expr "X$arg" : "X\\(.*\\)$as_nl";
        arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
@@ -3741,6 +5158,13 @@ if test "${PATH_SEPARATOR+set}" != set; then
   }
 fi
 
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+  as_unset=unset
+else
+  as_unset=false
+fi
+
 
 # IFS
 # We need space, tab and new line, in precisely that order.  Quoting is
@@ -3750,15 +5174,15 @@ fi
 IFS=" ""       $as_nl"
 
 # Find who we are.  Look in the path if we contain no directory separator.
-case $0 in @%:@((
+case $0 in
   *[\\/]* ) as_myself=$0 ;;
   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-  done
+  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
 IFS=$as_save_IFS
 
      ;;
@@ -3770,110 +5194,24 @@ if test "x$as_myself" = x; then
 fi
 if test ! -f "$as_myself"; then
   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
-  exit 1
+  { (exit 1); exit 1; }
 fi
 
-# Unset variables that we do not need and which cause bugs (e.g. in
-# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
-# suppresses any "Segmentation fault" message there.  '((' could
-# trigger a bug in pdksh 5.2.14.
-for as_var in BASH_ENV ENV MAIL MAILPATH
-do eval test x\${$as_var+set} = xset \
-  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
-done
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-LC_ALL=C
-export LC_ALL
-LANGUAGE=C
-export LANGUAGE
-
-# CDPATH.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-
-@%:@ as_fn_error ERROR [LINENO LOG_FD]
-@%:@ ---------------------------------
-@%:@ Output "`basename @S|@0`: error: ERROR" to stderr. If LINENO and LOG_FD are
-@%:@ provided, also output the error to LOG_FD, referencing LINENO. Then exit the
-@%:@ script with status $?, using 1 if that was 0.
-as_fn_error ()
-{
-  as_status=$?; test $as_status -eq 0 && as_status=1
-  if test "$3"; then
-    as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-    $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
-  fi
-  $as_echo "$as_me: error: $1" >&2
-  as_fn_exit $as_status
-} @%:@ as_fn_error
-
-
-@%:@ as_fn_set_status STATUS
-@%:@ -----------------------
-@%:@ Set $? to STATUS, without forking.
-as_fn_set_status ()
-{
-  return $1
-} @%:@ as_fn_set_status
-
-@%:@ as_fn_exit STATUS
-@%:@ -----------------
-@%:@ Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
-as_fn_exit ()
-{
-  set +e
-  as_fn_set_status $1
-  exit $1
-} @%:@ as_fn_exit
-
-@%:@ as_fn_unset VAR
-@%:@ ---------------
-@%:@ Portably unset VAR.
-as_fn_unset ()
-{
-  { eval $1=; unset $1;}
-}
-as_unset=as_fn_unset
-@%:@ as_fn_append VAR VALUE
-@%:@ ----------------------
-@%:@ Append the text in VALUE to the end of the definition contained in VAR. Take
-@%:@ advantage of any shell optimizations that allow amortized linear growth over
-@%:@ repeated appends, instead of the typical quadratic growth present in naive
-@%:@ implementations.
-if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
-  eval 'as_fn_append ()
-  {
-    eval $1+=\$2
-  }'
-else
-  as_fn_append ()
-  {
-    eval $1=\$$1\$2
-  }
-fi # as_fn_append
-
-@%:@ as_fn_arith ARG...
-@%:@ ------------------
-@%:@ Perform arithmetic evaluation on the ARGs, and store the result in the
-@%:@ global $as_val. Take advantage of shells that can avoid forks. The arguments
-@%:@ must be portable across $(()) and expr.
-if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
-  eval 'as_fn_arith ()
-  {
-    as_val=$(( $* ))
-  }'
-else
-  as_fn_arith ()
-  {
-    as_val=`expr "$@" || test $? -eq 1`
-  }
-fi # as_fn_arith
-
+# Work around bugs in pre-3.0 UWIN ksh.
+for as_var in ENV MAIL MAILPATH
+do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
 
+# Required to use basename.
 if expr a : '\(a\)' >/dev/null 2>&1 &&
    test "X`expr 00001 : '.*\(...\)'`" = X001; then
   as_expr=expr
@@ -3887,12 +5225,8 @@ else
   as_basename=false
 fi
 
-if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
-  as_dirname=dirname
-else
-  as_dirname=false
-fi
 
+# Name of the executable.
 as_me=`$as_basename -- "$0" ||
 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
         X"$0" : 'X\(//\)$' \| \
@@ -3912,25 +5246,76 @@ $as_echo X/"$0" |
          }
          s/.*/./; q'`
 
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
+# CDPATH.
+$as_unset CDPATH
+
+
+
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
+
+  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+  # uniformly replaced by the line number.  The first 'sed' inserts a
+  # line-number line after each line using $LINENO; the second 'sed'
+  # does the real work.  The second script uses 'N' to pair each
+  # line-number line with the line containing $LINENO, and appends
+  # trailing '-' during substitution so that $LINENO is not a special
+  # case at line end.
+  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+  # scripts with optimization help from Paolo Bonzini.  Blame Lee
+  # E. McMahon (1931-1989) for sed's syntax.  :-)
+  sed -n '
+    p
+    /[$]LINENO/=
+  ' <$as_myself |
+    sed '
+      s/[$]LINENO.*/&-/
+      t lineno
+      b
+      :lineno
+      N
+      :loop
+      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+      t loop
+      s/-\n.*//
+    ' >$as_me.lineno &&
+  chmod +x "$as_me.lineno" ||
+    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+   { (exit 1); exit 1; }; }
+
+  # Don't try to exec as it changes $[0], causing all sort of problems
+  # (the dirname of $[0] is not the place where we might find the
+  # original and so on.  Autoconf is especially sensitive to this).
+  . "./$as_me.lineno"
+  # Exit status is that of the last command.
+  exit
+}
+
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+  as_dirname=dirname
+else
+  as_dirname=false
+fi
 
 ECHO_C= ECHO_N= ECHO_T=
-case `echo -n x` in @%:@(((((
+case `echo -n x` in
 -n*)
-  case `echo 'xy\c'` in
+  case `echo 'x\c'` in
   *c*) ECHO_T='        ';;     # ECHO_T is single tab character.
-  xy)  ECHO_C='\c';;
-  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
-       ECHO_T='        ';;
+  *)   ECHO_C='\c';;
   esac;;
 *)
   ECHO_N='-n';;
 esac
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
+  as_expr=expr
+else
+  as_expr=false
+fi
 
 rm -f conf$$ conf$$.exe conf$$.file
 if test -d conf$$.dir; then
@@ -3959,56 +5344,8 @@ fi
 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
 rmdir conf$$.dir 2>/dev/null
 
-
-@%:@ as_fn_mkdir_p
-@%:@ -------------
-@%:@ Create "$as_dir" as a directory, including parents if necessary.
-as_fn_mkdir_p ()
-{
-
-  case $as_dir in #(
-  -*) as_dir=./$as_dir;;
-  esac
-  test -d "$as_dir" || eval $as_mkdir_p || {
-    as_dirs=
-    while :; do
-      case $as_dir in #(
-      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
-      *) as_qdir=$as_dir;;
-      esac
-      as_dirs="'$as_qdir' $as_dirs"
-      as_dir=`$as_dirname -- "$as_dir" ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-        X"$as_dir" : 'X\(//\)[^/]' \| \
-        X"$as_dir" : 'X\(//\)$' \| \
-        X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_dir" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-           s//\1/
-           q
-         }
-         /^X\(\/\/\)[^/].*/{
-           s//\1/
-           q
-         }
-         /^X\(\/\/\)$/{
-           s//\1/
-           q
-         }
-         /^X\(\/\).*/{
-           s//\1/
-           q
-         }
-         s/.*/./; q'`
-      test -d "$as_dir" && break
-    done
-    test -z "$as_dirs" || eval "mkdir $as_dirs"
-  } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
-
-
-} @%:@ as_fn_mkdir_p
 if mkdir -p . 2>/dev/null; then
-  as_mkdir_p='mkdir -p "$as_dir"'
+  as_mkdir_p=:
 else
   test -d ./-p && rmdir ./-p
   as_mkdir_p=false
@@ -4027,10 +5364,10 @@ else
       if test -d "$1"; then
        test -d "$1/.";
       else
-       case $1 in @%:@(
+       case $1 in
        -*)set "./$1";;
        esac;
-       case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in @%:@((
+       case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
        ???[sx]*):;;*)false;;esac;fi
     '\'' sh
   '
@@ -4045,19 +5382,13 @@ as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
 
 
 exec 6>&1
-## ----------------------------------- ##
-## Main body of $CONFIG_STATUS script. ##
-## ----------------------------------- ##
-_ASEOF
-test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
 
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-# Save the log message, to keep $0 and so on meaningful, and to
+# Save the log message, to keep $[0] and so on meaningful, and to
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
 This file was extended by utakata $as_me 0.0.1, which was
-generated by GNU Autoconf 2.64.  Invocation command line was
+generated by GNU Autoconf 2.63.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
   CONFIG_HEADERS  = $CONFIG_HEADERS
@@ -4083,16 +5414,16 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 # Files that config.status was made for.
 config_files="$ac_config_files"
 config_headers="$ac_config_headers"
+config_commands="$ac_config_commands"
 
 _ACEOF
 
 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 ac_cs_usage="\
-\`$as_me' instantiates files and other configuration actions
-from templates according to the current configuration.  Unless the files
-and actions are specified as TAGs, all are instantiated by default.
+\`$as_me' instantiates files from templates according to the
+current configuration.
 
-Usage: $0 [OPTION]... [TAG]...
+Usage: $0 [OPTION]... [FILE]...
 
   -h, --help       print this help, then exit
   -V, --version    print version number and configuration settings, then exit
@@ -4111,21 +5442,27 @@ $config_files
 Configuration headers:
 $config_headers
 
-Report bugs to <BUG-REPORT-ADDRESS>."
+Configuration commands:
+$config_commands
+
+Report bugs to <bug-autoconf@gnu.org>."
 
 _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_version="\\
 utakata config.status 0.0.1
-configured by $0, generated by GNU Autoconf 2.64,
+configured by $0, generated by GNU Autoconf 2.63,
   with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
 
-Copyright (C) 2009 Free Software Foundation, Inc.
+Copyright (C) 2008 Free Software Foundation, Inc.
 This config.status script is free software; the Free Software Foundation
 gives unlimited permission to copy, distribute and modify it."
 
 ac_pwd='$ac_pwd'
 srcdir='$srcdir'
+INSTALL='$INSTALL'
+MKDIR_P='$MKDIR_P'
+AWK='$AWK'
 test -n "\$AWK" || AWK=awk
 _ACEOF
 
@@ -4160,19 +5497,20 @@ do
     case $ac_optarg in
     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
     esac
-    as_fn_append CONFIG_FILES " '$ac_optarg'"
+    CONFIG_FILES="$CONFIG_FILES '$ac_optarg'"
     ac_need_defaults=false;;
   --header | --heade | --head | --hea )
     $ac_shift
     case $ac_optarg in
     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
     esac
-    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
+    CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'"
     ac_need_defaults=false;;
   --he | --h)
     # Conflict between --help and --header
-    as_fn_error "ambiguous option: \`$1'
-Try \`$0 --help' for more information.";;
+    { $as_echo "$as_me: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&2
+   { (exit 1); exit 1; }; };;
   --help | --hel | -h )
     $as_echo "$ac_cs_usage"; exit ;;
   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
@@ -4180,10 +5518,11 @@ Try \`$0 --help' for more information.";;
     ac_cs_silent=: ;;
 
   # This is an error.
-  -*) as_fn_error "unrecognized option: \`$1'
-Try \`$0 --help' for more information." ;;
+  -*) { $as_echo "$as_me: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&2
+   { (exit 1); exit 1; }; } ;;
 
-  *) as_fn_append ac_config_targets " $1"
+  *) ac_config_targets="$ac_config_targets $1"
      ac_need_defaults=false ;;
 
   esac
@@ -4221,6 +5560,11 @@ _ASBOX
 
 _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+#
+# INIT-COMMANDS
+#
+AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+
 _ACEOF
 
 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
@@ -4230,12 +5574,13 @@ for ac_config_target in $ac_config_targets
 do
   case $ac_config_target in
     "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
+    "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
-    "src/Rakefile") CONFIG_FILES="$CONFIG_FILES src/Rakefile" ;;
-    "test/Rakefile") CONFIG_FILES="$CONFIG_FILES test/Rakefile" ;;
-    "test/Makefile") CONFIG_FILES="$CONFIG_FILES test/Makefile" ;;
+    "Rakefile") CONFIG_FILES="$CONFIG_FILES Rakefile" ;;
 
-  *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+  *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
+$as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
+   { (exit 1); exit 1; }; };;
   esac
 done
 
@@ -4247,6 +5592,7 @@ done
 if $ac_need_defaults; then
   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
+  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
 fi
 
 # Have a temporary directory for convenience.  Make it in the build tree
@@ -4261,7 +5607,7 @@ $debug ||
   trap 'exit_status=$?
   { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
 ' 0
-  trap 'as_fn_exit 1' 1 2 13 15
+  trap '{ (exit 1); exit 1; }' 1 2 13 15
 }
 # Create a (secure) tmp directory for tmp files.
 
@@ -4272,7 +5618,11 @@ $debug ||
 {
   tmp=./conf$$-$RANDOM
   (umask 077 && mkdir "$tmp")
-} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
+} ||
+{
+   $as_echo "$as_me: cannot create a temporary directory in ." >&2
+   { (exit 1); exit 1; }
+}
 
 # Set up the scripts for CONFIG_FILES section.
 # No need to generate them if there are no CONFIG_FILES.
@@ -4280,16 +5630,10 @@ $debug ||
 if test -n "$CONFIG_FILES"; then
 
 
-ac_cr=`echo X | tr X '\015'`
-# On cygwin, bash can eat \r inside `` if the user requested igncr.
-# But we know of no other shell where ac_cr would be empty at this
-# point, so we can use a bashism as a fallback.
-if test "x$ac_cr" = x; then
-  eval ac_cr=\$\'\\r\'
-fi
+ac_cr='\r'
 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
-  ac_cs_awk_cr='\r'
+  ac_cs_awk_cr='\\r'
 else
   ac_cs_awk_cr=$ac_cr
 fi
@@ -4303,18 +5647,24 @@ _ACEOF
   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
   echo "_ACEOF"
 } >conf$$subs.sh ||
-  as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
+  { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
+$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
+   { (exit 1); exit 1; }; }
 ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
 ac_delim='%!_!# '
 for ac_last_try in false false false false false :; do
   . ./conf$$subs.sh ||
-    as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
+    { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
+$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
+   { (exit 1); exit 1; }; }
 
   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
   if test $ac_delim_n = $ac_delim_num; then
     break
   elif $ac_last_try; then
-    as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
+    { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
+$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
+   { (exit 1); exit 1; }; }
   else
     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
   fi
@@ -4403,7 +5753,9 @@ if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
 else
   cat
 fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
-  || as_fn_error "could not setup config files machinery" "$LINENO" 5
+  || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5
+$as_echo "$as_me: error: could not setup config files machinery" >&2;}
+   { (exit 1); exit 1; }; }
 _ACEOF
 
 # VPATH may cause trouble with some makes, so we remove $(srcdir),
@@ -4444,7 +5796,9 @@ for ac_last_try in false false :; do
   if test -z "$ac_t"; then
     break
   elif $ac_last_try; then
-    as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
+    { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_HEADERS" >&5
+$as_echo "$as_me: error: could not make $CONFIG_HEADERS" >&2;}
+   { (exit 1); exit 1; }; }
   else
     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
   fi
@@ -4529,11 +5883,13 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 _ACAWK
 _ACEOF
 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-  as_fn_error "could not setup config headers machinery" "$LINENO" 5
+  { { $as_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5
+$as_echo "$as_me: error: could not setup config headers machinery" >&2;}
+   { (exit 1); exit 1; }; }
 fi # test -n "$CONFIG_HEADERS"
 
 
-eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
+eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
 shift
 for ac_tag
 do
@@ -4542,7 +5898,9 @@ do
   esac
   case $ac_mode$ac_tag in
   :[FHL]*:*);;
-  :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
+  :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5
+$as_echo "$as_me: error: invalid tag $ac_tag" >&2;}
+   { (exit 1); exit 1; }; };;
   :[FH]-) ac_tag=-:-;;
   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
   esac
@@ -4570,10 +5928,12 @@ do
           [\\/$]*) false;;
           *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
           esac ||
-          as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
+          { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
+$as_echo "$as_me: error: cannot find input file: $ac_f" >&2;}
+   { (exit 1); exit 1; }; };;
       esac
       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
-      as_fn_append ac_file_inputs " '$ac_f'"
+      ac_file_inputs="$ac_file_inputs '$ac_f'"
     done
 
     # Let's still pretend it is `configure' which instantiates (i.e., don't
@@ -4584,7 +5944,7 @@ do
        `' by configure.'
     if test x"$ac_file" != x-; then
       configure_input="$ac_file.  $configure_input"
-      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
+      { $as_echo "$as_me:$LINENO: creating $ac_file" >&5
 $as_echo "$as_me: creating $ac_file" >&6;}
     fi
     # Neutralize special characters interpreted by sed in replacement strings.
@@ -4597,7 +5957,9 @@ $as_echo "$as_me: creating $ac_file" >&6;}
 
     case $ac_tag in
     *:-:* | *:-) cat >"$tmp/stdin" \
-      || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
+      || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
+$as_echo "$as_me: error: could not create $ac_file" >&2;}
+   { (exit 1); exit 1; }; } ;;
     esac
     ;;
   esac
@@ -4625,7 +5987,47 @@ $as_echo X"$ac_file" |
            q
          }
          s/.*/./; q'`
-  as_dir="$ac_dir"; as_fn_mkdir_p
+  { as_dir="$ac_dir"
+  case $as_dir in #(
+  -*) as_dir=./$as_dir;;
+  esac
+  test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
+    as_dirs=
+    while :; do
+      case $as_dir in #(
+      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+      *) as_qdir=$as_dir;;
+      esac
+      as_dirs="'$as_qdir' $as_dirs"
+      as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+        X"$as_dir" : 'X\(//\)[^/]' \| \
+        X"$as_dir" : 'X\(//\)$' \| \
+        X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)[^/].*/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\).*/{
+           s//\1/
+           q
+         }
+         s/.*/./; q'`
+      test -d "$as_dir" && break
+    done
+    test -z "$as_dirs" || eval "mkdir $as_dirs"
+  } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
+$as_echo "$as_me: error: cannot create directory $as_dir" >&2;}
+   { (exit 1); exit 1; }; }; }
   ac_builddir=.
 
 case "$ac_dir" in
@@ -4667,12 +6069,22 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
   # CONFIG_FILE
   #
 
+  case $INSTALL in
+  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
+  esac
+  ac_MKDIR_P=$MKDIR_P
+  case $MKDIR_P in
+  [\\/$]* | ?:[\\/]* ) ;;
+  */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
+  esac
 _ACEOF
 
 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # If the template does not know about datarootdir, expand it.
 # FIXME: This hack should be removed a few years after 2.60.
 ac_datarootdir_hack=; ac_datarootdir_seen=
+
 ac_sed_dataroot='
 /datarootdir/ {
   p
@@ -4682,11 +6094,12 @@ ac_sed_dataroot='
 /@docdir@/p
 /@infodir@/p
 /@localedir@/p
-/@mandir@/p'
+/@mandir@/p
+'
 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
 *datarootdir*) ac_datarootdir_seen=yes;;
 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
-  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+  { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
 _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
@@ -4696,7 +6109,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
   s&@infodir@&$infodir&g
   s&@localedir@&$localedir&g
   s&@mandir@&$mandir&g
-  s&\\\${datarootdir}&$datarootdir&g' ;;
+    s&\\\${datarootdir}&$datarootdir&g' ;;
 esac
 _ACEOF
 
@@ -4720,15 +6133,19 @@ s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
 s&@builddir@&$ac_builddir&;t t
 s&@abs_builddir@&$ac_abs_builddir&;t t
 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+s&@INSTALL@&$ac_INSTALL&;t t
+s&@MKDIR_P@&$ac_MKDIR_P&;t t
 $ac_datarootdir_hack
 "
 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
-  || as_fn_error "could not create $ac_file" "$LINENO" 5
+  || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
+$as_echo "$as_me: error: could not create $ac_file" >&2;}
+   { (exit 1); exit 1; }; }
 
 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
   { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
   { ac_out=`sed -n '/^[         ]*datarootdir[  ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
-  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+  { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
 which seems to be undefined.  Please make sure it is defined." >&5
 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
 which seems to be undefined.  Please make sure it is defined." >&2;}
@@ -4738,7 +6155,9 @@ which seems to be undefined.  Please make sure it is defined." >&2;}
   -) cat "$tmp/out" && rm -f "$tmp/out";;
   *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
   esac \
-  || as_fn_error "could not create $ac_file" "$LINENO" 5
+  || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
+$as_echo "$as_me: error: could not create $ac_file" >&2;}
+   { (exit 1); exit 1; }; }
  ;;
   :H)
   #
@@ -4749,34 +6168,216 @@ which seems to be undefined.  Please make sure it is defined." >&2;}
       $as_echo "/* $configure_input  */" \
       && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
     } >"$tmp/config.h" \
-      || as_fn_error "could not create $ac_file" "$LINENO" 5
+      || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
+$as_echo "$as_me: error: could not create $ac_file" >&2;}
+   { (exit 1); exit 1; }; }
     if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
+      { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5
 $as_echo "$as_me: $ac_file is unchanged" >&6;}
     else
       rm -f "$ac_file"
       mv "$tmp/config.h" "$ac_file" \
-       || as_fn_error "could not create $ac_file" "$LINENO" 5
+       || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
+$as_echo "$as_me: error: could not create $ac_file" >&2;}
+   { (exit 1); exit 1; }; }
     fi
   else
     $as_echo "/* $configure_input  */" \
       && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
-      || as_fn_error "could not create -" "$LINENO" 5
+      || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5
+$as_echo "$as_me: error: could not create -" >&2;}
+   { (exit 1); exit 1; }; }
   fi
+# Compute "$ac_file"'s index in $config_headers.
+_am_arg="$ac_file"
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+  case $_am_header in
+    $_am_arg | $_am_arg:* )
+      break ;;
+    * )
+      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+  esac
+done
+echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
+$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+        X"$_am_arg" : 'X\(//\)[^/]' \| \
+        X"$_am_arg" : 'X\(//\)$' \| \
+        X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$_am_arg" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)[^/].*/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\).*/{
+           s//\1/
+           q
+         }
+         s/.*/./; q'`/stamp-h$_am_stamp_count
  ;;
   
-  
+  :C)  { $as_echo "$as_me:$LINENO: executing $ac_file commands" >&5
+$as_echo "$as_me: executing $ac_file commands" >&6;}
+ ;;
+  esac
+
+
+  case $ac_file$ac_mode in
+    "depfiles":C) test x"$AMDEP_TRUE" != x"" || # Autoconf 2.62 quotes --file arguments for eval, but not when files
+# are listed without --file.  Let's play safe and only enable the eval
+# if we detect the quoting.
+case $CONFIG_FILES in
+*\'*) eval set x "$CONFIG_FILES" ;;
+*)   set x $CONFIG_FILES ;;
+esac
+shift
+for mf
+do
+  # Strip MF so we end up with the name of the file.
+  mf=`echo "$mf" | sed -e 's/:.*$//'`
+  # Check whether this is an Automake generated Makefile or not.
+  # We used to match only the files named `Makefile.in', but
+  # some people rename them; so instead we look at the file content.
+  # Grep'ing the first line is not enough: some people post-process
+  # each Makefile.in and add a new line on top of each file to say so.
+  # Grep'ing the whole file is not good either: AIX grep has a line
+  # limit of 2048, but all sed's we know have understand at least 4000.
+  if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+    dirpart=`$as_dirname -- "$mf" ||
+$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+        X"$mf" : 'X\(//\)[^/]' \| \
+        X"$mf" : 'X\(//\)$' \| \
+        X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$mf" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)[^/].*/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\).*/{
+           s//\1/
+           q
+         }
+         s/.*/./; q'`
+  else
+    continue
+  fi
+  # Extract the definition of DEPDIR, am__include, and am__quote
+  # from the Makefile without running `make'.
+  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+  test -z "$DEPDIR" && continue
+  am__include=`sed -n 's/^am__include = //p' < "$mf"`
+  test -z "am__include" && continue
+  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+  # When using ansi2knr, U may be empty or an underscore; expand it
+  U=`sed -n 's/^U = //p' < "$mf"`
+  # Find all dependency output files, they are included files with
+  # $(DEPDIR) in their names.  We invoke sed twice because it is the
+  # simplest approach to changing $(DEPDIR) to its actual value in the
+  # expansion.
+  for file in `sed -n "
+    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+    # Make sure the directory exists.
+    test -f "$dirpart/$file" && continue
+    fdir=`$as_dirname -- "$file" ||
+$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+        X"$file" : 'X\(//\)[^/]' \| \
+        X"$file" : 'X\(//\)$' \| \
+        X"$file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)[^/].*/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\).*/{
+           s//\1/
+           q
+         }
+         s/.*/./; q'`
+    { as_dir=$dirpart/$fdir
+  case $as_dir in #(
+  -*) as_dir=./$as_dir;;
   esac
+  test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
+    as_dirs=
+    while :; do
+      case $as_dir in #(
+      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+      *) as_qdir=$as_dir;;
+      esac
+      as_dirs="'$as_qdir' $as_dirs"
+      as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+        X"$as_dir" : 'X\(//\)[^/]' \| \
+        X"$as_dir" : 'X\(//\)$' \| \
+        X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)[^/].*/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\).*/{
+           s//\1/
+           q
+         }
+         s/.*/./; q'`
+      test -d "$as_dir" && break
+    done
+    test -z "$as_dirs" || eval "mkdir $as_dirs"
+  } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
+$as_echo "$as_me: error: cannot create directory $as_dir" >&2;}
+   { (exit 1); exit 1; }; }; }
+    # echo "creating $dirpart/$file"
+    echo '# dummy' > "$dirpart/$file"
+  done
+done
+ ;;
 
+  esac
 done # for ac_tag
 
 
-as_fn_exit 0
+{ (exit 0); exit 0; }
 _ACEOF
+chmod +x $CONFIG_STATUS
 ac_clean_files=$ac_clean_files_save
 
 test $ac_write_fail = 0 ||
-  as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
+  { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5
+$as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;}
+   { (exit 1); exit 1; }; }
 
 
 # configure is writing to config.log, and then calls config.status.
@@ -4797,10 +6398,10 @@ if test "$no_create" != yes; then
   exec 5>>config.log
   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
   # would make configure fail if this is the last instruction.
-  $ac_cs_success || as_fn_exit $?
+  $ac_cs_success || { (exit 1); exit 1; }
 fi
 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+  { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
 fi
 
index 510ce55..e309e8b 100644 (file)
                       ],
                       [
                         '/usr/share/autoconf/autoconf/autoconf.m4f',
+                        'aclocal.m4',
                         'configure.in'
                       ],
                       {
-                        '_LT_AC_TAGCONFIG' => 1,
                         'AM_PROG_F77_C_O' => 1,
-                        'AC_INIT' => 1,
+                        '_LT_AC_TAGCONFIG' => 1,
                         'm4_pattern_forbid' => 1,
-                        'AC_CANONICAL_TARGET' => 1,
+                        'AC_INIT' => 1,
                         '_AM_COND_IF' => 1,
-                        'AC_CONFIG_LIBOBJ_DIR' => 1,
+                        'AC_CANONICAL_TARGET' => 1,
                         'AC_SUBST' => 1,
-                        'AC_CANONICAL_HOST' => 1,
+                        'AC_CONFIG_LIBOBJ_DIR' => 1,
                         'AC_FC_SRCEXT' => 1,
-                        'AC_DEFUN' => 1,
+                        'AC_CANONICAL_HOST' => 1,
                         'AC_PROG_LIBTOOL' => 1,
                         'AM_INIT_AUTOMAKE' => 1,
                         'AC_CONFIG_SUBDIRS' => 1,
                         'AM_AUTOMAKE_VERSION' => 1,
                         'LT_CONFIG_LTDL_DIR' => 1,
-                        'AC_REQUIRE_AUX_FILE' => 1,
                         'AC_CONFIG_LINKS' => 1,
-                        'LT_SUPPORTED_TAG' => 1,
+                        'AC_REQUIRE_AUX_FILE' => 1,
                         'm4_sinclude' => 1,
+                        'LT_SUPPORTED_TAG' => 1,
                         'AM_MAINTAINER_MODE' => 1,
-                        'AC_DEFUN_ONCE' => 1,
                         'AM_GNU_GETTEXT_INTL_SUBDIR' => 1,
                         '_m4_warn' => 1,
                         'AM_PROG_CXX_C_O' => 1,
                         'include' => 1,
                         'AM_GNU_GETTEXT' => 1,
                         'AC_LIBSOURCE' => 1,
-                        'AC_CANONICAL_BUILD' => 1,
                         'AM_PROG_FC_C_O' => 1,
+                        'AC_CANONICAL_BUILD' => 1,
                         'AC_FC_FREEFORM' => 1,
                         'AH_OUTPUT' => 1,
-                        'AC_CONFIG_AUX_DIR' => 1,
                         '_AM_SUBST_NOTMAKE' => 1,
-                        'm4_pattern_allow' => 1,
-                        'AM_PROG_CC_C_O' => 1,
+                        'AC_CONFIG_AUX_DIR' => 1,
                         'sinclude' => 1,
-                        '_AM_AUTOCONF_VERSION' => 1,
-                        'AM_CONDITIONAL' => 1,
+                        'AM_PROG_CC_C_O' => 1,
+                        'm4_pattern_allow' => 1,
                         'AC_CANONICAL_SYSTEM' => 1,
+                        'AM_CONDITIONAL' => 1,
                         'AC_CONFIG_HEADERS' => 1,
                         'AC_DEFINE_TRACE_LITERAL' => 1,
                         'm4_include' => 1,
                         '_AM_COND_ELSE' => 1,
-                        'AU_DEFUN' => 1,
                         'AC_SUBST_TRACE' => 1
                       }
                     ], 'Autom4te::Request' ),
                         'AU_DEFUN' => 1,
                         'AM_MAKE_INCLUDE' => 1
                       }
-                    ], 'Autom4te::Request' ),
-             bless( [
-                      '2',
-                      1,
-                      [
-                        '/usr/share/autoconf'
-                      ],
-                      [
-                        '/usr/share/autoconf/autoconf/autoconf.m4f',
-                        'aclocal.m4',
-                        'configure.in'
-                      ],
-                      {
-                        '_LT_AC_TAGCONFIG' => 1,
-                        'AM_PROG_F77_C_O' => 1,
-                        'AC_INIT' => 1,
-                        'm4_pattern_forbid' => 1,
-                        '_AM_COND_IF' => 1,
-                        'AC_CANONICAL_TARGET' => 1,
-                        'AC_SUBST' => 1,
-                        'AC_CONFIG_LIBOBJ_DIR' => 1,
-                        'AC_FC_SRCEXT' => 1,
-                        'AC_CANONICAL_HOST' => 1,
-                        'AC_PROG_LIBTOOL' => 1,
-                        'AM_INIT_AUTOMAKE' => 1,
-                        'AC_CONFIG_SUBDIRS' => 1,
-                        'AM_AUTOMAKE_VERSION' => 1,
-                        'LT_CONFIG_LTDL_DIR' => 1,
-                        'AC_REQUIRE_AUX_FILE' => 1,
-                        'AC_CONFIG_LINKS' => 1,
-                        'm4_sinclude' => 1,
-                        'LT_SUPPORTED_TAG' => 1,
-                        'AM_MAINTAINER_MODE' => 1,
-                        'AM_GNU_GETTEXT_INTL_SUBDIR' => 1,
-                        '_m4_warn' => 1,
-                        'AM_PROG_CXX_C_O' => 1,
-                        '_AM_COND_ENDIF' => 1,
-                        'AM_ENABLE_MULTILIB' => 1,
-                        'AM_SILENT_RULES' => 1,
-                        'AC_CONFIG_FILES' => 1,
-                        'include' => 1,
-                        'LT_INIT' => 1,
-                        'AM_GNU_GETTEXT' => 1,
-                        'AC_LIBSOURCE' => 1,
-                        'AM_PROG_FC_C_O' => 1,
-                        'AC_CANONICAL_BUILD' => 1,
-                        'AC_FC_FREEFORM' => 1,
-                        'AH_OUTPUT' => 1,
-                        '_AM_SUBST_NOTMAKE' => 1,
-                        'AC_CONFIG_AUX_DIR' => 1,
-                        'sinclude' => 1,
-                        'm4_pattern_allow' => 1,
-                        'AM_PROG_CC_C_O' => 1,
-                        'AC_CANONICAL_SYSTEM' => 1,
-                        'AM_CONDITIONAL' => 1,
-                        'AC_CONFIG_HEADERS' => 1,
-                        'AC_DEFINE_TRACE_LITERAL' => 1,
-                        'm4_include' => 1,
-                        '_AM_COND_ELSE' => 1,
-                        'AC_SUBST_TRACE' => 1
-                      }
                     ], 'Autom4te::Request' )
            );
 
index d29c5b4..2b2f589 100644 (file)
@@ -6,7 +6,7 @@ m4trace:configure.in:5: -1- m4_pattern_allow([^AS_FLAGS$])
 m4trace:configure.in:5: -1- m4_pattern_forbid([^_?m4_])
 m4trace:configure.in:5: -1- m4_pattern_forbid([^dnl$])
 m4trace:configure.in:5: -1- m4_pattern_forbid([^_?AS_])
-m4trace:configure.in:5: -1- AC_SUBST([SHELL])
+m4trace:configure.in:5: -1- AC_SUBST([SHELL], [${CONFIG_SHELL-/bin/sh}])
 m4trace:configure.in:5: -1- AC_SUBST_TRACE([SHELL])
 m4trace:configure.in:5: -1- m4_pattern_allow([^SHELL$])
 m4trace:configure.in:5: -1- AC_SUBST([PATH_SEPARATOR])
@@ -27,9 +27,6 @@ m4trace:configure.in:5: -1- m4_pattern_allow([^PACKAGE_STRING$])
 m4trace:configure.in:5: -1- AC_SUBST([PACKAGE_BUGREPORT], [m4_ifdef([AC_PACKAGE_BUGREPORT], ['AC_PACKAGE_BUGREPORT'])])
 m4trace:configure.in:5: -1- AC_SUBST_TRACE([PACKAGE_BUGREPORT])
 m4trace:configure.in:5: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$])
-m4trace:configure.in:5: -1- AC_SUBST([PACKAGE_URL], [m4_ifdef([AC_PACKAGE_URL],       ['AC_PACKAGE_URL'])])
-m4trace:configure.in:5: -1- AC_SUBST_TRACE([PACKAGE_URL])
-m4trace:configure.in:5: -1- m4_pattern_allow([^PACKAGE_URL$])
 m4trace:configure.in:5: -1- AC_SUBST([exec_prefix], [NONE])
 m4trace:configure.in:5: -1- AC_SUBST_TRACE([exec_prefix])
 m4trace:configure.in:5: -1- m4_pattern_allow([^exec_prefix$])
@@ -101,27 +98,23 @@ m4trace:configure.in:5: -1- m4_pattern_allow([^mandir$])
 m4trace:configure.in:5: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_NAME])
 m4trace:configure.in:5: -1- m4_pattern_allow([^PACKAGE_NAME$])
 m4trace:configure.in:5: -1- AH_OUTPUT([PACKAGE_NAME], [/* Define to the full name of this package. */
-@%:@undef PACKAGE_NAME])
+#undef PACKAGE_NAME])
 m4trace:configure.in:5: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_TARNAME])
 m4trace:configure.in:5: -1- m4_pattern_allow([^PACKAGE_TARNAME$])
 m4trace:configure.in:5: -1- AH_OUTPUT([PACKAGE_TARNAME], [/* Define to the one symbol short name of this package. */
-@%:@undef PACKAGE_TARNAME])
+#undef PACKAGE_TARNAME])
 m4trace:configure.in:5: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_VERSION])
 m4trace:configure.in:5: -1- m4_pattern_allow([^PACKAGE_VERSION$])
 m4trace:configure.in:5: -1- AH_OUTPUT([PACKAGE_VERSION], [/* Define to the version of this package. */
-@%:@undef PACKAGE_VERSION])
+#undef PACKAGE_VERSION])
 m4trace:configure.in:5: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_STRING])
 m4trace:configure.in:5: -1- m4_pattern_allow([^PACKAGE_STRING$])
 m4trace:configure.in:5: -1- AH_OUTPUT([PACKAGE_STRING], [/* Define to the full name and version of this package. */
-@%:@undef PACKAGE_STRING])
+#undef PACKAGE_STRING])
 m4trace:configure.in:5: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_BUGREPORT])
 m4trace:configure.in:5: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$])
 m4trace:configure.in:5: -1- AH_OUTPUT([PACKAGE_BUGREPORT], [/* Define to the address where bug reports for this package should be sent. */
-@%:@undef PACKAGE_BUGREPORT])
-m4trace:configure.in:5: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_URL])
-m4trace:configure.in:5: -1- m4_pattern_allow([^PACKAGE_URL$])
-m4trace:configure.in:5: -1- AH_OUTPUT([PACKAGE_URL], [/* Define to the home page for this package. */
-@%:@undef PACKAGE_URL])
+#undef PACKAGE_BUGREPORT])
 m4trace:configure.in:5: -1- AC_SUBST([DEFS])
 m4trace:configure.in:5: -1- AC_SUBST_TRACE([DEFS])
 m4trace:configure.in:5: -1- m4_pattern_allow([^DEFS$])
@@ -147,39 +140,96 @@ m4trace:configure.in:5: -1- AC_SUBST([target_alias])
 m4trace:configure.in:5: -1- AC_SUBST_TRACE([target_alias])
 m4trace:configure.in:5: -1- m4_pattern_allow([^target_alias$])
 m4trace:configure.in:7: -1- AC_CONFIG_HEADERS([config.h])
-m4trace:configure.in:10: -1- AC_SUBST([CXX])
-m4trace:configure.in:10: -1- AC_SUBST_TRACE([CXX])
-m4trace:configure.in:10: -1- m4_pattern_allow([^CXX$])
-m4trace:configure.in:10: -1- AC_SUBST([CXXFLAGS])
-m4trace:configure.in:10: -1- AC_SUBST_TRACE([CXXFLAGS])
-m4trace:configure.in:10: -1- m4_pattern_allow([^CXXFLAGS$])
-m4trace:configure.in:10: -1- AC_SUBST([LDFLAGS])
-m4trace:configure.in:10: -1- AC_SUBST_TRACE([LDFLAGS])
-m4trace:configure.in:10: -1- m4_pattern_allow([^LDFLAGS$])
-m4trace:configure.in:10: -1- AC_SUBST([LIBS])
-m4trace:configure.in:10: -1- AC_SUBST_TRACE([LIBS])
-m4trace:configure.in:10: -1- m4_pattern_allow([^LIBS$])
-m4trace:configure.in:10: -1- AC_SUBST([CPPFLAGS])
-m4trace:configure.in:10: -1- AC_SUBST_TRACE([CPPFLAGS])
-m4trace:configure.in:10: -1- m4_pattern_allow([^CPPFLAGS$])
-m4trace:configure.in:10: -1- AC_SUBST([CXX])
-m4trace:configure.in:10: -1- AC_SUBST_TRACE([CXX])
-m4trace:configure.in:10: -1- m4_pattern_allow([^CXX$])
-m4trace:configure.in:10: -1- AC_SUBST([ac_ct_CXX])
-m4trace:configure.in:10: -1- AC_SUBST_TRACE([ac_ct_CXX])
-m4trace:configure.in:10: -1- m4_pattern_allow([^ac_ct_CXX$])
-m4trace:configure.in:10: -1- AC_SUBST([EXEEXT], [$ac_cv_exeext])
-m4trace:configure.in:10: -1- AC_SUBST_TRACE([EXEEXT])
-m4trace:configure.in:10: -1- m4_pattern_allow([^EXEEXT$])
-m4trace:configure.in:10: -1- AC_SUBST([OBJEXT], [$ac_cv_objext])
-m4trace:configure.in:10: -1- AC_SUBST_TRACE([OBJEXT])
-m4trace:configure.in:10: -1- m4_pattern_allow([^OBJEXT$])
-m4trace:configure.in:11: -1- AC_SUBST([CC])
-m4trace:configure.in:11: -1- AC_SUBST_TRACE([CC])
-m4trace:configure.in:11: -1- m4_pattern_allow([^CC$])
-m4trace:configure.in:11: -1- AC_SUBST([CFLAGS])
-m4trace:configure.in:11: -1- AC_SUBST_TRACE([CFLAGS])
-m4trace:configure.in:11: -1- m4_pattern_allow([^CFLAGS$])
+m4trace:configure.in:8: -1- AM_INIT_AUTOMAKE([subdir-objects])
+m4trace:configure.in:8: -1- m4_pattern_allow([^AM_[A-Z]+FLAGS$])
+m4trace:configure.in:8: -1- AM_AUTOMAKE_VERSION([1.10.2])
+m4trace:configure.in:8: -1- AC_REQUIRE_AUX_FILE([install-sh])
+m4trace:configure.in:8: -1- AC_SUBST([INSTALL_PROGRAM])
+m4trace:configure.in:8: -1- AC_SUBST_TRACE([INSTALL_PROGRAM])
+m4trace:configure.in:8: -1- m4_pattern_allow([^INSTALL_PROGRAM$])
+m4trace:configure.in:8: -1- AC_SUBST([INSTALL_SCRIPT])
+m4trace:configure.in:8: -1- AC_SUBST_TRACE([INSTALL_SCRIPT])
+m4trace:configure.in:8: -1- m4_pattern_allow([^INSTALL_SCRIPT$])
+m4trace:configure.in:8: -1- AC_SUBST([INSTALL_DATA])
+m4trace:configure.in:8: -1- AC_SUBST_TRACE([INSTALL_DATA])
+m4trace:configure.in:8: -1- m4_pattern_allow([^INSTALL_DATA$])
+m4trace:configure.in:8: -1- AC_SUBST([am__isrc], [' -I$(srcdir)'])
+m4trace:configure.in:8: -1- AC_SUBST_TRACE([am__isrc])
+m4trace:configure.in:8: -1- m4_pattern_allow([^am__isrc$])
+m4trace:configure.in:8: -1- _AM_SUBST_NOTMAKE([am__isrc])
+m4trace:configure.in:8: -1- AC_SUBST([CYGPATH_W])
+m4trace:configure.in:8: -1- AC_SUBST_TRACE([CYGPATH_W])
+m4trace:configure.in:8: -1- m4_pattern_allow([^CYGPATH_W$])
+m4trace:configure.in:8: -1- AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])
+m4trace:configure.in:8: -1- AC_SUBST_TRACE([PACKAGE])
+m4trace:configure.in:8: -1- m4_pattern_allow([^PACKAGE$])
+m4trace:configure.in:8: -1- AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])
+m4trace:configure.in:8: -1- AC_SUBST_TRACE([VERSION])
+m4trace:configure.in:8: -1- m4_pattern_allow([^VERSION$])
+m4trace:configure.in:8: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE])
+m4trace:configure.in:8: -1- m4_pattern_allow([^PACKAGE$])
+m4trace:configure.in:8: -1- AH_OUTPUT([PACKAGE], [/* Name of package */
+#undef PACKAGE])
+m4trace:configure.in:8: -1- AC_DEFINE_TRACE_LITERAL([VERSION])
+m4trace:configure.in:8: -1- m4_pattern_allow([^VERSION$])
+m4trace:configure.in:8: -1- AH_OUTPUT([VERSION], [/* Version number of package */
+#undef VERSION])
+m4trace:configure.in:8: -1- AC_REQUIRE_AUX_FILE([missing])
+m4trace:configure.in:8: -1- AC_SUBST([ACLOCAL])
+m4trace:configure.in:8: -1- AC_SUBST_TRACE([ACLOCAL])
+m4trace:configure.in:8: -1- m4_pattern_allow([^ACLOCAL$])
+m4trace:configure.in:8: -1- AC_SUBST([AUTOCONF])
+m4trace:configure.in:8: -1- AC_SUBST_TRACE([AUTOCONF])
+m4trace:configure.in:8: -1- m4_pattern_allow([^AUTOCONF$])
+m4trace:configure.in:8: -1- AC_SUBST([AUTOMAKE])
+m4trace:configure.in:8: -1- AC_SUBST_TRACE([AUTOMAKE])
+m4trace:configure.in:8: -1- m4_pattern_allow([^AUTOMAKE$])
+m4trace:configure.in:8: -1- AC_SUBST([AUTOHEADER])
+m4trace:configure.in:8: -1- AC_SUBST_TRACE([AUTOHEADER])
+m4trace:configure.in:8: -1- m4_pattern_allow([^AUTOHEADER$])
+m4trace:configure.in:8: -1- AC_SUBST([MAKEINFO])
+m4trace:configure.in:8: -1- AC_SUBST_TRACE([MAKEINFO])
+m4trace:configure.in:8: -1- m4_pattern_allow([^MAKEINFO$])
+m4trace:configure.in:8: -1- AC_SUBST([install_sh])
+m4trace:configure.in:8: -1- AC_SUBST_TRACE([install_sh])
+m4trace:configure.in:8: -1- m4_pattern_allow([^install_sh$])
+m4trace:configure.in:8: -1- AC_SUBST([STRIP])
+m4trace:configure.in:8: -1- AC_SUBST_TRACE([STRIP])
+m4trace:configure.in:8: -1- m4_pattern_allow([^STRIP$])
+m4trace:configure.in:8: -1- AC_SUBST([INSTALL_STRIP_PROGRAM])
+m4trace:configure.in:8: -1- AC_SUBST_TRACE([INSTALL_STRIP_PROGRAM])
+m4trace:configure.in:8: -1- m4_pattern_allow([^INSTALL_STRIP_PROGRAM$])
+m4trace:configure.in:8: -1- AC_REQUIRE_AUX_FILE([install-sh])
+m4trace:configure.in:8: -1- AC_SUBST([MKDIR_P])
+m4trace:configure.in:8: -1- AC_SUBST_TRACE([MKDIR_P])
+m4trace:configure.in:8: -1- m4_pattern_allow([^MKDIR_P$])
+m4trace:configure.in:8: -1- AC_SUBST([mkdir_p], ["$MKDIR_P"])
+m4trace:configure.in:8: -1- AC_SUBST_TRACE([mkdir_p])
+m4trace:configure.in:8: -1- m4_pattern_allow([^mkdir_p$])
+m4trace:configure.in:8: -1- AC_SUBST([AWK])
+m4trace:configure.in:8: -1- AC_SUBST_TRACE([AWK])
+m4trace:configure.in:8: -1- m4_pattern_allow([^AWK$])
+m4trace:configure.in:8: -1- AC_SUBST([SET_MAKE])
+m4trace:configure.in:8: -1- AC_SUBST_TRACE([SET_MAKE])
+m4trace:configure.in:8: -1- m4_pattern_allow([^SET_MAKE$])
+m4trace:configure.in:8: -1- AC_SUBST([am__leading_dot])
+m4trace:configure.in:8: -1- AC_SUBST_TRACE([am__leading_dot])
+m4trace:configure.in:8: -1- m4_pattern_allow([^am__leading_dot$])
+m4trace:configure.in:8: -1- AC_SUBST([AMTAR])
+m4trace:configure.in:8: -1- AC_SUBST_TRACE([AMTAR])
+m4trace:configure.in:8: -1- m4_pattern_allow([^AMTAR$])
+m4trace:configure.in:8: -1- AC_SUBST([am__tar])
+m4trace:configure.in:8: -1- AC_SUBST_TRACE([am__tar])
+m4trace:configure.in:8: -1- m4_pattern_allow([^am__tar$])
+m4trace:configure.in:8: -1- AC_SUBST([am__untar])
+m4trace:configure.in:8: -1- AC_SUBST_TRACE([am__untar])
+m4trace:configure.in:8: -1- m4_pattern_allow([^am__untar$])
+m4trace:configure.in:11: -1- AC_SUBST([CXX])
+m4trace:configure.in:11: -1- AC_SUBST_TRACE([CXX])
+m4trace:configure.in:11: -1- m4_pattern_allow([^CXX$])
+m4trace:configure.in:11: -1- AC_SUBST([CXXFLAGS])
+m4trace:configure.in:11: -1- AC_SUBST_TRACE([CXXFLAGS])
+m4trace:configure.in:11: -1- m4_pattern_allow([^CXXFLAGS$])
 m4trace:configure.in:11: -1- AC_SUBST([LDFLAGS])
 m4trace:configure.in:11: -1- AC_SUBST_TRACE([LDFLAGS])
 m4trace:configure.in:11: -1- m4_pattern_allow([^LDFLAGS$])
@@ -189,91 +239,168 @@ m4trace:configure.in:11: -1- m4_pattern_allow([^LIBS$])
 m4trace:configure.in:11: -1- AC_SUBST([CPPFLAGS])
 m4trace:configure.in:11: -1- AC_SUBST_TRACE([CPPFLAGS])
 m4trace:configure.in:11: -1- m4_pattern_allow([^CPPFLAGS$])
-m4trace:configure.in:11: -1- AC_SUBST([CC])
-m4trace:configure.in:11: -1- AC_SUBST_TRACE([CC])
-m4trace:configure.in:11: -1- m4_pattern_allow([^CC$])
-m4trace:configure.in:11: -1- AC_SUBST([CC])
-m4trace:configure.in:11: -1- AC_SUBST_TRACE([CC])
-m4trace:configure.in:11: -1- m4_pattern_allow([^CC$])
-m4trace:configure.in:11: -1- AC_SUBST([CC])
-m4trace:configure.in:11: -1- AC_SUBST_TRACE([CC])
-m4trace:configure.in:11: -1- m4_pattern_allow([^CC$])
-m4trace:configure.in:11: -1- AC_SUBST([CC])
-m4trace:configure.in:11: -1- AC_SUBST_TRACE([CC])
-m4trace:configure.in:11: -1- m4_pattern_allow([^CC$])
-m4trace:configure.in:11: -1- AC_SUBST([ac_ct_CC])
-m4trace:configure.in:11: -1- AC_SUBST_TRACE([ac_ct_CC])
-m4trace:configure.in:11: -1- m4_pattern_allow([^ac_ct_CC$])
-m4trace:configure.in:19: -1- AC_SUBST([CPP])
-m4trace:configure.in:19: -1- AC_SUBST_TRACE([CPP])
-m4trace:configure.in:19: -1- m4_pattern_allow([^CPP$])
-m4trace:configure.in:19: -1- AC_SUBST([CPPFLAGS])
-m4trace:configure.in:19: -1- AC_SUBST_TRACE([CPPFLAGS])
-m4trace:configure.in:19: -1- m4_pattern_allow([^CPPFLAGS$])
-m4trace:configure.in:19: -1- AC_SUBST([CPP])
-m4trace:configure.in:19: -1- AC_SUBST_TRACE([CPP])
-m4trace:configure.in:19: -1- m4_pattern_allow([^CPP$])
-m4trace:configure.in:19: -1- AC_SUBST([GREP])
-m4trace:configure.in:19: -1- AC_SUBST_TRACE([GREP])
-m4trace:configure.in:19: -1- m4_pattern_allow([^GREP$])
-m4trace:configure.in:19: -1- AC_SUBST([EGREP])
-m4trace:configure.in:19: -1- AC_SUBST_TRACE([EGREP])
-m4trace:configure.in:19: -1- m4_pattern_allow([^EGREP$])
-m4trace:configure.in:19: -1- AC_DEFINE_TRACE_LITERAL([STDC_HEADERS])
-m4trace:configure.in:19: -1- m4_pattern_allow([^STDC_HEADERS$])
-m4trace:configure.in:19: -1- AH_OUTPUT([STDC_HEADERS], [/* Define to 1 if you have the ANSI C header files. */
-@%:@undef STDC_HEADERS])
-m4trace:configure.in:19: -1- AH_OUTPUT([HAVE_SYS_TYPES_H], [/* Define to 1 if you have the <sys/types.h> header file. */
-@%:@undef HAVE_SYS_TYPES_H])
-m4trace:configure.in:19: -1- AH_OUTPUT([HAVE_SYS_STAT_H], [/* Define to 1 if you have the <sys/stat.h> header file. */
-@%:@undef HAVE_SYS_STAT_H])
-m4trace:configure.in:19: -1- AH_OUTPUT([HAVE_STDLIB_H], [/* Define to 1 if you have the <stdlib.h> header file. */
-@%:@undef HAVE_STDLIB_H])
-m4trace:configure.in:19: -1- AH_OUTPUT([HAVE_STRING_H], [/* Define to 1 if you have the <string.h> header file. */
-@%:@undef HAVE_STRING_H])
-m4trace:configure.in:19: -1- AH_OUTPUT([HAVE_MEMORY_H], [/* Define to 1 if you have the <memory.h> header file. */
-@%:@undef HAVE_MEMORY_H])
-m4trace:configure.in:19: -1- AH_OUTPUT([HAVE_STRINGS_H], [/* Define to 1 if you have the <strings.h> header file. */
-@%:@undef HAVE_STRINGS_H])
-m4trace:configure.in:19: -1- AH_OUTPUT([HAVE_INTTYPES_H], [/* Define to 1 if you have the <inttypes.h> header file. */
-@%:@undef HAVE_INTTYPES_H])
-m4trace:configure.in:19: -1- AH_OUTPUT([HAVE_STDINT_H], [/* Define to 1 if you have the <stdint.h> header file. */
-@%:@undef HAVE_STDINT_H])
-m4trace:configure.in:19: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the <unistd.h> header file. */
-@%:@undef HAVE_UNISTD_H])
-m4trace:configure.in:19: -1- AC_DEFINE_TRACE_LITERAL([HAVE__BOOL])
-m4trace:configure.in:19: -1- m4_pattern_allow([^HAVE__BOOL$])
-m4trace:configure.in:19: -1- AH_OUTPUT([HAVE__BOOL], [/* Define to 1 if the system has the type `_Bool\'. */
-@%:@undef HAVE__BOOL])
-m4trace:configure.in:19: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STDBOOL_H])
-m4trace:configure.in:19: -1- m4_pattern_allow([^HAVE_STDBOOL_H$])
-m4trace:configure.in:19: -1- AH_OUTPUT([HAVE_STDBOOL_H], [/* Define to 1 if stdbool.h conforms to C99. */
-@%:@undef HAVE_STDBOOL_H])
-m4trace:configure.in:20: -1- AH_OUTPUT([inline], [/* Define to `__inline__\' or `__inline\' if that\'s what the C compiler
+m4trace:configure.in:11: -1- AC_SUBST([CXX])
+m4trace:configure.in:11: -1- AC_SUBST_TRACE([CXX])
+m4trace:configure.in:11: -1- m4_pattern_allow([^CXX$])
+m4trace:configure.in:11: -1- AC_SUBST([ac_ct_CXX])
+m4trace:configure.in:11: -1- AC_SUBST_TRACE([ac_ct_CXX])
+m4trace:configure.in:11: -1- m4_pattern_allow([^ac_ct_CXX$])
+m4trace:configure.in:11: -1- AC_SUBST([EXEEXT], [$ac_cv_exeext])
+m4trace:configure.in:11: -1- AC_SUBST_TRACE([EXEEXT])
+m4trace:configure.in:11: -1- m4_pattern_allow([^EXEEXT$])
+m4trace:configure.in:11: -1- AC_SUBST([OBJEXT], [$ac_cv_objext])
+m4trace:configure.in:11: -1- AC_SUBST_TRACE([OBJEXT])
+m4trace:configure.in:11: -1- m4_pattern_allow([^OBJEXT$])
+m4trace:configure.in:11: -1- AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])
+m4trace:configure.in:11: -1- AC_SUBST_TRACE([DEPDIR])
+m4trace:configure.in:11: -1- m4_pattern_allow([^DEPDIR$])
+m4trace:configure.in:11: -1- AC_SUBST([am__include])
+m4trace:configure.in:11: -1- AC_SUBST_TRACE([am__include])
+m4trace:configure.in:11: -1- m4_pattern_allow([^am__include$])
+m4trace:configure.in:11: -1- AC_SUBST([am__quote])
+m4trace:configure.in:11: -1- AC_SUBST_TRACE([am__quote])
+m4trace:configure.in:11: -1- m4_pattern_allow([^am__quote$])
+m4trace:configure.in:11: -1- AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+m4trace:configure.in:11: -1- AC_SUBST([AMDEP_TRUE])
+m4trace:configure.in:11: -1- AC_SUBST_TRACE([AMDEP_TRUE])
+m4trace:configure.in:11: -1- m4_pattern_allow([^AMDEP_TRUE$])
+m4trace:configure.in:11: -1- AC_SUBST([AMDEP_FALSE])
+m4trace:configure.in:11: -1- AC_SUBST_TRACE([AMDEP_FALSE])
+m4trace:configure.in:11: -1- m4_pattern_allow([^AMDEP_FALSE$])
+m4trace:configure.in:11: -1- _AM_SUBST_NOTMAKE([AMDEP_TRUE])
+m4trace:configure.in:11: -1- _AM_SUBST_NOTMAKE([AMDEP_FALSE])
+m4trace:configure.in:11: -1- AC_SUBST([AMDEPBACKSLASH])
+m4trace:configure.in:11: -1- AC_SUBST_TRACE([AMDEPBACKSLASH])
+m4trace:configure.in:11: -1- m4_pattern_allow([^AMDEPBACKSLASH$])
+m4trace:configure.in:11: -1- _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])
+m4trace:configure.in:11: -1- AC_SUBST([CXXDEPMODE], [depmode=$am_cv_CXX_dependencies_compiler_type])
+m4trace:configure.in:11: -1- AC_SUBST_TRACE([CXXDEPMODE])
+m4trace:configure.in:11: -1- m4_pattern_allow([^CXXDEPMODE$])
+m4trace:configure.in:11: -1- AM_CONDITIONAL([am__fastdepCXX], [
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_CXX_dependencies_compiler_type" = gcc3])
+m4trace:configure.in:11: -1- AC_SUBST([am__fastdepCXX_TRUE])
+m4trace:configure.in:11: -1- AC_SUBST_TRACE([am__fastdepCXX_TRUE])
+m4trace:configure.in:11: -1- m4_pattern_allow([^am__fastdepCXX_TRUE$])
+m4trace:configure.in:11: -1- AC_SUBST([am__fastdepCXX_FALSE])
+m4trace:configure.in:11: -1- AC_SUBST_TRACE([am__fastdepCXX_FALSE])
+m4trace:configure.in:11: -1- m4_pattern_allow([^am__fastdepCXX_FALSE$])
+m4trace:configure.in:11: -1- _AM_SUBST_NOTMAKE([am__fastdepCXX_TRUE])
+m4trace:configure.in:11: -1- _AM_SUBST_NOTMAKE([am__fastdepCXX_FALSE])
+m4trace:configure.in:12: -1- AC_SUBST([CC])
+m4trace:configure.in:12: -1- AC_SUBST_TRACE([CC])
+m4trace:configure.in:12: -1- m4_pattern_allow([^CC$])
+m4trace:configure.in:12: -1- AC_SUBST([CFLAGS])
+m4trace:configure.in:12: -1- AC_SUBST_TRACE([CFLAGS])
+m4trace:configure.in:12: -1- m4_pattern_allow([^CFLAGS$])
+m4trace:configure.in:12: -1- AC_SUBST([LDFLAGS])
+m4trace:configure.in:12: -1- AC_SUBST_TRACE([LDFLAGS])
+m4trace:configure.in:12: -1- m4_pattern_allow([^LDFLAGS$])
+m4trace:configure.in:12: -1- AC_SUBST([LIBS])
+m4trace:configure.in:12: -1- AC_SUBST_TRACE([LIBS])
+m4trace:configure.in:12: -1- m4_pattern_allow([^LIBS$])
+m4trace:configure.in:12: -1- AC_SUBST([CPPFLAGS])
+m4trace:configure.in:12: -1- AC_SUBST_TRACE([CPPFLAGS])
+m4trace:configure.in:12: -1- m4_pattern_allow([^CPPFLAGS$])
+m4trace:configure.in:12: -1- AC_SUBST([CC])
+m4trace:configure.in:12: -1- AC_SUBST_TRACE([CC])
+m4trace:configure.in:12: -1- m4_pattern_allow([^CC$])
+m4trace:configure.in:12: -1- AC_SUBST([CC])
+m4trace:configure.in:12: -1- AC_SUBST_TRACE([CC])
+m4trace:configure.in:12: -1- m4_pattern_allow([^CC$])
+m4trace:configure.in:12: -1- AC_SUBST([CC])
+m4trace:configure.in:12: -1- AC_SUBST_TRACE([CC])
+m4trace:configure.in:12: -1- m4_pattern_allow([^CC$])
+m4trace:configure.in:12: -1- AC_SUBST([CC])
+m4trace:configure.in:12: -1- AC_SUBST_TRACE([CC])
+m4trace:configure.in:12: -1- m4_pattern_allow([^CC$])
+m4trace:configure.in:12: -1- AC_SUBST([ac_ct_CC])
+m4trace:configure.in:12: -1- AC_SUBST_TRACE([ac_ct_CC])
+m4trace:configure.in:12: -1- m4_pattern_allow([^ac_ct_CC$])
+m4trace:configure.in:12: -1- AC_SUBST([CCDEPMODE], [depmode=$am_cv_CC_dependencies_compiler_type])
+m4trace:configure.in:12: -1- AC_SUBST_TRACE([CCDEPMODE])
+m4trace:configure.in:12: -1- m4_pattern_allow([^CCDEPMODE$])
+m4trace:configure.in:12: -1- AM_CONDITIONAL([am__fastdepCC], [
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_CC_dependencies_compiler_type" = gcc3])
+m4trace:configure.in:12: -1- AC_SUBST([am__fastdepCC_TRUE])
+m4trace:configure.in:12: -1- AC_SUBST_TRACE([am__fastdepCC_TRUE])
+m4trace:configure.in:12: -1- m4_pattern_allow([^am__fastdepCC_TRUE$])
+m4trace:configure.in:12: -1- AC_SUBST([am__fastdepCC_FALSE])
+m4trace:configure.in:12: -1- AC_SUBST_TRACE([am__fastdepCC_FALSE])
+m4trace:configure.in:12: -1- m4_pattern_allow([^am__fastdepCC_FALSE$])
+m4trace:configure.in:12: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_TRUE])
+m4trace:configure.in:12: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_FALSE])
+m4trace:configure.in:20: -1- AC_SUBST([CPP])
+m4trace:configure.in:20: -1- AC_SUBST_TRACE([CPP])
+m4trace:configure.in:20: -1- m4_pattern_allow([^CPP$])
+m4trace:configure.in:20: -1- AC_SUBST([CPPFLAGS])
+m4trace:configure.in:20: -1- AC_SUBST_TRACE([CPPFLAGS])
+m4trace:configure.in:20: -1- m4_pattern_allow([^CPPFLAGS$])
+m4trace:configure.in:20: -1- AC_SUBST([CPP])
+m4trace:configure.in:20: -1- AC_SUBST_TRACE([CPP])
+m4trace:configure.in:20: -1- m4_pattern_allow([^CPP$])
+m4trace:configure.in:20: -1- AC_SUBST([GREP])
+m4trace:configure.in:20: -1- AC_SUBST_TRACE([GREP])
+m4trace:configure.in:20: -1- m4_pattern_allow([^GREP$])
+m4trace:configure.in:20: -1- AC_SUBST([EGREP])
+m4trace:configure.in:20: -1- AC_SUBST_TRACE([EGREP])
+m4trace:configure.in:20: -1- m4_pattern_allow([^EGREP$])
+m4trace:configure.in:20: -1- AC_DEFINE_TRACE_LITERAL([STDC_HEADERS])
+m4trace:configure.in:20: -1- m4_pattern_allow([^STDC_HEADERS$])
+m4trace:configure.in:20: -1- AH_OUTPUT([STDC_HEADERS], [/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS])
+m4trace:configure.in:20: -1- AH_OUTPUT([HAVE_SYS_TYPES_H], [/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H])
+m4trace:configure.in:20: -1- AH_OUTPUT([HAVE_SYS_STAT_H], [/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H])
+m4trace:configure.in:20: -1- AH_OUTPUT([HAVE_STDLIB_H], [/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H])
+m4trace:configure.in:20: -1- AH_OUTPUT([HAVE_STRING_H], [/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H])
+m4trace:configure.in:20: -1- AH_OUTPUT([HAVE_MEMORY_H], [/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H])
+m4trace:configure.in:20: -1- AH_OUTPUT([HAVE_STRINGS_H], [/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H])
+m4trace:configure.in:20: -1- AH_OUTPUT([HAVE_INTTYPES_H], [/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H])
+m4trace:configure.in:20: -1- AH_OUTPUT([HAVE_STDINT_H], [/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H])
+m4trace:configure.in:20: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H])
+m4trace:configure.in:20: -1- AC_DEFINE_TRACE_LITERAL([HAVE__BOOL])
+m4trace:configure.in:20: -1- m4_pattern_allow([^HAVE__BOOL$])
+m4trace:configure.in:20: -1- AH_OUTPUT([HAVE__BOOL], [/* Define to 1 if the system has the type `_Bool\'. */
+#undef HAVE__BOOL])
+m4trace:configure.in:20: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STDBOOL_H])
+m4trace:configure.in:20: -1- m4_pattern_allow([^HAVE_STDBOOL_H$])
+m4trace:configure.in:20: -1- AH_OUTPUT([HAVE_STDBOOL_H], [/* Define to 1 if stdbool.h conforms to C99. */
+#undef HAVE_STDBOOL_H])
+m4trace:configure.in:21: -1- AH_OUTPUT([inline], [/* Define to `__inline__\' or `__inline\' if that\'s what the C compiler
    calls it, or to nothing if \'inline\' is not supported under any name.  */
 #ifndef __cplusplus
 #undef inline
 #endif])
-m4trace:configure.in:21: -1- AC_DEFINE_TRACE_LITERAL([size_t])
-m4trace:configure.in:21: -1- m4_pattern_allow([^size_t$])
-m4trace:configure.in:21: -1- AH_OUTPUT([size_t], [/* Define to `unsigned int\' if <sys/types.h> does not define. */
-@%:@undef size_t])
-m4trace:configure.in:25: -1- AC_CONFIG_FILES([Makefile
-                 src/Rakefile
-                 test/Rakefile
-                 test/Makefile])
-m4trace:configure.in:29: -1- AC_SUBST([LIB@&t@OBJS], [$ac_libobjs])
-m4trace:configure.in:29: -1- AC_SUBST_TRACE([LIB@&t@OBJS])
-m4trace:configure.in:29: -1- m4_pattern_allow([^LIB@&t@OBJS$])
-m4trace:configure.in:29: -1- AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs])
-m4trace:configure.in:29: -1- AC_SUBST_TRACE([LTLIBOBJS])
-m4trace:configure.in:29: -1- m4_pattern_allow([^LTLIBOBJS$])
-m4trace:configure.in:29: -1- AC_SUBST_TRACE([top_builddir])
-m4trace:configure.in:29: -1- AC_SUBST_TRACE([top_build_prefix])
-m4trace:configure.in:29: -1- AC_SUBST_TRACE([srcdir])
-m4trace:configure.in:29: -1- AC_SUBST_TRACE([abs_srcdir])
-m4trace:configure.in:29: -1- AC_SUBST_TRACE([top_srcdir])
-m4trace:configure.in:29: -1- AC_SUBST_TRACE([abs_top_srcdir])
-m4trace:configure.in:29: -1- AC_SUBST_TRACE([builddir])
-m4trace:configure.in:29: -1- AC_SUBST_TRACE([abs_builddir])
-m4trace:configure.in:29: -1- AC_SUBST_TRACE([abs_top_builddir])
+m4trace:configure.in:22: -1- AC_DEFINE_TRACE_LITERAL([size_t])
+m4trace:configure.in:22: -1- m4_pattern_allow([^size_t$])
+m4trace:configure.in:22: -1- AH_OUTPUT([size_t], [/* Define to `unsigned int\' if <sys/types.h> does not define. */
+#undef size_t])
+m4trace:configure.in:26: -1- AC_CONFIG_FILES([Makefile
+                 Rakefile])
+m4trace:configure.in:28: -1- AC_SUBST([LIB@&t@OBJS], [$ac_libobjs])
+m4trace:configure.in:28: -1- AC_SUBST_TRACE([LIB@&t@OBJS])
+m4trace:configure.in:28: -1- m4_pattern_allow([^LIB@&t@OBJS$])
+m4trace:configure.in:28: -1- AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs])
+m4trace:configure.in:28: -1- AC_SUBST_TRACE([LTLIBOBJS])
+m4trace:configure.in:28: -1- m4_pattern_allow([^LTLIBOBJS$])
+m4trace:configure.in:28: -1- AC_SUBST_TRACE([top_builddir])
+m4trace:configure.in:28: -1- AC_SUBST_TRACE([top_build_prefix])
+m4trace:configure.in:28: -1- AC_SUBST_TRACE([srcdir])
+m4trace:configure.in:28: -1- AC_SUBST_TRACE([abs_srcdir])
+m4trace:configure.in:28: -1- AC_SUBST_TRACE([top_srcdir])
+m4trace:configure.in:28: -1- AC_SUBST_TRACE([abs_top_srcdir])
+m4trace:configure.in:28: -1- AC_SUBST_TRACE([builddir])
+m4trace:configure.in:28: -1- AC_SUBST_TRACE([abs_builddir])
+m4trace:configure.in:28: -1- AC_SUBST_TRACE([abs_top_builddir])
+m4trace:configure.in:28: -1- AC_SUBST_TRACE([INSTALL])
+m4trace:configure.in:28: -1- AC_SUBST_TRACE([MKDIR_P])
index dc7ea40..34ea0ab 100644 (file)
@@ -12,9 +12,9 @@ generated by GNU Autoconf 2.63.  Invocation command line was
 
 hostname = vaio_z
 uname -m = i686
-uname -r = 2.6.31-gentoo-r6
+uname -r = 2.6.32-gentoo-r1
 uname -s = Linux
-uname -v = #5 SMP Sat Jan 2 13:44:04 JST 2010
+uname -v = #2 SMP Wed Jan 13 20:45:37 JST 2010
 
 /usr/bin/uname -p = Intel(R) Core(TM)2 Duo CPU P8800 @ 2.66GHz
 /bin/uname -X     = unknown
index 417e5d5..c002ae2 100755 (executable)
@@ -40,7 +40,7 @@ class less_than_comparable {
 
   // operator >= を定義します。
   friend bool operator>=(const T& lhs, const T& rhs) {
-    return !lhs.operator<(lhs);
+    return !lhs.operator<(rhs);
   }
 };
 
index 92816df..055be54 100644 (file)
@@ -96,6 +96,8 @@ struct range_iterator<const T[N]> {
 // ・for_each
 // ・transform
 // ・copy
+// ・find_if
+// ・find_if_not
 
 // 渡されたコンテナの全要素を対象として、引数を一つだけ取るpredを適用します。
 // 適用後、利用されたpredを返します。
index efc1320..2888de6 100755 (executable)
@@ -17,6 +17,7 @@
 #ifndef _UTAKATA_LIB_SMART_PTR_H_
 #define _UTAKATA_LIB_SMART_PTR_H_
 
+#include <iostream>
 #include "lib/ref_delete.h"
 
 namespace akebono {
index 331e937..10519bc 100755 (executable)
@@ -1,4 +1,3 @@
-#include <iostream>
 #include "src/lexeme.h"
 #include "src/unicode.h"
 
@@ -11,12 +10,12 @@ lexer::Lexeme::Lexeme(const unicode::UniString& lexeme_str,
       type_(type) {}
 
 lexer::Lexeme::Lexeme(const lexer::Lexeme& rh)
-    : string_(new unicode::UniString(*rh.string_)),
+    : string_(rh.string_),
       type_(rh.type_) {}
 
 lexer::Lexeme& lexer::Lexeme::operator=(const lexer::Lexeme& rh) {
   lexer::Lexeme tmp(rh);
-  string_.reset(new unicode::UniString(*tmp.string_));
+  string_ = tmp.string_;
   type_ = tmp.type_;
   return *this;
 }
index 796ca9f..f464ae5 100755 (executable)
@@ -5,13 +5,13 @@
 #ifndef _DEVELOP_UTAKATA_SRC_LEXEME_H_
 #define _DEVELOP_UTAKATA_SRC_LEXEME_H_
 
-#include "lib/scoped_ptr.h"
+#include "lib/smart_ptr.h"
 
 namespace utakata {
 
 namespace unicode {
 class UniString;
-};
+}
 
 namespace lexer {
 
@@ -60,12 +60,12 @@ class Lexeme {
 
  private:
   // lexemeを表す文字列です。
-  akebono::scoped_ptr<unicode::UniString> string_;
+  akebono::smart_ptr<unicode::UniString> string_;
 
   // lexemeの型を表すEnum値です。
   LexemeType type_;
 };
-};
-};
+}
+}
 
 #endif /* _DEVELOP_UTAKATA_SRC_LEXEME_H_ */
diff --git a/src/lexer/boolean_lexer.cpp b/src/lexer/boolean_lexer.cpp
new file mode 100755 (executable)
index 0000000..069564e
--- /dev/null
@@ -0,0 +1,35 @@
+#include <algorithm>
+
+#include "src/encoding_reader.h"
+#include "src/exception_macro.h"
+#include "src/lexeme.h"
+#include "src/lexer/boolean_lexer.h"
+#include "src/lexer/term_lexer.h"
+#include "src/lexer/term_checker.h"
+#include "src/unicode.h"
+
+namespace lexer = utakata::lexer;
+namespace term = utakata::lexer::term;
+namespace unicode = utakata::unicode;
+namespace reader = utakata::reader;
+
+// 宣言のコメントを参照してください。
+lexer::Lexeme* lexer::BooleanLexer::Lex(reader::EncodingReader* reader) {
+
+  lexer::TermLexer<term::Boolean> boolean;
+  if (!boolean.CheckToken(reader)) {
+    return NULL;
+  }
+
+  unicode::UniString str(unicode::Convert(
+      reader->Read(boolean.ReadToken(reader))));
+
+  lexer::TermLexer<term::Delimiter> std_delimiter;
+  if (!reader->IsEof() && !std_delimiter.CheckToken(reader)) {
+    unicode::UniString except_message("not boolean delimiters : ");
+    except_message.Append(str);
+    THROW_EXCEPTION_(lexer::LexException, except_message);
+  }
+
+  return new lexer::Lexeme(str, lexer::Lexeme::kBoolean);
+}
diff --git a/src/lexer/boolean_lexer.h b/src/lexer/boolean_lexer.h
new file mode 100755 (executable)
index 0000000..680748e
--- /dev/null
@@ -0,0 +1,48 @@
+// Scheme構文におけるboolean値の字句を解析します。
+// ここで定義されるLexerは、IPartOfLexerから派生しており、以下の条件
+// をもってLexerDispatcherからディスパッチします。
+// #t #T #f #F のいずれか
+#ifndef _DEVELOP_UTAKATA_SRC_LEXER_BOOLEAN_LEXER_H_
+#define _DEVELOP_UTAKATA_SRC_LEXER_BOOLEAN_LEXER_H_
+
+#include "src/lexer/lexer_interface.h"
+
+namespace utakata {
+namespace unicode {
+class UniString;
+}
+
+namespace reader {
+class EncodingReader;
+}
+
+namespace lexer {
+class Lexeme;
+
+// Scheme構文におけるboolean値の字句解析を行います。
+// Scheme構文におけるbooleanリテラルは以下の通りです。
+//   #t #T #f #F
+// 必ず、boolean値の末尾はデリミタ、もしくはファイルの終端でなればなりません。
+class BooleanLexer : public IPartOfLexer {
+ public:
+  // 読出しストリームへのポインタを受け取って、結果として生成した
+  // Lexemeクラスを返します。
+  // booleanのの字句として異常である文字列であった場合、LexException例外が
+  // 送出されます。
+  virtual Lexeme* Lex(reader::EncodingReader* reader);
+};
+
+class BooleanLexerFactory : public ILexerCreator {
+  // BooleanLexerをIPartOfLexerとして生成するファクトリです。
+ public:
+  BooleanLexerFactory() {}
+  virtual ~BooleanLexerFactory() {}
+
+  // ChractorLexerを新たに割り当てて返します。
+  // 返されたインスタンスは、取得側で開放する必要があります。
+  virtual IPartOfLexer* Create() const {return new BooleanLexer();}
+};
+}
+}
+
+#endif /* _DEVELOP_UTAKATA_SRC_LEXER_BOOLEAN_LEXER_H_ */
index 5e4f447..aa946b7 100755 (executable)
@@ -38,7 +38,7 @@ DEFINE_CHARACTOR_SPEC_(kDelete, "delete", 0x007F);
 
 // 宣言のコメントを参照してください。
 bool lexer::CharactorNameLexer::Lex(const unicode::UniString& string,
-                                unsigned int* value) {
+                                    unsigned int* value) {
   InitializeCharactorMap();
   std::map<unicode::UniString, int>::iterator find_result =
       charactor_map_.find(string);
@@ -77,13 +77,11 @@ lexer::Lexeme* lexer::CharactorLexer::Lex(reader::EncodingReader* reader) {
   }
   reader->Read(2);
 
-  unicode::UniString str(unicode::UniChar(reader->Read()), 1);
-  term::StarndardDelimiterChecker std_delimiter;
+  unicode::UniString str;
+  lexer::TermLexer<term::Delimiter> std_delimiter;
 
   while (!reader->IsEof()) {
-    unicode::UniChar tmp(reader->Peek());
-
-    if (std_delimiter(tmp)) {
+    if (std_delimiter.CheckToken(reader)) {
       break;
     }
     str.Append(unicode::UniChar(reader->Read()));
diff --git a/src/lexer/identifier_lexer.cpp b/src/lexer/identifier_lexer.cpp
new file mode 100755 (executable)
index 0000000..01c53b2
--- /dev/null
@@ -0,0 +1,145 @@
+#include "src/exception_macro.h"
+#include "src/lexer/identifier_lexer.h"
+#include "src/lexer/term_lexer.h"
+#include "src/lexer/term_checker.h"
+#include "src/lexer/inline_hex_escape_lexer.h"
+#include "src/lexeme.h"
+#include "src/encoding_reader.h"
+#include "src/unicode.h"
+
+namespace lexer = utakata::lexer;
+namespace term = utakata::lexer::term;
+namespace reader = utakata::reader;
+namespace unicode = utakata::unicode;
+
+// 宣言のコメントを参照してください。
+bool lexer::detail::SubsequenceLexer::Lex(reader::EncodingReader* reader,
+                                          unicode::UniString* code) {
+  lexer::TermLexer<term::Digit> digit;
+  lexer::TermLexer<term::SpecialSubsequent> special_subs;
+
+  if (InitialLexer().Lex(reader, code)) {
+    return true;
+
+  } else if (digit.CheckToken(reader)) {
+    code->Append(unicode::UniChar(reader->Read()));
+    return true;
+
+  } else if (special_subs.CheckToken(reader)) {
+    code->Append(unicode::UniChar(reader->Read()));
+    return true;
+  }
+
+  return false;
+}
+
+// 宣言のコメントを参照してください。
+bool lexer::detail::InitialLexer::Lex(reader::EncodingReader* reader,
+                                      unicode::UniString* code) {
+  lexer::TermLexer<term::SpecialInitial> special_initial;
+
+  if (special_initial.CheckToken(reader)) {
+    code->Append(unicode::UniChar(reader->Read()));
+    return true;
+
+  } else if (ConstituentLexer().Lex(reader, code)) {
+    return true;
+
+  } else {
+    unsigned int escape_code = 0;
+    if (lexer::InlineHexEscapeLexer().Lex(reader, &escape_code)) {
+      code->Append(unicode::UniChar(escape_code));
+      return true;
+    }
+  }
+
+  return false;
+}
+
+// 宣言のコメントを参照してください。
+bool lexer::detail::ConstituentLexer::Lex(reader::EncodingReader* reader,
+                                          unicode::UniString* code) {
+  lexer::TermLexer<term::Letter> letter;
+  if (letter.CheckToken(reader)) {
+    code->Append(unicode::UniChar(reader->Read()));
+    return true;
+  }
+  return false;
+}
+
+// 宣言のコメントを参照してください。
+bool lexer::detail::PeculiarIdentifierLexer::Lex(reader::EncodingReader* reader,
+                                                 unicode::UniString* code) {
+  lexer::TermLexer<term::PeculiarIdentifier> peculiar_ident;
+  if (!peculiar_ident.CheckToken(reader)) {
+    return false;
+  }
+
+  code->Append(unicode::Convert(reader->Read(
+      peculiar_ident.ReadToken(reader))));
+
+  if (*code == unicode::Convert("->")) {
+    lexer::TermLexer<term::Delimiter> delim;
+    lexer::detail::SubsequenceLexer subseq;
+
+    while (!reader->IsEof()) {
+      if (delim.CheckToken(reader)) {
+        break;
+      }
+
+      if (!subseq.Lex(reader, code)) {
+        unicode::UniString converted_string(
+            unicode::Convert("this charactor is not use to identifier `"));
+        converted_string.Append(unicode::UniChar(reader->Peek()));
+        converted_string.Append(unicode::Convert("`"));
+        THROW_EXCEPTION_(lexer::LexException, converted_string);
+      }
+    }
+  } else {
+    lexer::TermLexer<term::Delimiter> delim;
+    if (!delim.CheckToken(reader)) {
+      unicode::UniString converted_string(
+          unicode::Convert("identifier `"));
+      converted_string.Append(unicode::UniChar(reader->Peek()));
+      converted_string.Append(unicode::Convert("`"));
+      converted_string.Append(unicode::Convert(
+          " is must have delimiter after"));
+      THROW_EXCEPTION_(lexer::LexException, converted_string);
+    }
+  }
+
+  return true;
+}
+
+// 宣言のコメントを参照してください。
+lexer::Lexeme* lexer::IdentifierLexer::Lex(reader::EncodingReader* reader) {
+  lexer::detail::PeculiarIdentifierLexer peculiar_ident;
+  lexer::detail::InitialLexer initial;
+
+  unicode::UniString identifier;
+  if (peculiar_ident.Lex(reader, &identifier)) {
+      return new lexer::Lexeme(identifier, lexer::Lexeme::kIdentifier);
+  } else {
+    if (!initial.Lex(reader, &identifier)) {
+      return false;
+    }
+
+    lexer::detail::SubsequenceLexer subseq;
+    lexer::TermLexer<term::Delimiter> delim;
+    while (!reader->IsEof()) {
+      if (delim.CheckToken(reader)) {
+        break;
+      }
+
+      if (!subseq.Lex(reader, &identifier)) {
+        unicode::UniString converted_string(
+            unicode::Convert("this charactor is not use to identifier `"));
+        converted_string.Append(unicode::UniChar(reader->Peek()));
+        converted_string.Append(unicode::Convert("`"));
+        THROW_EXCEPTION_(lexer::LexException, converted_string);
+      }
+    }
+  }
+
+  return new lexer::Lexeme(identifier, lexer::Lexeme::kIdentifier);
+}
index eb005f1..2083392 100755 (executable)
@@ -1,10 +1,11 @@
-// Scheme構文におけるidentityの解釈を行うlexerを定義します。
-// ここで定義されるLexerは、IPartsOfLexerから派生しており、以下の条件
-// をもってLexerDispatcherからディスパッチします。
-// :検索対象文字列の先頭 = <identifier> の場合:
+// Scheme構文における識別子を判別するLexerを定義します。
+// ここで定義されるLexerは、IPartOfLexerから派生しており、字句要素
+// Lexemeを返却します。
 #ifndef _UTAKATA_SRC_LEXER_IDENTIFIER_LEXER_H_
 #define _UTAKATA_SRC_LEXER_IDENTIFIER_LEXER_H_
 
+
+#include <map>
 #include "src/lexer/lexer_interface.h"
 
 namespace utakata {
@@ -20,52 +21,73 @@ class EncodingReader;
 namespace lexer {
 class Lexeme;
 
-class IdentifierDispatchTerm {
+namespace detail {
+class SubsequenceLexer {
+  // <subsequent>を解釈するLexerです。IPartOfLexerから継承していないため、
+  // 内部利用が行われます。
+  // <subsequent>の構文定義は以下になります。
+  // <initial> | <digit>
+  // | <any character whose category is Nd, Mc, or Me>
+  // | <special subsequent>
+ public:
+  bool Lex(reader::EncodingReader* reader, unicode::UniString* code);
+};
+
+class InitialLexer {
+  // <initial>を解釈するLexerです。
+  // <initial>は、以下のBNFに一致する非終端記号です。
+  // <constituent> | <special initial> | <inline hex escape>
+ public:
+  // Initialとなる文字列を読み出して、codeに追加します。
+  // Initialとなる文字列が読み出された場合、trueを返します。
+  bool Lex(reader::EncodingReader* reader, unicode::UniString* code);
+};
+
+class ConstituentLexer {
+  // <constituent>を解釈するLexerです。具体的には、アルファベットと
+  // Unicodeの特定の文字集合に一致する文字をチェックします。
  public:
-  IdentifierDispatchTerm() {}
-  virtual ~IdentifierDispatchTerm() {}
+  // <letter>、及び当該のUnicodeカテゴリの文字である場合、
+  // codeに文字を追加し、trueを返します。
+  // 当該文字ではない場合、codeは更新されません。
+  bool Lex(reader::EncodingReader* reader, unicode::UniString* code);
+};
 
-  // ディスパッチを行うかどうかを判定します。
-  virtual bool IsDispatch(const unicode::UniString& string) const;
+class PeculiarIdentifierLexer {
+  // <peculiar identifier>を解釈する内部Lexerです。
+  // <peculiar identifier>は、以下のBNFで定義されます。
+  // + | - | ... | -> <subsequent>*
+ public:
+  // 与えられたreaderから、<peculiar identifier>に相当する文字列を
+  // 読出し、文字列をcodeに設定して返します。
+  // readerの先頭が<peculiar identifier>に該当しない場合、falseが返されます。
+  bool Lex(reader::EncodingReader* reader, unicode::UniString* code);
 };
+}
 
-class IdentifierLexer : public IPartsOfLexer {
-  // Scheme構文における識別子のチェックを行います。
-  // Scheme構文における識別子は、以下の形式を取ります。
-  // ・先頭が次のいずれかである。
-  //   !  $  %  &  *  /  :  <  =  >  ?  ^  _  ~ ->
-  // ・識別子全体が以下である。
-  //   + - ...
-  // ・先頭に続けた、デリミタ以外のunicode及びinline hex escapeを含めた
-  //   文字。
-  // inline hex escape は \x<hex>;の形式を取ります。
-  // inline hex escapeについては、inline_hex_escape_lexer.h において定義
-  // されているInlineHexEscapeLexerを参照してください。
+class IdentifierLexer : public IPartOfLexer {
+  // ストリームより識別子の構文を読出し、識別子に該当する
+  // 文字列を返却を行います。
+  // 識別子の構文については、複雑なので構文定義を参照してください。
  public:
 
   IdentifierLexer() {}
   virtual ~IdentifierLexer() {}
 
   // 読出しストリームへのポインタを受け取って、結果として生成した
-  // ILexemeインターフェースの派生クラスを返します。
-  virtual Lexeme* Lex(const unicode::UniString& string,
-                               reader::EncodingReader* reader);
-
-  // このIPartOfLexerへとDispatchする条件を記載したDispatchTermを作成して
-  // 返します。返されたポインタは、取得側で削除する必要があります。
-  // 返された値の保持については、akebono::scoped_ptrの利用を推奨します。
-  virtual ILexerDispatchTerm* GetTerm() const;
+  // Lexemeのポインタを返します。
+  // 文字列の字句では無い場合、NULLが返却されます。
+  virtual Lexeme* Lex(reader::EncodingReader* reader);
 };
 
-class IdentifierLexerFactory : public ILexerFactory {
-  // IdentifierLexerをIPartsOfLexerとして生成するファクトリです。
+class IdentifierLexerFactory : public ILexerCreator {
+  // IdentifierLexerをIPartOfLexerのポインタで返すファクトリです。
+  // このファクトリは、Lexerから利用されることが想定されています。
  public:
-  IdentifierLexerFactory() {}
-  virtual ~IdentifierLexerFactory() {}
-
-  // ChractorLexerを新たに割り当てて返します。
+  // IdentifierLexerを生成して返します。
   // 返されたインスタンスは、取得側で開放する必要があります。
-  virtual IPartsOfLexer* Create() const {return new IdentifierLexer();}
+  virtual IPartOfLexer* Create() const {return new IdentifierLexer();}
 };
 }
 }
index 3bb5860..7aa0640 100755 (executable)
@@ -17,21 +17,23 @@ namespace unicode = utakata::unicode;
 // 宣言のコメントを参照してください。
 bool lexer::InlineHexEscapeLexer::Lex(reader::EncodingReader* reader,
                                     unsigned int* result) {
-  unicode::UniString prefix(reader->Peek(2));
+  unicode::UniString prefix(unicode::Convert(reader->Peek(2)));
 
   if (prefix != unicode::Convert("\\x")) {
     return false;
   }
 
+  reader->Read(2);
   unicode::UniString hex_value;
   lexer::TermLexer<term::HexValue> hex_checker;
 
-  while (hex_checker.CheckToken(reader) && reader->IsEof()) {
+  while (hex_checker.CheckToken(reader) && !reader->IsEof()) {
     hex_value.Append(unicode::UniChar(reader->Read()));
   }
 
-  if (hex_value.IsEmpty() ) {
-    unicode::UniString encoded_string("invalid escape sequence : ");
+  if (hex_value.IsEmpty()) {
+    unicode::UniString encoded_string(unicode::Convert("invalid escape sequence : "));
+    encoded_string.Append(hex_value);
     THROW_EXCEPTION_(lexer::LexException, encoded_string);
   } else if (reader->Peek() != ';') {
     THROW_EXCEPTION_(lexer::LexException, unicode::Convert(
@@ -41,7 +43,7 @@ bool lexer::InlineHexEscapeLexer::Lex(reader::EncodingReader* reader,
   reader->Read();
   lexer::InnerHexValueLexer inner_hex;
 
-  inner_hex.Lex(hex_checker, result);
+  inner_hex.Lex(hex_value, result);
 
   return true;
 }
index bb60435..7d93ac1 100755 (executable)
@@ -19,7 +19,7 @@ class InlineHexEscapeLexer {
   // readerの先頭が\xでは無い場合、falseを返却します。その場合、result
   // は更新されません。
   // 構文に一致しない場合、LexException例外が送出されます。
-  virtual bool Lex(reader::EncodingReader* reader, unsigned int* result);
+  bool Lex(reader::EncodingReader* reader, unsigned int* result);
 };
 }
 }
index 716072b..8a4d2f5 100755 (executable)
@@ -12,6 +12,7 @@
 
 namespace lexer = utakata::lexer;
 namespace unicode = utakata::unicode;
+namespace term = utakata::lexer::term;
 
 // 宣言のコメントを参照してください。
 bool lexer::InnerHexValueLexer::Lex(const unicode::UniString& string,
@@ -20,7 +21,7 @@ bool lexer::InnerHexValueLexer::Lex(const unicode::UniString& string,
       end = string.End();
 
   if (akebono::range::find_if_not(
-          string, HexValueChecker()) != end) {
+          string, term::HexValueChecker()) != end) {
     return false;
   }
 
diff --git a/src/lexer/number_lexer.cpp b/src/lexer/number_lexer.cpp
new file mode 100755 (executable)
index 0000000..8320973
--- /dev/null
@@ -0,0 +1,183 @@
+#include "src/lexeme.h"
+#include "src/exception_macro.h"
+#include "src/encoding_reader.h"
+#include "src/lexer/term_checker.h"
+#include "src/lexer/term_lexer.h"
+#include "src/lexer/number_lexer.h"
+#include "src/lexer/number_lexer_detail_templates.h"
+#include "src/unicode.h"
+
+namespace lexer = utakata::lexer;
+namespace reader = utakata::reader;
+namespace term = utakata::lexer::term;
+namespace unicode = utakata::unicode;
+
+// 宣言のコメントを参照してください。
+bool lexer::detail::MantissaWidthLexer::Lex(reader::EncodingReader* reader,
+                                            unicode::UniString* string) {
+  lexer::TermLexer<term::NumberDigit<10> > digit_10;
+
+  unicode::UniChar ch(reader->Peek());
+  if (ch.rawcode() != '|') {
+    return true;
+  }
+
+  unicode::UniString code(ch, 1);
+  while (!reader->IsEof()) {
+    if (!digit_10.CheckToken(reader)) {
+      break;
+    }
+    unicode::Append(code, reader->Read(digit_10.ReadToken(reader)));
+  }
+
+  const int kMantissaSize = 2;
+  if (code.GetSize() < static_cast<unsigned int>(kMantissaSize)) {
+    THROW_EXCEPTION_(lexer::LexException,
+        unicode::Convert("must one or more digits that after `|' "));
+  }
+
+  string->Append(code);
+  return true;
+}
+
+// 宣言のコメントを参照してください。
+bool lexer::detail::SuffixLexer::Lex(reader::EncodingReader* reader,
+                                     unicode::UniString* string) {
+  lexer::TermLexer<term::ExponentMarker> marker;
+  if (!marker.CheckToken(reader)) {
+    return true;
+  }
+
+  unicode::UniString code(unicode::Convert(
+      reader->Read(marker.ReadToken(reader))));
+
+  lexer::TermLexer<term::Sign> sign;
+  lexer::TermLexer<term::NumberDigit<10> > digit_10;
+
+  if (!sign.CheckToken(reader)) {
+    THROW_EXCEPTION_(lexer::LexException, unicode::Convert(
+        "must have sign after `exponent marker'"));
+  }
+  code.Append(unicode::Convert(
+      reader->Read(marker.ReadToken(reader))));
+
+  if (!digit_10.CheckToken(reader)) {
+    THROW_EXCEPTION_(lexer::LexException, unicode::Convert(
+        "must have digit[0-9] after `sign'"));
+  }
+
+  while (!reader->IsEof()) {
+    if (!digit_10.CheckToken(reader)) {
+      break;
+    }
+    code.Append(unicode::Convert(
+        reader->Read(marker.ReadToken(reader))));
+  }
+
+  string->Append(code);
+  return true;
+}
+
+
+// 宣言のコメントを参照してください。
+bool lexer::detail::DecimalLexer::Lex(reader::EncodingReader* reader,
+                                      unicode::UniString* string) {
+  UIntegerLexer<10> uint_lexer;
+  unicode::UniString code;
+
+  if (uint_lexer.Lex(reader, &code)) {
+    SuffixLexer suffix;
+    unicode::UniString suffix_string;
+    suffix.Lex(reader, &suffix_string);
+
+    if (!suffix_string.IsEmpty()) {
+      string->Append(code);
+      string->Append(suffix_string);
+    } else {
+      InnerLexFloating(reader, &code);
+    }
+    string->Append(code);
+    return true;
+  } else {
+    lexer::TermLexer<term::NumberDigit<10> > digit;
+    SuffixLexer suffix;
+    
+    unicode::UniChar ch(reader->Peek());
+    if (ch.rawcode() != '.') {
+      return false;
+    }
+
+    code.Append(ch);
+
+    unicode::UniString digit_string;
+    while (!reader->IsEof() && digit.CheckToken(reader)) {
+      unicode::Append(digit_string, reader->Read(digit.ReadToken(reader)));
+    }
+
+    if (digit_string.IsEmpty()) {
+      THROW_EXCEPTION_(lexer::LexException, unicode::Convert(
+          "complex format error that nessesary one of more digits after ."));
+    }
+    code.Append(digit_string);
+
+    if (!suffix.Lex(reader, &code)) {
+      THROW_EXCEPTION_(lexer::LexException, unicode::Convert(
+          ". <digit> nessesary after suffix"));
+    }
+    string->Append(code);
+    return true;
+  }
+
+  return false;
+}
+
+// 宣言のコメントを参照してください。
+bool lexer::detail::DecimalLexer::InnerLexFloating(
+    reader::EncodingReader* reader, unicode::UniString* string) {
+  lexer::TermLexer<term::NumberDigit<10> > digit;
+  SuffixLexer suffix;
+  unicode::UniString code;
+
+  unicode::UniChar ch(reader->Peek());
+
+  if (ch.rawcode() != '.') {
+    return false;
+  }
+
+  reader->Read();
+  code.Append(ch);
+
+  while (!reader->IsEof() && digit.CheckToken(reader)) {
+    unicode::Append(code, reader->Read(digit.ReadToken(reader)));
+  }
+
+  if (!suffix.Lex(reader, &code)) {
+    THROW_EXCEPTION_(lexer::LexException, unicode::Convert(
+        ". <digit> nessesary after suffix"));
+  }
+  string->Append(code);
+  return true;
+}
+
+
+// <number>の字句要素を解釈します。解釈されない場合、NULLが返されます。
+// 字句構文違反があった場合、LexException例外が発生します。
+lexer::Lexeme* lexer::NumberLexer::Lex(reader::EncodingReader* reader) {
+  lexer::detail::NumLexer<2> binary;
+  lexer::detail::NumLexer<8> oct;
+  lexer::detail::NumLexer<10> decimal;
+  lexer::detail::NumLexer<16> hex;
+
+  unicode::UniString number_string;
+  if (binary.Lex(reader, &number_string)) {
+    return new lexer::Lexeme(number_string, lexer::Lexeme::kNumber);
+  } else if (oct.Lex(reader, &number_string)) {
+    return new lexer::Lexeme(number_string, lexer::Lexeme::kNumber);
+  } else if (decimal.Lex(reader, &number_string)) {
+    return new lexer::Lexeme(number_string, lexer::Lexeme::kNumber);
+  } else if (hex.Lex(reader, &number_string)) {
+    return new lexer::Lexeme(number_string, lexer::Lexeme::kNumber);
+  }
+
+  return NULL;
+}
diff --git a/src/lexer/number_lexer.cpp.bk b/src/lexer/number_lexer.cpp.bk
deleted file mode 100755 (executable)
index 16bd8c5..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-#include "number_lexer.h"
-
-namespace numlexer = ::utakata::sublexer::number;
-
-// schemeの数値であるかどうかを確認し、結果を返します。
-// streamの先頭位置から、正しい<number>に該当するschemeにおける
-// 数値であった場合、該当する部分を読み、lexeme::Numberを生成して
-// 返します。
-// 該当部分が存在しない場合、isNull == trueであるような
-// lexemeを返します。
-// 解析の上で、問題が発生した場合はNumberLexerException例外が発生します。
-smart_ptr<lexeme::ILexeme> numlexer::NumberLexer::Lex(
-    smart_ptr<reader::StreamReader> stream,
-    smart_ptr<ISubLexer>& next,
-    const unicode::UniString& str,
-    bool exactness) {
-
-  return smart_ptr<lexeme::ILexeme>();
-}
-
index 3b21c2a..10e42c6 100755 (executable)
 #ifndef _NUMBER_LEXER_H_
 #define _NUMBER_LEXER_H_
 
-#include <iostream>
-#include <sstream>
-
-#include "src/unicode.h"
-#include "src/common/smart_ptr.h"
-#include "src/reader.h"
-#include "src/lexeme.h"
-#include "src/sublexer.h"
+#include "lib/smart_ptr.h"
+#include "src/lexer/lexer_interface.h"
 
 namespace utakata {
-namespace sublexer {
-namespace number {
-
-/////////////////////////////////////////////////////////////////
-// <number>がそれぞれのradixに基づいて解析する必要があるため、 //
-// それぞれに対して特化できるようなテンプレートを用意する。    //
-/////////////////////////////////////////////////////////////////
-
-template<int NUM> class UReal;
-template<int NUM>
-class NumberLexer {
- private:
-  enum {
-    INIT,    // 初期状態を表す。
-    REAL,    // <real>非終端記号を示す。これは決して虚数にはならない。
-    UREAL,   // <ureal>非終端記号を示す。
-    NAN_IMAGINARY,
-    INF_IMAGINARY,
-    IMAGINARY_ONLY,
-    FLAG,
-    END,
-    IMAGINARY,
-  }
- public:
-  NumberLexer() :
-      exact_(false), realnum_(new unicode::UniString()),
-      imaginary_(new unicode::UniString())
-  {}
-
-  virtual ~NumberLexer() {}
-
-  smart_ptr<lexeme::ILexeme> Lex(smart_ptr<reader::StreamReader> stream,
-                                 smart_ptr<ISubLexer>& next,
-                                 const unicode::UniString& str,
-                                 bool exactness) {
-    // 全体的な流れは同一であり、基数の違いによる
-    // 数値の違い程度しか問題は発生しない。
-    exact_ = exactness;
-    lexer_delimiter::Normal nor;
-    unicode::UniString number = str;
-    while (true) {
-      // デリミタまで読んでしまう。
-      if (stream->isEOF()) {
-        throw utakata::sublexer::LexException(pos_, "illegal number format");
-      }
-
-      unicode::UniChar ch(stream->read());
-      if (nor(ch)) {
-        stream->unget(ch.GetRawCode());
-        break;
-      }
-
-      number += ch;
-    }
-
-    // 読出したnumberを解析してNumberオブジェクトとして返す。
-    pos_ = stream->pos();
-    return lexNumber_(number);
-  }
-
- private:
-
-  // 現在値を前の値に退避し、現在値をnextで更新する。
-  void SetStatus(int next, int *now, int *prev) { // NOLINT
-    *prev = *now;
-    *now = next;
-  }
-
-  // 現在値をnextで更新する。
-  void SetStatus(int next, int* now) { // NOLINT
-    *now = next;
-  }
-
-  smart_ptr<lexeme::ILexeme> lexNumber_(const unicode::UniString& number) {
-    // デリミタまでを取得したデータを、実際の数値オブジェクトとして解釈させる。
-    // 解釈できなかった場合、字句構文エラーとして扱う。
-    unicode::UniString::const_iterator begin = number.begin(),
-        end = number.end();
-
-    int status = INIT, prevstatus = INIT;
-    bool imaginary = false;
-
-    while (begin != end) {
-      if (status == INIT) {
-        // 非終端記号で言えば<complex>に当たる。
-        // 全ての整数は原則として +-0iの虚数と等しいため、そのようになる。
-        SetStatus(LexComplex(begin, end), status, prevstatus);
-
-      } else if (status == REAL) {
-        // 前回の状態によって、チェックが変更になる。
-        SetStatus(real_(begin, end), status, prevstatus);
-
-      } else if (status == UREAL) {
-        // 基本的にはそのまま設定するのみで構わない。ただしこの後に続く
-        // 可能性があるためそのチェックも同時に行う。
-        bool b = UReal<NUM>(pos_).Lex(begin, end);
-        if (b) {
-          if (!imaginary && begin != end) {
-            // まだ続きがある。
-            realnum_->Insert(realnum_->begin(), number.begin(), begin);
-            SetStatus(IMAGINARY, status);
-
-          } else {
-            // 上記以外の場合、基本的に終了しているはずなので返る。
-            SetStatus(END, status);
-            realnum_->Insert(realnum_->begin(), number.begin(), begin);
-            return lexeme::MakeNumber(*realnum_, *imaginary_, exact_, NUM);
-          }
-        }
-      } else if (status == IMAGINARY) {
-        // 虚数部分の判定となる。
-        SetStatus(status, prevstatus, flag_(begin, end));
-
-      } else if (status == END) {
-        // 終了ということなので、完全に完了したことにする。
-        return lexeme::MakeNumber(*realnum_, *imaginary_, exact_, NUM);
-
-      } else if (status == FLAG) {
-        // 虚数部分の先頭符号を示す。
-        unicode::UniString s;
-        s.Insert(s.begin(), begin, end);
-
-        if (s.size() == 1) {
-          throw utakata::sublexer::LexException(
-              pos_, "imaginary parts must constain `i' at end");
-        } else if (s[s.size() - 1].GetRawCode() != 'i') {
-          throw utakata::sublexer::LexException(
-              pos_, "imaginary parts must constain `i' at end");
-        }
-
-        if (s[1].GetRawCode() == 'i' && s.size() == 2) {
-          // 末尾がiの場合、これがそのまま文字列となる。
-          *imaginary_ = s;
-          return lexeme::MakeNumber(*realnum_, *imaginary_, exact_, NUM);
-
-        } else {
-          // +i,-i以外の場合は、限定領域がrealである必要がある。
-          unicode::UniString s2;
-          s2.Insert(s2.begin(), s.begin() + 1, s.end() - 1);
-          if (s2 == unicode::convert("nan.0") ||
-              s2 == unicode::convert("inf.0")) {
-            *imaginary_ = s;
-            return lexeme::MakeNumber(*realnum_, *imaginary_, exact_, NUM);
-
-          } else {
-            // urealである必要がある。
-            utakata::unicode::UniString::const_iterator begin = s2.begin(),
-                end = s2.end();
-            UReal<NUM>(pos_).Lex(begin, end);
-            // 例外が発生しなければureal_である。
-            *imaginary_ = s;
-            return lexeme::MakeNumber(*realnum_, *imaginary_, exact_, NUM);
-          }
-        }
-      } else if (status == NAN_IMAGINARY) {
-        return lexeme::MakeNanImaginary(number, exact_);
-
-      } else if (status == INF_IMAGINARY) {
-        return lexeme::MakeInfImaginary(number, exact_);
-
-      } else if (status == IMAGINARY_ONLY) {
-        return lexeme::MakeImaginaryOnly(number, exact_);
-      }
-    }
-    return smart_ptr<lexeme::ILexeme>();
-  }
-
-  // 複素数の要素の中で、終端記号であるものであるかどうかを判定する。
-
-  int LexComplex(const unicode::UniString::const_iterator& begin,
-                 const unicode::UniString::const_iterator& end) {
-    // 一文字単位で調べていく。checker_に該当するデータの場合には、
-    unicode::UniString temp_digits;
-    temp_digits.Insert(temp_digits.begin(), begin, end);
-
-    int 
-        if (temp_digits == unicode::Convert("-nan.0i") ||
-            temp_digits == unicode::Convert("+nan.0i")) {
-          // 虚数部が正/負の非数として登録する。
-          *imaginary_ = temp_digits;
-          return NAN_IMAGINARY;
-        } else if (temp_digits == unicode::Convert("-inf.0i") ||
-                   temp_digits == unicode::Convert("+inf.0i")) {
-          // 虚数部が正/負の無限大として処理する。
-          *imaginary_ = temp_digits;
-          return INF_IMAGINARY;
-        } else if (temp_digits == unicode::Convert("-i") ||
-                   temp_digits == unicode::Convert("+i")) {
-          // 0+1i,0-1iにそれぞれマッピングされる。
-          *imaginary_ = temp_digits;
-          return IMAGINARY_ONLY;
-        }
-
-    // 上記以外の場合、必ず先頭はREALである必要がある。
-
-    return REAL;
-  }
-
-  int real_(unicode::UniString::const_iterator& begin,
-            const unicode::UniString::const_iterator& end) {
-    // 実数の表現でなければならない。
-    // 先頭一文字が符号表現か、符号無し表現で
-    // あること。
-    if (begin->GetRawCode() == '+' || begin->GetRawCode() == '-') {
-      // 符号表現である場合には、以降の符号
-      // 表現までを調べる。
-      return innerReal_(begin, end, true);
-    } else {
-      return innerReal_(begin, end, false);
-    }
-  }
-
-  int innerReal_(unicode::UniString::const_iterator& begin,
-                 const unicode::UniString::const_iterator& end,
-                 bool flag) {
-    // realの符号有無に関係の無い、共通部分の分離。
-    if (flag) {
-      ++begin;
-    }
-    unicode::UniString s;
-    unicode::UniString::const_iterator save = begin;
-    while (begin != end && (begin->GetRawCode() != '+' ||
-                            begin->GetRawCode() != '-')) {
-      ++begin;
-    }
-
-    s.Insert(s.begin(), save, begin);
-    // とりあえず抜けた段階で、実際に抽出
-    // してみたデータを調べてみる。
-    if (s == unicode::Convert("nan.0") || s == unicode::Convert("inf.0")) {
-      // 非数/無限大として出力する。
-      *realnum_ = s;
-      return REAL;
-    } else {
-      // <uinteger>,<uinteger>/<uinteger>,<decimal 10>のいずれか
-      // である必要がある。
-      begin = save;
-      return UREAL;
-    }
-  }
 
-
-  int flag_(unicode::UniString::const_iterator& begin,
-            const unicode::UniString::const_iterator& end) {
-    // 虚数の先頭に必ず必要な符号が存在するかどうかを返す。
-    if (begin->GetRawCode() == '+' || begin->GetRawCode() == '-') {
-      return FLAG;
-    }
-    // これが無い場合、特に問題は発生しない。
-    if (begin == end) {
-      return END;
-    }
-
-    throw utakata::sublexer::LexException(pos_, "illegal number format : invalid flag previous `imaginary'");
-  }
-
-  // チェックを行うための関数オブジェクト。
-  bool exact_;
-  smart_ptr<unicode::UniString> realnum_;
-  smart_ptr<unicode::UniString> imaginary_;
-  size_t pos_;
-};
-
-////////////////////////////////
-// <uinteger>非終端記号の実装 //
-////////////////////////////////
-
-template<int NUM>
-class UInteger {
-  // 指定された基数の値であるかどうかを調べる。
-  typedef utakata::unicode::UniString::const_iterator iter;
- public:
-  UInteger() {}
-  virtual ~UInteger(){}
-
-  bool operator()(iter it) {
-    return true;
-  }
+namespace unicode {
+class UniString;
+}
+
+namespace reader {
+class EncodingReader;
+}
+
+namespace lexer {
+class TermLexerBase;
+namespace detail {
+
+class MantissaWidthLexer {
+  // <mantissa width>に一致する要素を解釈します。
+  // <mantissa width>は、以下の構文のいずれかとなります。
+  // <empty> , | <digit>+
+  // | <digit>+は、 |13 のような形です。
+public:
+  // <mantissa width>に一致する文字列を読出し、stringに追加します。
+  // 該当しない場合には、falseが返されます。
+  bool Lex(reader::EncodingReader* reader, unicode::UniString* string);
 };
 
-template<>
-class UInteger<2> {
-  typedef utakata::unicode::UniString::const_iterator iter;
- public:
-  bool operator()(iter it) {
-    if (it->GetRawCode() == '0' || it->GetRawCode() == '1') {
-      return true;
-    }
-    return false;
-  }
+class SuffixLexer {
+  // <suffix>に一致する要素を解釈します。
+  // <suffix>は、以下の構文に一致します。
+  // <empty> | <exponent marker> <sign> <digit 10>+
+public:
+  // readerの先頭から、<suffix>に一致する文字列を読出し、stringに追加します。
+  // readerの先頭が<suffix>に一致しない場合、readerの読出位置は更新
+  // されません。
+  bool Lex(reader::EncodingReader* reader, unicode::UniString* string);
 };
 
-template<>
-class UInteger<8> {
-  typedef utakata::unicode::UniString::const_iterator iter;
- public:
-  bool operator()(iter it) {
-    if (it->GetRawCode() == '0' || it->GetRawCode() == '1' ||
-        it->GetRawCode() == '2' || it->GetRawCode() == '3' ||
-        it->GetRawCode() == '4' || it->GetRawCode() == '5' ||
-        it->GetRawCode() == '6' || it->GetRawCode() == '7') {
-      return true;
-    }
-    return false;
-  }
-};
-
-template<>
-class UInteger<10> {
-  typedef utakata::unicode::UniString::const_iterator iter;
- public:
-  bool operator()(iter it) {
-    if (it->GetRawCode() == '0' || it->GetRawCode() == '1' ||
-        it->GetRawCode() == '2' || it->GetRawCode() == '3' ||
-        it->GetRawCode() == '4' || it->GetRawCode() == '5' ||
-        it->GetRawCode() == '6' || it->GetRawCode() == '7' ||
-        it->GetRawCode() == '8' || it->GetRawCode() == '9') {
-      return true;
-    }
-    return false;
-  }
-};
-
-template<>
-class UInteger<16> {
-  typedef utakata::unicode::UniString::const_iterator iter;
- public:
-  bool operator()(iter it) {
-    if (it->GetRawCode() == '0' || it->GetRawCode() == '1' ||
-        it->GetRawCode() == '2' || it->GetRawCode() == '3' ||
-        it->GetRawCode() == '4' || it->GetRawCode() == '5' ||
-        it->GetRawCode() == '6' || it->GetRawCode() == '7' ||
-        it->GetRawCode() == '8' || it->GetRawCode() == '9' ||
-        it->GetRawCode() == 'A' || it->GetRawCode() == 'B' ||
-        it->GetRawCode() == 'C' || it->GetRawCode() == 'D' ||
-        it->GetRawCode() == 'E' || it->GetRawCode() == 'F' ||
-        it->GetRawCode() == 'a' || it->GetRawCode() == 'b' ||
-        it->GetRawCode() == 'c' || it->GetRawCode() == 'd' ||
-        it->GetRawCode() == 'e' || it->GetRawCode() == 'f') {
-      return true;
-    }
-    return false;
-  }
-};
-
-/////////////////////////////////
-// <ureal>非終端記号解析の実装 //
-/////////////////////////////////
-
-template<int NUM>
-class UReal {
-  typedef utakata::unicode::UniString::const_iterator iter;
+class DecimalLexer {
+  // <decimal 10>に一致する字句を解釈します。
+  // 基数が10の時にのみ利用されます。<decimal 10>の字句定義は以下の通りです。
+  // <uinteger 10> <suffix> | . <digit 10>+ <suffix>
+  // | <digit 10>+ . <digit 10>* <suffix>
  public:
-  UReal(size_t pos) : pos_(pos) {}
-  virtual ~UReal() {}
-
-  int Lex(iter& begin, const iter end) {
-    // <ureal>に以降の文字列が該当するかどうかを調べる。
-
-    iter save = begin;
-
-    for (; begin != end && checker_(begin); ++begin);
-
-    if (begin == end) {
-      // すべて数値の間に入っている場合、beginからendまでの全体が
-      // real/imaginaryのいずれかとして扱われる。
-      return true;
-    } else {
-      // すべてが数値の間ではなかった場合、その文字を調べる。
-      // ここに至って、10進数とそれ以外とでチェックに相違点が存在する。
-      if (begin->GetRawCode() == '/') {
-        // 次もuintegerである必要がある。
-        ++begin;
-        // マッチする間飛ばす。
-        for (; begin != end && checker_(begin); ++begin);
-        return true;
-      } else {
-        throw utakata::sublexer::LexException(pos_, "must have digit at least one after `/'");
-      }
-    }
-  }
+    // readerの先頭から、<decimal 10>に一致する文字列を読出し、stringに追加します。
+  // readerの先頭が<decimal 10>に一致しない場合、readerの読み出し位置は更新
+  // されません。
+  bool Lex(reader::EncodingReader* reader, unicode::UniString* string);
 
  private:
 
-  UInteger<NUM> checker_;
-  size_t pos_;
+  // <digit 10>+ . <digit 10>* <suffix>のチェックを行います。
+  // 上記の字句定義に一致する場合、trueを返します。
+  bool InnerLexFloating(reader::EncodingReader* reader,
+                        unicode::UniString* string);
 };
+} // end of detail
 
-template<>
-class UReal<10> {
-  typedef utakata::unicode::UniString::const_iterator iter;
- public:
-  UReal(size_t pos) : pos_(pos) {}
-  virtual ~UReal() {}
-
-  bool Lex(iter& begin, const iter& end) {
-    // <ureal>に以降の文字列が該当するかどうかを調べる。
-
-    iter save = begin;
-    if (begin->GetRawCode() == '.') {
-      // 先頭が.の場合、そのまま進む。
-      for (; begin != end && checker_(begin); ++begin);
-      GetSuffix_(begin, end);
-      return true;
-    } else {
-      // 先頭が.じゃない場合、一度数値を読み出しておく。
-      for (; begin != end && checker_(begin); ++begin);
-
-      if (begin == end) {
-        //   throw utakata::sublexer::LexException(pos_, "illegal number format : not Real");
-        return true;
-      }
-
-      if (begin->GetRawCode() == '.') {
-        // 以降の文字がsuffixとかであるかどうかで調べる。
-        ++begin;
-        for (; begin != end && checker_(begin); ++begin);
-      }
-      GetSuffix_(begin, end);
-      return true;
-    }
-  }
+class Lexeme;
 
- private:
-
-  bool GetSuffix_(iter& begin, const iter& end)
-  {
-    // 次の文字がsuffixであるかどうかを調べる。
-    if (begin->GetRawCode() == 'e' || begin->GetRawCode() == 'E' ||
-        begin->GetRawCode() == 's' || begin->GetRawCode() == 'S' ||
-        begin->GetRawCode() == 'f' || begin->GetRawCode() == 'F' ||
-        begin->GetRawCode() == 'd' || begin->GetRawCode() == 'D' ||
-        begin->GetRawCode() == 'l' || begin->GetRawCode() == 'L') {
-      ++begin;
-      if (begin->GetRawCode() == '+' || begin->GetRawCode() == '-') {
-        ++begin;
-        if (checker_(begin)) {
-          for (; begin != end && checker_(begin); ++begin);
-          return true;
-        } else {
-          throw utakata::sublexer::LexException(pos_, "suffix nessesary after at least one number");
-        }
-      }
-    }
-
-    return true;
-  }
-
-  UInteger<10> checker_;
-  size_t pos_;
-};
-};
-};
+// <number>に一致する字句を読出すためのLexerです。IPartOfLexerを継承している
+// ため、このLexerは、該当するLexemeを返す必要があります。
+class NumberLexer : public IPartOfLexer {
+ public:
+  virtual ~NumberLexer() {}
+  virtual Lexeme* Lex(reader::EncodingReader* reader);
 };
+} // end of lexer
+} // end of utakata
 
 #endif /* _NUMBER_LEXER_H_ */
diff --git a/src/lexer/number_lexer_detail_templates.h b/src/lexer/number_lexer_detail_templates.h
new file mode 100644 (file)
index 0000000..7cfe4d0
--- /dev/null
@@ -0,0 +1,395 @@
+// NumberLexer内で利用される、detail名前空間内の内部Lexerの内、
+// テンプレートとして提供するものを定義します。
+// このheaderは、number_lexer.cppからのみ読み込みが行われます。
+// このファイルにおいては、単独で読み込み可能とはせず、限定的な利用方法とします。
+#ifndef _UTAKATA_SRC_LEXER_NUMBER_LEXER_DETAIL_TEMPLATES_H_
+#define _UTAKATA_SRC_LEXER_NUMBER_LEXER_DETAIL_TEMPLATES_H_
+
+#include "src/lexer/term_lexer.h"
+#include "lib/range.h"
+
+namespace utakata {
+
+namespace reader {
+class EncodingReader;
+}
+
+namespace unicode {
+class UniString;
+}
+
+namespace lexer {
+
+namespace detail {
+
+// <prefix R>に一致する要素を解釈します。テンプレートにて、基数を
+// 指定する必要があります。
+// <prefix R>は、以下の構文に一致します。
+// <radix R> <exactness> | <exactness> <radix R>
+// Rは、2,8,10,16のいずれかとなります。
+template<int N>
+class PrefixLexer {
+ public:
+  // readerの先頭から、<prefix>に一致する文字列を読出、stringに追加します。
+  // readerの先頭が<prefix>に一致しない場合、readerの読出位置は更新されません。
+  // radixは、radix、exactnessいずれもが<empty>になる場合があるため、
+  // 結果が
+  bool Lex(reader::EncodingReader* reader, unicode::UniString* string) {
+    namespace lexer = utakata::lexer;
+    namespace term = utakata::lexer::term;
+    namespace unicode = utakata::unicode;
+
+    lexer::TermLexer<term::Exactness> exactness;
+    lexer::TermLexer<term::Radix<N> > radix;
+
+    unicode::UniString code;
+    if (exactness.CheckToken(reader)) {
+      unicode::Append(code, reader->Read(exactness.ReadToken(reader)));
+
+      if (CheckNextTokenInPrefix(&radix, reader, &code)) {
+        string->Append(code);
+        return true;
+      }
+    } else if (radix.CheckToken(reader)) {
+      unicode::Append(code, reader->Read(radix.ReadToken(reader)));
+
+      if (CheckNextTokenInPrefix(&exactness, reader, &code)) {
+        string->Append(code);
+        return true;
+      }
+    }
+
+    return false;
+  }
+
+ private:
+
+  // 指定されたpredicateがtrueを返す場合、predicate::ReadTokenが返した
+  // 文字数分だけreaderを更新し、stringに追加します。
+  // 読み出した文字数が0である場合、readerは更新されません。
+  bool CheckNextTokenInPrefix(lexer::TermLexerBase* predicate,
+                              reader::EncodingReader* reader,
+                              unicode::UniString* string) {
+    namespace lexer = utakata::lexer;
+    namespace term = utakata::lexer::term;
+    namespace unicode = utakata::unicode;
+
+    if (predicate->CheckToken(reader)) {
+      unicode::Append(*string, reader->Read(predicate->ReadToken(reader)));
+      return true;
+    }
+    return false;
+  }
+};
+
+// <uinteger R>に一致する要素を解釈します。
+// テンプレートにて、解釈する基数を指定する必要がありますが、
+// 2,8.10,16以外ではコンパイル時エラーが発生します。
+// <uinteger R>は以下の定義となっています。
+// <digit R>+
+template<int N>
+class UIntegerLexer {
+ public:
+  // readerの先頭から、<uinteger R>に一致する文字列を読出、stringに追加します。
+  // readerの先頭が<uinteger>に一致しない場合、readerの読出位置は更新されません。
+  bool Lex(reader::EncodingReader* reader, unicode::UniString* string) {
+    namespace lexer = utakata::lexer;
+    namespace term = utakata::lexer::term;
+    namespace unicode = utakata::unicode;
+
+    lexer::TermLexer<term::NumberDigit<N> > digit;
+    unicode::UniString code;
+    while (!reader->IsEof() && digit.CheckToken(reader)) {
+      unicode::Append(code, reader->Read(digit.ReadToken(reader)));
+    }
+
+    if (code.IsEmpty()) {
+      return false;
+    }
+
+    string->Append(code);
+    return true;
+  }
+};
+
+
+// <ureal R>に一致する字句を解釈します。
+// テンプレートにて、解釈する基数を指定しなければなりません。
+// 基数は2、8、10、16のいずれかを指定する必要があります。
+// <ureal R>は以下の字句定義となっています。
+//  <uinteger R> | <uinteger R> / <uinteger R> |
+//  <decimal R> <mantissa width>
+// ただし、<decimal R>は基数が10の場合にのみ有効となります。
+template <int N>
+class URealLexer {
+ public:
+
+  // readerの先頭から、<ureal R>に一致する文字列を読出し、stringに追加します。
+  // readerの先頭が<ureal R>に一致しない場合、readerの読み出し位置は更新
+  // されません。
+  bool Lex(reader::EncodingReader* reader, unicode::UniString* string) {
+    namespace lexer = utakata::lexer;
+    namespace term = utakata::lexer::term;
+    namespace unicode = utakata::unicode;
+
+    UIntegerLexer<N> uint_lexer;
+    if (!uint_lexer.Lex(reader, string)) {
+      return false;
+    }
+
+    unicode::UniChar ch(reader->Peek());
+    if (ch.rawcode() != '/') {
+      return true;
+    }
+
+    reader->Read();
+    string->Append(ch);
+    if (!uint_lexer.Lex(reader, string)) {
+      THROW_EXCEPTION_(lexer::LexException, unicode::UniString(
+          "must have uinteger after `/'"));
+    }
+
+    return true;
+  }
+};
+
+template<>
+class URealLexer<10> {
+  // 基数が10の場合にのみ利用されるURealLexerです。この場合、
+  // 定義として<decimal R> <mantissa width>が有効になります。
+ public:
+  // readerの先頭から、<ureal 10>に一致する文字列を読出し、stringに追加します。
+  // readerの先頭が<ureal R>に一致しない場合、readerの読み出し位置は更新
+  // されません。
+  bool Lex(reader::EncodingReader* reader, unicode::UniString* string) {
+    namespace lexer = utakata::lexer;
+    namespace term = utakata::lexer::term;
+    namespace unicode = utakata::unicode;
+
+    UIntegerLexer<10> uint_lexer;
+    DecimalLexer decimal_lexer;
+    if (decimal_lexer.Lex(reader, string)) {
+      MantissaWidthLexer mantissa_lexer;
+      mantissa_lexer.Lex(reader, string);
+
+      if (akebono::range::find_if_not(*string,
+                                      term::NumberDigit<10>()) ==
+          string->End()) {
+        unicode::UniChar ch(reader->Peek());
+        if (ch.rawcode() != '/') {
+          return true;
+        }
+
+        reader->Read();
+        string->Append(ch);
+        if (!uint_lexer.Lex(reader, string)) {
+          THROW_EXCEPTION_(lexer::LexException, unicode::UniString(
+              "must have uinteger after `/'"));
+        }
+      }
+      return true;
+    } else if (uint_lexer.Lex(reader, string)) {
+
+      unicode::UniChar ch(reader->Peek());
+      if (ch.rawcode() != '/') {
+        return true;
+      }
+
+      reader->Read();
+      string->Append(ch);
+      if (!uint_lexer.Lex(reader, string)) {
+        THROW_EXCEPTION_(lexer::LexException, unicode::UniString(
+            "must have uinteger after `/'"));
+      }
+      return true;
+    }
+
+    return false;
+  }
+};
+
+// <real R>に一致する字句を解釈します。
+// 基数が2,8,10,16に一致する場合にのみ、有効となります。
+// <real R>の字句定義は以下の通りです。
+//  <sign> <ureal R> | + <naninf> | - <naninf>
+template<int N>
+class RealLexer {
+ public:
+  // readerの先頭から、<real R>に一致する文字列を読出し、stringに追加します。
+  // readerの先頭が<real R>に一致しない場合、readerの読み出し位置は更新
+  // されません。
+  bool Lex(reader::EncodingReader* reader, unicode::UniString* string) {
+    namespace lexer = utakata::lexer;
+    namespace term = utakata::lexer::term;
+    namespace unicode = utakata::unicode;
+
+    lexer::TermLexer<term::Sign> sign;
+    lexer::TermLexer<term::Naninf> naninf;
+    lexer::detail::URealLexer<N> ureal;
+
+    unicode::UniString code;
+    if (sign.CheckToken(reader)) {
+      unicode::Append(code, reader->Read(sign.ReadToken(reader)));
+      if (ureal.Lex(reader, &code)) {
+        string->Append(code);
+        return true;
+      } else {
+        if (code.IsEmpty()) {
+          return false;
+        }
+
+        if (!naninf.CheckToken(reader)) {
+          THROW_EXCEPTION_(lexer::LexException, unicode::UniString(
+              "this point is put nan.0 or inf.0"));
+        }
+        string->Append(code);
+        return true;
+      }
+    }
+
+    return false;
+  }
+};
+
+// <complex R>に一致する字句を解釈します。
+// <complex R>の字句定義は以下の通りです。
+// <real R> | <real R> @ <real R>
+// | <real R> + <ureal R> i | <real R> - <ureal R> i
+// | <real R> + <naninf> i | <real R> - <naninf> i
+// | <real R> + i | <real R> - i
+// | + <ureal R> i | - <ureal R> i
+// | + <naninf> i | - <naninf> i
+// | + i | - i
+template <int N>
+class ComplexLexer {
+ public:
+  // readerの先頭から、<complex R>に一致する文字列を読出し、stringに追加します。
+  // readerの先頭が<complex R>に一致しない場合、readerの読み出し位置は更新
+  // されません。
+  bool Lex(reader::EncodingReader* reader, unicode::UniString* string) {
+    lexer::detail::RealLexer<N> real;
+    namespace lexer = utakata::lexer;
+    namespace term = utakata::lexer::term;
+    namespace unicode = utakata::unicode;
+
+    unicode::UniString code;
+    if (real.Lex(reader, &code)) {
+      unicode::UniChar ch(reader->Peek());
+
+      if (ch.rawcode() == '@') {
+        code.Append(unicode::UniChar(reader->Read()));
+        if (!real.Lex(reader, &code)) {
+          THROW_EXCEPTION_(lexer::LexException, unicode::Convert(
+              "can't read real, after `@'"));
+        }
+        string->Append(code);
+        return true;
+
+      } else {
+        lexer::TermLexer<term::Sign> sign;
+        if (sign.CheckToken(reader)) {
+          unsigned int read_size = sign.ReadToken(reader);
+
+          if (read_size != 0) {
+            unicode::Append(code, reader->Read(sign.ReadToken(reader)));
+            if  (!CheckImaginaryPart(reader, &code)) {
+              THROW_EXCEPTION_(lexer::LexException, unicode::Convert(
+                  "error imaginary part. read flag only."));
+            }
+          }
+        }
+        string->Append(code);
+        return true;
+      }
+    } else {
+      lexer::TermLexer<term::Sign> sign;
+      if (sign.CheckToken(reader)) {
+        unsigned int read_size = sign.ReadToken(reader);
+        if (read_size == 0) {
+          return false;
+        } else if (!CheckImaginaryPart(reader, &code)) {
+          THROW_EXCEPTION_(lexer::LexException, unicode::Convert(
+              "error imaginary part. read flag only."));
+        }
+      }
+      string->Append(code);
+      return true;
+    }
+
+    return false;
+  }
+
+ private:
+
+  // <complex>の虚数部分のチェックを行います。
+  // 虚数部分を正しく取得できた場合、stringにデータが設定されます。
+  // 構文違反が存在する場合、例外が発生します。
+  bool CheckImaginaryPart(reader::EncodingReader* reader,
+                          unicode::UniString* string) {
+    namespace lexer = utakata::lexer;
+    namespace term = utakata::lexer::term;
+    namespace unicode = utakata::unicode;
+
+    lexer::detail::URealLexer<N> ureal;
+    lexer::TermLexer<term::Naninf> naninf;
+
+    if (!ureal.Lex(reader, string)) {
+      if (naninf.CheckToken(reader)) {
+        unicode::Append(*string, reader->Read(naninf.ReadToken(reader)));
+      }
+    }
+
+    unicode::UniChar ch(reader->Peek());
+    if (ch.rawcode() == 'i' || ch.rawcode() == 'I') {
+      reader->Read();
+      string->Append(ch);
+      return true;
+    } else {
+      unicode::UniString encoded_string("illegal complex format : ");
+      encoded_string.Append(*string);
+      THROW_EXCEPTION_(lexer::LexException, encoded_string);
+    }
+
+    return false;
+  }
+};
+
+
+// <num R>に一致する字句の解析を行います。
+// <num R>は以下の字句構文に一致します。
+// <prefix R> <complex R>
+template <int N>
+class NumLexer {
+ public:
+
+  // readerの先頭から、<num R>に一致するかどうかを返します。
+  // <num R>に一致しない場合、readerの読み込み位置は更新されません。
+  bool Lex(reader::EncodingReader* reader, unicode::UniString* string) {
+    namespace lexer = utakata::lexer;
+    namespace term = utakata::lexer::term;
+    namespace unicode = utakata::unicode;
+
+    PrefixLexer<N> prefix;
+    ComplexLexer<N> complex;
+
+    unicode::UniString code;
+    if (prefix.Lex(reader, &code)) {
+      if (complex.Lex(reader, &code)) {
+        string->Append(code);
+
+        lexer::TermLexer<term::Delimiter> delimiter;
+        if (reader->IsEof() || delimiter.CheckToken(reader)) {
+          return true;
+        }
+      }
+    }
+
+    return false;
+  }
+};
+
+} // end of detail
+} // end of lexer
+} // end of utakata
+
+#endif /* _UTAKATA_SRC_LEXER_NUMBER_LEXER_DETAIL_TEMPLATES_H_ */
index d1b4a3d..ebe049a 100755 (executable)
@@ -32,29 +32,33 @@ unsigned int lexer::EscapeConverter::Convert(unsigned int code) {
 // 宣言のコメントを参照して下さい。
 bool lexer::EscapeLexer::Lex(reader::EncodingReader* reader,
                              unsigned int* code) {
-  unicode::UniString escape(reader->Read(kEscapeValidLength));
-  if (escape.IsEmpty() || escape.At(0).rawcode != '\\') {
+  unicode::UniString escape(
+      unicode::Convert(reader->Peek(kEscapeValidLength)));
+  if (escape.IsEmpty() || escape.At(0).rawcode() != '\\') {
     return false;
   }
 
-  if (escape.GetSize() < kEscapeValidLength) {
+  if (escape.GetSize() < static_cast<unsigned int>(kEscapeValidLength)) {
     THROW_EXCEPTION_(lexer::LexException,
                      unicode::Convert("invalid escape sequence"));
   }
 
   lexer::InlineHexEscapeLexer inline_escape;
 
-  if (inline_escape(reader, &code)) {
+  if (inline_escape.Lex(reader, code)) {
     return true;
   }
 
+  // \だけを読み飛ばします。
   reader->Read();
-  lexer::TermLexer<term::IntralineWhiteSpaceChecker> intraline;
-  lexer::TermLexer<term::LineEndingChecker> lineend;
-  
-  if (!EscapeConverter.CanConvert(escape.At(1).rawcode()) &&
+
+  lexer::TermLexer<term::IntralineWhitespace> intraline;
+  lexer::TermLexer<term::LineEnding> lineend;
+
+  if (!EscapeConverter().CanConvert(escape.At(1).rawcode()) &&
       !intraline.CheckToken(reader) && !lineend.CheckToken(reader)) {
-    unicode::UniString encoded_string("invalid escape sequence : ");
+    unicode::UniString encoded_string(
+        unicode::Convert("invalid escape sequence : "));
     encoded_string.Append(escape);
     THROW_EXCEPTION_(lexer::LexException, encoded_string);
   }
@@ -65,22 +69,24 @@ bool lexer::EscapeLexer::Lex(reader::EncodingReader* reader,
 
 // \<intraline whitespace>に該当する場合、返却されるcodeは0と
 // なります。
+// Convertの直前でreader->Readとしているのは、直前で読み出されていない
+// \<.>の<.>にあたる部分を読み飛ばすためです。
 unsigned int lexer::EscapeLexer::ConvertEscapeToCode(
     const unicode::UniString& escape, reader::EncodingReader* reader) {
   unsigned int code = 0;
-  lexer::TermLexer<term::IntralineWhiteSpaceChecker> intraline;
-  lexer::TermLexer<term::LineEndingChecker> lineend;
+  lexer::TermLexer<term::IntralineWhitespace> intraline;
+  lexer::TermLexer<term::LineEnding> lineend;
 
   if (!intraline.CheckToken(reader) && !lineend.CheckToken(reader)) {
     lexer::EscapeConverter converter;
-    if (converter.CanConvert(escape.At(1).rawcode())) {
-      code = converter.Convert(escape.At(1).rawcode());
-    } else {
+    if (!converter.CanConvert(escape.At(1).rawcode())) {
       unicode::UniString encoded_string(
           unicode::Convert("invalid escape sequence : "));
       encoded_string.Append(escape);
       THROW_EXCEPTION_(lexer::LexException, encoded_string);
     }
+    reader->Read();
+    code = converter.Convert(escape.At(1).rawcode());
   } else {
     ReadIntralines(reader);
   }
@@ -91,12 +97,11 @@ unsigned int lexer::EscapeLexer::ConvertEscapeToCode(
 // 処理の先頭で1文字だけReadしているのは、すでに\と次の文字が
 // 読出されているためです。
 void lexer::EscapeLexer::ReadIntralines(reader::EncodingReader* reader) {
-  lexer::TermLexer<term::IntralineWhiteSpaceChecker> intraline;
-  lexer::TermLexer<term::LineEndingChecker> lineend;
+  lexer::TermLexer<term::IntralineWhitespace> intraline;
+  lexer::TermLexer<term::LineEnding> lineend;
 
-  reader->Read();
   while (intraline.CheckToken(reader) && !reader->IsEof()) {
-    intraline.ReadToken(reader);
+    reader->Read(intraline.ReadToken(reader));
   }
 
   if (!lineend.CheckToken(reader)) {
@@ -104,10 +109,10 @@ void lexer::EscapeLexer::ReadIntralines(reader::EncodingReader* reader) {
     THROW_EXCEPTION_(lexer::LexException,
                      unicode::Convert("must line ending after whitespaces"));
   }
-  lineend.ReadToken(reader);
+  reader->Read(lineend.ReadToken(reader));
 
   while (intraline.CheckToken(reader) && !reader->IsEof()) {
-    intraline.ReadToken(reader);
+    reader->Read(intraline.ReadToken(reader));
   }
 }
 
@@ -118,33 +123,27 @@ void lexer::EscapeLexer::ReadIntralines(reader::EncodingReader* reader) {
 // 空白のみである場合、その間の空白及び改行は無視され、文字列は継続している
 // とみなされます。
 lexer::Lexeme* lexer::StringLexer::Lex(reader::EncodingReader* reader) {
-  term::StringDelimiterChecker string_delimiter;
-  {
-    unicode::UniChar head(reader->Read());
-    if (!string_delimiter(head)) {
-      return NULL;
-    }
+  lexer::TermLexer<term::StringDoubleQuote> string_delimiter;
+  if (!string_delimiter.CheckToken(reader)) {
+    return NULL;
   }
+  reader->Read(string_delimiter.ReadToken(reader));
 
-  term::StarndardDelimiterChecker std_delimiter;
-  term::WhitespaceChecker white_delimiter;
-  term::LineEndingChecker lineending_checker;
-
+  lexer::EscapeLexer escape;
   unicode::UniString str;
   bool syntax_ok = false;
 
-  while (!reader->IsEof() && !syntax_ok) {
-    unicode::UniChar tmp(reader->Peek());
-
-    if (string_delimiter(tmp)) {
-      reader->Read();
+  while (!reader->IsEof()) {
+    if (string_delimiter.CheckToken(reader)) {
+      reader->Read(string_delimiter.ReadToken(reader));
       syntax_ok = true;
       break;
     }
 
-    if (lineending_checker(tmp)) {
-      while (!reader->IsEof() && (white_delimiter(tmp) || std_delimiter(tmp))) {
-        reader->Read();
+    unsigned int code = 0;
+    if (escape.Lex(reader, &code)) {
+      if (code != 0) {
+        str.Append(unicode::UniChar(code));
       }
     } else {
       str.Append(unicode::UniChar(reader->Read()));
index aea82be..fcc4b45 100755 (executable)
@@ -69,7 +69,7 @@ class EscapeLexer {
 
   // エスケープシーケンスを判断する際に、判断基準とする読出
   // 文字数です。
-  static const int kEscapeValidseLength = 2;
+  static const int kEscapeValidLength = 2;
 
 public:
   EscapeLexer() {}
index ba44747..780cd3c 100755 (executable)
@@ -7,7 +7,7 @@ namespace unicode = utakata::unicode;
 namespace reader = utakata::reader;
 
 // 宣言のコメントを参照してください。
-bool term::Delimiter::operator()(reader::EncodingReader* reader,
+bool term::Delimiter::operator()(reader::IReader* reader,
                                  unsigned int* size) {
   unicode::UniChar ch(reader->Peek());
   switch (ch.rawcode()) {
@@ -27,7 +27,7 @@ bool term::Delimiter::operator()(reader::EncodingReader* reader,
 
 
 // 宣言のコメントを参照してください。
-bool term::Whitespace::operator()(reader::EncodingReader* reader,
+bool term::Whitespace::operator()(reader::IReader* reader,
                                          unsigned int* size) {
   unicode::UniChar ch(reader->Peek());
   switch (ch.rawcode()) {
@@ -46,7 +46,7 @@ bool term::Whitespace::operator()(reader::EncodingReader* reader,
 
 // targetが\rである場合、次の一文字のチェックも必要となりますが、
 // \r単体である場合でも、改行として見做されます。
-bool term::LineEnding::operator()(reader::EncodingReader* reader,
+bool term::LineEnding::operator()(reader::IReader* reader,
                                          unsigned int* size) {
   unicode::UniChar ch(reader->Peek());
   switch (ch.rawcode()) {
@@ -54,7 +54,7 @@ bool term::LineEnding::operator()(reader::EncodingReader* reader,
       *size = 1;
       return true;
     case '\r': {
-      unicode::UniString ch2(reader->Peek(2));
+      unicode::UniString ch2(unicode::Convert(reader->Peek(2)));
       if (ch2.At(0).rawcode() == '\r' && ch2.At(1).rawcode() == '\n') {
         *size = 2;
       } else {
@@ -68,7 +68,18 @@ bool term::LineEnding::operator()(reader::EncodingReader* reader,
 }
 
 // 宣言のコメントを参照してください。
-bool term::HexValue::operator()(reader::EncodingReader* reader,
+bool term::StringDoubleQuote::operator()(reader::IReader* reader,
+                                         unsigned int* size) {
+  unicode::UniChar ch(reader->Peek());
+  if (ch.rawcode() == '"') {
+    *size = 1;
+    return true;
+  }
+  return false;
+}
+
+// 宣言のコメントを参照してください。
+bool term::HexValue::operator()(reader::IReader* reader,
                                 unsigned int* size) {
   unicode::UniChar ch(reader->Peek());
   if (('a' <= ch.rawcode() && ch.rawcode() <= 'f') ||
@@ -88,51 +99,170 @@ bool term::HexValueChecker::operator()(const unicode::UniChar& ch) {
 }
 
 // 宣言のコメントを参照してください。
-bool term::StringDoubleQuote::operator()(reader::EncodingReader* reader,
-                                         unsigned int* size) {
+bool term::IntralineWhitespace::operator()(reader::IReader* reader,
+                                           unsigned int* size) {
   unicode::UniChar ch(reader->Peek());
-  if (ch.rawcode() == '"') {
+  if (ch.rawcode() == ' ' || ch.rawcode() == '\t') {
     *size = 1;
     return true;
   }
   return false;
 }
 
-// prefixは2文字未満である場合は正常なプレフィックスでは無いとして処理を行いません。
-bool term::NumberPrefixChecker::operator()(const unicode::UniString& str) {
-  if (str.GetSize() < 2) {
-    return false;
+// 宣言のコメントを参照してください。
+bool term::Letter::operator()(reader::IReader* reader,
+                              unsigned int* size) {
+  unicode::UniChar ch(reader->Peek());
+  if (unicode::IsAlphabet(ch)) {
+    *size = 1;
+    return true;
   }
+  return false;
+}
 
-  const unicode::UniChar& first_sharp = str.At(0);
-  const unicode::UniChar& radix_type = str.At(0);
-  if (first_sharp.rawcode() == '#') {
-    if (radix_type.rawcode() == 'b' || radix_type.rawcode() == 'B' ||
-        radix_type.rawcode() == 'o' || radix_type.rawcode() == 'O' ||
-        radix_type.rawcode() == 'x' || radix_type.rawcode() == 'X' ||
-        radix_type.rawcode() == 'd' || radix_type.rawcode() == 'D') {
+// 宣言のコメントを参照してください。
+bool term::SpecialInitial::operator()(reader::IReader* reader,
+                              unsigned int* size) {
+  unicode::UniChar ch(reader->Peek());
+  switch (ch.rawcode()) {
+    case kExclamation:
+    case kDoller:
+    case kPercentage:
+    case kAmpersand:
+    case kAsterisk:
+    case kSlash:
+    case kColon:
+    case kLessThan:
+    case kEqual:
+    case kGreaterThan:
+    case kQuestion:
+    case kCap:
+    case kUnderscore:
+    case kTilda:
+      *size = 1;
       return true;
-    }
+    default:
+      return false;
   }
-  return false;
 }
 
-// exactnessは2文字であるため、渡された文字列のサイズが2未満である場合には
-// exactnessとみなしません。
-bool term::NumberExactnessChecker::operator()(
-    const unicode::UniString& str) {
-  if (str.GetSize() < 2) {
-    return false;
+// 宣言のコメントを参照してください。
+bool term::SpecialSubsequent::operator()(reader::IReader* reader,
+                                         unsigned int* size) {
+  unicode::UniChar ch(reader->Peek());
+  switch (ch.rawcode()) {
+    case kPlus:
+    case kMinus:
+    case kDot:
+    case kAtmark:
+      *size = 1;
+      return true;
+    default:
+      return false;
   }
+}
 
-  unicode::UniChar first_sharp = str.At(0);
-  unicode::UniChar exact_type = str.At(1);
+// 宣言のコメントを参照してください。
+bool term::Digit::operator()(reader::IReader* reader,
+                             unsigned int* size) {
+  unicode::UniChar ch(reader->Peek());
+  if (unicode::IsNumeric(ch)) {
+    *size = 1;
+    return true;
+  }
+  return false;
+}
 
-  if (first_sharp.rawcode() == '#') {
-    if (exact_type.rawcode() == 'i' || exact_type.rawcode() == 'I' ||
-        exact_type.rawcode() == 'e' || exact_type.rawcode() == 'E') {
+// 宣言のコメントを参照してください。
+bool term::PeculiarIdentifier::operator()(reader::IReader* reader,
+                                          unsigned int* size) {
+  unicode::UniChar ch(reader->Peek());
+  if (ch.rawcode() == '+') {
+    *size = 1;
+    return true;
+  } else if (ch.rawcode() == '-') {
+    unicode::UniString tmp(unicode::Convert(reader->Peek(2)));
+    if (tmp == unicode::Convert("->")) {
+      *size = 2;
+    } else {
+      *size = 1;
+    }
+    return true;
+  } else if (ch.rawcode() == '.') {
+    unicode::UniString tmp(unicode::Convert(reader->Peek(3)));
+    if (tmp == unicode::Convert("...")) {
+      *size = 3;
       return true;
     }
   }
   return false;
 }
+
+// 宣言のコメントを参照してください。
+bool term::ExponentMarker::operator()(reader::IReader* reader,
+                                      unsigned int* size) {
+  unicode::UniChar ch(reader->Peek());
+  switch (ch.rawcode()) {
+    case 'e':
+    case 'E':
+    case 'l':
+    case 'L':
+    case 's':
+    case 'S':
+    case 'f':
+    case 'F':
+    case 'd':
+    case 'D':
+      *size = 1;
+      return true;
+    default:
+      return false;
+  }
+}
+
+// 宣言のコメントを参照してください。
+bool term::Sign::operator()(reader::IReader* reader,
+                            unsigned int* size) {
+  unicode::UniChar ch(reader->Peek());
+  if (ch.rawcode() == '+' || ch.rawcode() == '-') {
+    *size = 1;
+    return true;
+  }
+  *size = 0;
+  return true;
+}
+
+// 宣言のコメントを参照してください。
+bool term::Exactness::operator()(reader::IReader* reader,
+                                 unsigned int* size) {
+  unicode::UniString str(unicode::Convert(reader->Peek(2)));
+  if (str == unicode::Convert("#e") || str == unicode::Convert("#E") ||
+      str == unicode::Convert("#i") || str == unicode::Convert("#I")) {
+    *size = 2;
+    return true;
+  }
+  *size = 0;
+  return true;
+}
+
+// 宣言のコメントを参照してください。
+bool term::Naninf::operator()(reader::IReader* reader,
+                              unsigned int* size) {
+  unicode::UniString code(unicode::Convert(reader->Peek(kNaninfSize)));
+  if (code == unicode::Convert("nan.0") || code == unicode::Convert("inf.0")) {
+    *size = kNaninfSize;
+    return true;
+  }
+  return false;
+}
+
+// 宣言のコメントを参照してください。
+bool term::Boolean::operator()(reader::IReader* reader, unsigned int* size) {
+  unicode::UniString code(unicode::Convert(reader->Peek(kBooleanReadSize)));
+  if (code == unicode::Convert("#f") || code == unicode::Convert("#F") ||
+      code == unicode::Convert("#t") || code == unicode::Convert("#T")) {
+    *size = kBooleanReadSize;
+    return true;
+  }
+  return false;
+}
index 64aeea4..96b5f55 100644 (file)
@@ -4,27 +4,31 @@
 #ifndef _UTAKATA_SRC_LEXER_TERM_CHECKER_H_
 #define _UTAKATA_SRC_LEXER_TERM_CHECKER_H_
 
+// #include "src/unicode.h"
+#include "src/reader_interface.h"
+
 namespace utakata {
+namespace unicode {
+class UniChar;
+}
+
 namespace reader {
-class EncodingReader;
+class IReader;
 }
 
 namespace lexer {
 namespace term {
 
-class Delimiter {
-  // 通常のデリミタとして処理するべきで文字であるか調査します。
- public:
-
+// 通常のデリミタとして処理するべきで文字であるか調査します。
+struct Delimiter {
   // 渡された文字が以下の文字である場合、デリミタと判定されます。
   // ( ) [ ] " ; # に加え、WhitespaceCheckerがtrueを返す文字
   // 渡されたreaderの読み出し位置は更新されません。
-  bool operator()(reader::EncodingReader* reader, unsigned int* size);
+  bool operator()(reader::IReader* reader, unsigned int* size);
 };
 
-class Whitespace {
-  // 空白として認識される文字であるかどうか調査します。
- public:
+// 空白として認識される文字であるかどうか調査します。
+struct Whitespace {
   // 空白として認識されるデータである場合、trueを返します。
   // 空白として認識される文字は以下になります。
   // --------------------
@@ -36,43 +40,288 @@ class Whitespace {
   // page 改ページ
   // --------------------
   // 渡されたreaderの読み出し位置は更新されません。
-  bool operator()(reader::EncodingReader* reader, unsigned int* size);
+  bool operator()(reader::IReader* reader, unsigned int* size);
 };
 
-class LineEnding {
-  // 改行と認識される文字であるかどうかを調査します。但し、改行は複数の
-  // 文字である場合があるため、chの次の位置の文字列も必要となります。
- public:
 
+// 改行と認識される文字であるかどうかを調査します。但し、改行は複数の
+// 文字である場合があるため、chの次の位置の文字列も必要となります。
+struct LineEnding {
   // 渡されたreaderより、改行文字が先頭である場合、trueを返します。
   // 渡されたreaderの読み出し位置は更新されません。
-  bool operator()(reader::EncodingReader* reader, unsigned int* size);
+  bool operator()(reader::IReader* reader, unsigned int* size);
 };
 
-class StringDoubleQuote {
-  // 文字列を分割するためのデリミタであるかどうか調査します。
- public:
-
+// 文字列を分割するためのデリミタであるかどうか調査します。
+struct StringDoubleQuote {
   // 渡されたreaderの先頭が " である場合、trueを返します。
   // 渡されたreaderの読み出し位置は更新されません。
-  bool operator()(reader::EncodingReader* reader, unsigned int* size);
+  bool operator()(reader::IReader* reader, unsigned int* size);
 };
 
-class HexValue {
-  // 16進数で利用可能な文字の範囲であるかどうか調査します。
- public:
+
+// 16進数で利用可能な文字の範囲であるかどうか調査します。
+struct HexValue {
   // 16進数で利用可能とされる文字の範囲である場合、trueを返します。
   // [a-fA-F0-9] が該当し、大文字と小文字の区別は行いません。
   // 渡されたreaderの読み出し位置は更新されません。
-  bool operator()(reader::EncodingReader* reader, unsigned int* size);
+  bool operator()(reader::IReader* reader, unsigned int* size);
 };
 
-class HexValueChecker {
- public:
+struct HexValueChecker {
   // 渡された文字が、HexValueの領域内であるかどうかを返します。
   bool operator()(const unicode::UniChar& ch);
 };
 
+
+// 文字列中などの空白として扱われる文字をチェックします。
+struct IntralineWhitespace {
+  // 文字列中などの限定された空白としてチェックされる文字は以下に
+  // なります。
+  // --------------------
+  // space 空白
+  // tab タブ
+  // --------------------
+  // 渡されたreaderの読み出し位置は更新されません。
+  bool operator()(reader::IReader* reader, unsigned int* size);
+};
+
+
+// 対象の文字が、アルファベットであるかどうかをチェックします。
+// アルファベットの大文字/小文字の判別は行いません。
+struct Letter {
+  // 与えられたreaderの先頭が、アルファベットである場合、trueを返します。
+  bool operator()(reader::IReader* reader, unsigned int* size);
+};
+
+// 識別子中の特別な記号列であるかどうかをチェックします。
+// 以下の文字のいずれかである場合、SpecialInitialとしてtrueが返されます。
+// ! $ % & * / : < = > ? ^ _ ~
+struct SpecialInitial {
+  static const unsigned int kExclamation = '!';
+  static const unsigned int kDoller      = '$';
+  static const unsigned int kPercentage  = '%';
+  static const unsigned int kAmpersand   = '&';
+  static const unsigned int kAsterisk    = '*';
+  static const unsigned int kSlash       = '/';
+  static const unsigned int kColon       = ':';
+  static const unsigned int kLessThan    = '<';
+  static const unsigned int kEqual       = '=';
+  static const unsigned int kGreaterThan = '>';
+  static const unsigned int kQuestion    = '?';
+  static const unsigned int kCap         = '^';
+  static const unsigned int kUnderscore  = '_';
+  static const unsigned int kTilda       = '~';
+
+  // 与えらえたreaderの先頭が、SpecialInitialであるかどうかをチェックします。
+  bool operator()(reader::IReader* reader, unsigned int* size);
+};
+
+// <special subsequent>であるかどうかをチェックする機能を提供します。
+// 該当する文字は以下の通りです。
+// + - . @
+struct SpecialSubsequent {
+  static const unsigned int kPlus   = '+';
+  static const unsigned int kMinus  = '-';
+  static const unsigned int kDot    = '.';
+  static const unsigned int kAtmark = '@';
+  // 与えられたreaderの先頭が、special subsequentである場合、trueを
+  // 返します。
+  bool operator()(reader::IReader* reader, unsigned int* size);
+};
+
+// 0〜9の数値に一致する文字をチェックします。
+struct Digit {
+  // 与えられたreaderの先頭が、0〜9の数値である場合、trueを返します。
+  bool operator()(reader::IReader* reader, unsigned int* size);
+};
+
+
+// <peculiar identifier>の内、先頭にのみ出現する終端記号を
+// チェックします。対象となる終端記号は以下の通りです。
+// + - ... ->
+struct PeculiarIdentifier {
+  // 与えられたreaderの先頭から、終端記号に一致する場合、
+  // trueを返します。
+  bool operator()(reader::IReader* reader, unsigned int* size);
+};
+
+// <number>における、<digit N>を解釈します。
+// 各digit別にテンプレート特化が行われます。2,8,10,16以外の
+// digitが指定された場合、常にfalseが返されます。
+template<int N> struct NumberDigit {
+  bool operator()(reader::IReader* reader, unsigned int* size) {
+    return false;
+  }
+};
+
+// <digit 2>について解釈を行います。0、1にのみマッチします。
+template<> struct NumberDigit<2> {
+  bool operator()(reader::IReader* reader, unsigned int* size) {
+    namespace unicode = utakata::unicode;
+    unicode::UniChar ch(reader->Peek());
+    if (ch.rawcode() == '0' || ch.rawcode() == '1') {
+      *size = 1;
+      return true;
+    }
+    return false;
+  }
+
+  bool operator()(const unicode::UniChar& ch) {
+    return ch.rawcode() == '0' || ch.rawcode() == '1';
+  }
+};
+
+// <digit 8>について解釈を行います。0-7にのみマッチします。
+template<> struct NumberDigit<8> {
+  bool operator()(reader::IReader* reader, unsigned int* size) {
+    namespace unicode = utakata::unicode;
+    unicode::UniChar ch(reader->Peek());
+    if (ch.rawcode() >= '0' && ch.rawcode() <= '7') {
+      *size = 1;
+      return true;
+    }
+    return false;
+  }
+
+  bool operator()(const unicode::UniChar& ch) {
+    return ch.rawcode() >= '0' && ch.rawcode() <= '7';
+  }
+};
+
+
+// <digit 10>について解釈を行います。<digit>と同一です。
+template<>
+struct NumberDigit<10> {
+  bool operator()(reader::IReader* reader, unsigned int* size) {
+    namespace term = utakata::lexer::term;
+    return term::Digit()(reader, size);
+  }
+
+  bool operator()(const unicode::UniChar& ch) {
+    return unicode::IsNumeric(ch);
+  }
+};
+
+
+// <digit 16>について解釈を行います。<hex digit>と同一です。
+template<> struct NumberDigit<16> {
+  bool operator()(reader::IReader* reader, unsigned int* size) {
+    namespace term = utakata::lexer::term;
+    return term::HexValue()(reader, size);
+  }
+
+  bool operator()(const unicode::UniChar& ch) {
+    return term::HexValueChecker()(ch);
+  }
+};
+
+// <exponent marker>に一致するデータを解釈します。
+// <exponent marker>は、以下の文字のいずれか一文字にのみ一致します。
+// e E s S f F d D l L
+struct ExponentMarker {
+  bool operator()(reader::IReader* reader, unsigned int* size);
+};
+
+
+// <sign>に一致するデータを解釈します。+ -のいずれかではない場合でも、
+// trueを返却します。
+struct Sign {
+  bool operator()(reader::IReader* reader, unsigned int* size);
+};
+
+
+// <exactness>に一致するデータを解釈します。以下のいずれかである場合、
+// trueを返却します。
+// #e #E #i #I
+// また、上記の文字に一致しない場合にもtrueを返却します。
+struct Exactness {
+  bool operator()(reader::IReader* reader, unsigned int* size);
+};
+
+
+// <number>における、<radix N>を解釈します。
+// 各radix別にテンプレート特化が行われます。2,8,10,16以外の
+// radixが指定された場合、常にfalseが返されます。
+template<int N> struct Radix {
+  bool operator()(reader::IReader* reader, unsigned int* size) {
+    return false;
+  }
+};
+
+// <radix 2>について解釈を行います。#b #Bにのみマッチします。
+template<> struct Radix<2> {
+  bool operator()(reader::IReader* reader, unsigned int* size) {
+    unicode::UniString str(unicode::Convert(reader->Peek(2)));
+    if (str == unicode::Convert("#b") || str == unicode::Convert("#B")) {
+      *size = 2;
+      return true;
+    }
+    return false;
+
+  }
+};
+
+// <radix 8>について解釈を行います。#o #Oにのみマッチします。
+template<> struct Radix<8> {
+  bool operator()(reader::IReader* reader, unsigned int* size) {
+    unicode::UniString str(unicode::Convert(reader->Peek(2)));
+    if (str == unicode::Convert("#o") || str == unicode::Convert("#O")) {
+      *size = 2;
+      return true;
+    }
+    return false;
+  }
+};
+
+// <radix 10>について解釈を行います。#d #Dにマッチします。
+// この場合にのみ、いずれでも無い場合でもtrueを返します。
+template<> struct Radix<10> {
+  bool operator()(reader::IReader* reader, unsigned int* size) {
+    unicode::UniString str(unicode::Convert(reader->Peek(2)));
+    if (str == unicode::Convert("#d") || str == unicode::Convert("#D")) {
+      *size = 2;
+      return true;
+    }
+    *size = 0;
+    return true;
+  }
+};
+
+// <radix 16>について解釈を行います。#x #Xと同一です。
+template<> struct Radix<16> {
+  bool operator()(reader::IReader* reader, unsigned int* size) {
+    unicode::UniString str(unicode::Convert(reader->Peek(2)));
+    if (str == unicode::Convert("#x") || str == unicode::Convert("#X")) {
+      *size = 2;
+      return true;
+    }
+    return false;
+  }
+};
+
+// <naninf>に一致するtermであるかを調査する機能を提供します。
+// <naninf>は以下のように定義されています。
+// nan.0 | inf.0
+struct Naninf {
+
+  // 読み出すべきサイズを設定します。
+  static const int kNaninfSize = 5;
+
+  // readerの先頭から、<naninf>に一致するかどうかを返します。
+  // trueを返した場合、sizeにはトークンの文字数が返却されます。
+  bool operator()(reader::IReader* reader, unsigned int* size);
+};
+
+// Booleanにおける終端記号を調査する機能を提供します。
+struct Boolean {
+  static const int kBooleanReadSize = 2;
+
+  // readerの先頭から、<boolean>に一致するかどうかを返します。
+  // trueを返した場合、sizeにはトークンの文字数が返却されます。
+  bool operator()(reader::IReader* reader, unsigned int* size);
+};
+}
 }
 }
 
index ac9780e..a6698bc 100755 (executable)
@@ -20,21 +20,37 @@ namespace utakata {
 namespace unicode {
 class UniChar;
 class UniString;
-};
+}
 
 namespace reader {
 class EncodingReader;
-};
+}
 
 namespace lexer {
 
+// 渡されたEncodingReaderについて、トークンの存在チェックと
+// トークンの読み捨てを行ないます。
+class TermLexerBase {
+ public:
+  virtual ~TermLexerBase() {}
+
+  // 渡されたreaderの先頭から、T()によって判別されるトークンが
+  // 読出せる場合、trueが返されます。
+  // 渡されたreaderの読み出し位置は更新されません。
+  virtual bool CheckToken(reader::EncodingReader* reader) = 0;
+
+  // 渡されたreaderより、T()によって判別されたトークンを読み飛ばします。
+  // 読み出しが行われた場合、readerの読み出し位置は更新されます。
+  virtual int ReadToken(reader::EncodingReader* reader) = 0;
+};
+
 // 関数オブジェクトを渡すことで、渡した関数オブジェクトによって
 // トークンの読み出しを行います。
 // 関数オブジェクトのインターフェースは、
 // bool operator()(EncodingReader*, unsigned int*)
 // という形でなければなりません。
 template<class T>
-class TermLexer {
+class TermLexer : public TermLexerBase {
  public:
 
   TermLexer() : checker_() {}
@@ -43,11 +59,11 @@ class TermLexer {
   // 読出せる場合、trueが返されます。
   // 渡されたreaderの読み出し位置は更新されません。
   bool CheckToken(reader::EncodingReader* reader) {
-      unsigned int size = 0;
-      if (!checker_(reader, &size)) {
-        return false;
-      }
-      return true;
+    unsigned int size = 0;
+    if (!checker_(reader, &size)) {
+      return false;
+    }
+    return true;
   }
 
   // 渡されたreaderより、T()によって判別されたトークンを読み飛ばします。
@@ -64,25 +80,8 @@ class TermLexer {
 
   // ()を定義した関数オブジェクトです。
   T checker_;
-}
-
-class NumberPrefixChecker {
-  // <number>のプレフィックスであるかどうか調査します。
- public:
-
-  // プレフィックスは以下の形式です。
-  // #[ b | B | o | O | d | D | h | H ]
-  bool operator()(reader::EncodingReader* reader);
 };
 
-class NumberExactnessChecker {
-  // <number>の正確性のデリミタであるかどうか調査します。
- public:
-
-  // exactnessのデリミタは以下の形式です。
-  // #[ i | I | e | E ]
-  bool operator()(const unicode::UniString& str);
-};
 }
 }
 #endif /* _UTAKATA_SRC_LEXER_DELIMITERS_H_ */
index 874f6af..579cd16 100755 (executable)
@@ -7,6 +7,17 @@
 namespace unicode = utakata::unicode;
 
 // 宣言のコメントを参照してください。
+unicode::UniString::UniString(const std::vector<unsigned int>& multis)
+    : unicode_chars_() {
+  unicode::Append(*this, multis);
+}
+
+// 宣言のコメントを参照してください。
+unicode::UniString::UniString(const std::string& str) : unicode_chars_() {
+  unicode::Append(*this, str);
+}
+
+// 宣言のコメントを参照してください。
 void unicode::UniString::Assign(const unicode::UniChar& ch, int num) {
   unicode::UniString tmp(ch, num);
   Swap(tmp);
@@ -37,14 +48,6 @@ void unicode::UniString::Append(const unicode::UniChar& ch) {
   unicode_chars_.push_back(ch);
 }
 
-// 宣言のコメントを参照してください。
-void unicode::UniString::Append(const std::string& str) {
-  std::string::const_iterator it = str.begin(), end = str.end();
-  for (; it != end; ) {
-    unicode_chars_.push_back(unicode::UniChar(*it++));
-  }
-}
-
 // 渡されるのはstd::vectorのイテレータとなっていますので、そのまま
 // 設定することができます。
 void unicode::UniString::Insert(unicode::UniString::iterator it,
@@ -54,8 +57,8 @@ void unicode::UniString::Insert(unicode::UniString::iterator it,
 }
 
 void unicode::UniString::Insert(unicode::UniString::iterator it,
-                       unicode::UniString::const_iterator begin,
-                       unicode::UniString::const_iterator last) {
+                                unicode::UniString::const_iterator begin,
+                                unicode::UniString::const_iterator last) {
   unicode_chars_.insert(it, begin, last);
 }
 
@@ -79,7 +82,7 @@ bool unicode::UniString::operator<(const unicode::UniString& str) const {
                     std::equal_to<unicode::UniChar>());
 
   if ((it.first != (unicode_chars_.begin() + length))) {
-    if ((*(it.first) < *(it.second))) {
+    if (*(it.first) < *(it.second)) {
       return true;
     } else {
       return false;
index 204b971..6070093 100755 (executable)
 #include <algorithm>
 #include <string>
 #include "lib/crtp.h"
+#include "lib/range.h"
 
 namespace utakata {
 namespace unicode {
 
 typedef unsigned int unicode_t;
 
+// Unicode一文字を表現するためのオブジェクトです。
+// unicodeはunsigned intで表現され、組込型と同様の利用ができるように
+// 設計されています。
+// 各operator overloadは、同様の機能を提供する各関数によって機能が
+// 実装されており、各operator overloadを利用しないことも可能です。
 class UniChar : private akebono::crtp::less_than_comparable<UniChar>,
                 private akebono::crtp::equal_comparable<UniChar> {
-  // Unicode一文字を表現するためのオブジェクトです。
-  // unicodeはunsigned intで表現され、組込型と同様の利用ができるように
-  // 設計されています。
-  // 各operator overloadは、同様の機能を提供する各関数によって機能が
-  // 実装されており、各operator overloadを利用しないことも可能です。
  public:
 
   // Schemeシステム内で最大値となるUnicode値です。この値以上の
@@ -96,23 +97,32 @@ inline bool IsValidUnicode(const UniChar& unichar) {
         unichar.rawcode() <= UniChar::kExclusionMax);
 }
 
+
+// UniCharを連結したコンテナのラッパーとして機能し、擬似的な
+// Unicode文字列を提供します。
+// 相互での比較などもサポートし、utakataの内部全般で
+// 標準として使用することが想定されています。
+// また、内部へのiteratorを取得することができるため、標準
+// アルゴリズムを利用することができます。
 class UniString : private akebono::crtp::less_than_comparable<UniString>,
                   private akebono::crtp::equal_comparable<UniString> {
-  // UniCharを連結したコンテナのラッパーとして機能し、擬似的な
-  // Unicode文字列を提供します。
-  // 相互での比較などもサポートし、utakataの内部全般で
-  // 標準として使用することが想定されています。
-  // また、内部へのiteratorを取得することができるため、標準
-  // アルゴリズムを利用することができます。
  public:
   // 内部で利用されるiteratorを定義します。
   typedef std::vector<UniChar>::iterator iterator;
   typedef std::vector<UniChar>::const_iterator const_iterator;
 
   UniString() : unicode_chars_() {}
-  // 第一引数のchをnum個数分設定する
+  // 第一引数のchをnum個数分の文字列で初期化します
   UniString(const UniChar& ch, int num) : unicode_chars_(num, ch) {}
+  // 単純なコピーコンストラクタです。
   UniString(const UniString& str) : unicode_chars_(str.unicode_chars_) {}
+
+  // 複数のunsigned intをUniCharとして変換し、文字列を構成します。
+  explicit UniString(const std::vector<unsigned int>& multis);
+
+  // std::stringの限定的な変換を行います。この時、内部バイトは意識されず、
+  // 単純にstd::stringの一文字をUniStringの一文字として、単純に変換します。
+  explicit UniString(const std::string& str);
   virtual ~UniString() {}
 
   // 渡されたUniCharを、numだけ連続した文字列を代入します。
@@ -122,6 +132,15 @@ class UniString : private akebono::crtp::less_than_comparable<UniString>,
   // 渡したUniStringをコピーします。コピー前の値は破棄されます。
   void Assign(const UniString& str);
 
+  // 複数のunsigned intをUniCharとして変換し、文字列を構成します。
+  // また、この関数はコンストラクタの内部で利用されます。
+  void Assign(const std::vector<unsigned int>& multis);
+
+  // std::stringの限定的な変換を行います。この時、内部バイトは意識されず、
+  // 単純にstd::stringの一文字をUniStringの一文字として、単純に変換します。
+  // また、この関数はコンストラクタの内部で利用されます。
+  void Assign(const std::string& str);
+
   // 文字列の先頭を指すiteratorを取得します。
   const_iterator Begin() const {return unicode_chars_.begin();}
   iterator Begin() {return unicode_chars_.begin();}
@@ -152,11 +171,6 @@ class UniString : private akebono::crtp::less_than_comparable<UniString>,
   void Append(const UniString& str);
   void Append(const UniChar& ch);
 
-  // 渡されたstd::stringを、UniStringの末尾に追加します。
-  // std::stringは、全てasciiであるとして、一文字がUniChar一つに
-  // 変換されて渡されます。
-  void Append(const std::string& str);
-
   // 渡されたUniStringと内容が完全に一致している場合trueを返します。
   // ここでの完全一致とは、文字列長と文字列の内容が完全に一致している
   // 事を示します。
@@ -180,6 +194,31 @@ class UniString : private akebono::crtp::less_than_comparable<UniString>,
   std::vector<UniChar> unicode_chars_;
 };
 
+namespace detail {
+
+// utakata::unicode名前空間内で利用される、コンテナからUniStringへの
+// 変換を行うための関数オブジェクトです。
+template<typename T>
+struct UnicodeConverter : public std::unary_function<T, void> {
+  UnicodeConverter(UniString& string)
+      : string_(string) {}
+
+  // 渡されたデータを、UniCharに変換語、string_の末尾に追加していきます。
+  void operator()(const T& t) {
+    string_.Append(utakata::unicode::UniChar(static_cast<unicode_t>(t)));
+  }
+  UniString& string_;
+};
+
+// 渡された型をUnicodeConverterのテンプレート引数として利用し、UnicodeConverterを生成します。
+// この時、TはT::value_typeを保持している必要があります。
+template <typename T>
+utakata::unicode::detail::UnicodeConverter<typename T::value_type>
+MakeConverter(const T& container, unicode::UniString& string) {
+  return utakata::unicode::detail::UnicodeConverter<typename T::value_type>(string);
+}
+}
+
 // 渡されたUnicodeから、beginの位置から末尾までの文字列をUniStringで返します。
 // beginが有効範囲外であった場合、std::range_eror例外が発生します。
 UniString Substring(const UniString& str, unsigned int begin);
@@ -203,6 +242,17 @@ UniString Convert(const std::string& target);
 // 一文字を、std::stringの1文字として強制的に変換します。
 std::string Convert(const UniString& string);
 
+// 渡されたデータを、targetの末尾に追加します。
+// この時、T は akebono::range::for_eachの引数として渡せるものである場合、
+// すべて受領します。
+// T として渡された型は、akebono::rangeの関数が適用可能である必要があります。
+template <typename T>
+bool Append(UniString& target, const T& multis) {
+  akebono::range::for_each(
+      multis, unicode::detail::MakeConverter(multis, target));
+  return true;
+}
+
 // lib/range.hを利用する際に必要となるbeginとendの特殊化関数を定義します。
 
 inline UniString::iterator begin(UniString& c) {return c.Begin();}
diff --git a/test/boolean_lexer_test.cpp b/test/boolean_lexer_test.cpp
new file mode 100755 (executable)
index 0000000..37d768a
--- /dev/null
@@ -0,0 +1,72 @@
+#include <test/gtest/gtest.h>
+#include "lib/textarrayformat.h"
+#include "src/lexer/boolean_lexer.h"
+#include "src/encoding_reader.h"
+#include "src/string_reader.h"
+#include "src/unicode.h"
+#include "lib/scoped_ptr.h"
+#include "src/utf8_transcoder.h"
+#include "src/lexeme.h"
+
+namespace textarrayformat = utility::textarrayformat;
+namespace lexer = utakata::lexer;
+namespace unicode = utakata::unicode;
+namespace reader = utakata::reader;
+namespace transcoder = utakata::transcoder;
+
+class BooleanLexerTest : public ::testing::Test {
+ protected:
+  virtual void SetUp() {
+    gen.reset(new textarrayformat::TextArrayGenerator("========="));
+    gen->Punctuate("#t #T #f #F #fd #!");
+  }
+
+  akebono::scoped_ptr<textarrayformat::TextArrayGenerator> gen;
+};
+
+TEST_F(BooleanLexerTest, BooleanCheck) {
+  textarrayformat::TextArrayReader textarray(*gen);
+
+  reader::StringReader sr(textarray.GetBlockAt(0));
+  reader::EncodingReader reader(&sr, new transcoder::UTF8Transcoder);
+
+  lexer::BooleanLexer lexer;
+  akebono::scoped_ptr<lexer::Lexeme> l(lexer.Lex(&reader));
+  EXPECT_TRUE(l.get() != NULL);
+  EXPECT_TRUE(l->string() == unicode::Convert("#t"));
+  EXPECT_EQ(l->string().GetSize(), 2);
+  EXPECT_EQ(l->type(), lexer::Lexeme::kBoolean);
+
+  reader.Read();
+  l.reset(lexer.Lex(&reader));
+  EXPECT_TRUE(l.get() != NULL);
+  EXPECT_TRUE(l->string() == unicode::Convert("#T"));
+  EXPECT_EQ(l->string().GetSize(), 2);
+  EXPECT_EQ(l->type(), lexer::Lexeme::kBoolean);
+
+  reader.Read();
+  l.reset(lexer.Lex(&reader));
+  EXPECT_TRUE(l.get() != NULL);
+  EXPECT_TRUE(l->string() == unicode::Convert("#f"));
+  EXPECT_EQ(l->string().GetSize(), 2);
+  EXPECT_EQ(l->type(), lexer::Lexeme::kBoolean);
+
+  reader.Read();
+  l.reset(lexer.Lex(&reader));
+  EXPECT_TRUE(l.get() != NULL);
+  EXPECT_TRUE(l->string() == unicode::Convert("#F"));
+  EXPECT_EQ(l->string().GetSize(), 2);
+  EXPECT_EQ(l->type(), lexer::Lexeme::kBoolean);
+
+  reader.Read();
+  EXPECT_THROW(lexer.Lex(&reader), lexer::LexException);
+
+  reader.Read(2);
+  l.reset(lexer.Lex(&reader));
+  EXPECT_TRUE(l.get() ==  NULL);
+}
+
+int main(int argc, char** argv) {
+  testing::InitGoogleTest(&argc, argv);
+  return RUN_ALL_TESTS();
+}
diff --git a/test/identifier_lexer_test.cpp b/test/identifier_lexer_test.cpp
new file mode 100755 (executable)
index 0000000..3848067
--- /dev/null
@@ -0,0 +1,159 @@
+#include <test/gtest/gtest.h>
+#include "lib/textarrayformat.h"
+#include "src/lexer/identifier_lexer.h"
+#include "src/encoding_reader.h"
+#include "src/string_reader.h"
+#include "src/unicode.h"
+#include "lib/scoped_ptr.h"
+#include "src/utf8_transcoder.h"
+#include "src/lexeme.h"
+
+namespace textarrayformat = utility::textarrayformat;
+namespace lexer = utakata::lexer;
+namespace unicode = utakata::unicode;
+namespace reader = utakata::reader;
+namespace transcoder = utakata::transcoder;
+
+class IdentifierLexerTest : public ::testing::Test {
+ protected:
+  virtual void SetUp() {
+    gen.reset(new textarrayformat::TextArrayGenerator("========="));
+    gen->Punctuate("lambda q soup");
+    gen->Punctuate("list->vector + ->-");
+    gen->Punctuate("<= a34kTMNs?");
+    gen->Punctuate("the-word-recursion-has-maney-meanings");
+    gen->Punctuate("!$%&*+-./:?@^_~");
+    gen->Punctuate("\\x0061;iueo ab\\x63;d");
+    gen->Punctuate("-- +> string+ ... ...s");
+  }
+
+  akebono::scoped_ptr<textarrayformat::TextArrayGenerator> gen;
+};
+
+TEST_F(IdentifierLexerTest, NormalIdentifer) {
+  textarrayformat::TextArrayReader textarray(*gen);
+
+  reader::StringReader sr(textarray.GetBlockAt(0));
+  reader::EncodingReader reader(&sr, new transcoder::UTF8Transcoder);
+  lexer::IdentifierLexer lexer;
+
+  akebono::scoped_ptr<lexer::Lexeme> l(lexer.Lex(&reader));
+  EXPECT_TRUE(l.get() != NULL);
+  EXPECT_TRUE(l->string() == unicode::Convert("lambda"));
+  EXPECT_EQ(l->string().GetSize(), 6);
+  EXPECT_EQ(l->type(), lexer::Lexeme::kIdentifier);
+
+  reader.Read();
+  l.reset(lexer.Lex(&reader));
+  EXPECT_TRUE(l.get() != NULL);
+  EXPECT_TRUE(l->string() == unicode::Convert("q"));
+  EXPECT_EQ(l->string().GetSize(), 1);
+  EXPECT_EQ(l->type(), lexer::Lexeme::kIdentifier);
+
+  reader.Read();
+  l.reset(lexer.Lex(&reader));
+  EXPECT_TRUE(l.get() != NULL);
+  EXPECT_TRUE(l->string() == unicode::Convert("soup"));
+  EXPECT_EQ(l->string().GetSize(), 4);
+  EXPECT_EQ(l->type(), lexer::Lexeme::kIdentifier);
+}
+
+
+TEST_F(IdentifierLexerTest, IgnoreCapital) {
+  textarrayformat::TextArrayReader textarray(*gen);
+
+  reader::StringReader sr(textarray.GetBlockAt(2));
+  reader::EncodingReader reader(&sr, new transcoder::UTF8Transcoder);
+
+  lexer::IdentifierLexer lexer;
+  akebono::scoped_ptr<lexer::Lexeme> l(lexer.Lex(&reader));
+  EXPECT_TRUE(l.get() != NULL);
+  EXPECT_TRUE(l->string() == unicode::Convert("<="));
+  EXPECT_EQ(l->string().GetSize(), 2);
+  EXPECT_EQ(l->type(), lexer::Lexeme::kIdentifier);
+
+  reader.Read();
+  l.reset(lexer.Lex(&reader));
+  EXPECT_TRUE(l.get() != NULL);
+  EXPECT_TRUE(l->string() == unicode::Convert("a34kTMNs?"));
+  EXPECT_EQ(l->string().GetSize(), 9);
+  EXPECT_EQ(l->type(), lexer::Lexeme::kIdentifier);
+}
+
+TEST_F(IdentifierLexerTest, LongIdentifer) {
+  textarrayformat::TextArrayReader textarray(*gen);
+
+  reader::StringReader sr(textarray.GetBlockAt(3));
+  reader::EncodingReader reader(&sr, new transcoder::UTF8Transcoder);
+  lexer::IdentifierLexer lexer;
+
+  akebono::scoped_ptr<lexer::Lexeme> l(lexer.Lex(&reader));
+  EXPECT_TRUE(l.get() != NULL);
+  EXPECT_TRUE(l->string() == unicode::Convert(
+      "the-word-recursion-has-maney-meanings"));
+  EXPECT_EQ(l->string().GetSize(), 37);
+  EXPECT_EQ(l->type(), lexer::Lexeme::kIdentifier);
+}
+
+TEST_F(IdentifierLexerTest, SpecialInitials) {
+  textarrayformat::TextArrayReader textarray(*gen);
+
+  reader::StringReader sr(textarray.GetBlockAt(4));
+  reader::EncodingReader reader(&sr, new transcoder::UTF8Transcoder);
+  lexer::IdentifierLexer lexer;
+
+  akebono::scoped_ptr<lexer::Lexeme> l(lexer.Lex(&reader));
+  EXPECT_TRUE(l.get() != NULL);
+  EXPECT_TRUE(l->string() == unicode::Convert("!$%&*+-./:?@^_~"));
+  EXPECT_EQ(l->string().GetSize(), 15);
+}
+
+TEST_F(IdentifierLexerTest, InlineEscape) {
+  textarrayformat::TextArrayReader textarray(*gen);
+
+  reader::StringReader sr(textarray.GetBlockAt(5));
+  reader::EncodingReader reader(&sr, new transcoder::UTF8Transcoder);
+  lexer::IdentifierLexer lexer;
+
+  akebono::scoped_ptr<lexer::Lexeme> l(lexer.Lex(&reader));
+  EXPECT_TRUE(l.get() != NULL);
+  EXPECT_TRUE(l->string() == unicode::Convert("aiueo"));
+  EXPECT_EQ(l->string().GetSize(), 5);
+
+  reader.Read();
+  l.reset(lexer.Lex(&reader));
+  EXPECT_TRUE(l.get() != NULL);
+  EXPECT_TRUE(l->string() == unicode::Convert("abcd"));
+  EXPECT_EQ(l->string().GetSize(), 4);
+}
+
+TEST_F(IdentifierLexerTest, Errors) {
+  textarrayformat::TextArrayReader textarray(*gen);
+
+  reader::StringReader sr(textarray.GetBlockAt(6));
+  reader::EncodingReader reader(&sr, new transcoder::UTF8Transcoder);
+  lexer::IdentifierLexer lexer;
+
+  akebono::scoped_ptr<lexer::Lexeme> l;
+  EXPECT_THROW(lexer.Lex(&reader), lexer::LexException);
+
+  reader.Read(2);
+  EXPECT_THROW(l.reset(lexer.Lex(&reader)), lexer::LexException);
+
+  reader.Read(2);
+  EXPECT_NO_THROW(l.reset(lexer.Lex(&reader)));
+
+  reader.Read();
+  EXPECT_NO_THROW(l.reset(lexer.Lex(&reader)));
+  EXPECT_TRUE(l.get() != NULL);
+  EXPECT_TRUE(l->string() == unicode::Convert("..."));
+  EXPECT_EQ(l->string().GetSize(), 3);
+
+  reader.Read();
+  EXPECT_THROW(l.reset(lexer.Lex(&reader)), lexer::LexException);
+}
+
+int main(int argc, char** argv) {
+  testing::InitGoogleTest(&argc, argv);
+  return RUN_ALL_TESTS();
+}
index 5521547..e0e499e 100755 (executable)
 namespace textarrayformat = utility::textarrayformat;
 namespace lexer = utakata::lexer;
 namespace unicode = utakata::unicode;
+namespace reader = utakata::reader;
+namespace transcoder = utakata::transcoder;
 
 class InlineHexEscapeLexerTest : public ::testing::Test {
  protected:
   virtual void SetUp() {
     gen.reset(new textarrayformat::TextArrayGenerator("========="));
     gen->Punctuate("\\x000F; \\x1aF;");
-    gen->Punctuate("\\9dG; \\x;");
+    gen->Punctuate("\\9dG;");
     gen->Punctuate("\\x; \\x1 ");
   }
 
@@ -42,7 +44,7 @@ TEST_F(InlineHexEscapeLexerTest, SuccessPattern) {
   EXPECT_EQ(ret, static_cast<unsigned int>(0x1aF));
 }
 
-TEST_F(InlineHexEscapeLexerTest, FailurePattern) {
+TEST_F(InlineHexEscapeLexerTest, FailurePattern1) {
   textarrayformat::TextArrayReader textarray(*gen);
   reader::StringReader sr(textarray.GetBlockAt(1));
   reader::EncodingReader reader(&sr, new transcoder::UTF8Transcoder);
@@ -50,9 +52,20 @@ TEST_F(InlineHexEscapeLexerTest, FailurePattern) {
   lexer::InlineHexEscapeLexer l;
 
   unsigned int ret = 0;
+  EXPECT_FALSE(l.Lex(&reader, &ret));
+}
+
+TEST_F(InlineHexEscapeLexerTest, FailurePattern2) {
+  textarrayformat::TextArrayReader textarray(*gen);
+  reader::StringReader sr(textarray.GetBlockAt(2));
+  reader::EncodingReader reader(&sr, new transcoder::UTF8Transcoder);
+
+  lexer::InlineHexEscapeLexer l;
+
+  unsigned int ret = 0;
   EXPECT_THROW(l.Lex(&reader, &ret), lexer::LexException);
 
-  reader.Read(4);
+  reader.Read(2);
   EXPECT_THROW(l.Lex(&reader, &ret), lexer::LexException);
 }
 
diff --git a/test/number_lexer_test.cpp b/test/number_lexer_test.cpp
new file mode 100755 (executable)
index 0000000..33a0524
--- /dev/null
@@ -0,0 +1,160 @@
+#include <test/gtest/gtest.h>
+#include "lib/textarrayformat.h"
+#include "src/lexer/number_lexer.h"
+#include "src/encoding_reader.h"
+#include "src/string_reader.h"
+#include "src/unicode.h"
+#include "lib/scoped_ptr.h"
+#include "src/utf8_transcoder.h"
+#include "src/lexeme.h"
+
+namespace textarrayformat = utility::textarrayformat;
+namespace lexer = utakata::lexer;
+namespace unicode = utakata::unicode;
+namespace reader = utakata::reader;
+namespace transcoder = utakata::transcoder;
+
+class NumberLexerTest : public ::testing::Test {
+ protected:
+  virtual void SetUp() {
+    gen.reset(new textarrayformat::TextArrayGenerator("========="));
+    gen->Punctuate("10 10.0 -10 -9.02 -9.1+0i 3/4");
+    gen->Punctuate("#b010111 #b+1001 #b-0001 #b10/001");
+    gen->Punctuate("#o0777 #o+712 #O-7346 #o75/21");
+    gen->Punctuate("#xFDa71 #x+b92 #X-C0A #xaE/2f");
+    gen->Punctuate("#xFS1 92g+21");
+  }
+
+  akebono::scoped_ptr<textarrayformat::TextArrayGenerator> gen;
+};
+
+TEST_F(NumberLexerTest, DecimalLex) {
+  textarrayformat::TextArrayReader textarray(*gen);
+
+  reader::StringReader sr(textarray.GetBlockAt(0));
+  reader::EncodingReader reader(&sr, new transcoder::UTF8Transcoder);
+  lexer::NumberLexer lexer;
+
+  akebono::scoped_ptr<lexer::Lexeme> l;
+  l.reset(lexer.Lex(&reader));
+  EXPECT_TRUE(l.get() != NULL);
+  EXPECT_TRUE(l->string() == unicode::Convert("10"));
+  EXPECT_EQ(l->string().GetSize(), 2);
+  EXPECT_EQ(l->type(), lexer::Lexeme::kNumber);
+
+  reader.Read();
+  l.reset(lexer.Lex(&reader));
+  EXPECT_TRUE(l->string() == unicode::Convert("10.0"));
+
+  reader.Read();
+  l.reset(lexer.Lex(&reader));
+  EXPECT_TRUE(l->string() == unicode::Convert("-10"));
+
+  reader.Read();
+  l.reset(lexer.Lex(&reader));
+  EXPECT_TRUE(l->string() == unicode::Convert("-9.02"));
+
+  reader.Read();
+  l.reset(lexer.Lex(&reader));
+  EXPECT_TRUE(l->string() == unicode::Convert("-9.1+0i"));
+
+  reader.Read();
+  l.reset(lexer.Lex(&reader));
+  EXPECT_TRUE(l->string() == unicode::Convert("3/4"));
+}
+
+TEST_F(NumberLexerTest, BinaryLex) {
+  textarrayformat::TextArrayReader textarray(*gen);
+
+  reader::StringReader sr(textarray.GetBlockAt(1));
+  reader::EncodingReader reader(&sr, new transcoder::UTF8Transcoder);
+
+  lexer::NumberLexer lexer;
+  akebono::scoped_ptr<lexer::Lexeme> l(lexer.Lex(&reader));
+  EXPECT_TRUE(l.get() != NULL);
+  EXPECT_TRUE(l->string() == unicode::Convert("#b010111"));
+  EXPECT_EQ(l->string().GetSize(), 8);
+
+  reader.Read();
+  l.reset(lexer.Lex(&reader));
+  EXPECT_TRUE(l->string() == unicode::Convert("#b+1001"));
+
+  reader.Read();
+  l.reset(lexer.Lex(&reader));
+  EXPECT_TRUE(l->string() == unicode::Convert("#b-0001"));
+
+  try {
+  reader.Read();
+  l.reset(lexer.Lex(&reader));
+  EXPECT_TRUE(l->string() == unicode::Convert("#b10/001"));
+  } catch (utakata::exception::Exception& e) {
+    std::cout << unicode::Convert(e.message()) << std::endl;
+  }
+}
+
+TEST_F(NumberLexerTest, OctetLex) {
+  textarrayformat::TextArrayReader textarray(*gen);
+
+  reader::StringReader sr(textarray.GetBlockAt(2));
+  reader::EncodingReader reader(&sr, new transcoder::UTF8Transcoder);
+  lexer::NumberLexer lexer;
+
+  akebono::scoped_ptr<lexer::Lexeme> l(lexer.Lex(&reader));
+  EXPECT_TRUE(l.get() != NULL);
+  EXPECT_TRUE(l->string() == unicode::Convert("#o0777"));
+
+  reader.Read();
+  l.reset(lexer.Lex(&reader));
+  EXPECT_TRUE(l->string() == unicode::Convert("#o+712"));
+
+  reader.Read();
+  l.reset(lexer.Lex(&reader));
+  EXPECT_TRUE(l->string() == unicode::Convert("#O-7346"));
+
+  reader.Read();
+  l.reset(lexer.Lex(&reader));
+  EXPECT_TRUE(l->string() == unicode::Convert("#o75/21"));
+}
+
+TEST_F(NumberLexerTest, HexLex) {
+  textarrayformat::TextArrayReader textarray(*gen);
+
+  reader::StringReader sr(textarray.GetBlockAt(3));
+  reader::EncodingReader reader(&sr, new transcoder::UTF8Transcoder);
+  lexer::NumberLexer lexer;
+
+  akebono::scoped_ptr<lexer::Lexeme> l(lexer.Lex(&reader));
+  EXPECT_TRUE(l.get() != NULL);
+  EXPECT_TRUE(l->string() == unicode::Convert("#xFDa71"));
+
+  reader.Read();
+  l.reset(lexer.Lex(&reader));
+  EXPECT_TRUE(l->string() == unicode::Convert("#x+b92"));
+
+  reader.Read();
+  l.reset(lexer.Lex(&reader));
+  EXPECT_TRUE(l->string() == unicode::Convert("#X-C0A"));
+
+  reader.Read();
+  l.reset(lexer.Lex(&reader));
+  EXPECT_TRUE(l->string() == unicode::Convert("#xaE/2f"));
+}
+
+TEST_F(NumberLexerTest, Errors) {
+  textarrayformat::TextArrayReader textarray(*gen);
+
+  reader::StringReader sr(textarray.GetBlockAt(3));
+  reader::EncodingReader reader(&sr, new transcoder::UTF8Transcoder);
+  lexer::NumberLexer lexer;
+
+  akebono::scoped_ptr<lexer::Lexeme> l;
+  EXPECT_NO_THROW(l.reset(lexer.Lex(&reader)));
+
+  reader.Read(6);
+  EXPECT_NO_THROW(l.reset(lexer.Lex(&reader)));
+}
+
+int main(int argc, char** argv) {
+  testing::InitGoogleTest(&argc, argv);
+  return RUN_ALL_TESTS();
+}
index 4c0bd1d..6cf338f 100755 (executable)
@@ -19,9 +19,9 @@ class StringLexerTest : public ::testing::Test {
   virtual void SetUp() {
     gen.reset(new textarrayformat::TextArrayGenerator("========="));
     gen->Punctuate("\"hoge\"");
-    gen->Punctuate("\"norma#\\x60;\"");
+    gen->Punctuate("\"norma\\x61;\"");
     gen->Punctuate("\"start \\   \nhoge\"");
-    gen->Punctuate("\"start\\\n huga");
+    gen->Punctuate("\"start\\\n huga\"");
     gen->Punctuate("#\\backspace");
     gen->Punctuate("#\\tab #\\linefeed");
     gen->Punctuate("#\\newline #\\vtab #\\page");
@@ -76,13 +76,13 @@ TEST_F(StringLexerTest, InitialWhitespaceRead) {
 TEST_F(StringLexerTest, InitialWhitespaceRead2) {
   textarrayformat::TextArrayReader textarray(*gen);
 
-  reader::StringReader sr(textarray.GetBlockAt(2));
+  reader::StringReader sr(textarray.GetBlockAt(3));
   reader::EncodingReader reader(&sr, new transcoder::UTF8Transcoder);
   lexer::StringLexer lexer;
 
   akebono::scoped_ptr<lexer::Lexeme> l(lexer.Lex(&reader));
   EXPECT_TRUE(l.get() != NULL);
-  EXPECT_TRUE(l->string() == unicode::Convert("starthoge"));
+  EXPECT_TRUE(l->string() == unicode::Convert("starthuga"));
   EXPECT_EQ(l->string().GetSize(), 9);
 }
 
index 1646470..19ccd61 100755 (executable)
@@ -65,6 +65,12 @@ TEST(UnicodeTest, UnicodeCompare) {
   EXPECT_TRUE(unicode::Convert("nul") > unicode::Convert("backspace"));
   EXPECT_FALSE(unicode::Convert("linefeed") < unicode::Convert("backspace"));
   EXPECT_TRUE(unicode::Convert("tab") > unicode::Convert("backspace"));
+
+  unicode::UniString convert_from_literal = unicode::Convert("aaaaa");
+  EXPECT_TRUE(unicode::Convert("aaaaa") == convert_from_literal);
+
+  unicode::Append(convert_from_literal, std::string("hoge"));
+  EXPECT_TRUE(unicode::UniString("aaaaahoge") == convert_from_literal);
 }
 
 TEST(UnicodeTest, UnicodeCheck) {
@@ -121,4 +127,3 @@ int main(int argc, char** argv) {
 
   return RUN_ALL_TESTS();
 }
-