diff -Naur dictd-lexitron.1/ChangeLog dictd-lexitron.2/ChangeLog
--- dictd-lexitron.1/ChangeLog	1970-01-01 00:00:00.000000000 +0000
+++ dictd-lexitron.2/ChangeLog	2004-06-19 21:28:40.000000000 +0000
@@ -0,0 +1,2 @@
+2004-06-19 Vee Satayamas <vee@linux.thai.net>
+    * configure.ac, Makefile.am, autogen.sh: Add Autoconf/Automake support
diff -Naur dictd-lexitron.1/Makefile.am dictd-lexitron.2/Makefile.am
--- dictd-lexitron.1/Makefile.am	1970-01-01 00:00:00.000000000 +0000
+++ dictd-lexitron.2/Makefile.am	2004-06-19 21:29:03.000000000 +0000
@@ -0,0 +1,27 @@
+EXTRA_DIST=autogen.sh  TODO
+dictdata_DATA = etlex.dict.dz telex.dict.dz
+
+etlex.c5: etlex.utf-8
+	${PERL} parse_etlex.pl etlex.utf-8 > etlex.c5 2>/dev/null
+
+telex.c5: telex.utf-8
+	${PERL} parse_telex.pl telex.utf-8 > telex.c5 2>/dev/null
+
+etlex.dict.dz: etlex.c5 lexitron.info
+	cat lexitron.info etlex.c5 | \
+		LC_ALL=th_TH.UTF-8 ${DICTFMT} -c5  \
+		-u ftp://ftp.opentle.org/pub/lexitron/source/lexitron-data.zip \
+		-s "LEXiTRON version 2, etlex" --without-info \
+		--allchars --locale th_TH.UTF-8 etlex
+	${DICTZIP} etlex.dict
+
+telex.dict.dz: telex.c5 lexitron.info
+	cat lexitron.info telex.c5 | \
+		LC_ALL=th_TH.UTF-8 ${DICTFMT} -c5  \
+		-u ftp://ftp.opentle.org/pub/lexitron/source/lexitron-data.zip \
+		-s "LEXiTRON version 2, telex" --without-info \
+		--allchars --locale th_TH.UTF-8 telex
+	${DICTZIP} telex.dict
+
+clean-generic:
+	rm -f *.dz *.dict *.c5
\ No newline at end of file
diff -Naur dictd-lexitron.1/autogen.sh dictd-lexitron.2/autogen.sh
--- dictd-lexitron.1/autogen.sh	1970-01-01 00:00:00.000000000 +0000
+++ dictd-lexitron.2/autogen.sh	2004-06-19 21:29:36.000000000 +0000
@@ -0,0 +1,136 @@
+#!/bin/sh
+# Run this to generate all the initial makefiles, etc.
+# Import from libthai
+srcdir=`dirname $0`
+PKG_NAME="wcwordcut"
+
+DIE=0
+
+(autoconf --version) < /dev/null > /dev/null 2>&1 || {
+  echo
+  echo "**Error**: You must have \`autoconf' installed to."
+  echo "Download the appropriate package for your distribution,"
+  echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
+  DIE=1
+}
+
+(grep "^AM_PROG_LIBTOOL" $srcdir/configure.in >/dev/null) && {
+  (libtool --version) < /dev/null > /dev/null 2>&1 || {
+    echo
+    echo "**Error**: You must have \`libtool' installed."
+    echo "Get ftp://ftp.gnu.org/pub/gnu/libtool-1.2d.tar.gz"
+    echo "(or a newer version if it is available)"
+    DIE=1
+  }
+}
+
+grep "^AM_GNU_GETTEXT" $srcdir/configure.in >/dev/null && {
+  grep "sed.*POTFILES" $srcdir/configure.in >/dev/null || \
+  (gettext --version) < /dev/null > /dev/null 2>&1 || {
+    echo
+    echo "**Error**: You must have \`gettext' installed."
+    echo "Get ftp://alpha.gnu.org/gnu/gettext-0.10.35.tar.gz"
+    echo "(or a newer version if it is available)"
+    DIE=1
+  }
+}
+
+grep "^AM_GNOME_GETTEXT" $srcdir/configure.in >/dev/null && {
+  grep "sed.*POTFILES" $srcdir/configure.in >/dev/null || \
+  (gettext --version) < /dev/null > /dev/null 2>&1 || {
+    echo
+    echo "**Error**: You must have \`gettext' installed."
+    echo "Get ftp://alpha.gnu.org/gnu/gettext-0.10.35.tar.gz"
+    echo "(or a newer version if it is available)"
+    DIE=1
+  }
+}
+
+(automake --version) < /dev/null > /dev/null 2>&1 || {
+  echo
+  echo "**Error**: You must have \`automake' installed."
+  echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz"
+  echo "(or a newer version if it is available)"
+  DIE=1
+  NO_AUTOMAKE=yes
+}
+
+
+# if no automake, don't bother testing for aclocal
+test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || {
+  echo
+  echo "**Error**: Missing \`aclocal'.  The version of \`automake'"
+  echo "installed doesn't appear recent enough."
+  echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz"
+  echo "(or a newer version if it is available)"
+  DIE=1
+}
+
+if test "$DIE" -eq 1; then
+  exit 1
+fi
+
+case $CC in
+xlc )
+  am_opt=--include-deps;;
+esac
+
+for coin in `find $srcdir -name configure.in -print`
+do 
+  dr=`dirname $coin`
+  if test -f $dr/NO-AUTO-GEN; then
+    echo skipping $dr -- flagged as no auto-gen
+  else
+    echo processing $dr
+    macrodirs=`sed -n -e 's,AM_ACLOCAL_INCLUDE(\(.*\)),\1,gp' < $coin`
+    ( cd $dr
+      aclocalinclude="$ACLOCAL_FLAGS"
+      for k in $macrodirs; do
+  	if test -d $k; then
+          aclocalinclude="$aclocalinclude -I $k"
+  	##else 
+	##  echo "**Warning**: No such directory \`$k'.  Ignored."
+        fi
+      done
+      if grep "^AM_GNU_GETTEXT" configure.in >/dev/null; then
+	if grep "sed.*POTFILES" configure.in >/dev/null; then
+	  : do nothing -- we still have an old unmodified configure.in
+	else
+	  echo "Creating $dr/aclocal.m4 ..."
+	  test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
+	  echo "Running gettextize...  Ignore non-fatal messages."
+	  echo "no" | gettextize --force --copy
+	  echo "Making $dr/aclocal.m4 writable ..."
+	  test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
+        fi
+      fi
+      if grep "^AM_GNOME_GETTEXT" configure.in >/dev/null; then
+	echo "Creating $dr/aclocal.m4 ..."
+	test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
+	echo "Running gettextize...  Ignore non-fatal messages."
+	echo "no" | gettextize --force --copy
+	echo "Making $dr/aclocal.m4 writable ..."
+	test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
+      fi
+      if grep "^AM_PROG_LIBTOOL" configure.in >/dev/null; then
+	echo "Running libtoolize..."
+	libtoolize --force --copy
+      fi
+      echo "Running aclocal $aclocalinclude ..."
+      aclocal $aclocalinclude
+      if grep "^AM_CONFIG_HEADER" configure.in >/dev/null; then
+	echo "Running autoheader..."
+	autoheader
+      fi
+      echo "Running automake --gnu $am_opt ..."
+      automake --add-missing --gnu $am_opt
+      echo "Running autoconf ..."
+      autoconf
+    ) || DIE=1
+  fi
+done
+
+if test "$DIE" -eq 0; then
+  echo "You can run ./configure now"
+fi
+
diff -Naur dictd-lexitron.1/configure.in dictd-lexitron.2/configure.in
--- dictd-lexitron.1/configure.in	1970-01-01 00:00:00.000000000 +0000
+++ dictd-lexitron.2/configure.in	2004-06-19 21:28:58.000000000 +0000
@@ -0,0 +1,49 @@
+dnl Process this file with autoconf to produce a configure script.
+AC_INIT(parse_telex.pl)
+AM_INIT_AUTOMAKE(dictd-lexitron, `date +%Y%m%d`)
+AC_SUBST(VERSION)
+
+dnl Checks for programs.
+AC_PROG_CC
+AC_PROG_INSTALL
+AC_PROG_LN_S
+AC_PROG_MAKE_SET
+AM_PROG_LIBTOOL
+
+AC_ARG_WITH(dictdatadir,
+    [  --with-dictdata=DIR       dictionary data directory in DIR [PREFIX/lib/dict]],
+    [dictdatadir="$withval"], [dictdatadir=\$\{prefix\}/lib/dict])
+
+AC_SUBST(dictdatadir)
+
+AC_PATH_PROG(PERL, perl, no)
+if test "x$PERL" = "xno"; then
+   AC_MSG_ERROR([perl is needed])
+fi
+AC_SUBST(PERL)
+
+AC_PATH_PROG(DICTZIP, dictzip, no)
+if test "x$DICTZIP" = "xno"; then
+   AC_MSG_ERROR([dictzip is needed])
+fi
+AC_SUBST(DICTZIP)
+
+AC_PATH_PROG(DICTFMT, dictfmt, no)
+if test "x$DICTFMT" = "xno"; then
+   AC_MSG_ERROR([dictfmt is needed])
+fi
+AC_SUBST(DICTFMT)
+
+
+dnl Checks for header files.
+#AC_STDC_HEADERS
+#AC_HAVE_HEADERS(string.h)
+
+dnl Checks for typedefs, structures, and compiler characteristics.
+#AC_C_CONST
+
+dnl Checks for library functions.
+#AC_FUNC_ALLOCA
+AC_OUTPUT(	
+	Makefile  \
+)
