On Wed, Mar 31, 2010 at 12:49 PM, Nick Treleaven <
nick.trelea...@btinternet.com> wrote:

> On Thu, 25 Mar 2010 18:11:15 +0000
> Nick Treleaven <nick.trelea...@btinternet.com> wrote:
>
> Now reverted. It's not great that systems without 'which' print an error
> message about a missing C++ compiler, but at least this should be very
> rare.
>
> Regards,
> Nick
>

I confirmed the autoconf bug(behavior). I believe this patch fixes it well.
It removes the which program again as well.

-- 
Erik S
Index: trunk/configure.ac
===================================================================
--- trunk/configure.ac	(revision 4820)
+++ trunk/configure.ac	(working copy)
@@ -17,9 +17,12 @@
 AC_PROG_CXX
 # check for C++ compiler explicitly and fail if none is found, do this check
 # after AC_PROG_CXX has set the CXX environment variable
-which $CXX >/dev/null 2>&1
-if test "x$?" != "x0"; then
-	AC_MSG_ERROR([No C++ compiler found. Please install a C++ compiler.])
+AC_CHECK_PROG([CXXCOMPILER], [$CXX], [AVAILABLE], [MISSING])
+if test "${CXXCOMPILER}" = 'MISSING'; then
+	AC_MSG_ERROR([No C++ compiler found. If it exists, add it
+	to your PATH or give configure the CXX=path_to_compiler
+	argument. Otherwise, install a C++ compiler such as g++ or
+	install a binary package of Geany.])
 fi
 
 #AC_PROG_RANLIB
@@ -50,7 +53,7 @@
 
 # get svn revision (try GIT first, then check for SVN)
 REVISION="r0"
-GIT=`which git 2>/dev/null`
+AC_PATH_PROG([GIT], [git])
 if test -d ".git" -a "x${GIT}" != "x" -a -x "${GIT}"
 then
 	REVISION=r`git svn find-rev origin/trunk 2>/dev/null ||
@@ -59,7 +62,7 @@
 fi
 if test "x${REVISION}" = "xr0"
 then
-	SVN=`which svn 2>/dev/null`
+	AC_PATH_PROG([SVN], [svn])
 	if test -d ".svn" -a "x${SVN}" != "x" -a -x "${SVN}"
 	then
 		REVISION=r`$SVN info|grep 'Last Changed Rev'|cut -d' ' -f4`
_______________________________________________
Geany-devel mailing list
Geany-devel@uvena.de
http://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel

Reply via email to