* Default to using double-precision FFTs only when linking against FFTW,

to avoid having to -lfftw3 -lfftw3f
This commit is contained in:
Chris Cannam
2007-11-27 14:12:04 +00:00
parent 653bf4017a
commit 09dadc239a
6 changed files with 227 additions and 160 deletions

286
configure vendored
View File

@@ -670,8 +670,6 @@ SRC_CFLAGS
SRC_LIBS
SNDFILE_CFLAGS
SNDFILE_LIBS
FFTWF_CFLAGS
FFTWF_LIBS
FFTW_CFLAGS
FFTW_LIBS
Vamp_CFLAGS
@@ -696,8 +694,6 @@ SRC_CFLAGS
SRC_LIBS
SNDFILE_CFLAGS
SNDFILE_LIBS
FFTWF_CFLAGS
FFTWF_LIBS
FFTW_CFLAGS
FFTW_LIBS
Vamp_CFLAGS
@@ -1287,9 +1283,6 @@ Some influential environment variables:
C compiler flags for SNDFILE, overriding pkg-config
SNDFILE_LIBS
linker flags for SNDFILE, overriding pkg-config
FFTWF_CFLAGS
C compiler flags for FFTWF, overriding pkg-config
FFTWF_LIBS linker flags for FFTWF, overriding pkg-config
FFTW_CFLAGS C compiler flags for FFTW, overriding pkg-config
FFTW_LIBS linker flags for FFTW, overriding pkg-config
Vamp_CFLAGS C compiler flags for Vamp, overriding pkg-config
@@ -4096,7 +4089,7 @@ Alternatively, you may set the environment variables SRC_CFLAGS
and SRC_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
To get pkg-config, see <http://pkg-config.freedesktop.org/>.
To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.
See \`config.log' for more details." >&5
echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
@@ -4106,7 +4099,7 @@ Alternatively, you may set the environment variables SRC_CFLAGS
and SRC_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
To get pkg-config, see <http://pkg-config.freedesktop.org/>.
To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.
See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }
else
@@ -4210,7 +4203,7 @@ Alternatively, you may set the environment variables SNDFILE_CFLAGS
and SNDFILE_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
To get pkg-config, see <http://pkg-config.freedesktop.org/>.
To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.
See \`config.log' for more details." >&5
echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
@@ -4220,7 +4213,7 @@ Alternatively, you may set the environment variables SNDFILE_CFLAGS
and SNDFILE_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
To get pkg-config, see <http://pkg-config.freedesktop.org/>.
To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.
See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }
else
@@ -4234,120 +4227,6 @@ fi
pkg_failed=no
{ echo "$as_me:$LINENO: checking for FFTWF" >&5
echo $ECHO_N "checking for FFTWF... $ECHO_C" >&6; }
if test -n "$PKG_CONFIG"; then
if test -n "$FFTWF_CFLAGS"; then
pkg_cv_FFTWF_CFLAGS="$FFTWF_CFLAGS"
else
if test -n "$PKG_CONFIG" && \
{ (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"fftw3f\"") >&5
($PKG_CONFIG --exists --print-errors "fftw3f") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
pkg_cv_FFTWF_CFLAGS=`$PKG_CONFIG --cflags "fftw3f" 2>/dev/null`
else
pkg_failed=yes
fi
fi
else
pkg_failed=untried
fi
if test -n "$PKG_CONFIG"; then
if test -n "$FFTWF_LIBS"; then
pkg_cv_FFTWF_LIBS="$FFTWF_LIBS"
else
if test -n "$PKG_CONFIG" && \
{ (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"fftw3f\"") >&5
($PKG_CONFIG --exists --print-errors "fftw3f") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
pkg_cv_FFTWF_LIBS=`$PKG_CONFIG --libs "fftw3f" 2>/dev/null`
else
pkg_failed=yes
fi
fi
else
pkg_failed=untried
fi
if test $pkg_failed = yes; then
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
_pkg_short_errors_supported=yes
else
_pkg_short_errors_supported=no
fi
if test $_pkg_short_errors_supported = yes; then
FFTWF_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "fftw3f"`
else
FFTWF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "fftw3f"`
fi
# Put the nasty error message in config.log where it belongs
echo "$FFTWF_PKG_ERRORS" >&5
{ { echo "$as_me:$LINENO: error: Package requirements (fftw3f) were not met:
$FFTWF_PKG_ERRORS
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
Alternatively, you may set the environment variables FFTWF_CFLAGS
and FFTWF_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
" >&5
echo "$as_me: error: Package requirements (fftw3f) were not met:
$FFTWF_PKG_ERRORS
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
Alternatively, you may set the environment variables FFTWF_CFLAGS
and FFTWF_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
" >&2;}
{ (exit 1); exit 1; }; }
elif test $pkg_failed = untried; then
{ { echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.
Alternatively, you may set the environment variables FFTWF_CFLAGS
and FFTWF_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
To get pkg-config, see <http://pkg-config.freedesktop.org/>.
See \`config.log' for more details." >&5
echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.
Alternatively, you may set the environment variables FFTWF_CFLAGS
and FFTWF_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
To get pkg-config, see <http://pkg-config.freedesktop.org/>.
See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }
else
FFTWF_CFLAGS=$pkg_cv_FFTWF_CFLAGS
FFTWF_LIBS=$pkg_cv_FFTWF_LIBS
{ echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
:
fi
pkg_failed=no
{ echo "$as_me:$LINENO: checking for FFTW" >&5
echo $ECHO_N "checking for FFTW... $ECHO_C" >&6; }
@@ -4438,7 +4317,7 @@ Alternatively, you may set the environment variables FFTW_CFLAGS
and FFTW_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
To get pkg-config, see <http://pkg-config.freedesktop.org/>.
To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.
See \`config.log' for more details." >&5
echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
@@ -4448,7 +4327,7 @@ Alternatively, you may set the environment variables FFTW_CFLAGS
and FFTW_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
To get pkg-config, see <http://pkg-config.freedesktop.org/>.
To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.
See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }
else
@@ -4607,6 +4486,151 @@ fi
done
for ac_header in pthread.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
{ echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
echo $ECHO_N "(cached) $ECHO_C" >&6
fi
ac_res=`eval echo '${'$as_ac_Header'}'`
{ echo "$as_me:$LINENO: result: $ac_res" >&5
echo "${ECHO_T}$ac_res" >&6; }
else
# Is the header compilable?
{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
#include <$ac_header>
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
ac_header_compiler=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_header_compiler=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6; }
# Is the header present?
{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <$ac_header>
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null && {
test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
test ! -s conftest.err
}; then
ac_header_preproc=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_header_preproc=no
fi
rm -f conftest.err conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
echo "${ECHO_T}$ac_header_preproc" >&6; }
# So? What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
yes:no: )
{ echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
ac_header_preproc=yes
;;
no:yes:* )
{ echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
( cat <<\_ASBOX
## ------------------------------------------- ##
## Report this to cannam@all-day-breakfast.com ##
## ------------------------------------------- ##
_ASBOX
) | sed "s/^/$as_me: WARNING: /" >&2
;;
esac
{ echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
eval "$as_ac_Header=\$ac_header_preproc"
fi
ac_res=`eval echo '${'$as_ac_Header'}'`
{ echo "$as_me:$LINENO: result: $ac_res" >&5
echo "${ECHO_T}$ac_res" >&6; }
fi
if test `eval echo '${'$as_ac_Header'}'` = yes; then
cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
fi
done
pkg_failed=no
{ echo "$as_me:$LINENO: checking for Vamp" >&5
@@ -4698,7 +4722,7 @@ Alternatively, you may set the environment variables Vamp_CFLAGS
and Vamp_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
To get pkg-config, see <http://pkg-config.freedesktop.org/>.
To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.
See \`config.log' for more details." >&5
echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
@@ -4708,7 +4732,7 @@ Alternatively, you may set the environment variables Vamp_CFLAGS
and Vamp_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
To get pkg-config, see <http://pkg-config.freedesktop.org/>.
To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.
See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }
else
@@ -5413,8 +5437,6 @@ SRC_CFLAGS!$SRC_CFLAGS$ac_delim
SRC_LIBS!$SRC_LIBS$ac_delim
SNDFILE_CFLAGS!$SNDFILE_CFLAGS$ac_delim
SNDFILE_LIBS!$SNDFILE_LIBS$ac_delim
FFTWF_CFLAGS!$FFTWF_CFLAGS$ac_delim
FFTWF_LIBS!$FFTWF_LIBS$ac_delim
FFTW_CFLAGS!$FFTW_CFLAGS$ac_delim
FFTW_LIBS!$FFTW_LIBS$ac_delim
Vamp_CFLAGS!$Vamp_CFLAGS$ac_delim
@@ -5423,7 +5445,7 @@ LIBOBJS!$LIBOBJS$ac_delim
LTLIBOBJS!$LTLIBOBJS$ac_delim
_ACEOF
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 63; then
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 61; then
break
elif $ac_last_try; then
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5