From 2f5baa23cd8281aac966c0d5f9b89e671ce91df6 Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Wed, 30 Nov 2011 20:00:21 -0600 Subject: Forcefully disable /usr/bin/foo-config detection If a foo-config script is missing from %{_cygwin_bindir} but is present in /usr/bin, the latter will be found even though it is for the wrong toolchain; use of this result will eventually lead to a compilation or linking error. Therefore it is not enough to specify foo-config locations which are in %{_cygwin_bindir}, but disable detection of those only in /usr/bin as well. The FOO_CONFIG variables are also exported in config.cache form (ac_cv_path_FOO_CONFIG) because many times the given variable is not marked as special by AC_ARG_VAR. --- macros.cygwin | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/macros.cygwin b/macros.cygwin index e49430a..70dfe8e 100644 --- a/macros.cygwin +++ b/macros.cygwin @@ -92,9 +92,16 @@ package or when debugging this package.\ ac_cv_prog_CXX=no; export ac_cv_prog_CXX; \ CXXFLAGS=; export CXXFLAGS; \ fi; \ - for i in `ls %{_cygwin_bindir}/*|grep -- "-config\$"` ; do \ + for i in `ls %{_bindir}/*|grep -- "[-_]config\$"` ; do \ + case `basename $i` in pkg-config) continue ; esac ; \ + x=`basename $i|tr "a-z+-\." "A-ZX__"`; \ + declare -x $x="no" ; export $x; \ + declare -x ac_cv_path_$x="no" ; export ac_cv_path_$x; \ + done; \ + for i in `ls %{_cygwin_bindir}/*|grep -- "[-_]config\$"` ; do \ x=`basename $i|tr "a-z+-\." "A-ZX__"`; \ declare -x $x="$i" ; export $x; \ + declare -x ac_cv_path_$x="$i" ; export ac_cv_path_$x; \ done; \ if [ -x %{_cygwin_bindir}/autopoint ]; then \ eval gettext_`grep '^version=' %{_cygwin_bindir}/autopoint`; \ -- cgit