Use idiomatic way to tell Autoconf the c compiler
authorHerbert Valerio Riedel <hvr@gnu.org>
Mon, 14 Dec 2015 06:36:37 +0000 (07:36 +0100)
committerHerbert Valerio Riedel <hvr@gnu.org>
Mon, 14 Dec 2015 07:06:46 +0000 (08:06 +0100)
The non-idiomatic `--with-cc` flag was added via
5c789e424c1461c1dadfd38c44fcb9e8f38bf755

However, `--with-cc` seems rather fragile and support for `--with-cc` needs
to be added explicitly to autoconf-based Cabal packages. The `CC=` flag, however,
is supported natively by GNU Autoconf, so let's use the standard facility for that.

Relatedly, Cabal prior to version 1.24 used a similiar flag `--with-gcc=...`,
but starting with Cabal-1.24 this has been changed to use `CC=...` instead as well
(see https://github.com/haskell/cabal/pull/2946)

This also updates a few submodules removing the now obsolete `--with-cc` flag
support.

Reviewed By: trofi, thomie, erikd

Differential Revision: https://phabricator.haskell.org/D1608

libraries/base/configure.ac
libraries/directory
libraries/integer-gmp/configure.ac
libraries/process
libraries/unix
rules/build-package-data.mk

index 3d372d7..b8a4774 100644 (file)
@@ -10,10 +10,7 @@ AC_CANONICAL_BUILD
 AC_CANONICAL_HOST
 AC_CANONICAL_TARGET
 
-AC_ARG_WITH([cc],
-            [C compiler],
-            [CC=$withval])
-AC_PROG_CC()
+AC_PROG_CC
 dnl make extensions visible to allow feature-tests to detect them lateron
 AC_USE_SYSTEM_EXTENSIONS
 
index a7a5b0b..298529b 160000 (submodule)
@@ -1 +1 @@
-Subproject commit a7a5b0b738aad432a9cad512a26d7564120ef0e8
+Subproject commit 298529bf8adc38ed602eab300c63bbc68510e5a3
index 4e3df11..c19dbbc 100644 (file)
@@ -6,10 +6,7 @@ AC_CONFIG_SRCDIR([cbits/wrappers.c])
 
 AC_CANONICAL_TARGET
 
-AC_ARG_WITH([cc],
-            [C compiler],
-            [CC=$withval])
-AC_PROG_CC()
+AC_PROG_CC
 dnl make extensions visible to allow feature-tests to detect them lateron
 AC_USE_SYSTEM_EXTENSIONS
 
index 0edb978..e594712 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 0edb97876c2f783b33f9a69089ca9d26a061e112
+Subproject commit e594712a8fe49c94ff43ab016739e0fa63f0de00
index 147630c..59edb0a 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 147630c7c76bd9b947524ef140d21b9e81967c6e
+Subproject commit 59edb0a0a0d91ecfe938029b3b00a0c99dcb8481
index 938b6bf..3525c91 100644 (file)
@@ -111,7 +111,7 @@ ifneq "$3" "0"
 $1_$2_CONFIGURE_OPTS += --with-ld="$$(LD_STAGE$3)"
 endif
 
-$1_$2_CONFIGURE_OPTS += --configure-option=--with-cc="$$(CC_STAGE$3)"
+$1_$2_CONFIGURE_OPTS += --configure-option=CC="$$(CC_STAGE$3)"
 $1_$2_CONFIGURE_OPTS += --with-ar="$$(AR_STAGE$3)"
 $1_$2_CONFIGURE_OPTS += $$(if $$(ALEX),--with-alex="$$(ALEX)")
 $1_$2_CONFIGURE_OPTS += $$(if $$(HAPPY),--with-happy="$$(HAPPY)")