[vlc-commits] contrib: Fix a bug in the old gmp configure script

Martin Storsjö git at videolan.org
Mon Apr 1 22:23:39 CEST 2013


vlc | branch: master | Martin Storsjö <martin at martin.st> | Mon Apr  1 22:55:11 2013 +0300| [7fa5b04a6ee7cbcdaf0c2c59d49b717ac4896ba9] | committer: Martin Storsjö

contrib: Fix a bug in the old gmp configure script

The brackets in the config test aren't properly escaped, and thus
don't end up in the final configure script as intended.

When building on a system where the system default compiler is clang,
clang can fail due to the main signature
"int main(int argc, char *argv)" being invalid,
which makes configure believe that the system compiler isn't
ANSI compliant, and it tries to invoke (broken) ANSI2KNR code.

Signed-off-by: Martin Storsjö <martin at martin.st>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7fa5b04a6ee7cbcdaf0c2c59d49b717ac4896ba9
---

 contrib/src/gmp/ansitest.diff |   11 +++++++++++
 contrib/src/gmp/rules.mak     |    3 ++-
 2 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/src/gmp/ansitest.diff b/contrib/src/gmp/ansitest.diff
new file mode 100644
index 0000000..e729208
--- /dev/null
+++ b/contrib/src/gmp/ansitest.diff
@@ -0,0 +1,11 @@
+--- gmp-4.2.1/acinclude.m4.orig	2013-04-01 22:50:05.000000000 +0300
++++ gmp-4.2.1/acinclude.m4	2013-04-01 22:49:52.000000000 +0300
+@@ -3765,7 +3765,7 @@
+                gmp_cv_c_for_build_ansi,
+ [cat >conftest.c <<EOF
+ int
+-main (int argc, char *argv[])
++main (int argc, char **argv)
+ {
+   exit(0);
+ }
diff --git a/contrib/src/gmp/rules.mak b/contrib/src/gmp/rules.mak
index b82faaa..ad05ab5 100644
--- a/contrib/src/gmp/rules.mak
+++ b/contrib/src/gmp/rules.mak
@@ -14,10 +14,11 @@ $(TARBALLS)/gmp-$(GMP_VERSION).tar.bz2:
 gmp: gmp-$(GMP_VERSION).tar.bz2 .sum-gmp
 	$(UNPACK)
 	$(APPLY) $(SRC)/gmp/inline.diff
-	$(UPDATE_AUTOCONFIG)
+	$(APPLY) $(SRC)/gmp/ansitest.diff
 	$(MOVE)
 
 .gmp: gmp
+	$(RECONF)
 	cd $< && $(HOSTVARS) ./configure $(HOSTCONF)
 	cd $< && $(MAKE) install
 	touch $@



More information about the vlc-commits mailing list