My working unpac repository

configure: cache more results from aclocal.m4

+62 -32
+22 -17
aclocal.m4
··· 97 97 ) 98 98 ]) 99 99 100 - dnl $1: extra CFLAGS 101 100 AC_DEFUN([OCAML_CC_SUPPORTS_TREE_VECTORIZE], [ 102 - AC_MSG_CHECKING( 103 - [whether the C compiler supports __attribute__((optimize("tree-vectorize")))]) 104 - saved_CFLAGS="$CFLAGS" 105 - CFLAGS="$1 $CFLAGS" 106 - AC_COMPILE_IFELSE( 107 - [AC_LANG_PROGRAM( 108 - [[__attribute__((optimize("tree-vectorize"))) void f(void) {}]], 109 - [[f();]])], 110 - [AC_DEFINE([SUPPORTS_TREE_VECTORIZE], [1]) 111 - AC_MSG_RESULT([yes])], 112 - [AC_MSG_RESULT([no])]) 113 - CFLAGS="$saved_CFLAGS" 101 + AC_CACHE_CHECK(m4_normalize([whether the C compiler supports 102 + __attribute__((optimize("tree-vectorize")))]), 103 + [ocaml_cv_prog_cc_optimize_tree_vectorize], 104 + [saved_CFLAGS="$CFLAGS" 105 + CFLAGS="$warn_error_flag $CFLAGS" 106 + AC_COMPILE_IFELSE([AC_LANG_PROGRAM( 107 + [[__attribute__((optimize("tree-vectorize"))) void f(void) {}]], 108 + [[f();]])], 109 + [ocaml_cv_prog_cc_optimize_tree_vectorize=yes], 110 + [ocaml_cv_prog_cc_optimize_tree_vectorize=no]) 111 + CFLAGS="$saved_CFLAGS"]) 112 + AS_IF([test "x$ocaml_cv_prog_cc_optimize_tree_vectorize" = xyes], 113 + [AC_DEFINE([SUPPORTS_TREE_VECTORIZE], [1])]) 114 114 ]) 115 115 116 116 # Save C compiler related variables ··· 246 246 247 247 AC_DEFUN([OCAML_MMAP_SUPPORTS_HUGE_PAGES], [ 248 248 AC_MSG_CHECKING([whether mmap supports huge pages]) 249 - AC_RUN_IFELSE( 250 - [AC_LANG_PROGRAM([[ 249 + AC_CACHE_VAL([ocaml_cv_func_mmap_huge_pages], 250 + [AC_RUN_IFELSE([AC_LANG_PROGRAM([[ 251 251 #include <sys/mman.h> 252 252 #include <stdio.h> 253 253 #include <stdlib.h> ··· 282 282 p[i] = (char) i; 283 283 } 284 284 ]])], 285 + [ocaml_cv_func_mmap_huge_pages=yes], 286 + [ocaml_cv_func_mmap_huge_pages=no], 287 + [ocaml_cv_func_mmap_huge_pages=no])]) 288 + AS_IF([test x"$ocaml_cv_func_mmap_huge_pages" = "xyes"], 285 289 [AC_DEFINE([HAS_HUGE_PAGES], [1]) 286 290 AC_DEFINE_UNQUOTED([HUGE_PAGE_SIZE], [(4 * 1024 * 1024)]) 287 291 AC_MSG_RESULT([yes])], 288 - [AC_MSG_RESULT([no])], 289 - [AC_MSG_RESULT([no assumed])]) 292 + [AS_IF([test $cross_compiling = yes], 293 + [AC_MSG_RESULT([no assumed])], 294 + [AC_MSG_RESULT([no])])]) 290 295 ]) 291 296 292 297 AC_DEFUN([OCAML_CHECK_LIBUNWIND], [
+39 -14
configure
··· 18952 18952 18953 18953 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler supports __attribute__((optimize(\"tree-vectorize\")))" >&5 18954 18954 printf %s "checking whether the C compiler supports __attribute__((optimize(\"tree-vectorize\")))... " >&6; } 18955 + if test ${ocaml_cv_prog_cc_optimize_tree_vectorize+y} 18956 + then : 18957 + printf %s "(cached) " >&6 18958 + else $as_nop 18955 18959 saved_CFLAGS="$CFLAGS" 18956 - CFLAGS="$warn_error_flag $CFLAGS" 18957 - cat confdefs.h - <<_ACEOF >conftest.$ac_ext 18960 + CFLAGS="$warn_error_flag $CFLAGS" 18961 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext 18958 18962 /* end confdefs.h. */ 18959 18963 __attribute__((optimize("tree-vectorize"))) void f(void) {} 18960 18964 int ··· 18967 18971 _ACEOF 18968 18972 if ac_fn_c_try_compile "$LINENO" 18969 18973 then : 18970 - printf "%s\n" "#define SUPPORTS_TREE_VECTORIZE 1" >>confdefs.h 18971 - 18972 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 18973 - printf "%s\n" "yes" >&6; } 18974 + ocaml_cv_prog_cc_optimize_tree_vectorize=yes 18974 18975 else $as_nop 18975 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 18976 - printf "%s\n" "no" >&6; } 18976 + ocaml_cv_prog_cc_optimize_tree_vectorize=no 18977 18977 fi 18978 18978 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 18979 - CFLAGS="$saved_CFLAGS" 18979 + CFLAGS="$saved_CFLAGS" 18980 + fi 18981 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ocaml_cv_prog_cc_optimize_tree_vectorize" >&5 18982 + printf "%s\n" "$ocaml_cv_prog_cc_optimize_tree_vectorize" >&6; } 18983 + if test "x$ocaml_cv_prog_cc_optimize_tree_vectorize" = xyes 18984 + then : 18985 + printf "%s\n" "#define SUPPORTS_TREE_VECTORIZE 1" >>confdefs.h 18986 + 18987 + fi 18980 18988 18981 18989 18982 18990 # Check whether the C compiler supports the labels as values extension. ··· 23888 23896 23889 23897 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mmap supports huge pages" >&5 23890 23898 printf %s "checking whether mmap supports huge pages... " >&6; } 23899 + if test ${ocaml_cv_func_mmap_huge_pages+y} 23900 + then : 23901 + printf %s "(cached) " >&6 23902 + else $as_nop 23891 23903 if test "$cross_compiling" = yes 23892 23904 then : 23893 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no assumed" >&5 23894 - printf "%s\n" "no assumed" >&6; } 23905 + ocaml_cv_func_mmap_huge_pages=no 23895 23906 else $as_nop 23896 23907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 23897 23908 /* end confdefs.h. */ ··· 23940 23951 _ACEOF 23941 23952 if ac_fn_c_try_run "$LINENO" 23942 23953 then : 23954 + ocaml_cv_func_mmap_huge_pages=yes 23955 + else $as_nop 23956 + ocaml_cv_func_mmap_huge_pages=no 23957 + fi 23958 + rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 23959 + conftest.$ac_objext conftest.beam conftest.$ac_ext 23960 + fi 23961 + 23962 + fi 23963 + 23964 + if test x"$ocaml_cv_func_mmap_huge_pages" = "xyes" 23965 + then : 23943 23966 printf "%s\n" "#define HAS_HUGE_PAGES 1" >>confdefs.h 23944 23967 23945 23968 printf "%s\n" "#define HUGE_PAGE_SIZE (4 * 1024 * 1024)" >>confdefs.h ··· 23947 23970 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 23948 23971 printf "%s\n" "yes" >&6; } 23949 23972 else $as_nop 23973 + if test $cross_compiling = yes 23974 + then : 23975 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no assumed" >&5 23976 + printf "%s\n" "no assumed" >&6; } 23977 + else $as_nop 23950 23978 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 23951 23979 printf "%s\n" "no" >&6; } 23952 23980 fi 23953 - rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 23954 - conftest.$ac_objext conftest.beam conftest.$ac_ext 23955 23981 fi 23956 - 23957 23982 23958 23983 23959 23984 printf "%s\n" "#define HEADER_RESERVED_BITS $reserved_header_bits" >>confdefs.h
+1 -1
configure.ac
··· 1610 1610 [$warn_error_flag])]) 1611 1611 1612 1612 ## Check whether __attribute__((optimize("tree-vectorize")))) is supported 1613 - OCAML_CC_SUPPORTS_TREE_VECTORIZE([$warn_error_flag]) 1613 + OCAML_CC_SUPPORTS_TREE_VECTORIZE 1614 1614 1615 1615 # Check whether the C compiler supports the labels as values extension. 1616 1616 OCAML_CC_SUPPORTS_LABELS_AS_VALUES