Revert lame revert from [16628].
authorRémi Denis-Courmont <rem@videolan.org>
Tue, 12 Sep 2006 18:03:45 +0000 (18:03 +0000)
committerRémi Denis-Courmont <rem@videolan.org>
Tue, 12 Sep 2006 18:03:45 +0000 (18:03 +0000)
Provide trivial work-around for users of obsolete autoconf

bootstrap
configure.ac
extras/m4/autoconf260.m4 [new file with mode: 0644]

index 4d271f6..6dc6ac6 100755 (executable)
--- a/bootstrap
+++ b/bootstrap
@@ -48,6 +48,20 @@ if test -d extras/contrib/bin; then
   fi
 fi
 
+# Check for autoconf
+rm -f m4/autoconf260.m4
+case "$(autoconf --version|head -1)" in
+  *2.5[012345678]*)
+    echo "Hey, your autoconf is quite old. Update it." >&2
+    exit 1
+    ;;
+
+  *2.59*)
+    echo "Enabling provisional autoconf 2.59 work-around. Update autoconf ASAP."
+    cp -f extras/m4/autoconf260.m4 m4/
+    ;;
+esac
+
 # Check for automake
 amvers="no"
 for v in "-1.9" "19" "-1.8" "18" "-1.7" "17"; do
index 276a0b3..c27cb7f 100644 (file)
@@ -37,8 +37,8 @@ VLC_SAVE_FLAGS
 dnl
 dnl Check for tools
 dnl
+AC_PROG_CC_C99
 AM_PROG_CC_C_O
-AC_PROG_CPP
 AC_PROG_CXX
 eval "${CXX} --version" >/dev/null 2>&1 || CXX=""
 if test "${CXX}" != ""; then
diff --git a/extras/m4/autoconf260.m4 b/extras/m4/autoconf260.m4
new file mode 100644 (file)
index 0000000..e7f48e2
--- /dev/null
@@ -0,0 +1,7 @@
+# Replacements for autoconf 2.59 and older
+# Please make official source tarballs with recent autoconf only.
+
+AC_DEFUN([AC_PROG_CC_C00],
+[ AC_REQUIRE([AC_PROG_CC])dnl
+  CC="$CC -std=c99"
+])