[Julius-cvs 417] CVS update: julius4/julius

アーカイブの一覧に戻る

sumom****@users***** sumom****@users*****
2009年 6月 20日 (土) 23:06:55 JST


Index: julius4/julius/Makefile.in
diff -u julius4/julius/Makefile.in:1.5 julius4/julius/Makefile.in:1.6
--- julius4/julius/Makefile.in:1.5	Thu Oct  2 17:57:03 2008
+++ julius4/julius/Makefile.in	Sat Jun 20 23:06:54 2009
@@ -5,7 +5,7 @@
 # All rights reserved
 
 #
-# $Id: Makefile.in,v 1.5 2008/10/02 08:57:03 sumomo Exp $
+# $Id: Makefile.in,v 1.6 2009/06/20 14:06:54 sumomo Exp $
 #
 SHELL=/bin/sh
 .SUFFIXES:
@@ -18,7 +18,7 @@
 CC=@CC@
 CFLAGS=@CFLAGS@
 CPPFLAGS=-I. -I$(LIBJULIUS)/include -I$(LIBSENT)/include @CPPFLAGS@ `$(LIBSENT)/libsent-config --cflags` `$(LIBJULIUS)/libjulius-config --cflags`
-LDFLAGS=@LDFLAGS@ -L$(LIBJULIUS) `$(LIBJULIUS)/libjulius-config --libs` -L$(LIBSENT) `$(LIBSENT)/libsent-config --libs`
+LDFLAGS=@LDFLAGS@ -L$(LIBJULIUS) `$(LIBJULIUS)/libjulius-config --libs` -L$(LIBSENT) `$(LIBSENT)/libsent-config --libs` @LIBICONV@
 GTK_CFLAGS=@GTK_CFLAGS@
 GTK_LIBS=@GTK_LIBS@
 RM=@RM@ -f
Index: julius4/julius/configure
diff -u julius4/julius/configure:1.2 julius4/julius/configure:1.3
--- julius4/julius/configure:1.2	Thu Oct  2 17:57:03 2008
+++ julius4/julius/configure	Sat Jun 20 23:06:54 2009
@@ -1506,28 +1506,47 @@
 if test "$use_charconv" = no; then
     CCOBJ=""
 else
-    echo $ac_n "checking for charset conversion""... $ac_c" 1>&6
-echo "configure:1511: checking for charset conversion" >&5
-    CCOBJ="charconv.o"
-    case "$host_os" in
-    mingw*)
-		cat >> confdefs.h <<\EOF
-#define USE_WIN32_MULTIBYTE 1
-EOF
-
-        CCOBJ="${CCOBJ} charconv_win32.o"
-	CCOBJ="${CCOBJ} charconv_libjcode.o libjcode/libjcode.o libjcode/detect.o"
-	ccdesc="Win32 API + libjcode"
-	cat >> confdefs.h <<\EOF
-#define CHARACTER_CONVERSION 1
+        CCOBJ="charconv.o"
+    case "$use_charconv" in
+	auto)
+	    	    ac_safe=`echo "winnls.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for winnls.h""... $ac_c" 1>&6
+echo "configure:1515: checking for winnls.h" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 1520 "configure"
+#include "confdefs.h"
+#include <winnls.h>
 EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1525: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  use_winnls=yes
+else
+  echo "$ac_t""no" 1>&6
+use_winnls=no
+fi
 
-	echo "$ac_t""win32" 1>&6
-	;;
-*)
-	case "$use_charconv" in
-	auto)
-                        
+	    if test "$use_winnls" = yes; then
+	       use_cfunc=win32
+	    else
+	       	       
     
   # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
 if test "${with_libiconv_prefix+set}" = set; then
@@ -1542,7 +1561,7 @@
 
 
   echo $ac_n "checking for iconv""... $ac_c" 1>&6
-echo "configure:1546: checking for iconv" >&5
+echo "configure:1565: checking for iconv" >&5
 if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1550,7 +1569,7 @@
     am_cv_func_iconv="no, consider installing GNU libiconv"
     am_cv_lib_iconv=no
     cat > conftest.$ac_ext <<EOF
-#line 1554 "configure"
+#line 1573 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <iconv.h>
@@ -1560,7 +1579,7 @@
        iconv_close(cd);
 ; return 0; }
 EOF
-if { (eval echo configure:1564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   am_cv_func_iconv=yes
 else
@@ -1572,7 +1591,7 @@
       am_save_LIBS="$LIBS"
       LIBS="$LIBS -liconv"
       cat > conftest.$ac_ext <<EOF
-#line 1576 "configure"
+#line 1595 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <iconv.h>
@@ -1582,7 +1601,7 @@
          iconv_close(cd);
 ; return 0; }
 EOF
-if { (eval echo configure:1586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   am_cv_lib_iconv=yes
         am_cv_func_iconv=yes
@@ -1603,13 +1622,13 @@
 EOF
 
     echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
-echo "configure:1607: checking for iconv declaration" >&5
+echo "configure:1626: checking for iconv declaration" >&5
     if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
       cat > conftest.$ac_ext <<EOF
-#line 1613 "configure"
+#line 1632 "configure"
 #include "confdefs.h"
 
 #include <stdlib.h>
@@ -1628,7 +1647,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:1632: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1651: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   am_cv_proto_iconv_arg1=""
 else
@@ -1655,26 +1674,57 @@
   fi
   
 
-            if test "$am_cv_func_iconv" = yes; then
-	       CCOBJ="${CCOBJ} charconv_iconv.o"
-               ccdesc="iconv library"
-	       echo "$ac_t""iconv" 1>&6
-            else
-               cat >> confdefs.h <<\EOF
-#define USE_LIBJCODE 1
-EOF
-
-	       CCOBJ="${CCOBJ} charconv_libjcode.o libjcode/libjcode.o libjcode/detect.o"
-               ccdesc="built-in libjcode (Japanese codes only)"
-	       echo "$ac_t""libjcode" 1>&6
-            fi
-            cat >> confdefs.h <<\EOF
-#define CHARACTER_CONVERSION 1
+	       if test "$am_cv_func_iconv" = yes; then
+	          use_cfunc=iconv
+	       else
+	          use_cfunc=libjcode
+	       fi
+	    fi
+	    ;;
+	win)
+	    	    ac_safe=`echo "winnls.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for winnls.h""... $ac_c" 1>&6
+echo "configure:1688: checking for winnls.h" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 1693 "configure"
+#include "confdefs.h"
+#include <winnls.h>
 EOF
-
-            ;;
-        iconv)
-                        
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1698: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  use_winnls=yes
+else
+  echo "$ac_t""no" 1>&6
+use_winnls=no
+fi
+
+	    if test "$use_winnls" = yes; then
+	       use_cfunc=win32
+	    else
+	       use_cfunc=no
+               { echo "configure: error: Win32 function not found!" 1>&2; exit 1; }
+	    fi
+	    ;;
+	iconv)
+	    	    
     
   # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
 if test "${with_libiconv_prefix+set}" = set; then
@@ -1689,7 +1739,7 @@
 
 
   echo $ac_n "checking for iconv""... $ac_c" 1>&6
-echo "configure:1693: checking for iconv" >&5
+echo "configure:1743: checking for iconv" >&5
 if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1697,7 +1747,7 @@
     am_cv_func_iconv="no, consider installing GNU libiconv"
     am_cv_lib_iconv=no
     cat > conftest.$ac_ext <<EOF
-#line 1701 "configure"
+#line 1751 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <iconv.h>
@@ -1707,7 +1757,7 @@
        iconv_close(cd);
 ; return 0; }
 EOF
-if { (eval echo configure:1711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   am_cv_func_iconv=yes
 else
@@ -1719,7 +1769,7 @@
       am_save_LIBS="$LIBS"
       LIBS="$LIBS -liconv"
       cat > conftest.$ac_ext <<EOF
-#line 1723 "configure"
+#line 1773 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <iconv.h>
@@ -1729,7 +1779,7 @@
          iconv_close(cd);
 ; return 0; }
 EOF
-if { (eval echo configure:1733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   am_cv_lib_iconv=yes
         am_cv_func_iconv=yes
@@ -1750,13 +1800,13 @@
 EOF
 
     echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
-echo "configure:1754: checking for iconv declaration" >&5
+echo "configure:1804: checking for iconv declaration" >&5
     if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
       cat > conftest.$ac_ext <<EOF
-#line 1760 "configure"
+#line 1810 "configure"
 #include "confdefs.h"
 
 #include <stdlib.h>
@@ -1775,7 +1825,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:1779: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1829: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   am_cv_proto_iconv_arg1=""
 else
@@ -1802,42 +1852,64 @@
   fi
   
 
-            if test "$am_cv_func_iconv" = yes; then
-	       CCOBJ="${CCOBJ} charconv_iconv.o"
-               EXTRALIB="$EXTRALIB $LIBICONV"
-               cat >> confdefs.h <<\EOF
+	    if test "$am_cv_func_iconv" = yes; then
+	       use_cfunc=iconv
+	    else
+	       use_cfunc=no
+               { echo "configure: error: iconv function not found!" 1>&2; exit 1; }
+	    fi
+	    ;;
+	no)
+	    use_cfunc=no
+	    ;;
+	*)
+                        { echo "configure: error: wrong argument for --enable-charconv" 1>&2; exit 1; }
+	    ;;
+    esac
+    echo $ac_n "checking for charset conversion""... $ac_c" 1>&6
+echo "configure:1871: checking for charset conversion" >&5
+    case "$use_cfunc" in
+	win32)
+	    cat >> confdefs.h <<\EOF
 #define CHARACTER_CONVERSION 1
 EOF
 
-               ccdesc="iconv libraru"
-	       echo "$ac_t""iconv" 1>&6
-            else
-	       CCOBJ=""
-               ccdesc="no"
-               { echo "configure: error: iconv function not found!" 1>&2; exit 1; }
-	       echo "$ac_t""no" 1>&6
-            fi
-            ;;
-        libjcode)
-                        cat >> confdefs.h <<\EOF
-#define USE_LIBJCODE 1
+	    cat >> confdefs.h <<\EOF
+#define USE_WIN32_MULTIBYTE 1
 EOF
 
+	    CCOBJ="${CCOBJ} charconv_win32.o"
 	    CCOBJ="${CCOBJ} charconv_libjcode.o libjcode/libjcode.o libjcode/detect.o"
-            ccdesc="built-in libjcode (Japanese codes only)"
+	    ccdesc="Win32 API + libjcode"
+	    echo "$ac_t""win32" 1>&6
+	    ;;
+	iconv)
+            cat >> confdefs.h <<\EOF
+#define CHARACTER_CONVERSION 1
+EOF
+
+	    CCOBJ="${CCOBJ} charconv_iconv.o"
+            ccdesc="iconv library"
+	    echo "$ac_t""iconv" 1>&6
+	    ;;
+	libjcode)
             cat >> confdefs.h <<\EOF
 #define CHARACTER_CONVERSION 1
 EOF
 
+            cat >> confdefs.h <<\EOF
+#define USE_LIBJCODE 1
+EOF
+
+	    CCOBJ="${CCOBJ} charconv_libjcode.o libjcode/libjcode.o libjcode/detect.o"
+            ccdesc="built-in libjcode (Japanese codes only)"
 	    echo "$ac_t""libjcode" 1>&6
-            ;;
-        no)
-                        ccdesc="no"
+	    ;;
+	no)
+	    CCOBJ=""
+            ccdesc="no"
 	    echo "$ac_t""no" 1>&6
             ;;
-        *)
-                        { echo "configure: error: wrong argument for charconv!" 1>&2; exit 1; }
-        esac
     esac
 fi
 
Index: julius4/julius/configure.in
diff -u julius4/julius/configure.in:1.3 julius4/julius/configure.in:1.4
--- julius4/julius/configure.in:1.3	Thu Oct  2 17:57:03 2008
+++ julius4/julius/configure.in	Sat Jun 20 23:06:54 2009
@@ -4,7 +4,7 @@
 dnl Copyright (c) 2005-2007 Julius project team, Nagoya Institute of Technology
 dnl All rights reserved
 dnl
-dnl $Id: configure.in,v 1.3 2008/10/02 08:57:03 sumomo Exp $
+dnl $Id: configure.in,v 1.4 2009/06/20 14:06:54 sumomo Exp $
 dnl
 
 AC_INIT(main.c)
@@ -92,68 +92,80 @@
 if test "$use_charconv" = no; then
     CCOBJ=""
 else
-    AC_MSG_CHECKING([for charset conversion])
+    dnl determine which one to use
     CCOBJ="charconv.o"
-    case "$host_os" in
-    mingw*)
-	dnl libjcode (EUC|JIS->SJIS) + Win32 API (SJIS->UTF8)
-	AC_DEFINE(USE_WIN32_MULTIBYTE)
-        CCOBJ="${CCOBJ} charconv_win32.o"
-	CCOBJ="${CCOBJ} charconv_libjcode.o libjcode/libjcode.o libjcode/detect.o"
-	ccdesc="Win32 API + libjcode"
-	AC_DEFINE(CHARACTER_CONVERSION)
-	AC_MSG_RESULT([win32])
-	;;
-*)
-	case "$use_charconv" in
+    case "$use_charconv" in
 	auto)
-            dnl iconv -> libjcode
-            AM_ICONV
-            if test "$am_cv_func_iconv" = yes; then
-	       CCOBJ="${CCOBJ} charconv_iconv.o"
-               ccdesc="iconv library"
-	       AC_MSG_RESULT([iconv])
-            else
-               AC_DEFINE(USE_LIBJCODE)
-	       CCOBJ="${CCOBJ} charconv_libjcode.o libjcode/libjcode.o libjcode/detect.o"
-               ccdesc="built-in libjcode (Japanese codes only)"
-	       AC_MSG_RESULT([libjcode])
-            fi
-            AC_DEFINE(CHARACTER_CONVERSION)
-            ;;
-        iconv)
-            dnl force iconv
-            AM_ICONV
-            if test "$am_cv_func_iconv" = yes; then
-	       CCOBJ="${CCOBJ} charconv_iconv.o"
-               EXTRALIB="$EXTRALIB $LIBICONV"
-               AC_DEFINE(CHARACTER_CONVERSION)
-               ccdesc="iconv libraru"
-	       AC_MSG_RESULT([iconv])
-            else
-	       CCOBJ=""
-               ccdesc="no"
+	    dnl check w32 function
+	    AC_CHECK_HEADER(winnls.h,use_winnls=yes,use_winnls=no)
+	    if test "$use_winnls" = yes; then
+	       use_cfunc=win32
+	    else
+	       dnl check iconv
+	       AM_ICONV
+	       if test "$am_cv_func_iconv" = yes; then
+	          use_cfunc=iconv
+	       else
+	          use_cfunc=libjcode
+	       fi
+	    fi
+	    ;;
+	win)
+	    dnl check w32 function
+	    AC_CHECK_HEADER(winnls.h,use_winnls=yes,use_winnls=no)
+	    if test "$use_winnls" = yes; then
+	       use_cfunc=win32
+	    else
+	       use_cfunc=no
+               AC_MSG_ERROR([Win32 function not found!])
+	    fi
+	    ;;
+	iconv)
+	    dnl check iconv
+	    AM_ICONV
+	    if test "$am_cv_func_iconv" = yes; then
+	       use_cfunc=iconv
+	    else
+	       use_cfunc=no
                AC_MSG_ERROR([iconv function not found!])
-	       AC_MSG_RESULT([no])
-            fi
-            ;;
-        libjcode)
-            dnl force libjcode
+	    fi
+	    ;;
+	no)
+	    use_cfunc=no
+	    ;;
+	*)
+            dnl error
+            AC_MSG_ERROR([wrong argument for --enable-charconv])
+	    ;;
+    esac
+    AC_MSG_CHECKING([for charset conversion])
+    case "$use_cfunc" in
+	win32)
+	    AC_DEFINE(CHARACTER_CONVERSION)
+	    AC_DEFINE(USE_WIN32_MULTIBYTE)
+	    CCOBJ="${CCOBJ} charconv_win32.o"
+	    CCOBJ="${CCOBJ} charconv_libjcode.o libjcode/libjcode.o libjcode/detect.o"
+	    ccdesc="Win32 API + libjcode"
+	    AC_MSG_RESULT([win32])
+	    ;;
+	iconv)
+            AC_DEFINE(CHARACTER_CONVERSION)
+	    CCOBJ="${CCOBJ} charconv_iconv.o"
+            ccdesc="iconv library"
+	    AC_MSG_RESULT([iconv])
+	    ;;
+	libjcode)
+            AC_DEFINE(CHARACTER_CONVERSION)
             AC_DEFINE(USE_LIBJCODE)
 	    CCOBJ="${CCOBJ} charconv_libjcode.o libjcode/libjcode.o libjcode/detect.o"
             ccdesc="built-in libjcode (Japanese codes only)"
-            AC_DEFINE(CHARACTER_CONVERSION)
 	    AC_MSG_RESULT([libjcode])
-            ;;
-        no)
-            dnl disable
+	    ;;
+	no)
+	    CCOBJ=""
             ccdesc="no"
 	    AC_MSG_RESULT([no])
             ;;
-        *)
-            dnl error
-            AC_MSG_ERROR([wrong argument for charconv!])
-        esac
     esac
 fi
 



Julius-cvs メーリングリストの案内
アーカイブの一覧に戻る