diff --git a/aclocal.m4 b/aclocal.m4 new file mode 100644 index 000000000..f4c6dbad2 --- /dev/null +++ b/aclocal.m4 @@ -0,0 +1,221 @@ +dnl {{{ ax_check_gfortran +AC_DEFUN([AX_CHECK_GFORTRAN],[ + +AC_ARG_ENABLE(g95, +AC_HELP_STRING([--enable-g95],[Use G95 compiler if available.]), +[g95=$enableval], [g95=no]) + +AC_ARG_ENABLE(gfortran, +AC_HELP_STRING([--enable-gfortran],[Use gfortran compiler if available.]), +[gfortran=$enableval], [gfortran=no]) + +dnl +dnl Pick up FC from the environment if present +dnl I'll add a test to confirm this is a gfortran later -db +dnl + +FCV="" + +if test -n $[{FC}] ; then + gfortran_name_part=`echo $[{FC}] | cut -c 1-8` + if test $[{gfortran_name_part}] = "gfortran" ; then + gfortran_name=$[{FC}] + FC_LIB_PATH=`$[{FC}] -print-file-name=` + g95=no + gfortran=yes + FFLAGS="$[{FFLAGS_GFORTRAN}]" + FCV="gnu95" + else + unset $[{FC}] + fi +fi + +dnl +dnl Note regarding the apparent silliness with FCV. +dnl The FCV value for g95 might be system dependent, this is +dnl still to be fully explored. If not, then the FCV_G95 +dnl stuff can go away. -db +dnl + +AC_MSG_CHECKING([uname -s]) +case `uname -s` in + CYGWIN*) + AC_MSG_RESULT(Cygwin) + CYGWIN=yes + ;; + SunOS*) + AC_MSG_RESULT(SunOS or Solaris) + AC_DEFINE(__EXTENSIONS__, 1, [This is needed to use strtok_r on Solaris.]) + ;; +dnl +dnl Pick up current gfortran from ports infrastructure for fbsd +dnl + FreeBSD*) + if test -z $[{gfortran_name}] ; then + gfortran_name=`grep FC: /usr/ports/Mk/bsd.gcc.mk | head -1 |awk '{print $[2]}'` + fi + FCV_G95="g95" + ;; + *) + FCV_G95="g95" + AC_MSG_RESULT(no) + ;; +esac + +dnl +dnl look for gfortran if nothing else was given +dnl + +if test -z $[gfortran_name] ; then + gfortran_name="gfortran" +fi + +AC_PATH_PROG(G95, g95) +AC_PATH_PROG(GFORTRAN, $[{gfortran_name}]) + +if test ! -z $[{GFORTRAN}] ; then + echo "*** gfortran compiler found at $[{GFORTRAN}]" + if test "$[{gfortran}]" = yes; then + FC_LIB_PATH=`$[{GFORTRAN}] -print-file-name=` + FC=`basename $[{GFORTRAN}]` + g95=no + FFLAGS="$[{FFLAGS_GFORTRAN}]" + FCV="gnu95" + fi +else + echo "*** No gfortran compiler found" +fi + +if test ! -z $[{G95}] ; then + echo "*** g95 compiler found at $[{G95}]" + if test "$[{g95}]" = yes; then + FC_LIB_PATH=`$[{G95}] -print-file-name=` + FC=`basename $[{G95}]` + gfortran=no + FFLAGS="$[{FFLAGS_G95}]" + FCV=$[{FCV_G95}] + fi +else + echo "*** No g95 compiler found" +fi + +dnl +dnl if FC is not set by now, pick a compiler for user +dnl +if test -z $[{FC}] ; then + if test ! -z $[{GFORTRAN}] ; then + if test "$[{g95}]" = yes; then + echo "You enabled g95, but no g95 compiler found, defaulting to gfortran instead" + fi + FC_LIB_PATH=`$[{GFORTRAN}] -print-file-name=` + FC=`basename $[{GFORTRAN}]` + g95=no + gfortran=yes + FFLAGS="$[{FFLAGS_GFORTRAN}]" + FCV="gnu95" + elif test ! -z $G95 ; then + if test "$[{gfortran}]" = yes; then + echo "You enabled gfortran, but no gfortran compiler found, defaulting to g95 instead" + fi + FC_LIB_PATH=`$[{G95}] -print-file-name=` + FC=`basename $[{G95}]` + g95=yes + gfortran=no + FFLAGS="$[{FFLAGS_G95}]" + FCV=$[{FCV_G95}] + fi +fi + +AC_DEFINE_UNQUOTED(FC_LIB_PATH, "${FC_LIB_PATH}", [Path to fortran libs.]) +AC_SUBST(FC_LIB_PATH, "${FC_LIB_PATH}") +AC_DEFINE_UNQUOTED(FC, "${FC}", [Fortran compiler.]) +AC_SUBST(FC, "${FC}") +AC_SUBST(FCV, "${FCV}") +AC_SUBST(PREFIX, "${prefix}") + +dnl ========================================= +dnl pick gfortran or g95 + +])dnl }}} + + +dnl {{{ ax_check_portaudio +AC_DEFUN([AX_CHECK_PORTAUDIO],[ + +HAS_PORTAUDIO_H=0 +HAS_PORTAUDIO_LIB=0 +HAS_PORTAUDIO=0 + +AC_MSG_CHECKING([for a v19 portaudio ]) + +portaudio_lib_dir="/usr/lib" +portaudio_include_dir="/usr/include" + +AC_ARG_WITH([portaudio-include-dir], +AC_HELP_STRING([--with-portaudio-include-dir=], + [path to portaudio include files]), + [portaudio_include_dir=$with_portaudio_include_dir]) + +AC_ARG_WITH([portaudio-lib-dir], +AC_HELP_STRING([--with-portaudio-lib-dir=], + [path to portaudio lib files]), + [portaudio_lib_dir=$with_portaudio_lib_dir]) + +if test -e $[{portaudio_include_dir}]/portaudio.h; then + HAS_PORTAUDIO_H=1 +fi + +if test -e $[{portaudio_lib_dir}]/libportaudio.so \ + -o -e $[{portaudio_lib_dir}]/libportaudio.a;then + HAS_PORTAUDIO_LIB=1 +fi + +if test $[{HAS_PORTAUDIO_H}] -eq 1 -a $[{HAS_PORTAUDIO_LIB}] -eq 1; then + LDFLAGS="-L$[{portaudio_lib_dir}] $[{LDFLAGS}]" + LIBS="$[{LIBS}] -lportaudio" + CPPFLAGS="-I$[{portaudio_include_dir}] $[{CPPFLAGS}]" + AC_CHECK_LIB(portaudio, Pa_GetVersion, \ + [HAS_PORTAUDIO_VERSION=1], [HAS_PORTAUDIO_VERSION=0]) + if test $[{HAS_PORTAUDIO_VERSION}] -eq 0; then + AC_MSG_RESULT([This is likely portaudio v18; you need portaudio v19]) + else + HAS_PORTAUDIO=1 + fi +else + AC_MSG_RESULT([portaudio not found trying FreeBSD paths ]) + portaudio_lib_dir="/usr/local/lib/portaudio2" + portaudio_include_dir="/usr/local/include/portaudio2" +dnl +dnl Try again to make sure portaudio dirs are valid +dnl + AC_MSG_CHECKING([for a v19 portaudio in FreeBSD paths.]) + HAS_PORTAUDIO_H=0 + HAS_PORTAUDIO_LIB=0 + + if test -e $[{portaudio_include_dir}]/portaudio.h; then + HAS_PORTAUDIO_H=1 + fi + + if test -e $[{portaudio_lib_dir}]/libportaudio.so \ + -o -e $[{portaudio_lib_dir}]/libportaudio.a;then + HAS_PORTAUDIO_LIB=1 + fi + + if test $[{HAS_PORTAUDIO_H}] -eq 1 -a $[{HAS_PORTAUDIO_LIB}] -eq 1; then + AC_MSG_RESULT([found portaudio in FreeBSD paths, double checking it is v19 ]) + LDFLAGS="-L$[{portaudio_lib_dir}] $[{LDFLAGS}]" + LIBS="$[{LIBS}] -lportaudio" + CPPFLAGS="-I$[{portaudio_include_dir}] $[{CPPFLAGS}]" + AC_CHECK_LIB(portaudio, Pa_GetVersion, \ + [HAS_PORTAUDIO_VERSION=1], [HAS_PORTAUDIO_VERSION=0]) + if test $[{HAS_PORTAUDIO_VERSION}] -eq 0; then + AC_MSG_RESULT([How did you end up with a portaudio v18 here?]) + else + AC_MSG_RESULT([found v19]) + HAS_PORTAUDIO=1 + HAS_PORTAUDIO_H=1 + fi + fi +fi + +])dnl }}} diff --git a/configure b/configure index a0f0e5ba8..d6949be9c 100755 --- a/configure +++ b/configure @@ -2,7 +2,7 @@ # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.62 for map65 0.9. # -# $Id: configure.ac 1151 2009-04-23 19:02:43Z va3db $ +# $Id: configure.ac 1216 2009-05-13 16:41:38Z va3db $ # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. @@ -684,6 +684,12 @@ OBJEXT F77 FFLAGS ac_ct_F77 +G95 +GFORTRAN +FC_LIB_PATH +FC +FCV +PREFIX CPP GREP EGREP @@ -701,23 +707,19 @@ LD TEST PYTHON F2PY -G95 -GFORTRAN OS CLOBBER -FC_LIB_PATH -FC LIBOBJS LTLIBOBJS' ac_subst_files='' ac_user_opts=' enable_option_checking -enable_clobber -enable_assert enable_g95 enable_gfortran with_portaudio_include_dir with_portaudio_lib_dir +enable_clobber +enable_assert ' ac_precious_vars='build_alias host_alias @@ -1351,10 +1353,10 @@ 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] - --enable-clobber Don't preserve old binaries on make install - --enable-assert Enable assert(). --enable-g95 Use G95 compiler if available. --enable-gfortran Use gfortran compiler if available. + --enable-clobber Don't preserve old binaries on make install + --enable-assert Enable assert(). Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -1449,7 +1451,7 @@ Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. -$Id: configure.ac 1151 2009-04-23 19:02:43Z va3db $ +$Id: configure.ac 1216 2009-05-13 16:41:38Z va3db $ _ACEOF exit fi @@ -3042,17 +3044,47 @@ CFLAGS="$OLD_CFLAGS" CPPFLAGS="-I/usr/local/include ${CPPFLAGS}" LDFLAGS="-L/usr/local/lib ${LDFLAGS}" LIBS=" -lpthread ${LIBS}" -FCV="" FFLAGS_GFORTRAN="${FFLAGS} -fno-range-check -ffixed-line-length-none\ -Wall -fbounds-check -fno-second-underscore -fPIC" FFLAGS_G95="${FFLAGS} -Wall -Wno-precision-loss -fbounds-check -fno-second-underscore -fPIC" #-Wall -Wno-precision-loss -fbounds-check -fno-second-underscore -fPIC -if test -n ${FC} ; then - gfortran=${FC} + +# Check whether --enable-g95 was given. +if test "${enable_g95+set}" = set; then + enableval=$enable_g95; g95=$enableval +else + g95=no fi + +# Check whether --enable-gfortran was given. +if test "${enable_gfortran+set}" = set; then + enableval=$enable_gfortran; gfortran=$enableval +else + gfortran=no +fi + + + +FCV="" + +if test -n ${FC} ; then + gfortran_name_part=`echo ${FC} | cut -c 1-8` + if test ${gfortran_name_part} = "gfortran" ; then + gfortran_name=${FC} + FC_LIB_PATH=`${FC} -print-file-name=` + g95=no + gfortran=yes + FFLAGS="${FFLAGS_GFORTRAN}" + FCV="gnu95" + else + unset ${FC} + fi +fi + + { $as_echo "$as_me:$LINENO: checking uname -s" >&5 $as_echo_n "checking uname -s... " >&6; } case `uname -s` in @@ -3071,8 +3103,8 @@ _ACEOF ;; FreeBSD*) - if test -z ${gfortran} ; then - gfortran=`grep FC: /usr/ports/Mk/bsd.gcc.mk | head -1 |awk '{print $2}'` + if test -z ${gfortran_name} ; then + gfortran_name=`grep FC: /usr/ports/Mk/bsd.gcc.mk | head -1 |awk '{print $2}'` fi FCV_G95="g95" ;; @@ -3084,26 +3116,391 @@ $as_echo "no" >&6; } esac -if test -z $gfortran ; then - gfortran="gfortran" +if test -z $gfortran_name ; then + gfortran_name="gfortran" fi -if test "$ac_cv_c_compiler_gnu" = yes; then - { $as_echo "$as_me:$LINENO: checking if $CC is Apple GCC" >&5 -$as_echo_n "checking if $CC is Apple GCC... " >&6; } +# Extract the first word of "g95", so it can be a program name with args. +set dummy g95; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_G95+set}" = set; then + $as_echo_n "(cached) " >&6 +else + case $G95 in + [\\/]* | ?:[\\/]*) + ac_cv_path_G95="$G95" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_G95="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS - if expr "`$CC -v 2>&1 | tail -1`" : ".*Apple" >/dev/null; then - AppleGCC=yes + ;; +esac +fi +G95=$ac_cv_path_G95 +if test -n "$G95"; then + { $as_echo "$as_me:$LINENO: result: $G95" >&5 +$as_echo "$G95" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +# Extract the first word of "${gfortran_name}", so it can be a program name with args. +set dummy ${gfortran_name}; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_GFORTRAN+set}" = set; then + $as_echo_n "(cached) " >&6 +else + case $GFORTRAN in + [\\/]* | ?:[\\/]*) + ac_cv_path_GFORTRAN="$GFORTRAN" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_GFORTRAN="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + ;; +esac +fi +GFORTRAN=$ac_cv_path_GFORTRAN +if test -n "$GFORTRAN"; then + { $as_echo "$as_me:$LINENO: result: $GFORTRAN" >&5 +$as_echo "$GFORTRAN" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + +if test ! -z ${GFORTRAN} ; then + echo "*** gfortran compiler found at ${GFORTRAN}" + if test "${gfortran}" = yes; then + FC_LIB_PATH=`${GFORTRAN} -print-file-name=` + FC=`basename ${GFORTRAN}` + g95=no + FFLAGS="${FFLAGS_GFORTRAN}" + FCV="gnu95" + fi +else + echo "*** No gfortran compiler found" +fi + +if test ! -z ${G95} ; then + echo "*** g95 compiler found at ${G95}" + if test "${g95}" = yes; then + FC_LIB_PATH=`${G95} -print-file-name=` + FC=`basename ${G95}` + gfortran=no + FFLAGS="${FFLAGS_G95}" + FCV=${FCV_G95} + fi +else + echo "*** No g95 compiler found" +fi + +if test -z ${FC} ; then + if test ! -z ${GFORTRAN} ; then + if test "${g95}" = yes; then + echo "You enabled g95, but no g95 compiler found, defaulting to gfortran instead" + fi + FC_LIB_PATH=`${GFORTRAN} -print-file-name=` + FC=`basename ${GFORTRAN}` + g95=no + gfortran=yes + FFLAGS="${FFLAGS_GFORTRAN}" + FCV="gnu95" + elif test ! -z $G95 ; then + if test "${gfortran}" = yes; then + echo "You enabled gfortran, but no gfortran compiler found, defaulting to g95 instead" + fi + FC_LIB_PATH=`${G95} -print-file-name=` + FC=`basename ${G95}` + g95=yes + gfortran=no + FFLAGS="${FFLAGS_G95}" + FCV=${FCV_G95} + fi +fi + + +cat >>confdefs.h <<_ACEOF +#define FC_LIB_PATH "${FC_LIB_PATH}" +_ACEOF + +FC_LIB_PATH="${FC_LIB_PATH}" + + +cat >>confdefs.h <<_ACEOF +#define FC "${FC}" +_ACEOF + +FC="${FC}" + +FCV="${FCV}" + +PREFIX="${prefix}" + + + + + + + +HAS_PORTAUDIO_H=0 +HAS_PORTAUDIO_LIB=0 +HAS_PORTAUDIO=0 + +{ $as_echo "$as_me:$LINENO: checking for a v19 portaudio " >&5 +$as_echo_n "checking for a v19 portaudio ... " >&6; } + +portaudio_lib_dir="/usr/lib" +portaudio_include_dir="/usr/include" + + +# Check whether --with-portaudio-include-dir was given. +if test "${with_portaudio_include_dir+set}" = set; then + withval=$with_portaudio_include_dir; portaudio_include_dir=$with_portaudio_include_dir +fi + + + +# Check whether --with-portaudio-lib-dir was given. +if test "${with_portaudio_lib_dir+set}" = set; then + withval=$with_portaudio_lib_dir; portaudio_lib_dir=$with_portaudio_lib_dir +fi + + +if test -e ${portaudio_include_dir}/portaudio.h; then + HAS_PORTAUDIO_H=1 +fi + +if test -e ${portaudio_lib_dir}/libportaudio.so \ + -o -e ${portaudio_lib_dir}/libportaudio.a;then + HAS_PORTAUDIO_LIB=1 +fi + +if test ${HAS_PORTAUDIO_H} -eq 1 -a ${HAS_PORTAUDIO_LIB} -eq 1; then + LDFLAGS="-L${portaudio_lib_dir} ${LDFLAGS}" + LIBS="${LIBS} -lportaudio" + CPPFLAGS="-I${portaudio_include_dir} ${CPPFLAGS}" + { $as_echo "$as_me:$LINENO: checking for Pa_GetVersion in -lportaudio" >&5 +$as_echo_n "checking for Pa_GetVersion in -lportaudio... " >&6; } +if test "${ac_cv_lib_portaudio_Pa_GetVersion+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lportaudio $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char Pa_GetVersion (); +int +main () +{ +return Pa_GetVersion (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_portaudio_Pa_GetVersion=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_portaudio_Pa_GetVersion=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_portaudio_Pa_GetVersion" >&5 +$as_echo "$ac_cv_lib_portaudio_Pa_GetVersion" >&6; } +if test $ac_cv_lib_portaudio_Pa_GetVersion = yes; then + \ + HAS_PORTAUDIO_VERSION=1 +else + HAS_PORTAUDIO_VERSION=0 +fi + + if test ${HAS_PORTAUDIO_VERSION} -eq 0; then + { $as_echo "$as_me:$LINENO: result: This is likely portaudio v18; you need portaudio v19" >&5 +$as_echo "This is likely portaudio v18; you need portaudio v19" >&6; } else - AppleGCC=no + HAS_PORTAUDIO=1 + fi +else + { $as_echo "$as_me:$LINENO: result: portaudio not found trying FreeBSD paths " >&5 +$as_echo "portaudio not found trying FreeBSD paths " >&6; } + portaudio_lib_dir="/usr/local/lib/portaudio2" + portaudio_include_dir="/usr/local/include/portaudio2" + { $as_echo "$as_me:$LINENO: checking for a v19 portaudio in FreeBSD paths." >&5 +$as_echo_n "checking for a v19 portaudio in FreeBSD paths.... " >&6; } + HAS_PORTAUDIO_H=0 + HAS_PORTAUDIO_LIB=0 + + if test -e ${portaudio_include_dir}/portaudio.h; then + HAS_PORTAUDIO_H=1 fi - { $as_echo "$as_me:$LINENO: result: $AppleGCC" >&5 -$as_echo "$AppleGCC" >&6; } + if test -e ${portaudio_lib_dir}/libportaudio.so \ + -o -e ${portaudio_lib_dir}/libportaudio.a;then + HAS_PORTAUDIO_LIB=1 + fi - CFLAGS="$CFLAGS -Wall -O0" + if test ${HAS_PORTAUDIO_H} -eq 1 -a ${HAS_PORTAUDIO_LIB} -eq 1; then + { $as_echo "$as_me:$LINENO: result: found portaudio in FreeBSD paths, double checking it is v19 " >&5 +$as_echo "found portaudio in FreeBSD paths, double checking it is v19 " >&6; } + LDFLAGS="-L${portaudio_lib_dir} ${LDFLAGS}" + LIBS="${LIBS} -lportaudio" + CPPFLAGS="-I${portaudio_include_dir} ${CPPFLAGS}" + { $as_echo "$as_me:$LINENO: checking for Pa_GetVersion in -lportaudio" >&5 +$as_echo_n "checking for Pa_GetVersion in -lportaudio... " >&6; } +if test "${ac_cv_lib_portaudio_Pa_GetVersion+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lportaudio $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char Pa_GetVersion (); +int +main () +{ +return Pa_GetVersion (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_portaudio_Pa_GetVersion=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_portaudio_Pa_GetVersion=no fi +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_portaudio_Pa_GetVersion" >&5 +$as_echo "$ac_cv_lib_portaudio_Pa_GetVersion" >&6; } +if test $ac_cv_lib_portaudio_Pa_GetVersion = yes; then + \ + HAS_PORTAUDIO_VERSION=1 +else + HAS_PORTAUDIO_VERSION=0 +fi + + if test ${HAS_PORTAUDIO_VERSION} -eq 0; then + { $as_echo "$as_me:$LINENO: result: How did you end up with a portaudio v18 here?" >&5 +$as_echo "How did you end up with a portaudio v18 here?" >&6; } + else + { $as_echo "$as_me:$LINENO: result: found v19" >&5 +$as_echo "found v19" >&6; } + HAS_PORTAUDIO=1 + HAS_PORTAUDIO_H=1 + fi + fi +fi + + + if test "$ac_cv_prog_cc_g" = yes; then CFLAGS="$CFLAGS -g" fi @@ -3113,7 +3510,6 @@ if test ! -z "$CFLAGS"; then fi - { $as_echo "$as_me:$LINENO: checking for library containing strerror" >&5 $as_echo_n "checking for library containing strerror... " >&6; } if test "${ac_cv_search_strerror+set}" = set; then @@ -4246,86 +4642,6 @@ $as_echo "no" >&6; } fi -# Extract the first word of "g95", so it can be a program name with args. -set dummy g95; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_G95+set}" = set; then - $as_echo_n "(cached) " >&6 -else - case $G95 in - [\\/]* | ?:[\\/]*) - ac_cv_path_G95="$G95" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_G95="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - - ;; -esac -fi -G95=$ac_cv_path_G95 -if test -n "$G95"; then - { $as_echo "$as_me:$LINENO: result: $G95" >&5 -$as_echo "$G95" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - -# Extract the first word of "${gfortran}", so it can be a program name with args. -set dummy ${gfortran}; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_GFORTRAN+set}" = set; then - $as_echo_n "(cached) " >&6 -else - case $GFORTRAN in - [\\/]* | ?:[\\/]*) - ac_cv_path_GFORTRAN="$GFORTRAN" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_GFORTRAN="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - - ;; -esac -fi -GFORTRAN=$ac_cv_path_GFORTRAN -if test -n "$GFORTRAN"; then - { $as_echo "$as_me:$LINENO: result: $GFORTRAN" >&5 -$as_echo "$GFORTRAN" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - { $as_echo "$as_me:$LINENO: checking OS" >&5 $as_echo_n "checking OS... " >&6; } OS=`uname` @@ -5081,10 +5397,6 @@ fi -HAS_PORTAUDIO_H=0 -HAS_PORTAUDIO_LIB=0 -HAS_PORTAUDIO=0 - { $as_echo "$as_me:$LINENO: checking whether string.h and strings.h may both be included" >&5 $as_echo_n "checking whether string.h and strings.h may both be included... " >&6; } if test "${gcc_cv_header_string+set}" = set; then @@ -5375,95 +5687,12 @@ _ACEOF fi - if test "$prefix" = "NONE"; then - -cat >>confdefs.h <<_ACEOF -#define PREFIX "$ac_default_prefix" -_ACEOF - - + prefix=${ac_default_prefix} else - prefix=`echo $prefix | sed 's/\/$//'` - -cat >>confdefs.h <<_ACEOF -#define PREFIX "$prefix" -_ACEOF - - -fi - -ac_config_files="$ac_config_files Makefile" - - - -# Check whether --enable-g95 was given. -if test "${enable_g95+set}" = set; then - enableval=$enable_g95; g95=$enableval -else - g95=no -fi - - -# Check whether --enable-gfortran was given. -if test "${enable_gfortran+set}" = set; then - enableval=$enable_gfortran; gfortran=$enableval -else - gfortran=no -fi - - - -if test ! -z $GFORTRAN ; then - echo "*** gfortran compiler found at ${GFORTRAN}" - if test "$gfortran" = yes; then - FC_LIB_PATH=`${GFORTRAN} -print-file-name=` - FC=`basename ${GFORTRAN}` - g95=no - FFLAGS="${FFLAGS_GFORTRAN}" - FCV="gnu95" - fi -else - echo "*** No gfortran compiler found" -fi - -if test ! -z $G95 ; then - echo "*** g95 compiler found at ${G95}" - if test "$g95" = yes; then - FC_LIB_PATH=`${G95} -print-file-name=` - FC=`basename ${G95}` - gfortran=no - FFLAGS="${FFLAGS_G95}" - FCV=${FCV_G95} - fi -else - echo "*** No g95 compiler found" -fi - -if test -z $FC ; then - if test ! -z $GFORTRAN ; then - if test "$g95" = yes; then - echo "You enabled g95, but no g95 compiler found, defaulting to gfortran instead" - fi - FC_LIB_PATH=`${GFORTRAN} -print-file-name=` - FC=`basename ${GFORTRAN}` - g95=no - gfortran=yes - FFLAGS="${FFLAGS} -fno-range-check -ffixed-line-length-none" - FCV="gnu95" - elif test ! -z $G95 ; then - if test "$gfortran" = yes; then - echo "You enabled gfortran, but no gfortran compiler found, defaulting to g95 instead" - fi - FC_LIB_PATH=`${G95} -print-file-name=` - FC=`basename ${G95}` - g95=yes - gfortran=no - FFLAGS="${FFLAGS} -ftrace=full -cpp" - FCV="g95" - fi + prefix=`echo ${ac_default_prefix} | sed 's/\/$//'` fi @@ -5480,229 +5709,11 @@ _ACEOF FC="${FC}" +FCV="${FCV}" +PREFIX="${prefix}" -{ $as_echo "$as_me:$LINENO: checking for a v19 portaudio " >&5 -$as_echo_n "checking for a v19 portaudio ... " >&6; } - -portaudio_lib_dir="/usr/lib" -portaudio_include_dir="/usr/include" - - -# Check whether --with-portaudio-include-dir was given. -if test "${with_portaudio_include_dir+set}" = set; then - withval=$with_portaudio_include_dir; portaudio_include_dir=$with_portaudio_include_dir -fi - - - -# Check whether --with-portaudio-lib-dir was given. -if test "${with_portaudio_lib_dir+set}" = set; then - withval=$with_portaudio_lib_dir; portaudio_lib_dir=$with_portaudio_lib_dir -fi - - -if test -e ${portaudio_include_dir}/portaudio.h; then - HAS_PORTAUDIO_H=1 -fi - -if test -e ${portaudio_lib_dir}/libportaudio.so \ - -o -e ${portaudio_lib_dir}/libportaudio.a;then - HAS_PORTAUDIO_LIB=1 -fi - -if test $HAS_PORTAUDIO_H -eq 1 -a $HAS_PORTAUDIO_LIB -eq 1; then - LDFLAGS="-L${portaudio_lib_dir} ${LDFLAGS}" - LIBS="${LIBS} -lportaudio" - CPPFLAGS="-I${portaudio_include_dir} ${CPPFLAGS}" - { $as_echo "$as_me:$LINENO: checking for Pa_GetVersion in -lportaudio" >&5 -$as_echo_n "checking for Pa_GetVersion in -lportaudio... " >&6; } -if test "${ac_cv_lib_portaudio_Pa_GetVersion+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lportaudio $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char Pa_GetVersion (); -int -main () -{ -return Pa_GetVersion (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_portaudio_Pa_GetVersion=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_portaudio_Pa_GetVersion=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_portaudio_Pa_GetVersion" >&5 -$as_echo "$ac_cv_lib_portaudio_Pa_GetVersion" >&6; } -if test $ac_cv_lib_portaudio_Pa_GetVersion = yes; then - \ - HAS_PORTAUDIO_VERSION=1 -else - HAS_PORTAUDIO_VERSION=0 -fi - - if test $HAS_PORTAUDIO_VERSION -eq 0; then - { $as_echo "$as_me:$LINENO: result: This is likely portaudio v18; you need portaudio v19" >&5 -$as_echo "This is likely portaudio v18; you need portaudio v19" >&6; } - else - HAS_PORTAUDIO=1 - fi -else - { $as_echo "$as_me:$LINENO: result: portaudio not found trying FreeBSD paths " >&5 -$as_echo "portaudio not found trying FreeBSD paths " >&6; } - portaudio_lib_dir="/usr/local/lib/portaudio2" - portaudio_include_dir="/usr/local/include/portaudio2" - { $as_echo "$as_me:$LINENO: checking for a v19 portaudio in FreeBSD paths." >&5 -$as_echo_n "checking for a v19 portaudio in FreeBSD paths.... " >&6; } - HAS_PORTAUDIO_H=0 - HAS_PORTAUDIO_LIB=0 - - if test -e ${portaudio_include_dir}/portaudio.h; then - HAS_PORTAUDIO_H=1 - fi - - if test -e ${portaudio_lib_dir}/libportaudio.so \ - -o -e ${portaudio_lib_dir}/libportaudio.a;then - HAS_PORTAUDIO_LIB=1 - fi - - if test $HAS_PORTAUDIO_H -eq 1 -a $HAS_PORTAUDIO_LIB -eq 1; then - { $as_echo "$as_me:$LINENO: result: found portaudio in FreeBSD paths, double checking it is v19 " >&5 -$as_echo "found portaudio in FreeBSD paths, double checking it is v19 " >&6; } - LDFLAGS="-L${portaudio_lib_dir} ${LDFLAGS}" - LIBS="${LIBS} -lportaudio" - CPPFLAGS="-I${portaudio_include_dir} ${CPPFLAGS}" - { $as_echo "$as_me:$LINENO: checking for Pa_GetVersion in -lportaudio" >&5 -$as_echo_n "checking for Pa_GetVersion in -lportaudio... " >&6; } -if test "${ac_cv_lib_portaudio_Pa_GetVersion+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lportaudio $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char Pa_GetVersion (); -int -main () -{ -return Pa_GetVersion (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_portaudio_Pa_GetVersion=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_portaudio_Pa_GetVersion=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_portaudio_Pa_GetVersion" >&5 -$as_echo "$ac_cv_lib_portaudio_Pa_GetVersion" >&6; } -if test $ac_cv_lib_portaudio_Pa_GetVersion = yes; then - \ - HAS_PORTAUDIO_VERSION=1 -else - HAS_PORTAUDIO_VERSION=0 -fi - - if test $HAS_PORTAUDIO_VERSION -eq 0; then - { $as_echo "$as_me:$LINENO: result: How did you end up with a portaudio v18 here?" >&5 -$as_echo "How did you end up with a portaudio v18 here?" >&6; } - else - { $as_echo "$as_me:$LINENO: result: found v19" >&5 -$as_echo "found v19" >&6; } - HAS_PORTAUDIO=1 - HAS_PORTAUDIO_H=1 - fi - fi -fi - if test -z $FC ; then fail=1 @@ -5786,6 +5797,7 @@ LIBS="${LIBS}" + cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure @@ -6257,7 +6269,6 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. -config_files="$ac_config_files" _ACEOF @@ -6273,11 +6284,6 @@ Usage: $0 [OPTIONS] [FILE]... -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE - -Configuration files: -$config_files Report bugs to ." @@ -6324,13 +6330,6 @@ do $as_echo "$ac_cs_version"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; - --file | --fil | --fi | --f ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - CONFIG_FILES="$CONFIG_FILES '$ac_optarg'" - ac_need_defaults=false;; --he | --h | --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ @@ -6388,7 +6387,6 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 for ac_config_target in $ac_config_targets do case $ac_config_target in - "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 $as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;} @@ -6397,467 +6395,6 @@ $as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;} done -# If the user did not use the arguments to specify the items to instantiate, -# then the envvar interface is used. Set only those that are not. -# We use the long form for the default assignment because of an extremely -# bizarre bug on SunOS 4.1.3. -if $ac_need_defaults; then - test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files -fi - -# Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason against having it here, and in addition, -# creating and moving files from /tmp can sometimes cause problems. -# Hook for its removal unless debugging. -# Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to `$tmp'. -$debug || -{ - tmp= - trap 'exit_status=$? - { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status -' 0 - trap '{ (exit 1); exit 1; }' 1 2 13 15 -} -# Create a (secure) tmp directory for tmp files. - -{ - tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -n "$tmp" && test -d "$tmp" -} || -{ - tmp=./conf$$-$RANDOM - (umask 077 && mkdir "$tmp") -} || -{ - $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. -# This happens for instance with `./config.status config.h'. -if test -n "$CONFIG_FILES"; then - - -ac_cr=' ' -ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` -if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\\r' -else - ac_cs_awk_cr=$ac_cr -fi - -echo 'BEGIN {' >"$tmp/subs1.awk" && -_ACEOF - - -{ - echo "cat >conf$$subs.awk <<_ACEOF" && - echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && - echo "_ACEOF" -} >conf$$subs.sh || - { { $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_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; }; } - - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` = $ac_delim_num; then - break - elif $ac_last_try; then - { { $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 -done -rm -f conf$$subs.sh - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -cat >>"\$tmp/subs1.awk" <<\\_ACAWK && -_ACEOF -sed -n ' -h -s/^/S["/; s/!.*/"]=/ -p -g -s/^[^!]*!// -:repl -t repl -s/'"$ac_delim"'$// -t delim -:nl -h -s/\(.\{148\}\).*/\1/ -t more1 -s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ -p -n -b repl -:more1 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t nl -:delim -h -s/\(.\{148\}\).*/\1/ -t more2 -s/["\\]/\\&/g; s/^/"/; s/$/"/ -p -b -:more2 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t delim -' >$CONFIG_STATUS || ac_write_fail=1 -rm -f conf$$subs.awk -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -_ACAWK -cat >>"\$tmp/subs1.awk" <<_ACAWK && - for (key in S) S_is_set[key] = 1 - FS = "" - -} -{ - line = $ 0 - nfields = split(line, field, "@") - substed = 0 - len = length(field[1]) - for (i = 2; i < nfields; i++) { - key = field[i] - keylen = length(key) - if (S_is_set[key]) { - value = S[key] - line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) - len += length(value) + length(field[++i]) - substed = 1 - } else - len += 1 + keylen - } - - print line -} - -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then - sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" -else - cat -fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ - || { { $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), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/ -s/:*\${srcdir}:*/:/ -s/:*@srcdir@:*/:/ -s/^\([^=]*=[ ]*\):*/\1/ -s/:*$// -s/^[^=]*=[ ]*$// -}' -fi - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -fi # test -n "$CONFIG_FILES" - - -eval set X " :F $CONFIG_FILES " -shift -for ac_tag -do - case $ac_tag in - :[FHLC]) ac_mode=$ac_tag; continue;; - esac - case $ac_mode$ac_tag in - :[FHL]*:*);; - :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 - ac_save_IFS=$IFS - IFS=: - set x $ac_tag - IFS=$ac_save_IFS - shift - ac_file=$1 - shift - - case $ac_mode in - :L) ac_source=$1;; - :[FH]) - ac_file_inputs= - for ac_f - do - case $ac_f in - -) ac_f="$tmp/stdin";; - *) # Look for the file first in the build tree, then in the source tree - # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. - test -f "$ac_f" || - case $ac_f in - [\\/$]*) false;; - *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; - esac || - { { $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 - ac_file_inputs="$ac_file_inputs '$ac_f'" - done - - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - configure_input='Generated from '` - $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' - `' by configure.' - if test x"$ac_file" != x-; then - configure_input="$ac_file. $configure_input" - { $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. - case $configure_input in #( - *\&* | *\|* | *\\* ) - ac_sed_conf_input=`$as_echo "$configure_input" | - sed 's/[\\\\&|]/\\\\&/g'`;; #( - *) ac_sed_conf_input=$configure_input;; - esac - - case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin" \ - || { { $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 - - ac_dir=`$as_dirname -- "$ac_file" || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - { 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 -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - - case $ac_mode in - :F) - # - # CONFIG_FILE - # - - case $INSTALL in - [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; - *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; - 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 - q -} -/@datadir@/p -/@docdir@/p -/@infodir@/p -/@localedir@/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:$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 - ac_datarootdir_hack=' - s&@datadir@&$datadir&g - s&@docdir@&$docdir&g - s&@infodir@&$infodir&g - s&@localedir@&$localedir&g - s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; -esac -_ACEOF - -# Neutralize VPATH when `$srcdir' = `.'. -# Shell code in configure.ac might set extrasub. -# FIXME: do we really want to maintain this feature? -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_sed_extra="$ac_vpsub -$extrasub -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -:t -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s|@configure_input@|$ac_sed_conf_input|;t t -s&@top_builddir@&$ac_top_builddir_sub&;t t -s&@top_build_prefix@&$ac_top_build_prefix&;t t -s&@srcdir@&$ac_srcdir&;t t -s&@abs_srcdir@&$ac_abs_srcdir&;t t -s&@top_srcdir@&$ac_top_srcdir&;t t -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 -$ac_datarootdir_hack -" -eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ - || { { $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:$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;} - - rm -f "$tmp/stdin" - case $ac_file in - -) cat "$tmp/out" && rm -f "$tmp/out";; - *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; - esac \ - || { { $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 - -done # for ac_tag - - { (exit 0); exit 0; } _ACEOF chmod +x $CONFIG_STATUS diff --git a/configure.ac b/configure.ac index 937c99b14..ec87aec80 100644 --- a/configure.ac +++ b/configure.ac @@ -25,67 +25,13 @@ dnl Lets guess at some likely places for extra libs/includes XXX -db CPPFLAGS="-I/usr/local/include ${CPPFLAGS}" LDFLAGS="-L/usr/local/lib ${LDFLAGS}" LIBS=" -lpthread ${LIBS}" -FCV="" FFLAGS_GFORTRAN="${FFLAGS} -fno-range-check -ffixed-line-length-none\ -Wall -fbounds-check -fno-second-underscore -fPIC" FFLAGS_G95="${FFLAGS} -Wall -Wno-precision-loss -fbounds-check -fno-second-underscore -fPIC" #-Wall -Wno-precision-loss -fbounds-check -fno-second-underscore -fPIC -dnl -dnl Pick up FC from the environment if present -dnl I'll add a test to confirm this is a gfortran later -db -dnl - -if test -n ${FC} ; then - gfortran=${FC} -fi - -AC_MSG_CHECKING([uname -s]) -case `uname -s` in - CYGWIN*) - AC_MSG_RESULT(Cygwin) - CYGWIN=yes - ;; - SunOS*) - AC_MSG_RESULT(SunOS or Solaris) - AC_DEFINE(__EXTENSIONS__, 1, [This is needed to use strtok_r on Solaris.]) - ;; -dnl -dnl Pick up current gfortran from ports infrastructure for fbsd -dnl - FreeBSD*) - if test -z ${gfortran} ; then - gfortran=`grep FC: /usr/ports/Mk/bsd.gcc.mk | head -1 |awk '{print $2}'` - fi - FCV_G95="g95" - ;; - *) - FCV_G95="g95" - AC_MSG_RESULT(no) - ;; -esac - -dnl -dnl look for gfortran if nothing else was given -dnl - -if test -z $gfortran ; then - gfortran="gfortran" -fi - -if test "$ac_cv_c_compiler_gnu" = yes; then - AC_MSG_CHECKING(if $CC is Apple GCC) - - if expr "`$CC -v 2>&1 | tail -1`" : ".*Apple" >/dev/null; then - AppleGCC=yes - else - AppleGCC=no - fi - - AC_MSG_RESULT($AppleGCC) - - CFLAGS="$CFLAGS -Wall -O0" -fi +AX_CHECK_GFORTRAN +AX_CHECK_PORTAUDIO dnl If we support -g, use it! if test "$ac_cv_prog_cc_g" = yes; then @@ -115,8 +61,6 @@ AC_PATH_PROG(LD, ld) AC_PATH_PROG(TEST, [test], [test]) AC_PATH_PROG(PYTHON, python) AC_PATH_PROG(F2PY, f2py) -AC_PATH_PROG(G95, g95) -AC_PATH_PROG(GFORTRAN, ${gfortran}) AC_MSG_CHECKING([OS]) OS=`uname` AC_SUBST(OS, "${OS}") @@ -134,10 +78,6 @@ AC_HEADER_TIME AC_CHECK_HEADER([fftw3.h], [HAS_FFTW3_H=1], [HAS_FFTW3_H=0]) AC_CHECK_HEADER([samplerate.h], [HAS_SAMPLERATE_H=1], [HAS_SAMPLERATE_H=0]) -HAS_PORTAUDIO_H=0 -HAS_PORTAUDIO_LIB=0 -HAS_PORTAUDIO=0 - dnl See whether we can include both string.h and strings.h. AC_CACHE_CHECK([whether string.h and strings.h may both be included], gcc_cv_header_string, @@ -189,70 +129,6 @@ dnl a custom prefix with a trailing slash prefix=`echo ${ac_default_prefix} | sed 's/\/$//'` fi -dnl pick gfortran or g95 -dnl ==================== - -AC_ARG_ENABLE(g95, -AC_HELP_STRING([--enable-g95],[Use G95 compiler if available.]), -[g95=$enableval], [g95=no]) - -AC_ARG_ENABLE(gfortran, -AC_HELP_STRING([--enable-gfortran],[Use gfortran compiler if available.]), -[gfortran=$enableval], [gfortran=no]) - -dnl now set conf.h,, CPPFLAGS and CFLAGS flags as needed -dnl ==================================================== - -if test "$g95" = yes; then - FC_LIB_PATH=${G95_LIB_PATH} - FC=${G95} - gfortran=no -elif test "$gfortran" = yes; then - FC_LIB_PATH=${GFORTRAN_LIB_PATH} - FC=${GFORTRAN} - g95=no -fi - -if test -z $FC ; then - if test ! -z $GFORTRAN ; then - FC_LIB_PATH=${GFORTRAN_LIB_PATH} - FC=${GFORTRAN} - gfortran=yes - elif test ! -z $G95 ; then - FC_LIB_PATH=${G95_LIB_PATH} - FC=${G95} - g95=yes - fi -fi - -dnl -dnl if FC is not set by now, pick a compiler for user -dnl - -if test -z $FC ; then - if test ! -z $GFORTRAN ; then - if test "$g95" = yes; then - echo "You enabled g95, but no g95 compiler found, defaulting to gfortran instead" - fi - FC_LIB_PATH=`${GFORTRAN} -print-file-name=` - FC=`basename ${GFORTRAN}` - g95=no - gfortran=yes - FFLAGS="${FFLAGS} -fno-range-check -ffixed-line-length-none" - FCV="gnu95" - elif test ! -z $G95 ; then - if test "$gfortran" = yes; then - echo "You enabled gfortran, but no gfortran compiler found, defaulting to g95 instead" - fi - FC_LIB_PATH=`${G95} -print-file-name=` - FC=`basename ${G95}` - g95=yes - gfortran=no - FFLAGS="${FFLAGS} -ftrace=full -cpp" - FCV="g95" - fi -fi - AC_DEFINE_UNQUOTED(FC_LIB_PATH, "${FC_LIB_PATH}", [Path to fortran libs.]) AC_SUBST(FC_LIB_PATH, "${FC_LIB_PATH}") AC_DEFINE_UNQUOTED(FC, "${FC}", [Fortran compiler.]) @@ -260,82 +136,6 @@ AC_SUBST(FC, "${FC}") AC_SUBST(FCV, "${FCV}") AC_SUBST(PREFIX, "${prefix}") -dnl set defaults -dnl ============ - - -AC_MSG_CHECKING([for a v19 portaudio ]) - -portaudio_lib_dir="/usr/lib" -portaudio_include_dir="/usr/include" - -AC_ARG_WITH([portaudio-include-dir], -AC_HELP_STRING([--with-portaudio-include-dir=], - [path to portaudio include files]), - [portaudio_include_dir=$with_portaudio_include_dir]) - -AC_ARG_WITH([portaudio-lib-dir], -AC_HELP_STRING([--with-portaudio-lib-dir=], - [path to portaudio lib files]), - [portaudio_lib_dir=$with_portaudio_lib_dir]) - -if test -e ${portaudio_include_dir}/portaudio.h; then - HAS_PORTAUDIO_H=1 -fi - -if test -e ${portaudio_lib_dir}/libportaudio.so \ - -o -e ${portaudio_lib_dir}/libportaudio.a;then - HAS_PORTAUDIO_LIB=1 -fi - -if test $HAS_PORTAUDIO_H -eq 1 -a $HAS_PORTAUDIO_LIB -eq 1; then - LDFLAGS="-L${portaudio_lib_dir} ${LDFLAGS}" - LIBS="${LIBS} -lportaudio" - CPPFLAGS="-I${portaudio_include_dir} ${CPPFLAGS}" - AC_CHECK_LIB(portaudio, Pa_GetVersion, \ - [HAS_PORTAUDIO_VERSION=1], [HAS_PORTAUDIO_VERSION=0]) - if test $HAS_PORTAUDIO_VERSION -eq 0; then - AC_MSG_RESULT([This is likely portaudio v18; you need portaudio v19]) - else - HAS_PORTAUDIO=1 - fi -else - AC_MSG_RESULT([portaudio not found trying FreeBSD paths ]) - portaudio_lib_dir="/usr/local/lib/portaudio2" - portaudio_include_dir="/usr/local/include/portaudio2" -dnl -dnl Try again to make sure portaudio dirs are valid -dnl - AC_MSG_CHECKING([for a v19 portaudio in FreeBSD paths.]) - HAS_PORTAUDIO_H=0 - HAS_PORTAUDIO_LIB=0 - - if test -e ${portaudio_include_dir}/portaudio.h; then - HAS_PORTAUDIO_H=1 - fi - - if test -e ${portaudio_lib_dir}/libportaudio.so \ - -o -e ${portaudio_lib_dir}/libportaudio.a;then - HAS_PORTAUDIO_LIB=1 - fi - - if test $HAS_PORTAUDIO_H -eq 1 -a $HAS_PORTAUDIO_LIB -eq 1; then - AC_MSG_RESULT([found portaudio in FreeBSD paths, double checking it is v19 ]) - LDFLAGS="-L${portaudio_lib_dir} ${LDFLAGS}" - LIBS="${LIBS} -lportaudio" - CPPFLAGS="-I${portaudio_include_dir} ${CPPFLAGS}" - AC_CHECK_LIB(portaudio, Pa_GetVersion, \ - [HAS_PORTAUDIO_VERSION=1], [HAS_PORTAUDIO_VERSION=0]) - if test $HAS_PORTAUDIO_VERSION -eq 0; then - AC_MSG_RESULT([How did you end up with a portaudio v18 here?]) - else - AC_MSG_RESULT([found v19]) - HAS_PORTAUDIO=1 - HAS_PORTAUDIO_H=1 - fi - fi -fi - dnl sanity tests. dnl ============= @@ -401,6 +201,7 @@ AC_SUBST(CPPFLAGS, "${CPPFLAGS}") AC_SUBST(LDFLAGS, "${LDFLAGS}") AC_SUBST(LIBS, "${LIBS}") AC_SUBST(CFLAGS) +AC_SUBST(FFLAGS) AC_OUTPUT dnl AC_CONFIG_FILES(Makefile) diff --git a/jtaudio.c b/jtaudio.c index 6e790c2d9..0748ada30 100644 --- a/jtaudio.c +++ b/jtaudio.c @@ -1,5 +1,5 @@ #include -#include "portaudio.h" +#include #include void fivehz_(); @@ -183,8 +183,8 @@ int jtaudio_(int *ndevin, int *ndevout, short y1[], short y2[], dnfs, //Sample rate 2048, //Frames per buffer paNoFlag, - SoundOut, //Callback routine - &data); //address of data structure + (PaStreamCallback *)SoundOut, //Callback routine + (void *)&data); //address of data structure if(err2a) { printf("Error opening Audio stream for output.\n"); printf("%s\n",Pa_GetErrorText(err2a));