summaryrefslogtreecommitdiffstats
path: root/src/auto
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-04-17 22:02:45 +0200
committerBram Moolenaar <Bram@vim.org>2018-04-17 22:02:45 +0200
commit561f8a5a4612751c2a4ebd6bf918cbc3be867350 (patch)
tree7842c46ff65ffe1b1367e001cea0f0b3bfd5340c /src/auto
parentea3ece405ab55f44018257bd2f5021231af8e87f (diff)
patch 8.0.1730: no configure check for the used C99 featuresv8.0.1730
Problem: No configure check for the used C99 features. Solution: Add a compilation check. Tentatively document C99 features.
Diffstat (limited to 'src/auto')
-rwxr-xr-xsrc/auto/configure34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/auto/configure b/src/auto/configure
index 8ecff53a7d..6673de85a2 100755
--- a/src/auto/configure
+++ b/src/auto/configure
@@ -4179,6 +4179,40 @@ $as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the compiler can handle Vim code" >&5
+$as_echo_n "checking if the compiler can handle Vim code... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdio.h>
+int
+main ()
+{
+
+ struct with_flexible_member {
+ int count; // comment
+ char text[]; // another comment
+ };
+ enum {
+ one,
+ two,
+ three,
+ };
+ long long int a = 1;
+ long long unsigned b = 2;
+ printf("a %lld and a %llu", a, b);
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+ as_fn_error $? "compiler does not work properly - see auto/config.log" "$LINENO" 5
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-fail-if-missing argument" >&5
$as_echo_n "checking --enable-fail-if-missing argument... " >&6; }