sumom****@users*****
sumom****@users*****
2009年 10月 27日 (火) 03:43:38 JST
Index: julius4/libsent/configure diff -u julius4/libsent/configure:1.16 julius4/libsent/configure:1.17 --- julius4/libsent/configure:1.16 Thu Oct 22 01:39:40 2009 +++ julius4/libsent/configure Tue Oct 27 03:43:37 2009 @@ -2214,7 +2214,88 @@ # if default is portaudio, guess WinMM / DirectSound / OSS / Solaris case $altype in portaudio) - case "$host_os" in + pa_system=no + echo $ac_n "checking for Pa_Initialize in -lportaudio""... $ac_c" 1>&6 +echo "configure:2220: checking for Pa_Initialize in -lportaudio" >&5 +ac_lib_var=`echo portaudio'_'Pa_Initialize | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lportaudio $LIBS" +cat > conftest.$ac_ext <<EOF +#line 2228 "configure" +#include "confdefs.h" +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char Pa_Initialize(); + +int main() { +Pa_Initialize() +; return 0; } +EOF +if { (eval echo configure:2239: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + for ac_hdr in portaudio.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:2258: checking for $ac_hdr" >&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 2263 "configure" +#include "confdefs.h" +#include <$ac_hdr> +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:2268: \"$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 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <<EOF +#define $ac_tr_hdr 1 +EOF + pa_system=yes +else + echo "$ac_t""no" 1>&6 +fi +done + +else + echo "$ac_t""no" 1>&6 +fi + + if test "$pa_system" = no; then + case "$host_os" in linux*) altype="pa-oss" ;; @@ -2223,7 +2304,7 @@ ;; cygwin*|mingw*) echo $ac_n "checking for main in -ldsound""... $ac_c" 1>&6 -echo "configure:2227: checking for main in -ldsound" >&5 +echo "configure:2308: checking for main in -ldsound" >&5 ac_lib_var=`echo dsound'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2231,14 +2312,14 @@ ac_save_LIBS="$LIBS" LIBS="-ldsound $LIBS" cat > conftest.$ac_ext <<EOF -#line 2235 "configure" +#line 2316 "configure" #include "confdefs.h" int main() { main() ; return 0; } EOF -if { (eval echo configure:2242: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2257,17 +2338,17 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2261: checking for $ac_hdr" >&5 +echo "configure:2342: checking for $ac_hdr" >&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 2266 "configure" +#line 2347 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2271: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2352: \"$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* @@ -2300,7 +2381,10 @@ fi ;; - esac + esac + else + altype="libportaudio" + fi ;; esac @@ -2338,7 +2422,7 @@ case "$host_os" in linux*) echo $ac_n "checking for spInitAudio in -lspa.linux""... $ac_c" 1>&6 -echo "configure:2342: checking for spInitAudio in -lspa.linux" >&5 +echo "configure:2426: checking for spInitAudio in -lspa.linux" >&5 ac_lib_var=`echo spa.linux'_'spInitAudio | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2346,7 +2430,7 @@ ac_save_LIBS="$LIBS" LIBS="-lspa.linux -lspb.linux -lm $LIBS" cat > conftest.$ac_ext <<EOF -#line 2350 "configure" +#line 2434 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -2357,7 +2441,7 @@ spInitAudio() ; return 0; } EOF -if { (eval echo configure:2361: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2376,7 +2460,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for spInitAudio in -lspa.linux-glibc""... $ac_c" 1>&6 -echo "configure:2380: checking for spInitAudio in -lspa.linux-glibc" >&5 +echo "configure:2464: checking for spInitAudio in -lspa.linux-glibc" >&5 ac_lib_var=`echo spa.linux-glibc'_'spInitAudio | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2384,7 +2468,7 @@ ac_save_LIBS="$LIBS" LIBS="-lspa.linux-glibc -lspb.linux-glibc -lm $LIBS" cat > conftest.$ac_ext <<EOF -#line 2388 "configure" +#line 2472 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -2395,7 +2479,7 @@ spInitAudio() ; return 0; } EOF -if { (eval echo configure:2399: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2483: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2436,8 +2520,13 @@ ;; esac ;; + libportaudio) + aldesc="PortAudio library (external)" + ADINOBJ="$ADINOBJ src/adin/adin_portaudio.o" + SOUNDLIB="$SOUNDLIB -lportaudio" + ;; pa-*) - aldesc="PortAudio library" + aldesc="PortAudio library (internal)" ADINOBJ="$ADINOBJ src/adin/pa/pa_lib.o src/adin/pa/pa_convert.o src/adin/pa/pa_trace.o src/adin/pa/pablio.o src/adin/pa/ringbuffer.o" SOUNDINC="-Isrc/adin/pa" cat >> confdefs.h <<\EOF @@ -2562,21 +2651,21 @@ if test "$with_netaudio_dir" = auto ; then echo $ac_n "checking for DatLink/NetAudio support""... $ac_c" 1>&6 -echo "configure:2566: checking for DatLink/NetAudio support" >&5 +echo "configure:2655: checking for DatLink/NetAudio support" >&5 else echo $ac_n "checking for DatLink/NetAudio support on ${with_netaudio_dir}""... $ac_c" 1>&6 -echo "configure:2569: checking for DatLink/NetAudio support on ${with_netaudio_dir}" >&5 +echo "configure:2658: checking for DatLink/NetAudio support on ${with_netaudio_dir}" >&5 fi TMPCPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -I${with_netaudio_dir}/include" use_netaudio=no cat > conftest.$ac_ext <<EOF -#line 2575 "configure" +#line 2664 "configure" #include "confdefs.h" #include <netaudio.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2580: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2669: \"$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* @@ -2601,7 +2690,7 @@ have_zlib=no; if test "$use_zlib" = yes; then echo $ac_n "checking for deflate in -lz""... $ac_c" 1>&6 -echo "configure:2605: checking for deflate in -lz" >&5 +echo "configure:2694: checking for deflate in -lz" >&5 ac_lib_var=`echo z'_'deflate | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2609,7 +2698,7 @@ ac_save_LIBS="$LIBS" LIBS="-lz $LIBS" cat > conftest.$ac_ext <<EOF -#line 2613 "configure" +#line 2702 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -2620,7 +2709,7 @@ deflate() ; return 0; } EOF -if { (eval echo configure:2624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2639,17 +2728,17 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2643: checking for $ac_hdr" >&5 +echo "configure:2732: checking for $ac_hdr" >&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 2648 "configure" +#line 2737 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2653: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2742: \"$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* @@ -2694,7 +2783,7 @@ # Extract the first word of "gzip", so it can be a program name with args. set dummy gzip; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2698: checking for $ac_word" >&5 +echo "configure:2787: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_GZIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2741,7 +2830,7 @@ if test "$with_sndfile" = yes; then have_libsndfile=no echo $ac_n "checking for sf_open in -lsndfile""... $ac_c" 1>&6 -echo "configure:2745: checking for sf_open in -lsndfile" >&5 +echo "configure:2834: checking for sf_open in -lsndfile" >&5 ac_lib_var=`echo sndfile'_'sf_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2749,7 +2838,7 @@ ac_save_LIBS="$LIBS" LIBS="-lsndfile $LIBS" cat > conftest.$ac_ext <<EOF -#line 2753 "configure" +#line 2842 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -2760,7 +2849,7 @@ sf_open() ; return 0; } EOF -if { (eval echo configure:2764: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2779,17 +2868,17 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2783: checking for $ac_hdr" >&5 +echo "configure:2872: checking for $ac_hdr" >&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 2788 "configure" +#line 2877 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2793: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2882: \"$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* @@ -2831,7 +2920,7 @@ if test "$have_libsndfile" = no; then echo $ac_n "checking for sf_open_read in -lsndfile""... $ac_c" 1>&6 -echo "configure:2835: checking for sf_open_read in -lsndfile" >&5 +echo "configure:2924: checking for sf_open_read in -lsndfile" >&5 ac_lib_var=`echo sndfile'_'sf_open_read | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2839,7 +2928,7 @@ ac_save_LIBS="$LIBS" LIBS="-lsndfile $LIBS" cat > conftest.$ac_ext <<EOF -#line 2843 "configure" +#line 2932 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -2850,7 +2939,7 @@ sf_open_read() ; return 0; } EOF -if { (eval echo configure:2854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2869,17 +2958,17 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2873: checking for $ac_hdr" >&5 +echo "configure:2962: checking for $ac_hdr" >&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 2878 "configure" +#line 2967 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2883: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2972: \"$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* Index: julius4/libsent/configure.in diff -u julius4/libsent/configure.in:1.16 julius4/libsent/configure.in:1.17 --- julius4/libsent/configure.in:1.16 Thu Oct 22 01:39:40 2009 +++ julius4/libsent/configure.in Tue Oct 27 03:43:37 2009 @@ -3,7 +3,7 @@ dnl Copyright (c) 2005-2007 Julius project team, Nagoya Institute of Technology dnl All rights reserved dnl -dnl $Id: configure.in,v 1.16 2009/10/21 16:39:40 sumomo Exp $ +dnl $Id: configure.in,v 1.17 2009/10/26 18:43:37 sumomo Exp $ dnl dnl Process this file with autoconf to produce a configure script. @@ -237,7 +237,10 @@ # if default is portaudio, guess WinMM / DirectSound / OSS / Solaris case $altype in portaudio) - case "$host_os" in + pa_system=no + AC_CHECK_LIB(portaudio,Pa_Initialize,AC_CHECK_HEADERS(portaudio.h, pa_system=yes)) + if test "$pa_system" = no; then + case "$host_os" in linux*) altype="pa-oss" ;; @@ -251,7 +254,10 @@ altype="pa-winmm"), altype="pa-winmm") ;; - esac + esac + else + altype="libportaudio" + fi ;; esac @@ -307,8 +313,13 @@ ;; esac ;; + libportaudio) + aldesc="PortAudio library (external)" + ADINOBJ="$ADINOBJ src/adin/adin_portaudio.o" + SOUNDLIB="$SOUNDLIB -lportaudio" + ;; pa-*) - aldesc="PortAudio library" + aldesc="PortAudio library (internal)" ADINOBJ="$ADINOBJ src/adin/pa/pa_lib.o src/adin/pa/pa_convert.o src/adin/pa/pa_trace.o src/adin/pa/pablio.o src/adin/pa/ringbuffer.o" SOUNDINC="-Isrc/adin/pa" AC_DEFINE(USE_MIC)