[gparted] Make ./configure fail when C++ compiler is missing (#732803)
- From: Curtis Gedak <gedakc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gparted] Make ./configure fail when C++ compiler is missing (#732803)
- Date: Sun, 20 Jul 2014 15:31:58 +0000 (UTC)
commit b1c64fdf0d9008f7f619723c5b8a7f92f58254f6
Author: Mike Fleetwood <mike fleetwood googlemail com>
Date: Sun Jul 6 18:57:22 2014 +0100
Make ./configure fail when C++ compiler is missing (#732803)
Currently ./configure passes successfully even if a C++ compiler is not
installed. The first time building the code fails is when make tries
to compile the first C++ source file and the compiler executable is not
found.
Also because there is no C++ compiler the autoconf generated test for
Gtk::Window::set_default_icon_name() will always fail, leaving
HAVE_SET_DEFAULT_ICON_NAME unset. Therefore as well as installing a
C++ compiler, ./configure must be run again to correctly test for
set_default_icon_name().
This is as a result of a little known consequence of having AC_PROG_CC
proceed AC_PROG_CXX in the autoconf file configure.ac.
Subject: AC_PROG_CXX behaviour when no C++ compiler is found
http://lists.gnu.org/archive/html/bug-autoconf/2010-05/msg00001.html
Reverse the order, placing AC_PROG_CXX before AC_PROG_CC, so that the
generated ./configure script fails with an error if there is no C++
compiler available.
Bug #732803 - ./configure is successful even when C++ compile is missing
configure.ac | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 6b3d672..5d31663 100644
--- a/configure.ac
+++ b/configure.ac
@@ -12,8 +12,8 @@ AM_MAINTAINER_MODE
dnl======================
dnl checks for programs
dnl======================
-AC_PROG_CC
AC_PROG_CXX
+AC_PROG_CC
AM_PROG_LIBTOOL
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]