From 5c36813fb59499355e824da052c2991fc0ffd4f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonin=20D=C3=A9cimo?= Date: Sat, 4 Jan 2025 16:00:53 +0100 Subject: [PATCH 01/22] configure: Windows doesn't define nice (for process priority) --- configure | 11 +---------- configure.ac | 9 ++------- 2 files changed, 3 insertions(+), 17 deletions(-) diff --git a/configure b/configure index 724e6962ce3a..e1cf2f10686a 100755 --- a/configure +++ b/configure @@ -23536,19 +23536,10 @@ fi # but whose value is not guessed properly by configure # (all this should be understood and fixed) case $target in #( - *-w64-mingw32*) : - printf "%s\n" "#define HAS_BROKEN_PRINTF 1" >>confdefs.h - - printf "%s\n" "#define HAS_IPV6 1" >>confdefs.h - - printf "%s\n" "#define HAS_NICE 1" >>confdefs.h - ;; #( - *-pc-windows) : + *-w64-mingw32*|*-pc-windows) : printf "%s\n" "#define HAS_BROKEN_PRINTF 1" >>confdefs.h printf "%s\n" "#define HAS_IPV6 1" >>confdefs.h - - printf "%s\n" "#define HAS_NICE 1" >>confdefs.h ;; #( *-*-solaris*) : # This is required as otherwise floats are printed diff --git a/configure.ac b/configure.ac index 9758cadd394b..02b583696281 100644 --- a/configure.ac +++ b/configure.ac @@ -2782,14 +2782,9 @@ AS_IF([test x"$prefix" = "xNONE"], # but whose value is not guessed properly by configure # (all this should be understood and fixed) AS_CASE([$target], - [*-w64-mingw32*], - [AC_DEFINE([HAS_BROKEN_PRINTF], [1]) - AC_DEFINE([HAS_IPV6], [1]) - AC_DEFINE([HAS_NICE], [1])], - [*-pc-windows], + [*-w64-mingw32*|*-pc-windows], [AC_DEFINE([HAS_BROKEN_PRINTF], [1]) - AC_DEFINE([HAS_IPV6], [1]) - AC_DEFINE([HAS_NICE], [1])], + AC_DEFINE([HAS_IPV6], [1])], [*-*-solaris*], # This is required as otherwise floats are printed # as "Infinity" and "Inf" instead of the expected "inf" From 398192ef1194a81062db8f50f5b99505fa1d0644 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonin=20D=C3=A9cimo?= Date: Mon, 6 Jan 2025 11:45:15 +0100 Subject: [PATCH 02/22] configure: fix search for libraries defining functions with cl --- aclocal.m4 | 32 ++++++++++++++++++++++++ configure | 48 +++++++++++++++--------------------- configure.ac | 8 ++---- otherlibs/unix/gethostname.c | 2 +- runtime/caml/compatibility.h | 4 +++ runtime/caml/s.h.in | 4 +-- 6 files changed, 61 insertions(+), 37 deletions(-) diff --git a/aclocal.m4 b/aclocal.m4 index 3d9cd79bfaef..57c07fff2efa 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -641,3 +641,35 @@ AC_DEFUN([OCAML_CHECK_WINDOWS_TRIPLET], [ [*-pc-windows*], [AC_MSG_ERROR([unknown MSVC variant])]) ]) + +# OCAML_CL_SEARCH_LIBS(FUNCTION, SEARCH-LIBS, +# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND], +# [OTHER-LIBRARIES]) +# -------------------------------------------------------------- +# Search for a library defining FUNC, if it's not already available. +AC_DEFUN([OCAML_CL_SEARCH_LIBS], +[AS_VAR_PUSHDEF([ocaml_Search], [ocaml_cv_search_$1])dnl +AC_CACHE_CHECK([for library containing $1], [ocaml_Search], +[ocaml_func_search_save_LIBS=$LIBS +AC_LANG_CONFTEST([AC_LANG_CALL([], [$1])]) +for ocaml_lib in '' $2 +do + if test -z "$ocaml_lib"; then + ocaml_res="none required" + else + ocaml_res=${ocaml_lib}.lib + LIBS="${ocaml_lib}.lib $5 $ocaml_func_search_save_LIBS" + fi + AC_LINK_IFELSE([], [AS_VAR_SET([ocaml_Search], [$ocaml_res])]) + AS_VAR_SET_IF([ocaml_Search], [break]) +done +AS_VAR_SET_IF([ocaml_Search], , [AS_VAR_SET([ocaml_Search], [no])]) +rm conftest.$ac_ext +LIBS=$ocaml_func_search_save_LIBS]) +AS_VAR_COPY([ocaml_res], [ocaml_Search]) +AS_IF([test "$ocaml_res" != no], + [test "$ocaml_res" = "none required" || LIBS="$ocaml_res $LIBS" + $3], + [$4]) +AS_VAR_POPDEF([ocaml_Search])dnl +]) diff --git a/configure b/configure index e1cf2f10686a..53c0e2ea1a54 100755 --- a/configure +++ b/configure @@ -19849,11 +19849,11 @@ fi cclibs="$cclibs ws2_32.lib" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5 printf %s "checking for library containing socket... " >&6; } -if test ${ac_cv_search_socket+y} +if test ${ocaml_cv_search_socket+y} then : printf %s "(cached) " >&6 else $as_nop - ac_func_search_save_LIBS=$LIBS + ocaml_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -19869,40 +19869,40 @@ return socket (); return 0; } _ACEOF -for ac_lib in '' ws2_32 +for ocaml_lib in '' ws2_32 do - if test -z "$ac_lib"; then - ac_res="none required" + if test -z "$ocaml_lib"; then + ocaml_res="none required" else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" + ocaml_res=${ocaml_lib}.lib + LIBS="${ocaml_lib}.lib $ocaml_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO" then : - ac_cv_search_socket=$ac_res + ocaml_cv_search_socket=$ocaml_res fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext - if test ${ac_cv_search_socket+y} + if test ${ocaml_cv_search_socket+y} then : break fi done -if test ${ac_cv_search_socket+y} +if test ${ocaml_cv_search_socket+y} then : else $as_nop - ac_cv_search_socket=no + ocaml_cv_search_socket=no fi rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS +LIBS=$ocaml_func_search_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5 -printf "%s\n" "$ac_cv_search_socket" >&6; } -ac_res=$ac_cv_search_socket -if test "$ac_res" != no +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ocaml_cv_search_socket" >&5 +printf "%s\n" "$ocaml_cv_search_socket" >&6; } +ocaml_res=$ocaml_cv_search_socket +if test "$ocaml_res" != no then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + test "$ocaml_res" = "none required" || LIBS="$ocaml_res $LIBS" fi @@ -20488,21 +20488,13 @@ fi ## gethostname -# Note: detection fails on Windows so hardcoding the result -# (should be debugged later) -case $target in #( - *-w64-mingw32*|*-pc-windows) : - printf "%s\n" "#define HAS_GETHOSTNAME 1" >>confdefs.h - ;; #( - *) : - ac_fn_c_check_func "$LINENO" "gethostname" "ac_cv_func_gethostname" +ac_fn_c_check_func "$LINENO" "gethostname" "ac_cv_func_gethostname" if test "x$ac_cv_func_gethostname" = xyes then : - printf "%s\n" "#define HAS_GETHOSTNAME 1" >>confdefs.h + printf "%s\n" "#define HAVE_GETHOSTNAME 1" >>confdefs.h fi - ;; -esac + ## uname diff --git a/configure.ac b/configure.ac index 02b583696281..fdc4f796fc5d 100644 --- a/configure.ac +++ b/configure.ac @@ -2039,7 +2039,7 @@ AS_CASE([$target], AC_CHECK_FUNC([socketpair], [AC_DEFINE([HAS_SOCKETPAIR], [1])])], [*-pc-windows], [cclibs="$cclibs ws2_32.lib" - AC_SEARCH_LIBS([socket], [ws2_32]) + OCAML_CL_SEARCH_LIBS([socket], [ws2_32]) AC_CHECK_FUNC([socketpair], [AC_DEFINE([HAS_SOCKETPAIR], [1])])], [*-*-haiku], [cclibs="$cclibs -lnetwork" @@ -2188,11 +2188,7 @@ AC_CHECK_FUNC([setitimer], [setitimer=false]) ## gethostname -# Note: detection fails on Windows so hardcoding the result -# (should be debugged later) -AS_CASE([$target], - [*-w64-mingw32*|*-pc-windows], [AC_DEFINE([HAS_GETHOSTNAME], [1])], - [AC_CHECK_FUNC([gethostname], [AC_DEFINE([HAS_GETHOSTNAME], [1])])]) +AC_CHECK_FUNCS([gethostname]) ## uname diff --git a/otherlibs/unix/gethostname.c b/otherlibs/unix/gethostname.c index df29c59e97cf..30bca0c7fc05 100644 --- a/otherlibs/unix/gethostname.c +++ b/otherlibs/unix/gethostname.c @@ -21,7 +21,7 @@ #endif #include "caml/unixsupport.h" -#ifdef HAS_GETHOSTNAME +#ifdef HAVE_GETHOSTNAME #ifndef MAXHOSTNAMELEN #define MAXHOSTNAMELEN 256 diff --git a/runtime/caml/compatibility.h b/runtime/caml/compatibility.h index 103170f13345..7f1f67faee25 100644 --- a/runtime/caml/compatibility.h +++ b/runtime/caml/compatibility.h @@ -33,4 +33,8 @@ #define HAS_UNISTD 1 #endif +#ifdef HAVE_GETHOSTNAME +#define HAS_GETHOSTNAME 1 +#endif + #endif /* CAML_COMPATIBILITY_H */ diff --git a/runtime/caml/s.h.in b/runtime/caml/s.h.in index ca5c510c5070..6bb9d9374968 100644 --- a/runtime/caml/s.h.in +++ b/runtime/caml/s.h.in @@ -206,9 +206,9 @@ /* Define HAS_SETITIMER if you have setitimer(). */ -#undef HAS_GETHOSTNAME +#undef HAVE_GETHOSTNAME -/* Define HAS_GETHOSTNAME if you have gethostname(). */ +/* Define HAVE_GETHOSTNAME if you have gethostname(). */ #undef HAS_UNAME From 48180ec324d946ac80069d8472583604af0ba8ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonin=20D=C3=A9cimo?= Date: Mon, 6 Jan 2025 12:07:17 +0100 Subject: [PATCH 03/22] configure: SetFileTime is used instead of _utime on Windows --- configure | 7 ++----- configure.ac | 6 ++---- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/configure b/configure index 53c0e2ea1a54..35ad9a494d98 100755 --- a/configure +++ b/configure @@ -20272,13 +20272,10 @@ fi ## utime -## Note: this was defined in config/s-nt.h but the autoconf macros do not -# seem to detect it properly on Windows so we hardcode the definition -# of HAS_UTIME on Windows but this will probably need to be clarified case $target in #( + # SetFileTime is used instead of _utime, *-w64-mingw32*|*-pc-windows) : - printf "%s\n" "#define HAS_UTIME 1" >>confdefs.h - ;; #( + ;; #( *) : ac_fn_c_check_header_compile "$LINENO" "sys/types.h" "ac_cv_header_sys_types_h" "$ac_includes_default" if test "x$ac_cv_header_sys_types_h" = xyes diff --git a/configure.ac b/configure.ac index fdc4f796fc5d..91e49b750735 100644 --- a/configure.ac +++ b/configure.ac @@ -2111,11 +2111,9 @@ AC_CHECK_FUNC([getcwd], [AC_DEFINE([HAS_GETCWD], [1])]) AC_CHECK_FUNC([system], [AC_DEFINE([HAS_SYSTEM], [1])]) ## utime -## Note: this was defined in config/s-nt.h but the autoconf macros do not -# seem to detect it properly on Windows so we hardcode the definition -# of HAS_UTIME on Windows but this will probably need to be clarified AS_CASE([$target], - [*-w64-mingw32*|*-pc-windows], [AC_DEFINE([HAS_UTIME], [1])], + # SetFileTime is used instead of _utime, + [*-w64-mingw32*|*-pc-windows], [], [AC_CHECK_HEADER([sys/types.h], [AC_CHECK_HEADER([utime.h], [AC_CHECK_FUNC([utime], [AC_DEFINE([HAS_UTIME], [1])])])])]) From 62a3b0be3c24734f7e5997593656d23af6ff08ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonin=20D=C3=A9cimo?= Date: Fri, 21 Jun 2024 13:57:25 +0200 Subject: [PATCH 04/22] configure: cache mmap MAP_STACK detection --- aclocal.m4 | 13 ++++++------- configure | 41 ++++++++++++++++++++++------------------- configure.ac | 18 +++++++----------- 3 files changed, 35 insertions(+), 37 deletions(-) diff --git a/aclocal.m4 b/aclocal.m4 index 3d9cd79bfaef..9cd65786d572 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -219,9 +219,9 @@ camlPervasives__loop_1128: ])]) AC_DEFUN([OCAML_MMAP_SUPPORTS_MAP_STACK], [ - AC_MSG_CHECKING([whether mmap supports MAP_STACK]) - AC_RUN_IFELSE( - [AC_LANG_PROGRAM([[ + AC_CACHE_CHECK([whether mmap supports MAP_STACK], + [ocaml_cv_func_mmap_MAP_STACK], + [AC_RUN_IFELSE([AC_LANG_PROGRAM([[ #include #include #include @@ -233,10 +233,9 @@ AC_DEFUN([OCAML_MMAP_SUPPORTS_MAP_STACK], [ if (block == MAP_FAILED) return 1; ]])], - [has_mmap_map_stack=true - AC_MSG_RESULT([yes])], - [AC_MSG_RESULT([no])], - [AC_MSG_RESULT([no assumed])]) + [ocaml_cv_func_mmap_MAP_STACK=yes], + [ocaml_cv_func_mmap_MAP_STACK=no], + [ocaml_cv_func_mmap_MAP_STACK='no assumed'])]) ]) AC_DEFUN([OCAML_MMAP_SUPPORTS_HUGE_PAGES], [ diff --git a/configure b/configure index 724e6962ce3a..67d003d038bc 100755 --- a/configure +++ b/configure @@ -23319,10 +23319,13 @@ fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mmap supports MAP_STACK" >&5 printf %s "checking whether mmap supports MAP_STACK... " >&6; } +if test ${ocaml_cv_func_mmap_MAP_STACK+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test "$cross_compiling" = yes then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no assumed" >&5 -printf "%s\n" "no assumed" >&6; } + ocaml_cv_func_mmap_MAP_STACK='no assumed' else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -23348,45 +23351,45 @@ main (void) _ACEOF if ac_fn_c_try_run "$LINENO" then : - has_mmap_map_stack=true - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + ocaml_cv_func_mmap_MAP_STACK=yes else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + ocaml_cv_func_mmap_MAP_STACK=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ocaml_cv_func_mmap_MAP_STACK" >&5 +printf "%s\n" "$ocaml_cv_func_mmap_MAP_STACK" >&6; } if test x"$enable_mmap_map_stack" = "xyes" then : - if test x"$has_mmap_map_stack" = "xtrue" + if test x"$ocaml_cv_func_mmap_MAP_STACK" = "xyes" then : case $target in #( *-freebsd*) : - as_fn_error $? "mmap MAP_STACK not supported on FreeBSD" "$LINENO" 5 ;; #( + as_fn_error $? "mmap MAP_STACK is not supported on FreeBSD" "$LINENO" 5 ;; #( *) : - with_mmap_map_stack=true; - printf "%s\n" "#define USE_MMAP_MAP_STACK 1" >>confdefs.h - ;; + ;; esac else $as_nop as_fn_error $? "mmap MAP_STACK requested but not found on $target" "$LINENO" 5 fi - else $as_nop case $target in #( *-openbsd*) : - with_mmap_map_stack=true; - printf "%s\n" "#define USE_MMAP_MAP_STACK 1" >>confdefs.h - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: using MAP_STACK on OpenBSD due to stack checking" >&5 -printf "%s\n" "$as_me: using MAP_STACK on OpenBSD due to stack checking" >&6;} ;; #( + ocaml_cv_func_mmap_MAP_STACK=yes + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Using MAP_STACK on OpenBSD due to stack checking" >&5 +printf "%s\n" "$as_me: Using MAP_STACK on OpenBSD due to stack checking" >&6;} ;; #( *) : - with_mmap_map_stack=false ;; + ;; esac +fi +if test x"$ocaml_cv_func_mmap_MAP_STACK" = "xyes" +then : + +printf "%s\n" "#define USE_MMAP_MAP_STACK 1" >>confdefs.h fi diff --git a/configure.ac b/configure.ac index 9758cadd394b..82d6e5906cc3 100644 --- a/configure.ac +++ b/configure.ac @@ -2670,21 +2670,17 @@ AS_IF([test x"$enable_flat_float_array" = "xno"], OCAML_MMAP_SUPPORTS_MAP_STACK AS_IF([test x"$enable_mmap_map_stack" = "xyes"], - [AS_IF([test x"$has_mmap_map_stack" = "xtrue"], + [AS_IF([test x"$ocaml_cv_func_mmap_MAP_STACK" = "xyes"], [AS_CASE([$target], [*-freebsd*], - [AC_MSG_ERROR([mmap MAP_STACK not supported on FreeBSD])], - [with_mmap_map_stack=true; - AC_DEFINE([USE_MMAP_MAP_STACK], [1])])], - [AC_MSG_ERROR([mmap MAP_STACK requested but not found on $target])]) - ], + [AC_MSG_ERROR([mmap MAP_STACK is not supported on FreeBSD])])], + [AC_MSG_ERROR([mmap MAP_STACK requested but not found on $target])])], [AS_CASE([$target], [*-openbsd*], - [with_mmap_map_stack=true; - AC_DEFINE([USE_MMAP_MAP_STACK], [1]) - AC_MSG_NOTICE([using MAP_STACK on OpenBSD due to stack checking])], - [with_mmap_map_stack=false]) - ]) + [ocaml_cv_func_mmap_MAP_STACK=yes + AC_MSG_NOTICE([Using MAP_STACK on OpenBSD due to stack checking])])]) +AS_IF([test x"$ocaml_cv_func_mmap_MAP_STACK" = "xyes"], + [AC_DEFINE([USE_MMAP_MAP_STACK], [1], [Define to use mmap MAP_STACK.])]) oc_native_compflags='' From c1a06cc50563f72dbfa200daad9286c59207a3b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonin=20D=C3=A9cimo?= Date: Mon, 24 Jun 2024 08:20:28 +0200 Subject: [PATCH 05/22] configure: cache more results from aclocal.m4 --- aclocal.m4 | 43 ++++++++++++++++++++++++------------------- configure | 53 +++++++++++++++++++++++++++++++++-------------------- 2 files changed, 57 insertions(+), 39 deletions(-) diff --git a/aclocal.m4 b/aclocal.m4 index 9cd65786d572..5167ddc72724 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -97,18 +97,22 @@ AC_DEFUN([OCAML_SIGNAL_HANDLERS_SEMANTICS], [ dnl $1: extra CFLAGS AC_DEFUN([OCAML_CC_SUPPORTS_TREE_VECTORIZE], [ - AC_MSG_CHECKING( - [whether the C compiler supports __attribute__((optimize("tree-vectorize")))]) - saved_CFLAGS="$CFLAGS" - CFLAGS="$1 $CFLAGS" - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[__attribute__((optimize("tree-vectorize"))) void f(void) {}]], - [[f();]])], - [AC_DEFINE([SUPPORTS_TREE_VECTORIZE], [1]) - AC_MSG_RESULT([yes])], - [AC_MSG_RESULT([no])]) - CFLAGS="$saved_CFLAGS" + AC_CACHE_CHECK(m4_normalize([whether the C compiler supports + __attribute__((optimize("tree-vectorize")))]), + [ocaml_cv_prog_cc_optimize_tree_vectorize], [ + + saved_CFLAGS="$CFLAGS" + CFLAGS="$warn_error_flag $CFLAGS" + AC_COMPILE_IFELSE([AC_LANG_PROGRAM( + [[__attribute__((optimize("tree-vectorize"))) void f(void) {}]], + [[f();]])], + [ocaml_cv_prog_cc_optimize_tree_vectorize=yes], + [ocaml_cv_prog_cc_optimize_tree_vectorize=no]) + CFLAGS="$saved_CFLAGS" + ]) + ]) + AS_IF([test "x$ocaml_cv_prog_cc_tree_vectorize" = xyes], + [AC_DEFINE([SUPPORTS_TREE_VECTORIZE], [1])]) ]) # Save C compiler related variables @@ -239,9 +243,9 @@ AC_DEFUN([OCAML_MMAP_SUPPORTS_MAP_STACK], [ ]) AC_DEFUN([OCAML_MMAP_SUPPORTS_HUGE_PAGES], [ - AC_MSG_CHECKING([whether mmap supports huge pages]) - AC_RUN_IFELSE( - [AC_LANG_PROGRAM([[ + AC_CACHE_CHECK([whether mmap supports huge pages], + [ocaml_cv_func_mmap_huge_pages], + [AC_RUN_IFELSE([AC_LANG_PROGRAM([[ #include #include #include @@ -276,11 +280,12 @@ AC_DEFUN([OCAML_MMAP_SUPPORTS_HUGE_PAGES], [ p[i] = (char) i; } ]])], + [ocaml_cv_func_mmap_huge_pages=yes], + [ocaml_cv_func_mmap_huge_pages=no], + [ocaml_cv_func_mmap_huge_pages='no assumed'])]) + AS_IF([test "x$ocaml_cv_prog_cc_func_mmap_huge_pages" = xyes], [AC_DEFINE([HAS_HUGE_PAGES], [1]) - AC_DEFINE_UNQUOTED([HUGE_PAGE_SIZE], [(4 * 1024 * 1024)]) - AC_MSG_RESULT([yes])], - [AC_MSG_RESULT([no])], - [AC_MSG_RESULT([no assumed])]) + AC_DEFINE_UNQUOTED([HUGE_PAGE_SIZE], [(4 * 1024 * 1024)])]) ]) AC_DEFUN([OCAML_CHECK_LIBUNWIND], [ diff --git a/configure b/configure index 67d003d038bc..0c7f31763c65 100755 --- a/configure +++ b/configure @@ -18384,9 +18384,15 @@ esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler supports __attribute__((optimize(\"tree-vectorize\")))" >&5 printf %s "checking whether the C compiler supports __attribute__((optimize(\"tree-vectorize\")))... " >&6; } - saved_CFLAGS="$CFLAGS" - CFLAGS="$warn_error_flag $CFLAGS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +if test ${ocaml_cv_prog_cc_optimize_tree_vectorize+y} +then : + printf %s "(cached) " >&6 +else $as_nop + + + saved_CFLAGS="$CFLAGS" + CFLAGS="$warn_error_flag $CFLAGS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ __attribute__((optimize("tree-vectorize"))) void f(void) {} int @@ -18399,16 +18405,16 @@ f(); _ACEOF if ac_fn_c_try_compile "$LINENO" then : - printf "%s\n" "#define SUPPORTS_TREE_VECTORIZE 1" >>confdefs.h - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + ocaml_cv_prog_cc_optimize_tree_vectorize=yes else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + ocaml_cv_prog_cc_optimize_tree_vectorize=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - CFLAGS="$saved_CFLAGS" + CFLAGS="$saved_CFLAGS" + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ocaml_cv_prog_cc_optimize_tree_vectorize" >&5 +printf "%s\n" "$ocaml_cv_prog_cc_optimize_tree_vectorize" >&6; } # Check whether the C compiler supports the labels as values extension. @@ -23062,10 +23068,13 @@ fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mmap supports huge pages" >&5 printf %s "checking whether mmap supports huge pages... " >&6; } +if test ${ocaml_cv_func_mmap_huge_pages+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test "$cross_compiling" = yes then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no assumed" >&5 -printf "%s\n" "no assumed" >&6; } + ocaml_cv_func_mmap_huge_pages='no assumed' else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -23114,20 +23123,24 @@ main (void) _ACEOF if ac_fn_c_try_run "$LINENO" then : - printf "%s\n" "#define HAS_HUGE_PAGES 1" >>confdefs.h - - printf "%s\n" "#define HUGE_PAGE_SIZE (4 * 1024 * 1024)" >>confdefs.h - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + ocaml_cv_func_mmap_huge_pages=yes else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + ocaml_cv_func_mmap_huge_pages=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ocaml_cv_func_mmap_huge_pages" >&5 +printf "%s\n" "$ocaml_cv_func_mmap_huge_pages" >&6; } + if test "x$ocaml_cv_prog_cc_func_mmap_huge_pages" = xyes +then : + printf "%s\n" "#define HAS_HUGE_PAGES 1" >>confdefs.h + + printf "%s\n" "#define HUGE_PAGE_SIZE (4 * 1024 * 1024)" >>confdefs.h + +fi printf "%s\n" "#define HEADER_RESERVED_BITS $reserved_header_bits" >>confdefs.h From 35aa99fadea3611bf14fe71706d5eb62b6dd0b69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonin=20D=C3=A9cimo?= Date: Tue, 24 Sep 2024 17:49:59 +0200 Subject: [PATCH 06/22] configure: cache diff flags probing --- configure | 46 +++++++++++++++++++++++++--------------------- configure.ac | 29 ++++++++++++++--------------- 2 files changed, 39 insertions(+), 36 deletions(-) diff --git a/configure b/configure index 0c7f31763c65..5b68878e69f9 100755 --- a/configure +++ b/configure @@ -717,6 +717,7 @@ ac_includes_default="\ ac_header_c_list= ac_subst_vars='LTLIBOBJS LIBOBJS +DIFF_FLAGS DIFF PTHREAD_CFLAGS PTHREAD_LIBS @@ -928,7 +929,6 @@ libext ac_tool_prefix CSCFLAGS CSC -DIFF_FLAGS encode_C_literal SAK SAK_BUILD @@ -3417,7 +3417,6 @@ LINEAR_MAGIC_NUMBER=Caml1999L035 - # Note: This is present for the flexdll bootstrap where it exposed as the old # TOOLPREF variable. It would be better if flexdll where updated to require # WINDRES instead. @@ -23263,31 +23262,36 @@ fi test -n "$DIFF" && break done -test -n "$DIFF" || DIFF="none" +test -n "$DIFF" || DIFF="as_fn_error $? "ocamltest requires a diff tool" "$LINENO" 5" - DIFF_FLAGS="" - flags="" case $DIFF in #( diff) : - flags="--strip-trailing-cr -u" ;; #( - none) : - as_fn_error $? "ocamltest requires a diff tool" "$LINENO" 5 ;; #( - *) : - ;; -esac - for flag in ${flags}; do - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $DIFF supports $flag" >&5 -printf %s "checking whether $DIFF supports $flag... " >&6; }; - if $DIFF $DIFF_FLAGS $flag $0 $0 > /dev/null 2>&1 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for extra $DIFF flags" >&5 +printf %s "checking for extra $DIFF flags... " >&6; } +if test ${ocaml_cv_prog_diff_flags+y} then : - DIFF_FLAGS="$DIFF_FLAGS $flag" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + printf %s "(cached) " >&6 else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + flags="" + for flag in -u --strip-trailing-cr; do + "$DIFF" $flag /dev/zero /dev/zero >/dev/null 2>&1 && \ + flags="${flags:+$flags }$flag" + done + ocaml_cv_prog_diff_flags="${flags:-none needed}" fi - done +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ocaml_cv_prog_diff_flags" >&5 +printf "%s\n" "$ocaml_cv_prog_diff_flags" >&6; } + if test "x$ocaml_cv_prog_diff_flags" = x'none needed' +then : + DIFF_FLAGS="" + +else $as_nop + DIFF_FLAGS=$ocaml_cv_prog_diff_flags + +fi ;; #( + *) : + ;; +esac fi if test x"$enable_flambda" = "xyes" diff --git a/configure.ac b/configure.ac index 82d6e5906cc3..1f57c01bf5d6 100644 --- a/configure.ac +++ b/configure.ac @@ -125,7 +125,6 @@ AC_SUBST([CC]) AC_SUBST([SAK_BUILD]) AC_SUBST([SAK]) AC_SUBST([encode_C_literal]) -AC_SUBST([DIFF_FLAGS]) AC_SUBST([CSC]) AC_SUBST([CSCFLAGS]) # Note: This is present for the flexdll bootstrap where it exposed as the old @@ -2630,20 +2629,20 @@ AS_IF([$build_ocamltest], AC_CONFIG_LINKS([ ocamltest/ocamltest_unix.ml:${ocamltest_unix_mod} ]) - AC_CHECK_PROGS([DIFF], [patdiff diff], [none]) - DIFF_FLAGS="" - flags="" - AS_CASE([$DIFF], - [diff], [flags="--strip-trailing-cr -u"], - [none], - [AC_MSG_ERROR([ocamltest requires a diff tool])]) - for flag in ${flags}; do - AC_MSG_CHECKING([whether $DIFF supports $flag]); - AS_IF([$DIFF $DIFF_FLAGS $flag $0 $0 > /dev/null 2>&1], - [DIFF_FLAGS="$DIFF_FLAGS $flag" - AC_MSG_RESULT([yes])], - [AC_MSG_RESULT([no])]) - done]) + AC_CHECK_PROGS([DIFF], [patdiff diff], + [AC_MSG_ERROR([ocamltest requires a diff tool])]) + AS_CASE([$DIFF], [diff], + [AC_CACHE_CHECK([for extra $DIFF flags], + [ocaml_cv_prog_diff_flags], + [flags="" + for flag in -u --strip-trailing-cr; do + "$DIFF" $flag /dev/zero /dev/zero >/dev/null 2>&1 && \ + flags="${flags:+$flags }$flag" + done + ocaml_cv_prog_diff_flags="${flags:-none needed}"]) + AS_IF([test "x$ocaml_cv_prog_diff_flags" = x'none needed'], + [AC_SUBST([DIFF_FLAGS], [""])], + [AC_SUBST([DIFF_FLAGS], [$ocaml_cv_prog_diff_flags])])])]) AS_IF([test x"$enable_flambda" = "xyes"], [flambda=true From d45288a15fd7b2ed070f1b052101765077699354 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonin=20D=C3=A9cimo?= Date: Wed, 25 Sep 2024 18:40:13 +0200 Subject: [PATCH 07/22] configure: factorize code checking if C99 float operations work --- aclocal.m4 | 84 +++++++++++----------- configure | 134 +++++++++++++++++++++-------------- runtime/caml/compatibility.h | 8 +++ runtime/caml/s.h.in | 16 +++-- runtime/floats.c | 6 +- 5 files changed, 140 insertions(+), 108 deletions(-) diff --git a/aclocal.m4 b/aclocal.m4 index 5167ddc72724..12d4cae59515 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -400,36 +400,50 @@ AC_DEFUN([OCAML_RUN_IFELSE], [ cross_compiling="$old_cross_compiling" ]) +# OCAML_C99_CHECK_FLOAT_OPS(FUNCTION, INPUT, [TARGETS], [DESCRIPTION]) +# -------------------------------------------------------------------- +# TARGETS: space-separated list of target triplets on which the function is +# known not to work +AC_DEFUN([OCAML_C99_CHECK_FLOAT_OPS], [ + AS_VAR_PUSHDEF([CACHEVAR], [ocaml_cv_func_$1_works])dnl + AC_CACHE_CHECK([whether $1 works], CACHEVAR, [ + OCAML_RUN_IFELSE([$2], + [AS_VAR_SET(CACHEVAR, [yes])], + [AS_CASE([$enable_imprecise_c99_float_ops,$target], + [no,*], [AS_VAR_SET(CACHEVAR, [no-with-hard-error])], + [yes,*m4_ifnblank([$3], [|*,m4_bpatsubst([$3], [ ], [|*,])])], + [AS_VAR_SET(CACHEVAR, [no])], + [AS_VAR_SET(CACHEVAR, [no-with-hard-error])])], + [AS_CASE([$target], + [m4_bpatsubst([$3], [ ], [|])], + [AS_VAR_SET(CACHEVAR, [no-cross-compiling])], + [AS_VAR_SET(CACHEVAR, [yes-cross-compiling])])])]) + AS_CASE([$CACHEVAR], + [yes*], + [AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_WORKING_$1]), [1], + [Define to 1 if '$1' works. $4]) + AS_VAR_IF(CACHEVAR, [yes-cross-compiling], + [AC_MSG_RESULT([cross-compiling; assume yes])])], + [no-with-hard-error], + [AC_MSG_ERROR(m4_normalize([$1 does not work, enable emulation with + --enable-imprecise-c99-float-ops]))], + [no], [AC_MSG_WARN([$1 does not work; emulation enabled])], + [no-cross-compiling], [AC_MSG_RESULT([cross-compiling; assume not])]) + AS_VAR_POPDEF([CACHEVAR])dnl +])dnl + AC_DEFUN([OCAML_C99_CHECK_ROUND], [ - AC_MSG_CHECKING([whether round works]) - OCAML_RUN_IFELSE( + OCAML_C99_CHECK_FLOAT_OPS([round], [AC_LANG_PROGRAM([[#include ]],[[ static volatile double d = 0.49999999999999994449; if (fpclassify(round(d)) != FP_ZERO) return 1; ]])], - [AC_MSG_RESULT([yes]) - AC_DEFINE([HAS_WORKING_ROUND], [1])], - [AC_MSG_RESULT([no]) - AS_CASE([$enable_imprecise_c99_float_ops,$target], - [no,*], [hard_error=true], - [yes,*], [hard_error=false], - [*,x86_64-w64-mingw32*], [hard_error=false], - [hard_error=true]) - AS_IF([test x"$hard_error" = "xtrue"], - [AC_MSG_ERROR(m4_normalize([ - round does not work, enable emulation with - --enable-imprecise-c99-float-ops]))], - [AC_MSG_WARN(m4_normalize([ - round does not work; emulation enabled]))])], - [AS_CASE([$target], - [x86_64-w64-mingw32*],[AC_MSG_RESULT([cross-compiling; assume not])], - [AC_MSG_RESULT([cross-compiling; assume yes]) - AC_DEFINE([HAS_WORKING_ROUND], [1])])]) -]) + [x86_64-w64-mingw32*], + [This workaround exists primarily for + https://sourceforge.net/p/mingw-w64/bugs/573/])]) AC_DEFUN([OCAML_C99_CHECK_FMA], [ - AC_MSG_CHECKING([whether fma works]) - OCAML_RUN_IFELSE( + OCAML_C99_CHECK_FLOAT_OPS([fma], [AC_LANG_PROGRAM([[#include ]],[[ /* Tests 264-266 from testsuite/tests/fma/fma.ml. These tests trigger the broken implementations of Cygwin64 and mingw-w64 (x86_64). @@ -457,26 +471,10 @@ AC_DEFUN([OCAML_C99_CHECK_FMA], [ || !(t266 == 0x8p-1076)) return 1; ]])], - [AC_MSG_RESULT([yes]) - AC_DEFINE([HAS_WORKING_FMA], [1])], - [AC_MSG_RESULT([no]) - AS_CASE([$enable_imprecise_c99_float_ops,$target], - [no,*], [hard_error=true], - [yes,*], [hard_error=false], - [*,x86_64-w64-mingw32*|*,x86_64-*-cygwin], [hard_error=false], - [hard_error=true]) - AS_IF([test x"$hard_error" = "xtrue"], - [AC_MSG_ERROR(m4_normalize([ - fma does not work, enable emulation with - --enable-imprecise-c99-float-ops]))], - [AC_MSG_WARN(m4_normalize([ - fma does not work; emulation enabled]))])], - [AS_CASE([$target], - [x86_64-w64-mingw32*|x86_64-*-cygwin], - [AC_MSG_RESULT([cross-compiling; assume not])], - [AC_MSG_RESULT([cross-compiling; assume yes]) - AC_DEFINE([HAS_WORKING_FMA], [1])])]) -]) + [x86_64-w64-mingw32* x86_64-*-cygwin*], + [The newlib library (intentionally) simply contains return x * y + z. + This workaround is also used for + https://sourceforge.net/p/mingw-w64/bugs/848/])]) # Computes a suitable id to insert in quoted strings to ensure that all OCaml # quoted strings generated by configure cannot be "escaped". The ID takes the diff --git a/configure b/configure index 5b68878e69f9..bef31e4246c4 100755 --- a/configure +++ b/configure @@ -19095,8 +19095,14 @@ then : # Check whether round works (known bug in mingw-w64) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether round works" >&5 + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether round works" >&5 printf %s "checking whether round works... " >&6; } +if test ${ocaml_cv_func_round_works+y} +then : + printf %s "(cached) " >&6 +else $as_nop + old_cross_compiling="$cross_compiling" if test "x$target_runnable" = 'xtrue' @@ -19107,13 +19113,9 @@ fi then : case $target in #( x86_64-w64-mingw32*) : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cross-compiling; assume not" >&5 -printf "%s\n" "cross-compiling; assume not" >&6; } ;; #( + ocaml_cv_func_round_works=no-cross-compiling ;; #( *) : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cross-compiling; assume yes" >&5 -printf "%s\n" "cross-compiling; assume yes" >&6; } - printf "%s\n" "#define HAS_WORKING_ROUND 1" >>confdefs.h - ;; + ocaml_cv_func_round_works=yes-cross-compiling ;; esac else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -19132,30 +19134,16 @@ main (void) _ACEOF if ac_fn_c_try_run "$LINENO" then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - printf "%s\n" "#define HAS_WORKING_ROUND 1" >>confdefs.h - + ocaml_cv_func_round_works=yes else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - case $enable_imprecise_c99_float_ops,$target in #( + case $enable_imprecise_c99_float_ops,$target in #( no,*) : - hard_error=true ;; #( - yes,*) : - hard_error=false ;; #( - *,x86_64-w64-mingw32*) : - hard_error=false ;; #( + ocaml_cv_func_round_works=no-with-hard-error ;; #( + yes,*|*,x86_64-w64-mingw32*) : + ocaml_cv_func_round_works=no ;; #( *) : - hard_error=true ;; + ocaml_cv_func_round_works=no-with-hard-error ;; esac - if test x"$hard_error" = "xtrue" -then : - as_fn_error $? "round does not work, enable emulation with --enable-imprecise-c99-float-ops" "$LINENO" 5 -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: round does not work; emulation enabled" >&5 -printf "%s\n" "$as_me: WARNING: round does not work; emulation enabled" >&2;} -fi fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext @@ -19163,12 +19151,42 @@ fi cross_compiling="$old_cross_compiling" +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ocaml_cv_func_round_works" >&5 +printf "%s\n" "$ocaml_cv_func_round_works" >&6; } + case $ocaml_cv_func_round_works in #( + yes*) : + +printf "%s\n" "#define HAVE_WORKING_ROUND 1" >>confdefs.h + + if test "x$ocaml_cv_func_round_works" = xyes-cross-compiling +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cross-compiling; assume yes" >&5 +printf "%s\n" "cross-compiling; assume yes" >&6; } +fi ;; #( + no-with-hard-error) : + as_fn_error $? "round does not work, enable emulation with --enable-imprecise-c99-float-ops" "$LINENO" 5 ;; #( + no) : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: round does not work; emulation enabled" >&5 +printf "%s\n" "$as_me: WARNING: round does not work; emulation enabled" >&2;} ;; #( + no-cross-compiling) : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cross-compiling; assume not" >&5 +printf "%s\n" "cross-compiling; assume not" >&6; } ;; #( + *) : + ;; +esac # Check whether fma works (regressed in mingw-w64 8.0.0; and present but # unimplemented in Cygwin64) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fma works" >&5 + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fma works" >&5 printf %s "checking whether fma works... " >&6; } +if test ${ocaml_cv_func_fma_works+y} +then : + printf %s "(cached) " >&6 +else $as_nop + old_cross_compiling="$cross_compiling" if test "x$target_runnable" = 'xtrue' @@ -19178,14 +19196,10 @@ fi if test "$cross_compiling" = yes then : case $target in #( - x86_64-w64-mingw32*|x86_64-*-cygwin) : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cross-compiling; assume not" >&5 -printf "%s\n" "cross-compiling; assume not" >&6; } ;; #( + x86_64-w64-mingw32*|x86_64-*-cygwin*) : + ocaml_cv_func_fma_works=no-cross-compiling ;; #( *) : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cross-compiling; assume yes" >&5 -printf "%s\n" "cross-compiling; assume yes" >&6; } - printf "%s\n" "#define HAS_WORKING_FMA 1" >>confdefs.h - ;; + ocaml_cv_func_fma_works=yes-cross-compiling ;; esac else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -19227,30 +19241,16 @@ main (void) _ACEOF if ac_fn_c_try_run "$LINENO" then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - printf "%s\n" "#define HAS_WORKING_FMA 1" >>confdefs.h - + ocaml_cv_func_fma_works=yes else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - case $enable_imprecise_c99_float_ops,$target in #( + case $enable_imprecise_c99_float_ops,$target in #( no,*) : - hard_error=true ;; #( - yes,*) : - hard_error=false ;; #( - *,x86_64-w64-mingw32*|*,x86_64-*-cygwin) : - hard_error=false ;; #( + ocaml_cv_func_fma_works=no-with-hard-error ;; #( + yes,*|*,x86_64-w64-mingw32*|*,x86_64-*-cygwin*) : + ocaml_cv_func_fma_works=no ;; #( *) : - hard_error=true ;; + ocaml_cv_func_fma_works=no-with-hard-error ;; esac - if test x"$hard_error" = "xtrue" -then : - as_fn_error $? "fma does not work, enable emulation with --enable-imprecise-c99-float-ops" "$LINENO" 5 -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: fma does not work; emulation enabled" >&5 -printf "%s\n" "$as_me: WARNING: fma does not work; emulation enabled" >&2;} -fi fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext @@ -19258,6 +19258,30 @@ fi cross_compiling="$old_cross_compiling" +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ocaml_cv_func_fma_works" >&5 +printf "%s\n" "$ocaml_cv_func_fma_works" >&6; } + case $ocaml_cv_func_fma_works in #( + yes*) : + +printf "%s\n" "#define HAVE_WORKING_FMA 1" >>confdefs.h + + if test "x$ocaml_cv_func_fma_works" = xyes-cross-compiling +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cross-compiling; assume yes" >&5 +printf "%s\n" "cross-compiling; assume yes" >&6; } +fi ;; #( + no-with-hard-error) : + as_fn_error $? "fma does not work, enable emulation with --enable-imprecise-c99-float-ops" "$LINENO" 5 ;; #( + no) : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: fma does not work; emulation enabled" >&5 +printf "%s\n" "$as_me: WARNING: fma does not work; emulation enabled" >&2;} ;; #( + no-cross-compiling) : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cross-compiling; assume not" >&5 +printf "%s\n" "cross-compiling; assume not" >&6; } ;; #( + *) : + ;; +esac else $as_nop if test x"$enable_imprecise_c99_float_ops" != "xyes" diff --git a/runtime/caml/compatibility.h b/runtime/caml/compatibility.h index 103170f13345..04d8c8d6e858 100644 --- a/runtime/caml/compatibility.h +++ b/runtime/caml/compatibility.h @@ -33,4 +33,12 @@ #define HAS_UNISTD 1 #endif +#ifdef HAVE_WORKING_FMA +#define HAS_WORKING_FMA 1 +#endif + +#ifdef HAVE_WORKING_ROUND +#define HAS_WORKING_ROUND 1 +#endif + #endif /* CAML_COMPATIBILITY_H */ diff --git a/runtime/caml/s.h.in b/runtime/caml/s.h.in index ca5c510c5070..be31e687fdd7 100644 --- a/runtime/caml/s.h.in +++ b/runtime/caml/s.h.in @@ -55,16 +55,18 @@ exp2(), log2(), cbrt(), acosh(), asinh(), atanh(), erf(), erfc(), trunc(), round(), copysign(). */ -#undef HAS_WORKING_FMA +#undef HAVE_WORKING_FMA -/* Define HAS_WORKING_FMA if the fma function is correctly implemented. The - newlib library (intentionally) just has return x * y + z. This hatch is - also used for https://sourceforge.net/p/mingw-w64/bugs/848/ */ +/* Define HAVE_WORKING_FMA if the fma function is correctly implemented. + The newlib library (intentionally) just simply contains x * y + z. + This workaround is also used for + https://sourceforge.net/p/mingw-w64/bugs/848/ */ -#undef HAS_WORKING_ROUND +#undef HAVE_WORKING_ROUND -/* Define HAS_WORKING_ROUND is the round function is correctly implemented. This - hatch exists primarily for https://sourceforge.net/p/mingw-w64/bugs/573/ */ +/* Define HAVE_WORKING_ROUND if the round function is correctly implemented. + This workaround exists primarily for + https://sourceforge.net/p/mingw-w64/bugs/573/ */ #undef HAS_GETENTROPY diff --git a/runtime/floats.c b/runtime/floats.c index 0bc58e423bec..f517fb06f61d 100644 --- a/runtime/floats.c +++ b/runtime/floats.c @@ -495,7 +495,7 @@ CAMLprim value caml_trunc_float(value f) CAMLexport double caml_round(double f) { -#ifdef HAS_WORKING_ROUND +#ifdef HAVE_WORKING_ROUND return round(f); #else union { uint64_t i; double d; } u, pred_one_half; /* predecessor of 0.5 */ @@ -538,7 +538,7 @@ CAMLprim value caml_nextafter_float(value x, value y) return caml_copy_double(caml_nextafter(Double_val(x), Double_val(y))); } -#ifndef HAS_WORKING_FMA +#ifndef HAVE_WORKING_FMA union double_as_int64 { double d; uint64_t i; }; #define IEEE754_DOUBLE_BIAS 0x3ff #define IEEE_EXPONENT(N) (((N) >> 52) & 0x7ff) @@ -555,7 +555,7 @@ union double_as_int64 { double d; uint64_t i; }; CAMLexport double caml_fma(double x, double y, double z) { -#ifdef HAS_WORKING_FMA +#ifdef HAVE_WORKING_FMA return fma(x, y, z); #else // Emulation of FMA, from S. Boldo and G. Melquiond, "Emulation // of a FMA and Correctly Rounded Sums: Proved Algorithms Using From c3c5971a89994b075ea7ea95ca7ea621934d781a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonin=20D=C3=A9cimo?= Date: Mon, 8 Jul 2024 14:13:42 +0200 Subject: [PATCH 08/22] configure: cache whether as supports --debug-prefix-map --- aclocal.m4 | 30 ++++++++++++++---------------- configure | 31 +++++++++++++++++-------------- 2 files changed, 31 insertions(+), 30 deletions(-) diff --git a/aclocal.m4 b/aclocal.m4 index 12d4cae59515..3fe9c280edcf 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -142,29 +142,27 @@ AC_DEFUN([OCAML_CC_RESTORE_VARIABLES], [ ]) AC_DEFUN([OCAML_AS_HAS_DEBUG_PREFIX_MAP], [ - AC_MSG_CHECKING([whether the assembler supports --debug-prefix-map]) - - OCAML_CC_SAVE_VARIABLES + AC_CACHE_CHECK([whether the assembler supports --debug-prefix-map], + [ocaml_cv_prog_as_debug_prefix_map], + [OCAML_CC_SAVE_VARIABLES - # Modify C-compiler variables to use the assembler - CC="$AS" - CFLAGS="--debug-prefix-map old=new -o conftest.$ac_objext" - CPPFLAGS="" - ac_ext="S" - ac_compile='$CC $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' + # Modify C-compiler variables to use the assembler + CC="$AS" + CFLAGS="--debug-prefix-map old=new -o conftest.$ac_objext" + CPPFLAGS="" + ac_ext="S" + ac_compile='$CC $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' - AC_COMPILE_IFELSE( - [AC_LANG_SOURCE([ + AC_COMPILE_IFELSE([AC_LANG_SOURCE([ camlPervasives__loop_1128: .file 1 "pervasives.ml" .loc 1 193 ])], - [as_has_debug_prefix_map=true - AC_MSG_RESULT([yes])], - [as_has_debug_prefix_map=false - AC_MSG_RESULT([no])]) + [ocaml_cv_prog_as_debug_prefix_map=true], + [ocaml_cv_prog_as_debug_prefix_map=false]) - OCAML_CC_RESTORE_VARIABLES + OCAML_CC_RESTORE_VARIABLES]) + as_has_debug_prefix_map=$ocaml_cv_prog_as_debug_prefix_map ]) AC_DEFUN([OCAML_AS_HAS_CFI_DIRECTIVES], [ diff --git a/configure b/configure index bef31e4246c4..f44877820b10 100755 --- a/configure +++ b/configure @@ -22897,7 +22897,10 @@ then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the assembler supports --debug-prefix-map" >&5 printf %s "checking whether the assembler supports --debug-prefix-map... " >&6; } - +if test ${ocaml_cv_prog_as_debug_prefix_map+y} +then : + printf %s "(cached) " >&6 +else $as_nop saved_CC="$CC" saved_CFLAGS="$CFLAGS" @@ -22911,14 +22914,14 @@ printf %s "checking whether the assembler supports --debug-prefix-map... " >&6; touch confdefs.h - # Modify C-compiler variables to use the assembler - CC="$AS" - CFLAGS="--debug-prefix-map old=new -o conftest.$ac_objext" - CPPFLAGS="" - ac_ext="S" - ac_compile='$CC $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' + # Modify C-compiler variables to use the assembler + CC="$AS" + CFLAGS="--debug-prefix-map old=new -o conftest.$ac_objext" + CPPFLAGS="" + ac_ext="S" + ac_compile='$CC $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ camlPervasives__loop_1128: @@ -22928,13 +22931,9 @@ camlPervasives__loop_1128: _ACEOF if ac_fn_c_try_compile "$LINENO" then : - as_has_debug_prefix_map=true - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + ocaml_cv_prog_as_debug_prefix_map=true else $as_nop - as_has_debug_prefix_map=false - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + ocaml_cv_prog_as_debug_prefix_map=false fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext @@ -22948,6 +22947,10 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext CC="$saved_CC" LIBS="$saved_LIBS" +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ocaml_cv_prog_as_debug_prefix_map" >&5 +printf "%s\n" "$ocaml_cv_prog_as_debug_prefix_map" >&6; } + as_has_debug_prefix_map=$ocaml_cv_prog_as_debug_prefix_map { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the assembler supports CFI directives" >&5 From 05ec8c17e1b2df78e1456db2de0a1beecd11bd3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonin=20D=C3=A9cimo?= Date: Mon, 25 Nov 2024 08:18:22 +0100 Subject: [PATCH 09/22] configure: cache whether as supports CFI directives --- aclocal.m4 | 92 ++++++++++++++++++++++++++++-------------------------- configure | 74 +++++++++++++++++++++++-------------------- 2 files changed, 87 insertions(+), 79 deletions(-) diff --git a/aclocal.m4 b/aclocal.m4 index 3fe9c280edcf..133d850761d8 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -166,59 +166,61 @@ camlPervasives__loop_1128: ]) AC_DEFUN([OCAML_AS_HAS_CFI_DIRECTIVES], [ - AC_MSG_CHECKING([whether the assembler supports CFI directives]) - - AS_IF([test x"$enable_cfi" = "xno"], - [AC_MSG_RESULT([disabled])], - [OCAML_CC_SAVE_VARIABLES - - # Modify C-compiler variables to use the assembler - CC="$ASPP" - CFLAGS="-o conftest.$ac_objext" - CPPFLAGS="" - ac_ext="S" - ac_compile='$CC $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' - - AC_COMPILE_IFELSE( - [AC_LANG_SOURCE([ -camlPervasives__loop_1128: - .file 1 "pervasives.ml" - .loc 1 193 - .cfi_startproc - .cfi_adjust_cfa_offset 8 - .cfi_endproc - ])], - [aspp_ok=true], - [aspp_ok=false]) - - AS_IF([test "$AS" = "$ASPP"], - [as_ok="$aspp_ok"], - [CC="$AS" + AC_CACHE_CHECK([whether the assembler supports CFI directives], + [ocaml_cv_prog_as_cfi_directives], + [AS_IF([test x"$enable_cfi" = "xno"], + [ocaml_cv_prog_as_cfi_directives='disabled'], + [OCAML_CC_SAVE_VARIABLES + + # Modify C-compiler variables to use the assembler + CC="$ASPP" + CFLAGS="-o conftest.$ac_objext" + CPPFLAGS="" + ac_ext="S" ac_compile='$CC $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' - AC_COMPILE_IFELSE( - [AC_LANG_SOURCE([ + + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE([ + camlPervasives__loop_1128: + .file 1 "pervasives.ml" + .loc 1 193 + .cfi_startproc + .cfi_adjust_cfa_offset 8 + .cfi_endproc + ])], + [aspp_ok=true], + [aspp_ok=false]) + + AS_IF([test "$AS" = "$ASPP"], + [as_ok="$aspp_ok"], + [CC="$AS" + ac_compile='$CC $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE([ camlPervasives__loop_1128: .file 1 "pervasives.ml" .loc 1 193 .cfi_startproc .cfi_adjust_cfa_offset 8 .cfi_endproc - ])], - [as_ok=true], - [as_ok=false])]) - - OCAML_CC_RESTORE_VARIABLES - - AS_IF([$aspp_ok && $as_ok], + ])], + [as_ok=true], + [as_ok=false])]) + + OCAML_CC_RESTORE_VARIABLES + + AS_IF([$aspp_ok && $as_ok], + [ocaml_cv_prog_as_cfi_directives='yes'], + [AS_IF([test x"$enable_cfi" = "xyes"], + [ocaml_cv_prog_as_cfi_directives='requested but not available'], + [ocaml_cv_prog_as_cfi_directives='no'])])])]) + AS_CASE([$ocaml_cv_prog_as_cfi_directives], + [yes], [asm_cfi_supported=true - AC_DEFINE([ASM_CFI_SUPPORTED], [1]) - AC_MSG_RESULT([yes])], - [AS_IF([test x"$enable_cfi" = "xyes"], - [AC_MSG_RESULT([requested but not available - AC_MSG_ERROR([exiting])])], - [asm_cfi_supported=false - AC_MSG_RESULT([no])])]) - ])]) + AC_DEFINE([ASM_CFI_SUPPORTED], [1])], + [no|disabled], [asm_cfi_supported=false], + [AC_MSG_ERROR([exiting])]) +]) AC_DEFUN([OCAML_MMAP_SUPPORTS_MAP_STACK], [ AC_CACHE_CHECK([whether mmap supports MAP_STACK], diff --git a/configure b/configure index f44877820b10..b9b7585562c4 100755 --- a/configure +++ b/configure @@ -22955,11 +22955,13 @@ printf "%s\n" "$ocaml_cv_prog_as_debug_prefix_map" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the assembler supports CFI directives" >&5 printf %s "checking whether the assembler supports CFI directives... " >&6; } - +if test ${ocaml_cv_prog_as_cfi_directives+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test x"$enable_cfi" = "xno" then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: disabled" >&5 -printf "%s\n" "disabled" >&6; } + ocaml_cv_prog_as_cfi_directives='disabled' else $as_nop saved_CC="$CC" @@ -22974,22 +22976,22 @@ else $as_nop touch confdefs.h - # Modify C-compiler variables to use the assembler - CC="$ASPP" - CFLAGS="-o conftest.$ac_objext" - CPPFLAGS="" - ac_ext="S" - ac_compile='$CC $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' + # Modify C-compiler variables to use the assembler + CC="$ASPP" + CFLAGS="-o conftest.$ac_objext" + CPPFLAGS="" + ac_ext="S" + ac_compile='$CC $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -camlPervasives__loop_1128: - .file 1 "pervasives.ml" - .loc 1 193 - .cfi_startproc - .cfi_adjust_cfa_offset 8 - .cfi_endproc + camlPervasives__loop_1128: + .file 1 "pervasives.ml" + .loc 1 193 + .cfi_startproc + .cfi_adjust_cfa_offset 8 + .cfi_endproc _ACEOF if ac_fn_c_try_compile "$LINENO" @@ -23000,13 +23002,13 @@ else $as_nop fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - if test "$AS" = "$ASPP" + if test "$AS" = "$ASPP" then : as_ok="$aspp_ok" else $as_nop CC="$AS" - ac_compile='$CC $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + ac_compile='$CC $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ camlPervasives__loop_1128: @@ -23037,28 +23039,32 @@ fi LIBS="$saved_LIBS" - if $aspp_ok && $as_ok + if $aspp_ok && $as_ok then : - asm_cfi_supported=true - printf "%s\n" "#define ASM_CFI_SUPPORTED 1" >>confdefs.h - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + ocaml_cv_prog_as_cfi_directives='yes' else $as_nop if test x"$enable_cfi" = "xyes" then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: requested but not available - as_fn_error $? "exiting" "$LINENO" 5" >&5 -printf "%s\n" "requested but not available - as_fn_error $? "exiting" "$LINENO" 5" >&6; } + ocaml_cv_prog_as_cfi_directives='requested but not available' else $as_nop - asm_cfi_supported=false - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + ocaml_cv_prog_as_cfi_directives='no' fi fi - -fi ;; +fi +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ocaml_cv_prog_as_cfi_directives" >&5 +printf "%s\n" "$ocaml_cv_prog_as_cfi_directives" >&6; } + case $ocaml_cv_prog_as_cfi_directives in #( + yes) : + asm_cfi_supported=true + printf "%s\n" "#define ASM_CFI_SUPPORTED 1" >>confdefs.h + ;; #( + no|disabled) : + asm_cfi_supported=false ;; #( + *) : + as_fn_error $? "exiting" "$LINENO" 5 ;; +esac + ;; esac fi From 89514ddbcdb668d6a15dbdbf58427da0f455fdef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonin=20D=C3=A9cimo?= Date: Thu, 26 Sep 2024 16:23:50 +0200 Subject: [PATCH 10/22] configure: rework and cache C11 atomics CFLAGS detection --- aclocal.m4 | 48 ++++++++----- configure | 198 ++++++++------------------------------------------- configure.ac | 13 +--- 3 files changed, 59 insertions(+), 200 deletions(-) diff --git a/aclocal.m4 b/aclocal.m4 index 133d850761d8..7ee1ea9f6e4f 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -500,19 +500,24 @@ AC_DEFUN([OCAML_QUOTED_STRING_ID], [ done ]) -AC_DEFUN([OCAML_CC_SUPPORTS_ATOMIC], [ - OCAML_CC_SAVE_VARIABLES - - opts="" - AS_IF([test -n "$1"],[CFLAGS="$CFLAGS $1"; opts="$1"]) - AS_IF([test -n "$2"],[LIBS="$LIBS $2"; opts="${opts:+$opts }$2"]) - AC_MSG_CHECKING(m4_normalize([if $CC supports _Atomic types with - ${opts:-no additional options}])) - - AC_LINK_IFELSE([AC_LANG_PROGRAM([[ +# OCAML_CC_C11_ATOMIC_CFLAGS([LIBS]) +AC_DEFUN([OCAML_CC_C11_ATOMIC_CFLAGS], [ + AC_CACHE_CHECK([for options needed to enable C11 atomic support], + [ocaml_cv_prog_cc_c11_atomic_cflags], + [ocaml_cv_prog_cc_c11_atomic_cflags='cannot detect' + for ocaml_arg in dnl + ''dnl + '-experimental:c11atomics'dnl + '-std:c11'dnl remove with Autoconf 2.73 as cl will default to C11 + '-std:c11 -experimental:c11atomics'dnl same + ; do + OCAML_CC_SAVE_VARIABLES + CFLAGS="$CFLAGS $ocaml_arg" + AS_IF([test -n "$1"], [LIBS="$LIBS $1"]) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include #include - ]],[[ + ]],[[ _Atomic int64_t n; int m; int * _Atomic p = &m; @@ -520,13 +525,20 @@ AC_DEFUN([OCAML_CC_SUPPORTS_ATOMIC], [ * atomic_exchange(&p, 0) = 45; if (atomic_load_explicit(&n, memory_order_acquire)) return 1; - ]])], - [cc_supports_atomic=true - AC_MSG_RESULT([yes])], - [cc_supports_atomic=false - AC_MSG_RESULT([no])]) - - OCAML_CC_RESTORE_VARIABLES + ]])], + [AS_IF([test x"$ocaml_arg" = x], + [ocaml_cv_prog_cc_c11_atomic_cflags='none needed'], + [ocaml_cv_prog_cc_c11_atomic_cflags="$ocaml_arg"]) + OCAML_CC_RESTORE_VARIABLES + break]) + OCAML_CC_RESTORE_VARIABLES + done]) + AS_CASE([$ocaml_cv_prog_cc_c11_atomic_cflags], + ['cannot detect'], + [AC_MSG_FAILURE(m4_normalize([C11 atomic support is required, use another + C compiler]))], + ['none needed'], [:], + [common_cflags="$common_cflags $ocaml_cv_prog_cc_c11_atomic_cflags"]) ]) # Detects whether the C compiler generates an explicit .note.GNU-stack section diff --git a/configure b/configure index b9b7585562c4..01baa7cdda22 100755 --- a/configure +++ b/configure @@ -17906,80 +17906,14 @@ fi # Support for C11 atomic types - - saved_CC="$CC" - saved_CFLAGS="$CFLAGS" - saved_CPPFLAGS="$CPPFLAGS" - saved_LIBS="$LIBS" - saved_ac_ext="$ac_ext" - saved_ac_compile="$ac_compile" - # Move the content of confdefs.h to another file so it does not - # get included - mv confdefs.h confdefs.h.bak - touch confdefs.h - - - opts="" - if test -n "" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for options needed to enable C11 atomic support" >&5 +printf %s "checking for options needed to enable C11 atomic support... " >&6; } +if test ${ocaml_cv_prog_cc_c11_atomic_cflags+y} then : - CFLAGS="$CFLAGS "; opts="" -fi - if test -n "$cclibs" -then : - LIBS="$LIBS $cclibs"; opts="${opts:+$opts }$cclibs" -fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports _Atomic types with ${opts:-no additional options}" >&5 -printf %s "checking if $CC supports _Atomic types with ${opts:-no additional options}... " >&6; } - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#include - -int -main (void) -{ - - _Atomic int64_t n; - int m; - int * _Atomic p = &m; - atomic_store_explicit(&n, 123, memory_order_release); - * atomic_exchange(&p, 0) = 45; - if (atomic_load_explicit(&n, memory_order_acquire)) - return 1; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - cc_supports_atomic=true - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + printf %s "(cached) " >&6 else $as_nop - cc_supports_atomic=false - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - - - # Restore the content of confdefs.h - mv confdefs.h.bak confdefs.h - ac_compile="$saved_ac_compile" - ac_ext="$saved_ac_ext" - CPPFLAGS="$saved_CPPFLAGS" - CFLAGS="$saved_CFLAGS" - CC="$saved_CC" - LIBS="$saved_LIBS" - - -case $cc_supports_atomic,$ocaml_cc_vendor in #( - false,msvc-*) : - + ocaml_cv_prog_cc_c11_atomic_cflags='cannot detect' + for ocaml_arg in '' '-experimental:c11atomics' '-std:c11' '-std:c11 -experimental:c11atomics' ; do saved_CC="$CC" saved_CFLAGS="$CFLAGS" @@ -17992,20 +17926,12 @@ case $cc_supports_atomic,$ocaml_cc_vendor in #( mv confdefs.h confdefs.h.bak touch confdefs.h - - opts="" - if test -n "-std:c11" -then : - CFLAGS="$CFLAGS -std:c11"; opts="-std:c11" -fi - if test -n "" + CFLAGS="$CFLAGS $ocaml_arg" + if test -n "$cclibs" then : - LIBS="$LIBS "; opts="${opts:+$opts }" + LIBS="$LIBS $cclibs" fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports _Atomic types with ${opts:-no additional options}" >&5 -printf %s "checking if $CC supports _Atomic types with ${opts:-no additional options}... " >&6; } - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -18029,17 +17955,12 @@ main (void) _ACEOF if ac_fn_c_try_link "$LINENO" then : - cc_supports_atomic=true - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + if test x"$ocaml_arg" = x +then : + ocaml_cv_prog_cc_c11_atomic_cflags='none needed' else $as_nop - cc_supports_atomic=false - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + ocaml_cv_prog_cc_c11_atomic_cflags="$ocaml_arg" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - # Restore the content of confdefs.h mv confdefs.h.bak confdefs.h @@ -18050,73 +17971,11 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam \ CC="$saved_CC" LIBS="$saved_LIBS" - - if $cc_supports_atomic -then : - common_cflags="$common_cflags -std:c11" -else $as_nop - - - saved_CC="$CC" - saved_CFLAGS="$CFLAGS" - saved_CPPFLAGS="$CPPFLAGS" - saved_LIBS="$LIBS" - saved_ac_ext="$ac_ext" - saved_ac_compile="$ac_compile" - # Move the content of confdefs.h to another file so it does not - # get included - mv confdefs.h confdefs.h.bak - touch confdefs.h - - - opts="" - if test -n "-std:c11 -experimental:c11atomics" -then : - CFLAGS="$CFLAGS -std:c11 -experimental:c11atomics"; opts="-std:c11 -experimental:c11atomics" -fi - if test -n "" -then : - LIBS="$LIBS "; opts="${opts:+$opts }" -fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports _Atomic types with ${opts:-no additional options}" >&5 -printf %s "checking if $CC supports _Atomic types with ${opts:-no additional options}... " >&6; } - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#include - -int -main (void) -{ - - _Atomic int64_t n; - int m; - int * _Atomic p = &m; - atomic_store_explicit(&n, 123, memory_order_release); - * atomic_exchange(&p, 0) = 45; - if (atomic_load_explicit(&n, memory_order_acquire)) - return 1; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - cc_supports_atomic=true - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -else $as_nop - cc_supports_atomic=false - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + break fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - # Restore the content of confdefs.h mv confdefs.h.bak confdefs.h ac_compile="$saved_ac_compile" @@ -18126,23 +17985,22 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam \ CC="$saved_CC" LIBS="$saved_LIBS" - - if $cc_supports_atomic -then : - common_cflags="$common_cflags -std:c11 -experimental:c11atomics" + done fi - -fi ;; #( - *) : - ;; -esac -if ! $cc_supports_atomic -then : - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ocaml_cv_prog_cc_c11_atomic_cflags" >&5 +printf "%s\n" "$ocaml_cv_prog_cc_c11_atomic_cflags" >&6; } + case $ocaml_cv_prog_cc_c11_atomic_cflags in #( + 'cannot detect') : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C11 atomic support is required, use another C compiler -See \`config.log' for more details" "$LINENO" 5; } -fi +See \`config.log' for more details" "$LINENO" 5; } ;; #( + 'none needed') : + : ;; #( + *) : + common_cflags="$common_cflags $ocaml_cv_prog_cc_c11_atomic_cflags" ;; +esac + # Full support for thread local storage # macOS and MinGW-w64 have problems with thread local storage accessed from DLLs diff --git a/configure.ac b/configure.ac index 1f57c01bf5d6..97ed12d1622b 100644 --- a/configure.ac +++ b/configure.ac @@ -1342,18 +1342,7 @@ AS_IF([! $arch64], # Support for C11 atomic types -OCAML_CC_SUPPORTS_ATOMIC([], [$cclibs]) -AS_CASE([$cc_supports_atomic,$ocaml_cc_vendor], - [false,msvc-*], - [OCAML_CC_SUPPORTS_ATOMIC([-std:c11]) - AS_IF([$cc_supports_atomic], - [common_cflags="$common_cflags -std:c11"], - [OCAML_CC_SUPPORTS_ATOMIC([-std:c11 -experimental:c11atomics]) - AS_IF([$cc_supports_atomic], - [common_cflags="$common_cflags -std:c11 -experimental:c11atomics"]) -])]) -AS_IF([! $cc_supports_atomic], - [AC_MSG_FAILURE([C11 atomic support is required, use another C compiler])]) +OCAML_CC_C11_ATOMIC_CFLAGS([$cclibs]) # Full support for thread local storage # macOS and MinGW-w64 have problems with thread local storage accessed from DLLs From af593189fb248200898f8bdbf4eb389473ce4c9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonin=20D=C3=A9cimo?= Date: Wed, 22 May 2024 15:10:13 +0200 Subject: [PATCH 11/22] configure: use AC_CHECK_HEADERS_ONCE --- configure | 19 +++++-------------- configure.ac | 7 +++---- runtime/caml/compatibility.h | 8 ++++++++ runtime/caml/s.h.in | 4 ++-- runtime/domain.c | 2 +- runtime/platform.c | 2 +- runtime/unix.c | 2 +- 7 files changed, 21 insertions(+), 23 deletions(-) diff --git a/configure b/configure index 17bfcc456185..23e4deefcf66 100755 --- a/configure +++ b/configure @@ -3153,6 +3153,8 @@ as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H" as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H" as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H" as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H" +as_fn_append ac_header_c_list " pthread_np.h pthread_np_h HAVE_PTHREAD_NP_H" +as_fn_append ac_header_c_list " sys/mman.h sys_mman_h HAVE_SYS_MMAN_H" # Auxiliary files required by this configure script. ac_aux_files="install-sh ltmain.sh config.guess config.sub" @@ -17572,12 +17574,9 @@ fi # Checks for header files -ac_fn_c_check_header_compile "$LINENO" "pthread_np.h" "ac_cv_header_pthread_np_h" "$ac_includes_default" -if test "x$ac_cv_header_pthread_np_h" = xyes -then : - printf "%s\n" "#define HAS_PTHREAD_NP_H 1" >>confdefs.h -fi + + ac_fn_c_check_header_compile "$LINENO" "dirent.h" "ac_cv_header_dirent_h" "#include " @@ -17597,14 +17596,6 @@ then : fi -ac_fn_c_check_header_compile "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_mman_h" = xyes -then : - printf "%s\n" "#define HAS_SYS_MMAN_H 1" >>confdefs.h - -fi - - case $target in #( *-*-linux*) : ac_fn_c_check_header_compile "$LINENO" "linux/futex.h" "ac_cv_header_linux_futex_h" "$ac_includes_default" @@ -23244,7 +23235,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _GNU_SOURCE #include - #ifdef HAS_PTHREAD_NP_H + #ifdef HAVE_PTHREAD_NP_H #include #endif #include diff --git a/configure.ac b/configure.ac index d002ea844236..04c7670694de 100644 --- a/configure.ac +++ b/configure.ac @@ -1246,15 +1246,14 @@ AC_SEARCH_LIBS([cos], [m], # Checks for header files -AC_CHECK_HEADER([pthread_np.h],[AC_DEFINE([HAS_PTHREAD_NP_H], [1])]) +AC_CHECK_HEADERS_ONCE([pthread_np.h sys/mman.h]) + AC_CHECK_HEADER([dirent.h], [AC_DEFINE([HAS_DIRENT], [1])], [], [#include ]) AC_CHECK_HEADER([sys/select.h], [AC_DEFINE([HAS_SYS_SELECT_H], [1])], [], [#include ]) -AC_CHECK_HEADER([sys/mman.h], [AC_DEFINE([HAS_SYS_MMAN_H], [1])]) - AS_CASE([$target], [*-*-linux*], [AC_CHECK_HEADER([linux/futex.h], [AC_DEFINE([HAS_LINUX_FUTEX_H])])]) @@ -2469,7 +2468,7 @@ AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#define _GNU_SOURCE #include - #ifdef HAS_PTHREAD_NP_H + #ifdef HAVE_PTHREAD_NP_H #include #endif #include ]], diff --git a/runtime/caml/compatibility.h b/runtime/caml/compatibility.h index 9603b7464bf9..c7100d6c80dd 100644 --- a/runtime/caml/compatibility.h +++ b/runtime/caml/compatibility.h @@ -33,6 +33,14 @@ #define HAS_UNISTD 1 #endif +#ifdef HAVE_PTHREAD_NP_H +#define HAS_PTHREAD_NP_H 1 +#endif + +#ifdef HAVE_SYS_MMAN_H +#define HAS_SYS_MMAN_H 1 +#endif + #ifdef HAVE_WORKING_FMA #define HAS_WORKING_FMA 1 #endif diff --git a/runtime/caml/s.h.in b/runtime/caml/s.h.in index 160080d95d14..2b72dad06cf0 100644 --- a/runtime/caml/s.h.in +++ b/runtime/caml/s.h.in @@ -80,7 +80,7 @@ #undef HAS_ISSETUGID -#undef HAS_SYS_MMAN_H +#undef HAVE_SYS_MMAN_H #undef HAS_LINUX_FUTEX_H @@ -108,7 +108,7 @@ #undef HAS_IPV6 -#undef HAS_PTHREAD_NP_H +#undef HAVE_PTHREAD_NP_H #undef HAS_PRCTL diff --git a/runtime/domain.c b/runtime/domain.c index 7ec5675877d8..4a67d9ba65e2 100644 --- a/runtime/domain.c +++ b/runtime/domain.c @@ -30,7 +30,7 @@ #include #ifdef HAS_GNU_GETAFFINITY_NP #include -#ifdef HAS_PTHREAD_NP_H +#ifdef HAVE_PTHREAD_NP_H #include #endif #endif diff --git a/runtime/platform.c b/runtime/platform.c index 0c780aff7b7a..edcf8c23098a 100644 --- a/runtime/platform.c +++ b/runtime/platform.c @@ -27,7 +27,7 @@ #include "caml/lf_skiplist.h" #include "caml/misc.h" #include "caml/signals.h" -#ifdef HAS_SYS_MMAN_H +#ifdef HAVE_SYS_MMAN_H #include #endif #ifdef _WIN32 diff --git a/runtime/unix.c b/runtime/unix.c index e58c77cf5170..0fb5250262c9 100644 --- a/runtime/unix.c +++ b/runtime/unix.c @@ -57,7 +57,7 @@ #ifdef __APPLE__ #include #endif -#ifdef HAS_SYS_MMAN_H +#ifdef HAVE_SYS_MMAN_H #include #endif #include "caml/fail.h" From f4888ce3618e27d1be46cada2a01db1ff4d6928f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonin=20D=C3=A9cimo?= Date: Wed, 22 May 2024 15:49:31 +0200 Subject: [PATCH 12/22] configure: use AC_CHECK_HEADERS --- configure | 3625 ++++++++++++------------------ configure.ac | 12 +- otherlibs/systhreads/st_posix.h | 2 +- otherlibs/unix/caml/socketaddr.h | 2 +- otherlibs/unix/select_unix.c | 2 +- otherlibs/unix/sleep_unix.c | 2 +- runtime/caml/compatibility.h | 12 + runtime/caml/platform.h | 2 +- runtime/caml/s.h.in | 10 +- runtime/debugger.c | 4 +- 10 files changed, 1489 insertions(+), 2184 deletions(-) diff --git a/configure b/configure index 23e4deefcf66..e1dea3ad77b6 100755 --- a/configure +++ b/configure @@ -56,12 +56,12 @@ if test -e '.git' ; then : fi fi # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.72 for OCaml 5.4.0+dev0-2024-08-25. +# Generated by GNU Autoconf 2.71 for OCaml 5.4.0+dev0-2024-08-25. # # Report bugs to . # # -# Copyright (C) 1992-1996, 1998-2017, 2020-2023 Free Software Foundation, +# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation, # Inc. # # @@ -73,6 +73,7 @@ fi # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh +as_nop=: if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 then : emulate sh @@ -81,13 +82,12 @@ then : # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST -else case e in #( - e) case `(set -o) 2>/dev/null` in #( +else $as_nop + case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; -esac ;; esac fi @@ -159,7 +159,7 @@ IFS=$as_save_IFS ;; esac -# We did not find ourselves, most probably we were run as 'sh COMMAND' +# We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 @@ -189,14 +189,15 @@ case $- in # (((( esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail -# out after a failed 'exec'. +# out after a failed `exec'. printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then - as_bourne_compatible="if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 + as_bourne_compatible="as_nop=: +if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 then : emulate sh NULLCMD=: @@ -204,13 +205,12 @@ then : # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST -else case e in #( - e) case \`(set -o) 2>/dev/null\` in #( +else \$as_nop + case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; -esac ;; esac fi " @@ -228,9 +228,8 @@ as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ) then : -else case e in #( - e) exitcode=1; echo positional parameters were not saved. ;; -esac +else \$as_nop + exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 blah=\$(echo \$(echo blah)) @@ -252,15 +251,14 @@ test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null then : as_have_required=yes -else case e in #( - e) as_have_required=no ;; -esac +else $as_nop + as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null then : -else case e in #( - e) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +else $as_nop + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do @@ -293,13 +291,12 @@ IFS=$as_save_IFS if $as_found then : -else case e in #( - e) if { test -f "$SHELL" || test -f "$SHELL.exe"; } && +else $as_nop + if { test -f "$SHELL" || test -f "$SHELL.exe"; } && as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null then : CONFIG_SHELL=$SHELL as_have_required=yes -fi ;; -esac +fi fi @@ -321,7 +318,7 @@ case $- in # (((( esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail -# out after a failed 'exec'. +# out after a failed `exec'. printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi @@ -341,8 +338,7 @@ $0: manually run the script under such a shell if you do $0: have one." fi exit 1 -fi ;; -esac +fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} @@ -381,6 +377,14 @@ as_fn_exit () as_fn_set_status $1 exit $1 } # as_fn_exit +# as_fn_nop +# --------- +# Do nothing but, unlike ":", preserve the value of $?. +as_fn_nop () +{ + return $? +} +as_nop=as_fn_nop # as_fn_mkdir_p # ------------- @@ -449,12 +453,11 @@ then : { eval $1+=\$2 }' -else case e in #( - e) as_fn_append () +else $as_nop + as_fn_append () { eval $1=\$$1\$2 - } ;; -esac + } fi # as_fn_append # as_fn_arith ARG... @@ -468,14 +471,21 @@ then : { as_val=$(( $* )) }' -else case e in #( - e) as_fn_arith () +else $as_nop + as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` - } ;; -esac + } fi # as_fn_arith +# as_fn_nop +# --------- +# Do nothing but, unlike ":", preserve the value of $?. +as_fn_nop () +{ + return $? +} +as_nop=as_fn_nop # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- @@ -549,8 +559,6 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits /[$]LINENO/= ' <$as_myself | sed ' - t clear - :clear s/[$]LINENO.*/&-/ t lineno b @@ -599,6 +607,7 @@ esac as_echo='printf %s\n' as_echo_n='printf %s' + rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file @@ -610,9 +619,9 @@ if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: - # 1) On MSYS, both 'ln -s file dir' and 'ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; 'ln -s' creates a wrapper executable. - # In both cases, we have to default to 'cp -pR'. + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then @@ -637,12 +646,10 @@ as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. -as_sed_cpp="y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" -as_tr_cpp="eval sed '$as_sed_cpp'" # deprecated +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. -as_sed_sh="y%*+%pp%;s%[^_$as_cr_alnum]%_%g" -as_tr_sh="eval sed '$as_sed_sh'" # deprecated +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" SHELL=${CONFIG_SHELL-/bin/sh} @@ -1176,7 +1183,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: '$ac_useropt'" + as_fn_error $? "invalid feature name: \`$ac_useropt'" ac_useropt_orig=$ac_useropt ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1202,7 +1209,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: '$ac_useropt'" + as_fn_error $? "invalid feature name: \`$ac_useropt'" ac_useropt_orig=$ac_useropt ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1415,7 +1422,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: '$ac_useropt'" + as_fn_error $? "invalid package name: \`$ac_useropt'" ac_useropt_orig=$ac_useropt ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1431,7 +1438,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: '$ac_useropt'" + as_fn_error $? "invalid package name: \`$ac_useropt'" ac_useropt_orig=$ac_useropt ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1461,8 +1468,8 @@ do | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; - -*) as_fn_error $? "unrecognized option: '$ac_option' -Try '$0 --help' for more information" + -*) as_fn_error $? "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information" ;; *=*) @@ -1470,7 +1477,7 @@ Try '$0 --help' for more information" # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error $? "invalid variable name: '$ac_envvar'" ;; + as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; @@ -1520,7 +1527,7 @@ do as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done -# There might be people who depend on the old broken behavior: '$host' +# There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias @@ -1588,7 +1595,7 @@ if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi -ac_msg="sources are in $srcdir, but 'cd $srcdir' does not work" +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` @@ -1616,7 +1623,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -'configure' configures OCaml 5.4.0+dev0-2024-08-25 to adapt to many kinds of systems. +\`configure' configures OCaml 5.4.0+dev0-2024-08-25 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1630,11 +1637,11 @@ Configuration: --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit - -q, --quiet, --silent do not print 'checking ...' messages + -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] - -C, --config-cache alias for '--cache-file=config.cache' + -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files - --srcdir=DIR find the sources in DIR [configure dir or '..'] + --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX @@ -1642,10 +1649,10 @@ Installation directories: --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] -By default, 'make install' will install all the files in -'$ac_default_prefix/bin', '$ac_default_prefix/lib' etc. You can specify -an installation prefix other than '$ac_default_prefix' using '--prefix', -for instance '--prefix=\$HOME'. +By default, \`make install' will install all the files in +\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify +an installation prefix other than \`$ac_default_prefix' using \`--prefix', +for instance \`--prefix=\$HOME'. For better control, use the options below. @@ -1802,7 +1809,7 @@ Some influential environment variables: User-defined run-time library search path. CPP C preprocessor -Use these variables to override the choices made by 'configure' or to help +Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . @@ -1871,9 +1878,9 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF OCaml configure 5.4.0+dev0-2024-08-25 -generated by GNU Autoconf 2.72 +generated by GNU Autoconf 2.71 -Copyright (C) 2023 Free Software Foundation, Inc. +Copyright (C) 2021 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1912,12 +1919,11 @@ printf "%s\n" "$ac_try_echo"; } >&5 } && test -s conftest.$ac_objext then : ac_retval=0 -else case e in #( - e) printf "%s\n" "$as_me: failed program was:" >&5 +else $as_nop + printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_retval=1 ;; -esac + ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval @@ -1955,12 +1961,11 @@ printf "%s\n" "$ac_try_echo"; } >&5 } then : ac_retval=0 -else case e in #( - e) printf "%s\n" "$as_me: failed program was:" >&5 +else $as_nop + printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_retval=1 ;; -esac + ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would @@ -1984,8 +1989,8 @@ printf %s "checking for $2... " >&6; } if eval test \${$3+y} then : printf %s "(cached) " >&6 -else case e in #( - e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> @@ -1993,12 +1998,10 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : eval "$3=yes" -else case e in #( - e) eval "$3=no" ;; -esac +else $as_nop + eval "$3=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; -esac +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi eval ac_res=\$$3 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 @@ -2018,15 +2021,15 @@ printf %s "checking for $2... " >&6; } if eval test \${$3+y} then : printf %s "(cached) " >&6 -else case e in #( - e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $2 (void); below. */ + which can conflict with char $2 (); below. */ #include #undef $2 @@ -2037,7 +2040,7 @@ else case e in #( #ifdef __cplusplus extern "C" #endif -char $2 (void); +char $2 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ @@ -2056,13 +2059,11 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : eval "$3=yes" -else case e in #( - e) eval "$3=no" ;; -esac +else $as_nop + eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext ;; -esac + conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 @@ -2098,12 +2099,11 @@ printf "%s\n" "$ac_try_echo"; } >&5 } then : ac_retval=0 -else case e in #( - e) printf "%s\n" "$as_me: failed program was:" >&5 +else $as_nop + printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_retval=1 ;; -esac + ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval @@ -2140,13 +2140,12 @@ printf "%s\n" "$ac_try_echo"; } >&5 test $ac_status = 0; }; } then : ac_retval=0 -else case e in #( - e) printf "%s\n" "$as_me: program exited with status $ac_status" >&5 +else $as_nop + printf "%s\n" "$as_me: program exited with status $ac_status" >&5 printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_retval=$ac_status ;; -esac + ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno @@ -2166,8 +2165,8 @@ printf %s "checking for $2... " >&6; } if eval test \${$3+y} then : printf %s "(cached) " >&6 -else case e in #( - e) eval "$3=no" +else $as_nop + eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 @@ -2197,14 +2196,12 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : -else case e in #( - e) eval "$3=yes" ;; -esac +else $as_nop + eval "$3=yes" fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; -esac +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi eval ac_res=\$$3 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 @@ -2258,19 +2255,18 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_hi=$ac_mid; break -else case e in #( - e) as_fn_arith $ac_mid + 1 && ac_lo=$as_val +else $as_nop + as_fn_arith $ac_mid + 1 && ac_lo=$as_val if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi - as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val ;; -esac + as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done -else case e in #( - e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int @@ -2305,23 +2301,20 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_lo=$ac_mid; break -else case e in #( - e) as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val +else $as_nop + as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi - as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val ;; -esac + as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done -else case e in #( - e) ac_lo= ac_hi= ;; -esac +else $as_nop + ac_lo= ac_hi= fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; -esac +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext # Binary search between lo and hi bounds. @@ -2344,9 +2337,8 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_hi=$ac_mid -else case e in #( - e) as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val ;; -esac +else $as_nop + as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done @@ -2394,9 +2386,8 @@ _ACEOF if ac_fn_c_try_run "$LINENO" then : echo >>conftest.val; read $3 &6; } if eval test \${$4+y} then : printf %s "(cached) " >&6 -else case e in #( - e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $5 int @@ -2437,8 +2428,8 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : eval "$4=yes" -else case e in #( - e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $5 int @@ -2454,15 +2445,12 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : eval "$4=yes" -else case e in #( - e) eval "$4=no" ;; -esac +else $as_nop + eval "$4=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; -esac +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; -esac +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi eval ac_res=\$$4 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 @@ -2484,8 +2472,8 @@ printf %s "checking whether $as_decl_name is declared... " >&6; } if eval test \${$3+y} then : printf %s "(cached) " >&6 -else case e in #( - e) as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` +else $as_nop + as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` eval ac_save_FLAGS=\$$6 as_fn_append $6 " $5" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -2509,14 +2497,12 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : eval "$3=yes" -else case e in #( - e) eval "$3=no" ;; -esac +else $as_nop + eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext eval $6=\$ac_save_FLAGS - ;; -esac + fi eval ac_res=\$$3 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 @@ -2549,7 +2535,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by OCaml $as_me 5.4.0+dev0-2024-08-25, which was -generated by GNU Autoconf 2.72. Invocation command line was +generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -2795,10 +2781,10 @@ esac printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ - || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} + || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file -See 'config.log' for more details" "$LINENO" 5; } +See \`config.log' for more details" "$LINENO" 5; } fi done @@ -2834,7 +2820,9 @@ struct stat; /* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */ struct buf { int x; }; struct buf * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (char **p, int i) +static char *e (p, i) + char **p; + int i; { return p[i]; } @@ -2848,21 +2836,6 @@ static char *f (char * (*g) (char **, int), char **p, ...) return s; } -/* C89 style stringification. */ -#define noexpand_stringify(a) #a -const char *stringified = noexpand_stringify(arbitrary+token=sequence); - -/* C89 style token pasting. Exercises some of the corner cases that - e.g. old MSVC gets wrong, but not very hard. */ -#define noexpand_concat(a,b) a##b -#define expand_concat(a,b) noexpand_concat(a,b) -extern int vA; -extern int vbee; -#define aye A -#define bee B -int *pvA = &expand_concat(v,aye); -int *pvbee = &noexpand_concat(v,bee); - /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not \xHH hex character constants. These do not provoke an error unfortunately, instead are silently treated @@ -2890,19 +2863,16 @@ ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]); # Test code for whether the C compiler supports C99 (global declarations) ac_c_conftest_c99_globals=' -/* Does the compiler advertise C99 conformance? */ +// Does the compiler advertise C99 conformance? #if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L # error "Compiler does not advertise C99 conformance" #endif -// See if C++-style comments work. - #include extern int puts (const char *); extern int printf (const char *, ...); extern int dprintf (int, const char *, ...); extern void *malloc (size_t); -extern void free (void *); // Check varargs macros. These examples are taken from C99 6.10.3.5. // dprintf is used instead of fprintf to avoid needing to declare @@ -2952,6 +2922,7 @@ typedef const char *ccp; static inline int test_restrict (ccp restrict text) { + // See if C++-style comments work. // Iterate through items via the restricted pointer. // Also check for declarations in for loops. for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i) @@ -3017,8 +2988,6 @@ ac_c_conftest_c99_main=' ia->datasize = 10; for (int i = 0; i < ia->datasize; ++i) ia->data[i] = i * 1.234; - // Work around memory leak warnings. - free (ia); // Check named initializers. struct named_init ni = { @@ -3040,7 +3009,7 @@ ac_c_conftest_c99_main=' # Test code for whether the C compiler supports C11 (global declarations) ac_c_conftest_c11_globals=' -/* Does the compiler advertise C11 conformance? */ +// Does the compiler advertise C11 conformance? #if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L # error "Compiler does not advertise C11 conformance" #endif @@ -3234,9 +3203,8 @@ IFS=$as_save_IFS if $as_found then : -else case e in #( - e) as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5 ;; -esac +else $as_nop + as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5 fi @@ -3264,12 +3232,12 @@ for ac_var in $ac_precious_vars; do eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' was set to '$ac_old_val' in the previous run" >&5 -printf "%s\n" "$as_me: error: '$ac_var' was set to '$ac_old_val' in the previous run" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' was not set in the previous run" >&5 -printf "%s\n" "$as_me: error: '$ac_var' was not set in the previous run" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 +printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) @@ -3278,18 +3246,18 @@ printf "%s\n" "$as_me: error: '$ac_var' was not set in the previous run" >&2;} ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' has changed since the previous run:" >&5 -printf "%s\n" "$as_me: error: '$ac_var' has changed since the previous run:" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 +printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in '$ac_var' since the previous run:" >&5 -printf "%s\n" "$as_me: warning: ignoring whitespace changes in '$ac_var' since the previous run:" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: '$ac_old_val'" >&5 -printf "%s\n" "$as_me: former value: '$ac_old_val'" >&2;} - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: '$ac_new_val'" >&5 -printf "%s\n" "$as_me: current value: '$ac_new_val'" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 +printf "%s\n" "$as_me: former value: \`$ac_old_val'" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 +printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. @@ -3305,11 +3273,11 @@ printf "%s\n" "$as_me: current value: '$ac_new_val'" >&2;} fi done if $ac_cache_corrupted; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error $? "run '${MAKE-make} distclean' and/or 'rm $cache_file' + as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## @@ -3657,16 +3625,15 @@ printf %s "checking build system type... " >&6; } if test ${ac_cv_build+y} then : printf %s "(cached) " >&6 -else case e in #( - e) ac_build_alias=$build_alias +else $as_nop + ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` || as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5 - ;; -esac + fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 printf "%s\n" "$ac_cv_build" >&6; } @@ -3693,15 +3660,14 @@ printf %s "checking host system type... " >&6; } if test ${ac_cv_host+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if test "x$host_alias" = x; then +else $as_nop + if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` || as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5 fi - ;; -esac + fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 printf "%s\n" "$ac_cv_host" >&6; } @@ -3728,15 +3694,14 @@ printf %s "checking target system type... " >&6; } if test ${ac_cv_target+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if test "x$target_alias" = x; then +else $as_nop + if test "x$target_alias" = x; then ac_cv_target=$ac_cv_host else ac_cv_target=`$SHELL "${ac_aux_dir}config.sub" $target_alias` || as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $target_alias failed" "$LINENO" 5 fi - ;; -esac + fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 printf "%s\n" "$ac_cv_target" >&6; } @@ -3773,12 +3738,11 @@ then : if test x"$build_alias" = x then : cross_compiling=maybe -else case e in #( - e) if test x"$build_alias" != x"$target_alias" +else $as_nop + if test x"$build_alias" != x"$target_alias" then : cross_compiling=yes -fi ;; -esac +fi fi fi if test -n "$target_alias" @@ -3888,8 +3852,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_csc+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$csc"; then +else $as_nop + if test -n "$csc"; then ac_cv_prog_csc="$csc" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -3911,8 +3875,7 @@ done done IFS=$as_save_IFS -fi ;; -esac +fi fi csc=$ac_cv_prog_csc if test -n "$csc"; then @@ -3973,9 +3936,8 @@ fi if test ${enable_ocamldebug+y} then : enableval=$enable_ocamldebug; -else case e in #( - e) enable_ocamldebug=auto ;; -esac +else $as_nop + enable_ocamldebug=auto fi @@ -3990,9 +3952,8 @@ fi if test ${enable_dependency_generation+y} then : enableval=$enable_dependency_generation; -else case e in #( - e) enable_dependency_generation=auto ;; -esac +else $as_nop + enable_dependency_generation=auto fi @@ -4002,9 +3963,8 @@ fi if test ${enable_instrumented_runtime+y} then : enableval=$enable_instrumented_runtime; -else case e in #( - e) enable_instrumented_runtime=auto ;; -esac +else $as_nop + enable_instrumented_runtime=auto fi @@ -4029,9 +3989,8 @@ fi if test ${enable_tsan+y} then : enableval=$enable_tsan; -else case e in #( - e) enable_tsan=no ;; -esac +else $as_nop + enable_tsan=no fi @@ -4080,9 +4039,8 @@ fi if test ${enable_ocamldoc+y} then : enableval=$enable_ocamldoc; -else case e in #( - e) enable_ocamldoc='auto' ;; -esac +else $as_nop + enable_ocamldoc='auto' fi @@ -4218,13 +4176,11 @@ then : withval=$with_target_sh; if test x"$withval" = 'xno' then : target_launch_method='exe' -else case e in #( - e) target_launch_method="$withval" ;; -esac +else $as_nop + target_launch_method="$withval" fi -else case e in #( - e) target_launch_method='' ;; -esac +else $as_nop + target_launch_method='' fi @@ -4244,9 +4200,8 @@ fi if test ${enable_stdlib_manpages+y} then : enableval=$enable_stdlib_manpages; -else case e in #( - e) enable_stdlib_manpages='auto' ;; -esac +else $as_nop + enable_stdlib_manpages='auto' fi @@ -4286,9 +4241,8 @@ fi if test ${enable_function_sections+y} then : enableval=$enable_function_sections; -else case e in #( - e) enable_function_sections=auto ;; -esac +else $as_nop + enable_function_sections=auto fi @@ -4342,9 +4296,8 @@ then : if test x"$enable_ocamldebug" = "xyes" then : as_fn_error $? "ocamldebug requires the unix library" "$LINENO" 5 -else case e in #( - e) enable_ocamldebug="no" ;; -esac +else $as_nop + enable_ocamldebug="no" fi fi @@ -4353,14 +4306,12 @@ then : if test x"$enable_ocamldoc" = "xyes" then : as_fn_error $? "ocamldoc requires the unix and str libraries" "$LINENO" 5 -else case e in #( - e) enable_ocamldoc="no" - build_ocamltex=false ;; -esac +else $as_nop + enable_ocamldoc="no" + build_ocamltex=false fi -else case e in #( - e) build_ocamltex=true ;; -esac +else $as_nop + build_ocamltex=true fi if test x"$enable_ocamldoc" = "xno" @@ -4374,15 +4325,14 @@ fi with_ocamldoc="" enable_stdlib_manpages=no build_ocamldoc=false -else case e in #( - e) ocamldoc_target=ocamldoc +else $as_nop + ocamldoc_target=ocamldoc ocamldoc_opt_target=ocamldoc.opt with_ocamldoc=ocamldoc build_ocamldoc=true optional_libraries="$optional_libraries ocamldoc/odoc_info" ac_config_files="$ac_config_files ocamldoc/META" - ;; -esac + fi # Are we building a cross-compiler @@ -4390,8 +4340,8 @@ fi if test x"$host" = x"$target" then : cross_compiler=false -else case e in #( - e) # We require a non-cross compiler of the same version +else $as_nop + # We require a non-cross compiler of the same version { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the installed OCaml compiler can build the cross compiler" >&5 printf %s "checking if the installed OCaml compiler can build the cross compiler... " >&6; } already_installed_version="$(ocamlc -vnum)" @@ -4399,14 +4349,12 @@ printf %s "checking if the installed OCaml compiler can build the cross compiler then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes (5.4.0+dev0-2024-08-25)" >&5 printf "%s\n" "yes (5.4.0+dev0-2024-08-25)" >&6; } -else case e in #( - e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no (5.4.0+dev0-2024-08-25 vs $already_installed_version)" >&5 +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no (5.4.0+dev0-2024-08-25 vs $already_installed_version)" >&5 printf "%s\n" "no (5.4.0+dev0-2024-08-25 vs $already_installed_version)" >&6; } - as_fn_error $? "exiting" "$LINENO" 5 ;; -esac + as_fn_error $? "exiting" "$LINENO" 5 fi - cross_compiler=true ;; -esac + cross_compiler=true fi # Initialization of libtool @@ -4423,8 +4371,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_LD+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$LD"; then +else $as_nop + if test -n "$LD"; then ac_cv_prog_LD="$LD" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -4446,8 +4394,7 @@ done done IFS=$as_save_IFS -fi ;; -esac +fi fi LD=$ac_cv_prog_LD if test -n "$LD"; then @@ -4473,8 +4420,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_LD+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$ac_ct_LD"; then +else $as_nop + if test -n "$ac_ct_LD"; then ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -4496,8 +4443,7 @@ done done IFS=$as_save_IFS -fi ;; -esac +fi fi ac_ct_LD=$ac_cv_prog_ac_ct_LD if test -n "$ac_ct_LD"; then @@ -4519,8 +4465,8 @@ test -n "$ac_ct_LD" || ac_ct_LD="false" fi fi -else case e in #( - e) if test -n "$ac_tool_prefix"; then +else $as_nop + if test -n "$ac_tool_prefix"; then for ac_prog in ld link do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. @@ -4530,8 +4476,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_LD+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$LD"; then +else $as_nop + if test -n "$LD"; then ac_cv_prog_LD="$LD" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -4553,8 +4499,7 @@ done done IFS=$as_save_IFS -fi ;; -esac +fi fi LD=$ac_cv_prog_LD if test -n "$LD"; then @@ -4580,8 +4525,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_LD+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$ac_ct_LD"; then +else $as_nop + if test -n "$ac_ct_LD"; then ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -4603,8 +4548,7 @@ done done IFS=$as_save_IFS -fi ;; -esac +fi fi ac_ct_LD=$ac_cv_prog_ac_ct_LD if test -n "$ac_ct_LD"; then @@ -4631,8 +4575,7 @@ esac LD=$ac_ct_LD fi fi - ;; -esac + fi # libtool will detect a build-to-host C toolchain but when building an OCaml # cross compiler we need the C toolchain to build the target runtime so we @@ -4767,8 +4710,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$CC"; then +else $as_nop + if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -4790,8 +4733,7 @@ done done IFS=$as_save_IFS -fi ;; -esac +fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then @@ -4813,8 +4755,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CC+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$ac_ct_CC"; then +else $as_nop + if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -4836,8 +4778,7 @@ done done IFS=$as_save_IFS -fi ;; -esac +fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then @@ -4872,8 +4813,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$CC"; then +else $as_nop + if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -4895,8 +4836,7 @@ done done IFS=$as_save_IFS -fi ;; -esac +fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then @@ -4918,8 +4858,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$CC"; then +else $as_nop + if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no @@ -4958,8 +4898,7 @@ if test $ac_prog_rejected = yes; then ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@" fi fi -fi ;; -esac +fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then @@ -4983,8 +4922,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$CC"; then +else $as_nop + if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -5006,8 +4945,7 @@ done done IFS=$as_save_IFS -fi ;; -esac +fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then @@ -5033,8 +4971,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CC+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$ac_ct_CC"; then +else $as_nop + if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -5056,8 +4994,7 @@ done done IFS=$as_save_IFS -fi ;; -esac +fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then @@ -5095,8 +5032,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$CC"; then +else $as_nop + if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -5118,8 +5055,7 @@ done done IFS=$as_save_IFS -fi ;; -esac +fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then @@ -5141,8 +5077,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CC+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$ac_ct_CC"; then +else $as_nop + if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -5164,8 +5100,7 @@ done done IFS=$as_save_IFS -fi ;; -esac +fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then @@ -5194,10 +5129,10 @@ fi fi -test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} +test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH -See 'config.log' for more details" "$LINENO" 5; } +See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 @@ -5269,8 +5204,8 @@ printf "%s\n" "$ac_try_echo"; } >&5 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then : - # Autoconf-2.13 could set the ac_cv_exeext variable to 'no'. -# So ignore a value of 'no', otherwise this would lead to 'EXEEXT = no' + # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. +# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. @@ -5290,7 +5225,7 @@ do ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not - # safe: cross compilers may not add the suffix if given an '-o' + # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. @@ -5301,9 +5236,8 @@ do done test "$ac_cv_exeext" = no && ac_cv_exeext= -else case e in #( - e) ac_file='' ;; -esac +else $as_nop + ac_file='' fi if test -z "$ac_file" then : @@ -5312,14 +5246,13 @@ printf "%s\n" "no" >&6; } printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} +{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables -See 'config.log' for more details" "$LINENO" 5; } -else case e in #( - e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } ;; -esac +See \`config.log' for more details" "$LINENO" 5; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 printf %s "checking for C compiler default output file name... " >&6; } @@ -5343,10 +5276,10 @@ printf "%s\n" "$ac_try_echo"; } >&5 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then : - # If both 'conftest.exe' and 'conftest' are 'present' (well, observable) -# catch 'conftest.exe'. For instance with Cygwin, 'ls conftest' will -# work properly (i.e., refer to 'conftest.exe'), while it won't with -# 'rm'. + # If both `conftest.exe' and `conftest' are `present' (well, observable) +# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will +# work properly (i.e., refer to `conftest.exe'), while it won't with +# `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in @@ -5356,12 +5289,11 @@ for ac_file in conftest.exe conftest conftest.*; do * ) break;; esac done -else case e in #( - e) { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} +else $as_nop + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link -See 'config.log' for more details" "$LINENO" 5; } ;; -esac +See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 @@ -5377,8 +5309,6 @@ int main (void) { FILE *f = fopen ("conftest.out", "w"); - if (!f) - return 1; return ferror (f) || fclose (f) != 0; ; @@ -5418,27 +5348,26 @@ printf "%s\n" "$ac_try_echo"; } >&5 if test "$cross_compiling" = maybe; then cross_compiling=yes else - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot run C compiled programs. -If you meant to cross compile, use '--target'. -See 'config.log' for more details" "$LINENO" 5; } +If you meant to cross compile, use \`--target'. +See \`config.log' for more details" "$LINENO" 5; } fi fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 printf "%s\n" "$cross_compiling" >&6; } -rm -f conftest.$ac_ext conftest$ac_cv_exeext \ - conftest.o conftest.obj conftest.out +rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 printf %s "checking for suffix of object files... " >&6; } if test ${ac_cv_objext+y} then : printf %s "(cached) " >&6 -else case e in #( - e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -5470,18 +5399,16 @@ then : break;; esac done -else case e in #( - e) printf "%s\n" "$as_me: failed program was:" >&5 +else $as_nop + printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} +{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile -See 'config.log' for more details" "$LINENO" 5; } ;; -esac +See \`config.log' for more details" "$LINENO" 5; } fi -rm -f conftest.$ac_cv_objext conftest.$ac_ext ;; -esac +rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 printf "%s\n" "$ac_cv_objext" >&6; } @@ -5492,8 +5419,8 @@ printf %s "checking whether the compiler supports GNU C... " >&6; } if test ${ac_cv_c_compiler_gnu+y} then : printf %s "(cached) " >&6 -else case e in #( - e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -5510,14 +5437,12 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_compiler_gnu=yes -else case e in #( - e) ac_compiler_gnu=no ;; -esac +else $as_nop + ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu - ;; -esac + fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; } @@ -5535,8 +5460,8 @@ printf %s "checking whether $CC accepts -g... " >&6; } if test ${ac_cv_prog_cc_g+y} then : printf %s "(cached) " >&6 -else case e in #( - e) ac_save_c_werror_flag=$ac_c_werror_flag +else $as_nop + ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" @@ -5554,8 +5479,8 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_g=yes -else case e in #( - e) CFLAGS="" +else $as_nop + CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -5570,8 +5495,8 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : -else case e in #( - e) ac_c_werror_flag=$ac_save_c_werror_flag +else $as_nop + ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -5588,15 +5513,12 @@ if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_g=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; -esac +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; -esac +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag ;; -esac + ac_c_werror_flag=$ac_save_c_werror_flag fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 printf "%s\n" "$ac_cv_prog_cc_g" >&6; } @@ -5623,8 +5545,8 @@ printf %s "checking for $CC option to enable C11 features... " >&6; } if test ${ac_cv_prog_cc_c11+y} then : printf %s "(cached) " >&6 -else case e in #( - e) ac_cv_prog_cc_c11=no +else $as_nop + ac_cv_prog_cc_c11=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -5641,28 +5563,25 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c11" != "xno" && break done rm -f conftest.$ac_ext -CC=$ac_save_CC ;; -esac +CC=$ac_save_CC fi if test "x$ac_cv_prog_cc_c11" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } -else case e in #( - e) if test "x$ac_cv_prog_cc_c11" = x +else $as_nop + if test "x$ac_cv_prog_cc_c11" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } -else case e in #( - e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5 +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5 printf "%s\n" "$ac_cv_prog_cc_c11" >&6; } - CC="$CC $ac_cv_prog_cc_c11" ;; -esac + CC="$CC $ac_cv_prog_cc_c11" fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11 - ac_prog_cc_stdc=c11 ;; -esac + ac_prog_cc_stdc=c11 fi fi if test x$ac_prog_cc_stdc = xno @@ -5672,8 +5591,8 @@ printf %s "checking for $CC option to enable C99 features... " >&6; } if test ${ac_cv_prog_cc_c99+y} then : printf %s "(cached) " >&6 -else case e in #( - e) ac_cv_prog_cc_c99=no +else $as_nop + ac_cv_prog_cc_c99=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -5690,28 +5609,25 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c99" != "xno" && break done rm -f conftest.$ac_ext -CC=$ac_save_CC ;; -esac +CC=$ac_save_CC fi if test "x$ac_cv_prog_cc_c99" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } -else case e in #( - e) if test "x$ac_cv_prog_cc_c99" = x +else $as_nop + if test "x$ac_cv_prog_cc_c99" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } -else case e in #( - e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 printf "%s\n" "$ac_cv_prog_cc_c99" >&6; } - CC="$CC $ac_cv_prog_cc_c99" ;; -esac + CC="$CC $ac_cv_prog_cc_c99" fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 - ac_prog_cc_stdc=c99 ;; -esac + ac_prog_cc_stdc=c99 fi fi if test x$ac_prog_cc_stdc = xno @@ -5721,8 +5637,8 @@ printf %s "checking for $CC option to enable C89 features... " >&6; } if test ${ac_cv_prog_cc_c89+y} then : printf %s "(cached) " >&6 -else case e in #( - e) ac_cv_prog_cc_c89=no +else $as_nop + ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -5739,28 +5655,25 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext -CC=$ac_save_CC ;; -esac +CC=$ac_save_CC fi if test "x$ac_cv_prog_cc_c89" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } -else case e in #( - e) if test "x$ac_cv_prog_cc_c89" = x +else $as_nop + if test "x$ac_cv_prog_cc_c89" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } -else case e in #( - e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 printf "%s\n" "$ac_cv_prog_cc_c89" >&6; } - CC="$CC $ac_cv_prog_cc_c89" ;; -esac + CC="$CC $ac_cv_prog_cc_c89" fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 - ac_prog_cc_stdc=c89 ;; -esac + ac_prog_cc_stdc=c89 fi fi @@ -5775,8 +5688,8 @@ printf %s "checking for a sed that does not truncate output... " >&6; } if test ${ac_cv_path_SED+y} then : printf %s "(cached) " >&6 -else case e in #( - e) ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ +else $as_nop + ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" done @@ -5801,10 +5714,9 @@ do as_fn_executable_p "$ac_path_SED" || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED -case `"$ac_path_SED" --version 2>&1` in #( +case `"$ac_path_SED" --version 2>&1` in *GNU*) ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; -#( *) ac_count=0 printf %s 0123456789 >"conftest.in" @@ -5839,8 +5751,7 @@ IFS=$as_save_IFS else ac_cv_path_SED=$SED fi - ;; -esac + fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 printf "%s\n" "$ac_cv_path_SED" >&6; } @@ -5865,8 +5776,8 @@ printf %s "checking for grep that handles long lines and -e... " >&6; } if test ${ac_cv_path_GREP+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if test -z "$GREP"; then +else $as_nop + if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -5885,10 +5796,9 @@ do as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP -case `"$ac_path_GREP" --version 2>&1` in #( +case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; -#( *) ac_count=0 printf %s 0123456789 >"conftest.in" @@ -5923,8 +5833,7 @@ IFS=$as_save_IFS else ac_cv_path_GREP=$GREP fi - ;; -esac + fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 printf "%s\n" "$ac_cv_path_GREP" >&6; } @@ -5936,8 +5845,8 @@ printf %s "checking for egrep... " >&6; } if test ${ac_cv_path_EGREP+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 +else $as_nop + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then @@ -5959,10 +5868,9 @@ do as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP -case `"$ac_path_EGREP" --version 2>&1` in #( +case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; -#( *) ac_count=0 printf %s 0123456789 >"conftest.in" @@ -5998,23 +5906,20 @@ else ac_cv_path_EGREP=$EGREP fi - fi ;; -esac + fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 printf "%s\n" "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" - EGREP_TRADITIONAL=$EGREP - ac_cv_path_EGREP_TRADITIONAL=$EGREP { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 printf %s "checking for fgrep... " >&6; } if test ${ac_cv_path_FGREP+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 +else $as_nop + if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 then ac_cv_path_FGREP="$GREP -F" else if test -z "$FGREP"; then @@ -6036,10 +5941,9 @@ do as_fn_executable_p "$ac_path_FGREP" || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP -case `"$ac_path_FGREP" --version 2>&1` in #( +case `"$ac_path_FGREP" --version 2>&1` in *GNU*) ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; -#( *) ac_count=0 printf %s 0123456789 >"conftest.in" @@ -6075,8 +5979,7 @@ else ac_cv_path_FGREP=$FGREP fi - fi ;; -esac + fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 printf "%s\n" "$ac_cv_path_FGREP" >&6; } @@ -6107,9 +6010,8 @@ test -z "$GREP" && GREP=grep if test ${with_gnu_ld+y} then : withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes -else case e in #( - e) with_gnu_ld=no ;; -esac +else $as_nop + with_gnu_ld=no fi ac_prog=ld @@ -6154,8 +6056,8 @@ fi if test ${lt_cv_path_LD+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if test -z "$LD"; then +else $as_nop + if test -z "$LD"; then lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS=$lt_save_ifs @@ -6178,8 +6080,7 @@ else case e in #( IFS=$lt_save_ifs else lt_cv_path_LD=$LD # Let the user override the test with a path. -fi ;; -esac +fi fi LD=$lt_cv_path_LD @@ -6196,8 +6097,8 @@ printf %s "checking if the linker ($LD) is GNU ld... " >&6; } if test ${lt_cv_prog_gnu_ld+y} then : printf %s "(cached) " >&6 -else case e in #( - e) # I'd rather use --version here, but apparently some GNU lds only accept -v. +else $as_nop + # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &1 &5 @@ -6225,8 +6125,8 @@ printf %s "checking for BSD- or MS-compatible name lister (nm)... " >&6; } if test ${lt_cv_path_NM+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$NM"; then +else $as_nop + if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM=$NM else @@ -6273,8 +6173,7 @@ else IFS=$lt_save_ifs done : ${lt_cv_path_NM=no} -fi ;; -esac +fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 printf "%s\n" "$lt_cv_path_NM" >&6; } @@ -6295,8 +6194,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_DUMPBIN+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$DUMPBIN"; then +else $as_nop + if test -n "$DUMPBIN"; then ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -6318,8 +6217,7 @@ done done IFS=$as_save_IFS -fi ;; -esac +fi fi DUMPBIN=$ac_cv_prog_DUMPBIN if test -n "$DUMPBIN"; then @@ -6345,8 +6243,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_DUMPBIN+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$ac_ct_DUMPBIN"; then +else $as_nop + if test -n "$ac_ct_DUMPBIN"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -6368,8 +6266,7 @@ done done IFS=$as_save_IFS -fi ;; -esac +fi fi ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN if test -n "$ac_ct_DUMPBIN"; then @@ -6423,8 +6320,8 @@ printf %s "checking the name lister ($NM) interface... " >&6; } if test ${lt_cv_nm_interface+y} then : printf %s "(cached) " >&6 -else case e in #( - e) lt_cv_nm_interface="BSD nm" +else $as_nop + lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) @@ -6437,8 +6334,7 @@ else case e in #( if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi - rm -f conftest* ;; -esac + rm -f conftest* fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 printf "%s\n" "$lt_cv_nm_interface" >&6; } @@ -6460,8 +6356,8 @@ printf %s "checking the maximum length of command line arguments... " >&6; } if test ${lt_cv_sys_max_cmd_len+y} then : printf %s "(cached) " >&6 -else case e in #( - e) i=0 +else $as_nop + i=0 teststring=ABCD case $build_os in @@ -6583,8 +6479,7 @@ else case e in #( fi ;; esac - ;; -esac + fi if test -n "$lt_cv_sys_max_cmd_len"; then @@ -6641,8 +6536,8 @@ printf %s "checking how to convert $build file names to $target format... " >&6; if test ${lt_cv_to_host_file_cmd+y} then : printf %s "(cached) " >&6 -else case e in #( - e) case $target in +else $as_nop + case $target in *-*-mingw* ) case $build in *-*-mingw* | *-*-windows* ) # actually msys @@ -6673,8 +6568,7 @@ else case e in #( lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac - ;; -esac + fi to_host_file_cmd=$lt_cv_to_host_file_cmd @@ -6690,8 +6584,8 @@ printf %s "checking how to convert $build file names to toolchain format... " >& if test ${lt_cv_to_tool_file_cmd+y} then : printf %s "(cached) " >&6 -else case e in #( - e) #assume ordinary cross tools, or native build. +else $as_nop + #assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $target in *-*-mingw* | *-*-windows* ) @@ -6702,8 +6596,7 @@ case $target in esac ;; esac - ;; -esac + fi to_tool_file_cmd=$lt_cv_to_tool_file_cmd @@ -6719,9 +6612,8 @@ printf %s "checking for $LD option to reload object files... " >&6; } if test ${lt_cv_ld_reload_flag+y} then : printf %s "(cached) " >&6 -else case e in #( - e) lt_cv_ld_reload_flag='-r' ;; -esac +else $as_nop + lt_cv_ld_reload_flag='-r' fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 printf "%s\n" "$lt_cv_ld_reload_flag" >&6; } @@ -6761,8 +6653,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_FILECMD+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$FILECMD"; then +else $as_nop + if test -n "$FILECMD"; then ac_cv_prog_FILECMD="$FILECMD" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -6785,8 +6677,7 @@ done IFS=$as_save_IFS test -z "$ac_cv_prog_FILECMD" && ac_cv_prog_FILECMD=":" -fi ;; -esac +fi fi FILECMD=$ac_cv_prog_FILECMD if test -n "$FILECMD"; then @@ -6812,8 +6703,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_OBJDUMP+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$OBJDUMP"; then +else $as_nop + if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -6835,8 +6726,7 @@ done done IFS=$as_save_IFS -fi ;; -esac +fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then @@ -6858,8 +6748,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_OBJDUMP+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$ac_ct_OBJDUMP"; then +else $as_nop + if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -6881,8 +6771,7 @@ done done IFS=$as_save_IFS -fi ;; -esac +fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then @@ -6923,8 +6812,8 @@ printf %s "checking how to recognize dependent libraries... " >&6; } if test ${lt_cv_deplibs_check_method+y} then : printf %s "(cached) " >&6 -else case e in #( - e) lt_cv_file_magic_cmd='$MAGIC_CMD' +else $as_nop + lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support @@ -7124,8 +7013,7 @@ os2*) lt_cv_deplibs_check_method=pass_all ;; esac - ;; -esac + fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 printf "%s\n" "$lt_cv_deplibs_check_method" >&6; } @@ -7177,8 +7065,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_DLLTOOL+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$DLLTOOL"; then +else $as_nop + if test -n "$DLLTOOL"; then ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -7200,8 +7088,7 @@ done done IFS=$as_save_IFS -fi ;; -esac +fi fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then @@ -7223,8 +7110,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_DLLTOOL+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$ac_ct_DLLTOOL"; then +else $as_nop + if test -n "$ac_ct_DLLTOOL"; then ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -7246,8 +7133,7 @@ done done IFS=$as_save_IFS -fi ;; -esac +fi fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then @@ -7289,8 +7175,8 @@ printf %s "checking how to associate runtime and link libraries... " >&6; } if test ${lt_cv_sharedlib_from_linklib_cmd+y} then : printf %s "(cached) " >&6 -else case e in #( - e) lt_cv_sharedlib_from_linklib_cmd='unknown' +else $as_nop + lt_cv_sharedlib_from_linklib_cmd='unknown' case $target_os in cygwin* | mingw* | windows* | pw32* | cegcc*) @@ -7310,8 +7196,7 @@ cygwin* | mingw* | windows* | pw32* | cegcc*) lt_cv_sharedlib_from_linklib_cmd=$ECHO ;; esac - ;; -esac + fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 printf "%s\n" "$lt_cv_sharedlib_from_linklib_cmd" >&6; } @@ -7333,8 +7218,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_RANLIB+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$RANLIB"; then +else $as_nop + if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -7356,8 +7241,7 @@ done done IFS=$as_save_IFS -fi ;; -esac +fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then @@ -7379,8 +7263,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_RANLIB+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$ac_ct_RANLIB"; then +else $as_nop + if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -7402,8 +7286,7 @@ done done IFS=$as_save_IFS -fi ;; -esac +fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then @@ -7439,8 +7322,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_AR+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$AR"; then +else $as_nop + if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -7462,8 +7345,7 @@ done done IFS=$as_save_IFS -fi ;; -esac +fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then @@ -7489,8 +7371,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_AR+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$ac_ct_AR"; then +else $as_nop + if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -7512,8 +7394,7 @@ done done IFS=$as_save_IFS -fi ;; -esac +fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then @@ -7575,8 +7456,8 @@ printf %s "checking for archiver @FILE support... " >&6; } if test ${lt_cv_ar_at_file+y} then : printf %s "(cached) " >&6 -else case e in #( - e) lt_cv_ar_at_file=no +else $as_nop + lt_cv_ar_at_file=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -7613,8 +7494,7 @@ then : fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - ;; -esac + fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 printf "%s\n" "$lt_cv_ar_at_file" >&6; } @@ -7639,8 +7519,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_STRIP+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$STRIP"; then +else $as_nop + if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -7662,8 +7542,7 @@ done done IFS=$as_save_IFS -fi ;; -esac +fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then @@ -7685,8 +7564,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_STRIP+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$ac_ct_STRIP"; then +else $as_nop + if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -7708,8 +7587,7 @@ done done IFS=$as_save_IFS -fi ;; -esac +fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then @@ -7796,8 +7674,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_AWK+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$AWK"; then +else $as_nop + if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -7819,8 +7697,7 @@ done done IFS=$as_save_IFS -fi ;; -esac +fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then @@ -7869,8 +7746,8 @@ printf %s "checking command to parse $NM output from $compiler object... " >&6; if test ${lt_cv_sys_global_symbol_pipe+y} then : printf %s "(cached) " >&6 -else case e in #( - e) +else $as_nop + # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] @@ -8122,8 +7999,7 @@ _LT_EOF lt_cv_sys_global_symbol_pipe= fi done - ;; -esac + fi if test -z "$lt_cv_sys_global_symbol_pipe"; then @@ -8187,9 +8063,8 @@ printf %s "checking for sysroot... " >&6; } if test ${with_sysroot+y} then : withval=$with_sysroot; -else case e in #( - e) with_sysroot=no ;; -esac +else $as_nop + with_sysroot=no fi @@ -8226,8 +8101,8 @@ printf %s "checking for a working dd... " >&6; } if test ${ac_cv_path_lt_DD+y} then : printf %s "(cached) " >&6 -else case e in #( - e) printf 0123456789abcdef0123456789abcdef >conftest.i +else $as_nop + printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i : ${lt_DD:=$DD} if test -z "$lt_DD"; then @@ -8263,8 +8138,7 @@ else ac_cv_path_lt_DD=$lt_DD fi -rm -f conftest.i conftest2.i conftest.out ;; -esac +rm -f conftest.i conftest2.i conftest.out fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5 printf "%s\n" "$ac_cv_path_lt_DD" >&6; } @@ -8275,8 +8149,8 @@ printf %s "checking how to truncate binary pipes... " >&6; } if test ${lt_cv_truncate_bin+y} then : printf %s "(cached) " >&6 -else case e in #( - e) printf 0123456789abcdef0123456789abcdef >conftest.i +else $as_nop + printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i lt_cv_truncate_bin= if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then @@ -8284,8 +8158,7 @@ if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; the && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" fi rm -f conftest.i conftest2.i conftest.out -test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q" ;; -esac +test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q" fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5 printf "%s\n" "$lt_cv_truncate_bin" >&6; } @@ -8495,8 +8368,8 @@ printf %s "checking whether the C compiler needs -belf... " >&6; } if test ${lt_cv_cc_needs_belf+y} then : printf %s "(cached) " >&6 -else case e in #( - e) ac_ext=c +else $as_nop + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' @@ -8516,9 +8389,8 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : lt_cv_cc_needs_belf=yes -else case e in #( - e) lt_cv_cc_needs_belf=no ;; -esac +else $as_nop + lt_cv_cc_needs_belf=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext @@ -8527,8 +8399,7 @@ ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu - ;; -esac + fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 printf "%s\n" "$lt_cv_cc_needs_belf" >&6; } @@ -8586,8 +8457,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_MANIFEST_TOOL+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$MANIFEST_TOOL"; then +else $as_nop + if test -n "$MANIFEST_TOOL"; then ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -8609,8 +8480,7 @@ done done IFS=$as_save_IFS -fi ;; -esac +fi fi MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL if test -n "$MANIFEST_TOOL"; then @@ -8632,8 +8502,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_MANIFEST_TOOL+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$ac_ct_MANIFEST_TOOL"; then +else $as_nop + if test -n "$ac_ct_MANIFEST_TOOL"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -8655,8 +8525,7 @@ done done IFS=$as_save_IFS -fi ;; -esac +fi fi ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL if test -n "$ac_ct_MANIFEST_TOOL"; then @@ -8688,16 +8557,15 @@ printf %s "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } if test ${lt_cv_path_manifest_tool+y} then : printf %s "(cached) " >&6 -else case e in #( - e) lt_cv_path_manifest_tool=no +else $as_nop + lt_cv_path_manifest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&5 if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_manifest_tool=yes fi - rm -f conftest* ;; -esac + rm -f conftest* fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_manifest_tool" >&5 printf "%s\n" "$lt_cv_path_manifest_tool" >&6; } @@ -8720,8 +8588,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_DSYMUTIL+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$DSYMUTIL"; then +else $as_nop + if test -n "$DSYMUTIL"; then ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -8743,8 +8611,7 @@ done done IFS=$as_save_IFS -fi ;; -esac +fi fi DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then @@ -8766,8 +8633,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_DSYMUTIL+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$ac_ct_DSYMUTIL"; then +else $as_nop + if test -n "$ac_ct_DSYMUTIL"; then ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -8789,8 +8656,7 @@ done done IFS=$as_save_IFS -fi ;; -esac +fi fi ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL if test -n "$ac_ct_DSYMUTIL"; then @@ -8824,8 +8690,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_NMEDIT+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$NMEDIT"; then +else $as_nop + if test -n "$NMEDIT"; then ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -8847,8 +8713,7 @@ done done IFS=$as_save_IFS -fi ;; -esac +fi fi NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then @@ -8870,8 +8735,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_NMEDIT+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$ac_ct_NMEDIT"; then +else $as_nop + if test -n "$ac_ct_NMEDIT"; then ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -8893,8 +8758,7 @@ done done IFS=$as_save_IFS -fi ;; -esac +fi fi ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then @@ -8928,8 +8792,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_LIPO+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$LIPO"; then +else $as_nop + if test -n "$LIPO"; then ac_cv_prog_LIPO="$LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -8951,8 +8815,7 @@ done done IFS=$as_save_IFS -fi ;; -esac +fi fi LIPO=$ac_cv_prog_LIPO if test -n "$LIPO"; then @@ -8974,8 +8837,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_LIPO+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$ac_ct_LIPO"; then +else $as_nop + if test -n "$ac_ct_LIPO"; then ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -8997,8 +8860,7 @@ done done IFS=$as_save_IFS -fi ;; -esac +fi fi ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO if test -n "$ac_ct_LIPO"; then @@ -9032,8 +8894,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_OTOOL+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$OTOOL"; then +else $as_nop + if test -n "$OTOOL"; then ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -9055,8 +8917,7 @@ done done IFS=$as_save_IFS -fi ;; -esac +fi fi OTOOL=$ac_cv_prog_OTOOL if test -n "$OTOOL"; then @@ -9078,8 +8939,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_OTOOL+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$ac_ct_OTOOL"; then +else $as_nop + if test -n "$ac_ct_OTOOL"; then ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -9101,8 +8962,7 @@ done done IFS=$as_save_IFS -fi ;; -esac +fi fi ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL if test -n "$ac_ct_OTOOL"; then @@ -9136,8 +8996,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_OTOOL64+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$OTOOL64"; then +else $as_nop + if test -n "$OTOOL64"; then ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -9159,8 +9019,7 @@ done done IFS=$as_save_IFS -fi ;; -esac +fi fi OTOOL64=$ac_cv_prog_OTOOL64 if test -n "$OTOOL64"; then @@ -9182,8 +9041,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_OTOOL64+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$ac_ct_OTOOL64"; then +else $as_nop + if test -n "$ac_ct_OTOOL64"; then ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -9205,8 +9064,7 @@ done done IFS=$as_save_IFS -fi ;; -esac +fi fi ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 if test -n "$ac_ct_OTOOL64"; then @@ -9263,8 +9121,8 @@ printf %s "checking for -single_module linker flag... " >&6; } if test ${lt_cv_apple_cc_single_mod+y} then : printf %s "(cached) " >&6 -else case e in #( - e) lt_cv_apple_cc_single_mod=no +else $as_nop + lt_cv_apple_cc_single_mod=no if test -z "$LT_MULTI_MODULE"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE @@ -9290,8 +9148,7 @@ else case e in #( fi rm -rf libconftest.dylib* rm -f conftest.* - fi ;; -esac + fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 printf "%s\n" "$lt_cv_apple_cc_single_mod" >&6; } @@ -9303,8 +9160,8 @@ printf %s "checking for -no_fixup_chains linker flag... " >&6; } if test ${lt_cv_support_no_fixup_chains+y} then : printf %s "(cached) " >&6 -else case e in #( - e) save_LDFLAGS=$LDFLAGS +else $as_nop + save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -Wl,-no_fixup_chains" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -9320,17 +9177,15 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : lt_cv_support_no_fixup_chains=yes -else case e in #( - e) lt_cv_support_no_fixup_chains=no - ;; -esac +else $as_nop + lt_cv_support_no_fixup_chains=no + fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS - ;; -esac + fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_support_no_fixup_chains" >&5 printf "%s\n" "$lt_cv_support_no_fixup_chains" >&6; } @@ -9340,8 +9195,8 @@ printf %s "checking for -exported_symbols_list linker flag... " >&6; } if test ${lt_cv_ld_exported_symbols_list+y} then : printf %s "(cached) " >&6 -else case e in #( - e) lt_cv_ld_exported_symbols_list=no +else $as_nop + lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" @@ -9359,15 +9214,13 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : lt_cv_ld_exported_symbols_list=yes -else case e in #( - e) lt_cv_ld_exported_symbols_list=no ;; -esac +else $as_nop + lt_cv_ld_exported_symbols_list=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS - ;; -esac + fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 printf "%s\n" "$lt_cv_ld_exported_symbols_list" >&6; } @@ -9377,8 +9230,8 @@ printf %s "checking for -force_load linker flag... " >&6; } if test ${lt_cv_ld_force_load+y} then : printf %s "(cached) " >&6 -else case e in #( - e) lt_cv_ld_force_load=no +else $as_nop + lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF @@ -9403,8 +9256,7 @@ _LT_EOF fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM - ;; -esac + fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 printf "%s\n" "$lt_cv_ld_force_load" >&6; } @@ -9563,9 +9415,8 @@ then : IFS=$lt_save_ifs ;; esac -else case e in #( - e) enable_shared=yes ;; -esac +else $as_nop + enable_shared=yes fi @@ -9596,9 +9447,8 @@ then : IFS=$lt_save_ifs ;; esac -else case e in #( - e) enable_static=yes ;; -esac +else $as_nop + enable_static=yes fi @@ -9628,8 +9478,8 @@ then : IFS=$lt_save_ifs ;; esac -else case e in #( - e) # Check whether --with-pic was given. +else $as_nop + # Check whether --with-pic was given. if test ${with_pic+y} then : withval=$with_pic; lt_p=${PACKAGE-default} @@ -9648,13 +9498,11 @@ then : IFS=$lt_save_ifs ;; esac -else case e in #( - e) pic_mode=default ;; -esac +else $as_nop + pic_mode=default fi - ;; -esac + fi @@ -9684,9 +9532,8 @@ then : IFS=$lt_save_ifs ;; esac -else case e in #( - e) enable_fast_install=yes ;; -esac +else $as_nop + enable_fast_install=yes fi @@ -9712,8 +9559,8 @@ then : ;; esac lt_cv_with_aix_soname=$enable_aix_soname -else case e in #( - e) # Check whether --with-aix-soname was given. +else $as_nop + # Check whether --with-aix-soname was given. if test ${with_aix_soname+y} then : withval=$with_aix_soname; case $withval in @@ -9724,20 +9571,17 @@ then : ;; esac lt_cv_with_aix_soname=$with_aix_soname -else case e in #( - e) if test ${lt_cv_with_aix_soname+y} +else $as_nop + if test ${lt_cv_with_aix_soname+y} then : printf %s "(cached) " >&6 -else case e in #( - e) lt_cv_with_aix_soname=aix ;; -esac +else $as_nop + lt_cv_with_aix_soname=aix fi - ;; -esac + fi - enable_aix_soname=$lt_cv_with_aix_soname ;; -esac + enable_aix_soname=$lt_cv_with_aix_soname fi with_aix_soname=$enable_aix_soname @@ -9829,8 +9673,8 @@ printf %s "checking for objdir... " >&6; } if test ${lt_cv_objdir+y} then : printf %s "(cached) " >&6 -else case e in #( - e) rm -f .libs 2>/dev/null +else $as_nop + rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs @@ -9838,8 +9682,7 @@ else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi -rmdir .libs 2>/dev/null ;; -esac +rmdir .libs 2>/dev/null fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 printf "%s\n" "$lt_cv_objdir" >&6; } @@ -9900,8 +9743,8 @@ printf %s "checking for ${ac_tool_prefix}file... " >&6; } if test ${lt_cv_path_MAGIC_CMD+y} then : printf %s "(cached) " >&6 -else case e in #( - e) case $MAGIC_CMD in +else $as_nop + case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. ;; @@ -9944,7 +9787,6 @@ _LT_EOF IFS=$lt_save_ifs MAGIC_CMD=$lt_save_MAGIC_CMD ;; -esac ;; esac fi @@ -9968,8 +9810,8 @@ printf %s "checking for file... " >&6; } if test ${lt_cv_path_MAGIC_CMD+y} then : printf %s "(cached) " >&6 -else case e in #( - e) case $MAGIC_CMD in +else $as_nop + case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. ;; @@ -10012,7 +9854,6 @@ _LT_EOF IFS=$lt_save_ifs MAGIC_CMD=$lt_save_MAGIC_CMD ;; -esac ;; esac fi @@ -10112,8 +9953,8 @@ printf %s "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } if test ${lt_cv_prog_compiler_rtti_exceptions+y} then : printf %s "(cached) " >&6 -else case e in #( - e) lt_cv_prog_compiler_rtti_exceptions=no +else $as_nop + lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" ## exclude from sc_useless_quotes_in_assignment @@ -10141,8 +9982,7 @@ else case e in #( fi fi $RM conftest* - ;; -esac + fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 printf "%s\n" "$lt_cv_prog_compiler_rtti_exceptions" >&6; } @@ -10522,9 +10362,8 @@ printf %s "checking for $compiler option to produce PIC... " >&6; } if test ${lt_cv_prog_compiler_pic+y} then : printf %s "(cached) " >&6 -else case e in #( - e) lt_cv_prog_compiler_pic=$lt_prog_compiler_pic ;; -esac +else $as_nop + lt_cv_prog_compiler_pic=$lt_prog_compiler_pic fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 printf "%s\n" "$lt_cv_prog_compiler_pic" >&6; } @@ -10539,8 +10378,8 @@ printf %s "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; if test ${lt_cv_prog_compiler_pic_works+y} then : printf %s "(cached) " >&6 -else case e in #( - e) lt_cv_prog_compiler_pic_works=no +else $as_nop + lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic -DPIC" ## exclude from sc_useless_quotes_in_assignment @@ -10568,8 +10407,7 @@ else case e in #( fi fi $RM conftest* - ;; -esac + fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 printf "%s\n" "$lt_cv_prog_compiler_pic_works" >&6; } @@ -10605,8 +10443,8 @@ printf %s "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; if test ${lt_cv_prog_compiler_static_works+y} then : printf %s "(cached) " >&6 -else case e in #( - e) lt_cv_prog_compiler_static_works=no +else $as_nop + lt_cv_prog_compiler_static_works=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext @@ -10627,8 +10465,7 @@ else case e in #( fi $RM -r conftest* LDFLAGS=$save_LDFLAGS - ;; -esac + fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 printf "%s\n" "$lt_cv_prog_compiler_static_works" >&6; } @@ -10650,8 +10487,8 @@ printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if test ${lt_cv_prog_compiler_c_o+y} then : printf %s "(cached) " >&6 -else case e in #( - e) lt_cv_prog_compiler_c_o=no +else $as_nop + lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest @@ -10691,8 +10528,7 @@ else case e in #( cd .. $RM -r conftest $RM conftest* - ;; -esac + fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; } @@ -10707,8 +10543,8 @@ printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if test ${lt_cv_prog_compiler_c_o+y} then : printf %s "(cached) " >&6 -else case e in #( - e) lt_cv_prog_compiler_c_o=no +else $as_nop + lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest @@ -10748,8 +10584,7 @@ else case e in #( cd .. $RM -r conftest $RM conftest* - ;; -esac + fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; } @@ -11348,8 +11183,8 @@ else if test ${lt_cv_aix_libpath_+y} then : printf %s "(cached) " >&6 -else case e in #( - e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -11381,8 +11216,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam \ if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=/usr/lib:/lib fi - ;; -esac + fi aix_libpath=$lt_cv_aix_libpath_ @@ -11404,8 +11238,8 @@ else if test ${lt_cv_aix_libpath_+y} then : printf %s "(cached) " >&6 -else case e in #( - e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -11437,8 +11271,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam \ if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=/usr/lib:/lib fi - ;; -esac + fi aix_libpath=$lt_cv_aix_libpath_ @@ -11689,8 +11522,8 @@ printf %s "checking if $CC understands -b... " >&6; } if test ${lt_cv_prog_compiler__b+y} then : printf %s "(cached) " >&6 -else case e in #( - e) lt_cv_prog_compiler__b=no +else $as_nop + lt_cv_prog_compiler__b=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -b" echo "$lt_simple_link_test_code" > conftest.$ac_ext @@ -11711,8 +11544,7 @@ else case e in #( fi $RM -r conftest* LDFLAGS=$save_LDFLAGS - ;; -esac + fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 printf "%s\n" "$lt_cv_prog_compiler__b" >&6; } @@ -11760,8 +11592,8 @@ printf %s "checking whether the $target_os linker accepts -exported_symbol... " if test ${lt_cv_irix_exported_symbol+y} then : printf %s "(cached) " >&6 -else case e in #( - e) save_LDFLAGS=$LDFLAGS +else $as_nop + save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -11770,14 +11602,12 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : lt_cv_irix_exported_symbol=yes -else case e in #( - e) lt_cv_irix_exported_symbol=no ;; -esac +else $as_nop + lt_cv_irix_exported_symbol=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS ;; -esac + LDFLAGS=$save_LDFLAGS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 printf "%s\n" "$lt_cv_irix_exported_symbol" >&6; } @@ -12110,8 +11940,8 @@ printf %s "checking whether -lc should be explicitly linked in... " >&6; } if test ${lt_cv_archive_cmds_need_lc+y} then : printf %s "(cached) " >&6 -else case e in #( - e) $RM conftest* +else $as_nop + $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 @@ -12147,8 +11977,7 @@ else case e in #( cat conftest.err 1>&5 fi $RM conftest* - ;; -esac + fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 printf "%s\n" "$lt_cv_archive_cmds_need_lc" >&6; } @@ -12729,9 +12558,8 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : shlibpath_var=LD_LIBRARY_PATH -else case e in #( - e) shlibpath_var=LD_32_LIBRARY_PATH ;; -esac +else $as_nop + shlibpath_var=LD_32_LIBRARY_PATH fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; @@ -12912,8 +12740,8 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) if test ${lt_cv_shlibpath_overrides_runpath+y} then : printf %s "(cached) " >&6 -else case e in #( - e) lt_cv_shlibpath_overrides_runpath=no +else $as_nop + lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ @@ -12940,8 +12768,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir - ;; -esac + fi shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath @@ -13570,9 +13397,8 @@ printf %s "checking for $compiler option to produce PIC... " >&6; } if test ${lt_cv_prog_compiler_pic+y} then : printf %s "(cached) " >&6 -else case e in #( - e) lt_cv_prog_compiler_pic=$lt_prog_compiler_pic ;; -esac +else $as_nop + lt_cv_prog_compiler_pic=$lt_prog_compiler_pic fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 printf "%s\n" "$lt_cv_prog_compiler_pic" >&6; } @@ -13587,8 +13413,8 @@ printf %s "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; if test ${lt_cv_prog_compiler_pic_works+y} then : printf %s "(cached) " >&6 -else case e in #( - e) lt_cv_prog_compiler_pic_works=no +else $as_nop + lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic -DPIC" ## exclude from sc_useless_quotes_in_assignment @@ -13616,8 +13442,7 @@ else case e in #( fi fi $RM conftest* - ;; -esac + fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 printf "%s\n" "$lt_cv_prog_compiler_pic_works" >&6; } @@ -13647,8 +13472,8 @@ printf %s "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; if test ${lt_cv_prog_compiler_static_works+y} then : printf %s "(cached) " >&6 -else case e in #( - e) lt_cv_prog_compiler_static_works=no +else $as_nop + lt_cv_prog_compiler_static_works=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext @@ -13669,8 +13494,7 @@ else case e in #( fi $RM -r conftest* LDFLAGS=$save_LDFLAGS - ;; -esac + fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 printf "%s\n" "$lt_cv_prog_compiler_static_works" >&6; } @@ -13891,22 +13715,16 @@ printf %s "checking for dlopen in -ldl... " >&6; } if test ${ac_cv_lib_dl_dlopen+y} then : printf %s "(cached) " >&6 -else case e in #( - e) ac_check_lib_save_LIBS=$LIBS +else $as_nop + ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. - The 'extern "C"' is for builds by C++ compilers; - although this is not generally supported in C code supporting it here - has little cost and some practical benefit (sr 110532). */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (void); + builtin and then its argument prototype would still apply. */ +char dlopen (); int main (void) { @@ -13918,27 +13736,24 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_dl_dlopen=yes -else case e in #( - e) ac_cv_lib_dl_dlopen=no ;; -esac +else $as_nop + ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS ;; -esac +LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl -else case e in #( - e) +else $as_nop + lt_cv_dlopen=dyld lt_cv_dlopen_libs= lt_cv_dlopen_self=yes - ;; -esac + fi ;; @@ -13956,28 +13771,22 @@ fi if test "x$ac_cv_func_shl_load" = xyes then : lt_cv_dlopen=shl_load -else case e in #( - e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 printf %s "checking for shl_load in -ldld... " >&6; } if test ${ac_cv_lib_dld_shl_load+y} then : printf %s "(cached) " >&6 -else case e in #( - e) ac_check_lib_save_LIBS=$LIBS +else $as_nop + ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. - The 'extern "C"' is for builds by C++ compilers; - although this is not generally supported in C code supporting it here - has little cost and some practical benefit (sr 110532). */ -#ifdef __cplusplus -extern "C" -#endif -char shl_load (void); + builtin and then its argument prototype would still apply. */ +char shl_load (); int main (void) { @@ -13989,47 +13798,39 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_dld_shl_load=yes -else case e in #( - e) ac_cv_lib_dld_shl_load=no ;; -esac +else $as_nop + ac_cv_lib_dld_shl_load=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS ;; -esac +LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 printf "%s\n" "$ac_cv_lib_dld_shl_load" >&6; } if test "x$ac_cv_lib_dld_shl_load" = xyes then : lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld -else case e in #( - e) ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" +else $as_nop + ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" if test "x$ac_cv_func_dlopen" = xyes then : lt_cv_dlopen=dlopen -else case e in #( - e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 printf %s "checking for dlopen in -ldl... " >&6; } if test ${ac_cv_lib_dl_dlopen+y} then : printf %s "(cached) " >&6 -else case e in #( - e) ac_check_lib_save_LIBS=$LIBS +else $as_nop + ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. - The 'extern "C"' is for builds by C++ compilers; - although this is not generally supported in C code supporting it here - has little cost and some practical benefit (sr 110532). */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (void); + builtin and then its argument prototype would still apply. */ +char dlopen (); int main (void) { @@ -14041,42 +13842,34 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_dl_dlopen=yes -else case e in #( - e) ac_cv_lib_dl_dlopen=no ;; -esac +else $as_nop + ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS ;; -esac +LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl -else case e in #( - e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 printf %s "checking for dlopen in -lsvld... " >&6; } if test ${ac_cv_lib_svld_dlopen+y} then : printf %s "(cached) " >&6 -else case e in #( - e) ac_check_lib_save_LIBS=$LIBS +else $as_nop + ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. - The 'extern "C"' is for builds by C++ compilers; - although this is not generally supported in C code supporting it here - has little cost and some practical benefit (sr 110532). */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (void); + builtin and then its argument prototype would still apply. */ +char dlopen (); int main (void) { @@ -14088,42 +13881,34 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_svld_dlopen=yes -else case e in #( - e) ac_cv_lib_svld_dlopen=no ;; -esac +else $as_nop + ac_cv_lib_svld_dlopen=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS ;; -esac +LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 printf "%s\n" "$ac_cv_lib_svld_dlopen" >&6; } if test "x$ac_cv_lib_svld_dlopen" = xyes then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld -else case e in #( - e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 printf %s "checking for dld_link in -ldld... " >&6; } if test ${ac_cv_lib_dld_dld_link+y} then : printf %s "(cached) " >&6 -else case e in #( - e) ac_check_lib_save_LIBS=$LIBS +else $as_nop + ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. - The 'extern "C"' is for builds by C++ compilers; - although this is not generally supported in C code supporting it here - has little cost and some practical benefit (sr 110532). */ -#ifdef __cplusplus -extern "C" -#endif -char dld_link (void); + builtin and then its argument prototype would still apply. */ +char dld_link (); int main (void) { @@ -14135,14 +13920,12 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_dld_dld_link=yes -else case e in #( - e) ac_cv_lib_dld_dld_link=no ;; -esac +else $as_nop + ac_cv_lib_dld_dld_link=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS ;; -esac +LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 printf "%s\n" "$ac_cv_lib_dld_dld_link" >&6; } @@ -14151,24 +13934,19 @@ then : lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld fi - ;; -esac + fi - ;; -esac + fi - ;; -esac + fi - ;; -esac + fi - ;; -esac + fi ;; @@ -14196,8 +13974,8 @@ printf %s "checking whether a program can dlopen itself... " >&6; } if test ${lt_cv_dlopen_self+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if test yes = "$cross_compiling"; then : +else $as_nop + if test yes = "$cross_compiling"; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 @@ -14291,8 +14069,7 @@ _LT_EOF fi rm -fr conftest* - ;; -esac + fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 printf "%s\n" "$lt_cv_dlopen_self" >&6; } @@ -14304,8 +14081,8 @@ printf %s "checking whether a statically linked program can dlopen itself... " > if test ${lt_cv_dlopen_self_static+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if test yes = "$cross_compiling"; then : +else $as_nop + if test yes = "$cross_compiling"; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 @@ -14399,8 +14176,7 @@ _LT_EOF fi rm -fr conftest* - ;; -esac + fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 printf "%s\n" "$lt_cv_dlopen_self_static" >&6; } @@ -14574,8 +14350,8 @@ printf %s "checking if $CC generates a .note.GNU-stack section... " >&6; } if test ${ocaml_cv_prog_cc_nonexecstack_note+y} then : printf %s "(cached) " >&6 -else case e in #( - e) +else $as_nop + saved_CC="$CC" saved_CFLAGS="$CFLAGS" saved_CPPFLAGS="$CPPFLAGS" @@ -14614,8 +14390,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext CFLAGS="$saved_CFLAGS" CC="$saved_CC" LIBS="$saved_LIBS" - ;; -esac + fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ocaml_cv_prog_cc_nonexecstack_note" >&5 printf "%s\n" "$ocaml_cv_prog_cc_nonexecstack_note" >&6; } @@ -14625,9 +14400,8 @@ then : with_nonexecstack_note=true printf "%s\n" "#define WITH_NONEXECSTACK_NOTE 1" >>confdefs.h -else case e in #( - e) with_nonexecstack_note=false ;; -esac +else $as_nop + with_nonexecstack_note=false fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC generates .size and .type asm directives" >&5 @@ -14635,8 +14409,8 @@ printf %s "checking if $CC generates .size and .type asm directives... " >&6; } if test ${ocaml_cv_prog_cc_asm_size_type_directives+y} then : printf %s "(cached) " >&6 -else case e in #( - e) +else $as_nop + saved_CC="$CC" saved_CFLAGS="$CFLAGS" saved_CPPFLAGS="$CPPFLAGS" @@ -14702,8 +14476,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext CFLAGS="$saved_CFLAGS" CC="$saved_CC" LIBS="$saved_LIBS" - ;; -esac + fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ocaml_cv_prog_cc_asm_size_type_directives" >&5 printf "%s\n" "$ocaml_cv_prog_cc_asm_size_type_directives" >&6; } @@ -14736,8 +14509,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_DEP_CC+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$DEP_CC"; then +else $as_nop + if test -n "$DEP_CC"; then ac_cv_prog_DEP_CC="$DEP_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -14759,8 +14532,7 @@ done done IFS=$as_save_IFS -fi ;; -esac +fi fi DEP_CC=$ac_cv_prog_DEP_CC if test -n "$DEP_CC"; then @@ -14786,8 +14558,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_DEP_CC+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$ac_ct_DEP_CC"; then +else $as_nop + if test -n "$ac_ct_DEP_CC"; then ac_cv_prog_ac_ct_DEP_CC="$ac_ct_DEP_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -14809,8 +14581,7 @@ done done IFS=$as_save_IFS -fi ;; -esac +fi fi ac_ct_DEP_CC=$ac_cv_prog_ac_ct_DEP_CC if test -n "$ac_ct_DEP_CC"; then @@ -14847,9 +14618,8 @@ case $enable_dependency_generation in #( if test "$DEP_CC" = "false" then : as_fn_error $? "The MSVC ports cannot generate dependency information. Install gcc (or another CC-like compiler)" "$LINENO" 5 -else case e in #( - e) compute_deps=true ;; -esac +else $as_nop + compute_deps=true fi ;; #( no) : compute_deps=false ;; #( @@ -14859,13 +14629,11 @@ then : if test "$DEP_CC" = "false" then : compute_deps=false -else case e in #( - e) compute_deps=true ;; -esac +else $as_nop + compute_deps=true fi -else case e in #( - e) compute_deps=false ;; -esac +else $as_nop + compute_deps=false fi ;; esac @@ -14884,9 +14652,8 @@ case $target in #( if test "$target_cpu" = "x86_64" then : machine="-machine:AMD64 " -else case e in #( - e) machine="" ;; -esac +else $as_nop + machine="" fi mklib="link -lib -nologo $machine /out:\$(1) \$(2)" ;; #( @@ -14912,8 +14679,8 @@ if test -z "$CPP"; then if test ${ac_cv_prog_CPP+y} then : printf %s "(cached) " >&6 -else case e in #( - e) # Double quotes because $CC needs to be expanded +else $as_nop + # Double quotes because $CC needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp do ac_preproc_ok=false @@ -14931,10 +14698,9 @@ _ACEOF if ac_fn_c_try_cpp "$LINENO" then : -else case e in #( - e) # Broken: fails on valid input. -continue ;; -esac +else $as_nop + # Broken: fails on valid input. +continue fi rm -f conftest.err conftest.i conftest.$ac_ext @@ -14948,16 +14714,15 @@ if ac_fn_c_try_cpp "$LINENO" then : # Broken: success on invalid input. continue -else case e in #( - e) # Passes both tests. +else $as_nop + # Passes both tests. ac_preproc_ok=: -break ;; -esac +break fi rm -f conftest.err conftest.i conftest.$ac_ext done -# Because of 'break', _AC_PREPROC_IFELSE's cleaning code was skipped. +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok then : @@ -14966,8 +14731,7 @@ fi done ac_cv_prog_CPP=$CPP - ;; -esac + fi CPP=$ac_cv_prog_CPP else @@ -14990,10 +14754,9 @@ _ACEOF if ac_fn_c_try_cpp "$LINENO" then : -else case e in #( - e) # Broken: fails on valid input. -continue ;; -esac +else $as_nop + # Broken: fails on valid input. +continue fi rm -f conftest.err conftest.i conftest.$ac_ext @@ -15007,26 +14770,24 @@ if ac_fn_c_try_cpp "$LINENO" then : # Broken: success on invalid input. continue -else case e in #( - e) # Passes both tests. +else $as_nop + # Passes both tests. ac_preproc_ok=: -break ;; -esac +break fi rm -f conftest.err conftest.i conftest.$ac_ext done -# Because of 'break', _AC_PREPROC_IFELSE's cleaning code was skipped. +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok then : -else case e in #( - e) { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} +else $as_nop + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check -See 'config.log' for more details" "$LINENO" 5; } ;; -esac +See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c @@ -15077,21 +14838,19 @@ then : if test ${ocaml_cv_cc_vendor2+y} then : printf %s "(cached) " >&6 -else case e in #( - e) ocaml_cv_cc_vendor2=`sed -e '/^#/d' conftest.i | tr -s '[:space:]' '-' \ - | sed -e 's/^-//' -e 's/-$//'` ;; -esac +else $as_nop + ocaml_cv_cc_vendor2=`sed -e '/^#/d' conftest.i | tr -s '[:space:]' '-' \ + | sed -e 's/^-//' -e 's/-$//'` fi # Domain of values was changed in #12768, so the cache key became different # from the variable ocaml_cc_vendor="$ocaml_cv_cc_vendor2" -else case e in #( - e) { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} +else $as_nop + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "unexpected preprocessor failure -See 'config.log' for more details" "$LINENO" 5; } ;; -esac +See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.err conftest.i conftest.$ac_ext { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ocaml_cc_vendor" >&5 @@ -15110,8 +14869,8 @@ then : # autoconf displays a warning if this parameter is missing, but # cross-compilation mode was disabled above. assert=false -else case e in #( - e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -15127,15 +14886,13 @@ then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } target_runnable=true -else case e in #( - e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } - target_runnable=false ;; -esac + target_runnable=false fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext ;; -esac + conftest.$ac_objext conftest.beam conftest.$ac_ext fi cross_compiling="$old_cross_compiling" @@ -15190,10 +14947,9 @@ printf %s "checking for a workable solution for ln -sf... " >&6; } if MSYS=winsymlinks:nativestrict CYGWIN=winsymlinks:nativestrict ln -sf configure conftestLink 2>/dev/null then : ln='ln -sf' -else case e in #( - e) ln='cp -pf' - ;; -esac +else $as_nop + ln='cp -pf' + fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ln" >&5 printf "%s\n" "$ln" >&6; } @@ -15246,9 +15002,8 @@ then : ocamltest_unix_impl="real" unix_directory="otherlibs/unix" unix_library="${unix_directory}/unix" -else case e in #( - e) ocamltest_libunix="None" ;; -esac +else $as_nop + ocamltest_libunix="None" fi if test x"$enable_str_lib" != "xno" @@ -15269,8 +15024,8 @@ printf %s "checking whether #! works in shell scripts... " >&6; } if test ${ac_cv_sys_interpreter+y} then : printf %s "(cached) " >&6 -else case e in #( - e) echo '#! /bin/cat +else $as_nop + echo '#! /bin/cat exit 69 ' >conftest chmod u+x conftest @@ -15280,8 +15035,7 @@ if test $? -ne 69; then else ac_cv_sys_interpreter=no fi -rm -f conftest ;; -esac +rm -f conftest fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_interpreter" >&5 printf "%s\n" "$ac_cv_sys_interpreter" >&6; } @@ -15353,14 +15107,14 @@ esac ;; #( esac # Use -Wold-style-declaration if supported -as_CACHEVAR=`printf "%s\n" "ax_cv_check_cflags_$warn_error_flag_-Wold-style-declaration" | sed "$as_sed_sh"` +as_CACHEVAR=`printf "%s\n" "ax_cv_check_cflags_$warn_error_flag_-Wold-style-declaration" | $as_tr_sh` { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts -Wold-style-declaration" >&5 printf %s "checking whether the C compiler accepts -Wold-style-declaration... " >&6; } if eval test \${$as_CACHEVAR+y} then : printf %s "(cached) " >&6 -else case e in #( - e) +else $as_nop + ax_check_save_flags=$CFLAGS CFLAGS="$CFLAGS $warn_error_flag -Wold-style-declaration" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -15377,13 +15131,11 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : eval "$as_CACHEVAR=yes" -else case e in #( - e) eval "$as_CACHEVAR=no" ;; -esac +else $as_nop + eval "$as_CACHEVAR=no" fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - CFLAGS=$ax_check_save_flags ;; -esac + CFLAGS=$ax_check_save_flags fi eval ac_res=\$$as_CACHEVAR { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 @@ -15391,22 +15143,21 @@ printf "%s\n" "$ac_res" >&6; } if eval test \"x\$"$as_CACHEVAR"\" = x"yes" then : cc_warnings="$cc_warnings -Wold-style-declaration" -else case e in #( - e) : ;; -esac +else $as_nop + : fi # Use -Wimplicit-fallthrough if supported for flag in '-Wimplicit-fallthrough=5' '-Wimplicit-fallthrough'; do - as_CACHEVAR=`printf "%s\n" "ax_cv_check_cflags_$warn_error_flag_$flag" | sed "$as_sed_sh"` + as_CACHEVAR=`printf "%s\n" "ax_cv_check_cflags_$warn_error_flag_$flag" | $as_tr_sh` { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts $flag" >&5 printf %s "checking whether the C compiler accepts $flag... " >&6; } if eval test \${$as_CACHEVAR+y} then : printf %s "(cached) " >&6 -else case e in #( - e) +else $as_nop + ax_check_save_flags=$CFLAGS CFLAGS="$CFLAGS $warn_error_flag $flag" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -15423,13 +15174,11 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : eval "$as_CACHEVAR=yes" -else case e in #( - e) eval "$as_CACHEVAR=no" ;; -esac +else $as_nop + eval "$as_CACHEVAR=no" fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - CFLAGS=$ax_check_save_flags ;; -esac + CFLAGS=$ax_check_save_flags fi eval ac_res=\$$as_CACHEVAR { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 @@ -15437,9 +15186,8 @@ printf "%s\n" "$ac_res" >&6; } if eval test \"x\$"$as_CACHEVAR"\" = x"yes" then : cc_warnings="$cc_warnings $flag"; break -else case e in #( - e) : ;; -esac +else $as_nop + : fi done @@ -15500,14 +15248,14 @@ case $ocaml_cc_vendor in #( common_cppflags="-D_CRT_SECURE_NO_DEPRECATE" internal_cflags="$cc_warnings" internal_cppflags='-DUNICODE -D_UNICODE -D_CRT_NONSTDC_NO_WARNINGS' - as_CACHEVAR=`printf "%s\n" "ax_cv_check_cflags_$warn_error_flag_-volatileMetadata-" | sed "$as_sed_sh"` + as_CACHEVAR=`printf "%s\n" "ax_cv_check_cflags_$warn_error_flag_-volatileMetadata-" | $as_tr_sh` { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts -volatileMetadata-" >&5 printf %s "checking whether the C compiler accepts -volatileMetadata-... " >&6; } if eval test \${$as_CACHEVAR+y} then : printf %s "(cached) " >&6 -else case e in #( - e) +else $as_nop + ax_check_save_flags=$CFLAGS CFLAGS="$CFLAGS $warn_error_flag -volatileMetadata-" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -15524,13 +15272,11 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : eval "$as_CACHEVAR=yes" -else case e in #( - e) eval "$as_CACHEVAR=no" ;; -esac +else $as_nop + eval "$as_CACHEVAR=no" fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - CFLAGS=$ax_check_save_flags ;; -esac + CFLAGS=$ax_check_save_flags fi eval ac_res=\$$as_CACHEVAR { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 @@ -15538,9 +15284,8 @@ printf "%s\n" "$ac_res" >&6; } if eval test \"x\$"$as_CACHEVAR"\" = x"yes" then : internal_cflags="$internal_cflags -volatileMetadata-" -else case e in #( - e) : ;; -esac +else $as_nop + : fi internal_cppflags="$internal_cppflags -DWINDOWS_UNICODE=$windows_unicode" ;; #( @@ -15592,9 +15337,8 @@ then : *) : ;; esac -else case e in #( - e) supports_shared_libraries=true ;; -esac +else $as_nop + supports_shared_libraries=true fi # Define flexlink chain and flags correctly for the different Windows ports @@ -15632,8 +15376,8 @@ then : flexdll_source_dir='' { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: disabled" >&5 printf "%s\n" "disabled" >&6; } -else case e in #( - e) flexmsg='' +else $as_nop + flexmsg='' case $target in #( *-*-cygwin|*-w64-mingw32*|*-pc-windows) : if test x"$with_flexdll" = 'x' || test x"$with_flexdll" = 'xflexdll' @@ -15641,41 +15385,37 @@ then : if test -f 'flexdll/flexdll.h' then : flexdll_source_dir=flexdll -else case e in #( - e) if test x"$with_flexdll" != 'x' +else $as_nop + if test x"$with_flexdll" != 'x' then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: requested but not available" >&5 printf "%s\n" "requested but not available" >&6; } as_fn_error $? "exiting" "$LINENO" 5 -fi ;; -esac fi -else case e in #( - e) rm -rf flexdll-sources +fi +else $as_nop + rm -rf flexdll-sources if test -f "$with_flexdll/flexdll.h" then : mkdir -p flexdll-sources cp -r "$with_flexdll"/* flexdll-sources/ flexdll_source_dir='flexdll-sources' flexmsg=" (from $with_flexdll)" -else case e in #( - e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: requested but not available" >&5 +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: requested but not available" >&5 printf "%s\n" "requested but not available" >&6; } - as_fn_error $? "exiting" "$LINENO" 5 ;; -esac -fi ;; -esac + as_fn_error $? "exiting" "$LINENO" 5 +fi fi if test x"$flexdll_source_dir" = 'x' then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } -else case e in #( - e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $flexdll_source_dir$flexmsg" >&5 +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $flexdll_source_dir$flexmsg" >&5 printf "%s\n" "$flexdll_source_dir$flexmsg" >&6; } bootstrapping_flexdll=true - flexdll_dir=\"+flexdll\" ;; -esac + flexdll_dir=\"+flexdll\" fi ;; #( *) : if test x"$with_flexdll" != 'x' @@ -15684,7 +15424,6 @@ then : printf "%s\n" "requested but not supported" >&6; } as_fn_error $? "exiting" "$LINENO" 5 fi ;; -esac ;; esac fi @@ -15697,8 +15436,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_flexlink+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$flexlink"; then +else $as_nop + if test -n "$flexlink"; then ac_cv_prog_flexlink="$flexlink" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -15720,8 +15459,7 @@ done done IFS=$as_save_IFS -fi ;; -esac +fi fi flexlink=$ac_cv_prog_flexlink if test -n "$flexlink"; then @@ -15793,19 +15531,17 @@ if ac_fn_c_try_link "$LINENO" then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } -else case e in #( - e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } - as_fn_error $? "$flexlink does not work" "$LINENO" 5 ;; -esac + as_fn_error $? "$flexlink does not work" "$LINENO" 5 fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -else case e in #( - e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unexpected compile error" >&5 +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unexpected compile error" >&5 printf "%s\n" "unexpected compile error" >&6; } - as_fn_error $? "error calling the C compiler" "$LINENO" 5 ;; -esac + as_fn_error $? "error calling the C compiler" "$LINENO" 5 fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext @@ -15866,9 +15602,8 @@ fi if test "x$ac_cv_header_flexdll_h" = xyes then : have_flexdll_h=yes -else case e in #( - e) have_flexdll_h=no ;; -esac +else $as_nop + have_flexdll_h=no fi if test x"$have_flexdll_h" = 'xno' @@ -15930,10 +15665,9 @@ then : have_flexdll_h=yes { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } -else case e in #( - e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } ;; -esac +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -15995,11 +15729,10 @@ then : mkexe_cmd_exp="flexlink -exe -chain ${flexdll_chain} ${flexlink_flags}" mkexe_cmd="flexlink -exe -chain ${flexdll_chain} ${flexlink_flags}" mkexe_ldflags_prefix='-link ' -else case e in #( - e) mkexe_extra_flags='' +else $as_nop + mkexe_extra_flags='' oc_ldflags='-Wl,--stack,16777216' - ;; -esac + fi ostype="Cygwin" ;; #( *,*-w64-mingw32*) : @@ -16051,33 +15784,30 @@ then : SAK_BUILD='$(MKEXE_VIA_CC) $(OC_CFLAGS) $(CFLAGS) $(OC_CPPFLAGS) $(CPPFLAGS)' ;; esac SAK="\$(ROOTDIR)/runtime/sak${EXEEXT}" -else case e in #( - e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: detecting the C toolchain for build" >&5 +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: detecting the C toolchain for build" >&5 printf "%s\n" "$as_me: detecting the C toolchain for build" >&6;} ac_cv_host_exeext=$ac_cv_exeext if test ${ac_cv_build_exeext+y} then : ac_cv_exeext=$ac_cv_build_exeext -else case e in #( - e) { ac_cv_exeext=; unset ac_cv_exeext;} ;; -esac +else $as_nop + { ac_cv_exeext=; unset ac_cv_exeext;} fi ac_cv_host_objext=$ac_cv_objext if test ${ac_cv_build_objext+y} then : ac_cv_objext=$ac_cv_build_objext -else case e in #( - e) { ac_cv_objext=; unset ac_cv_objext;} ;; -esac +else $as_nop + { ac_cv_objext=; unset ac_cv_objext;} fi ac_cv_host_c_compiler_gnu=$ac_cv_c_compiler_gnu if test ${ac_cv_build_c_compiler_gnu+y} then : ac_cv_c_compiler_gnu=$ac_cv_build_c_compiler_gnu -else case e in #( - e) { ac_cv_c_compiler_gnu=; unset ac_cv_c_compiler_gnu;} ;; -esac +else $as_nop + { ac_cv_c_compiler_gnu=; unset ac_cv_c_compiler_gnu;} fi cross_compiling_build=no @@ -16110,8 +15840,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC_FOR_BUILD+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$CC_FOR_BUILD"; then +else $as_nop + if test -n "$CC_FOR_BUILD"; then ac_cv_prog_CC_FOR_BUILD="$CC_FOR_BUILD" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -16133,8 +15863,7 @@ done done IFS=$as_save_IFS -fi ;; -esac +fi fi CC_FOR_BUILD=$ac_cv_prog_CC_FOR_BUILD if test -n "$CC_FOR_BUILD"; then @@ -16156,8 +15885,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CC_FOR_BUILD+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$ac_ct_CC_FOR_BUILD"; then +else $as_nop + if test -n "$ac_ct_CC_FOR_BUILD"; then ac_cv_prog_ac_ct_CC_FOR_BUILD="$ac_ct_CC_FOR_BUILD" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -16179,8 +15908,7 @@ done done IFS=$as_save_IFS -fi ;; -esac +fi fi ac_ct_CC_FOR_BUILD=$ac_cv_prog_ac_ct_CC_FOR_BUILD if test -n "$ac_ct_CC_FOR_BUILD"; then @@ -16215,8 +15943,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC_FOR_BUILD+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$CC_FOR_BUILD"; then +else $as_nop + if test -n "$CC_FOR_BUILD"; then ac_cv_prog_CC_FOR_BUILD="$CC_FOR_BUILD" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -16238,8 +15966,7 @@ done done IFS=$as_save_IFS -fi ;; -esac +fi fi CC_FOR_BUILD=$ac_cv_prog_CC_FOR_BUILD if test -n "$CC_FOR_BUILD"; then @@ -16261,8 +15988,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC_FOR_BUILD+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$CC_FOR_BUILD"; then +else $as_nop + if test -n "$CC_FOR_BUILD"; then ac_cv_prog_CC_FOR_BUILD="$CC_FOR_BUILD" # Let the user override the test. else ac_prog_rejected=no @@ -16301,8 +16028,7 @@ if test $ac_prog_rejected = yes; then ac_cv_prog_CC_FOR_BUILD="$as_dir$ac_word${1+' '}$@" fi fi -fi ;; -esac +fi fi CC_FOR_BUILD=$ac_cv_prog_CC_FOR_BUILD if test -n "$CC_FOR_BUILD"; then @@ -16326,8 +16052,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC_FOR_BUILD+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$CC_FOR_BUILD"; then +else $as_nop + if test -n "$CC_FOR_BUILD"; then ac_cv_prog_CC_FOR_BUILD="$CC_FOR_BUILD" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -16349,8 +16075,7 @@ done done IFS=$as_save_IFS -fi ;; -esac +fi fi CC_FOR_BUILD=$ac_cv_prog_CC_FOR_BUILD if test -n "$CC_FOR_BUILD"; then @@ -16376,8 +16101,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CC_FOR_BUILD+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$ac_ct_CC_FOR_BUILD"; then +else $as_nop + if test -n "$ac_ct_CC_FOR_BUILD"; then ac_cv_prog_ac_ct_CC_FOR_BUILD="$ac_ct_CC_FOR_BUILD" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -16399,8 +16124,7 @@ done done IFS=$as_save_IFS -fi ;; -esac +fi fi ac_ct_CC_FOR_BUILD=$ac_cv_prog_ac_ct_CC_FOR_BUILD if test -n "$ac_ct_CC_FOR_BUILD"; then @@ -16438,8 +16162,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC_FOR_BUILD+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$CC_FOR_BUILD"; then +else $as_nop + if test -n "$CC_FOR_BUILD"; then ac_cv_prog_CC_FOR_BUILD="$CC_FOR_BUILD" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -16461,8 +16185,7 @@ done done IFS=$as_save_IFS -fi ;; -esac +fi fi CC_FOR_BUILD=$ac_cv_prog_CC_FOR_BUILD if test -n "$CC_FOR_BUILD"; then @@ -16484,8 +16207,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CC_FOR_BUILD+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$ac_ct_CC_FOR_BUILD"; then +else $as_nop + if test -n "$ac_ct_CC_FOR_BUILD"; then ac_cv_prog_ac_ct_CC_FOR_BUILD="$ac_ct_CC_FOR_BUILD" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -16507,8 +16230,7 @@ done done IFS=$as_save_IFS -fi ;; -esac +fi fi ac_ct_CC_FOR_BUILD=$ac_cv_prog_ac_ct_CC_FOR_BUILD if test -n "$ac_ct_CC_FOR_BUILD"; then @@ -16537,10 +16259,10 @@ fi fi -test -z "$CC_FOR_BUILD" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} +test -z "$CC_FOR_BUILD" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH -See 'config.log' for more details" "$LINENO" 5; } +See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 @@ -16572,8 +16294,8 @@ printf %s "checking whether the compiler supports GNU C... " >&6; } if test ${ac_cv_c_compiler_gnu+y} then : printf %s "(cached) " >&6 -else case e in #( - e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -16590,14 +16312,12 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_compiler_gnu=yes -else case e in #( - e) ac_compiler_gnu=no ;; -esac +else $as_nop + ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_build_objext conftest.beam conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu - ;; -esac + fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; } @@ -16615,8 +16335,8 @@ printf %s "checking whether $CC_FOR_BUILD accepts -g... " >&6; } if test ${ac_cv_build_prog_cc_g+y} then : printf %s "(cached) " >&6 -else case e in #( - e) ac_save_c_werror_flag=$ac_c_werror_flag +else $as_nop + ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_build_prog_cc_g=no CFLAGS_FOR_BUILD="-g" @@ -16634,8 +16354,8 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_build_prog_cc_g=yes -else case e in #( - e) CFLAGS_FOR_BUILD="" +else $as_nop + CFLAGS_FOR_BUILD="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -16650,8 +16370,8 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : -else case e in #( - e) ac_c_werror_flag=$ac_save_c_werror_flag +else $as_nop + ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS_FOR_BUILD="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -16668,15 +16388,12 @@ if ac_fn_c_try_compile "$LINENO" then : ac_cv_build_prog_cc_g=yes fi -rm -f core conftest.err conftest.$ac_build_objext conftest.beam conftest.$ac_ext ;; -esac +rm -f core conftest.err conftest.$ac_build_objext conftest.beam conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_build_objext conftest.beam conftest.$ac_ext ;; -esac +rm -f core conftest.err conftest.$ac_build_objext conftest.beam conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_build_objext conftest.beam conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag ;; -esac + ac_c_werror_flag=$ac_save_c_werror_flag fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build_prog_cc_g" >&5 printf "%s\n" "$ac_cv_build_prog_cc_g" >&6; } @@ -16703,8 +16420,8 @@ printf %s "checking for $CC_FOR_BUILD option to enable C11 features... " >&6; } if test ${ac_cv_build_prog_cc_c11+y} then : printf %s "(cached) " >&6 -else case e in #( - e) ac_cv_build_prog_cc_c11=no +else $as_nop + ac_cv_build_prog_cc_c11=no ac_save_CC=$CC_FOR_BUILD cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -16721,28 +16438,25 @@ rm -f core conftest.err conftest.$ac_build_objext conftest.beam test "x$ac_cv_build_prog_cc_c11" != "xno" && break done rm -f conftest.$ac_ext -CC_FOR_BUILD=$ac_save_CC ;; -esac +CC_FOR_BUILD=$ac_save_CC fi if test "x$ac_cv_build_prog_cc_c11" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } -else case e in #( - e) if test "x$ac_cv_build_prog_cc_c11" = x +else $as_nop + if test "x$ac_cv_build_prog_cc_c11" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } -else case e in #( - e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build_prog_cc_c11" >&5 +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build_prog_cc_c11" >&5 printf "%s\n" "$ac_cv_build_prog_cc_c11" >&6; } - CC_FOR_BUILD="$CC_FOR_BUILD $ac_cv_build_prog_cc_c11" ;; -esac + CC_FOR_BUILD="$CC_FOR_BUILD $ac_cv_build_prog_cc_c11" fi ac_cv_build_prog_cc_stdc=$ac_cv_build_prog_cc_c11 - ac_build_prog_cc_stdc=c11 ;; -esac + ac_build_prog_cc_stdc=c11 fi fi if test x$ac_build_prog_cc_stdc = xno @@ -16752,8 +16466,8 @@ printf %s "checking for $CC_FOR_BUILD option to enable C99 features... " >&6; } if test ${ac_cv_build_prog_cc_c99+y} then : printf %s "(cached) " >&6 -else case e in #( - e) ac_cv_build_prog_cc_c99=no +else $as_nop + ac_cv_build_prog_cc_c99=no ac_save_CC=$CC_FOR_BUILD cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -16770,28 +16484,25 @@ rm -f core conftest.err conftest.$ac_build_objext conftest.beam test "x$ac_cv_build_prog_cc_c99" != "xno" && break done rm -f conftest.$ac_ext -CC_FOR_BUILD=$ac_save_CC ;; -esac +CC_FOR_BUILD=$ac_save_CC fi if test "x$ac_cv_build_prog_cc_c99" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } -else case e in #( - e) if test "x$ac_cv_build_prog_cc_c99" = x +else $as_nop + if test "x$ac_cv_build_prog_cc_c99" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } -else case e in #( - e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build_prog_cc_c99" >&5 +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build_prog_cc_c99" >&5 printf "%s\n" "$ac_cv_build_prog_cc_c99" >&6; } - CC_FOR_BUILD="$CC_FOR_BUILD $ac_cv_build_prog_cc_c99" ;; -esac + CC_FOR_BUILD="$CC_FOR_BUILD $ac_cv_build_prog_cc_c99" fi ac_cv_build_prog_cc_stdc=$ac_cv_build_prog_cc_c99 - ac_build_prog_cc_stdc=c99 ;; -esac + ac_build_prog_cc_stdc=c99 fi fi if test x$ac_build_prog_cc_stdc = xno @@ -16801,8 +16512,8 @@ printf %s "checking for $CC_FOR_BUILD option to enable C89 features... " >&6; } if test ${ac_cv_build_prog_cc_c89+y} then : printf %s "(cached) " >&6 -else case e in #( - e) ac_cv_build_prog_cc_c89=no +else $as_nop + ac_cv_build_prog_cc_c89=no ac_save_CC=$CC_FOR_BUILD cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -16819,28 +16530,25 @@ rm -f core conftest.err conftest.$ac_build_objext conftest.beam test "x$ac_cv_build_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext -CC_FOR_BUILD=$ac_save_CC ;; -esac +CC_FOR_BUILD=$ac_save_CC fi if test "x$ac_cv_build_prog_cc_c89" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } -else case e in #( - e) if test "x$ac_cv_build_prog_cc_c89" = x +else $as_nop + if test "x$ac_cv_build_prog_cc_c89" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } -else case e in #( - e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build_prog_cc_c89" >&5 +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build_prog_cc_c89" >&5 printf "%s\n" "$ac_cv_build_prog_cc_c89" >&6; } - CC_FOR_BUILD="$CC_FOR_BUILD $ac_cv_build_prog_cc_c89" ;; -esac + CC_FOR_BUILD="$CC_FOR_BUILD $ac_cv_build_prog_cc_c89" fi ac_cv_build_prog_cc_stdc=$ac_cv_build_prog_cc_c89 - ac_build_prog_cc_stdc=c89 ;; -esac + ac_build_prog_cc_stdc=c89 fi fi @@ -16895,8 +16603,8 @@ printf "%s\n" "$ac_try_echo"; } >&5 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then : - # Autoconf-2.13 could set the ac_cv_exeext variable to 'no'. -# So ignore a value of 'no', otherwise this would lead to 'EXEEXT = no' + # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. +# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. @@ -16916,7 +16624,7 @@ do ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not - # safe: cross compilers may not add the suffix if given an '-o' + # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. @@ -16927,9 +16635,8 @@ do done test "$ac_cv_exeext" = no && ac_cv_exeext= -else case e in #( - e) ac_file='' ;; -esac +else $as_nop + ac_file='' fi if test -z "$ac_file" then : @@ -16938,14 +16645,13 @@ printf "%s\n" "no" >&6; } printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} +{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables -See 'config.log' for more details" "$LINENO" 5; } -else case e in #( - e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } ;; -esac +See \`config.log' for more details" "$LINENO" 5; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 printf %s "checking for C compiler default output file name... " >&6; } @@ -16969,10 +16675,10 @@ printf "%s\n" "$ac_try_echo"; } >&5 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then : - # If both 'conftest.exe' and 'conftest' are 'present' (well, observable) -# catch 'conftest.exe'. For instance with Cygwin, 'ls conftest' will -# work properly (i.e., refer to 'conftest.exe'), while it won't with -# 'rm'. + # If both `conftest.exe' and `conftest' are `present' (well, observable) +# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will +# work properly (i.e., refer to `conftest.exe'), while it won't with +# `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in @@ -16982,12 +16688,11 @@ for ac_file in conftest.exe conftest conftest.*; do * ) break;; esac done -else case e in #( - e) { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} +else $as_nop + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link -See 'config.log' for more details" "$LINENO" 5; } ;; -esac +See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 @@ -17003,8 +16708,6 @@ int main (void) { FILE *f = fopen ("conftest.out", "w"); - if (!f) - return 1; return ferror (f) || fclose (f) != 0; ; @@ -17044,19 +16747,18 @@ printf "%s\n" "$ac_try_echo"; } >&5 if test "$cross_compiling_build" = maybe; then cross_compiling_build=yes else - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot run C compiled programs. -If you meant to cross compile, use '--build'. -See 'config.log' for more details" "$LINENO" 5; } +If you meant to cross compile, use \`--build'. +See \`config.log' for more details" "$LINENO" 5; } fi fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling_build" >&5 printf "%s\n" "$cross_compiling_build" >&6; } -rm -f conftest.$ac_ext conftest$ac_cv_exeext \ - conftest.o conftest.obj conftest.out +rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 @@ -17064,8 +16766,8 @@ printf %s "checking for suffix of object files... " >&6; } if test ${ac_cv_objext+y} then : printf %s "(cached) " >&6 -else case e in #( - e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -17097,18 +16799,16 @@ then : break;; esac done -else case e in #( - e) printf "%s\n" "$as_me: failed program was:" >&5 +else $as_nop + printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} +{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile -See 'config.log' for more details" "$LINENO" 5; } ;; -esac +See \`config.log' for more details" "$LINENO" 5; } fi -rm -f conftest.$ac_cv_objext conftest.$ac_ext ;; -esac +rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 printf "%s\n" "$ac_cv_objext" >&6; } @@ -17130,8 +16830,8 @@ if test -z "$CPP_FOR_BUILD"; then if test ${ac_cv_build_prog_CPP+y} then : printf %s "(cached) " >&6 -else case e in #( - e) # Double quotes because $CC needs to be expanded +else $as_nop + # Double quotes because $CC needs to be expanded for CPP_FOR_BUILD in "$CC_FOR_BUILD -E" "$CC_FOR_BUILD -E -traditional-cpp" cpp /lib/cpp do ac_preproc_ok=false @@ -17149,10 +16849,9 @@ _ACEOF if ac_fn_c_try_cpp "$LINENO" then : -else case e in #( - e) # Broken: fails on valid input. -continue ;; -esac +else $as_nop + # Broken: fails on valid input. +continue fi rm -f conftest.err conftest.i conftest.$ac_ext @@ -17166,16 +16865,15 @@ if ac_fn_c_try_cpp "$LINENO" then : # Broken: success on invalid input. continue -else case e in #( - e) # Passes both tests. +else $as_nop + # Passes both tests. ac_preproc_ok=: -break ;; -esac +break fi rm -f conftest.err conftest.i conftest.$ac_ext done -# Because of 'break', _AC_PREPROC_IFELSE's cleaning code was skipped. +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok then : @@ -17184,8 +16882,7 @@ fi done ac_cv_build_prog_CPP=$CPP_FOR_BUILD - ;; -esac + fi CPP_FOR_BUILD=$ac_cv_build_prog_CPP else @@ -17208,10 +16905,9 @@ _ACEOF if ac_fn_c_try_cpp "$LINENO" then : -else case e in #( - e) # Broken: fails on valid input. -continue ;; -esac +else $as_nop + # Broken: fails on valid input. +continue fi rm -f conftest.err conftest.i conftest.$ac_ext @@ -17225,26 +16921,24 @@ if ac_fn_c_try_cpp "$LINENO" then : # Broken: success on invalid input. continue -else case e in #( - e) # Passes both tests. +else $as_nop + # Passes both tests. ac_preproc_ok=: -break ;; -esac +break fi rm -f conftest.err conftest.i conftest.$ac_ext done -# Because of 'break', _AC_PREPROC_IFELSE's cleaning code was skipped. +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok then : -else case e in #( - e) { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} +else $as_nop + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP_FOR_BUILD\" fails sanity check -See 'config.log' for more details" "$LINENO" 5; } ;; -esac +See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c @@ -17274,8 +16968,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu # Note that *-pc-windows is not supported for _build_ so we can use '-o' SAK_BUILD="$CC_FOR_BUILD $LDFLAGS_FOR_BUILD -o \$(1) \$(2) $CFLAGS_FOR_BUILD $CPPFLAGS_FOR_BUILD" - SAK="\$(ROOTDIR)/runtime/sak${BUILD_EXEEXT}" ;; -esac + SAK="\$(ROOTDIR)/runtime/sak${BUILD_EXEEXT}" fi # sak command to use to encode C literal strings @@ -17295,8 +16988,8 @@ then : winpthreads_source_dir='' { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: disabled" >&5 printf "%s\n" "disabled" >&6; } -else case e in #( - e) winpthreadmsg='' +else $as_nop + winpthreadmsg='' case $target in #( *-pc-windows) : if test x"$with_winpthreads_msvc" = 'x' || test x"$with_winpthreads_msvc" = x'winpthreads' @@ -17304,14 +16997,13 @@ then : if test -f 'winpthreads/src/winpthread_internal.h' then : winpthreads_source_dir=winpthreads -else case e in #( - e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: required but not available (uninitialized submodule?)" >&5 +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: required but not available (uninitialized submodule?)" >&5 printf "%s\n" "required but not available (uninitialized submodule?)" >&6; } - as_fn_error $? "exiting" "$LINENO" 5 ;; -esac + as_fn_error $? "exiting" "$LINENO" 5 fi -else case e in #( - e) rm -rf winpthreads-sources +else $as_nop + rm -rf winpthreads-sources if test -f "$with_winpthreads_msvc/src/winpthread_internal.h" then : mkdir -p winpthreads-sources/src winpthreads-sources/include @@ -17320,20 +17012,18 @@ then : cp "$with_winpthreads_msvc"/include/*.h winpthreads-sources/include winpthreads_source_dir='winpthreads-sources' winpthreadsmsg=" (from $with_winpthreads_msvc)" -else case e in #( - e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: requested but not available" >&5 +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: requested but not available" >&5 printf "%s\n" "requested but not available" >&6; } - as_fn_error $? "exiting" "$LINENO" 5 ;; -esac -fi ;; -esac + as_fn_error $? "exiting" "$LINENO" 5 +fi fi if test x"$winpthreads_source_dir" = 'x' then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } -else case e in #( - e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $winpthreads_source_dir$winpthreadsmsg" >&5 +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $winpthreads_source_dir$winpthreadsmsg" >&5 printf "%s\n" "$winpthreads_source_dir$winpthreadsmsg" >&6; } winpthreads_source_include_dir="$winpthreads_source_dir/include" @@ -17358,9 +17048,8 @@ fi if test "x$ac_cv_header_pthread_h" = xyes then : -else case e in #( - e) as_fn_error $? "cannot find or use pthread.h from winpthreads" "$LINENO" 5 ;; -esac +else $as_nop + as_fn_error $? "cannot find or use pthread.h from winpthreads" "$LINENO" 5 fi @@ -17374,8 +17063,7 @@ fi CC="$saved_CC" LIBS="$saved_LIBS" - ;; -esac + fi ;; #( *) : if test x"$with_winpthreads_msvc" != 'x' @@ -17383,12 +17071,10 @@ then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: requested but not supported" >&5 printf "%s\n" "requested but not supported" >&6; } as_fn_error $? "exiting" "$LINENO" 5 -else case e in #( - e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: skipping on that platform" >&5 -printf "%s\n" "skipping on that platform" >&6; } ;; -esac +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: skipping on that platform" >&5 +printf "%s\n" "skipping on that platform" >&6; } fi ;; -esac ;; esac fi @@ -17414,8 +17100,8 @@ if test -z "$INSTALL"; then if test ${ac_cv_path_install+y} then : printf %s "(cached) " >&6 -else case e in #( - e) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +else $as_nop + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS @@ -17469,8 +17155,7 @@ esac IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir - ;; -esac + fi if test ${ac_cv_path_install+y}; then INSTALL=$ac_cv_path_install @@ -17502,21 +17187,15 @@ printf %s "checking for library containing cos... " >&6; } if test ${ac_cv_search_cos+y} then : printf %s "(cached) " >&6 -else case e in #( - e) ac_func_search_save_LIBS=$LIBS +else $as_nop + ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. - The 'extern "C"' is for builds by C++ compilers; - although this is not generally supported in C code supporting it here - has little cost and some practical benefit (sr 110532). */ -#ifdef __cplusplus -extern "C" -#endif -char cos (void); + builtin and then its argument prototype would still apply. */ +char cos (); int main (void) { @@ -17547,13 +17226,11 @@ done if test ${ac_cv_search_cos+y} then : -else case e in #( - e) ac_cv_search_cos=no ;; -esac +else $as_nop + ac_cv_search_cos=no fi rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS ;; -esac +LIBS=$ac_func_search_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_cos" >&5 printf "%s\n" "$ac_cv_search_cos" >&6; } @@ -17582,16 +17259,14 @@ ac_fn_c_check_header_compile "$LINENO" "dirent.h" "ac_cv_header_dirent_h" "#incl " if test "x$ac_cv_header_dirent_h" = xyes then : - printf "%s\n" "#define HAS_DIRENT 1" >>confdefs.h + printf "%s\n" "#define HAVE_DIRENT_H 1" >>confdefs.h fi - - ac_fn_c_check_header_compile "$LINENO" "sys/select.h" "ac_cv_header_sys_select_h" "#include " if test "x$ac_cv_header_sys_select_h" = xyes then : - printf "%s\n" "#define HAS_SYS_SELECT_H 1" >>confdefs.h + printf "%s\n" "#define HAVE_SYS_SELECT_H 1" >>confdefs.h fi @@ -17601,7 +17276,7 @@ case $target in #( ac_fn_c_check_header_compile "$LINENO" "linux/futex.h" "ac_cv_header_linux_futex_h" "$ac_includes_default" if test "x$ac_cv_header_linux_futex_h" = xyes then : - printf "%s\n" "#define HAS_LINUX_FUTEX_H 1" >>confdefs.h + printf "%s\n" "#define HAVE_LINUX_FUTEX_H 1" >>confdefs.h fi ;; #( @@ -17616,11 +17291,10 @@ ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default" if test "x$ac_cv_type_off_t" = xyes then : -else case e in #( - e) +else $as_nop + printf "%s\n" "#define off_t long int" >>confdefs.h - ;; -esac + fi @@ -17630,30 +17304,28 @@ fi # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'. +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of int" >&5 printf %s "checking size of int... " >&6; } if test ${ac_cv_sizeof_int+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default" +else $as_nop + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default" then : -else case e in #( - e) if test "$ac_cv_type_int" = yes; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} +else $as_nop + if test "$ac_cv_type_int" = yes; then + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (int) -See 'config.log' for more details" "$LINENO" 5; } +See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_int=0 - fi ;; -esac + fi fi - ;; -esac + fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5 printf "%s\n" "$ac_cv_sizeof_int" >&6; } @@ -17665,30 +17337,28 @@ printf "%s\n" "#define SIZEOF_INT $ac_cv_sizeof_int" >>confdefs.h # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'. +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 printf %s "checking size of long... " >&6; } if test ${ac_cv_sizeof_long+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default" +else $as_nop + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default" then : -else case e in #( - e) if test "$ac_cv_type_long" = yes; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} +else $as_nop + if test "$ac_cv_type_long" = yes; then + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (long) -See 'config.log' for more details" "$LINENO" 5; } +See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_long=0 - fi ;; -esac + fi fi - ;; -esac + fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 printf "%s\n" "$ac_cv_sizeof_long" >&6; } @@ -17700,30 +17370,28 @@ printf "%s\n" "#define SIZEOF_LONG $ac_cv_sizeof_long" >>confdefs.h # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'. +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long *" >&5 printf %s "checking size of long *... " >&6; } if test ${ac_cv_sizeof_long_p+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long *))" "ac_cv_sizeof_long_p" "$ac_includes_default" +else $as_nop + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long *))" "ac_cv_sizeof_long_p" "$ac_includes_default" then : -else case e in #( - e) if test "$ac_cv_type_long_p" = yes; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} +else $as_nop + if test "$ac_cv_type_long_p" = yes; then + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (long *) -See 'config.log' for more details" "$LINENO" 5; } +See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_long_p=0 - fi ;; -esac + fi fi - ;; -esac + fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_p" >&5 printf "%s\n" "$ac_cv_sizeof_long_p" >&6; } @@ -17735,30 +17403,28 @@ printf "%s\n" "#define SIZEOF_LONG_P $ac_cv_sizeof_long_p" >>confdefs.h # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'. +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of short" >&5 printf %s "checking size of short... " >&6; } if test ${ac_cv_sizeof_short+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default" +else $as_nop + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default" then : -else case e in #( - e) if test "$ac_cv_type_short" = yes; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} +else $as_nop + if test "$ac_cv_type_short" = yes; then + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (short) -See 'config.log' for more details" "$LINENO" 5; } +See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_short=0 - fi ;; -esac + fi fi - ;; -esac + fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5 printf "%s\n" "$ac_cv_sizeof_short" >&6; } @@ -17770,30 +17436,28 @@ printf "%s\n" "#define SIZEOF_SHORT $ac_cv_sizeof_short" >>confdefs.h # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'. +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5 printf %s "checking size of long long... " >&6; } if test ${ac_cv_sizeof_long_long+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default" +else $as_nop + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default" then : -else case e in #( - e) if test "$ac_cv_type_long_long" = yes; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} +else $as_nop + if test "$ac_cv_type_long_long" = yes; then + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (long long) -See 'config.log' for more details" "$LINENO" 5; } +See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_long_long=0 - fi ;; -esac + fi fi - ;; -esac + fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5 printf "%s\n" "$ac_cv_sizeof_long_long" >&6; } @@ -17812,10 +17476,9 @@ then : bits=64; arch64=true printf "%s\n" "#define ARCH_SIXTYFOUR 1" >>confdefs.h -else case e in #( - e) as_fn_error $? "Neither 32 nor 64 bits architecture." "$LINENO" 5 - ;; -esac +else $as_nop + as_fn_error $? "Neither 32 nor 64 bits architecture." "$LINENO" 5 + fi if test "x$ac_cv_sizeof_int" != "x4" && test "x$ac_cv_sizeof_long" != "x4" \ @@ -17845,8 +17508,8 @@ printf %s "checking whether byte ordering is bigendian... " >&6; } if test ${ac_cv_c_bigendian+y} then : printf %s "(cached) " >&6 -else case e in #( - e) ac_cv_c_bigendian=unknown +else $as_nop + ac_cv_c_bigendian=unknown # See if we're dealing with a universal compiler. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -17892,8 +17555,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext int main (void) { -#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \\ - && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \\ +#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ + && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ && LITTLE_ENDIAN) bogus endian macros #endif @@ -17924,9 +17587,8 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_c_bigendian=yes -else case e in #( - e) ac_cv_c_bigendian=no ;; -esac +else $as_nop + ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi @@ -17970,9 +17632,8 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_c_bigendian=yes -else case e in #( - e) ac_cv_c_bigendian=no ;; -esac +else $as_nop + ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi @@ -17999,23 +17660,22 @@ unsigned short int ascii_mm[] = int use_ebcdic (int i) { return ebcdic_mm[i] + ebcdic_ii[i]; } - int - main (int argc, char **argv) - { - /* Intimidate the compiler so that it does not - optimize the arrays away. */ - char *p = argv[0]; - ascii_mm[1] = *p++; ebcdic_mm[1] = *p++; - ascii_ii[1] = *p++; ebcdic_ii[1] = *p++; - return use_ascii (argc) == use_ebcdic (*p); - } + extern int foo; + +int +main (void) +{ +return use_ascii (foo) == use_ebcdic (foo); + ; + return 0; +} _ACEOF -if ac_fn_c_try_link "$LINENO" +if ac_fn_c_try_compile "$LINENO" then : - if grep BIGenDianSyS conftest$ac_exeext >/dev/null; then + if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then ac_cv_c_bigendian=yes fi - if grep LiTTleEnDian conftest$ac_exeext >/dev/null ; then + if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then if test "$ac_cv_c_bigendian" = unknown; then ac_cv_c_bigendian=no else @@ -18024,10 +17684,9 @@ then : fi fi fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext -else case e in #( - e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int @@ -18050,17 +17709,14 @@ _ACEOF if ac_fn_c_try_run "$LINENO" then : ac_cv_c_bigendian=no -else case e in #( - e) ac_cv_c_bigendian=yes ;; -esac +else $as_nop + ac_cv_c_bigendian=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext ;; -esac + conftest.$ac_objext conftest.beam conftest.$ac_ext fi - fi ;; -esac + fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 printf "%s\n" "$ac_cv_c_bigendian" >&6; } @@ -18089,24 +17745,22 @@ printf %s "checking alignment of double... " >&6; } if test ${ac_cv_alignof_double+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_double" "$ac_includes_default +else $as_nop + if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_double" "$ac_includes_default typedef struct { char x; double y; } ac__type_alignof_;" then : -else case e in #( - e) if test "$ac_cv_type_double" = yes; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} +else $as_nop + if test "$ac_cv_type_double" = yes; then + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute alignment of double -See 'config.log' for more details" "$LINENO" 5; } +See \`config.log' for more details" "$LINENO" 5; } else ac_cv_alignof_double=0 - fi ;; -esac + fi fi - ;; -esac + fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_double" >&5 printf "%s\n" "$ac_cv_alignof_double" >&6; } @@ -18123,24 +17777,22 @@ printf %s "checking alignment of long... " >&6; } if test ${ac_cv_alignof_long+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long" "$ac_includes_default +else $as_nop + if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long" "$ac_includes_default typedef struct { char x; long y; } ac__type_alignof_;" then : -else case e in #( - e) if test "$ac_cv_type_long" = yes; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} +else $as_nop + if test "$ac_cv_type_long" = yes; then + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute alignment of long -See 'config.log' for more details" "$LINENO" 5; } +See \`config.log' for more details" "$LINENO" 5; } else ac_cv_alignof_long=0 - fi ;; -esac + fi fi - ;; -esac + fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long" >&5 printf "%s\n" "$ac_cv_alignof_long" >&6; } @@ -18157,24 +17809,22 @@ printf %s "checking alignment of long long... " >&6; } if test ${ac_cv_alignof_long_long+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long_long" "$ac_includes_default +else $as_nop + if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long_long" "$ac_includes_default typedef struct { char x; long long y; } ac__type_alignof_;" then : -else case e in #( - e) if test "$ac_cv_type_long_long" = yes; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} +else $as_nop + if test "$ac_cv_type_long_long" = yes; then + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute alignment of long long -See 'config.log' for more details" "$LINENO" 5; } +See \`config.log' for more details" "$LINENO" 5; } else ac_cv_alignof_long_long=0 - fi ;; -esac + fi fi - ;; -esac + fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long_long" >&5 printf "%s\n" "$ac_cv_alignof_long_long" >&6; } @@ -18206,15 +17856,14 @@ then : align_int64=true printf "%s\n" "#define ARCH_ALIGN_INT64 1" >>confdefs.h -else case e in #( - e) if test "x$ac_cv_sizeof_long_long" = "x8" && +else $as_nop + if test "x$ac_cv_sizeof_long_long" = "x8" && test "$ac_cv_alignof_long_long" -gt 4 then : align_int64=true printf "%s\n" "#define ARCH_ALIGN_INT64 1" >>confdefs.h -fi ;; -esac +fi fi ;; esac @@ -18251,8 +17900,8 @@ printf %s "checking for options needed to enable C11 atomic support... " >&6; } if test ${ocaml_cv_prog_cc_c11_atomic_cflags+y} then : printf %s "(cached) " >&6 -else case e in #( - e) ocaml_cv_prog_cc_c11_atomic_cflags='cannot detect' +else $as_nop + ocaml_cv_prog_cc_c11_atomic_cflags='cannot detect' for ocaml_arg in '' '-experimental:c11atomics' '-std:c11' '-std:c11 -experimental:c11atomics' ; do saved_CC="$CC" @@ -18298,9 +17947,8 @@ then : if test x"$ocaml_arg" = x then : ocaml_cv_prog_cc_c11_atomic_cflags='none needed' -else case e in #( - e) ocaml_cv_prog_cc_c11_atomic_cflags="$ocaml_arg" ;; -esac +else $as_nop + ocaml_cv_prog_cc_c11_atomic_cflags="$ocaml_arg" fi # Restore the content of confdefs.h @@ -18326,17 +17974,16 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam \ CC="$saved_CC" LIBS="$saved_LIBS" - done ;; -esac + done fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ocaml_cv_prog_cc_c11_atomic_cflags" >&5 printf "%s\n" "$ocaml_cv_prog_cc_c11_atomic_cflags" >&6; } case $ocaml_cv_prog_cc_c11_atomic_cflags in #( 'cannot detect') : - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C11 atomic support is required, use another C compiler -See 'config.log' for more details" "$LINENO" 5; } ;; #( +See \`config.log' for more details" "$LINENO" 5; } ;; #( 'none needed') : : ;; #( *) : @@ -18535,14 +18182,14 @@ fi # Try to work around the Skylake/Kaby Lake processor bug. case "$ocaml_cc_vendor,$target" in #( *gcc*,x86_64-*|*gcc*,i686-*) : - as_CACHEVAR=`printf "%s\n" "ax_cv_check_cflags_$warn_error_flag_-fno-tree-vrp" | sed "$as_sed_sh"` + as_CACHEVAR=`printf "%s\n" "ax_cv_check_cflags_$warn_error_flag_-fno-tree-vrp" | $as_tr_sh` { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts -fno-tree-vrp" >&5 printf %s "checking whether the C compiler accepts -fno-tree-vrp... " >&6; } if eval test \${$as_CACHEVAR+y} then : printf %s "(cached) " >&6 -else case e in #( - e) +else $as_nop + ax_check_save_flags=$CFLAGS CFLAGS="$CFLAGS $warn_error_flag -fno-tree-vrp" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -18559,13 +18206,11 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : eval "$as_CACHEVAR=yes" -else case e in #( - e) eval "$as_CACHEVAR=no" ;; -esac +else $as_nop + eval "$as_CACHEVAR=no" fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - CFLAGS=$ax_check_save_flags ;; -esac + CFLAGS=$ax_check_save_flags fi eval ac_res=\$$as_CACHEVAR { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 @@ -18573,9 +18218,8 @@ printf "%s\n" "$ac_res" >&6; } if eval test \"x\$"$as_CACHEVAR"\" = x"yes" then : internal_cflags="$internal_cflags -fno-tree-vrp" -else case e in #( - e) : ;; -esac +else $as_nop + : fi ;; #( *) : @@ -18589,8 +18233,8 @@ printf %s "checking whether the C compiler supports __attribute__((optimize(\"tr if test ${ocaml_cv_prog_cc_optimize_tree_vectorize+y} then : printf %s "(cached) " >&6 -else case e in #( - e) +else $as_nop + saved_CFLAGS="$CFLAGS" CFLAGS="$warn_error_flag $CFLAGS" @@ -18608,14 +18252,12 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ocaml_cv_prog_cc_optimize_tree_vectorize=yes -else case e in #( - e) ocaml_cv_prog_cc_optimize_tree_vectorize=no ;; -esac +else $as_nop + ocaml_cv_prog_cc_optimize_tree_vectorize=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext CFLAGS="$saved_CFLAGS" - ;; -esac + fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ocaml_cv_prog_cc_optimize_tree_vectorize" >&5 printf "%s\n" "$ocaml_cv_prog_cc_optimize_tree_vectorize" >&6; } @@ -18628,8 +18270,8 @@ printf %s "checking whether $CC supports the labels as values extension... " >&6 if test ${ocaml_cv_prog_cc_labels_as_values+y} then : printf %s "(cached) " >&6 -else case e in #( - e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -18649,13 +18291,11 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ocaml_cv_prog_cc_labels_as_values=yes -else case e in #( - e) ocaml_cv_prog_cc_labels_as_values=no ;; -esac +else $as_nop + ocaml_cv_prog_cc_labels_as_values=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - ;; -esac + fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ocaml_cv_prog_cc_labels_as_values" >&5 printf "%s\n" "$ocaml_cv_prog_cc_labels_as_values" >&6; } @@ -18762,9 +18402,8 @@ case $target in #( if $arch64 then : has_native_backend=yes; arch=arm64; system=linux -else case e in #( - e) arch=arm; model=armv8; system=linux ;; -esac +else $as_nop + arch=arm; model=armv8; system=linux fi ;; #( aarch64-*-freebsd*) : has_native_backend=yes; arch=arm64; system=freebsd ;; #( @@ -18819,9 +18458,8 @@ esac if $native_compiler then : default_build_target=world.opt -else case e in #( - e) default_build_target=world ;; -esac +else $as_nop + default_build_target=world fi if ! $native_compiler @@ -18832,16 +18470,14 @@ fi if $natdynlink then : cmxs="cmxs" -else case e in #( - e) cmxs="cmx" ;; -esac +else $as_nop + cmxs="cmx" fi if $natdynlink then : natdynlink_archive="dynlink.cmxa" -else case e in #( - e) natdynlink_archive="" ;; -esac +else $as_nop + natdynlink_archive="" fi case $enable_native_toplevel,$natdynlink in #( @@ -18866,8 +18502,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_DIRECT_LD+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$DIRECT_LD"; then +else $as_nop + if test -n "$DIRECT_LD"; then ac_cv_prog_DIRECT_LD="$DIRECT_LD" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -18889,8 +18525,7 @@ done done IFS=$as_save_IFS -fi ;; -esac +fi fi DIRECT_LD=$ac_cv_prog_DIRECT_LD if test -n "$DIRECT_LD"; then @@ -18912,8 +18547,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_DIRECT_LD+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$ac_ct_DIRECT_LD"; then +else $as_nop + if test -n "$ac_ct_DIRECT_LD"; then ac_cv_prog_ac_ct_DIRECT_LD="$ac_ct_DIRECT_LD" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -18936,8 +18571,7 @@ done IFS=$as_save_IFS test -z "$ac_cv_prog_ac_ct_DIRECT_LD" && ac_cv_prog_ac_ct_DIRECT_LD="false" -fi ;; -esac +fi fi ac_ct_DIRECT_LD=$ac_cv_prog_ac_ct_DIRECT_LD if test -n "$ac_ct_DIRECT_LD"; then @@ -18956,8 +18590,8 @@ else DIRECT_LD="$ac_cv_prog_DIRECT_LD" fi -else case e in #( - e) if test -n "$ac_tool_prefix"; then +else $as_nop + if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args. set dummy ${ac_tool_prefix}ld; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 @@ -18965,8 +18599,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_DIRECT_LD+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$DIRECT_LD"; then +else $as_nop + if test -n "$DIRECT_LD"; then ac_cv_prog_DIRECT_LD="$DIRECT_LD" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -18988,8 +18622,7 @@ done done IFS=$as_save_IFS -fi ;; -esac +fi fi DIRECT_LD=$ac_cv_prog_DIRECT_LD if test -n "$DIRECT_LD"; then @@ -19011,8 +18644,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_DIRECT_LD+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$ac_ct_DIRECT_LD"; then +else $as_nop + if test -n "$ac_ct_DIRECT_LD"; then ac_cv_prog_ac_ct_DIRECT_LD="$ac_ct_DIRECT_LD" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -19034,8 +18667,7 @@ done done IFS=$as_save_IFS -fi ;; -esac +fi fi ac_ct_DIRECT_LD=$ac_cv_prog_ac_ct_DIRECT_LD if test -n "$ac_ct_DIRECT_LD"; then @@ -19060,8 +18692,7 @@ esac else DIRECT_LD="$ac_cv_prog_DIRECT_LD" fi - ;; -esac + fi if test -z "$PARTIALLD" then : @@ -19074,9 +18705,8 @@ then : if $arch64 then : PACKLD_FLAGS=' -m elf64ppc' -else case e in #( - e) PACKLD_FLAGS=' -m elf32ppclinux' ;; -esac +else $as_nop + PACKLD_FLAGS=' -m elf32ppclinux' fi ;; #( *) : PACKLD_FLAGS='' ;; @@ -19093,9 +18723,8 @@ esac *) : PACKLD="$DIRECT_LD -r$PACKLD_FLAGS -o " ;; esac -else case e in #( - e) PACKLD="$PARTIALLD -o " ;; -esac +else $as_nop + PACKLD="$PARTIALLD -o " fi # Disable PIE at link time when ocamlopt does not produce position-independent @@ -19131,19 +18760,17 @@ then : toolpref="${target_alias}-" as_target="$target" as_cpu="$target_cpu" -else case e in #( - e) if test -n "$host_alias" +else $as_nop + if test -n "$host_alias" then : toolpref="${host_alias}-" as_target="$host" as_cpu="$host_cpu" -else case e in #( - e) toolpref="" +else $as_nop + toolpref="" as_target="$build" - as_cpu="$build_cpu" ;; -esac -fi ;; -esac + as_cpu="$build_cpu" +fi fi # Finding the assembler @@ -19187,9 +18814,8 @@ then : internal_cflags="$internal_cflags $sharedlib_cflags" default_aspp="$default_aspp $sharedlib_cflags" -else case e in #( - e) fpic=false ;; -esac +else $as_nop + fpic=false fi if test -z "$AS" @@ -19210,8 +18836,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_rlwrap+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$rlwrap"; then +else $as_nop + if test -n "$rlwrap"; then ac_cv_prog_rlwrap="$rlwrap" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -19233,8 +18859,7 @@ done done IFS=$as_save_IFS -fi ;; -esac +fi fi rlwrap=$ac_cv_prog_rlwrap if test -n "$rlwrap"; then @@ -19265,18 +18890,16 @@ printf "%s\n" "$as_me: checking semantics of signal handlers" >&6;} if test "x$ac_cv_func_sigaction" = xyes then : has_sigaction=true -else case e in #( - e) has_sigaction=false ;; -esac +else $as_nop + has_sigaction=false fi ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask" if test "x$ac_cv_func_sigprocmask" = xyes then : has_sigprocmask=true -else case e in #( - e) has_sigprocmask=false ;; -esac +else $as_nop + has_sigprocmask=false fi if $has_sigaction && $has_sigprocmask @@ -19285,12 +18908,11 @@ then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: POSIX signal handling found." >&5 printf "%s\n" "$as_me: POSIX signal handling found." >&6;} -else case e in #( - e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: assuming signals have the System V semantics." >&5 +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: assuming signals have the System V semantics." >&5 printf "%s\n" "$as_me: assuming signals have the System V semantics." >&6;} - ;; -esac + fi @@ -19300,17 +18922,16 @@ has_c99_float_ops=true for ac_func in expm1 log1p hypot fma exp2 log2 cbrt acosh asinh atanh erf erfc trunc round copysign do : - as_ac_var=`printf "%s\n" "ac_cv_func_$ac_func" | sed "$as_sed_sh"` + as_ac_var=`printf "%s\n" "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes" then : cat >>confdefs.h <<_ACEOF -#define `printf "%s\n" "HAVE_$ac_func" | sed "$as_sed_cpp"` 1 +#define `printf "%s\n" "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF -else case e in #( - e) has_c99_float_ops=false ;; -esac +else $as_nop + has_c99_float_ops=false fi done @@ -19327,8 +18948,8 @@ printf %s "checking whether round works... " >&6; } if test ${ocaml_cv_func_round_works+y} then : printf %s "(cached) " >&6 -else case e in #( - e) +else $as_nop + old_cross_compiling="$cross_compiling" if test "x$target_runnable" = 'xtrue' @@ -19343,8 +18964,8 @@ then : *) : ocaml_cv_func_round_works=yes-cross-compiling ;; esac -else case e in #( - e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int @@ -19361,25 +18982,22 @@ _ACEOF if ac_fn_c_try_run "$LINENO" then : ocaml_cv_func_round_works=yes -else case e in #( - e) case $enable_imprecise_c99_float_ops,$target in #( +else $as_nop + case $enable_imprecise_c99_float_ops,$target in #( no,*) : ocaml_cv_func_round_works=no-with-hard-error ;; #( yes,*|*,x86_64-w64-mingw32*) : ocaml_cv_func_round_works=no ;; #( *) : ocaml_cv_func_round_works=no-with-hard-error ;; -esac ;; esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext ;; -esac + conftest.$ac_objext conftest.beam conftest.$ac_ext fi cross_compiling="$old_cross_compiling" - ;; -esac + fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ocaml_cv_func_round_works" >&5 printf "%s\n" "$ocaml_cv_func_round_works" >&6; } @@ -19414,8 +19032,8 @@ printf %s "checking whether fma works... " >&6; } if test ${ocaml_cv_func_fma_works+y} then : printf %s "(cached) " >&6 -else case e in #( - e) +else $as_nop + old_cross_compiling="$cross_compiling" if test "x$target_runnable" = 'xtrue' @@ -19430,8 +19048,8 @@ then : *) : ocaml_cv_func_fma_works=yes-cross-compiling ;; esac -else case e in #( - e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int @@ -19471,25 +19089,22 @@ _ACEOF if ac_fn_c_try_run "$LINENO" then : ocaml_cv_func_fma_works=yes -else case e in #( - e) case $enable_imprecise_c99_float_ops,$target in #( +else $as_nop + case $enable_imprecise_c99_float_ops,$target in #( no,*) : ocaml_cv_func_fma_works=no-with-hard-error ;; #( yes,*|*,x86_64-w64-mingw32*|*,x86_64-*-cygwin*) : ocaml_cv_func_fma_works=no ;; #( *) : ocaml_cv_func_fma_works=no-with-hard-error ;; -esac ;; esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext ;; -esac + conftest.$ac_objext conftest.beam conftest.$ac_ext fi cross_compiling="$old_cross_compiling" - ;; -esac + fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ocaml_cv_func_fma_works" >&5 printf "%s\n" "$ocaml_cv_func_fma_works" >&6; } @@ -19515,12 +19130,11 @@ printf "%s\n" "cross-compiling; assume not" >&6; } ;; #( ;; esac -else case e in #( - e) if test x"$enable_imprecise_c99_float_ops" != "xyes" +else $as_nop + if test x"$enable_imprecise_c99_float_ops" != "xyes" then : as_fn_error $? "C99 float ops unavailable, enable replacements with --enable-imprecise-c99-float-ops" "$LINENO" 5 -fi ;; -esac +fi fi ## getentropy @@ -19560,15 +19174,14 @@ if test "x$ac_cv_func_secure_getenv" = xyes then : printf "%s\n" "#define HAS_SECURE_GETENV 1" >>confdefs.h -else case e in #( - e) ac_fn_c_check_func "$LINENO" "__secure_getenv" "ac_cv_func___secure_getenv" +else $as_nop + ac_fn_c_check_func "$LINENO" "__secure_getenv" "ac_cv_func___secure_getenv" if test "x$ac_cv_func___secure_getenv" = xyes then : printf "%s\n" "#define HAS___SECURE_GETENV 1" >>confdefs.h fi - ;; -esac + fi @@ -19607,9 +19220,8 @@ then : printf "%s\n" "#define HAS_CLOCK_GETTIME_NSEC_NP 1" >>confdefs.h -else case e in #( - e) has_monotonic_clock=false ;; -esac +else $as_nop + has_monotonic_clock=false fi done ;; #( @@ -19639,9 +19251,8 @@ then : printf "%s\n" "#define HAS_POSIX_MONOTONIC_CLOCK 1" >>confdefs.h -else case e in #( - e) has_monotonic_clock=false ;; -esac +else $as_nop + has_monotonic_clock=false fi rm -f conftest.err conftest.i conftest.$ac_ext @@ -19679,21 +19290,15 @@ printf %s "checking for library containing clock_gettime... " >&6; } if test ${ac_cv_search_clock_gettime+y} then : printf %s "(cached) " >&6 -else case e in #( - e) ac_func_search_save_LIBS=$LIBS +else $as_nop + ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. - The 'extern "C"' is for builds by C++ compilers; - although this is not generally supported in C code supporting it here - has little cost and some practical benefit (sr 110532). */ -#ifdef __cplusplus -extern "C" -#endif -char clock_gettime (void); + builtin and then its argument prototype would still apply. */ +char clock_gettime (); int main (void) { @@ -19724,13 +19329,11 @@ done if test ${ac_cv_search_clock_gettime+y} then : -else case e in #( - e) ac_cv_search_clock_gettime=no ;; -esac +else $as_nop + ac_cv_search_clock_gettime=no fi rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS ;; -esac +LIBS=$ac_func_search_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5 printf "%s\n" "$ac_cv_search_clock_gettime" >&6; } @@ -19739,9 +19342,8 @@ if test "$ac_res" != no then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" has_clock_gettime=true -else case e in #( - e) has_clock_gettime=false ;; -esac +else $as_nop + has_clock_gettime=false fi case $enable_instrumented_runtime,$has_clock_gettime,$has_monotonic_clock in #( @@ -19755,10 +19357,9 @@ fi if test "x$ac_cv_search_clock_gettime" = "xnone required" then : instrumented_runtime_libs="" -else case e in #( - e) instrumented_runtime_libs=$ac_cv_search_clock_gettime - ;; -esac +else $as_nop + instrumented_runtime_libs=$ac_cv_search_clock_gettime + fi ;; #( yes,false,*) : @@ -19853,9 +19454,8 @@ esac ;; #( as_fn_error $? "thread sanitizer not supported on arch $arch" "$LINENO" 5 ;; esac -else case e in #( - e) tsan=false ;; -esac +else $as_nop + tsan=false fi if $tsan @@ -19880,10 +19480,9 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : -else case e in #( - e) as_fn_error $? "libtsan is necessary for TSan but cannot be found. - Try installing it on your system." "$LINENO" 5 ;; -esac +else $as_nop + as_fn_error $? "libtsan is necessary for TSan but cannot be found. + Try installing it on your system." "$LINENO" 5 fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext @@ -19903,14 +19502,14 @@ esac *) : ;; esac - as_CACHEVAR=`printf "%s\n" "ax_cv_check_cflags_$warn_error_flag_-fsanitize=thread $tsan_distinguish_volatile_cflags" | sed "$as_sed_sh"` + as_CACHEVAR=`printf "%s\n" "ax_cv_check_cflags_$warn_error_flag_-fsanitize=thread $tsan_distinguish_volatile_cflags" | $as_tr_sh` { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts -fsanitize=thread $tsan_distinguish_volatile_cflags" >&5 printf %s "checking whether the C compiler accepts -fsanitize=thread $tsan_distinguish_volatile_cflags... " >&6; } if eval test \${$as_CACHEVAR+y} then : printf %s "(cached) " >&6 -else case e in #( - e) +else $as_nop + ax_check_save_flags=$CFLAGS CFLAGS="$CFLAGS $warn_error_flag -fsanitize=thread $tsan_distinguish_volatile_cflags" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -19927,13 +19526,11 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : eval "$as_CACHEVAR=yes" -else case e in #( - e) eval "$as_CACHEVAR=no" ;; -esac +else $as_nop + eval "$as_CACHEVAR=no" fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - CFLAGS=$ax_check_save_flags ;; -esac + CFLAGS=$ax_check_save_flags fi eval ac_res=\$$as_CACHEVAR { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 @@ -19941,9 +19538,8 @@ printf "%s\n" "$ac_res" >&6; } if eval test \"x\$"$as_CACHEVAR"\" = x"yes" then : : -else case e in #( - e) as_fn_error $? "The C compiler does not support the \`$tsan_distinguish_volatile_cflags' flag. Try upgrading to GCC >= 11, or to Clang >= 11." "$LINENO" 5 ;; -esac +else $as_nop + as_fn_error $? "The C compiler does not support the \`$tsan_distinguish_volatile_cflags' flag. Try upgrading to GCC >= 11, or to Clang >= 11." "$LINENO" 5 fi tsan_cflags="$tsan_cflags $tsan_distinguish_volatile_cflags" @@ -19952,12 +19548,11 @@ fi native_cflags="$native_cflags $tsan_cflags" native_ldflags="$native_ldflags $tsan_ldflags" tsan_native_runtime_c_sources="tsan" -else case e in #( - e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not using thread sanitizer" >&5 +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not using thread sanitizer" >&5 printf "%s\n" "$as_me: not using thread sanitizer" >&6;} tsan_native_runtime_c_sources="" - ;; -esac + fi # libunwind detection when TSan is enabled @@ -19979,9 +19574,8 @@ fi if test x"$LIBUNWIND_CPPFLAGS" != x then : libunwind_cppflags="$LIBUNWIND_CPPFLAGS" -else case e in #( - e) libunwind_cppflags="" ;; -esac +else $as_nop + libunwind_cppflags="" fi case "$system" in #( @@ -20025,9 +19619,8 @@ then : printf "%s\n" "#define HAS_LIBUNWIND 1" >>confdefs.h libunwind_available=true -else case e in #( - e) libunwind_available=false ;; -esac +else $as_nop + libunwind_available=false fi LDFLAGS="$SAVED_LDFLAGS" @@ -20067,21 +19660,15 @@ printf %s "checking for library containing socket... " >&6; } if test ${ac_cv_search_socket+y} then : printf %s "(cached) " >&6 -else case e in #( - e) ac_func_search_save_LIBS=$LIBS +else $as_nop + ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. - The 'extern "C"' is for builds by C++ compilers; - although this is not generally supported in C code supporting it here - has little cost and some practical benefit (sr 110532). */ -#ifdef __cplusplus -extern "C" -#endif -char socket (void); + builtin and then its argument prototype would still apply. */ +char socket (); int main (void) { @@ -20112,13 +19699,11 @@ done if test ${ac_cv_search_socket+y} then : -else case e in #( - e) ac_cv_search_socket=no ;; -esac +else $as_nop + ac_cv_search_socket=no fi rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS ;; -esac +LIBS=$ac_func_search_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5 printf "%s\n" "$ac_cv_search_socket" >&6; } @@ -20143,21 +19728,15 @@ printf %s "checking for library containing socket... " >&6; } if test ${ocaml_cv_search_socket+y} then : printf %s "(cached) " >&6 -else case e in #( - e) ocaml_func_search_save_LIBS=$LIBS +else $as_nop + ocaml_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. - The 'extern "C"' is for builds by C++ compilers; - although this is not generally supported in C code supporting it here - has little cost and some practical benefit (sr 110532). */ -#ifdef __cplusplus -extern "C" -#endif -char socket (void); + builtin and then its argument prototype would still apply. */ +char socket (); int main (void) { @@ -20188,13 +19767,11 @@ done if test ${ocaml_cv_search_socket+y} then : -else case e in #( - e) ocaml_cv_search_socket=no ;; -esac +else $as_nop + ocaml_cv_search_socket=no fi rm conftest.$ac_ext -LIBS=$ocaml_func_search_save_LIBS ;; -esac +LIBS=$ocaml_func_search_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ocaml_cv_search_socket" >&5 printf "%s\n" "$ocaml_cv_search_socket" >&6; } @@ -20219,21 +19796,15 @@ printf %s "checking for library containing socket... " >&6; } if test ${ac_cv_search_socket+y} then : printf %s "(cached) " >&6 -else case e in #( - e) ac_func_search_save_LIBS=$LIBS +else $as_nop + ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. - The 'extern "C"' is for builds by C++ compilers; - although this is not generally supported in C code supporting it here - has little cost and some practical benefit (sr 110532). */ -#ifdef __cplusplus -extern "C" -#endif -char socket (void); + builtin and then its argument prototype would still apply. */ +char socket (); int main (void) { @@ -20264,13 +19835,11 @@ done if test ${ac_cv_search_socket+y} then : -else case e in #( - e) ac_cv_search_socket=no ;; -esac +else $as_nop + ac_cv_search_socket=no fi rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS ;; -esac +LIBS=$ac_func_search_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5 printf "%s\n" "$ac_cv_search_socket" >&6; } @@ -20288,21 +19857,15 @@ printf %s "checking for library containing socket... " >&6; } if test ${ac_cv_search_socket+y} then : printf %s "(cached) " >&6 -else case e in #( - e) ac_func_search_save_LIBS=$LIBS +else $as_nop + ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. - The 'extern "C"' is for builds by C++ compilers; - although this is not generally supported in C code supporting it here - has little cost and some practical benefit (sr 110532). */ -#ifdef __cplusplus -extern "C" -#endif -char socket (void); + builtin and then its argument prototype would still apply. */ +char socket (); int main (void) { @@ -20333,13 +19896,11 @@ done if test ${ac_cv_search_socket+y} then : -else case e in #( - e) ac_cv_search_socket=no ;; -esac +else $as_nop + ac_cv_search_socket=no fi rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS ;; -esac +LIBS=$ac_func_search_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5 printf "%s\n" "$ac_cv_search_socket" >&6; } @@ -20355,21 +19916,15 @@ printf %s "checking for library containing inet_ntop... " >&6; } if test ${ac_cv_search_inet_ntop+y} then : printf %s "(cached) " >&6 -else case e in #( - e) ac_func_search_save_LIBS=$LIBS +else $as_nop + ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. - The 'extern "C"' is for builds by C++ compilers; - although this is not generally supported in C code supporting it here - has little cost and some practical benefit (sr 110532). */ -#ifdef __cplusplus -extern "C" -#endif -char inet_ntop (void); + builtin and then its argument prototype would still apply. */ +char inet_ntop (); int main (void) { @@ -20400,13 +19955,11 @@ done if test ${ac_cv_search_inet_ntop+y} then : -else case e in #( - e) ac_cv_search_inet_ntop=no ;; -esac +else $as_nop + ac_cv_search_inet_ntop=no fi rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS ;; -esac +LIBS=$ac_func_search_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_ntop" >&5 printf "%s\n" "$ac_cv_search_inet_ntop" >&6; } @@ -20422,17 +19975,16 @@ fi for ac_func in socket socketpair bind listen accept connect do : - as_ac_var=`printf "%s\n" "ac_cv_func_$ac_func" | sed "$as_sed_sh"` + as_ac_var=`printf "%s\n" "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes" then : cat >>confdefs.h <<_ACEOF -#define `printf "%s\n" "HAVE_$ac_func" | sed "$as_sed_cpp"` 1 +#define `printf "%s\n" "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF -else case e in #( - e) sockets=false ;; -esac +else $as_nop + sockets=false fi done @@ -20481,18 +20033,14 @@ fi case $target in #( *-w64-mingw32*|*-pc-windows) : - for ac_header in afunix.h -do : - ac_fn_c_check_header_compile "$LINENO" "afunix.h" "ac_cv_header_afunix_h" "#include + ac_fn_c_check_header_compile "$LINENO" "afunix.h" "ac_cv_header_afunix_h" "#include " if test "x$ac_cv_header_afunix_h" = xyes then : printf "%s\n" "#define HAVE_AFUNIX_H 1" >>confdefs.h - printf "%s\n" "#define HAS_AFUNIX_H 1" >>confdefs.h fi - -done ;; #( + ;; #( *) : ;; esac @@ -20508,9 +20056,8 @@ case $target in #( if test "x$ac_cv_type_struct_sockaddr_in6" = xyes then : -else case e in #( - e) ipv6=false ;; -esac +else $as_nop + ipv6=false fi ;; #( *) : @@ -20524,9 +20071,8 @@ fi if test "x$ac_cv_type_struct_sockaddr_in6" = xyes then : -else case e in #( - e) ipv6=false ;; -esac +else $as_nop + ipv6=false fi ;; @@ -20537,17 +20083,16 @@ then : for ac_func in getaddrinfo getnameinfo inet_pton inet_ntop do : - as_ac_var=`printf "%s\n" "ac_cv_func_$ac_func" | sed "$as_sed_sh"` + as_ac_var=`printf "%s\n" "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes" then : cat >>confdefs.h <<_ACEOF -#define `printf "%s\n" "HAVE_$ac_func" | sed "$as_sed_cpp"` 1 +#define `printf "%s\n" "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF -else case e in #( - e) ipv6=false ;; -esac +else $as_nop + ipv6=false fi done @@ -20718,9 +20263,8 @@ then : printf "%s\n" "#define HAS_WAITPID 1" >>confdefs.h -else case e in #( - e) wait=false ;; -esac +else $as_nop + wait=false fi @@ -20807,9 +20351,8 @@ then : printf "%s\n" "#define HAS_SETITIMER 1" >>confdefs.h -else case e in #( - e) setitimer=false ;; -esac +else $as_nop + setitimer=false fi @@ -20847,9 +20390,8 @@ then : printf "%s\n" "#define HAS_GETTIMEOFDAY 1" >>confdefs.h -else case e in #( - e) gettimeofday=false ;; -esac +else $as_nop + gettimeofday=false fi @@ -20986,28 +20528,22 @@ then : if test "x$ac_cv_func_dlopen" = xyes then : supports_shared_libraries=true DLLIBS="" -else case e in #( - e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 printf %s "checking for dlopen in -ldl... " >&6; } if test ${ac_cv_lib_dl_dlopen+y} then : printf %s "(cached) " >&6 -else case e in #( - e) ac_check_lib_save_LIBS=$LIBS +else $as_nop + ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. - The 'extern "C"' is for builds by C++ compilers; - although this is not generally supported in C code supporting it here - has little cost and some practical benefit (sr 110532). */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (void); + builtin and then its argument prototype would still apply. */ +char dlopen (); int main (void) { @@ -21019,32 +20555,27 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_dl_dlopen=yes -else case e in #( - e) ac_cv_lib_dl_dlopen=no ;; -esac +else $as_nop + ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS ;; -esac +LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes then : supports_shared_libraries=true DLLIBS="-ldl $DLLIBS" -else case e in #( - e) supports_shared_libraries=false ;; -esac +else $as_nop + supports_shared_libraries=false fi - ;; -esac + fi ;; esac -else case e in #( - e) supports_shared_libraries=false ;; -esac +else $as_nop + supports_shared_libraries=false fi if $supports_shared_libraries @@ -21053,10 +20584,9 @@ then : printf "%s\n" "$as_me: Dynamic loading of shared libraries is supported." >&6;} printf "%s\n" "#define SUPPORT_DYNAMIC_LINKING 1" >>confdefs.h -else case e in #( - e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Dynamic loading of shared libraries is not supported." >&5 -printf "%s\n" "$as_me: Dynamic loading of shared libraries is not supported." >&6;} ;; -esac +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Dynamic loading of shared libraries is not supported." >&5 +printf "%s\n" "$as_me: Dynamic loading of shared libraries is not supported." >&6;} fi ## mmap @@ -21100,14 +20630,14 @@ case $ocaml_cc_vendor,$target in #( sunc*,sparc-sun-*) : cc_has_debug_prefix_map=false ;; #( *) : - as_CACHEVAR=`printf "%s\n" "ax_cv_check_cflags_$warn_error_flag_-fdebug-prefix-map=old=new" | sed "$as_sed_sh"` + as_CACHEVAR=`printf "%s\n" "ax_cv_check_cflags_$warn_error_flag_-fdebug-prefix-map=old=new" | $as_tr_sh` { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts -fdebug-prefix-map=old=new" >&5 printf %s "checking whether the C compiler accepts -fdebug-prefix-map=old=new... " >&6; } if eval test \${$as_CACHEVAR+y} then : printf %s "(cached) " >&6 -else case e in #( - e) +else $as_nop + ax_check_save_flags=$CFLAGS CFLAGS="$CFLAGS $warn_error_flag -fdebug-prefix-map=old=new" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -21124,13 +20654,11 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : eval "$as_CACHEVAR=yes" -else case e in #( - e) eval "$as_CACHEVAR=no" ;; -esac +else $as_nop + eval "$as_CACHEVAR=no" fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - CFLAGS=$ax_check_save_flags ;; -esac + CFLAGS=$ax_check_save_flags fi eval ac_res=\$$as_CACHEVAR { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 @@ -21138,9 +20666,8 @@ printf "%s\n" "$ac_res" >&6; } if eval test \"x\$"$as_CACHEVAR"\" = x"yes" then : cc_has_debug_prefix_map=true -else case e in #( - e) cc_has_debug_prefix_map=false ;; -esac +else $as_nop + cc_has_debug_prefix_map=false fi ;; esac @@ -21186,10 +20713,9 @@ if $stat_has_ns_precision then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: stat supports nanosecond precision" >&5 printf "%s\n" "$as_me: stat supports nanosecond precision" >&6;} -else case e in #( - e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: stat does not support nanosecond precision" >&5 -printf "%s\n" "$as_me: stat does not support nanosecond precision" >&6;} ;; -esac +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: stat does not support nanosecond precision" >&5 +printf "%s\n" "$as_me: stat does not support nanosecond precision" >&6;} fi # Number of arguments of gethostbyname_r @@ -21208,8 +20734,8 @@ printf %s "checking how many arguments gethostbyname_r() takes... " >&6; } if test ${ac_cv_func_which_gethostbyname_r+y} then : printf %s "(cached) " >&6 -else case e in #( - e) +else $as_nop + ################################################################ @@ -21343,8 +20869,7 @@ fi ################################################################ - ;; -esac + fi case "$ac_cv_func_which_gethostbyname_r" in @@ -21434,8 +20959,8 @@ printf %s "checking how many arguments gethostbyaddr_r() takes... " >&6; } if test ${ac_cv_func_which_gethostbyaddr_r+y} then : printf %s "(cached) " >&6 -else case e in #( - e) +else $as_nop + ################################################################ @@ -21540,8 +21065,7 @@ fi ################################################################ - ;; -esac + fi case "$ac_cv_func_which_gethostbyaddr_r" in @@ -21721,8 +21245,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_PKG_CONFIG+y} then : printf %s "(cached) " >&6 -else case e in #( - e) case $PKG_CONFIG in +else $as_nop + case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; @@ -21747,7 +21271,6 @@ done IFS=$as_save_IFS ;; -esac ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG @@ -21770,8 +21293,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_ac_pt_PKG_CONFIG+y} then : printf %s "(cached) " >&6 -else case e in #( - e) case $ac_pt_PKG_CONFIG in +else $as_nop + case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. ;; @@ -21797,7 +21320,6 @@ IFS=$as_save_IFS test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="false" ;; -esac ;; esac fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG @@ -21817,8 +21339,8 @@ else PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi -else case e in #( - e) if test -n "$ac_tool_prefix"; then +else $as_nop + if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 @@ -21826,8 +21348,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_PKG_CONFIG+y} then : printf %s "(cached) " >&6 -else case e in #( - e) case $PKG_CONFIG in +else $as_nop + case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; @@ -21852,7 +21374,6 @@ done IFS=$as_save_IFS ;; -esac ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG @@ -21875,8 +21396,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_ac_pt_PKG_CONFIG+y} then : printf %s "(cached) " >&6 -else case e in #( - e) case $ac_pt_PKG_CONFIG in +else $as_nop + case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. ;; @@ -21901,7 +21422,6 @@ done IFS=$as_save_IFS ;; -esac ;; esac fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG @@ -21927,8 +21447,7 @@ esac else PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi - ;; -esac + fi ## ZSTD compression library @@ -21941,8 +21460,8 @@ printf %s "checking for $CC options needed to detect all undeclared functions... if test ${ac_cv_c_undeclared_builtin_options+y} then : printf %s "(cached) " >&6 -else case e in #( - e) ac_save_CFLAGS=$CFLAGS +else $as_nop + ac_save_CFLAGS=$CFLAGS ac_cv_c_undeclared_builtin_options='cannot detect' for ac_arg in '' -fno-builtin; do CFLAGS="$ac_save_CFLAGS $ac_arg" @@ -21961,8 +21480,8 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : -else case e in #( - e) # This test program should compile successfully. +else $as_nop + # This test program should compile successfully. # No library function is consistently available on # freestanding implementations, so test against a dummy # declaration. Include always-available headers on the @@ -21990,29 +21509,26 @@ then : if test x"$ac_arg" = x then : ac_cv_c_undeclared_builtin_options='none needed' -else case e in #( - e) ac_cv_c_undeclared_builtin_options=$ac_arg ;; -esac +else $as_nop + ac_cv_c_undeclared_builtin_options=$ac_arg fi break fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; -esac +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done CFLAGS=$ac_save_CFLAGS - ;; -esac + fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_undeclared_builtin_options" >&5 printf "%s\n" "$ac_cv_c_undeclared_builtin_options" >&6; } case $ac_cv_c_undeclared_builtin_options in #( 'cannot detect') : - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot make $CC report undeclared builtins -See 'config.log' for more details" "$LINENO" 5; } ;; #( +See \`config.log' for more details" "$LINENO" 5; } ;; #( 'none needed') : ac_c_undeclared_builtin_options='' ;; #( *) : @@ -22030,34 +21546,27 @@ then : zstd_libs=`${PKG_CONFIG} --libs libzstd` zstd_flags=`${PKG_CONFIG} --cflags libzstd` zstd_status="ok" -else case e in #( - e) zstd_status="zstd library too old: version 1.4 or later is needed" ;; -esac +else $as_nop + zstd_status="zstd library too old: version 1.4 or later is needed" fi -else case e in #( - e) # Otherwise, try to find zstd the old way, +else $as_nop + # Otherwise, try to find zstd the old way, # assuming it is installed in default places { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ZSTD_createCCtx in -lzstd" >&5 printf %s "checking for ZSTD_createCCtx in -lzstd... " >&6; } if test ${ac_cv_lib_zstd_ZSTD_createCCtx+y} then : printf %s "(cached) " >&6 -else case e in #( - e) ac_check_lib_save_LIBS=$LIBS +else $as_nop + ac_check_lib_save_LIBS=$LIBS LIBS="-lzstd $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. - The 'extern "C"' is for builds by C++ compilers; - although this is not generally supported in C code supporting it here - has little cost and some practical benefit (sr 110532). */ -#ifdef __cplusplus -extern "C" -#endif -char ZSTD_createCCtx (void); + builtin and then its argument prototype would still apply. */ +char ZSTD_createCCtx (); int main (void) { @@ -22069,14 +21578,12 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_zstd_ZSTD_createCCtx=yes -else case e in #( - e) ac_cv_lib_zstd_ZSTD_createCCtx=no ;; -esac +else $as_nop + ac_cv_lib_zstd_ZSTD_createCCtx=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS ;; -esac +LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_zstd_ZSTD_createCCtx" >&5 printf "%s\n" "$ac_cv_lib_zstd_ZSTD_createCCtx" >&6; } @@ -22089,16 +21596,13 @@ then : zstd_libs="-lzstd" zstd_flags="" zstd_status="ok" -else case e in #( - e) zstd_status="zstd library too old: version 1.4 or later is needed" ;; -esac +else $as_nop + zstd_status="zstd library too old: version 1.4 or later is needed" fi -else case e in #( - e) zstd_status="zstd library not found" ;; -esac +else $as_nop + zstd_status="zstd library not found" fi - ;; -esac + fi fi @@ -22153,27 +21657,24 @@ then : then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } -else case e in #( - e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } zstd_libs='' zstd_flags='' zstd_status=\ -"programs linked with zstd do not appear to be executable." ;; -esac +"programs linked with zstd do not appear to be executable." fi -else case e in #( - e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: skipped" >&5 -printf "%s\n" "skipped" >&6; } ;; -esac +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: skipped" >&5 +printf "%s\n" "skipped" >&6; } fi -else case e in #( - e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } zstd_libs='' zstd_flags='' - zstd_status="zstd found, but programs cannot be linked with it." ;; -esac + zstd_status="zstd found, but programs cannot be linked with it." fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext @@ -22196,8 +21697,8 @@ printf "%s\n" "$as_me: compressed compilation artefacts supported" >&6;} internal_cppflags="$internal_cppflags $zstd_flags" printf "%s\n" "#define HAS_ZSTD 1" >>confdefs.h -else case e in #( - e) case "$with_zstd" in #( +else $as_nop + case "$with_zstd" in #( no) : ;; #( yes) : @@ -22207,7 +21708,6 @@ else case e in #( printf "%s\n" "$as_me: WARNING: $zstd_status" >&2;} { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: compressed compilation artefacts not supported" >&5 printf "%s\n" "$as_me: WARNING: compressed compilation artefacts not supported" >&2;} ;; -esac ;; esac fi @@ -22227,12 +21727,11 @@ then : optional_bytecode_tools="$optional_bytecode_tools debugger/ocamldebug" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ocamldebug supported" >&5 printf "%s\n" "$as_me: ocamldebug supported" >&6;} -else case e in #( - e) with_debugger="" +else $as_nop + with_debugger="" build_ocamldebug=false { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ocamldebug not supported" >&5 -printf "%s\n" "$as_me: ocamldebug not supported" >&6;} ;; -esac +printf "%s\n" "$as_me: ocamldebug not supported" >&6;} fi ;; esac @@ -22255,140 +21754,6 @@ esac ## Determine how to link with the POSIX threads library -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep -e" >&5 -printf %s "checking for egrep -e... " >&6; } -if test ${ac_cv_path_EGREP_TRADITIONAL+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) if test -z "$EGREP_TRADITIONAL"; then - ac_path_EGREP_TRADITIONAL_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_prog in grep ggrep - do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP_TRADITIONAL="$as_dir$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_EGREP_TRADITIONAL" || continue -# Check for GNU ac_path_EGREP_TRADITIONAL and select it if it is found. - # Check for GNU $ac_path_EGREP_TRADITIONAL -case `"$ac_path_EGREP_TRADITIONAL" --version 2>&1` in #( -*GNU*) - ac_cv_path_EGREP_TRADITIONAL="$ac_path_EGREP_TRADITIONAL" ac_path_EGREP_TRADITIONAL_found=:;; -#( -*) - ac_count=0 - printf %s 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - printf "%s\n" 'EGREP_TRADITIONAL' >> "conftest.nl" - "$ac_path_EGREP_TRADITIONAL" -E 'EGR(EP|AC)_TRADITIONAL$' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_EGREP_TRADITIONAL_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_EGREP_TRADITIONAL="$ac_path_EGREP_TRADITIONAL" - ac_path_EGREP_TRADITIONAL_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_EGREP_TRADITIONAL_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_EGREP_TRADITIONAL"; then - : - fi -else - ac_cv_path_EGREP_TRADITIONAL=$EGREP_TRADITIONAL -fi - - if test "$ac_cv_path_EGREP_TRADITIONAL" -then : - ac_cv_path_EGREP_TRADITIONAL="$ac_cv_path_EGREP_TRADITIONAL -E" -else case e in #( - e) if test -z "$EGREP_TRADITIONAL"; then - ac_path_EGREP_TRADITIONAL_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_prog in egrep - do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP_TRADITIONAL="$as_dir$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_EGREP_TRADITIONAL" || continue -# Check for GNU ac_path_EGREP_TRADITIONAL and select it if it is found. - # Check for GNU $ac_path_EGREP_TRADITIONAL -case `"$ac_path_EGREP_TRADITIONAL" --version 2>&1` in #( -*GNU*) - ac_cv_path_EGREP_TRADITIONAL="$ac_path_EGREP_TRADITIONAL" ac_path_EGREP_TRADITIONAL_found=:;; -#( -*) - ac_count=0 - printf %s 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - printf "%s\n" 'EGREP_TRADITIONAL' >> "conftest.nl" - "$ac_path_EGREP_TRADITIONAL" 'EGR(EP|AC)_TRADITIONAL$' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_EGREP_TRADITIONAL_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_EGREP_TRADITIONAL="$ac_path_EGREP_TRADITIONAL" - ac_path_EGREP_TRADITIONAL_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_EGREP_TRADITIONAL_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_EGREP_TRADITIONAL"; then - as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_EGREP_TRADITIONAL=$EGREP_TRADITIONAL -fi - ;; -esac -fi ;; -esac -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP_TRADITIONAL" >&5 -printf "%s\n" "$ac_cv_path_EGREP_TRADITIONAL" >&6; } - EGREP_TRADITIONAL=$ac_cv_path_EGREP_TRADITIONAL - case $target in #( *-w64-mingw32*) : link_gcc_eh='' @@ -22397,22 +21762,16 @@ printf %s "checking for printf in -lgcc_eh... " >&6; } if test ${ac_cv_lib_gcc_eh_printf+y} then : printf %s "(cached) " >&6 -else case e in #( - e) ac_check_lib_save_LIBS=$LIBS +else $as_nop + ac_check_lib_save_LIBS=$LIBS LIBS="-lgcc_eh $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. - The 'extern "C"' is for builds by C++ compilers; - although this is not generally supported in C code supporting it here - has little cost and some practical benefit (sr 110532). */ -#ifdef __cplusplus -extern "C" -#endif -char printf (void); + builtin and then its argument prototype would still apply. */ +char printf (); int main (void) { @@ -22424,14 +21783,12 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_gcc_eh_printf=yes -else case e in #( - e) ac_cv_lib_gcc_eh_printf=no ;; -esac +else $as_nop + ac_cv_lib_gcc_eh_printf=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS ;; -esac +LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gcc_eh_printf" >&5 printf "%s\n" "$ac_cv_lib_gcc_eh_printf" >&6; } @@ -22484,14 +21841,8 @@ printf %s "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. - The 'extern "C"' is for builds by C++ compilers; - although this is not generally supported in C code supporting it here - has little cost and some practical benefit (sr 110532). */ -#ifdef __cplusplus -extern "C" -#endif -char pthread_join (void); + builtin and then its argument prototype would still apply. */ +char pthread_join (); int main (void) { @@ -22585,7 +21936,7 @@ case $host_os in _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP_TRADITIONAL "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1 + $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1 then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5 printf "%s\n" "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;} @@ -22615,8 +21966,8 @@ printf %s "checking whether $CC is Clang... " >&6; } if test ${ax_cv_PTHREAD_CLANG+y} then : printf %s "(cached) " >&6 -else case e in #( - e) ax_cv_PTHREAD_CLANG=no +else $as_nop + ax_cv_PTHREAD_CLANG=no # Note that Autoconf sets GCC=yes for Clang as well as GCC if test "x$GCC" = "xyes"; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -22628,15 +21979,14 @@ else case e in #( _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP_TRADITIONAL "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1 + $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1 then : ax_cv_PTHREAD_CLANG=yes fi rm -rf conftest* fi - ;; -esac + fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5 printf "%s\n" "$ax_cv_PTHREAD_CLANG" >&6; } @@ -22686,9 +22036,8 @@ esac if test "x$ax_pthread_check_macro" = "x--" then : ax_pthread_check_cond=0 -else case e in #( - e) ax_pthread_check_cond="!defined($ax_pthread_check_macro)" ;; -esac +else $as_nop + ax_pthread_check_cond="!defined($ax_pthread_check_macro)" fi @@ -22722,8 +22071,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ax_pthread_config+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$ax_pthread_config"; then +else $as_nop + if test -n "$ax_pthread_config"; then ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -22746,8 +22095,7 @@ done IFS=$as_save_IFS test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no" -fi ;; -esac +fi fi ax_pthread_config=$ac_cv_prog_ax_pthread_config if test -n "$ax_pthread_config"; then @@ -22880,8 +22228,8 @@ printf %s "checking whether Clang needs flag to prevent \"argument unused\" warn if test ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+y} then : printf %s "(cached) " >&6 -else case e in #( - e) ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown +else $as_nop + ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown # Create an alternate version of $ac_link that compiles and # links in two steps (.c -> .o, .o -> exe) instead of one # (.c -> exe), because the warning occurs only in the second @@ -22927,8 +22275,7 @@ then : ax_pthread_try=no fi ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try" - ;; -esac + fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5 printf "%s\n" "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; } @@ -22955,8 +22302,8 @@ printf %s "checking for joinable pthread attribute... " >&6; } if test ${ax_cv_PTHREAD_JOINABLE_ATTR+y} then : printf %s "(cached) " >&6 -else case e in #( - e) ax_cv_PTHREAD_JOINABLE_ATTR=unknown +else $as_nop + ax_cv_PTHREAD_JOINABLE_ATTR=unknown for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -22976,8 +22323,7 @@ fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext done - ;; -esac + fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5 printf "%s\n" "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; } @@ -22997,15 +22343,14 @@ printf %s "checking whether more special flags are required for pthreads... " >& if test ${ax_cv_PTHREAD_SPECIAL_FLAGS+y} then : printf %s "(cached) " >&6 -else case e in #( - e) ax_cv_PTHREAD_SPECIAL_FLAGS=no +else $as_nop + ax_cv_PTHREAD_SPECIAL_FLAGS=no case $host_os in solaris*) ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS" ;; esac - ;; -esac + fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5 printf "%s\n" "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; } @@ -23021,8 +22366,8 @@ printf %s "checking for PTHREAD_PRIO_INHERIT... " >&6; } if test ${ax_cv_PTHREAD_PRIO_INHERIT+y} then : printf %s "(cached) " >&6 -else case e in #( - e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int @@ -23037,14 +22382,12 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ax_cv_PTHREAD_PRIO_INHERIT=yes -else case e in #( - e) ax_cv_PTHREAD_PRIO_INHERIT=no ;; -esac +else $as_nop + ax_cv_PTHREAD_PRIO_INHERIT=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - ;; -esac + fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5 printf "%s\n" "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; } @@ -23094,8 +22437,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_PTHREAD_CC+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$PTHREAD_CC"; then +else $as_nop + if test -n "$PTHREAD_CC"; then ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -23117,8 +22460,7 @@ done done IFS=$as_save_IFS -fi ;; -esac +fi fi PTHREAD_CC=$ac_cv_prog_PTHREAD_CC if test -n "$PTHREAD_CC"; then @@ -23145,8 +22487,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_PTHREAD_CXX+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$PTHREAD_CXX"; then +else $as_nop + if test -n "$PTHREAD_CXX"; then ac_cv_prog_PTHREAD_CXX="$PTHREAD_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -23168,8 +22510,7 @@ done done IFS=$as_save_IFS -fi ;; -esac +fi fi PTHREAD_CXX=$ac_cv_prog_PTHREAD_CXX if test -n "$PTHREAD_CXX"; then @@ -23256,8 +22597,8 @@ then : printf "%s\n" "GNU" >&6; } printf "%s\n" "#define HAS_GNU_GETAFFINITY_NP 1" >>confdefs.h -else case e in #( - e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include @@ -23280,14 +22621,12 @@ then : printf "%s\n" "BSD" >&6; } printf "%s\n" "#define HAS_BSD_GETAFFINITY_NP 1" >>confdefs.h -else case e in #( - e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: pthread_getaffinity_np not found" >&5 -printf "%s\n" "pthread_getaffinity_np not found" >&6; } ;; -esac +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: pthread_getaffinity_np not found" >&5 +printf "%s\n" "pthread_getaffinity_np not found" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext ;; -esac + conftest$ac_exeext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext @@ -23393,8 +22732,8 @@ printf %s "checking whether the assembler supports --debug-prefix-map... " >&6; if test ${ocaml_cv_prog_as_debug_prefix_map+y} then : printf %s "(cached) " >&6 -else case e in #( - e) +else $as_nop + saved_CC="$CC" saved_CFLAGS="$CFLAGS" saved_CPPFLAGS="$CPPFLAGS" @@ -23425,9 +22764,8 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ocaml_cv_prog_as_debug_prefix_map=true -else case e in #( - e) ocaml_cv_prog_as_debug_prefix_map=false ;; -esac +else $as_nop + ocaml_cv_prog_as_debug_prefix_map=false fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext @@ -23440,8 +22778,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext CFLAGS="$saved_CFLAGS" CC="$saved_CC" LIBS="$saved_LIBS" - ;; -esac + fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ocaml_cv_prog_as_debug_prefix_map" >&5 printf "%s\n" "$ocaml_cv_prog_as_debug_prefix_map" >&6; } @@ -23453,12 +22790,12 @@ printf %s "checking whether the assembler supports CFI directives... " >&6; } if test ${ocaml_cv_prog_as_cfi_directives+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if test x"$enable_cfi" = "xno" +else $as_nop + if test x"$enable_cfi" = "xno" then : ocaml_cv_prog_as_cfi_directives='disabled' -else case e in #( - e) +else $as_nop + saved_CC="$CC" saved_CFLAGS="$CFLAGS" saved_CPPFLAGS="$CPPFLAGS" @@ -23492,17 +22829,16 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : aspp_ok=true -else case e in #( - e) aspp_ok=false ;; -esac +else $as_nop + aspp_ok=false fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext if test "$AS" = "$ASPP" then : as_ok="$aspp_ok" -else case e in #( - e) CC="$AS" +else $as_nop + CC="$AS" ac_compile='$CC $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -23518,12 +22854,10 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : as_ok=true -else case e in #( - e) as_ok=false ;; -esac +else $as_nop + as_ok=false fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; -esac +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi @@ -23540,19 +22874,15 @@ fi if $aspp_ok && $as_ok then : ocaml_cv_prog_as_cfi_directives='yes' -else case e in #( - e) if test x"$enable_cfi" = "xyes" +else $as_nop + if test x"$enable_cfi" = "xyes" then : ocaml_cv_prog_as_cfi_directives='requested but not available' -else case e in #( - e) ocaml_cv_prog_as_cfi_directives='no' ;; -esac -fi ;; -esac -fi ;; -esac -fi ;; -esac +else $as_nop + ocaml_cv_prog_as_cfi_directives='no' +fi +fi +fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ocaml_cv_prog_as_cfi_directives" >&5 printf "%s\n" "$ocaml_cv_prog_as_cfi_directives" >&6; } @@ -23592,11 +22922,10 @@ esac ;; #( as_fn_error $? "frame pointers not supported on this platform" "$LINENO" 5 ;; esac -else case e in #( - e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not using frame pointers" >&5 +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not using frame pointers" >&5 printf "%s\n" "$as_me: not using frame pointers" >&6;} - frame_pointers=false ;; -esac + frame_pointers=false fi ## Check for mmap support for huge pages and contiguous heap @@ -23606,12 +22935,12 @@ printf %s "checking whether mmap supports huge pages... " >&6; } if test ${ocaml_cv_func_mmap_huge_pages+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if test "$cross_compiling" = yes +else $as_nop + if test "$cross_compiling" = yes then : ocaml_cv_func_mmap_huge_pages='no assumed' -else case e in #( - e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -23659,16 +22988,13 @@ _ACEOF if ac_fn_c_try_run "$LINENO" then : ocaml_cv_func_mmap_huge_pages=yes -else case e in #( - e) ocaml_cv_func_mmap_huge_pages=no ;; -esac +else $as_nop + ocaml_cv_func_mmap_huge_pages=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext ;; -esac + conftest.$ac_objext conftest.beam conftest.$ac_ext fi - ;; -esac + fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ocaml_cv_func_mmap_huge_pages" >&5 printf "%s\n" "$ocaml_cv_func_mmap_huge_pages" >&6; } @@ -23687,25 +23013,22 @@ printf "%s\n" "#define HEADER_RESERVED_BITS $reserved_header_bits" >>confdefs.h if test x"$enable_installing_bytecode_programs" = "xno" then : install_bytecode_programs=false -else case e in #( - e) install_bytecode_programs=true ;; -esac +else $as_nop + install_bytecode_programs=true fi if test x"$enable_installing_source_artifacts" = "xno" then : install_source_artifacts=false -else case e in #( - e) install_source_artifacts=true ;; -esac +else $as_nop + install_source_artifacts=true fi if test x"$enable_stdlib_manpages" != "xno" then : build_libraries_manpages=true -else case e in #( - e) build_libraries_manpages=false ;; -esac +else $as_nop + build_libraries_manpages=false fi documentation_tool_cmd='' @@ -23722,9 +23045,8 @@ then : documentation_tool_cmd="$withval" documentation_tool='odoc' ;; esac -else case e in #( - e) documentation_tool='ocamldoc' ;; -esac +else $as_nop + documentation_tool='ocamldoc' fi if test "x$documentation_tool_cmd" = 'x' @@ -23736,9 +23058,8 @@ fi if test x"$enable_ocamlobjinfo" != 'xno' then : build_ocamlobjinfo=true -else case e in #( - e) build_ocamlobjinfo=false ;; -esac +else $as_nop + build_ocamlobjinfo=false fi case $enable_ocamltest,true in #( @@ -23769,8 +23090,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_DIFF+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$DIFF"; then +else $as_nop + if test -n "$DIFF"; then ac_cv_prog_DIFF="$DIFF" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -23792,8 +23113,7 @@ done done IFS=$as_save_IFS -fi ;; -esac +fi fi DIFF=$ac_cv_prog_DIFF if test -n "$DIFF"; then @@ -23816,14 +23136,13 @@ printf %s "checking for extra $DIFF flags... " >&6; } if test ${ocaml_cv_prog_diff_flags+y} then : printf %s "(cached) " >&6 -else case e in #( - e) flags="" +else $as_nop + flags="" for flag in -u --strip-trailing-cr; do "$DIFF" $flag /dev/zero /dev/zero >/dev/null 2>&1 && \ flags="${flags:+$flags }$flag" done - ocaml_cv_prog_diff_flags="${flags:-none needed}" ;; -esac + ocaml_cv_prog_diff_flags="${flags:-none needed}" fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ocaml_cv_prog_diff_flags" >&5 printf "%s\n" "$ocaml_cv_prog_diff_flags" >&6; } @@ -23831,10 +23150,9 @@ printf "%s\n" "$ocaml_cv_prog_diff_flags" >&6; } then : DIFF_FLAGS="" -else case e in #( - e) DIFF_FLAGS=$ocaml_cv_prog_diff_flags - ;; -esac +else $as_nop + DIFF_FLAGS=$ocaml_cv_prog_diff_flags + fi ;; #( *) : ;; @@ -23847,42 +23165,37 @@ then : if test x"$enable_flambda_invariants" = "xyes" then : flambda_invariants=true -else case e in #( - e) flambda_invariants=false ;; -esac +else $as_nop + flambda_invariants=false fi -else case e in #( - e) flambda=false - flambda_invariants=false ;; -esac +else $as_nop + flambda=false + flambda_invariants=false fi if $flambda then : CMX_MAGIC_NUMBER=Caml1999y035 CMXA_MAGIC_NUMBER=Caml1999z035 -else case e in #( - e) CMX_MAGIC_NUMBER=Caml1999Y035 - CMXA_MAGIC_NUMBER=Caml1999Z035 ;; -esac +else $as_nop + CMX_MAGIC_NUMBER=Caml1999Y035 + CMXA_MAGIC_NUMBER=Caml1999Z035 fi if test x"$enable_cmm_invariants" = "xyes" then : cmm_invariants=true -else case e in #( - e) cmm_invariants=false ;; -esac +else $as_nop + cmm_invariants=false fi if test x"$enable_flat_float_array" = "xno" then : flat_float_array=false -else case e in #( - e) printf "%s\n" "#define FLAT_FLOAT_ARRAY 1" >>confdefs.h +else $as_nop + printf "%s\n" "#define FLAT_FLOAT_ARRAY 1" >>confdefs.h - flat_float_array=true ;; -esac + flat_float_array=true fi @@ -23891,12 +23204,12 @@ printf %s "checking whether mmap supports MAP_STACK... " >&6; } if test ${ocaml_cv_func_mmap_MAP_STACK+y} then : printf %s "(cached) " >&6 -else case e in #( - e) if test "$cross_compiling" = yes +else $as_nop + if test "$cross_compiling" = yes then : ocaml_cv_func_mmap_MAP_STACK='no assumed' -else case e in #( - e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -23921,16 +23234,13 @@ _ACEOF if ac_fn_c_try_run "$LINENO" then : ocaml_cv_func_mmap_MAP_STACK=yes -else case e in #( - e) ocaml_cv_func_mmap_MAP_STACK=no ;; -esac +else $as_nop + ocaml_cv_func_mmap_MAP_STACK=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext ;; -esac + conftest.$ac_objext conftest.beam conftest.$ac_ext fi - ;; -esac + fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ocaml_cv_func_mmap_MAP_STACK" >&5 printf "%s\n" "$ocaml_cv_func_mmap_MAP_STACK" >&6; } @@ -23945,19 +23255,17 @@ then : *) : ;; esac -else case e in #( - e) as_fn_error $? "mmap MAP_STACK requested but not found on $target" "$LINENO" 5 ;; -esac +else $as_nop + as_fn_error $? "mmap MAP_STACK requested but not found on $target" "$LINENO" 5 fi -else case e in #( - e) case $target in #( +else $as_nop + case $target in #( *-openbsd*) : ocaml_cv_func_mmap_MAP_STACK=yes { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Using MAP_STACK on OpenBSD due to stack checking" >&5 printf "%s\n" "$as_me: Using MAP_STACK on OpenBSD due to stack checking" >&6;} ;; #( *) : ;; -esac ;; esac fi if test x"$ocaml_cv_func_mmap_MAP_STACK" = "xyes" @@ -23972,8 +23280,8 @@ oc_native_compflags='' if test x"$enable_function_sections" = "xno" then : function_sections=false -else case e in #( - e) case $arch in #( +else $as_nop + case $arch in #( amd64|arm64|power|riscv|s390x) : # not supported on arm32, see issue #9124. case $target in #( @@ -24017,21 +23325,18 @@ then : if test x"$enable_function_sections" = "xyes" then : as_fn_error $? "Function sections are not supported." "$LINENO" 5 -else case e in #( - e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Disabling function sections." >&5 -printf "%s\n" "$as_me: Disabling function sections." >&6;} ;; -esac +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Disabling function sections." >&5 +printf "%s\n" "$as_me: Disabling function sections." >&6;} +fi fi -fi ;; -esac fi if test x"$with_afl" = "xyes" then : afl=true -else case e in #( - e) afl=false ;; -esac +else $as_nop + afl=false fi # Enable debugging support @@ -24103,13 +23408,12 @@ then : *) : ;; esac -else case e in #( - e) case $build,$host in #( +else $as_nop + case $build,$host in #( *-*-cygwin,*-w64-mingw32*|*-*-cygwin,*-pc-windows) : prefix="$(LC_ALL=C.UTF-8 cygpath -m "$prefix")" ;; #( *) : ;; -esac ;; esac fi @@ -24159,8 +23463,8 @@ cat >confcache <<\_ACEOF # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # -# 'ac_cv_env_foo' variables (set or unset) will be overridden when -# loading this file, other *unset* 'ac_cv_foo' will be assigned the +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF @@ -24190,14 +23494,14 @@ printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) - # 'set' does not quote correctly, so add quotes: double-quote + # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) - # 'set' quotes correctly as required by POSIX, so do not add quotes. + # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | @@ -24354,8 +23658,8 @@ fi mkdll_ldflags="\$(addprefix ${mkexe_ldflags_prefix},\$(OC_DLL_LDFLAGS)) \ ${mkdll_ldflags}" -else case e in #( - e) +else $as_nop + mkdll_ldflags='$(OC_DLL_LDFLAGS) $(LDFLAGS)' mkdll_ldflags_exp="${oc_dll_ldflags}" if test -n "${LDFLAGS}" @@ -24364,8 +23668,7 @@ then : fi mkexe_ldflags="\$(OC_LDFLAGS) \$(LDFLAGS)" mkexe_ldflags_exp="${oc_ldflags} ${LDFLAGS}" - ;; -esac + fi mkexe="$mkexe $mkexe_ldflags" mkexe_exp="$mkexe_exp $mkexe_ldflags_exp" @@ -24384,10 +23687,9 @@ fi then : mkexe_via_cc_ldflags=\ "/nologo \$(OUTPUTEXE)\$(1) \$(2) $mkexe_via_cc_ldflags" -else case e in #( - e) mkexe_via_cc_ldflags=\ -"$mkexe_via_cc_ldflags \$(OUTPUTEXE)\$(1) \$(2)" ;; -esac +else $as_nop + mkexe_via_cc_ldflags=\ +"$mkexe_via_cc_ldflags \$(OUTPUTEXE)\$(1) \$(2)" fi @@ -24419,6 +23721,7 @@ cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh +as_nop=: if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 then : emulate sh @@ -24427,13 +23730,12 @@ then : # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST -else case e in #( - e) case `(set -o) 2>/dev/null` in #( +else $as_nop + case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; -esac ;; esac fi @@ -24505,7 +23807,7 @@ IFS=$as_save_IFS ;; esac -# We did not find ourselves, most probably we were run as 'sh COMMAND' +# We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 @@ -24534,6 +23836,7 @@ as_fn_error () } # as_fn_error + # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. @@ -24573,12 +23876,11 @@ then : { eval $1+=\$2 }' -else case e in #( - e) as_fn_append () +else $as_nop + as_fn_append () { eval $1=\$$1\$2 - } ;; -esac + } fi # as_fn_append # as_fn_arith ARG... @@ -24592,12 +23894,11 @@ then : { as_val=$(( $* )) }' -else case e in #( - e) as_fn_arith () +else $as_nop + as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` - } ;; -esac + } fi # as_fn_arith @@ -24680,9 +23981,9 @@ if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: - # 1) On MSYS, both 'ln -s file dir' and 'ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; 'ln -s' creates a wrapper executable. - # In both cases, we have to default to 'cp -pR'. + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then @@ -24763,12 +24064,10 @@ as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. -as_sed_cpp="y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" -as_tr_cpp="eval sed '$as_sed_cpp'" # deprecated +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. -as_sed_sh="y%*+%pp%;s%[^_$as_cr_alnum]%_%g" -as_tr_sh="eval sed '$as_sed_sh'" # deprecated +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 @@ -24784,7 +24083,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # values after options handling. ac_log=" This file was extended by OCaml $as_me 5.4.0+dev0-2024-08-25, which was -generated by GNU Autoconf 2.72. Invocation command line was +generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -24817,7 +24116,7 @@ _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ -'$as_me' instantiates files and other configuration actions +\`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. @@ -24857,10 +24156,10 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ OCaml config.status 5.4.0+dev0-2024-08-25 -configured by $0, generated by GNU Autoconf 2.72, +configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" -Copyright (C) 2023 Free Software Foundation, Inc. +Copyright (C) 2021 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -24921,8 +24220,8 @@ do ac_need_defaults=false;; --he | --h) # Conflict between --help and --header - as_fn_error $? "ambiguous option: '$1' -Try '$0 --help' for more information.";; + as_fn_error $? "ambiguous option: \`$1' +Try \`$0 --help' for more information.";; --help | --hel | -h ) printf "%s\n" "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ @@ -24930,8 +24229,8 @@ Try '$0 --help' for more information.";; ac_cs_silent=: ;; # This is an error. - -*) as_fn_error $? "unrecognized option: '$1' -Try '$0 --help' for more information." ;; + -*) as_fn_error $? "unrecognized option: \`$1' +Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; @@ -25305,7 +24604,7 @@ do "otherlibs/systhreads/META") CONFIG_FILES="$CONFIG_FILES otherlibs/systhreads/META" ;; "ocamltest/ocamltest_unix.ml") CONFIG_LINKS="$CONFIG_LINKS ocamltest/ocamltest_unix.ml:${ocamltest_unix_mod}" ;; - *) as_fn_error $? "invalid argument: '$ac_config_target'" "$LINENO" 5;; + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done @@ -25326,7 +24625,7 @@ fi # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to '$tmp'. +# after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= @@ -25350,7 +24649,7 @@ ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. -# This happens for instance with './config.status config.h'. +# This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then @@ -25508,13 +24807,13 @@ fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. -# This happens for instance with './config.status Makefile'. +# This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF -# Transform confdefs.h into an awk script 'defines.awk', embedded as +# Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. @@ -25624,7 +24923,7 @@ do esac case $ac_mode$ac_tag in :[FHL]*:*);; - :L* | :C*:*) as_fn_error $? "invalid tag '$ac_tag'" "$LINENO" 5;; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac @@ -25646,19 +24945,19 @@ do -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain ':'. + # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || - as_fn_error 1 "cannot find input file: '$ac_f'" "$LINENO" 5;; + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done - # Let's still pretend it is 'configure' which instantiates (i.e., don't + # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` @@ -25786,7 +25085,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 esac _ACEOF -# Neutralize VPATH when '$srcdir' = '.'. +# Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 @@ -25816,9 +25115,9 @@ test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable 'datarootdir' + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 -printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable 'datarootdir' +printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" diff --git a/configure.ac b/configure.ac index 04c7670694de..05720707708c 100644 --- a/configure.ac +++ b/configure.ac @@ -1248,15 +1248,10 @@ AC_SEARCH_LIBS([cos], [m], AC_CHECK_HEADERS_ONCE([pthread_np.h sys/mman.h]) -AC_CHECK_HEADER([dirent.h], [AC_DEFINE([HAS_DIRENT], [1])], [], - [#include ]) - -AC_CHECK_HEADER([sys/select.h], [AC_DEFINE([HAS_SYS_SELECT_H], [1])], [], - [#include ]) +AC_CHECK_HEADERS([dirent.h sys/select.h], [], [], [#include ]) AS_CASE([$target], - [*-*-linux*], - [AC_CHECK_HEADER([linux/futex.h], [AC_DEFINE([HAS_LINUX_FUTEX_H])])]) + [*-*-linux*], [AC_CHECK_HEADERS([linux/futex.h])]) # Checks for types @@ -2060,8 +2055,7 @@ AC_CHECK_FUNC([inet_aton], [AC_DEFINE([HAS_INET_ATON], [1])]) AS_CASE([$target], [*-w64-mingw32*|*-pc-windows], - [AC_CHECK_HEADERS([afunix.h], [AC_DEFINE([HAS_AFUNIX_H], [1])], [], - [#include ])]) + [AC_CHECK_HEADERS([afunix.h], [], [], [#include ])]) ## IPv6 support diff --git a/otherlibs/systhreads/st_posix.h b/otherlibs/systhreads/st_posix.h index 22c3dbd455a7..5172a532afd5 100644 --- a/otherlibs/systhreads/st_posix.h +++ b/otherlibs/systhreads/st_posix.h @@ -36,7 +36,7 @@ Caml_inline void st_msleep(const st_timeout *timeout) #else -#ifdef HAS_SYS_SELECT_H +#ifdef HAVE_SYS_SELECT_H #include #endif diff --git a/otherlibs/unix/caml/socketaddr.h b/otherlibs/unix/caml/socketaddr.h index 768669d0cc10..b99b609050aa 100644 --- a/otherlibs/unix/caml/socketaddr.h +++ b/otherlibs/unix/caml/socketaddr.h @@ -23,7 +23,7 @@ /* Code duplication with runtime/debugger.c is inevitable, because * pulling winsock2.h creates many naming conflicts. */ #include -#ifdef HAS_AFUNIX_H +#ifdef HAVE_AFUNIX_H #include #else #define UNIX_PATH_MAX 108 diff --git a/otherlibs/unix/select_unix.c b/otherlibs/unix/select_unix.c index 8d4dc12d217c..0e6f06d9ad17 100644 --- a/otherlibs/unix/select_unix.c +++ b/otherlibs/unix/select_unix.c @@ -25,7 +25,7 @@ #include #include -#ifdef HAS_SYS_SELECT_H +#ifdef HAVE_SYS_SELECT_H #include #endif #include diff --git a/otherlibs/unix/sleep_unix.c b/otherlibs/unix/sleep_unix.c index 7c4f73ae8529..1f2c83a12cd0 100644 --- a/otherlibs/unix/sleep_unix.c +++ b/otherlibs/unix/sleep_unix.c @@ -23,7 +23,7 @@ #ifdef HAS_SELECT #include #include -#ifdef HAS_SYS_SELECT_H +#ifdef HAVE_SYS_SELECT_H #include #endif #endif diff --git a/runtime/caml/compatibility.h b/runtime/caml/compatibility.h index c7100d6c80dd..f9e59e80e4c1 100644 --- a/runtime/caml/compatibility.h +++ b/runtime/caml/compatibility.h @@ -33,6 +33,14 @@ #define HAS_UNISTD 1 #endif +#ifdef HAVE_AFUNIX_H +#define HAS_AFUNIX_H 1 +#endif + +#ifdef HAVE_DIRENT_H +#define HAS_DIRENT 1 +#endif + #ifdef HAVE_PTHREAD_NP_H #define HAS_PTHREAD_NP_H 1 #endif @@ -41,6 +49,10 @@ #define HAS_SYS_MMAN_H 1 #endif +#ifdef HAVE_SYS_SELECT_H +#define HAS_SYS_SELECT_H 1 +#endif + #ifdef HAVE_WORKING_FMA #define HAS_WORKING_FMA 1 #endif diff --git a/runtime/caml/platform.h b/runtime/caml/platform.h index a282f8b02e3e..24515896abc0 100644 --- a/runtime/caml/platform.h +++ b/runtime/caml/platform.h @@ -150,7 +150,7 @@ void caml_plat_futex_free(caml_plat_futex*); fallback, even if a futex implementation is available. */ #ifndef CAML_PLAT_FUTEX_FALLBACK # if defined(_WIN32) \ - || (defined(__linux__) && defined(HAS_LINUX_FUTEX_H)) \ + || (defined(__linux__) && defined(HAVE_LINUX_FUTEX_H)) \ || defined(__FreeBSD__) || defined(__OpenBSD__) /* TODO We have implementations for these platforms, but they are currently untested, so use the fallback instead. diff --git a/runtime/caml/s.h.in b/runtime/caml/s.h.in index 2b72dad06cf0..02c6bb43d5ec 100644 --- a/runtime/caml/s.h.in +++ b/runtime/caml/s.h.in @@ -82,7 +82,7 @@ #undef HAVE_SYS_MMAN_H -#undef HAS_LINUX_FUTEX_H +#undef HAVE_LINUX_FUTEX_H /* 2. For the Unix library. */ @@ -100,9 +100,9 @@ /* Define HAS_SOCKLEN_T if the type socklen_t is defined in /usr/include/sys/socket.h. */ -#undef HAS_AFUNIX_H +#undef HAVE_AFUNIX_H -/* Define HAS_AFUNIX_H if you have . */ +/* Define HAVE_AFUNIX_H if you have . */ #undef HAS_INET_ATON @@ -166,9 +166,9 @@ /* Define HAS_SELECT if you have select(). */ -#undef HAS_SYS_SELECT_H +#undef HAVE_SYS_SELECT_H -/* Define HAS_SYS_SELECT_H if /usr/include/sys/select.h exists +/* Define HAVE_SYS_SELECT_H if /usr/include/sys/select.h exists and should be included before using select(). */ #undef HAS_NANOSLEEP diff --git a/runtime/debugger.c b/runtime/debugger.c index 4d098b979582..5bfe1253c3b4 100644 --- a/runtime/debugger.c +++ b/runtime/debugger.c @@ -83,14 +83,14 @@ CAMLexport void caml_debugger_cleanup_fork(void) #undef ATOM /* Code duplication with otherlibs/unix/socketaddr.h is inevitable * because pulling winsock2.h creates many naming conflicts. */ -#ifdef HAS_AFUNIX_H +#ifdef HAVE_AFUNIX_H #include #else struct sockaddr_un { ADDRESS_FAMILY sun_family; char sun_path[108]; }; -#endif /* HAS_AFUNIX_H */ +#endif /* HAVE_AFUNIX_H */ #include #endif /* _WIN32 */ From 8544813e597d5331a3ca91dfc2066917da35b16f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonin=20D=C3=A9cimo?= Date: Wed, 22 May 2024 16:04:59 +0200 Subject: [PATCH 13/22] configure: use AC_CHECK_FUNCS_ONCE --- configure | 441 ++++-------------- configure.ac | 146 +----- otherlibs/systhreads/st_stubs.c | 12 +- otherlibs/unix/accept_unix.c | 4 +- otherlibs/unix/addrofstr.c | 2 +- otherlibs/unix/dup2.c | 2 +- otherlibs/unix/envir_unix.c | 6 +- otherlibs/unix/execvp.c | 6 +- otherlibs/unix/getcwd.c | 2 +- otherlibs/unix/getgroups.c | 2 +- otherlibs/unix/gmtime.c | 2 +- otherlibs/unix/initgroups.c | 2 +- otherlibs/unix/itimer.c | 2 +- otherlibs/unix/lockf_unix.c | 2 +- otherlibs/unix/mkfifo.c | 2 +- otherlibs/unix/mmap_unix.c | 2 +- otherlibs/unix/nice.c | 2 +- otherlibs/unix/pipe_unix.c | 2 +- otherlibs/unix/putenv.c | 2 +- otherlibs/unix/realpath_unix.c | 2 +- otherlibs/unix/rewinddir.c | 2 +- otherlibs/unix/setgroups.c | 2 +- otherlibs/unix/sleep_unix.c | 2 +- otherlibs/unix/spawn.c | 2 +- otherlibs/unix/times_unix.c | 4 +- otherlibs/unix/utimes_unix.c | 2 +- otherlibs/unix/wait.c | 4 +- runtime/caml/compatibility.h | 128 +++++ runtime/caml/s.h.in | 106 ++--- runtime/sys.c | 22 +- runtime/unix.c | 10 +- .../lib-unix/unix-execvpe/has-execvpe.sh | 2 +- yacc/main.c | 14 +- 33 files changed, 333 insertions(+), 610 deletions(-) diff --git a/configure b/configure index e1dea3ad77b6..bcb3564ffc7b 100755 --- a/configure +++ b/configure @@ -715,6 +715,7 @@ ac_includes_default="\ #endif" ac_header_c_list= +ac_func_c_list= ac_subst_vars='LTLIBOBJS LIBOBJS DIFF_FLAGS @@ -3124,6 +3125,41 @@ as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H" as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H" as_fn_append ac_header_c_list " pthread_np.h pthread_np_h HAVE_PTHREAD_NP_H" as_fn_append ac_header_c_list " sys/mman.h sys_mman_h HAVE_SYS_MMAN_H" +as_fn_append ac_func_c_list " accept4 HAVE_ACCEPT4" +as_fn_append ac_func_c_list " dup3 HAVE_DUP3" +as_fn_append ac_func_c_list " execvpe HAVE_EXECVPE" +as_fn_append ac_func_c_list " getauxval HAVE_GETAUXVAL" +as_fn_append ac_func_c_list " getcwd HAVE_GETCWD" +as_fn_append ac_func_c_list " getentropy HAVE_GETENTROPY" +as_fn_append ac_func_c_list " getgroups HAVE_GETGROUPS" +as_fn_append ac_func_c_list " getrusage HAVE_GETRUSAGE" +as_fn_append ac_func_c_list " gettimeofday HAVE_GETTIMEOFDAY" +as_fn_append ac_func_c_list " inet_aton HAVE_INET_ATON" +as_fn_append ac_func_c_list " initgroups HAVE_INITGROUPS" +as_fn_append ac_func_c_list " issetugid HAVE_ISSETUGID" +as_fn_append ac_func_c_list " lockf HAVE_LOCKF" +as_fn_append ac_func_c_list " mkfifo HAVE_MKFIFO" +as_fn_append ac_func_c_list " mkstemp HAVE_MKSTEMP" +as_fn_append ac_func_c_list " mktime HAVE_MKTIME" +as_fn_append ac_func_c_list " nanosleep HAVE_NANOSLEEP" +as_fn_append ac_func_c_list " nice HAVE_NICE" +as_fn_append ac_func_c_list " pipe2 HAVE_PIPE2" +as_fn_append ac_func_c_list " prctl HAVE_PRCTL" +as_fn_append ac_func_c_list " pthread_setname_np HAVE_PTHREAD_SETNAME_NP" +as_fn_append ac_func_c_list " pthread_set_name_np HAVE_PTHREAD_SET_NAME_NP" +as_fn_append ac_func_c_list " putenv HAVE_PUTENV" +as_fn_append ac_func_c_list " pwrite HAVE_PWRITE" +as_fn_append ac_func_c_list " realpath HAVE_REALPATH" +as_fn_append ac_func_c_list " rewinddir HAVE_REWINDDIR" +as_fn_append ac_func_c_list " secure_getenv HAVE_SECURE_GETENV" +as_fn_append ac_func_c_list " __secure_getenv HAVE___SECURE_GETENV" +as_fn_append ac_func_c_list " setgroups HAVE_SETGROUPS" +as_fn_append ac_func_c_list " setitimer HAVE_SETITIMER" +as_fn_append ac_func_c_list " system HAVE_SYSTEM" +as_fn_append ac_func_c_list " times HAVE_TIMES" +as_fn_append ac_func_c_list " utimes HAVE_UTIMES" +as_fn_append ac_func_c_list " waitpid HAVE_WAITPID" +as_fn_append ac_func_c_list " wait4 HAVE_WAIT4" # Auxiliary files required by this configure script. ac_aux_files="install-sh ltmain.sh config.guess config.sub" @@ -18881,6 +18917,55 @@ printf "%s\n" "$as_me: rlwrap doesn't work with native win32 - disabling" >&6;} esac # Checks for library functions + +ac_func= +for ac_item in $ac_func_c_list +do + if test $ac_func; then + ac_fn_c_check_func "$LINENO" $ac_func ac_cv_func_$ac_func + if eval test \"x\$ac_cv_func_$ac_func\" = xyes; then + echo "#define $ac_item 1" >> confdefs.h + fi + ac_func= + else + ac_func=$ac_item + fi +done + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ## Check the semantics of signal handlers @@ -19137,66 +19222,6 @@ then : fi fi -## getentropy -ac_fn_c_check_func "$LINENO" "getentropy" "ac_cv_func_getentropy" -if test "x$ac_cv_func_getentropy" = xyes -then : - printf "%s\n" "#define HAS_GETENTROPY 1" >>confdefs.h - -fi - - -## getrusage -ac_fn_c_check_func "$LINENO" "getrusage" "ac_cv_func_getrusage" -if test "x$ac_cv_func_getrusage" = xyes -then : - printf "%s\n" "#define HAS_GETRUSAGE 1" >>confdefs.h - -fi - - -## times -ac_fn_c_check_func "$LINENO" "times" "ac_cv_func_times" -if test "x$ac_cv_func_times" = xyes -then : - printf "%s\n" "#define HAS_TIMES 1" >>confdefs.h - -fi - - -## secure_getenv and __secure_getenv - -saved_CPPFLAGS="$CPPFLAGS" -CPPFLAGS="-D_GNU_SOURCE $CPPFLAGS" - -ac_fn_c_check_func "$LINENO" "secure_getenv" "ac_cv_func_secure_getenv" -if test "x$ac_cv_func_secure_getenv" = xyes -then : - printf "%s\n" "#define HAS_SECURE_GETENV 1" >>confdefs.h - -else $as_nop - ac_fn_c_check_func "$LINENO" "__secure_getenv" "ac_cv_func___secure_getenv" -if test "x$ac_cv_func___secure_getenv" = xyes -then : - printf "%s\n" "#define HAS___SECURE_GETENV 1" >>confdefs.h - -fi - -fi - - -CPPFLAGS="$saved_CPPFLAGS" - -## issetugid - -ac_fn_c_check_func "$LINENO" "issetugid" "ac_cv_func_issetugid" -if test "x$ac_cv_func_issetugid" = xyes -then : - printf "%s\n" "#define HAS_ISSETUGID 1" >>confdefs.h - -fi - - ## Checking for monotonic clock source ## On Windows MSVC, QueryPerformanceCounter and QueryPerformanceFrequency ## are always available. @@ -20021,14 +20046,6 @@ fi ;; esac -ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton" -if test "x$ac_cv_func_inet_aton" = xyes -then : - printf "%s\n" "#define HAS_INET_ATON 1" >>confdefs.h - -fi - - ## Unix domain sockets support on Windows case $target in #( @@ -20103,46 +20120,6 @@ then : fi -ac_fn_c_check_func "$LINENO" "rewinddir" "ac_cv_func_rewinddir" -if test "x$ac_cv_func_rewinddir" = xyes -then : - printf "%s\n" "#define HAS_REWINDDIR 1" >>confdefs.h - -fi - - -ac_fn_c_check_func "$LINENO" "lockf" "ac_cv_func_lockf" -if test "x$ac_cv_func_lockf" = xyes -then : - printf "%s\n" "#define HAS_LOCKF 1" >>confdefs.h - -fi - - -ac_fn_c_check_func "$LINENO" "mkfifo" "ac_cv_func_mkfifo" -if test "x$ac_cv_func_mkfifo" = xyes -then : - printf "%s\n" "#define HAS_MKFIFO 1" >>confdefs.h - -fi - - -ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd" -if test "x$ac_cv_func_getcwd" = xyes -then : - printf "%s\n" "#define HAS_GETCWD 1" >>confdefs.h - -fi - - -ac_fn_c_check_func "$LINENO" "system" "ac_cv_func_system" -if test "x$ac_cv_func_system" = xyes -then : - printf "%s\n" "#define HAS_SYSTEM 1" >>confdefs.h - -fi - - ## utime case $target in #( # SetFileTime is used instead of _utime, @@ -20168,14 +20145,6 @@ fi ;; esac -ac_fn_c_check_func "$LINENO" "utimes" "ac_cv_func_utimes" -if test "x$ac_cv_func_utimes" = xyes -then : - printf "%s\n" "#define HAS_UTIMES 1" >>confdefs.h - -fi - - ac_fn_c_check_func "$LINENO" "fchmod" "ac_cv_func_fchmod" if test "x$ac_cv_func_fchmod" = xyes then : @@ -20220,14 +20189,6 @@ fi fi -ac_fn_c_check_func "$LINENO" "nanosleep" "ac_cv_func_nanosleep" -if test "x$ac_cv_func_nanosleep" = xyes -then : - printf "%s\n" "#define HAS_NANOSLEEP 1" >>confdefs.h - -fi - - ac_fn_c_check_func "$LINENO" "symlink" "ac_cv_func_symlink" if test "x$ac_cv_func_symlink" = xyes then : @@ -20246,66 +20207,6 @@ fi fi -ac_fn_c_check_func "$LINENO" "realpath" "ac_cv_func_realpath" -if test "x$ac_cv_func_realpath" = xyes -then : - printf "%s\n" "#define HAS_REALPATH 1" >>confdefs.h - -fi - - -# wait -ac_fn_c_check_func "$LINENO" "waitpid" "ac_cv_func_waitpid" -if test "x$ac_cv_func_waitpid" = xyes -then : - - wait=true - printf "%s\n" "#define HAS_WAITPID 1" >>confdefs.h - - -else $as_nop - wait=false -fi - - -ac_fn_c_check_func "$LINENO" "wait4" "ac_cv_func_wait4" -if test "x$ac_cv_func_wait4" = xyes -then : - - has_wait=true - printf "%s\n" "#define HAS_WAIT4 1" >>confdefs.h - - -fi - - -## getgroups -ac_fn_c_check_func "$LINENO" "getgroups" "ac_cv_func_getgroups" -if test "x$ac_cv_func_getgroups" = xyes -then : - printf "%s\n" "#define HAS_GETGROUPS 1" >>confdefs.h - -fi - - -## setgroups -ac_fn_c_check_func "$LINENO" "setgroups" "ac_cv_func_setgroups" -if test "x$ac_cv_func_setgroups" = xyes -then : - printf "%s\n" "#define HAS_SETGROUPS 1" >>confdefs.h - -fi - - -## initgroups -ac_fn_c_check_func "$LINENO" "initgroups" "ac_cv_func_initgroups" -if test "x$ac_cv_func_initgroups" = xyes -then : - printf "%s\n" "#define HAS_INITGROUPS 1" >>confdefs.h - -fi - - ## termios ac_fn_c_check_header_compile "$LINENO" "termios.h" "ac_cv_header_termios_h" "$ac_includes_default" @@ -20341,21 +20242,6 @@ fi fi -## setitimer - -ac_fn_c_check_func "$LINENO" "setitimer" "ac_cv_func_setitimer" -if test "x$ac_cv_func_setitimer" = xyes -then : - - setitimer=true - printf "%s\n" "#define HAS_SETITIMER 1" >>confdefs.h - - -else $as_nop - setitimer=false -fi - - ## gethostname ac_fn_c_check_func "$LINENO" "gethostname" "ac_cv_func_gethostname" if test "x$ac_cv_func_gethostname" = xyes @@ -20380,31 +20266,6 @@ fi fi -## gettimeofday - -ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday" -if test "x$ac_cv_func_gettimeofday" = xyes -then : - - gettimeofday=true - printf "%s\n" "#define HAS_GETTIMEOFDAY 1" >>confdefs.h - - -else $as_nop - gettimeofday=false -fi - - -## mktime - -ac_fn_c_check_func "$LINENO" "mktime" "ac_cv_func_mktime" -if test "x$ac_cv_func_mktime" = xyes -then : - printf "%s\n" "#define HAS_MKTIME 1" >>confdefs.h - -fi - - ## setsid case $target in #( @@ -20420,16 +20281,6 @@ fi ;; esac -## putenv - -ac_fn_c_check_func "$LINENO" "putenv" "ac_cv_func_putenv" -if test "x$ac_cv_func_putenv" = xyes -then : - printf "%s\n" "#define HAS_PUTENV 1" >>confdefs.h - -fi - - ## setenv and unsetenv ac_fn_c_check_func "$LINENO" "setenv" "ac_cv_func_setenv" @@ -20609,16 +20460,6 @@ fi fi -## pwrite - -ac_fn_c_check_func "$LINENO" "pwrite" "ac_cv_func_pwrite" -if test "x$ac_cv_func_pwrite" = xyes -then : - printf "%s\n" "#define HAS_PWRITE 1" >>confdefs.h - -fi - - ## -fdebug-prefix-map support by the C compiler case $ocaml_cc_vendor,$target in #( *,*-w64-mingw32*) : @@ -21128,66 +20969,6 @@ case $ac_cv_func_which_gethostbyaddr_r in #( ;; esac -## mkstemp - -ac_fn_c_check_func "$LINENO" "mkstemp" "ac_cv_func_mkstemp" -if test "x$ac_cv_func_mkstemp" = xyes -then : - printf "%s\n" "#define HAS_MKSTEMP 1" >>confdefs.h - -fi - - -## nice - -ac_fn_c_check_func "$LINENO" "nice" "ac_cv_func_nice" -if test "x$ac_cv_func_nice" = xyes -then : - printf "%s\n" "#define HAS_NICE 1" >>confdefs.h - -fi - - -## dup3 - -ac_fn_c_check_func "$LINENO" "dup3" "ac_cv_func_dup3" -if test "x$ac_cv_func_dup3" = xyes -then : - printf "%s\n" "#define HAS_DUP3 1" >>confdefs.h - -fi - - -## pipe2 - -ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2" -if test "x$ac_cv_func_pipe2" = xyes -then : - printf "%s\n" "#define HAS_PIPE2 1" >>confdefs.h - -fi - - -## accept4 - -ac_fn_c_check_func "$LINENO" "accept4" "ac_cv_func_accept4" -if test "x$ac_cv_func_accept4" = xyes -then : - printf "%s\n" "#define HAS_ACCEPT4 1" >>confdefs.h - -fi - - -## getauxval - -ac_fn_c_check_func "$LINENO" "getauxval" "ac_cv_func_getauxval" -if test "x$ac_cv_func_getauxval" = xyes -then : - printf "%s\n" "#define HAS_GETAUXVAL 1" >>confdefs.h - -fi - - ## shmat ac_fn_c_check_header_compile "$LINENO" "sys/shm.h" "ac_cv_header_sys_shm_h" "$ac_includes_default" if test "x$ac_cv_header_sys_shm_h" = xyes @@ -21206,16 +20987,6 @@ fi fi -## execvpe - -ac_fn_c_check_func "$LINENO" "execvpe" "ac_cv_func_execvpe" -if test "x$ac_cv_func_execvpe" = xyes -then : - printf "%s\n" "#define HAS_EXECVPE 1" >>confdefs.h - -fi - - ## posix_spawn ac_fn_c_check_header_compile "$LINENO" "spawn.h" "ac_cv_header_spawn_h" "$ac_includes_default" @@ -22631,48 +22402,6 @@ fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -## prctl - - for ac_func in prctl -do : - ac_fn_c_check_func "$LINENO" "prctl" "ac_cv_func_prctl" -if test "x$ac_cv_func_prctl" = xyes -then : - printf "%s\n" "#define HAVE_PRCTL 1" >>confdefs.h - printf "%s\n" "#define HAS_PRCTL 1" >>confdefs.h - -fi - -done - -## pthread_setname_np - - for ac_func in pthread_setname_np -do : - ac_fn_c_check_func "$LINENO" "pthread_setname_np" "ac_cv_func_pthread_setname_np" -if test "x$ac_cv_func_pthread_setname_np" = xyes -then : - printf "%s\n" "#define HAVE_PTHREAD_SETNAME_NP 1" >>confdefs.h - printf "%s\n" "#define HAS_PTHREAD_SETNAME_NP 1" >>confdefs.h - -fi - -done - -## pthread_set_name_np - - for ac_func in pthread_set_name_np -do : - ac_fn_c_check_func "$LINENO" "pthread_set_name_np" "ac_cv_func_pthread_set_name_np" -if test "x$ac_cv_func_pthread_set_name_np" = xyes -then : - printf "%s\n" "#define HAVE_PTHREAD_SET_NAME_NP 1" >>confdefs.h - printf "%s\n" "#define HAS_PTHREAD_SET_NAME_NP 1" >>confdefs.h - -fi - -done - ## SetThreadDescription for ac_func in SetThreadDescription diff --git a/configure.ac b/configure.ac index 05720707708c..e84430c770ea 100644 --- a/configure.ac +++ b/configure.ac @@ -1741,6 +1741,12 @@ AS_CASE([$rlwrap,$system], # Checks for library functions +AC_CHECK_FUNCS_ONCE(m4_normalize([accept4 dup3 execvpe getauxval getcwd + getentropy getgroups getrusage gettimeofday inet_aton initgroups issetugid + lockf mkfifo mkstemp mktime nanosleep nice pipe2 prctl pthread_setname_np + pthread_set_name_np putenv pwrite realpath rewinddir secure_getenv + __secure_getenv setgroups setitimer system times utimes waitpid wait4])) + ## Check the semantics of signal handlers OCAML_SIGNAL_HANDLERS_SEMANTICS @@ -1761,30 +1767,6 @@ AS_IF([$has_c99_float_ops], [AC_MSG_ERROR(m4_normalize([C99 float ops unavailable, enable replacements with --enable-imprecise-c99-float-ops]))])]) -## getentropy -AC_CHECK_FUNC([getentropy], [AC_DEFINE([HAS_GETENTROPY], [1])]) - -## getrusage -AC_CHECK_FUNC([getrusage], [AC_DEFINE([HAS_GETRUSAGE], [1])]) - -## times -AC_CHECK_FUNC([times], [AC_DEFINE([HAS_TIMES], [1])]) - -## secure_getenv and __secure_getenv - -saved_CPPFLAGS="$CPPFLAGS" -CPPFLAGS="-D_GNU_SOURCE $CPPFLAGS" - -AC_CHECK_FUNC([secure_getenv], - [AC_DEFINE([HAS_SECURE_GETENV], [1])], - [AC_CHECK_FUNC([__secure_getenv], [AC_DEFINE([HAS___SECURE_GETENV], [1])])]) - -CPPFLAGS="$saved_CPPFLAGS" - -## issetugid - -AC_CHECK_FUNC([issetugid], [AC_DEFINE([HAS_ISSETUGID], [1])]) - ## Checking for monotonic clock source ## On Windows MSVC, QueryPerformanceCounter and QueryPerformanceFrequency ## are always available. @@ -2049,8 +2031,6 @@ AS_CASE([$target], [AC_CHECK_TYPE([socklen_t], [AC_DEFINE([HAS_SOCKLEN_T], [1])], [], [#include ])]) -AC_CHECK_FUNC([inet_aton], [AC_DEFINE([HAS_INET_ATON], [1])]) - ## Unix domain sockets support on Windows AS_CASE([$target], @@ -2081,16 +2061,6 @@ AS_IF([$ipv6], AS_IF([$ipv6], [AC_DEFINE([HAS_IPV6], [1])]) -AC_CHECK_FUNC([rewinddir], [AC_DEFINE([HAS_REWINDDIR], [1])]) - -AC_CHECK_FUNC([lockf], [AC_DEFINE([HAS_LOCKF], [1])]) - -AC_CHECK_FUNC([mkfifo], [AC_DEFINE([HAS_MKFIFO], [1])]) - -AC_CHECK_FUNC([getcwd], [AC_DEFINE([HAS_GETCWD], [1])]) - -AC_CHECK_FUNC([system], [AC_DEFINE([HAS_SYSTEM], [1])]) - ## utime AS_CASE([$target], # SetFileTime is used instead of _utime, @@ -2099,8 +2069,6 @@ AS_CASE([$target], [AC_CHECK_HEADER([utime.h], [AC_CHECK_FUNC([utime], [AC_DEFINE([HAS_UTIME], [1])])])])]) -AC_CHECK_FUNC([utimes], [AC_DEFINE([HAS_UTIMES], [1])]) - AC_CHECK_FUNC([fchmod], [AC_CHECK_FUNC([fchown], [AC_DEFINE([HAS_FCHMOD], [1])])]) @@ -2115,39 +2083,10 @@ AC_CHECK_FUNC([select], #include ])]) -AC_CHECK_FUNC([nanosleep], [AC_DEFINE([HAS_NANOSLEEP], [1])]) - AC_CHECK_FUNC([symlink], [AC_CHECK_FUNC([readlink], [AC_CHECK_FUNC([lstat], [AC_DEFINE([HAS_SYMLINK], [1])])])]) -AC_CHECK_FUNC([realpath], [AC_DEFINE([HAS_REALPATH], [1])]) - -# wait -AC_CHECK_FUNC( - [waitpid], - [ - wait=true - AC_DEFINE([HAS_WAITPID], [1]) - ], - [wait=false]) - -AC_CHECK_FUNC( - [wait4], - [ - has_wait=true - AC_DEFINE([HAS_WAIT4], [1]) - ]) - -## getgroups -AC_CHECK_FUNC([getgroups], [AC_DEFINE([HAS_GETGROUPS], [1])]) - -## setgroups -AC_CHECK_FUNC([setgroups], [AC_DEFINE([HAS_SETGROUPS], [1])]) - -## initgroups -AC_CHECK_FUNC([initgroups], [AC_DEFINE([HAS_INITGROUPS], [1])]) - ## termios AC_CHECK_HEADER([termios.h], @@ -2157,15 +2096,6 @@ AC_CHECK_HEADER([termios.h], [AC_CHECK_FUNC([tcflush], [AC_CHECK_FUNC([tcflow], [AC_DEFINE([HAS_TERMIOS], [1])])])])])])]) -## setitimer - -AC_CHECK_FUNC([setitimer], - [ - setitimer=true - AC_DEFINE([HAS_SETITIMER], [1]) - ], - [setitimer=false]) - ## gethostname AC_CHECK_FUNCS([gethostname]) @@ -2174,29 +2104,12 @@ AC_CHECK_FUNCS([gethostname]) AC_CHECK_HEADER([sys/utsname.h], [AC_CHECK_FUNC([uname], [AC_DEFINE([HAS_UNAME], [1])])]) -## gettimeofday - -AC_CHECK_FUNC([gettimeofday], - [ - gettimeofday=true - AC_DEFINE([HAS_GETTIMEOFDAY], [1]) - ], - [gettimeofday=false]) - -## mktime - -AC_CHECK_FUNC([mktime], [AC_DEFINE([HAS_MKTIME], [1])]) - ## setsid AS_CASE([$target], [*-*-cygwin|*-w64-mingw32*|*-pc-windows], [], [AC_CHECK_FUNC([setsid], [AC_DEFINE([HAS_SETSID], [1])])]) -## putenv - -AC_CHECK_FUNC([putenv], [AC_DEFINE([HAS_PUTENV], [1])]) - ## setenv and unsetenv AC_CHECK_FUNC([setenv], @@ -2247,10 +2160,6 @@ AC_CHECK_HEADER([sys/mman.h], [AC_CHECK_FUNC([mmap], [AC_CHECK_FUNC([munmap], [AC_DEFINE([HAS_MMAP], [1])])])]) -## pwrite - -AC_CHECK_FUNC([pwrite], [AC_DEFINE([HAS_PWRITE], [1])]) - ## -fdebug-prefix-map support by the C compiler AS_CASE([$ocaml_cc_vendor,$target], [*,*-w64-mingw32*], [cc_has_debug_prefix_map=false], @@ -2290,30 +2199,6 @@ AS_CASE([$ac_cv_func_which_gethostbyaddr_r], [eight], [AC_DEFINE([HAS_GETHOSTBYADDR_R],[8])], [seven], [AC_DEFINE([HAS_GETHOSTBYADDR_R],[7])]) -## mkstemp - -AC_CHECK_FUNC([mkstemp], [AC_DEFINE([HAS_MKSTEMP], [1])]) - -## nice - -AC_CHECK_FUNC([nice], [AC_DEFINE([HAS_NICE], [1])]) - -## dup3 - -AC_CHECK_FUNC([dup3], [AC_DEFINE([HAS_DUP3], [1])]) - -## pipe2 - -AC_CHECK_FUNC([pipe2], [AC_DEFINE([HAS_PIPE2], [1])]) - -## accept4 - -AC_CHECK_FUNC([accept4], [AC_DEFINE([HAS_ACCEPT4], [1])]) - -## getauxval - -AC_CHECK_FUNC([getauxval], [AC_DEFINE([HAS_GETAUXVAL], [1])]) - ## shmat AC_CHECK_HEADER([sys/shm.h], [ @@ -2321,10 +2206,6 @@ AC_CHECK_HEADER([sys/shm.h], AC_CHECK_FUNC([shmat], [AC_DEFINE([HAS_SHMAT], [1])]) ]) -## execvpe - -AC_CHECK_FUNC([execvpe], [AC_DEFINE([HAS_EXECVPE], [1])]) - ## posix_spawn AC_CHECK_HEADER([spawn.h], @@ -2486,21 +2367,6 @@ AC_LINK_IFELSE( AC_DEFINE([HAS_BSD_GETAFFINITY_NP], [1])], [AC_MSG_RESULT([pthread_getaffinity_np not found])])]) -## prctl -AC_CHECK_FUNCS( - [prctl], - [AC_DEFINE([HAS_PRCTL], [1])]) - -## pthread_setname_np -AC_CHECK_FUNCS( - [pthread_setname_np], - [AC_DEFINE([HAS_PTHREAD_SETNAME_NP], [1])]) - -## pthread_set_name_np -AC_CHECK_FUNCS( - [pthread_set_name_np], - [AC_DEFINE([HAS_PTHREAD_SET_NAME_NP], [1])]) - ## SetThreadDescription AC_CHECK_FUNCS( [SetThreadDescription], diff --git a/otherlibs/systhreads/st_stubs.c b/otherlibs/systhreads/st_stubs.c index 290cb8c05fcf..d2481b2c587e 100644 --- a/otherlibs/systhreads/st_stubs.c +++ b/otherlibs/systhreads/st_stubs.c @@ -30,9 +30,9 @@ WINBASEAPI HRESULT WINAPI SetThreadDescription(HANDLE hThread, PCWSTR lpThreadDescription); # endif -#elif defined(HAS_PRCTL) +#elif defined(HAVE_PRCTL) # include -#elif defined(HAS_PTHREAD_SETNAME_NP) || defined(HAS_PTHREAD_SET_NAME_NP) +#elif defined(HAVE_PTHREAD_SETNAME_NP) || defined(HAVE_PTHREAD_SET_NAME_NP) # include # if defined(HAS_PTHREAD_NP_H) @@ -991,15 +991,15 @@ CAMLprim value caml_set_current_thread_name(value name) caml_stat_free(thread_name); # endif -# if defined(HAS_PTHREAD_SETNAME_NP) +# if defined(HAVE_PTHREAD_SETNAME_NP) // We are using both methods. // See: https://github.com/ocaml/ocaml/pull/13504#discussion_r1786358928 pthread_setname_np(pthread_self(), String_val(name)); # endif -#elif defined(HAS_PRCTL) +#elif defined(HAVE_PRCTL) prctl(PR_SET_NAME, String_val(name)); -#elif defined(HAS_PTHREAD_SETNAME_NP) +#elif defined(HAVE_PTHREAD_SETNAME_NP) # if defined(__APPLE__) pthread_setname_np(String_val(name)); # elif defined(__NetBSD__) @@ -1007,7 +1007,7 @@ CAMLprim value caml_set_current_thread_name(value name) # else pthread_setname_np(pthread_self(), String_val(name)); # endif -#elif defined(HAS_PTHREAD_SET_NAME_NP) +#elif defined(HAVE_PTHREAD_SET_NAME_NP) pthread_set_name_np(pthread_self(), String_val(name)); #else if (caml_runtime_warnings_active()) { diff --git a/otherlibs/unix/accept_unix.c b/otherlibs/unix/accept_unix.c index aef00a649836..3bd8ea280e11 100644 --- a/otherlibs/unix/accept_unix.c +++ b/otherlibs/unix/accept_unix.c @@ -37,7 +37,7 @@ CAMLprim value caml_unix_accept(value cloexec, value sock) addr_len = sizeof(addr); caml_enter_blocking_section(); -#if defined(HAS_ACCEPT4) && defined(SOCK_CLOEXEC) +#if defined(HAVE_ACCEPT4) && defined(SOCK_CLOEXEC) retcode = accept4(Int_val(sock), &addr.s_gen, &addr_len, clo ? SOCK_CLOEXEC : 0); #else @@ -45,7 +45,7 @@ CAMLprim value caml_unix_accept(value cloexec, value sock) #endif caml_leave_blocking_section(); if (retcode == -1) caml_uerror("accept", Nothing); -#if !(defined(HAS_ACCEPT4) && defined(SOCK_CLOEXEC)) +#if !(defined(HAVE_ACCEPT4) && defined(SOCK_CLOEXEC)) if (clo) caml_unix_set_cloexec(retcode, "accept", Nothing); #endif a = caml_unix_alloc_sockaddr(&addr, addr_len, retcode); diff --git a/otherlibs/unix/addrofstr.c b/otherlibs/unix/addrofstr.c index 8271246a8b47..97179d670e94 100644 --- a/otherlibs/unix/addrofstr.c +++ b/otherlibs/unix/addrofstr.c @@ -74,7 +74,7 @@ CAMLprim value caml_unix_inet_addr_of_string(value s) caml_failwith("inet_addr_of_string"); } #endif -#elif defined(HAS_INET_ATON) +#elif defined(HAVE_INET_ATON) { struct in_addr address; if (inet_aton(String_val(s), &address) == 0) diff --git a/otherlibs/unix/dup2.c b/otherlibs/unix/dup2.c index 1b6f620a229e..37bb0c917b72 100644 --- a/otherlibs/unix/dup2.c +++ b/otherlibs/unix/dup2.c @@ -30,7 +30,7 @@ CAMLprim value caml_unix_dup2(value cloexec, value fd1, value fd2) caml_unix_clear_cloexec(Int_val(fd2), "dup2", Nothing); } } else { -#ifdef HAS_DUP3 +#ifdef HAVE_DUP3 if (dup3(Int_val(fd1), Int_val(fd2), caml_unix_cloexec_p(cloexec) ? O_CLOEXEC : 0) == -1) caml_uerror("dup2", Nothing); diff --git a/otherlibs/unix/envir_unix.c b/otherlibs/unix/envir_unix.c index 0eaac46bc7a9..5ad2a4ca4a86 100644 --- a/otherlibs/unix/envir_unix.c +++ b/otherlibs/unix/envir_unix.c @@ -19,7 +19,7 @@ #include #endif #include -#ifdef HAS_GETAUXVAL +#ifdef HAVE_GETAUXVAL #include #endif @@ -39,12 +39,12 @@ CAMLprim value caml_unix_environment_unsafe(value unit) static char **secure_environ(void) { -#ifdef HAS_GETAUXVAL +#ifdef HAVE_GETAUXVAL if (!getauxval(AT_SECURE)) return environ; else return NULL; -#elif defined(HAS_ISSETUGID) +#elif defined(HAVE_ISSETUGID) if (!issetugid ()) return environ; else diff --git a/otherlibs/unix/execvp.c b/otherlibs/unix/execvp.c index 8fff5db39156..9f5472e14895 100644 --- a/otherlibs/unix/execvp.c +++ b/otherlibs/unix/execvp.c @@ -37,7 +37,7 @@ CAMLprim value caml_unix_execvp(value path, value args) /* from smart compilers */ } -#ifndef HAS_EXECVPE +#ifndef HAVE_EXECVPE int caml_unix_execvpe_emulation(const char * name, char * const argv[], char * const envp[]); @@ -53,7 +53,7 @@ CAMLprim value caml_unix_execvpe(value path, value args, value env) argv = caml_unix_cstringvect(args, "execvpe"); envp = caml_unix_cstringvect(env, "execvpe"); wpath = caml_stat_strdup_to_os(String_val(path)); -#ifdef HAS_EXECVPE +#ifdef HAVE_EXECVPE (void) execvpe_os((const char_os *)wpath, EXECV_CAST argv, EXECV_CAST envp); err = errno; #else @@ -67,7 +67,7 @@ CAMLprim value caml_unix_execvpe(value path, value args, value env) /* from smart compilers */ } -#ifndef HAS_EXECVPE +#ifndef HAVE_EXECVPE static int caml_unix_execve_script(const char * path, char * const argv[], diff --git a/otherlibs/unix/getcwd.c b/otherlibs/unix/getcwd.c index dccc1f88a10d..c031e171d0a5 100644 --- a/otherlibs/unix/getcwd.c +++ b/otherlibs/unix/getcwd.c @@ -33,7 +33,7 @@ #endif #endif -#ifdef HAS_GETCWD +#ifdef HAVE_GETCWD CAMLprim value caml_unix_getcwd(value unit) { diff --git a/otherlibs/unix/getgroups.c b/otherlibs/unix/getgroups.c index 74382713cfba..519e0f352657 100644 --- a/otherlibs/unix/getgroups.c +++ b/otherlibs/unix/getgroups.c @@ -18,7 +18,7 @@ #include #include -#ifdef HAS_GETGROUPS +#ifdef HAVE_GETGROUPS #include #ifndef _WIN32 diff --git a/otherlibs/unix/gmtime.c b/otherlibs/unix/gmtime.c index adcaea176dc5..fe212a9516d4 100644 --- a/otherlibs/unix/gmtime.c +++ b/otherlibs/unix/gmtime.c @@ -57,7 +57,7 @@ CAMLprim value caml_unix_localtime(value t) return alloc_tm(tm); } -#ifdef HAS_MKTIME +#ifdef HAVE_MKTIME CAMLprim value caml_unix_mktime(value t) { diff --git a/otherlibs/unix/initgroups.c b/otherlibs/unix/initgroups.c index 1c0a34bca98d..1e4028e9ae21 100644 --- a/otherlibs/unix/initgroups.c +++ b/otherlibs/unix/initgroups.c @@ -17,7 +17,7 @@ #include #include -#ifdef HAS_INITGROUPS +#ifdef HAVE_INITGROUPS #include #ifndef _WIN32 diff --git a/otherlibs/unix/itimer.c b/otherlibs/unix/itimer.c index 5b2d18f06d55..7fe50450cb2a 100644 --- a/otherlibs/unix/itimer.c +++ b/otherlibs/unix/itimer.c @@ -20,7 +20,7 @@ #include #include "caml/unixsupport.h" -#ifdef HAS_SETITIMER +#ifdef HAVE_SETITIMER #include #include diff --git a/otherlibs/unix/lockf_unix.c b/otherlibs/unix/lockf_unix.c index 67bd4a7718fc..f76128edaefe 100644 --- a/otherlibs/unix/lockf_unix.c +++ b/otherlibs/unix/lockf_unix.c @@ -86,7 +86,7 @@ CAMLprim value caml_unix_lockf(value fd, value cmd, value span) #else -#ifdef HAS_LOCKF +#ifdef HAVE_LOCKF #ifndef _WIN32 #include #else diff --git a/otherlibs/unix/mkfifo.c b/otherlibs/unix/mkfifo.c index a446932d3f56..d92f24840a26 100644 --- a/otherlibs/unix/mkfifo.c +++ b/otherlibs/unix/mkfifo.c @@ -21,7 +21,7 @@ #include #include "caml/unixsupport.h" -#ifdef HAS_MKFIFO +#ifdef HAVE_MKFIFO CAMLprim value caml_unix_mkfifo(value path, value vmode) { diff --git a/otherlibs/unix/mmap_unix.c b/otherlibs/unix/mmap_unix.c index 026cbcf5fa21..8a393f5f7d8b 100644 --- a/otherlibs/unix/mmap_unix.c +++ b/otherlibs/unix/mmap_unix.c @@ -57,7 +57,7 @@ static int caml_grow_file(int fd, file_offset size) /* First use pwrite for growing - it is a conservative method, as it can never happen that we shrink by accident */ -#ifdef HAS_PWRITE +#ifdef HAVE_PWRITE c = 0; p = pwrite(fd, &c, 1, size - 1); #else diff --git a/otherlibs/unix/nice.c b/otherlibs/unix/nice.c index 9ca9bea20c2a..5b7cf479b5bf 100644 --- a/otherlibs/unix/nice.c +++ b/otherlibs/unix/nice.c @@ -24,7 +24,7 @@ CAMLprim value caml_unix_nice(value incr) { int ret; errno = 0; -#ifdef HAS_NICE +#ifdef HAVE_NICE ret = nice(Int_val(incr)); #else ret = 0; diff --git a/otherlibs/unix/pipe_unix.c b/otherlibs/unix/pipe_unix.c index 3ed9e2e71e91..31321d283e50 100644 --- a/otherlibs/unix/pipe_unix.c +++ b/otherlibs/unix/pipe_unix.c @@ -23,7 +23,7 @@ CAMLprim value caml_unix_pipe(value cloexec, value vunit) { int fd[2]; value res; -#ifdef HAS_PIPE2 +#ifdef HAVE_PIPE2 if (pipe2(fd, caml_unix_cloexec_p(cloexec) ? O_CLOEXEC : 0) == -1) caml_uerror("pipe", Nothing); #else diff --git a/otherlibs/unix/putenv.c b/otherlibs/unix/putenv.c index 1d8dde38814a..da4bcd4f64d6 100644 --- a/otherlibs/unix/putenv.c +++ b/otherlibs/unix/putenv.c @@ -26,7 +26,7 @@ #include "caml/unixsupport.h" -#ifdef HAS_PUTENV +#ifdef HAVE_PUTENV CAMLprim value caml_unix_putenv(value name, value val) { diff --git a/otherlibs/unix/realpath_unix.c b/otherlibs/unix/realpath_unix.c index 4c66a0243ce6..e9ace08d2e20 100644 --- a/otherlibs/unix/realpath_unix.c +++ b/otherlibs/unix/realpath_unix.c @@ -19,7 +19,7 @@ #include #include "caml/unixsupport.h" -#ifdef HAS_REALPATH +#ifdef HAVE_REALPATH CAMLprim value caml_unix_realpath (value p) { diff --git a/otherlibs/unix/rewinddir.c b/otherlibs/unix/rewinddir.c index 01ca64e9bf65..27758e87919a 100644 --- a/otherlibs/unix/rewinddir.c +++ b/otherlibs/unix/rewinddir.c @@ -24,7 +24,7 @@ #include #endif -#ifdef HAS_REWINDDIR +#ifdef HAVE_REWINDDIR CAMLprim value caml_unix_rewinddir(value vd) { diff --git a/otherlibs/unix/setgroups.c b/otherlibs/unix/setgroups.c index 0bc68f4ebda1..7f78218484af 100644 --- a/otherlibs/unix/setgroups.c +++ b/otherlibs/unix/setgroups.c @@ -18,7 +18,7 @@ #include #include -#ifdef HAS_SETGROUPS +#ifdef HAVE_SETGROUPS #include #ifndef _WIN32 diff --git a/otherlibs/unix/sleep_unix.c b/otherlibs/unix/sleep_unix.c index 1f2c83a12cd0..faca223785b0 100644 --- a/otherlibs/unix/sleep_unix.c +++ b/otherlibs/unix/sleep_unix.c @@ -33,7 +33,7 @@ CAMLprim value caml_unix_sleep(value duration_sec) { double sec = Double_val(duration_sec); if (sec < 0.0) return Val_unit; -#if defined(HAS_NANOSLEEP) +#if defined(HAVE_NANOSLEEP) { struct timespec t = caml_timespec_of_sec(sec); int ret; diff --git a/otherlibs/unix/spawn.c b/otherlibs/unix/spawn.c index 74e573953851..f6b6ad01314b 100644 --- a/otherlibs/unix/spawn.c +++ b/otherlibs/unix/spawn.c @@ -139,7 +139,7 @@ CAMLprim value caml_unix_spawn(value executable, /* string */ if (envp == NULL) { execvp(path, argv); } else { -#ifdef HAS_EXECVPE +#ifdef HAVE_EXECVPE execvpe(path, argv, envp); #else /* No other thread is running in the child process, so we can change diff --git a/otherlibs/unix/times_unix.c b/otherlibs/unix/times_unix.c index 025eb33257f4..17bc5a87d280 100644 --- a/otherlibs/unix/times_unix.c +++ b/otherlibs/unix/times_unix.c @@ -21,14 +21,14 @@ #include #include #include -#ifdef HAS_GETRUSAGE +#ifdef HAVE_GETRUSAGE #include #include #endif CAMLprim value caml_unix_times(value unit) { -#ifdef HAS_GETRUSAGE +#ifdef HAVE_GETRUSAGE value res; struct rusage ru; diff --git a/otherlibs/unix/utimes_unix.c b/otherlibs/unix/utimes_unix.c index 77468025f5d1..a3add57a97c8 100644 --- a/otherlibs/unix/utimes_unix.c +++ b/otherlibs/unix/utimes_unix.c @@ -22,7 +22,7 @@ #include #include "caml/unixsupport.h" -#if defined(HAS_UTIMES) +#if defined(HAVE_UTIMES) #include #include diff --git a/otherlibs/unix/wait.c b/otherlibs/unix/wait.c index 31fb2b9e4dd6..b503bdf422c9 100644 --- a/otherlibs/unix/wait.c +++ b/otherlibs/unix/wait.c @@ -77,9 +77,9 @@ CAMLprim value caml_unix_wait(value unit) return alloc_process_status(pid, status); } -#if defined(HAS_WAITPID) || defined(HAS_WAIT4) +#if defined(HAVE_WAITPID) || defined(HAVE_WAIT4) -#ifndef HAS_WAITPID +#ifndef HAVE_WAITPID #define waitpid(pid,status,opts) wait4(pid,status,opts,NULL) #endif diff --git a/runtime/caml/compatibility.h b/runtime/caml/compatibility.h index f9e59e80e4c1..1b4939d258c6 100644 --- a/runtime/caml/compatibility.h +++ b/runtime/caml/compatibility.h @@ -53,6 +53,134 @@ #define HAS_SYS_SELECT_H 1 #endif +#ifdef HAVE_ACCEPT4 +#define HAS_ACCEPT4 1 +#endif + +#ifdef HAVE_DUP3 +#define HAS_DUP3 1 +#endif + +#ifdef HAVE_EXECVPE +#define HAS_EXECVPE 1 +#endif + +#ifdef HAVE_GETAUXVAL +#define HAS_GETAUXVAL 1 +#endif + +#ifdef HAVE_GETCWD +#define HAS_GETCWD 1 +#endif + +#ifdef HAVE_GETENTROPY +#define HAS_GETENTROPY 1 +#endif + +#ifdef HAVE_GETGROUPS +#define HAS_GETGROUPS 1 +#endif + +#ifdef HAVE_GETRUSAGE +#define HAS_GETRUSAGE 1 +#endif + +#ifdef HAVE_GETTIMEOFDAY +#define HAS_GETTIMEOFDAY 1 +#endif + +#ifdef HAVE_INET_ATON +#define HAS_INET_ATON 1 +#endif + +#ifdef HAVE_INITGROUPS +#define HAS_INITGROUPS 1 +#endif + +#ifdef HAVE_ISSETUGID +#define HAS_ISSETUGID 1 +#endif + +#ifdef HAVE_LOCKF +#define HAS_LOCKF 1 +#endif + +#ifdef HAVE_MKFIFO +#define HAS_MKFIFO 1 +#endif + +#ifdef HAVE_MKSTEMP +#define HAS_MKSTEMP 1 +#endif + +#ifdef HAVE_MKTIME +#define HAS_MKTIME 1 +#endif + +#ifdef HAVE_NANOSLEEP +#define HAS_NANOSLEEP 1 +#endif + +#ifdef HAVE_NICE +#define HAS_NICE 1 +#endif + +#ifdef HAVE_PIPE2 +#define HAS_PIPE2 1 +#endif + +#ifdef HAVE_PUTENV +#define HAS_PUTENV 1 +#endif + +#ifdef HAVE_PWRITE +#define HAS_PWRITE 1 +#endif + +#ifdef HAVE_REALPATH +#define HAS_REALPATH 1 +#endif + +#ifdef HAVE_REWINDDIR +#define HAS_REWINDDIR 1 +#endif + +#ifdef HAVE_SECURE_GETENV +#define HAS_SECURE_GETENV 1 +#endif + +#ifdef HAVE___SECURE_GETENV +#define HAS___SECURE_GETENV 1 +#endif + +#ifdef HAVE_SETGROUPS +#define HAS_SETGROUPS 1 +#endif + +#ifdef HAVE_SETITIMER +#define HAS_SETITIMER 1 +#endif + +#ifdef HAVE_SYSTEM +#define HAS_SYSTEM 1 +#endif + +#ifdef HAVE_TIMES +#define HAS_TIMES 1 +#endif + +#ifdef HAVE_UTIMES +#define HAS_UTIMES 1 +#endif + +#ifdef HAVE_WAITPID +#define HAS_WAITPID 1 +#endif + +#ifdef HAVE_WAIT4 +#define HAS_WAIT4 1 +#endif + #ifdef HAVE_WORKING_FMA #define HAS_WORKING_FMA 1 #endif diff --git a/runtime/caml/s.h.in b/runtime/caml/s.h.in index 02c6bb43d5ec..9c360854fd68 100644 --- a/runtime/caml/s.h.in +++ b/runtime/caml/s.h.in @@ -68,17 +68,17 @@ This workaround exists primarily for https://sourceforge.net/p/mingw-w64/bugs/573/ */ -#undef HAS_GETENTROPY +#undef HAVE_GETENTROPY -#undef HAS_GETRUSAGE +#undef HAVE_GETRUSAGE -#undef HAS_TIMES +#undef HAVE_TIMES -#undef HAS_SECURE_GETENV +#undef HAVE_SECURE_GETENV -#undef HAS___SECURE_GETENV +#undef HAVE___SECURE_GETENV -#undef HAS_ISSETUGID +#undef HAVE_ISSETUGID #undef HAVE_SYS_MMAN_H @@ -104,17 +104,17 @@ /* Define HAVE_AFUNIX_H if you have . */ -#undef HAS_INET_ATON +#undef HAVE_INET_ATON #undef HAS_IPV6 #undef HAVE_PTHREAD_NP_H -#undef HAS_PRCTL +#undef HAVE_PRCTL -#undef HAS_PTHREAD_SETNAME_NP +#undef HAVE_PTHREAD_SETNAME_NP -#undef HAS_PTHREAD_SET_NAME_NP +#undef HAVE_PTHREAD_SET_NAME_NP #undef HAS_SETTHREADDESCRIPTION @@ -127,31 +127,31 @@ Otherwise, we'll load /usr/include/sys/dir.h, and readdir() is expected to return a struct direct *. */ -#undef HAS_REWINDDIR +#undef HAVE_REWINDDIR -/* Define HAS_REWINDDIR if you have rewinddir(). */ +/* Define HAVE_REWINDDIR if you have rewinddir(). */ -#undef HAS_LOCKF +#undef HAVE_LOCKF -/* Define HAS_LOCKF if the library provides the lockf() function. */ +/* Define HAVE_LOCKF if the library provides the lockf() function. */ -#undef HAS_MKFIFO +#undef HAVE_MKFIFO -/* Define HAS_MKFIFO if the library provides the mkfifo() function. */ +/* Define HAVE_MKFIFO if the library provides the mkfifo() function. */ -#undef HAS_GETCWD +#undef HAVE_GETCWD -/* Define HAS_GETCWD if the library provides the getcwd() function. */ +/* Define HAVE_GETCWD if the library provides the getcwd() function. */ -#undef HAS_SYSTEM +#undef HAVE_SYSTEM -/* Define HAS_SYSTEM if the library provides the system() function. */ +/* Define HAVE_SYSTEM if the library provides the system() function. */ #undef HAS_UTIME -#undef HAS_UTIMES +#undef HAVE_UTIMES /* Define HAS_UTIME if you have /usr/include/utime.h and the library - provides utime(). Define HAS_UTIMES if the library provides utimes(). */ + provides utime(). Define HAVE_UTIMES if the library provides utimes(). */ #undef HAS_FCHMOD @@ -171,42 +171,42 @@ /* Define HAVE_SYS_SELECT_H if /usr/include/sys/select.h exists and should be included before using select(). */ -#undef HAS_NANOSLEEP -/* Define HAS_NANOSLEEP if you have nanosleep(). */ +#undef HAVE_NANOSLEEP +/* Define HAVE_NANOSLEEP if you have nanosleep(). */ #undef HAS_SYMLINK /* Define HAS_SYMLINK if you have symlink() and readlink() and lstat(). */ -#undef HAS_REALPATH -/* Define HAS_REALPATH if you have realpath(). */ +#undef HAVE_REALPATH +/* Define HAVE_REALPATH if you have realpath(). */ -#undef HAS_WAIT4 -#undef HAS_WAITPID +#undef HAVE_WAIT4 +#undef HAVE_WAITPID -/* Define HAS_WAIT4 if you have wait4(). - Define HAS_WAITPID if you have waitpid(). */ +/* Define HAVE_WAIT4 if you have wait4(). + Define HAVE_WAITPID if you have waitpid(). */ -#undef HAS_GETGROUPS +#undef HAVE_GETGROUPS -/* Define HAS_GETGROUPS if you have getgroups(). */ +/* Define HAVE_GETGROUPS if you have getgroups(). */ -#undef HAS_SETGROUPS +#undef HAVE_SETGROUPS -/* Define HAS_SETGROUPS if you have setgroups(). */ +/* Define HAVE_SETGROUPS if you have setgroups(). */ -#undef HAS_INITGROUPS +#undef HAVE_INITGROUPS -/* Define HAS_INITGROUPS if you have initgroups(). */ +/* Define HAVE_INITGROUPS if you have initgroups(). */ #undef HAS_TERMIOS /* Define HAS_TERMIOS if you have /usr/include/termios.h and it is Posix-compliant. */ -#undef HAS_SETITIMER +#undef HAVE_SETITIMER -/* Define HAS_SETITIMER if you have setitimer(). */ +/* Define HAVE_SETITIMER if you have setitimer(). */ #undef HAVE_GETHOSTNAME @@ -216,21 +216,21 @@ /* Define HAS_UNAME if you have uname(). */ -#undef HAS_GETTIMEOFDAY +#undef HAVE_GETTIMEOFDAY -/* Define HAS_GETTIMEOFDAY if you have gettimeofday(). */ +/* Define HAVE_GETTIMEOFDAY if you have gettimeofday(). */ -#undef HAS_MKTIME +#undef HAVE_MKTIME -/* Define HAS_MKTIME if you have mktime(). */ +/* Define HAVE_MKTIME if you have mktime(). */ #undef HAS_SETSID /* Define HAS_SETSID if you have setsid(). */ -#undef HAS_PUTENV +#undef HAVE_PUTENV -/* Define HAS_PUTENV if you have putenv(). */ +/* Define HAVE_PUTENV if you have putenv(). */ #undef HAS_SETENV_UNSETENV @@ -255,7 +255,7 @@ /* Define HAS_MMAP if you have the include file and the functions mmap() and munmap(). */ -#undef HAS_PWRITE +#undef HAVE_PWRITE #undef HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC #undef HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC @@ -281,25 +281,25 @@ gethostbyaddr_r(): either 7 or 8 depending on prototype. (7 is the Solaris version, 8 is the Linux version). */ -#undef HAS_MKSTEMP +#undef HAVE_MKSTEMP -#undef HAS_NICE +#undef HAVE_NICE -/* Define HAS_NICE if you have nice(). */ +/* Define HAVE_NICE if you have nice(). */ -#undef HAS_DUP3 +#undef HAVE_DUP3 -#undef HAS_PIPE2 +#undef HAVE_PIPE2 -#undef HAS_ACCEPT4 +#undef HAVE_ACCEPT4 -#undef HAS_GETAUXVAL +#undef HAVE_GETAUXVAL #undef HAS_SYS_SHM_H #undef HAS_SHMAT -#undef HAS_EXECVPE +#undef HAVE_EXECVPE #undef HAS_POSIX_SPAWN diff --git a/runtime/sys.c b/runtime/sys.c index 60df7828f466..8ddb28d5ce9d 100644 --- a/runtime/sys.c +++ b/runtime/sys.c @@ -36,17 +36,17 @@ #ifndef _WIN32 #include #endif -#ifdef HAS_TIMES +#ifdef HAVE_TIMES #include #endif -#ifdef HAS_GETRUSAGE +#ifdef HAVE_GETRUSAGE #include #include #endif -#ifdef HAS_GETTIMEOFDAY +#ifdef HAVE_GETTIMEOFDAY #include #endif -#if defined(HAS_GETENTROPY) && defined(__APPLE__) +#if defined(HAVE_GETENTROPY) && defined(__APPLE__) #include #endif #include "caml/alloc.h" @@ -404,11 +404,11 @@ CAMLprim value caml_sys_getcwd(value unit) { char_os buff[4096]; char_os * ret; -#ifdef HAS_GETCWD +#ifdef HAVE_GETCWD ret = getcwd_os(buff, sizeof(buff)/sizeof(*buff)); #else caml_invalid_argument("Sys.getcwd not implemented"); -#endif /* HAS_GETCWD */ +#endif /* HAVE_GETCWD */ if (ret == 0) caml_sys_error(NO_ARG); return caml_copy_string_of_os(buff); } @@ -535,7 +535,7 @@ void caml_sys_init(const char_os * exe_name, char_os **argv) #endif #endif -#ifdef HAS_SYSTEM +#ifdef HAVE_SYSTEM CAMLprim value caml_sys_system_command(value command) { CAMLparam1 (command); @@ -567,7 +567,7 @@ CAMLprim value caml_sys_system_command(value command) double caml_sys_time_include_children_unboxed(value include_children) { -#ifdef HAS_GETRUSAGE +#ifdef HAVE_GETRUSAGE struct rusage ru; double sec = 0.; @@ -583,7 +583,7 @@ double caml_sys_time_include_children_unboxed(value include_children) return sec; #else - #ifdef HAS_TIMES + #ifdef HAVE_TIMES #ifndef CLK_TCK #ifdef HZ #define CLK_TCK HZ @@ -632,7 +632,7 @@ int caml_unix_random_seed(intnat data[16]) int nread = 0; /* Try kernel entropy first */ -#ifdef HAS_GETENTROPY +#ifdef HAVE_GETENTROPY if (getentropy(buffer, sizeof(buffer)) != -1) { nread = sizeof(buffer); } else @@ -650,7 +650,7 @@ int caml_unix_random_seed(intnat data[16]) /* Otherwise, complement whatever we got (probably nothing) with some not-very-random data. */ -#ifdef HAS_GETTIMEOFDAY +#ifdef HAVE_GETTIMEOFDAY struct timeval tv; gettimeofday(&tv, NULL); if (n < 16) data[n++] = tv.tv_usec; diff --git a/runtime/unix.c b/runtime/unix.c index 0fb5250262c9..464caeef69b2 100644 --- a/runtime/unix.c +++ b/runtime/unix.c @@ -28,7 +28,7 @@ #include #include #include "caml/config.h" -#ifdef HAS_GETTIMEOFDAY +#ifdef HAVE_GETTIMEOFDAY #include #endif #include @@ -405,11 +405,11 @@ char * caml_executable_name(void) char *caml_secure_getenv (char const *var) { -#ifdef HAS_SECURE_GETENV +#ifdef HAVE_SECURE_GETENV return secure_getenv (var); -#elif defined (HAS___SECURE_GETENV) +#elif defined (HAVE___SECURE_GETENV) return __secure_getenv (var); -#elif defined(HAS_ISSETUGID) +#elif defined(HAVE_ISSETUGID) if (!issetugid ()) return getenv(var); else @@ -432,7 +432,7 @@ uint64_t caml_time_counter(void) return (uint64_t) t.tv_sec * NSEC_PER_SEC + (uint64_t) t.tv_nsec; -#elif defined(HAS_GETTIMEOFDAY) +#elif defined(HAVE_GETTIMEOFDAY) struct timeval t; gettimeofday(&t, 0); return diff --git a/testsuite/tests/lib-unix/unix-execvpe/has-execvpe.sh b/testsuite/tests/lib-unix/unix-execvpe/has-execvpe.sh index 51707f108a11..b08499f5cea9 100755 --- a/testsuite/tests/lib-unix/unix-execvpe/has-execvpe.sh +++ b/testsuite/tests/lib-unix/unix-execvpe/has-execvpe.sh @@ -5,7 +5,7 @@ # It makes sense to run the tests only if execvpe is nt implemented. # If it is implemented, the test is skipped. -if grep -q "#define HAS_EXECVPE" ${ocamlsrcdir}/runtime/caml/s.h; then +if grep -q "#define HAVE_EXECVPE" ${ocamlsrcdir}/runtime/caml/s.h; then exit ${TEST_SKIP}; fi exit ${TEST_PASS} diff --git a/yacc/main.c b/yacc/main.c index 59cf02d5c223..34a269db6ba3 100644 --- a/yacc/main.c +++ b/yacc/main.c @@ -42,7 +42,7 @@ char_os temp_form[] = T("yacc.XXXXXXX"); #ifdef _WIN32 wchar_t dirsep = L'\\'; /* mingw provides an implementation of mkstemp, but it's ANSI only */ -#undef HAS_MKSTEMP +#undef HAVE_MKSTEMP #else char dirsep = '/'; #endif @@ -62,7 +62,7 @@ char_os *output_file_name; char_os *text_file_name; char_os *verbose_file_name; -#ifdef HAS_MKSTEMP +#ifdef HAVE_MKSTEMP int action_fd = -1, entry_fd = -1, text_fd = -1; #endif @@ -115,7 +115,7 @@ void done(int k) k = 1; } -#ifdef HAS_MKSTEMP +#ifdef HAVE_MKSTEMP if (action_fd != -1) unlink(action_file_name); if (entry_fd != -1) @@ -327,7 +327,7 @@ void create_file_names(void) entry_file_name[len + 5] = L'e'; text_file_name[len + 5] = L't'; -#ifdef HAS_MKSTEMP +#ifdef HAVE_MKSTEMP action_fd = mkstemp(action_file_name); if (action_fd == -1) open_error(action_file_name); @@ -385,7 +385,7 @@ void open_files(void) open_error(input_file_name); } -#ifdef HAS_MKSTEMP +#ifdef HAVE_MKSTEMP action_file = fdopen(action_fd, "w"); #else action_file = fopen_os(action_file_name, T("w")); @@ -393,7 +393,7 @@ void open_files(void) if (action_file == 0) open_error(action_file_name); -#ifdef HAS_MKSTEMP +#ifdef HAVE_MKSTEMP entry_file = fdopen(entry_fd, "w"); #else entry_file = fopen_os(entry_file_name, T("w")); @@ -401,7 +401,7 @@ void open_files(void) if (entry_file == 0) open_error(entry_file_name); -#ifdef HAS_MKSTEMP +#ifdef HAVE_MKSTEMP text_file = fdopen(text_fd, "w"); #else text_file = fopen_os(text_file_name, T("w")); From 34a557b458d11e3e3b0eb92c8b788629d4ad842f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonin=20D=C3=A9cimo?= Date: Wed, 22 May 2024 16:51:10 +0200 Subject: [PATCH 14/22] configure: more AC_CHECK_FUNCS and AC_CHECK_HEADERS --- configure | 18 +++++++++--------- configure.ac | 10 +++------- otherlibs/unix/gethostname.c | 2 +- otherlibs/unix/setsid.c | 2 +- runtime/afl.c | 4 ++-- runtime/caml/compatibility.h | 20 ++++++++++++++++++++ runtime/caml/s.h.in | 12 ++++++------ runtime/startup_byt.c | 2 +- 8 files changed, 43 insertions(+), 27 deletions(-) diff --git a/configure b/configure index bcb3564ffc7b..c8b1fac6590a 100755 --- a/configure +++ b/configure @@ -20259,7 +20259,7 @@ then : ac_fn_c_check_func "$LINENO" "uname" "ac_cv_func_uname" if test "x$ac_cv_func_uname" = xyes then : - printf "%s\n" "#define HAS_UNAME 1" >>confdefs.h + printf "%s\n" "#define HAVE_UNAME 1" >>confdefs.h fi @@ -20275,7 +20275,7 @@ case $target in #( ac_fn_c_check_func "$LINENO" "setsid" "ac_cv_func_setsid" if test "x$ac_cv_func_setsid" = xyes then : - printf "%s\n" "#define HAS_SETSID 1" >>confdefs.h + printf "%s\n" "#define HAVE_SETSID 1" >>confdefs.h fi ;; @@ -20970,22 +20970,22 @@ case $ac_cv_func_which_gethostbyaddr_r in #( esac ## shmat -ac_fn_c_check_header_compile "$LINENO" "sys/shm.h" "ac_cv_header_sys_shm_h" "$ac_includes_default" + for ac_header in sys/shm.h +do : + ac_fn_c_check_header_compile "$LINENO" "sys/shm.h" "ac_cv_header_sys_shm_h" "$ac_includes_default" if test "x$ac_cv_header_sys_shm_h" = xyes then : - - printf "%s\n" "#define HAS_SYS_SHM_H 1" >>confdefs.h - - ac_fn_c_check_func "$LINENO" "shmat" "ac_cv_func_shmat" + printf "%s\n" "#define HAVE_SYS_SHM_H 1" >>confdefs.h + ac_fn_c_check_func "$LINENO" "shmat" "ac_cv_func_shmat" if test "x$ac_cv_func_shmat" = xyes then : - printf "%s\n" "#define HAS_SHMAT 1" >>confdefs.h + printf "%s\n" "#define HAVE_SHMAT 1" >>confdefs.h fi - fi +done ## posix_spawn diff --git a/configure.ac b/configure.ac index e84430c770ea..482fcd8d7479 100644 --- a/configure.ac +++ b/configure.ac @@ -2102,13 +2102,13 @@ AC_CHECK_FUNCS([gethostname]) ## uname AC_CHECK_HEADER([sys/utsname.h], - [AC_CHECK_FUNC([uname], [AC_DEFINE([HAS_UNAME], [1])])]) + [AC_CHECK_FUNCS([uname])]) ## setsid AS_CASE([$target], [*-*-cygwin|*-w64-mingw32*|*-pc-windows], [], - [AC_CHECK_FUNC([setsid], [AC_DEFINE([HAS_SETSID], [1])])]) + [AC_CHECK_FUNCS([setsid])]) ## setenv and unsetenv @@ -2200,11 +2200,7 @@ AS_CASE([$ac_cv_func_which_gethostbyaddr_r], [seven], [AC_DEFINE([HAS_GETHOSTBYADDR_R],[7])]) ## shmat -AC_CHECK_HEADER([sys/shm.h], - [ - AC_DEFINE([HAS_SYS_SHM_H], [1]) - AC_CHECK_FUNC([shmat], [AC_DEFINE([HAS_SHMAT], [1])]) - ]) +AC_CHECK_HEADERS([sys/shm.h], [AC_CHECK_FUNCS([shmat])]) ## posix_spawn diff --git a/otherlibs/unix/gethostname.c b/otherlibs/unix/gethostname.c index 30bca0c7fc05..4b085b587e47 100644 --- a/otherlibs/unix/gethostname.c +++ b/otherlibs/unix/gethostname.c @@ -36,7 +36,7 @@ CAMLprim value caml_unix_gethostname(value unit) } #else -#ifdef HAS_UNAME +#ifdef HAVE_UNAME #include diff --git a/otherlibs/unix/setsid.c b/otherlibs/unix/setsid.c index 65c1dab31f9f..78acd69cad88 100644 --- a/otherlibs/unix/setsid.c +++ b/otherlibs/unix/setsid.c @@ -22,7 +22,7 @@ CAMLprim value caml_unix_setsid(value unit) { -#ifdef HAS_SETSID +#ifdef HAVE_SETSID pid_t pid = setsid(); if (pid == (pid_t)(-1)) caml_uerror("setsid", Nothing); return Val_long(pid); diff --git a/runtime/afl.c b/runtime/afl.c index 8d56ad185385..80731d8db796 100644 --- a/runtime/afl.c +++ b/runtime/afl.c @@ -27,7 +27,7 @@ unsigned char * caml_afl_area_ptr = NULL; uintnat caml_afl_prev_loc; -#if !defined(HAS_SYS_SHM_H) || !defined(HAS_SHMAT) +#if !defined(HAVE_SYS_SHM_H) || !defined(HAVE_SHMAT) CAMLexport value caml_setup_afl(value unit) { @@ -183,4 +183,4 @@ CAMLprim value caml_reset_afl_instrumentation(value full) return Val_unit; } -#endif /* HAS_SYS_SHM_H */ +#endif /* HAVE_SYS_SHM_H */ diff --git a/runtime/caml/compatibility.h b/runtime/caml/compatibility.h index 1b4939d258c6..10be56f07cab 100644 --- a/runtime/caml/compatibility.h +++ b/runtime/caml/compatibility.h @@ -53,6 +53,10 @@ #define HAS_SYS_SELECT_H 1 #endif +#ifdef HAVE_SYS_SHM_H +#define HAS_SYS_SHM_H 1 +#endif + #ifdef HAVE_ACCEPT4 #define HAS_ACCEPT4 1 #endif @@ -85,6 +89,10 @@ #define HAS_GETRUSAGE 1 #endif +#ifdef HAVE_GETHOSTNAME +#define HAS_GETHOSTNAME 1 +#endif + #ifdef HAVE_GETTIMEOFDAY #define HAS_GETTIMEOFDAY 1 #endif @@ -157,10 +165,18 @@ #define HAS_SETGROUPS 1 #endif +#ifdef HAVE_SETSID +#define HAS_SETSID 1 +#endif + #ifdef HAVE_SETITIMER #define HAS_SETITIMER 1 #endif +#ifdef HAVE_SHMAT +#define HAS_SHMAT 1 +#endif + #ifdef HAVE_SYSTEM #define HAS_SYSTEM 1 #endif @@ -169,6 +185,10 @@ #define HAS_TIMES 1 #endif +#ifdef HAVE_UNAME +#define HAS_UNAME 1 +#endif + #ifdef HAVE_UTIMES #define HAS_UTIMES 1 #endif diff --git a/runtime/caml/s.h.in b/runtime/caml/s.h.in index 9c360854fd68..e9155cf07034 100644 --- a/runtime/caml/s.h.in +++ b/runtime/caml/s.h.in @@ -212,9 +212,9 @@ /* Define HAVE_GETHOSTNAME if you have gethostname(). */ -#undef HAS_UNAME +#undef HAVE_UNAME -/* Define HAS_UNAME if you have uname(). */ +/* Define HAVE_UNAME if you have uname(). */ #undef HAVE_GETTIMEOFDAY @@ -224,9 +224,9 @@ /* Define HAVE_MKTIME if you have mktime(). */ -#undef HAS_SETSID +#undef HAVE_SETSID -/* Define HAS_SETSID if you have setsid(). */ +/* Define HAVE_SETSID if you have setsid(). */ #undef HAVE_PUTENV @@ -295,9 +295,9 @@ #undef HAVE_GETAUXVAL -#undef HAS_SYS_SHM_H +#undef HAVE_SYS_SHM_H -#undef HAS_SHMAT +#undef HAVE_SHMAT #undef HAVE_EXECVPE diff --git a/runtime/startup_byt.c b/runtime/startup_byt.c index ee9cfc63d4a3..ca13c9011f24 100644 --- a/runtime/startup_byt.c +++ b/runtime/startup_byt.c @@ -399,7 +399,7 @@ static void do_print_config(void) "false"); #endif printf("supports_afl: %s\n", -#ifdef HAS_SYS_SHM_H +#ifdef HAVE_SYS_SHM_H "true"); #else "false"); From e982ebf1d3b319899a29d970fbcfc20fbf308ad1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonin=20D=C3=A9cimo?= Date: Thu, 23 May 2024 18:05:20 +0200 Subject: [PATCH 15/22] configure: even more AC_CHECK_FUNCS --- configure | 8 ++++---- configure.ac | 8 ++++---- otherlibs/unix/socketpair_win32.c | 4 ++-- runtime/caml/compatibility.h | 8 ++++++++ runtime/caml/s.h.in | 8 ++++---- runtime/floats.c | 4 ++-- 6 files changed, 24 insertions(+), 16 deletions(-) diff --git a/configure b/configure index c8b1fac6590a..abb8901b3a51 100755 --- a/configure +++ b/configure @@ -19742,7 +19742,7 @@ fi ac_fn_c_check_func "$LINENO" "socketpair" "ac_cv_func_socketpair" if test "x$ac_cv_func_socketpair" = xyes then : - printf "%s\n" "#define HAS_SOCKETPAIR 1" >>confdefs.h + printf "%s\n" "#define HAVE_SOCKETPAIR 1" >>confdefs.h fi ;; #( @@ -19810,7 +19810,7 @@ fi ac_fn_c_check_func "$LINENO" "socketpair" "ac_cv_func_socketpair" if test "x$ac_cv_func_socketpair" = xyes then : - printf "%s\n" "#define HAS_SOCKETPAIR 1" >>confdefs.h + printf "%s\n" "#define HAVE_SOCKETPAIR 1" >>confdefs.h fi ;; #( @@ -20356,13 +20356,13 @@ fi # (should be debugged later) case $target in #( *-pc-windows) : - printf "%s\n" "#define HAS_STRTOD_L 1" >>confdefs.h + printf "%s\n" "#define HAVE_STRTOD_L 1" >>confdefs.h ;; #( *) : ac_fn_c_check_func "$LINENO" "strtod_l" "ac_cv_func_strtod_l" if test "x$ac_cv_func_strtod_l" = xyes then : - printf "%s\n" "#define HAS_STRTOD_L 1" >>confdefs.h + printf "%s\n" "#define HAVE_STRTOD_L 1" >>confdefs.h fi ;; diff --git a/configure.ac b/configure.ac index 482fcd8d7479..e52abfa02deb 100644 --- a/configure.ac +++ b/configure.ac @@ -2000,11 +2000,11 @@ AS_CASE([$target], [*-w64-mingw32*], [cclibs="$cclibs -lws2_32" AC_SEARCH_LIBS([socket], [ws2_32]) - AC_CHECK_FUNC([socketpair], [AC_DEFINE([HAS_SOCKETPAIR], [1])])], + AC_CHECK_FUNCS([socketpair])], [*-pc-windows], [cclibs="$cclibs ws2_32.lib" OCAML_CL_SEARCH_LIBS([socket], [ws2_32]) - AC_CHECK_FUNC([socketpair], [AC_DEFINE([HAS_SOCKETPAIR], [1])])], + AC_CHECK_FUNCS([socketpair])], [*-*-haiku], [cclibs="$cclibs -lnetwork" AC_SEARCH_LIBS([socket], [network])], @@ -2134,8 +2134,8 @@ AC_CHECK_HEADER([xlocale.h], # Note: not detected on MSVC so hardcoding the result # (should be debugged later) AS_CASE([$target], - [*-pc-windows], [AC_DEFINE([HAS_STRTOD_L], [1])], - [AC_CHECK_FUNC([strtod_l], [AC_DEFINE([HAS_STRTOD_L], [1])])]) + [*-pc-windows], [AC_DEFINE([HAVE_STRTOD_L], [1])], + [AC_CHECK_FUNCS([strtod_l])]) ## shared library support AS_IF([$supports_shared_libraries], diff --git a/otherlibs/unix/socketpair_win32.c b/otherlibs/unix/socketpair_win32.c index effeeb7cfb26..e15c18970129 100644 --- a/otherlibs/unix/socketpair_win32.c +++ b/otherlibs/unix/socketpair_win32.c @@ -28,7 +28,7 @@ extern const int caml_unix_socket_domain_table[]; /* from socket.c */ extern const int caml_unix_socket_type_table[]; /* from socket.c */ -#ifdef HAS_SOCKETPAIR +#ifdef HAVE_SOCKETPAIR #error "Windows has defined sockepair! win32unix should be updated." @@ -198,6 +198,6 @@ CAMLprim value caml_unix_socketpair(value cloexec, value vdomain, value vtype, CAMLreturn(result); } -#endif /* HAS_SOCKETPAIR */ +#endif /* HAVE_SOCKETPAIR */ #endif /* HAS_SOCKETS */ diff --git a/runtime/caml/compatibility.h b/runtime/caml/compatibility.h index 10be56f07cab..d0607cd6eb54 100644 --- a/runtime/caml/compatibility.h +++ b/runtime/caml/compatibility.h @@ -177,6 +177,14 @@ #define HAS_SHMAT 1 #endif +#ifdef HAVE_SOCKETPAIR +#define HAS_SOCKETPAIR 1 +#endif + +#ifdef HAVE_STRTOD_L +#define HAS_STRTOD_L 1 +#endif + #ifdef HAVE_SYSTEM #define HAS_SYSTEM 1 #endif diff --git a/runtime/caml/s.h.in b/runtime/caml/s.h.in index e9155cf07034..c96dbf3cbfa1 100644 --- a/runtime/caml/s.h.in +++ b/runtime/caml/s.h.in @@ -90,9 +90,9 @@ /* Define HAS_SOCKETS if you have BSD sockets. */ -#undef HAS_SOCKETPAIR +#undef HAVE_SOCKETPAIR -/* Define HAS_SOCKETPAIR if you have the socketpair function. Only +/* Define HAVE_SOCKETPAIR if you have the socketpair function. Only relevant on Windows. */ #undef HAS_SOCKLEN_T @@ -246,9 +246,9 @@ /* Define HAS_XLOCALE_H if you have the include file and the uselocale() function. */ -#undef HAS_STRTOD_L +#undef HAVE_STRTOD_L -/* Define HAS_STRTOD_L if you have strtod_l */ +/* Define HAVE_STRTOD_L if you have strtod_l */ #undef HAS_MMAP diff --git a/runtime/floats.c b/runtime/floats.c index f517fb06f61d..caf5ad345d4e 100644 --- a/runtime/floats.c +++ b/runtime/floats.c @@ -403,13 +403,13 @@ CAMLprim value caml_float_of_string(value vs) if (sign < 0) d = -d; } else { /* Convert using strtod */ -#if defined(HAS_STRTOD_L) && defined(HAS_LOCALE) +#if defined(HAVE_STRTOD_L) && defined(HAS_LOCALE) d = strtod_l((const char *) buf, &end, caml_locale); #else USE_LOCALE; d = strtod((const char *) buf, &end); RESTORE_LOCALE; -#endif /* HAS_STRTOD_L */ +#endif /* HAVE_STRTOD_L */ if (end != dst) goto error; } if (buf != parse_buffer) caml_stat_free(buf); From 7f1cd491c1bb74a019594a8826bbfe6d1739745a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonin=20D=C3=A9cimo?= Date: Fri, 24 May 2024 16:25:26 +0200 Subject: [PATCH 16/22] configure: use AC_CHECK_TYPES --- configure | 8 ++++++-- configure.ac | 6 ++---- otherlibs/unix/caml/socketaddr.h | 2 +- runtime/caml/compatibility.h | 4 ++++ runtime/caml/s.h.in | 4 ++-- 5 files changed, 15 insertions(+), 9 deletions(-) diff --git a/configure b/configure index abb8901b3a51..1c7f2880c21a 100755 --- a/configure +++ b/configure @@ -20031,7 +20031,9 @@ case $target in #( " if test "x$ac_cv_type_socklen_t" = xyes then : - printf "%s\n" "#define HAS_SOCKLEN_T 1" >>confdefs.h + +printf "%s\n" "#define HAVE_SOCKLEN_T 1" >>confdefs.h + fi ;; #( @@ -20040,7 +20042,9 @@ fi " if test "x$ac_cv_type_socklen_t" = xyes then : - printf "%s\n" "#define HAS_SOCKLEN_T 1" >>confdefs.h + +printf "%s\n" "#define HAVE_SOCKLEN_T 1" >>confdefs.h + fi ;; diff --git a/configure.ac b/configure.ac index e52abfa02deb..208ae27ae820 100644 --- a/configure.ac +++ b/configure.ac @@ -2026,10 +2026,8 @@ AS_IF([$sockets], [AC_DEFINE([HAS_SOCKETS], [1])]) AS_CASE([$target], [*-w64-mingw32*|*-pc-windows], - [AC_CHECK_TYPE([socklen_t], [AC_DEFINE([HAS_SOCKLEN_T], [1])], [], - [#include ])], - [AC_CHECK_TYPE([socklen_t], [AC_DEFINE([HAS_SOCKLEN_T], [1])], [], - [#include ])]) + [AC_CHECK_TYPES([socklen_t], [], [], [#include ])], + [AC_CHECK_TYPES([socklen_t], [], [], [#include ])]) ## Unix domain sockets support on Windows diff --git a/otherlibs/unix/caml/socketaddr.h b/otherlibs/unix/caml/socketaddr.h index b99b609050aa..74a7963784e2 100644 --- a/otherlibs/unix/caml/socketaddr.h +++ b/otherlibs/unix/caml/socketaddr.h @@ -54,7 +54,7 @@ union sock_addr_union { #endif }; -#ifdef HAS_SOCKLEN_T +#ifdef HAVE_SOCKLEN_T typedef socklen_t socklen_param_type; #else typedef int socklen_param_type; diff --git a/runtime/caml/compatibility.h b/runtime/caml/compatibility.h index d0607cd6eb54..b9c729e2d19c 100644 --- a/runtime/caml/compatibility.h +++ b/runtime/caml/compatibility.h @@ -209,6 +209,10 @@ #define HAS_WAIT4 1 #endif +#ifdef HAVE_SOCKLEN_T +#define HAS_SOCKLEN_T 1 +#endif + #ifdef HAVE_WORKING_FMA #define HAS_WORKING_FMA 1 #endif diff --git a/runtime/caml/s.h.in b/runtime/caml/s.h.in index c96dbf3cbfa1..0d34dbe791c2 100644 --- a/runtime/caml/s.h.in +++ b/runtime/caml/s.h.in @@ -95,9 +95,9 @@ /* Define HAVE_SOCKETPAIR if you have the socketpair function. Only relevant on Windows. */ -#undef HAS_SOCKLEN_T +#undef HAVE_SOCKLEN_T -/* Define HAS_SOCKLEN_T if the type socklen_t is defined in +/* Define HAVE_SOCKLEN_T if the type socklen_t is defined in /usr/include/sys/socket.h. */ #undef HAVE_AFUNIX_H From b300da96c151ce0a3341bc9090304ba152e39e32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonin=20D=C3=A9cimo?= Date: Tue, 31 Dec 2024 13:10:46 +0100 Subject: [PATCH 17/22] configure: check for SetThreadDescription on native Windows only --- configure | 22 ++++++++++++++-------- configure.ac | 17 +++++++---------- otherlibs/systhreads/st_stubs.c | 6 +++--- runtime/caml/s.h.in | 4 ++-- 4 files changed, 26 insertions(+), 23 deletions(-) diff --git a/configure b/configure index 1c7f2880c21a..46a015b114ac 100755 --- a/configure +++ b/configure @@ -22407,6 +22407,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ## SetThreadDescription +case $target in #( + *-mingw*|*-windows) : for ac_func in SetThreadDescription do : @@ -22414,20 +22416,24 @@ do : if test "x$ac_cv_func_SetThreadDescription" = xyes then : printf "%s\n" "#define HAVE_SETTHREADDESCRIPTION 1" >>confdefs.h - printf "%s\n" "#define HAS_SETTHREADDESCRIPTION 1" >>confdefs.h - - ac_fn_check_decl "$LINENO" "SetThreadDescription" "ac_cv_have_decl_SetThreadDescription" "#define WIN32_LEAN_AND_MEAN - #include - #include + ac_fn_check_decl "$LINENO" "SetThreadDescription" "ac_cv_have_decl_SetThreadDescription" "#define WIN32_LEAN_AND_MEAN +#include +#include " "$ac_c_undeclared_builtin_options" "CFLAGS" if test "x$ac_cv_have_decl_SetThreadDescription" = xyes then : - printf "%s\n" "#define HAS_DECL_SETTHREADDESCRIPTION 1" >>confdefs.h - + ac_have_decl=1 +else $as_nop + ac_have_decl=0 fi +printf "%s\n" "#define HAVE_DECL_SETTHREADDESCRIPTION $ac_have_decl" >>confdefs.h + fi -done +done ;; #( + *) : + ;; +esac ## Activate the systhread library diff --git a/configure.ac b/configure.ac index 208ae27ae820..4118329a0c09 100644 --- a/configure.ac +++ b/configure.ac @@ -2362,16 +2362,13 @@ AC_LINK_IFELSE( [AC_MSG_RESULT([pthread_getaffinity_np not found])])]) ## SetThreadDescription -AC_CHECK_FUNCS( - [SetThreadDescription], - [AC_DEFINE([HAS_SETTHREADDESCRIPTION], [1]) - AC_CHECK_DECL( - [SetThreadDescription], - [AC_DEFINE([HAS_DECL_SETTHREADDESCRIPTION], [1])], - [], - [[#define WIN32_LEAN_AND_MEAN - #include - #include ]])]) +AS_CASE([$target], + [*-mingw*|*-windows], + [AC_CHECK_FUNCS([SetThreadDescription], + [AC_CHECK_DECLS([SetThreadDescription], [], [], +[[#define WIN32_LEAN_AND_MEAN +#include +#include ]])])]) ## Activate the systhread library diff --git a/otherlibs/systhreads/st_stubs.c b/otherlibs/systhreads/st_stubs.c index d2481b2c587e..7f13e17c77a8 100644 --- a/otherlibs/systhreads/st_stubs.c +++ b/otherlibs/systhreads/st_stubs.c @@ -24,8 +24,8 @@ # include # include "caml/osdeps.h" -# if defined(HAS_SETTHREADDESCRIPTION) && \ - !defined(HAS_DECL_SETTHREADDESCRIPTION) +# if defined(HAVE_SETTHREADDESCRIPTION) && \ + !defined(HAVE_DECL_SETTHREADDESCRIPTION) WINBASEAPI HRESULT WINAPI SetThreadDescription(HANDLE hThread, PCWSTR lpThreadDescription); # endif @@ -985,7 +985,7 @@ CAMLprim value caml_set_current_thread_name(value name) { #if defined(_WIN32) -# if defined(HAS_SETTHREADDESCRIPTION) +# if defined(HAVE_SETTHREADDESCRIPTION) wchar_t *thread_name = caml_stat_strdup_to_utf16(String_val(name)); SetThreadDescription(GetCurrentThread(), thread_name); caml_stat_free(thread_name); diff --git a/runtime/caml/s.h.in b/runtime/caml/s.h.in index 0d34dbe791c2..0140c42710bc 100644 --- a/runtime/caml/s.h.in +++ b/runtime/caml/s.h.in @@ -116,9 +116,9 @@ #undef HAVE_PTHREAD_SET_NAME_NP -#undef HAS_SETTHREADDESCRIPTION +#undef HAVE_SETTHREADDESCRIPTION -#undef HAS_DECL_SETTHREADDESCRIPTION +#undef HAVE_DECL_SETTHREADDESCRIPTION #undef HAS_DIRENT From d12aa82a6a00eeea05ebfb14061cc60e311eff52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonin=20D=C3=A9cimo?= Date: Fri, 24 May 2024 16:38:24 +0200 Subject: [PATCH 18/22] Use Autoconf SIZEOF_LONG_{P,_LONG} instead of SIZEOF_{PTR,LONGLONG} Respectively. --- configure | 5 ----- configure.ac | 3 --- runtime/caml/compatibility.h | 8 ++++++++ runtime/caml/config.h | 8 ++++---- runtime/caml/m.h.in | 10 +++++----- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/configure b/configure index 46a015b114ac..ba84972970b4 100755 --- a/configure +++ b/configure @@ -17531,11 +17531,6 @@ then : fi -printf "%s\n" "#define SIZEOF_PTR $ac_cv_sizeof_long_p" >>confdefs.h - -printf "%s\n" "#define SIZEOF_LONGLONG $ac_cv_sizeof_long_long" >>confdefs.h - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Target is a $bits bits architecture" >&5 printf "%s\n" "$as_me: Target is a $bits bits architecture" >&6;} diff --git a/configure.ac b/configure.ac index 4118329a0c09..96e38b485170 100644 --- a/configure.ac +++ b/configure.ac @@ -1288,9 +1288,6 @@ AS_IF( [AC_MSG_ERROR([Sorry, we can't find a 64-bit integer type.])] ) -AC_DEFINE_UNQUOTED([SIZEOF_PTR], [$ac_cv_sizeof_long_p]) -AC_DEFINE_UNQUOTED([SIZEOF_LONGLONG], [$ac_cv_sizeof_long_long]) - AC_MSG_NOTICE([Target is a $bits bits architecture]) AC_C_BIGENDIAN( diff --git a/runtime/caml/compatibility.h b/runtime/caml/compatibility.h index b9c729e2d19c..cf209656f71a 100644 --- a/runtime/caml/compatibility.h +++ b/runtime/caml/compatibility.h @@ -213,6 +213,14 @@ #define HAS_SOCKLEN_T 1 #endif +#ifdef SIZEOF_LONG_P +#define SIZEOF_PTR SIZEOF_LONG_P +#endif + +#ifdef SIZEOF_LONG_LONG +#define SIZEOF_LONGLONG SIZEOF_LONG_LONG +#endif + #ifdef HAVE_WORKING_FMA #define HAS_WORKING_FMA 1 #endif diff --git a/runtime/caml/config.h b/runtime/caml/config.h index 5aa62d6714b6..3d6c63475a74 100644 --- a/runtime/caml/config.h +++ b/runtime/caml/config.h @@ -106,7 +106,7 @@ #define ARCH_INT64_TYPE long #define ARCH_UINT64_TYPE unsigned long #define ARCH_INT64_PRINTF_FORMAT "l" - #elif SIZEOF_LONGLONG == 8 + #elif SIZEOF_LONG_LONG == 8 #define ARCH_INT64_TYPE long long #define ARCH_UINT64_TYPE unsigned long long #define ARCH_INT64_PRINTF_FORMAT "ll" @@ -115,17 +115,17 @@ #endif #endif -#if SIZEOF_PTR == SIZEOF_LONG +#if SIZEOF_LONG_P == SIZEOF_LONG /* Standard models: ILP32 or I32LP64 */ typedef long intnat; typedef unsigned long uintnat; #define ARCH_INTNAT_PRINTF_FORMAT "l" -#elif SIZEOF_PTR == SIZEOF_INT +#elif SIZEOF_LONG_P == SIZEOF_INT /* Hypothetical IP32L64 model */ typedef int intnat; typedef unsigned int uintnat; #define ARCH_INTNAT_PRINTF_FORMAT "" -#elif SIZEOF_PTR == 8 +#elif SIZEOF_LONG_P == 8 /* Win64 model: IL32P64 */ typedef int64_t intnat; typedef uint64_t uintnat; diff --git a/runtime/caml/m.h.in b/runtime/caml/m.h.in index d771d26083b6..4aa44846914b 100644 --- a/runtime/caml/m.h.in +++ b/runtime/caml/m.h.in @@ -45,13 +45,13 @@ #undef SIZEOF_INT #undef SIZEOF_LONG -#undef SIZEOF_PTR +#undef SIZEOF_LONG_P #undef SIZEOF_SHORT -#undef SIZEOF_LONGLONG +#undef SIZEOF_LONG_LONG -/* Define SIZEOF_INT, SIZEOF_LONG, SIZEOF_PTR, SIZEOF_SHORT and - SIZEOF_LONGLONG to the sizes in bytes of the C types "int", "long", - "char *", "short" and "long long" respectively. */ +/* Define SIZEOF_INT, SIZEOF_LONG, SIZEOF_LONG_P, SIZEOF_SHORT and + SIZEOF_LONG_LONG to the sizes in bytes of the C types "int", "long", + "long *", "short" and "long long" respectively. */ #undef ARCH_ALIGN_INT64 From 8a62d92604cf37020b917a7ea93356abffe52740 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonin=20D=C3=A9cimo?= Date: Mon, 8 Jul 2024 23:44:15 +0200 Subject: [PATCH 19/22] Prefer Autoconf's default WORDS_BIGENDIAN name --- Makefile.config.in | 3 --- configure | 11 +++-------- configure.ac | 8 +------- runtime/array.c | 2 +- runtime/bigarray.c | 12 ++++++------ runtime/caml/compatibility.h | 4 ++++ runtime/caml/config.h | 2 +- runtime/caml/m.h.in | 6 +++--- runtime/caml/mlvalues.h | 2 +- runtime/extern.c | 6 +++--- runtime/fix_code.c | 4 ++-- runtime/floats.c | 2 +- runtime/hash.c | 4 ++-- runtime/intern.c | 6 +++--- runtime/lexing.c | 2 +- runtime/md5.c | 2 +- runtime/meta.c | 2 +- runtime/parsing.c | 2 +- runtime/startup_byt.c | 2 +- runtime/str.c | 12 ++++++------ runtime/sys.c | 4 ++-- 21 files changed, 44 insertions(+), 54 deletions(-) diff --git a/Makefile.config.in b/Makefile.config.in index bdac1cf47bcb..35ac9c7d8606 100644 --- a/Makefile.config.in +++ b/Makefile.config.in @@ -120,9 +120,6 @@ ARCH=@arch@ # Whether the architecture has 64 bits ARCH64=@arch64@ -# Endianness for this architecture -ENDIANNESS=@endianness@ - ### Name of architecture model for the native-code compiler. ### Some architectures come in several slightly different flavors ### that share a common code generator. This variable tailors the diff --git a/configure b/configure index ba84972970b4..ba589b94420d 100755 --- a/configure +++ b/configure @@ -832,7 +832,6 @@ sharedlib_cflags asm_size_type_directives asm_cfi_supported AS -endianness ASPP ocamltest_opt_target ocamltest_target @@ -3588,7 +3587,6 @@ LINEAR_MAGIC_NUMBER=Caml1999L035 - ## Generated files @@ -17753,13 +17751,10 @@ fi printf "%s\n" "$ac_cv_c_bigendian" >&6; } case $ac_cv_c_bigendian in #( yes) - - printf "%s\n" "#define ARCH_BIG_ENDIAN 1" >>confdefs.h - - endianness="be" - ;; #( + printf "%s\n" "#define WORDS_BIGENDIAN 1" >>confdefs.h +;; #( no) - endianness="le" ;; #( + ;; #( universal) as_fn_error $? "unable to handle universal endianness" "$LINENO" 5 diff --git a/configure.ac b/configure.ac index 96e38b485170..88a03bc02e63 100644 --- a/configure.ac +++ b/configure.ac @@ -227,7 +227,6 @@ AC_SUBST([ocamltest]) AC_SUBST([ocamltest_target]) AC_SUBST([ocamltest_opt_target]) AC_SUBST([ASPP]) -AC_SUBST([endianness]) AC_SUBST([AS]) AC_SUBST([asm_cfi_supported]) AC_SUBST([asm_size_type_directives]) @@ -1290,12 +1289,7 @@ AS_IF( AC_MSG_NOTICE([Target is a $bits bits architecture]) -AC_C_BIGENDIAN( - [ - AC_DEFINE([ARCH_BIG_ENDIAN], [1]) - [endianness="be"] - ], - [endianness="le"], +AC_C_BIGENDIAN([], [], [AC_MSG_ERROR([could not determine endianness.])], [AC_MSG_ERROR([unable to handle universal endianness])] ) diff --git a/runtime/array.c b/runtime/array.c index d08289d92778..6c4f972c6f7a 100644 --- a/runtime/array.c +++ b/runtime/array.c @@ -274,7 +274,7 @@ CAMLprim value caml_array_create_float(value len) Caml_out_of_heap_header(Double_wosize, Double_tag), #if defined(ARCH_SIXTYFOUR) 0x7FF0000000000001 -#elif defined(ARCH_BIG_ENDIAN) +#elif defined(WORDS_BIGENDIAN) 0x7FF00000, 0x00000001, #else 0x00000001, 0x7FF00000 diff --git a/runtime/bigarray.c b/runtime/bigarray.c index bd3ce896eb10..c301d283d8e2 100644 --- a/runtime/bigarray.c +++ b/runtime/bigarray.c @@ -792,7 +792,7 @@ CAMLprim value caml_ba_uint8_get16(value vb, value vind) if (idx < 0 || idx >= b->dim[0] - 1) caml_array_bound_error(); b1 = ((unsigned char*) b->data)[idx]; b2 = ((unsigned char*) b->data)[idx+1]; -#ifdef ARCH_BIG_ENDIAN +#ifdef WORDS_BIGENDIAN res = b1 << 8 | b2; #else res = b2 << 8 | b1; @@ -811,7 +811,7 @@ CAMLprim value caml_ba_uint8_get32(value vb, value vind) b2 = ((unsigned char*) b->data)[idx+1]; b3 = ((unsigned char*) b->data)[idx+2]; b4 = ((unsigned char*) b->data)[idx+3]; -#ifdef ARCH_BIG_ENDIAN +#ifdef WORDS_BIGENDIAN res = b1 << 24 | b2 << 16 | b3 << 8 | b4; #else res = b4 << 24 | b3 << 16 | b2 << 8 | b1; @@ -834,7 +834,7 @@ CAMLprim value caml_ba_uint8_get64(value vb, value vind) b6 = ((unsigned char*) b->data)[idx+5]; b7 = ((unsigned char*) b->data)[idx+6]; b8 = ((unsigned char*) b->data)[idx+7]; -#ifdef ARCH_BIG_ENDIAN +#ifdef WORDS_BIGENDIAN res = (uint64_t) b1 << 56 | (uint64_t) b2 << 48 | (uint64_t) b3 << 40 | (uint64_t) b4 << 32 | (uint64_t) b5 << 24 | (uint64_t) b6 << 16 @@ -941,7 +941,7 @@ CAMLprim value caml_ba_uint8_set16(value vb, value vind, value newval) struct caml_ba_array * b = Caml_ba_array_val(vb); if (idx < 0 || idx >= b->dim[0] - 1) caml_array_bound_error(); val = Long_val(newval); -#ifdef ARCH_BIG_ENDIAN +#ifdef WORDS_BIGENDIAN b1 = 0xFF & val >> 8; b2 = 0xFF & val; #else @@ -961,7 +961,7 @@ CAMLprim value caml_ba_uint8_set32(value vb, value vind, value newval) struct caml_ba_array * b = Caml_ba_array_val(vb); if (idx < 0 || idx >= b->dim[0] - 3) caml_array_bound_error(); val = Int32_val(newval); -#ifdef ARCH_BIG_ENDIAN +#ifdef WORDS_BIGENDIAN b1 = 0xFF & val >> 24; b2 = 0xFF & val >> 16; b3 = 0xFF & val >> 8; @@ -987,7 +987,7 @@ CAMLprim value caml_ba_uint8_set64(value vb, value vind, value newval) struct caml_ba_array * b = Caml_ba_array_val(vb); if (idx < 0 || idx >= b->dim[0] - 7) caml_array_bound_error(); val = Int64_val(newval); -#ifdef ARCH_BIG_ENDIAN +#ifdef WORDS_BIGENDIAN b1 = 0xFF & val >> 56; b2 = 0xFF & val >> 48; b3 = 0xFF & val >> 40; diff --git a/runtime/caml/compatibility.h b/runtime/caml/compatibility.h index cf209656f71a..edfe4741b67e 100644 --- a/runtime/caml/compatibility.h +++ b/runtime/caml/compatibility.h @@ -17,6 +17,10 @@ #ifndef CAML_COMPATIBILITY_H #define CAML_COMPATIBILITY_H +#ifdef WORDS_BIGENDIAN +#define ARCH_BIG_ENDIAN 1 +#endif + #define HAS_STDINT_H 1 /* Deprecated since OCaml 5.3 */ /* HAS_NANOSECOND_STAT is deprecated since OCaml 5.3 */ diff --git a/runtime/caml/config.h b/runtime/caml/config.h index 3d6c63475a74..fda582dcb793 100644 --- a/runtime/caml/config.h +++ b/runtime/caml/config.h @@ -150,7 +150,7 @@ typedef uint64_t uintnat; #if defined(__arm__) && !defined(__ARM_EABI__) #define ARCH_FLOAT_ENDIANNESS 0x45670123 -#elif defined(ARCH_BIG_ENDIAN) +#elif defined(WORDS_BIGENDIAN) #define ARCH_FLOAT_ENDIANNESS 0x76543210 #else #define ARCH_FLOAT_ENDIANNESS 0x01234567 diff --git a/runtime/caml/m.h.in b/runtime/caml/m.h.in index 4aa44846914b..6b18b85feb36 100644 --- a/runtime/caml/m.h.in +++ b/runtime/caml/m.h.in @@ -22,11 +22,11 @@ Otherwise, leave ARCH_SIXTYFOUR undefined. This assumes sizeof(char *) = 4. */ -#undef ARCH_BIG_ENDIAN +#undef WORDS_BIGENDIAN -/* Define ARCH_BIG_ENDIAN if the processor is big endian (the most +/* Define WORDS_BIGENDIAN if the processor is big endian (the most significant byte of an integer stored in memory comes first). - Leave ARCH_BIG_ENDIAN undefined if the processor is little-endian + Leave WORDS_BIGENDIAN undefined if the processor is little-endian (the least significant byte comes first). */ diff --git a/runtime/caml/mlvalues.h b/runtime/caml/mlvalues.h index 73eea54b3442..eb169d37dd3f 100644 --- a/runtime/caml/mlvalues.h +++ b/runtime/caml/mlvalues.h @@ -228,7 +228,7 @@ CAMLno_tsan_for_perf Caml_inline header_t Hd_val(value val) #define Reserved_val(val) (Reserved_hd (Hd_val (val))) -#ifdef ARCH_BIG_ENDIAN +#ifdef WORDS_BIGENDIAN #define Tag_val(val) (((volatile unsigned char *) (val)) [-1]) /* Also an l-value. */ #define Tag_hp(hp) (((volatile unsigned char *) (hp)) [sizeof(value)-1]) diff --git a/runtime/extern.c b/runtime/extern.c index dcb860957d75..cf52d68a380e 100644 --- a/runtime/extern.c +++ b/runtime/extern.c @@ -1193,7 +1193,7 @@ CAMLexport void caml_serialize_block_2(void * data, intnat len) struct caml_extern_state* s = get_extern_state (); if (s->extern_ptr + 2 * len > s->extern_limit) grow_extern_output(s, 2 * len); -#ifndef ARCH_BIG_ENDIAN +#ifndef WORDS_BIGENDIAN { unsigned char * p; char * q; @@ -1212,7 +1212,7 @@ CAMLexport void caml_serialize_block_4(void * data, intnat len) struct caml_extern_state* s = get_extern_state (); if (s->extern_ptr + 4 * len > s->extern_limit) grow_extern_output(s, 4 * len); -#ifndef ARCH_BIG_ENDIAN +#ifndef WORDS_BIGENDIAN { unsigned char * p; char * q; @@ -1231,7 +1231,7 @@ CAMLexport void caml_serialize_block_8(void * data, intnat len) struct caml_extern_state* s = get_extern_state (); if (s->extern_ptr + 8 * len > s->extern_limit) grow_extern_output(s, 8 * len); -#ifndef ARCH_BIG_ENDIAN +#ifndef WORDS_BIGENDIAN { unsigned char * p; char * q; diff --git a/runtime/fix_code.c b/runtime/fix_code.c index b6e5fde3fc1c..30bb359531b2 100644 --- a/runtime/fix_code.c +++ b/runtime/fix_code.c @@ -55,7 +55,7 @@ void caml_load_code(int fd, asize_t len) caml_fatal_error("truncated bytecode file"); caml_init_code_fragments(); /* Prepare the code for execution */ -#ifdef ARCH_BIG_ENDIAN +#ifdef WORDS_BIGENDIAN caml_fixup_endianness(caml_start_code, caml_code_size); #endif #ifdef THREADED_CODE @@ -65,7 +65,7 @@ void caml_load_code(int fd, asize_t len) /* This code is needed only if the processor is big endian */ -#ifdef ARCH_BIG_ENDIAN +#ifdef WORDS_BIGENDIAN void caml_fixup_endianness(code_t code, asize_t len) { diff --git a/runtime/floats.c b/runtime/floats.c index caf5ad345d4e..d4675ff386a6 100644 --- a/runtime/floats.c +++ b/runtime/floats.c @@ -1059,7 +1059,7 @@ CAMLprim value caml_erfc_float(value f) union double_as_two_int32 { double d; -#if defined(ARCH_BIG_ENDIAN) || (defined(__arm__) && !defined(__ARM_EABI__)) +#if defined(WORDS_BIGENDIAN) || (defined(__arm__) && !defined(__ARM_EABI__)) struct { uint32_t h; uint32_t l; } i; #else struct { uint32_t l; uint32_t h; } i; diff --git a/runtime/hash.c b/runtime/hash.c index 017862265409..4fc74d37b758 100644 --- a/runtime/hash.c +++ b/runtime/hash.c @@ -90,7 +90,7 @@ CAMLexport uint32_t caml_hash_mix_double(uint32_t hash, double d) { union { double d; -#if defined(ARCH_BIG_ENDIAN) || (defined(__arm__) && !defined(__ARM_EABI__)) +#if defined(WORDS_BIGENDIAN) || (defined(__arm__) && !defined(__ARM_EABI__)) struct { uint32_t h; uint32_t l; } i; #else struct { uint32_t l; uint32_t h; } i; @@ -150,7 +150,7 @@ CAMLexport uint32_t caml_hash_mix_string(uint32_t h, value s) /* Mix by 32-bit blocks (little-endian) */ for (i = 0; i + 4 <= len; i += 4) { -#ifdef ARCH_BIG_ENDIAN +#ifdef WORDS_BIGENDIAN w = Byte_u(s, i) | (Byte_u(s, i+1) << 8) | (Byte_u(s, i+2) << 16) diff --git a/runtime/intern.c b/runtime/intern.c index bc293b579d5d..a379dd9e0353 100644 --- a/runtime/intern.c +++ b/runtime/intern.c @@ -1149,7 +1149,7 @@ CAMLexport void caml_deserialize_block_1(void * data, intnat len) CAMLexport void caml_deserialize_block_2(void * data, intnat len) { struct caml_intern_state* s = get_intern_state (); -#ifndef ARCH_BIG_ENDIAN +#ifndef WORDS_BIGENDIAN const unsigned char * p, * q; for (p = s->intern_src, q = data; len > 0; len--, p += 2, q += 2) Reverse_16(q, p); @@ -1163,7 +1163,7 @@ CAMLexport void caml_deserialize_block_2(void * data, intnat len) CAMLexport void caml_deserialize_block_4(void * data, intnat len) { struct caml_intern_state* s = get_intern_state (); -#ifndef ARCH_BIG_ENDIAN +#ifndef WORDS_BIGENDIAN const unsigned char * p, * q; for (p = s->intern_src, q = data; len > 0; len--, p += 4, q += 4) Reverse_32(q, p); @@ -1177,7 +1177,7 @@ CAMLexport void caml_deserialize_block_4(void * data, intnat len) CAMLexport void caml_deserialize_block_8(void * data, intnat len) { struct caml_intern_state* s = get_intern_state (); -#ifndef ARCH_BIG_ENDIAN +#ifndef WORDS_BIGENDIAN const unsigned char * p, * q; for (p = s->intern_src, q = data; len > 0; len--, p += 8, q += 8) Reverse_64(q, p); diff --git a/runtime/lexing.c b/runtime/lexing.c index 16776869ad74..20d00eb87f43 100644 --- a/runtime/lexing.c +++ b/runtime/lexing.c @@ -50,7 +50,7 @@ struct lexing_table { value lex_code; }; -#if defined(ARCH_BIG_ENDIAN) || SIZEOF_SHORT != 2 +#if defined(WORDS_BIGENDIAN) || SIZEOF_SHORT != 2 #define Short(tbl,n) \ (*((unsigned char *)((tbl) + (n) * 2)) + \ (*((signed char *)((tbl) + (n) * 2 + 1)) << 8)) diff --git a/runtime/md5.c b/runtime/md5.c index 9f70b998251b..e2429331d6dc 100644 --- a/runtime/md5.c +++ b/runtime/md5.c @@ -105,7 +105,7 @@ CAMLexport void caml_md5_block(unsigned char digest[16], * will fill a supplied 16-byte array with the digest. */ -#ifndef ARCH_BIG_ENDIAN +#ifndef WORDS_BIGENDIAN #define byteReverse(buf, len) /* Nothing */ #else static void byteReverse(unsigned char * buf, unsigned longs) diff --git a/runtime/meta.c b/runtime/meta.c index ae19074e5fdb..519057a55f76 100644 --- a/runtime/meta.c +++ b/runtime/meta.c @@ -68,7 +68,7 @@ CAMLprim value caml_reify_bytecode(value ls_prog, prog = caml_stat_alloc(len + sizeof(opcode_t) * 2 /* for 'RETURN 1' */); memcpy(prog, Caml_ba_data_val(ls_prog), len); -#ifdef ARCH_BIG_ENDIAN +#ifdef WORDS_BIGENDIAN caml_fixup_endianness(prog, len); #endif prog[len / sizeof(opcode_t)] = RETURN; diff --git a/runtime/parsing.c b/runtime/parsing.c index c50b96ae14ed..d793fa7dda44 100644 --- a/runtime/parsing.c +++ b/runtime/parsing.c @@ -65,7 +65,7 @@ struct parser_env { /* Mirrors parser_env in ../stdlib/parsing.ml */ value errflag; }; -#if defined(ARCH_BIG_ENDIAN) || SIZEOF_SHORT != 2 +#if defined(WORDS_BIGENDIAN) || SIZEOF_SHORT != 2 #define Short(tbl,n) \ (*((unsigned char *)((tbl) + (n) * 2)) + \ (*((signed char *)((tbl) + (n) * 2 + 1)) << 8)) diff --git a/runtime/startup_byt.c b/runtime/startup_byt.c index ca13c9011f24..c41408d13442 100644 --- a/runtime/startup_byt.c +++ b/runtime/startup_byt.c @@ -89,7 +89,7 @@ static void error(const char *msg, ...) static void fixup_endianness_trailer(uint32_t * p) { -#ifndef ARCH_BIG_ENDIAN +#ifndef WORDS_BIGENDIAN Reverse_32(p, p); #endif } diff --git a/runtime/str.c b/runtime/str.c index 6a86c898848b..7eca9246f768 100644 --- a/runtime/str.c +++ b/runtime/str.c @@ -118,7 +118,7 @@ CAMLprim value caml_string_get16(value str, value index) if (idx < 0 || idx + 1 >= caml_string_length(str)) caml_array_bound_error(); b1 = Byte_u(str, idx); b2 = Byte_u(str, idx + 1); -#ifdef ARCH_BIG_ENDIAN +#ifdef WORDS_BIGENDIAN res = b1 << 8 | b2; #else res = b2 << 8 | b1; @@ -141,7 +141,7 @@ CAMLprim value caml_string_get32(value str, value index) b2 = Byte_u(str, idx + 1); b3 = Byte_u(str, idx + 2); b4 = Byte_u(str, idx + 3); -#ifdef ARCH_BIG_ENDIAN +#ifdef WORDS_BIGENDIAN res = b1 << 24 | b2 << 16 | b3 << 8 | b4; #else res = b4 << 24 | b3 << 16 | b2 << 8 | b1; @@ -168,7 +168,7 @@ CAMLprim value caml_string_get64(value str, value index) b6 = Byte_u(str, idx + 5); b7 = Byte_u(str, idx + 6); b8 = Byte_u(str, idx + 7); -#ifdef ARCH_BIG_ENDIAN +#ifdef WORDS_BIGENDIAN res = (uint64_t) b1 << 56 | (uint64_t) b2 << 48 | (uint64_t) b3 << 40 | (uint64_t) b4 << 32 | (uint64_t) b5 << 24 | (uint64_t) b6 << 16 @@ -194,7 +194,7 @@ CAMLprim value caml_bytes_set16(value str, value index, value newval) intnat idx = Long_val(index); if (idx < 0 || idx + 1 >= caml_string_length(str)) caml_array_bound_error(); val = Long_val(newval); -#ifdef ARCH_BIG_ENDIAN +#ifdef WORDS_BIGENDIAN b1 = 0xFF & val >> 8; b2 = 0xFF & val; #else @@ -213,7 +213,7 @@ CAMLprim value caml_bytes_set32(value str, value index, value newval) intnat idx = Long_val(index); if (idx < 0 || idx + 3 >= caml_string_length(str)) caml_array_bound_error(); val = Int32_val(newval); -#ifdef ARCH_BIG_ENDIAN +#ifdef WORDS_BIGENDIAN b1 = 0xFF & val >> 24; b2 = 0xFF & val >> 16; b3 = 0xFF & val >> 8; @@ -238,7 +238,7 @@ CAMLprim value caml_bytes_set64(value str, value index, value newval) intnat idx = Long_val(index); if (idx < 0 || idx + 7 >= caml_string_length(str)) caml_array_bound_error(); val = Int64_val(newval); -#ifdef ARCH_BIG_ENDIAN +#ifdef WORDS_BIGENDIAN b1 = 0xFF & val >> 56; b2 = 0xFF & val >> 48; b3 = 0xFF & val >> 40; diff --git a/runtime/sys.c b/runtime/sys.c index 8ddb28d5ce9d..14429da20855 100644 --- a/runtime/sys.c +++ b/runtime/sys.c @@ -682,7 +682,7 @@ CAMLprim value caml_sys_random_seed(value unit) CAMLprim value caml_sys_const_big_endian(value unit) { -#ifdef ARCH_BIG_ENDIAN +#ifdef WORDS_BIGENDIAN return Val_true; #else return Val_false; @@ -740,7 +740,7 @@ CAMLprim value caml_sys_get_config(value unit) result = caml_alloc_small (3, 0); Field(result, 0) = ostype; Field(result, 1) = Val_long (8 * sizeof(value)); -#ifdef ARCH_BIG_ENDIAN +#ifdef WORDS_BIGENDIAN Field(result, 2) = Val_true; #else Field(result, 2) = Val_false; From 7913af349f495daf639886798d4aa51e9ac7db25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonin=20D=C3=A9cimo?= Date: Mon, 8 Jul 2024 23:31:07 +0200 Subject: [PATCH 20/22] Move non-generated macros to compatibility.h --- runtime/caml/compatibility.h | 3 +++ runtime/caml/m.h.in | 4 ---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/runtime/caml/compatibility.h b/runtime/caml/compatibility.h index edfe4741b67e..8ee174de3db9 100644 --- a/runtime/caml/compatibility.h +++ b/runtime/caml/compatibility.h @@ -21,6 +21,9 @@ #define ARCH_BIG_ENDIAN 1 #endif +#define NO_NAKED_POINTERS 1 +#define CAML_SAFE_STRING 1 + #define HAS_STDINT_H 1 /* Deprecated since OCaml 5.3 */ /* HAS_NANOSECOND_STAT is deprecated since OCaml 5.3 */ diff --git a/runtime/caml/m.h.in b/runtime/caml/m.h.in index 6b18b85feb36..91796be97c20 100644 --- a/runtime/caml/m.h.in +++ b/runtime/caml/m.h.in @@ -71,12 +71,8 @@ #undef WITH_FRAME_POINTERS -#define NO_NAKED_POINTERS 1 - #undef CAML_WITH_FPIC -#define CAML_SAFE_STRING 1 - #undef FLAT_FLOAT_ARRAY #undef FUNCTION_SECTIONS From ae8c17d31b4643aad3d6e0181c9a42b5d374eacc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonin=20D=C3=A9cimo?= Date: Fri, 21 Jun 2024 13:34:05 +0200 Subject: [PATCH 21/22] configure: single AC_DEFINE per macro --- configure | 1374 ++--------------------------- configure.ac | 89 +- otherlibs/unix/accept_unix.c | 2 +- otherlibs/unix/addrofstr.c | 4 +- otherlibs/unix/bind_unix.c | 2 +- otherlibs/unix/caml/socketaddr.h | 6 +- otherlibs/unix/channels_unix.c | 4 +- otherlibs/unix/connect_unix.c | 2 +- otherlibs/unix/getaddrinfo.c | 2 +- otherlibs/unix/gethost.c | 6 +- otherlibs/unix/getnameinfo.c | 2 +- otherlibs/unix/getpeername_unix.c | 2 +- otherlibs/unix/getproto.c | 2 +- otherlibs/unix/getserv.c | 2 +- otherlibs/unix/getsockname_unix.c | 2 +- otherlibs/unix/listen_unix.c | 2 +- otherlibs/unix/sendrecv_unix.c | 2 +- otherlibs/unix/shutdown_unix.c | 2 +- otherlibs/unix/socket_unix.c | 4 +- otherlibs/unix/socketaddr.c | 8 +- otherlibs/unix/socketpair_unix.c | 2 +- otherlibs/unix/socketpair_win32.c | 4 +- otherlibs/unix/sockopt_unix.c | 2 +- otherlibs/unix/strofaddr.c | 4 +- runtime/caml/compatibility.h | 16 + runtime/caml/config.h | 4 +- runtime/caml/m.h.in | 6 +- runtime/caml/s.h.in | 8 +- runtime/debugger.c | 2 +- runtime/floats.c | 4 +- 30 files changed, 187 insertions(+), 1384 deletions(-) diff --git a/configure b/configure index ba589b94420d..0dad4db4d458 100755 --- a/configure +++ b/configure @@ -731,14 +731,6 @@ DIRECT_LD INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM -LDFLAGS_FOR_BUILD -CPPFLAGS_FOR_BUILD -CFLAGS_FOR_BUILD -BUILD_OBJEXT -BUILD_EXEEXT -CPP_FOR_BUILD -ac_ct_CC_FOR_BUILD -CC_FOR_BUILD flexlink CPP ac_ct_DEP_CC @@ -15748,1272 +15740,69 @@ esac mkexe_cmd_exp="$CC" +have_arch_code32=false case $ocaml_cc_vendor,$target in #( *,x86_64-*-darwin*) : oc_ldflags='-Wl,-no_compact_unwind'; - printf "%s\n" "#define HAS_ARCH_CODE32 1" >>confdefs.h - ;; #( - *,aarch64-*-darwin*|*,arm64-*-darwin*) : - printf "%s\n" "#define HAS_ARCH_CODE32 1" >>confdefs.h - ;; #( - *,*-*-cygwin) : - common_cppflags="$common_cppflags -U_WIN32" - if $supports_shared_libraries -then : - mkexe_cmd_exp="flexlink -exe -chain ${flexdll_chain} ${flexlink_flags}" - mkexe_cmd="flexlink -exe -chain ${flexdll_chain} ${flexlink_flags}" - mkexe_ldflags_prefix='-link ' -else $as_nop - mkexe_extra_flags='' - oc_ldflags='-Wl,--stack,16777216' - -fi - ostype="Cygwin" ;; #( - *,*-w64-mingw32*) : - case $target in #( - i686-*-*) : - oc_dll_ldflags="-static-libgcc" ;; #( - *) : - ;; -esac - ostype="Win32" - toolchain="mingw" - mkexe_cmd_exp="flexlink -exe -chain ${flexdll_chain} ${flexlink_flags}" - mkexe_cmd="flexlink -exe -chain ${flexdll_chain} ${flexlink_flags}" - mkexe_ldflags_prefix='-link ' - oc_exe_ldflags='-municode' - mkexe_extra_flags="$mkexe_ldflags_prefix$oc_exe_ldflags" - SO="dll" ;; #( - *,*-pc-windows) : - toolchain=msvc - ostype="Win32" - mkexe_cmd_exp="flexlink -exe -chain ${flexdll_chain} ${flexlink_flags}" - mkexe_cmd="flexlink -exe -chain ${flexdll_chain} ${flexlink_flags}" - mkexe_ldflags_prefix='-link ' - mkexe_via_cc_ldflags_prefix='/link ' - oc_exe_ldflags='/ENTRY:wmainCRTStartup' - mkexe_extra_flags="$mkexe_ldflags_prefix$oc_exe_ldflags" - mkexedebugflag='' ;; #( - *,x86_64-*-linux*) : - printf "%s\n" "#define HAS_ARCH_CODE32 1" >>confdefs.h - ;; #( - xlc-*,powerpc-ibm-aix*) : - oc_ldflags='-brtl -bexpfull' - printf "%s\n" "#define HAS_ARCH_CODE32 1" >>confdefs.h - ;; #( - gcc-*,powerpc-*-linux*) : - oc_ldflags="-mbss-plt" ;; #( - *) : - ;; -esac - -# How to build sak - -if test x"$build" = x"$target" -o x"$target_runnable" = xtrue -then : - case $target in #( - *-pc-windows) : - SAK_BUILD="\$(CC) \$(OC_CFLAGS) \$(CFLAGS) \$(OC_CPPFLAGS) \$(CPPFLAGS) \$(2) /link /out:\$(1) $oc_exe_ldflags \$(OC_LDFLAGS) \$(LDFLAGS)" ;; #( - *) : - SAK_BUILD='$(MKEXE_VIA_CC) $(OC_CFLAGS) $(CFLAGS) $(OC_CPPFLAGS) $(CPPFLAGS)' ;; -esac - SAK="\$(ROOTDIR)/runtime/sak${EXEEXT}" -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: detecting the C toolchain for build" >&5 -printf "%s\n" "$as_me: detecting the C toolchain for build" >&6;} - -ac_cv_host_exeext=$ac_cv_exeext -if test ${ac_cv_build_exeext+y} -then : - ac_cv_exeext=$ac_cv_build_exeext -else $as_nop - { ac_cv_exeext=; unset ac_cv_exeext;} -fi -ac_cv_host_objext=$ac_cv_objext -if test ${ac_cv_build_objext+y} -then : - ac_cv_objext=$ac_cv_build_objext -else $as_nop - { ac_cv_objext=; unset ac_cv_objext;} -fi -ac_cv_host_c_compiler_gnu=$ac_cv_c_compiler_gnu -if test ${ac_cv_build_c_compiler_gnu+y} -then : - ac_cv_c_compiler_gnu=$ac_cv_build_c_compiler_gnu -else $as_nop - { ac_cv_c_compiler_gnu=; unset ac_cv_c_compiler_gnu;} -fi - -cross_compiling_build=no - -ac_build_tool_prefix= -if test -n "$build" -then : - ac_build_tool_prefix="$build-" -elif test -n "$build_alias" -then : - ac_build_tool_prefix="$build_alias-" -fi - -ac_ext=c -ac_cpp='$CPP_FOR_BUILD $CPPFLAGS_FOR_BUILD' -ac_compile='$CC_FOR_BUILD -c $CFLAGS_FOR_BUILD $CPPFLAGS_FOR_BUILD conftest.$ac_ext >&5' -ac_link='$CC_FOR_BUILD -o conftest$ac_build_exeext $CFLAGS_FOR_BUILD $CPPFLAGS_FOR_BUILD $LDFLAGS_FOR_BUILD conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -ac_ext=c -ac_cpp='$CPP_FOR_BUILD $CPPFLAGS_FOR_BUILD' -ac_compile='$CC_FOR_BUILD -c $CFLAGS_FOR_BUILD $CPPFLAGS_FOR_BUILD conftest.$ac_ext >&5' -ac_link='$CC_FOR_BUILD -o conftest$ac_build_exeext $CFLAGS_FOR_BUILD $CPPFLAGS_FOR_BUILD $LDFLAGS_FOR_BUILD conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test -n "$ac_build_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. -set dummy ${ac_build_tool_prefix}gcc; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC_FOR_BUILD+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$CC_FOR_BUILD"; then - ac_cv_prog_CC_FOR_BUILD="$CC_FOR_BUILD" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_CC_FOR_BUILD="${ac_build_tool_prefix}gcc" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC_FOR_BUILD=$ac_cv_prog_CC_FOR_BUILD -if test -n "$CC_FOR_BUILD"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC_FOR_BUILD" >&5 -printf "%s\n" "$CC_FOR_BUILD" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_CC_FOR_BUILD"; then - ac_ct_CC_FOR_BUILD=$CC_FOR_BUILD - # Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_CC_FOR_BUILD+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_CC_FOR_BUILD"; then - ac_cv_prog_ac_ct_CC_FOR_BUILD="$ac_ct_CC_FOR_BUILD" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC_FOR_BUILD="gcc" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC_FOR_BUILD=$ac_cv_prog_ac_ct_CC_FOR_BUILD -if test -n "$ac_ct_CC_FOR_BUILD"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC_FOR_BUILD" >&5 -printf "%s\n" "$ac_ct_CC_FOR_BUILD" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - if test "x$ac_ct_CC_FOR_BUILD" = x; then - CC_FOR_BUILD="" - else - case $cross_compiling_build:$ac_tool_warned in -yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with build triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with build triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC_FOR_BUILD=$ac_ct_CC_FOR_BUILD - fi -else - CC_FOR_BUILD="$ac_cv_prog_CC_FOR_BUILD" -fi - -if test -z "$CC_FOR_BUILD"; then - if test -n "$ac_build_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. -set dummy ${ac_build_tool_prefix}cc; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC_FOR_BUILD+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$CC_FOR_BUILD"; then - ac_cv_prog_CC_FOR_BUILD="$CC_FOR_BUILD" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_CC_FOR_BUILD="${ac_build_tool_prefix}cc" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC_FOR_BUILD=$ac_cv_prog_CC_FOR_BUILD -if test -n "$CC_FOR_BUILD"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC_FOR_BUILD" >&5 -printf "%s\n" "$CC_FOR_BUILD" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - - fi -fi -if test -z "$CC_FOR_BUILD"; then - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC_FOR_BUILD+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$CC_FOR_BUILD"; then - ac_cv_prog_CC_FOR_BUILD="$CC_FOR_BUILD" # Let the user override the test. -else - ac_prog_rejected=no -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC_FOR_BUILD="cc" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC_FOR_BUILD - shift - if test $# != 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC_FOR_BUILD to just the basename; use the full file name. - shift - ac_cv_prog_CC_FOR_BUILD="$as_dir$ac_word${1+' '}$@" - fi -fi -fi -fi -CC_FOR_BUILD=$ac_cv_prog_CC_FOR_BUILD -if test -n "$CC_FOR_BUILD"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC_FOR_BUILD" >&5 -printf "%s\n" "$CC_FOR_BUILD" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - -fi -if test -z "$CC_FOR_BUILD"; then - if test -n "$ac_build_tool_prefix"; then - for ac_prog in cl.exe - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_build_tool_prefix$ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC_FOR_BUILD+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$CC_FOR_BUILD"; then - ac_cv_prog_CC_FOR_BUILD="$CC_FOR_BUILD" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_CC_FOR_BUILD="$ac_build_tool_prefix$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC_FOR_BUILD=$ac_cv_prog_CC_FOR_BUILD -if test -n "$CC_FOR_BUILD"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC_FOR_BUILD" >&5 -printf "%s\n" "$CC_FOR_BUILD" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - - test -n "$CC_FOR_BUILD" && break - done -fi -if test -z "$CC_FOR_BUILD"; then - ac_ct_CC_FOR_BUILD=$CC_FOR_BUILD - for ac_prog in cl.exe -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_CC_FOR_BUILD+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_CC_FOR_BUILD"; then - ac_cv_prog_ac_ct_CC_FOR_BUILD="$ac_ct_CC_FOR_BUILD" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC_FOR_BUILD="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC_FOR_BUILD=$ac_cv_prog_ac_ct_CC_FOR_BUILD -if test -n "$ac_ct_CC_FOR_BUILD"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC_FOR_BUILD" >&5 -printf "%s\n" "$ac_ct_CC_FOR_BUILD" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - - test -n "$ac_ct_CC_FOR_BUILD" && break -done - - if test "x$ac_ct_CC_FOR_BUILD" = x; then - CC_FOR_BUILD="" - else - case $cross_compiling_build:$ac_tool_warned in -yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with build triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with build triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC_FOR_BUILD=$ac_ct_CC_FOR_BUILD - fi -fi - -fi -if test -z "$CC_FOR_BUILD"; then - if test -n "$ac_build_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args. -set dummy ${ac_build_tool_prefix}clang; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC_FOR_BUILD+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$CC_FOR_BUILD"; then - ac_cv_prog_CC_FOR_BUILD="$CC_FOR_BUILD" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_CC_FOR_BUILD="${ac_build_tool_prefix}clang" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC_FOR_BUILD=$ac_cv_prog_CC_FOR_BUILD -if test -n "$CC_FOR_BUILD"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC_FOR_BUILD" >&5 -printf "%s\n" "$CC_FOR_BUILD" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_CC_FOR_BUILD"; then - ac_ct_CC_FOR_BUILD=$CC_FOR_BUILD - # Extract the first word of "clang", so it can be a program name with args. -set dummy clang; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_CC_FOR_BUILD+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_CC_FOR_BUILD"; then - ac_cv_prog_ac_ct_CC_FOR_BUILD="$ac_ct_CC_FOR_BUILD" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC_FOR_BUILD="clang" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC_FOR_BUILD=$ac_cv_prog_ac_ct_CC_FOR_BUILD -if test -n "$ac_ct_CC_FOR_BUILD"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC_FOR_BUILD" >&5 -printf "%s\n" "$ac_ct_CC_FOR_BUILD" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - if test "x$ac_ct_CC_FOR_BUILD" = x; then - CC_FOR_BUILD="" - else - case $cross_compiling_build:$ac_tool_warned in -yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with build triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with build triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC_FOR_BUILD=$ac_ct_CC_FOR_BUILD - fi -else - CC_FOR_BUILD="$ac_cv_prog_CC_FOR_BUILD" -fi - -fi - - -test -z "$CC_FOR_BUILD" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "no acceptable C compiler found in \$PATH -See \`config.log' for more details" "$LINENO" 5; } - -# Provide some information about the compiler. -printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion -version; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5 -printf %s "checking whether the compiler supports GNU C... " >&6; } -if test ${ac_cv_c_compiler_gnu+y} -then : - printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main (void) -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - ac_compiler_gnu=yes -else $as_nop - ac_compiler_gnu=no -fi -rm -f core conftest.err conftest.$ac_build_objext conftest.beam conftest.$ac_ext -ac_cv_c_compiler_gnu=$ac_compiler_gnu - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; } -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -if test $ac_compiler_gnu = yes; then - GCC_FOR_BUILD=yes -else - GCC_FOR_BUILD= -fi -ac_test_CFLAGS=${CFLAGS_FOR_BUILD+y} -ac_save_CFLAGS=$CFLAGS_FOR_BUILD -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC_FOR_BUILD accepts -g" >&5 -printf %s "checking whether $CC_FOR_BUILD accepts -g... " >&6; } -if test ${ac_cv_build_prog_cc_g+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_save_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - ac_cv_build_prog_cc_g=no - CFLAGS_FOR_BUILD="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main (void) -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - ac_cv_build_prog_cc_g=yes -else $as_nop - CFLAGS_FOR_BUILD="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main (void) -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - -else $as_nop - ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS_FOR_BUILD="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main (void) -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - ac_cv_build_prog_cc_g=yes -fi -rm -f core conftest.err conftest.$ac_build_objext conftest.beam conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_build_objext conftest.beam conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_build_objext conftest.beam conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build_prog_cc_g" >&5 -printf "%s\n" "$ac_cv_build_prog_cc_g" >&6; } -if test $ac_test_CFLAGS; then - CFLAGS_FOR_BUILD=$ac_save_CFLAGS -elif test $ac_cv_build_prog_cc_g = yes; then - if test "$GCC_FOR_BUILD" = yes; then - CFLAGS_FOR_BUILD="-g -O2" - else - CFLAGS_FOR_BUILD="-g" - fi -else - if test "$GCC_FOR_BUILD" = yes; then - CFLAGS_FOR_BUILD="-O2" - else - CFLAGS_FOR_BUILD= - fi -fi -ac_build_prog_cc_stdc=no -if test x$ac_build_prog_cc_stdc = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC_FOR_BUILD option to enable C11 features" >&5 -printf %s "checking for $CC_FOR_BUILD option to enable C11 features... " >&6; } -if test ${ac_cv_build_prog_cc_c11+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_cv_build_prog_cc_c11=no -ac_save_CC=$CC_FOR_BUILD -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_c_conftest_c11_program -_ACEOF -for ac_arg in '' -std=gnu11 -do - CC_FOR_BUILD="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO" -then : - ac_cv_build_prog_cc_c11=$ac_arg -fi -rm -f core conftest.err conftest.$ac_build_objext conftest.beam - test "x$ac_cv_build_prog_cc_c11" != "xno" && break -done -rm -f conftest.$ac_ext -CC_FOR_BUILD=$ac_save_CC -fi - -if test "x$ac_cv_build_prog_cc_c11" = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_build_prog_cc_c11" = x -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build_prog_cc_c11" >&5 -printf "%s\n" "$ac_cv_build_prog_cc_c11" >&6; } - CC_FOR_BUILD="$CC_FOR_BUILD $ac_cv_build_prog_cc_c11" -fi - ac_cv_build_prog_cc_stdc=$ac_cv_build_prog_cc_c11 - ac_build_prog_cc_stdc=c11 -fi -fi -if test x$ac_build_prog_cc_stdc = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC_FOR_BUILD option to enable C99 features" >&5 -printf %s "checking for $CC_FOR_BUILD option to enable C99 features... " >&6; } -if test ${ac_cv_build_prog_cc_c99+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_cv_build_prog_cc_c99=no -ac_save_CC=$CC_FOR_BUILD -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_c_conftest_c99_program -_ACEOF -for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99= -do - CC_FOR_BUILD="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO" -then : - ac_cv_build_prog_cc_c99=$ac_arg -fi -rm -f core conftest.err conftest.$ac_build_objext conftest.beam - test "x$ac_cv_build_prog_cc_c99" != "xno" && break -done -rm -f conftest.$ac_ext -CC_FOR_BUILD=$ac_save_CC -fi - -if test "x$ac_cv_build_prog_cc_c99" = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_build_prog_cc_c99" = x -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build_prog_cc_c99" >&5 -printf "%s\n" "$ac_cv_build_prog_cc_c99" >&6; } - CC_FOR_BUILD="$CC_FOR_BUILD $ac_cv_build_prog_cc_c99" -fi - ac_cv_build_prog_cc_stdc=$ac_cv_build_prog_cc_c99 - ac_build_prog_cc_stdc=c99 -fi -fi -if test x$ac_build_prog_cc_stdc = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC_FOR_BUILD option to enable C89 features" >&5 -printf %s "checking for $CC_FOR_BUILD option to enable C89 features... " >&6; } -if test ${ac_cv_build_prog_cc_c89+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_cv_build_prog_cc_c89=no -ac_save_CC=$CC_FOR_BUILD -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_c_conftest_c89_program -_ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC_FOR_BUILD="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO" -then : - ac_cv_build_prog_cc_c89=$ac_arg -fi -rm -f core conftest.err conftest.$ac_build_objext conftest.beam - test "x$ac_cv_build_prog_cc_c89" != "xno" && break -done -rm -f conftest.$ac_ext -CC_FOR_BUILD=$ac_save_CC -fi - -if test "x$ac_cv_build_prog_cc_c89" = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_build_prog_cc_c89" = x -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build_prog_cc_c89" >&5 -printf "%s\n" "$ac_cv_build_prog_cc_c89" >&6; } - CC_FOR_BUILD="$CC_FOR_BUILD $ac_cv_build_prog_cc_c89" -fi - ac_cv_build_prog_cc_stdc=$ac_cv_build_prog_cc_c89 - ac_build_prog_cc_stdc=c89 -fi -fi - -ac_ext=c -ac_cpp='$CPP_FOR_BUILD $CPPFLAGS_FOR_BUILD' -ac_compile='$CC_FOR_BUILD -c $CFLAGS_FOR_BUILD $CPPFLAGS_FOR_BUILD conftest.$ac_ext >&5' -ac_link='$CC_FOR_BUILD -o conftest$ac_build_exeext $CFLAGS_FOR_BUILD $CPPFLAGS_FOR_BUILD $LDFLAGS_FOR_BUILD conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main (void) -{ - - ; - return 0; -} -_ACEOF -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" -# Try to create an executable without -o first, disregard a.out. -# It will help us diagnose broken compilers, and finding out an intuition -# of exeext. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 -printf %s "checking whether the C compiler works... " >&6; } -ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'` - -# The possible output files: -ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" - -ac_rmfiles= -for ac_file in $ac_files -do - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - * ) ac_rmfiles="$ac_rmfiles $ac_file";; - esac -done -rm -f $ac_rmfiles - -if { { ac_try="$ac_link_default" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 - (eval "$ac_link_default") 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -then : - # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. -# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' -# in a Makefile. We should not override ac_cv_exeext if it was cached, -# so that the user can short-circuit this test for compilers unknown to -# Autoconf. -for ac_file in $ac_files '' -do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) - ;; - [ab].out ) - # We found the default executable, but exeext='' is most - # certainly right. - break;; - *.* ) - if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no; - then :; else - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - fi - # We set ac_cv_exeext here because the later test for it is not - # safe: cross compilers may not add the suffix if given an `-o' - # argument, so we may need to know it at that point already. - # Even if this section looks crufty: it has the advantage of - # actually working. - break;; - * ) - break;; - esac -done -test "$ac_cv_exeext" = no && ac_cv_exeext= - -else $as_nop - ac_file='' -fi -if test -z "$ac_file" -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -printf "%s\n" "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "C compiler cannot create executables -See \`config.log' for more details" "$LINENO" 5; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 -printf %s "checking for C compiler default output file name... " >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 -printf "%s\n" "$ac_file" >&6; } -ac_build_exeext=$ac_cv_exeext - -rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out -ac_clean_files=$ac_clean_files_save -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 -printf %s "checking for suffix of executables... " >&6; } -if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -then : - # If both `conftest.exe' and `conftest' are `present' (well, observable) -# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will -# work properly (i.e., refer to `conftest.exe'), while it won't with -# `rm'. -for ac_file in conftest.exe conftest conftest.*; do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - break;; - * ) break;; - esac -done -else $as_nop - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details" "$LINENO" 5; } -fi -rm -f conftest conftest$ac_cv_exeext -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 -printf "%s\n" "$ac_cv_exeext" >&6; } - -rm -f conftest.$ac_ext -EXEEXT=$ac_cv_exeext -ac_build_exeext=$EXEEXT -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main (void) -{ -FILE *f = fopen ("conftest.out", "w"); - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_ACEOF -ac_clean_files="$ac_clean_files conftest.out" -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 -printf %s "checking whether we are cross compiling... " >&6; } -if test "$cross_compiling_build" != yes; then - { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if { ac_try='./conftest$ac_cv_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then - cross_compiling_build=no - else - if test "$cross_compiling_build" = maybe; then - cross_compiling_build=yes - else - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot run C compiled programs. -If you meant to cross compile, use \`--build'. -See \`config.log' for more details" "$LINENO" 5; } - fi - fi -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling_build" >&5 -printf "%s\n" "$cross_compiling_build" >&6; } - -rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out -ac_clean_files=$ac_clean_files_save - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 -printf %s "checking for suffix of object files... " >&6; } -if test ${ac_cv_objext+y} -then : - printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main (void) -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.o conftest.obj -if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -then : - for ac_file in conftest.o conftest.obj conftest.*; do - test -f "$ac_file" || continue; - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; - *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` - break;; - esac -done -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot compute suffix of object files: cannot compile -See \`config.log' for more details" "$LINENO" 5; } -fi -rm -f conftest.$ac_cv_objext conftest.$ac_ext -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 -printf "%s\n" "$ac_cv_objext" >&6; } -OBJEXT=$ac_cv_objext -ac_build_objext=$OBJEXT - -ac_ext=c -ac_cpp='$CPP_FOR_BUILD $CPPFLAGS_FOR_BUILD' -ac_compile='$CC_FOR_BUILD -c $CFLAGS_FOR_BUILD $CPPFLAGS_FOR_BUILD conftest.$ac_ext >&5' -ac_link='$CC_FOR_BUILD -o conftest$ac_build_exeext $CFLAGS_FOR_BUILD $CPPFLAGS_FOR_BUILD $LDFLAGS_FOR_BUILD conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 -printf %s "checking how to run the C preprocessor... " >&6; } -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP_FOR_BUILD" && test -d "$CPP_FOR_BUILD"; then - CPP_FOR_BUILD= -fi -if test -z "$CPP_FOR_BUILD"; then - if test ${ac_cv_build_prog_CPP+y} -then : - printf %s "(cached) " >&6 -else $as_nop - # Double quotes because $CC needs to be expanded - for CPP_FOR_BUILD in "$CC_FOR_BUILD -E" "$CC_FOR_BUILD -E -traditional-cpp" cpp /lib/cpp - do - ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO" -then : - -else $as_nop - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO" -then : - # Broken: success on invalid input. -continue -else $as_nop - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok -then : - break -fi - - done - ac_cv_build_prog_CPP=$CPP_FOR_BUILD - -fi - CPP_FOR_BUILD=$ac_cv_build_prog_CPP -else - ac_cv_build_prog_CPP=$CPP_FOR_BUILD -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP_FOR_BUILD" >&5 -printf "%s\n" "$CPP_FOR_BUILD" >&6; } -ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO" + have_arch_code32=true ;; #( + *,aarch64-*-darwin*|*,arm64-*-darwin*) : + have_arch_code32=true ;; #( + *,*-*-cygwin*) : + common_cppflags="$common_cppflags -U_WIN32" + if $supports_shared_libraries then : - + mkexe_cmd_exp="flexlink -exe -chain ${flexdll_chain} ${flexlink_flags}" + mkexe_cmd="flexlink -exe -chain ${flexdll_chain} ${flexlink_flags}" + mkexe_ldflags_prefix='-link ' else $as_nop - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext + mkexe_extra_flags='' + oc_ldflags='-Wl,--stack,16777216' - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO" -then : - # Broken: success on invalid input. -continue -else $as_nop - # Passes both tests. -ac_preproc_ok=: -break fi -rm -f conftest.err conftest.i conftest.$ac_ext + ostype="Cygwin" ;; #( + *,*-w64-mingw32*) : + case $target in #( + i686-*-*) : + oc_dll_ldflags="-static-libgcc" ;; #( + *) : + ;; +esac + ostype="Win32" + toolchain="mingw" + mkexe_cmd_exp="flexlink -exe -chain ${flexdll_chain} ${flexlink_flags}" + mkexe_cmd="flexlink -exe -chain ${flexdll_chain} ${flexlink_flags}" + mkexe_ldflags_prefix='-link ' + oc_exe_ldflags='-municode' + mkexe_extra_flags="$mkexe_ldflags_prefix$oc_exe_ldflags" + SO="dll" ;; #( + *,*-pc-windows) : + toolchain=msvc + ostype="Win32" + mkexe_cmd_exp="flexlink -exe -chain ${flexdll_chain} ${flexlink_flags}" + mkexe_cmd="flexlink -exe -chain ${flexdll_chain} ${flexlink_flags}" + mkexe_ldflags_prefix='-link ' + mkexe_via_cc_ldflags_prefix='/link ' + oc_exe_ldflags='/ENTRY:wmainCRTStartup' + mkexe_extra_flags="$mkexe_ldflags_prefix$oc_exe_ldflags" + mkexedebugflag='' ;; #( + *,x86_64-*-linux*) : + have_arch_code32=true ;; #( + xlc-*,powerpc-ibm-aix*) : + oc_ldflags='-brtl -bexpfull' + have_arch_code32=true ;; #( + gcc-*,powerpc-*-linux*) : + oc_ldflags="-mbss-plt" ;; #( + *) : + ;; +esac -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok +if ${have_arch_code32} then : -else $as_nop - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "C preprocessor \"$CPP_FOR_BUILD\" fails sanity check -See \`config.log' for more details" "$LINENO" 5; } -fi - -ac_ext=c -ac_cpp='$CPP_FOR_BUILD $CPPFLAGS_FOR_BUILD' -ac_compile='$CC_FOR_BUILD -c $CFLAGS_FOR_BUILD $CPPFLAGS_FOR_BUILD conftest.$ac_ext >&5' -ac_link='$CC_FOR_BUILD -o conftest$ac_build_exeext $CFLAGS_FOR_BUILD $CPPFLAGS_FOR_BUILD $LDFLAGS_FOR_BUILD conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -BUILD_EXEEXT=$ac_cv_exeext -BUILD_OBJEXT=$ac_cv_objext - -ac_cv_exeext=$ac_cv_host_exeext -EXEEXT=$ac_cv_host_exeext -ac_cv_objext=$ac_cv_host_objext -OBJEXT=$ac_cv_host_objext -ac_cv_c_compiler_gnu=$ac_cv_host_c_compiler_gnu -ac_compiler_gnu=$ac_cv_host_c_compiler_gnu - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - +printf "%s\n" "#define HAVE_ARCH_CODE32 1" >>confdefs.h - - # Note that *-pc-windows is not supported for _build_ so we can use '-o' - SAK_BUILD="$CC_FOR_BUILD $LDFLAGS_FOR_BUILD -o \$(1) \$(2) $CFLAGS_FOR_BUILD $CPPFLAGS_FOR_BUILD" - SAK="\$(ROOTDIR)/runtime/sak${BUILD_EXEEXT}" fi -# sak command to use to encode C literal strings - -case $target in #( - *-w64-mingw32*|*-pc-windows) : - encode_C_literal="encode-C-utf16-literal" ;; #( - *) : - encode_C_literal="encode-C-utf8-literal" ;; -esac - # Winpthreads emulation library for the MSVC port { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for winpthreads sources" >&5 printf %s "checking for winpthreads sources... " >&6; } @@ -17880,16 +16669,17 @@ fi test "$ac_cv_alignof_long" -gt 4 then : align_int64=true - printf "%s\n" "#define ARCH_ALIGN_INT64 1" >>confdefs.h - else $as_nop if test "x$ac_cv_sizeof_long_long" = "x8" && test "$ac_cv_alignof_long_long" -gt 4 then : align_int64=true - printf "%s\n" "#define ARCH_ALIGN_INT64 1" >>confdefs.h - fi +fi + if $align_int64 +then : + printf "%s\n" "#define ARCH_ALIGN_INT64 1" >>confdefs.h + fi ;; esac @@ -20009,7 +18799,8 @@ esac if $sockets then : - printf "%s\n" "#define HAS_SOCKETS 1" >>confdefs.h + +printf "%s\n" "#define HAVE_SOCKETS 1" >>confdefs.h fi @@ -20058,7 +18849,7 @@ esac ## IPv6 support -ipv6=true +have_ipv6=true case $target in #( *-w64-mingw32*|*-pc-windows) : @@ -20068,7 +18859,7 @@ if test "x$ac_cv_type_struct_sockaddr_in6" = xyes then : else $as_nop - ipv6=false + have_ipv6=false fi ;; #( *) : @@ -20083,13 +18874,13 @@ if test "x$ac_cv_type_struct_sockaddr_in6" = xyes then : else $as_nop - ipv6=false + have_ipv6=false fi ;; esac -if $ipv6 +if $have_ipv6 then : for ac_func in getaddrinfo getnameinfo inet_pton inet_ntop @@ -20103,16 +18894,11 @@ then : _ACEOF else $as_nop - ipv6=false + $have_ipv6=false fi done fi -if $ipv6 -then : - printf "%s\n" "#define HAS_IPV6 1" >>confdefs.h - -fi ## utime case $target in #( @@ -23146,24 +21932,36 @@ else $as_nop esac fi -# Define a few macros that were defined in config/m-nt.h -# but whose value is not guessed properly by configure -# (all this should be understood and fixed) +# Define a few macros that were defined in config/m-nt.h but which values are +# not guessed properly by configure (all this should be understood and fixed) +have_broken_printf=false case $target in #( - *-w64-mingw32*|*-pc-windows) : - printf "%s\n" "#define HAS_BROKEN_PRINTF 1" >>confdefs.h - - printf "%s\n" "#define HAS_IPV6 1" >>confdefs.h - ;; #( + *-w64-mingw32*) : + have_broken_printf=true + have_ipv6=true ;; #( + *-pc-windows) : + have_broken_printf=true + have_ipv6=true ;; #( *-*-solaris*) : - # This is required as otherwise floats are printed - # as "Infinity" and "Inf" instead of the expected "inf" - printf "%s\n" "#define HAS_BROKEN_PRINTF 1" >>confdefs.h - ;; #( + have_broken_printf=true ;; #( *) : ;; esac +if ${have_broken_printf} +then : + +printf "%s\n" "#define HAVE_BROKEN_PRINTF 1" >>confdefs.h + +fi + +if $have_ipv6 +then : + +printf "%s\n" "#define HAVE_IPV6 1" >>confdefs.h + +fi + # Do not permanently cache the result of flexdll.h unset ac_cv_header_flexdll_h diff --git a/configure.ac b/configure.ac index 88a03bc02e63..d595701f06d3 100644 --- a/configure.ac +++ b/configure.ac @@ -1123,13 +1123,14 @@ AS_CASE([$flexdll_source_dir,$supports_shared_libraries,$flexlink,$target], mkexe_cmd_exp="$CC" +have_arch_code32=false AS_CASE([$ocaml_cc_vendor,$target], [*,x86_64-*-darwin*], [oc_ldflags='-Wl,-no_compact_unwind'; - AC_DEFINE([HAS_ARCH_CODE32], [1])], + have_arch_code32=true], [*,aarch64-*-darwin*|*,arm64-*-darwin*], - AC_DEFINE([HAS_ARCH_CODE32], [1]), - [*,*-*-cygwin], + [have_arch_code32=true], + [*,*-*-cygwin*], [common_cppflags="$common_cppflags -U_WIN32" AS_IF([$supports_shared_libraries], [mkexe_cmd_exp="flexlink -exe -chain ${flexdll_chain} ${flexlink_flags}" @@ -1161,37 +1162,18 @@ AS_CASE([$ocaml_cc_vendor,$target], mkexe_extra_flags="$mkexe_ldflags_prefix$oc_exe_ldflags" mkexedebugflag=''], [*,x86_64-*-linux*], - AC_DEFINE([HAS_ARCH_CODE32], [1]), + [have_arch_code32=true], [xlc-*,powerpc-ibm-aix*], [oc_ldflags='-brtl -bexpfull' - AC_DEFINE([HAS_ARCH_CODE32], [1])], + have_arch_code32=true], [gcc-*,powerpc-*-linux*], [oc_ldflags="-mbss-plt"]) -# How to build sak - -AS_IF([test x"$build" = x"$target" -o x"$target_runnable" = xtrue], - [AS_CASE([$target], - [*-pc-windows], - [SAK_BUILD=m4_normalize([ - "\$(CC) \$(OC_CFLAGS) \$(CFLAGS) \$(OC_CPPFLAGS) \$(CPPFLAGS) \$(2) - /link /out:\$(1) $oc_exe_ldflags \$(OC_LDFLAGS) \$(LDFLAGS)"])], - [SAK_BUILD=m4_normalize([ - '$(MKEXE_VIA_CC) $(OC_CFLAGS) $(CFLAGS) $(OC_CPPFLAGS) $(CPPFLAGS)'])]) - SAK="\$(ROOTDIR)/runtime/sak${EXEEXT}"], - [AC_MSG_NOTICE([detecting the C toolchain for build]) - AX_PROG_CC_FOR_BUILD - # Note that *-pc-windows is not supported for _build_ so we can use '-o' - SAK_BUILD=m4_normalize(["$CC_FOR_BUILD $LDFLAGS_FOR_BUILD -o \$(1) \$(2) - $CFLAGS_FOR_BUILD $CPPFLAGS_FOR_BUILD"]) - SAK="\$(ROOTDIR)/runtime/sak${BUILD_EXEEXT}"]) - -# sak command to use to encode C literal strings - -AS_CASE([$target], - [*-w64-mingw32*|*-pc-windows], - [encode_C_literal="encode-C-utf16-literal"], - [encode_C_literal="encode-C-utf8-literal"]) +AS_IF([${have_arch_code32}], + [AC_DEFINE([HAVE_ARCH_CODE32], [1], [Define HAVE_ARCH_CODE32 if, on a 64-bit + machine, code pointers fit in 32 bits, i.e. the code segment resides in the + low 4G of the addressing space. + HAVE_ARCH_CODE32 is ignored on 32-bit machines.])]) # Winpthreads emulation library for the MSVC port AC_MSG_CHECKING([for winpthreads sources]) @@ -1309,12 +1291,11 @@ AS_IF([! $arch64], AC_DEFINE([ARCH_ALIGN_DOUBLE], [1])]) AS_IF([test "x$ac_cv_sizeof_long" = "x8" && test "$ac_cv_alignof_long" -gt 4], - [align_int64=true - AC_DEFINE([ARCH_ALIGN_INT64], [1])], + [align_int64=true], [AS_IF([test "x$ac_cv_sizeof_long_long" = "x8" && test "$ac_cv_alignof_long_long" -gt 4], - [align_int64=true - AC_DEFINE([ARCH_ALIGN_INT64], [1])])]) + [align_int64=true])]) + AS_IF([$align_int64], [AC_DEFINE([ARCH_ALIGN_INT64], [1])]) ])]) AC_CHECK_TYPES([max_align_t], [], [], [[#include ]]) @@ -2011,7 +1992,8 @@ AS_CASE([$target], ] ) -AS_IF([$sockets], [AC_DEFINE([HAS_SOCKETS], [1])]) +AS_IF([$sockets], + [AC_DEFINE([HAVE_SOCKETS], [1], [Define if you have BSD sockets.])]) ## socklen_t @@ -2028,14 +2010,14 @@ AS_CASE([$target], ## IPv6 support -ipv6=true +have_ipv6=true AS_CASE([$target], [*-w64-mingw32*|*-pc-windows], [AC_CHECK_TYPE( - [struct sockaddr_in6], [], [ipv6=false], [#include ])], + [struct sockaddr_in6], [], [have_ipv6=false], [#include ])], [AC_CHECK_TYPE( - [struct sockaddr_in6], [], [ipv6=false], + [struct sockaddr_in6], [], [have_ipv6=false], [ #include #include @@ -2044,11 +2026,9 @@ AS_CASE([$target], )] ) -AS_IF([$ipv6], +AS_IF([$have_ipv6], [AC_CHECK_FUNCS([getaddrinfo getnameinfo inet_pton inet_ntop], [], - [ipv6=false])]) -AS_IF([$ipv6], - [AC_DEFINE([HAS_IPV6], [1])]) + [$have_ipv6=false])]) ## utime AS_CASE([$target], @@ -2597,17 +2577,26 @@ AS_IF([test x"$prefix" = "xNONE"], [*-*-cygwin,*-w64-mingw32*|*-*-cygwin,*-pc-windows], [prefix="$(LC_ALL=C.UTF-8 cygpath -m "$prefix")"])]) -# Define a few macros that were defined in config/m-nt.h -# but whose value is not guessed properly by configure -# (all this should be understood and fixed) +# Define a few macros that were defined in config/m-nt.h but which values are +# not guessed properly by configure (all this should be understood and fixed) +have_broken_printf=false AS_CASE([$target], - [*-w64-mingw32*|*-pc-windows], - [AC_DEFINE([HAS_BROKEN_PRINTF], [1]) - AC_DEFINE([HAS_IPV6], [1])], + [*-w64-mingw32*], + [have_broken_printf=true + have_ipv6=true], + [*-pc-windows], + [have_broken_printf=true + have_ipv6=true], [*-*-solaris*], - # This is required as otherwise floats are printed - # as "Infinity" and "Inf" instead of the expected "inf" - [AC_DEFINE([HAS_BROKEN_PRINTF], [1])]) + [have_broken_printf=true]) + +AS_IF([${have_broken_printf}], + [AC_DEFINE([HAVE_BROKEN_PRINTF], [1], + [m4_normalize([Define if floats are printed as "Infinity" and "Inf" instead + of the expected "inf".])])]) + +AS_IF([$have_ipv6], + [AC_DEFINE([HAVE_IPV6], [1], [Define if IPv6 is supported.])]) # Do not permanently cache the result of flexdll.h unset ac_cv_header_flexdll_h diff --git a/otherlibs/unix/accept_unix.c b/otherlibs/unix/accept_unix.c index 3bd8ea280e11..e8e8a4bb2a67 100644 --- a/otherlibs/unix/accept_unix.c +++ b/otherlibs/unix/accept_unix.c @@ -21,7 +21,7 @@ #include #include "caml/unixsupport.h" -#ifdef HAS_SOCKETS +#ifdef HAVE_SOCKETS #include "caml/socketaddr.h" diff --git a/otherlibs/unix/addrofstr.c b/otherlibs/unix/addrofstr.c index 97179d670e94..948fcc0c4731 100644 --- a/otherlibs/unix/addrofstr.c +++ b/otherlibs/unix/addrofstr.c @@ -18,14 +18,14 @@ #include #include "caml/unixsupport.h" -#ifdef HAS_SOCKETS +#ifdef HAVE_SOCKETS #include "caml/socketaddr.h" CAMLprim value caml_unix_inet_addr_of_string(value s) { if (! caml_string_is_c_safe(s)) caml_failwith("inet_addr_of_string"); -#if defined(HAS_IPV6) +#if defined(HAVE_IPV6) #ifdef _WIN32 { CAMLparam1(s); diff --git a/otherlibs/unix/bind_unix.c b/otherlibs/unix/bind_unix.c index e550f998dd6f..74c1d04c3858 100644 --- a/otherlibs/unix/bind_unix.c +++ b/otherlibs/unix/bind_unix.c @@ -17,7 +17,7 @@ #include #include "caml/unixsupport.h" -#ifdef HAS_SOCKETS +#ifdef HAVE_SOCKETS #include "caml/socketaddr.h" diff --git a/otherlibs/unix/caml/socketaddr.h b/otherlibs/unix/caml/socketaddr.h index 74a7963784e2..cea717f93403 100644 --- a/otherlibs/unix/caml/socketaddr.h +++ b/otherlibs/unix/caml/socketaddr.h @@ -49,7 +49,7 @@ union sock_addr_union { struct sockaddr s_gen; struct sockaddr_un s_unix; struct sockaddr_in s_inet; -#ifdef HAS_IPV6 +#ifdef HAVE_IPV6 struct sockaddr_in6 s_inet6; #endif }; @@ -80,7 +80,7 @@ extern value caml_unix_alloc_sockaddr (union sock_addr_union * addr /*in*/, extern value caml_unix_alloc_inet_addr (struct in_addr * inaddr); #define GET_INET_ADDR(v) (*((struct in_addr *) (v))) -#ifdef HAS_IPV6 +#ifdef HAVE_IPV6 extern value caml_unix_alloc_inet6_addr (struct in6_addr * inaddr); #define GET_INET6_ADDR(v) (*((struct in6_addr *) (v))) @@ -88,7 +88,7 @@ extern value caml_unix_alloc_inet6_addr (struct in6_addr * inaddr); #ifndef CAML_BUILDING_UNIX #define alloc_inet6_addr caml_unix_alloc_inet6_addr #endif /* CAML_BUILDING_UNIX */ -#endif /* HAS_IPV6 */ +#endif /* HAVE_IPV6 */ #ifdef __cplusplus } diff --git a/otherlibs/unix/channels_unix.c b/otherlibs/unix/channels_unix.c index 152ba6ac6b95..30b1096c8a56 100644 --- a/otherlibs/unix/channels_unix.c +++ b/otherlibs/unix/channels_unix.c @@ -23,7 +23,7 @@ #include #include "caml/unixsupport.h" -#ifdef HAS_SOCKETS +#ifdef HAVE_SOCKETS #include #include "caml/socketaddr.h" #endif @@ -43,7 +43,7 @@ static int caml_unix_check_stream_semantics(int fd) case S_IFREG: case S_IFCHR: case S_IFIFO: /* These have stream semantics */ return 0; -#ifdef HAS_SOCKETS +#ifdef HAVE_SOCKETS case S_IFSOCK: { int so_type; socklen_param_type so_type_len = sizeof(so_type); diff --git a/otherlibs/unix/connect_unix.c b/otherlibs/unix/connect_unix.c index 90f3a6cb30d9..e40a0a548ef7 100644 --- a/otherlibs/unix/connect_unix.c +++ b/otherlibs/unix/connect_unix.c @@ -18,7 +18,7 @@ #include #include "caml/unixsupport.h" -#ifdef HAS_SOCKETS +#ifdef HAVE_SOCKETS #include "caml/socketaddr.h" diff --git a/otherlibs/unix/getaddrinfo.c b/otherlibs/unix/getaddrinfo.c index a7a164353e94..3998747c0796 100644 --- a/otherlibs/unix/getaddrinfo.c +++ b/otherlibs/unix/getaddrinfo.c @@ -23,7 +23,7 @@ #include "caml/unixsupport.h" #include "cst2constr.h" -#if defined(HAS_SOCKETS) && defined(HAS_IPV6) +#if defined(HAVE_SOCKETS) && defined(HAVE_IPV6) #include "caml/socketaddr.h" #ifndef _WIN32 diff --git a/otherlibs/unix/gethost.c b/otherlibs/unix/gethost.c index 8837e1425044..3fb4f850b1ec 100644 --- a/otherlibs/unix/gethost.c +++ b/otherlibs/unix/gethost.c @@ -23,7 +23,7 @@ #include #include "caml/unixsupport.h" -#ifdef HAS_SOCKETS +#ifdef HAVE_SOCKETS #include "caml/socketaddr.h" #ifndef _WIN32 @@ -84,7 +84,7 @@ CAMLprim value caml_unix_gethostbyaddr(value a) struct hostent * hp; int addr_type = AF_INET; socklen_t addr_len = 4; -#if HAS_IPV6 +#if HAVE_IPV6 struct in6_addr in6; if (caml_string_length(a) == 16) { addr_type = AF_INET6; @@ -95,7 +95,7 @@ CAMLprim value caml_unix_gethostbyaddr(value a) #endif in4 = GET_INET_ADDR(a); adr = (char *)&in4; -#if HAS_IPV6 +#if HAVE_IPV6 } #endif #if !defined(HAS_GETHOSTBYADDR_R) diff --git a/otherlibs/unix/getnameinfo.c b/otherlibs/unix/getnameinfo.c index 5d486525a50a..b807a719a9c0 100644 --- a/otherlibs/unix/getnameinfo.c +++ b/otherlibs/unix/getnameinfo.c @@ -21,7 +21,7 @@ #include #include "caml/unixsupport.h" -#if defined(HAS_SOCKETS) && defined(HAS_IPV6) +#if defined(HAVE_SOCKETS) && defined(HAVE_IPV6) #include "caml/socketaddr.h" #ifndef _WIN32 diff --git a/otherlibs/unix/getpeername_unix.c b/otherlibs/unix/getpeername_unix.c index 90aab9dd8ce1..3da1a3caf3bd 100644 --- a/otherlibs/unix/getpeername_unix.c +++ b/otherlibs/unix/getpeername_unix.c @@ -17,7 +17,7 @@ #include #include "caml/unixsupport.h" -#ifdef HAS_SOCKETS +#ifdef HAVE_SOCKETS #include "caml/socketaddr.h" diff --git a/otherlibs/unix/getproto.c b/otherlibs/unix/getproto.c index 2ee7a62eed5b..edd56a45ad21 100644 --- a/otherlibs/unix/getproto.c +++ b/otherlibs/unix/getproto.c @@ -19,7 +19,7 @@ #include #include "caml/unixsupport.h" -#ifdef HAS_SOCKETS +#ifdef HAVE_SOCKETS #ifndef _WIN32 #include diff --git a/otherlibs/unix/getserv.c b/otherlibs/unix/getserv.c index db322e196ce7..e3e13c2516c5 100644 --- a/otherlibs/unix/getserv.c +++ b/otherlibs/unix/getserv.c @@ -19,7 +19,7 @@ #include #include "caml/unixsupport.h" -#ifdef HAS_SOCKETS +#ifdef HAVE_SOCKETS #include diff --git a/otherlibs/unix/getsockname_unix.c b/otherlibs/unix/getsockname_unix.c index 6692929558c3..ceacd2ae7f06 100644 --- a/otherlibs/unix/getsockname_unix.c +++ b/otherlibs/unix/getsockname_unix.c @@ -17,7 +17,7 @@ #include #include "caml/unixsupport.h" -#ifdef HAS_SOCKETS +#ifdef HAVE_SOCKETS #include "caml/socketaddr.h" diff --git a/otherlibs/unix/listen_unix.c b/otherlibs/unix/listen_unix.c index 60bafa400db3..201d0a46d041 100644 --- a/otherlibs/unix/listen_unix.c +++ b/otherlibs/unix/listen_unix.c @@ -17,7 +17,7 @@ #include #include "caml/unixsupport.h" -#ifdef HAS_SOCKETS +#ifdef HAVE_SOCKETS #include diff --git a/otherlibs/unix/sendrecv_unix.c b/otherlibs/unix/sendrecv_unix.c index 7a85ff3808c5..ca790930c617 100644 --- a/otherlibs/unix/sendrecv_unix.c +++ b/otherlibs/unix/sendrecv_unix.c @@ -21,7 +21,7 @@ #include #include "caml/unixsupport.h" -#ifdef HAS_SOCKETS +#ifdef HAVE_SOCKETS #include "caml/socketaddr.h" static const int msg_flag_table[] = { diff --git a/otherlibs/unix/shutdown_unix.c b/otherlibs/unix/shutdown_unix.c index e5f682695748..2d192dc9f704 100644 --- a/otherlibs/unix/shutdown_unix.c +++ b/otherlibs/unix/shutdown_unix.c @@ -17,7 +17,7 @@ #include #include "caml/unixsupport.h" -#ifdef HAS_SOCKETS +#ifdef HAVE_SOCKETS #include diff --git a/otherlibs/unix/socket_unix.c b/otherlibs/unix/socket_unix.c index 452546281345..13de0927b2b6 100644 --- a/otherlibs/unix/socket_unix.c +++ b/otherlibs/unix/socket_unix.c @@ -18,14 +18,14 @@ #include #include "caml/unixsupport.h" -#ifdef HAS_SOCKETS +#ifdef HAVE_SOCKETS #include #include const int caml_unix_socket_domain_table[] = { PF_UNIX, PF_INET, -#if defined(HAS_IPV6) +#if defined(HAVE_IPV6) PF_INET6 #elif defined(PF_UNSPEC) PF_UNSPEC diff --git a/otherlibs/unix/socketaddr.c b/otherlibs/unix/socketaddr.c index b340eeba1392..b44faf520b45 100644 --- a/otherlibs/unix/socketaddr.c +++ b/otherlibs/unix/socketaddr.c @@ -20,7 +20,7 @@ #include #include "caml/unixsupport.h" -#ifdef HAS_SOCKETS +#ifdef HAVE_SOCKETS #include "caml/socketaddr.h" @@ -40,7 +40,7 @@ CAMLexport value caml_unix_alloc_inet_addr(struct in_addr * a) return res; } -#ifdef HAS_IPV6 +#ifdef HAVE_IPV6 CAMLexport value caml_unix_alloc_inet6_addr(struct in6_addr * a) { @@ -76,7 +76,7 @@ void caml_unix_get_sockaddr(value mladr, break; } case 1: /* ADDR_INET */ -#ifdef HAS_IPV6 +#ifdef HAVE_IPV6 if (caml_string_length(Field(mladr, 0)) == 16) { memset(&adr->s_inet6, 0, sizeof(struct sockaddr_in6)); adr->s_inet6.sin6_family = AF_INET6; @@ -152,7 +152,7 @@ value caml_unix_alloc_sockaddr(union sock_addr_union * adr /*in*/, Field(res,1) = Val_int(ntohs(adr->s_inet.sin_port)); break; } -#ifdef HAS_IPV6 +#ifdef HAVE_IPV6 case AF_INET6: { a = caml_unix_alloc_inet6_addr(&adr->s_inet6.sin6_addr); res = caml_alloc_small(2, 1); diff --git a/otherlibs/unix/socketpair_unix.c b/otherlibs/unix/socketpair_unix.c index a93c95502a67..b3340148b45d 100644 --- a/otherlibs/unix/socketpair_unix.c +++ b/otherlibs/unix/socketpair_unix.c @@ -18,7 +18,7 @@ #include #include "caml/unixsupport.h" -#ifdef HAS_SOCKETS +#ifdef HAVE_SOCKETS #include diff --git a/otherlibs/unix/socketpair_win32.c b/otherlibs/unix/socketpair_win32.c index e15c18970129..144553cfad9e 100644 --- a/otherlibs/unix/socketpair_win32.c +++ b/otherlibs/unix/socketpair_win32.c @@ -20,7 +20,7 @@ #include "caml/unixsupport.h" #include -#ifdef HAS_SOCKETS +#ifdef HAVE_SOCKETS #include "caml/socketaddr.h" #include @@ -200,4 +200,4 @@ CAMLprim value caml_unix_socketpair(value cloexec, value vdomain, value vtype, #endif /* HAVE_SOCKETPAIR */ -#endif /* HAS_SOCKETS */ +#endif /* HAVE_SOCKETS */ diff --git a/otherlibs/unix/sockopt_unix.c b/otherlibs/unix/sockopt_unix.c index 685ff1a905c0..f5bda0800ddd 100644 --- a/otherlibs/unix/sockopt_unix.c +++ b/otherlibs/unix/sockopt_unix.c @@ -20,7 +20,7 @@ #include #include "caml/unixsupport.h" -#ifdef HAS_SOCKETS +#ifdef HAVE_SOCKETS #include #include diff --git a/otherlibs/unix/strofaddr.c b/otherlibs/unix/strofaddr.c index 31276f7040c3..74daf75ebeed 100644 --- a/otherlibs/unix/strofaddr.c +++ b/otherlibs/unix/strofaddr.c @@ -18,14 +18,14 @@ #include #include "caml/unixsupport.h" -#ifdef HAS_SOCKETS +#ifdef HAVE_SOCKETS #include "caml/socketaddr.h" CAMLprim value caml_unix_string_of_inet_addr(value a) { char * res; -#ifdef HAS_IPV6 +#ifdef HAVE_IPV6 #ifdef _WIN32 char buffer[64]; union sock_addr_union sa; diff --git a/runtime/caml/compatibility.h b/runtime/caml/compatibility.h index 8ee174de3db9..011876a886e4 100644 --- a/runtime/caml/compatibility.h +++ b/runtime/caml/compatibility.h @@ -240,4 +240,20 @@ #define HAS_GETHOSTNAME 1 #endif +#ifdef HAVE_SOCKETS +#define HAS_SOCKETS 1 +#endif + +#ifdef HAVE_IPV6 +#define HAS_IPV6 1 +#endif + +#ifdef HAVE_BROKEN_PRINTF +#define HAS_BROKEN_PRINTF 1 +#endif + +#ifdef HAVE_ARCH_CODE32 +#define HAS_ARCH_CODE32 1 +#endif + #endif /* CAML_COMPATIBILITY_H */ diff --git a/runtime/caml/config.h b/runtime/caml/config.h index fda582dcb793..ab8db87b9b49 100644 --- a/runtime/caml/config.h +++ b/runtime/caml/config.h @@ -31,11 +31,11 @@ /* If supported, tell gcc that we can use 32-bit code addresses for * threaded code, unless we are compiled for a shared library (-fPIC option) */ -#ifdef HAS_ARCH_CODE32 +#ifdef HAVE_ARCH_CODE32 #ifndef __PIC__ # define ARCH_CODE32 #endif /* __PIC__ */ -#endif /* HAS_ARCH_CODE32 */ +#endif /* HAVE_ARCH_CODE32 */ /* No longer used in the codebase, but kept because it was exported */ #define INT64_LITERAL(s) s ## LL diff --git a/runtime/caml/m.h.in b/runtime/caml/m.h.in index 91796be97c20..d46401e7f770 100644 --- a/runtime/caml/m.h.in +++ b/runtime/caml/m.h.in @@ -36,12 +36,12 @@ doubleword-aligned. Leave ARCH_ALIGN_DOUBLE undefined if the processor supports word-aligned doubles. */ -#undef HAS_ARCH_CODE32 +#undef HAVE_ARCH_CODE32 -/* Define HAS_ARCH_CODE32 if, on a 64-bit machine, code pointers fit +/* Define HAVE_ARCH_CODE32 if, on a 64-bit machine, code pointers fit in 32 bits, i.e. the code segment resides in the low 4G of the addressing space. - HAS_ARCH_CODE32 is ignored on 32-bit machines. */ + HAVE_ARCH_CODE32 is ignored on 32-bit machines. */ #undef SIZEOF_INT #undef SIZEOF_LONG diff --git a/runtime/caml/s.h.in b/runtime/caml/s.h.in index 0140c42710bc..f5a67488de89 100644 --- a/runtime/caml/s.h.in +++ b/runtime/caml/s.h.in @@ -86,9 +86,9 @@ /* 2. For the Unix library. */ -#undef HAS_SOCKETS +#undef HAVE_SOCKETS -/* Define HAS_SOCKETS if you have BSD sockets. */ +/* Define HAVE_SOCKETS if you have BSD sockets. */ #undef HAVE_SOCKETPAIR @@ -106,7 +106,7 @@ #undef HAVE_INET_ATON -#undef HAS_IPV6 +#undef HAVE_IPV6 #undef HAVE_PTHREAD_NP_H @@ -309,7 +309,7 @@ #undef HAS_LIBUNWIND -#undef HAS_BROKEN_PRINTF +#undef HAVE_BROKEN_PRINTF #undef HAS_POSIX_MONOTONIC_CLOCK diff --git a/runtime/debugger.c b/runtime/debugger.c index 5bfe1253c3b4..2da0d7c54e1d 100644 --- a/runtime/debugger.c +++ b/runtime/debugger.c @@ -37,7 +37,7 @@ int caml_debugger_in_use = 0; uintnat caml_event_count; int caml_debugger_fork_mode = 1; /* parent by default */ -#if !defined(HAS_SOCKETS) || defined(NATIVE_CODE) +#if !defined(HAVE_SOCKETS) || defined(NATIVE_CODE) void caml_debugger_init(void) { diff --git a/runtime/floats.c b/runtime/floats.c index d4675ff386a6..04c26437e78f 100644 --- a/runtime/floats.c +++ b/runtime/floats.c @@ -177,13 +177,13 @@ CAMLprim value caml_format_float(value fmt, value arg) value res; double d = Double_val(arg); -#ifdef HAS_BROKEN_PRINTF +#ifdef HAVE_BROKEN_PRINTF if (isfinite(d)) { #endif USE_LOCALE; res = caml_alloc_sprintf(String_val(fmt), d); RESTORE_LOCALE; -#ifdef HAS_BROKEN_PRINTF +#ifdef HAVE_BROKEN_PRINTF } else { if (isnan(d)) { res = caml_copy_string("nan"); From 1812e1070cd7aace2cad6f141adf8cf65d36c444 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonin=20D=C3=A9cimo?= Date: Mon, 4 Nov 2024 17:54:15 +0100 Subject: [PATCH 22/22] Use autoheader to generate the configuration header --- .gitignore | 4 +- INSTALL.adoc | 7 +- Makefile | 2 +- aclocal.m4 | 12 +- configure | 135 +++-- configure.ac | 103 ++-- runtime/amd64.S | 2 +- runtime/arm64.S | 2 +- runtime/caml/{config.h => conf_post.h} | 7 - runtime/caml/config.h.in | 543 ++++++++++++++++++ runtime/power.S | 2 +- runtime/riscv.S | 2 +- runtime/s390x.S | 2 +- stdlib/header.c | 1 - testsuite/tests/cxx-api/all-includes.h | 2 - .../lib-unix/unix-execvpe/has-execvpe.sh | 2 +- 16 files changed, 706 insertions(+), 122 deletions(-) rename runtime/caml/{config.h => conf_post.h} (98%) create mode 100644 runtime/caml/config.h.in diff --git a/.gitignore b/.gitignore index 5cec38960f9f..95c63af2b020 100644 --- a/.gitignore +++ b/.gitignore @@ -53,6 +53,7 @@ META /config.log /config.status /configure~ +/runtime/caml/config.h.in~ /flexlink.opt /libtool /ocamlc.opt @@ -235,8 +236,7 @@ META /runtime/domain_state.inc /runtime/caml/jumptbl.h -/runtime/caml/m.h -/runtime/caml/s.h +/runtime/caml/config.h /runtime/primitives /runtime/primitives*.new /runtime/prims.c diff --git a/INSTALL.adoc b/INSTALL.adoc index 69435c8e5e4b..fdc54b17ec37 100644 --- a/INSTALL.adoc +++ b/INSTALL.adoc @@ -55,8 +55,8 @@ From the top directory, do: ./configure -This generates the three configuration files `Makefile.config`, -`runtime/caml/m.h` and `runtime/caml/s.h`. +This generates the two configuration files `Makefile.config`, +`runtime/caml/config.h`. The `configure` script accepts options that can be discovered by running: @@ -95,8 +95,7 @@ files cause errors later on, then look at the template files: Makefile.config.in Makefile.build_config.in - runtime/caml/m.h.in - runtime/caml/s.h.in + runtime/caml/config.h.in + for guidance on how to edit the generated files by hand. diff --git a/Makefile b/Makefile index 47f9b90d98e0..30dbf15ee6e8 100644 --- a/Makefile +++ b/Makefile @@ -1260,7 +1260,7 @@ runtime_NATIVE_C_SOURCES = \ ## Header files generated by configure runtime_CONFIGURED_HEADERS = \ - $(addprefix runtime/caml/, exec.h m.h s.h version.h) + $(addprefix runtime/caml/, exec.h config.h version.h) ## Header files generated by make runtime_BUILT_HEADERS = $(addprefix runtime/, \ diff --git a/aclocal.m4 b/aclocal.m4 index 8e7f17a09a5f..dcf69fabfe93 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -88,7 +88,7 @@ AC_DEFUN([OCAML_SIGNAL_HANDLERS_SEMANTICS], [ AC_CHECK_FUNC([sigaction], [has_sigaction=true], [has_sigaction=false]) AC_CHECK_FUNC([sigprocmask], [has_sigprocmask=true], [has_sigprocmask=false]) AS_IF([$has_sigaction && $has_sigprocmask], - [AC_DEFINE([POSIX_SIGNALS], [1]) + [AC_DEFINE([POSIX_SIGNALS], [1], [TODO]) AC_MSG_NOTICE([POSIX signal handling found.])], [AC_MSG_NOTICE([assuming signals have the System V semantics.]) ] @@ -112,7 +112,7 @@ AC_DEFUN([OCAML_CC_SUPPORTS_TREE_VECTORIZE], [ ]) ]) AS_IF([test "x$ocaml_cv_prog_cc_tree_vectorize" = xyes], - [AC_DEFINE([SUPPORTS_TREE_VECTORIZE], [1])]) + [AC_DEFINE([SUPPORTS_TREE_VECTORIZE], [1], [TODO])]) ]) # Save C compiler related variables @@ -217,7 +217,7 @@ camlPervasives__loop_1128: AS_CASE([$ocaml_cv_prog_as_cfi_directives], [yes], [asm_cfi_supported=true - AC_DEFINE([ASM_CFI_SUPPORTED], [1])], + AC_DEFINE([ASM_CFI_SUPPORTED], [1], [TODO])], [no|disabled], [asm_cfi_supported=false], [AC_MSG_ERROR([exiting])]) ]) @@ -284,8 +284,8 @@ AC_DEFUN([OCAML_MMAP_SUPPORTS_HUGE_PAGES], [ [ocaml_cv_func_mmap_huge_pages=no], [ocaml_cv_func_mmap_huge_pages='no assumed'])]) AS_IF([test "x$ocaml_cv_prog_cc_func_mmap_huge_pages" = xyes], - [AC_DEFINE([HAS_HUGE_PAGES], [1]) - AC_DEFINE_UNQUOTED([HUGE_PAGE_SIZE], [(4 * 1024 * 1024)])]) + [AC_DEFINE([HAS_HUGE_PAGES], [1], [TODO]) + AC_DEFINE_UNQUOTED([HUGE_PAGE_SIZE], [(4 * 1024 * 1024)], [TODO])]) ]) AC_DEFUN([OCAML_CHECK_LIBUNWIND], [ @@ -294,7 +294,7 @@ AC_DEFUN([OCAML_CHECK_LIBUNWIND], [ CPPFLAGS="$CPPFLAGS $libunwind_cppflags" LDFLAGS="$LDFLAGS $libunwind_ldflags" AC_CHECK_HEADER([libunwind.h], - [AC_DEFINE([HAS_LIBUNWIND], [1]) + [AC_DEFINE([HAS_LIBUNWIND], [1], [TODO]) libunwind_available=true], [libunwind_available=false]) LDFLAGS="$SAVED_LDFLAGS" diff --git a/configure b/configure index 0dad4db4d458..09d8f47168c4 100755 --- a/configure +++ b/configure @@ -3410,14 +3410,18 @@ OCAML_VERSION_EXTRA=dev0-2024-08-25 OCAML_VERSION_SHORT=5.4 + printf "%s\n" "#define MAGIC_NUMBER_PREFIX \"Caml1999\"" >>confdefs.h + printf "%s\n" "#define MAGIC_NUMBER_VERSION \"035\"" >>confdefs.h + printf "%s\n" "#define EXEC_MAGIC_LENGTH 12" >>confdefs.h MAGIC_LENGTH=12 + printf "%s\n" "#define EXEC_FORMAT \"X\"" >>confdefs.h EXEC_MAGIC_NUMBER=Caml1999X035 @@ -3601,11 +3605,11 @@ ac_config_files="$ac_config_files utils/config.common.ml" ac_config_files="$ac_config_files utils/config.generated.ml" -ac_config_headers="$ac_config_headers runtime/caml/exec.h" +ac_config_headers="$ac_config_headers runtime/caml/config.h" + -ac_config_headers="$ac_config_headers runtime/caml/m.h" -ac_config_headers="$ac_config_headers runtime/caml/s.h" +ac_config_headers="$ac_config_headers runtime/caml/exec.h" ac_config_headers="$ac_config_headers runtime/caml/version.h" @@ -3619,18 +3623,25 @@ ac_config_files="$ac_config_files stdlib/META" # Definitions related to the version of OCaml + printf "%s\n" "#define OCAML_VERSION_MAJOR 5" >>confdefs.h + printf "%s\n" "#define OCAML_VERSION_MINOR 4" >>confdefs.h + printf "%s\n" "#define OCAML_VERSION_PATCHLEVEL 0" >>confdefs.h + printf "%s\n" "#define OCAML_VERSION_ADDITIONAL \"dev0-2024-08-25\"" >>confdefs.h - printf "%s\n" "#define OCAML_VERSION_EXTRA \"dev0-2024-08-25\"" >>confdefs.h + +printf "%s\n" "#define OCAML_VERSION_EXTRA \"dev0-2024-08-25\"" >>confdefs.h + printf "%s\n" "#define OCAML_VERSION 50400" >>confdefs.h + printf "%s\n" "#define OCAML_VERSION_STRING \"5.4.0+dev0-2024-08-25\"" >>confdefs.h @@ -16297,7 +16308,8 @@ then : elif test "x$ac_cv_sizeof_long_p" = "x8" then : bits=64; arch64=true - printf "%s\n" "#define ARCH_SIXTYFOUR 1" >>confdefs.h + +printf "%s\n" "#define ARCH_SIXTYFOUR 1" >>confdefs.h else $as_nop as_fn_error $? "Neither 32 nor 64 bits architecture." "$LINENO" 5 @@ -16662,7 +16674,8 @@ then : if test "$ac_cv_alignof_double" -gt 4 then : align_double=true - printf "%s\n" "#define ARCH_ALIGN_DOUBLE 1" >>confdefs.h + +printf "%s\n" "#define ARCH_ALIGN_DOUBLE 1" >>confdefs.h fi if test "x$ac_cv_sizeof_long" = "x8" && @@ -16678,7 +16691,8 @@ fi fi if $align_int64 then : - printf "%s\n" "#define ARCH_ALIGN_INT64 1" >>confdefs.h + +printf "%s\n" "#define ARCH_ALIGN_INT64 1" >>confdefs.h fi ;; @@ -16814,7 +16828,8 @@ case $target in #( *-apple-darwin*|*-w64-mingw32*|*-pc-windows) : ;; #( *) : - printf "%s\n" "#define HAS_FULL_THREAD_VARIABLES 1" >>confdefs.h + +printf "%s\n" "#define HAS_FULL_THREAD_VARIABLES 1" >>confdefs.h ;; esac @@ -17305,6 +17320,7 @@ case $enable_native_toplevel,$natdynlink in #( install_ocamlnat=false ;; esac + printf "%s\n" "#define OCAML_OS_TYPE \"$ostype\"" >>confdefs.h target_os_type="$ostype" @@ -17626,7 +17642,8 @@ esac if test "$with_pic" then : fpic=true - printf "%s\n" "#define CAML_WITH_FPIC 1" >>confdefs.h + +printf "%s\n" "#define CAML_WITH_FPIC 1" >>confdefs.h internal_cflags="$internal_cflags $sharedlib_cflags" default_aspp="$default_aspp $sharedlib_cflags" @@ -17769,7 +17786,8 @@ fi if $has_sigaction && $has_sigprocmask then : - printf "%s\n" "#define POSIX_SIGNALS 1" >>confdefs.h + +printf "%s\n" "#define POSIX_SIGNALS 1" >>confdefs.h { printf "%s\n" "$as_me:${as_lineno-$LINENO}: POSIX signal handling found." >&5 printf "%s\n" "$as_me: POSIX signal handling found." >&6;} @@ -17803,7 +17821,8 @@ done if $has_c99_float_ops then : - printf "%s\n" "#define HAS_C99_FLOAT_OPS 1" >>confdefs.h + +printf "%s\n" "#define HAS_C99_FLOAT_OPS 1" >>confdefs.h # Check whether round works (known bug in mingw-w64) @@ -18022,7 +18041,8 @@ then : printf "%s\n" "#define HAVE_CLOCK_GETTIME_NSEC_NP 1" >>confdefs.h has_monotonic_clock=true - printf "%s\n" "#define HAS_CLOCK_GETTIME_NSEC_NP 1" >>confdefs.h + +printf "%s\n" "#define HAS_CLOCK_GETTIME_NSEC_NP 1" >>confdefs.h else $as_nop @@ -18053,7 +18073,8 @@ if ac_fn_c_try_cpp "$LINENO" then : has_monotonic_clock=true - printf "%s\n" "#define HAS_POSIX_MONOTONIC_CLOCK 1" >>confdefs.h + +printf "%s\n" "#define HAS_POSIX_MONOTONIC_CLOCK 1" >>confdefs.h else $as_nop @@ -18421,7 +18442,8 @@ fi ac_fn_c_check_header_compile "$LINENO" "libunwind.h" "ac_cv_header_libunwind_h" "$ac_includes_default" if test "x$ac_cv_header_libunwind_h" = xyes then : - printf "%s\n" "#define HAS_LIBUNWIND 1" >>confdefs.h + +printf "%s\n" "#define HAS_LIBUNWIND 1" >>confdefs.h libunwind_available=true else $as_nop @@ -18915,7 +18937,8 @@ then : ac_fn_c_check_func "$LINENO" "utime" "ac_cv_func_utime" if test "x$ac_cv_func_utime" = xyes then : - printf "%s\n" "#define HAS_UTIME 1" >>confdefs.h + +printf "%s\n" "#define HAS_UTIME 1" >>confdefs.h fi @@ -18931,7 +18954,8 @@ then : ac_fn_c_check_func "$LINENO" "fchown" "ac_cv_func_fchown" if test "x$ac_cv_func_fchown" = xyes then : - printf "%s\n" "#define HAS_FCHMOD 1" >>confdefs.h + +printf "%s\n" "#define HAS_FCHMOD 1" >>confdefs.h fi @@ -18944,7 +18968,8 @@ then : ac_fn_c_check_func "$LINENO" "ftruncate" "ac_cv_func_ftruncate" if test "x$ac_cv_func_ftruncate" = xyes then : - printf "%s\n" "#define HAS_TRUNCATE 1" >>confdefs.h + +printf "%s\n" "#define HAS_TRUNCATE 1" >>confdefs.h fi @@ -18962,7 +18987,8 @@ then : " if test "x$ac_cv_type_fd_set" = xyes then : - printf "%s\n" "#define HAS_SELECT 1" >>confdefs.h + +printf "%s\n" "#define HAS_SELECT 1" >>confdefs.h fi @@ -18978,7 +19004,8 @@ then : ac_fn_c_check_func "$LINENO" "lstat" "ac_cv_func_lstat" if test "x$ac_cv_func_lstat" = xyes then : - printf "%s\n" "#define HAS_SYMLINK 1" >>confdefs.h + +printf "%s\n" "#define HAS_SYMLINK 1" >>confdefs.h fi @@ -19007,7 +19034,8 @@ then : ac_fn_c_check_func "$LINENO" "tcflow" "ac_cv_func_tcflow" if test "x$ac_cv_func_tcflow" = xyes then : - printf "%s\n" "#define HAS_TERMIOS 1" >>confdefs.h + +printf "%s\n" "#define HAS_TERMIOS 1" >>confdefs.h fi @@ -19069,7 +19097,8 @@ then : ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv" if test "x$ac_cv_func_unsetenv" = xyes then : - printf "%s\n" "#define HAS_SETENV_UNSETENV 1" >>confdefs.h + +printf "%s\n" "#define HAS_SETENV_UNSETENV 1" >>confdefs.h fi @@ -19081,7 +19110,8 @@ fi # (should be debugged later) case $target in #( *-pc-windows) : - printf "%s\n" "#define HAS_LOCALE_H 1" >>confdefs.h + +printf "%s\n" "#define HAS_LOCALE_H 1" >>confdefs.h ;; #( *) : ac_fn_c_check_header_compile "$LINENO" "locale.h" "ac_cv_header_locale_h" "$ac_includes_default" @@ -19096,7 +19126,8 @@ then : ac_fn_c_check_func "$LINENO" "uselocale" "ac_cv_func_uselocale" if test "x$ac_cv_func_uselocale" = xyes then : - printf "%s\n" "#define HAS_LOCALE_H 1" >>confdefs.h + +printf "%s\n" "#define HAS_LOCALE_H 1" >>confdefs.h fi @@ -19120,7 +19151,8 @@ then : ac_fn_c_check_func "$LINENO" "uselocale" "ac_cv_func_uselocale" if test "x$ac_cv_func_uselocale" = xyes then : - printf "%s\n" "#define HAS_XLOCALE_H 1" >>confdefs.h + +printf "%s\n" "#define HAS_XLOCALE_H 1" >>confdefs.h fi @@ -19136,7 +19168,8 @@ fi # (should be debugged later) case $target in #( *-pc-windows) : - printf "%s\n" "#define HAVE_STRTOD_L 1" >>confdefs.h + +printf "%s\n" "#define HAVE_STRTOD_L 1" >>confdefs.h ;; #( *) : ac_fn_c_check_func "$LINENO" "strtod_l" "ac_cv_func_strtod_l" @@ -19213,7 +19246,8 @@ if $supports_shared_libraries then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Dynamic loading of shared libraries is supported." >&5 printf "%s\n" "$as_me: Dynamic loading of shared libraries is supported." >&6;} - printf "%s\n" "#define SUPPORT_DYNAMIC_LINKING 1" >>confdefs.h + +printf "%s\n" "#define SUPPORT_DYNAMIC_LINKING 1" >>confdefs.h else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Dynamic loading of shared libraries is not supported." >&5 @@ -19231,7 +19265,8 @@ then : ac_fn_c_check_func "$LINENO" "munmap" "ac_cv_func_munmap" if test "x$ac_cv_func_munmap" = xyes then : - printf "%s\n" "#define HAS_MMAP 1" >>confdefs.h + +printf "%s\n" "#define HAS_MMAP 1" >>confdefs.h fi @@ -19552,10 +19587,12 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu case $ac_cv_func_which_gethostbyname_r in #( six) : - printf "%s\n" "#define HAS_GETHOSTBYNAME_R 6" >>confdefs.h + +printf "%s\n" "#define HAS_GETHOSTBYNAME_R 6" >>confdefs.h ;; #( five) : - printf "%s\n" "#define HAS_GETHOSTBYNAME_R 5" >>confdefs.h + +printf "%s\n" "#define HAS_GETHOSTBYNAME_R 5" >>confdefs.h ;; #( three) : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: OCaml does not support this variant" >&5 @@ -19740,10 +19777,12 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu case $ac_cv_func_which_gethostbyaddr_r in #( eight) : - printf "%s\n" "#define HAS_GETHOSTBYADDR_R 8" >>confdefs.h + +printf "%s\n" "#define HAS_GETHOSTBYADDR_R 8" >>confdefs.h ;; #( seven) : - printf "%s\n" "#define HAS_GETHOSTBYADDR_R 7" >>confdefs.h + +printf "%s\n" "#define HAS_GETHOSTBYADDR_R 7" >>confdefs.h ;; #( *) : ;; @@ -19778,7 +19817,8 @@ then : ac_fn_c_check_func "$LINENO" "posix_spawnp" "ac_cv_func_posix_spawnp" if test "x$ac_cv_func_posix_spawnp" = xyes then : - printf "%s\n" "#define HAS_POSIX_SPAWN 1" >>confdefs.h + +printf "%s\n" "#define HAS_POSIX_SPAWN 1" >>confdefs.h fi @@ -20246,7 +20286,8 @@ then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: compressed compilation artefacts supported" >&5 printf "%s\n" "$as_me: compressed compilation artefacts supported" >&6;} internal_cppflags="$internal_cppflags $zstd_flags" - printf "%s\n" "#define HAS_ZSTD 1" >>confdefs.h + +printf "%s\n" "#define HAS_ZSTD 1" >>confdefs.h else $as_nop case "$with_zstd" in #( @@ -21146,7 +21187,8 @@ if ac_fn_c_try_link "$LINENO" then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: GNU" >&5 printf "%s\n" "GNU" >&6; } - printf "%s\n" "#define HAS_GNU_GETAFFINITY_NP 1" >>confdefs.h + +printf "%s\n" "#define HAS_GNU_GETAFFINITY_NP 1" >>confdefs.h else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -21170,7 +21212,8 @@ if ac_fn_c_try_link "$LINENO" then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: BSD" >&5 printf "%s\n" "BSD" >&6; } - printf "%s\n" "#define HAS_BSD_GETAFFINITY_NP 1" >>confdefs.h + +printf "%s\n" "#define HAS_BSD_GETAFFINITY_NP 1" >>confdefs.h else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: pthread_getaffinity_np not found" >&5 @@ -21404,7 +21447,8 @@ printf "%s\n" "$ocaml_cv_prog_as_cfi_directives" >&6; } case $ocaml_cv_prog_as_cfi_directives in #( yes) : asm_cfi_supported=true - printf "%s\n" "#define ASM_CFI_SUPPORTED 1" >>confdefs.h + +printf "%s\n" "#define ASM_CFI_SUPPORTED 1" >>confdefs.h ;; #( no|disabled) : asm_cfi_supported=false ;; #( @@ -21425,7 +21469,8 @@ then : clang-*|gcc-*) : common_cflags="$common_cflags -g -fno-omit-frame-pointer" frame_pointers=true - printf "%s\n" "#define WITH_FRAME_POINTERS 1" >>confdefs.h + +printf "%s\n" "#define WITH_FRAME_POINTERS 1" >>confdefs.h { printf "%s\n" "$as_me:${as_lineno-$LINENO}: using frame pointers" >&5 printf "%s\n" "$as_me: using frame pointers" >&6;} ;; #( @@ -21515,13 +21560,16 @@ fi printf "%s\n" "$ocaml_cv_func_mmap_huge_pages" >&6; } if test "x$ocaml_cv_prog_cc_func_mmap_huge_pages" = xyes then : - printf "%s\n" "#define HAS_HUGE_PAGES 1" >>confdefs.h - printf "%s\n" "#define HUGE_PAGE_SIZE (4 * 1024 * 1024)" >>confdefs.h +printf "%s\n" "#define HAS_HUGE_PAGES 1" >>confdefs.h + + +printf "%s\n" "#define HUGE_PAGE_SIZE (4 * 1024 * 1024)" >>confdefs.h fi + printf "%s\n" "#define HEADER_RESERVED_BITS $reserved_header_bits" >>confdefs.h @@ -21708,7 +21756,8 @@ if test x"$enable_flat_float_array" = "xno" then : flat_float_array=false else $as_nop - printf "%s\n" "#define FLAT_FLOAT_ARRAY 1" >>confdefs.h + +printf "%s\n" "#define FLAT_FLOAT_ARRAY 1" >>confdefs.h flat_float_array=true fi @@ -21822,7 +21871,8 @@ printf "%s\n" "$as_me: Function sections are not supported function_sections=true; oc_native_compflags='-function-sections' internal_cflags="$internal_cflags -ffunction-sections"; - printf "%s\n" "#define FUNCTION_SECTIONS 1" >>confdefs.h + +printf "%s\n" "#define FUNCTION_SECTIONS 1" >>confdefs.h ;; #( *) : function_sections=false; @@ -23110,9 +23160,8 @@ do "otherlibs/dynlink/dynlink_config.ml") CONFIG_FILES="$CONFIG_FILES otherlibs/dynlink/dynlink_config.ml" ;; "utils/config.common.ml") CONFIG_FILES="$CONFIG_FILES utils/config.common.ml" ;; "utils/config.generated.ml") CONFIG_FILES="$CONFIG_FILES utils/config.generated.ml" ;; + "runtime/caml/config.h") CONFIG_HEADERS="$CONFIG_HEADERS runtime/caml/config.h" ;; "runtime/caml/exec.h") CONFIG_HEADERS="$CONFIG_HEADERS runtime/caml/exec.h" ;; - "runtime/caml/m.h") CONFIG_HEADERS="$CONFIG_HEADERS runtime/caml/m.h" ;; - "runtime/caml/s.h") CONFIG_HEADERS="$CONFIG_HEADERS runtime/caml/s.h" ;; "runtime/caml/version.h") CONFIG_HEADERS="$CONFIG_HEADERS runtime/caml/version.h" ;; "compilerlibs/META") CONFIG_FILES="$CONFIG_FILES compilerlibs/META" ;; "otherlibs/dynlink/META") CONFIG_FILES="$CONFIG_FILES otherlibs/dynlink/META" ;; diff --git a/configure.ac b/configure.ac index d595701f06d3..e20c8205871b 100644 --- a/configure.ac +++ b/configure.ac @@ -105,11 +105,11 @@ AC_SUBST([OCAML_VERSION_MINOR], [OCAML__VERSION_MINOR]) AC_SUBST([OCAML_VERSION_PATCHLEVEL], [OCAML__VERSION_PATCHLEVEL]) AC_SUBST([OCAML_VERSION_EXTRA], [OCAML__VERSION_EXTRA]) AC_SUBST([OCAML_VERSION_SHORT], [OCAML__VERSION_SHORT]) -AC_DEFINE([MAGIC_NUMBER_PREFIX], ["][MAGIC_NUMBER__PREFIX]["]) -AC_DEFINE([MAGIC_NUMBER_VERSION], ["][MAGIC_NUMBER__VERSION]["]) -AC_DEFINE([EXEC_MAGIC_LENGTH], [MAGIC_NUMBER__LENGTH]) +AC_DEFINE([MAGIC_NUMBER_PREFIX], ["][MAGIC_NUMBER__PREFIX]["], [TODO]) +AC_DEFINE([MAGIC_NUMBER_VERSION], ["][MAGIC_NUMBER__VERSION]["], [TODO]) +AC_DEFINE([EXEC_MAGIC_LENGTH], [MAGIC_NUMBER__LENGTH], [TODO]) AC_SUBST([MAGIC_LENGTH], [MAGIC_NUMBER__LENGTH]) -AC_DEFINE([EXEC_FORMAT], ["][EXEC__FORMAT]["]) +AC_DEFINE([EXEC_FORMAT], ["][EXEC__FORMAT]["], [TODO]) AC_SUBST([EXEC_MAGIC_NUMBER], [EXEC__MAGIC_NUMBER]) AC_SUBST([CMI_MAGIC_NUMBER], [CMI__MAGIC_NUMBER]) AC_SUBST([CMO_MAGIC_NUMBER], [CMO__MAGIC_NUMBER]) @@ -273,9 +273,13 @@ AC_CONFIG_FILES([ocamltest/ocamltest_config.ml]) AC_CONFIG_FILES([otherlibs/dynlink/dynlink_config.ml]) AC_CONFIG_FILES([utils/config.common.ml]) AC_CONFIG_FILES([utils/config.generated.ml]) +AC_CONFIG_HEADERS([runtime/caml/config.h]) +AH_TOP([[#ifndef CAML_CONFIG_H +#define CAML_CONFIG_H]]) +AH_BOTTOM([[#include "conf_post.h" + +#endif /* CAML_CONFIG_H */]]) AC_CONFIG_HEADERS([runtime/caml/exec.h]) -AC_CONFIG_HEADERS([runtime/caml/m.h]) -AC_CONFIG_HEADERS([runtime/caml/s.h]) AC_CONFIG_HEADERS([runtime/caml/version.h]) AC_CONFIG_FILES([compilerlibs/META]) AC_CONFIG_FILES([otherlibs/dynlink/META]) @@ -283,14 +287,14 @@ AC_CONFIG_FILES([otherlibs/runtime_events/META]) AC_CONFIG_FILES([stdlib/META]) # Definitions related to the version of OCaml -AC_DEFINE([OCAML_VERSION_MAJOR], [OCAML__VERSION_MAJOR]) -AC_DEFINE([OCAML_VERSION_MINOR], [OCAML__VERSION_MINOR]) -AC_DEFINE([OCAML_VERSION_PATCHLEVEL], [OCAML__VERSION_PATCHLEVEL]) +AC_DEFINE([OCAML_VERSION_MAJOR], [OCAML__VERSION_MAJOR], [TODO]) +AC_DEFINE([OCAML_VERSION_MINOR], [OCAML__VERSION_MINOR], [TODO]) +AC_DEFINE([OCAML_VERSION_PATCHLEVEL], [OCAML__VERSION_PATCHLEVEL], [TODO]) m4_if([OCAML__VERSION_EXTRA],[], [], - [AC_DEFINE([OCAML_VERSION_ADDITIONAL], ["][OCAML__VERSION_EXTRA]["]) - AC_DEFINE([OCAML_VERSION_EXTRA], ["][OCAML__VERSION_EXTRA]["])]) -AC_DEFINE([OCAML_VERSION], [OCAML__VERSION_NUMBER]) -AC_DEFINE([OCAML_VERSION_STRING], ["][OCAML__VERSION]["]) + [AC_DEFINE([OCAML_VERSION_ADDITIONAL], ["][OCAML__VERSION_EXTRA]["], [TODO]) + AC_DEFINE([OCAML_VERSION_EXTRA], ["][OCAML__VERSION_EXTRA]["], [TODO])]) +AC_DEFINE([OCAML_VERSION], [OCAML__VERSION_NUMBER], [TODO]) +AC_DEFINE([OCAML_VERSION_STRING], ["][OCAML__VERSION]["], [TODO]) # Works out how many "o"s are needed in quoted strings AC_CONFIG_COMMANDS_PRE(OCAML_QUOTED_STRING_ID) @@ -1254,7 +1258,7 @@ AS_IF( [bits=32; arch64=false], [test "x$ac_cv_sizeof_long_p" = "x8" ], [bits=64; arch64=true - AC_DEFINE([ARCH_SIXTYFOUR], [1])], + AC_DEFINE([ARCH_SIXTYFOUR], [1], [TODO])], [AC_MSG_ERROR([Neither 32 nor 64 bits architecture.])] ) @@ -1288,14 +1292,14 @@ AS_IF([! $arch64], [i686], [], [AS_IF([test "$ac_cv_alignof_double" -gt 4], [align_double=true - AC_DEFINE([ARCH_ALIGN_DOUBLE], [1])]) + AC_DEFINE([ARCH_ALIGN_DOUBLE], [1], [TODO])]) AS_IF([test "x$ac_cv_sizeof_long" = "x8" && test "$ac_cv_alignof_long" -gt 4], [align_int64=true], [AS_IF([test "x$ac_cv_sizeof_long_long" = "x8" && test "$ac_cv_alignof_long_long" -gt 4], [align_int64=true])]) - AS_IF([$align_int64], [AC_DEFINE([ARCH_ALIGN_INT64], [1])]) + AS_IF([$align_int64], [AC_DEFINE([ARCH_ALIGN_INT64], [1], [TODO])]) ])]) AC_CHECK_TYPES([max_align_t], [], [], [[#include ]]) @@ -1315,7 +1319,7 @@ OCAML_CC_C11_ATOMIC_CFLAGS([$cclibs]) AS_CASE([$target], [*-apple-darwin*|*-w64-mingw32*|*-pc-windows], [], - [AC_DEFINE([HAS_FULL_THREAD_VARIABLES], [1])] + [AC_DEFINE([HAS_FULL_THREAD_VARIABLES], [1], [TODO])] ) # Shared library support @@ -1603,7 +1607,7 @@ AS_CASE([$enable_native_toplevel,$natdynlink], [install_ocamlnat=true], [install_ocamlnat=false]) -AC_DEFINE_UNQUOTED([OCAML_OS_TYPE], ["$ostype"]) +AC_DEFINE_UNQUOTED([OCAML_OS_TYPE], ["$ostype"], [TODO]) target_os_type="$ostype" AS_IF([$cross_compiler], @@ -1695,7 +1699,7 @@ AS_CASE([$as_target,$ocaml_cc_vendor], AS_IF([test "$with_pic"], [fpic=true - AC_DEFINE([CAML_WITH_FPIC], [1]) + AC_DEFINE([CAML_WITH_FPIC], [1], [TODO]) internal_cflags="$internal_cflags $sharedlib_cflags" default_aspp="$default_aspp $sharedlib_cflags"], [fpic=false]) @@ -1729,7 +1733,7 @@ AC_CHECK_FUNCS(m4_normalize([expm1 log1p hypot fma exp2 log2 cbrt acosh asinh atanh erf erfc trunc round copysign]), [], [has_c99_float_ops=false]) AS_IF([$has_c99_float_ops], - [AC_DEFINE([HAS_C99_FLOAT_OPS], [1]) +[AC_DEFINE([HAS_C99_FLOAT_OPS], [1], [TODO]) # Check whether round works (known bug in mingw-w64) OCAML_C99_CHECK_ROUND # Check whether fma works (regressed in mingw-w64 8.0.0; and present but @@ -1752,7 +1756,7 @@ AS_CASE([$target], AC_CHECK_FUNCS([clock_gettime_nsec_np], [ has_monotonic_clock=true - AC_DEFINE([HAS_CLOCK_GETTIME_NSEC_NP], [1]) + AC_DEFINE([HAS_CLOCK_GETTIME_NSEC_NP], [1], [TODO]) ], [has_monotonic_clock=false])], [AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[ @@ -1765,7 +1769,7 @@ AS_CASE([$target], ]])], [ has_monotonic_clock=true - AC_DEFINE([HAS_POSIX_MONOTONIC_CLOCK], [1]) + AC_DEFINE([HAS_POSIX_MONOTONIC_CLOCK], [1], [TODO]) ], [has_monotonic_clock=false]) ] @@ -2036,25 +2040,25 @@ AS_CASE([$target], [*-w64-mingw32*|*-pc-windows], [], [AC_CHECK_HEADER([sys/types.h], [AC_CHECK_HEADER([utime.h], - [AC_CHECK_FUNC([utime], [AC_DEFINE([HAS_UTIME], [1])])])])]) + [AC_CHECK_FUNC([utime], [AC_DEFINE([HAS_UTIME], [1], [TODO])])])])]) AC_CHECK_FUNC([fchmod], - [AC_CHECK_FUNC([fchown], [AC_DEFINE([HAS_FCHMOD], [1])])]) + [AC_CHECK_FUNC([fchown], [AC_DEFINE([HAS_FCHMOD], [1], [TODO])])]) AC_CHECK_FUNC([truncate], - [AC_CHECK_FUNC([ftruncate], [AC_DEFINE([HAS_TRUNCATE], [1])])]) + [AC_CHECK_FUNC([ftruncate], [AC_DEFINE([HAS_TRUNCATE], [1], [TODO])])]) ## select AC_CHECK_FUNC([select], [AC_CHECK_TYPE([fd_set], - [AC_DEFINE([HAS_SELECT], [1])], [], [ + [AC_DEFINE([HAS_SELECT], [1], [TODO])], [], [ #include #include ])]) AC_CHECK_FUNC([symlink], [AC_CHECK_FUNC([readlink], - [AC_CHECK_FUNC([lstat], [AC_DEFINE([HAS_SYMLINK], [1])])])]) + [AC_CHECK_FUNC([lstat], [AC_DEFINE([HAS_SYMLINK], [1], [TODO])])])]) ## termios @@ -2063,7 +2067,7 @@ AC_CHECK_HEADER([termios.h], [AC_CHECK_FUNC([tcsetattr], [AC_CHECK_FUNC([tcsendbreak], [AC_CHECK_FUNC([tcflush], - [AC_CHECK_FUNC([tcflow], [AC_DEFINE([HAS_TERMIOS], [1])])])])])])]) + [AC_CHECK_FUNC([tcflow], [AC_DEFINE([HAS_TERMIOS], [1], [TODO])])])])])])]) ## gethostname AC_CHECK_FUNCS([gethostname]) @@ -2082,28 +2086,28 @@ AS_CASE([$target], ## setenv and unsetenv AC_CHECK_FUNC([setenv], - [AC_CHECK_FUNC([unsetenv], [AC_DEFINE([HAS_SETENV_UNSETENV], [1])])]) + [AC_CHECK_FUNC([unsetenv], [AC_DEFINE([HAS_SETENV_UNSETENV], [1], [TODO])])]) ## newlocale() and # Note: the detection fails on msvc so we hardcode the result # (should be debugged later) AS_CASE([$target], - [*-pc-windows], [AC_DEFINE([HAS_LOCALE_H], [1])], + [*-pc-windows], [AC_DEFINE([HAS_LOCALE_H], [1], [TODO])], [AC_CHECK_HEADER([locale.h], [AC_CHECK_FUNC([newlocale], [AC_CHECK_FUNC([freelocale], - [AC_CHECK_FUNC([uselocale], [AC_DEFINE([HAS_LOCALE_H], [1])])])])])]) + [AC_CHECK_FUNC([uselocale], [AC_DEFINE([HAS_LOCALE_H], [1], [TODO])])])])])]) AC_CHECK_HEADER([xlocale.h], [AC_CHECK_FUNC([newlocale], [AC_CHECK_FUNC([freelocale], - [AC_CHECK_FUNC([uselocale], [AC_DEFINE([HAS_XLOCALE_H], [1])])])])]) + [AC_CHECK_FUNC([uselocale], [AC_DEFINE([HAS_XLOCALE_H], [1], [TODO])])])])]) ## strtod_l # Note: not detected on MSVC so hardcoding the result # (should be debugged later) AS_CASE([$target], - [*-pc-windows], [AC_DEFINE([HAVE_STRTOD_L], [1])], + [*-pc-windows], [AC_DEFINE([HAVE_STRTOD_L], [1], [TODO])], [AC_CHECK_FUNCS([strtod_l])]) ## shared library support @@ -2120,14 +2124,14 @@ AS_IF([$supports_shared_libraries], AS_IF([$supports_shared_libraries], [AC_MSG_NOTICE([Dynamic loading of shared libraries is supported.]) - AC_DEFINE([SUPPORT_DYNAMIC_LINKING], [1])], + AC_DEFINE([SUPPORT_DYNAMIC_LINKING], [1], [TODO])], [AC_MSG_NOTICE([Dynamic loading of shared libraries is not supported.])]) ## mmap AC_CHECK_HEADER([sys/mman.h], [AC_CHECK_FUNC([mmap], - [AC_CHECK_FUNC([munmap], [AC_DEFINE([HAS_MMAP], [1])])])]) + [AC_CHECK_FUNC([munmap], [AC_DEFINE([HAS_MMAP], [1], [TODO])])])]) ## -fdebug-prefix-map support by the C compiler AS_CASE([$ocaml_cc_vendor,$target], @@ -2156,8 +2160,8 @@ AS_IF([$stat_has_ns_precision], AX_FUNC_WHICH_GETHOSTBYNAME_R AS_CASE([$ac_cv_func_which_gethostbyname_r], - [six], [AC_DEFINE([HAS_GETHOSTBYNAME_R],[6])], - [five], [AC_DEFINE([HAS_GETHOSTBYNAME_R],[5])], + [six], [AC_DEFINE([HAS_GETHOSTBYNAME_R],[6], [TODO])], + [five], [AC_DEFINE([HAS_GETHOSTBYNAME_R],[5], [TODO])], [three], [AC_MSG_WARN([OCaml does not support this variant])]) # Number of arguments of gethostbyaddr_r @@ -2165,8 +2169,8 @@ AS_CASE([$ac_cv_func_which_gethostbyname_r], AX_FUNC_WHICH_GETHOSTBYADDR_R AS_CASE([$ac_cv_func_which_gethostbyaddr_r], - [eight], [AC_DEFINE([HAS_GETHOSTBYADDR_R],[8])], - [seven], [AC_DEFINE([HAS_GETHOSTBYADDR_R],[7])]) + [eight], [AC_DEFINE([HAS_GETHOSTBYADDR_R],[8], [TODO])], + [seven], [AC_DEFINE([HAS_GETHOSTBYADDR_R],[7], [TODO])]) ## shmat AC_CHECK_HEADERS([sys/shm.h], [AC_CHECK_FUNCS([shmat])]) @@ -2175,7 +2179,7 @@ AC_CHECK_HEADERS([sys/shm.h], [AC_CHECK_FUNCS([shmat])]) AC_CHECK_HEADER([spawn.h], [AC_CHECK_FUNC([posix_spawn], - [AC_CHECK_FUNC([posix_spawnp], [AC_DEFINE([HAS_POSIX_SPAWN], [1])])])]) + [AC_CHECK_FUNC([posix_spawnp], [AC_DEFINE([HAS_POSIX_SPAWN], [1], [TODO])])])]) AS_IF([$cross_compiler], [AC_PATH_TARGET_TOOL([PKG_CONFIG], [pkg-config], [false])], @@ -2247,7 +2251,7 @@ int main(void) { AS_IF([test x"$zstd_status" = "xok"], [AC_MSG_NOTICE([compressed compilation artefacts supported]) internal_cppflags="$internal_cppflags $zstd_flags" - AC_DEFINE([HAS_ZSTD], [1])], + AC_DEFINE([HAS_ZSTD], [1], [TODO])], [AS_CASE(["$with_zstd"], [no], [], @@ -2317,7 +2321,7 @@ AC_LINK_IFELSE( CPU_COUNT(&cs); pthread_getaffinity_np(pthread_self(), sizeof(cs), &cs);]])], [AC_MSG_RESULT([GNU]) - AC_DEFINE([HAS_GNU_GETAFFINITY_NP], [1])], + AC_DEFINE([HAS_GNU_GETAFFINITY_NP], [1], [TODO])], [AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#include @@ -2329,7 +2333,7 @@ AC_LINK_IFELSE( CPU_COUNT(&cs); pthread_getaffinity_np(pthread_self(), sizeof(cs), &cs);]])], [AC_MSG_RESULT([BSD]) - AC_DEFINE([HAS_BSD_GETAFFINITY_NP], [1])], + AC_DEFINE([HAS_BSD_GETAFFINITY_NP], [1], [TODO])], [AC_MSG_RESULT([pthread_getaffinity_np not found])])]) ## SetThreadDescription @@ -2375,7 +2379,7 @@ AS_IF([test x"$enable_frame_pointers" = "xyes"], [clang-*|gcc-*], [common_cflags="$common_cflags -g -fno-omit-frame-pointer" frame_pointers=true - AC_DEFINE([WITH_FRAME_POINTERS], [1]) + AC_DEFINE([WITH_FRAME_POINTERS], [1], [TODO]) AC_MSG_NOTICE([using frame pointers])], [AC_MSG_ERROR([frame pointers not supported on this platform])] )], @@ -2387,7 +2391,7 @@ AS_IF([test x"$enable_frame_pointers" = "xyes"], ## Check for mmap support for huge pages and contiguous heap OCAML_MMAP_SUPPORTS_HUGE_PAGES -AC_DEFINE_UNQUOTED([HEADER_RESERVED_BITS], [$reserved_header_bits]) +AC_DEFINE_UNQUOTED([HEADER_RESERVED_BITS], [$reserved_header_bits], [TODO]) AS_IF([test x"$enable_installing_bytecode_programs" = "xno"], [install_bytecode_programs=false], @@ -2468,7 +2472,7 @@ AS_IF([test x"$enable_cmm_invariants" = "xyes"], AS_IF([test x"$enable_flat_float_array" = "xno"], [flat_float_array=false], - [AC_DEFINE([FLAT_FLOAT_ARRAY], [1]) + [AC_DEFINE([FLAT_FLOAT_ARRAY], [1], [TODO]) flat_float_array=true]) OCAML_MMAP_SUPPORTS_MAP_STACK @@ -2508,7 +2512,7 @@ AS_IF([test x"$enable_function_sections" = "xno"], [function_sections=true; oc_native_compflags='-function-sections' internal_cflags="$internal_cflags -ffunction-sections"; - AC_DEFINE([FUNCTION_SECTIONS], [1])], + AC_DEFINE([FUNCTION_SECTIONS], [1], [TODO])], [function_sections=false; AC_MSG_NOTICE([Function sections are not supported by $ocaml_cc_vendor.])])])], @@ -2591,9 +2595,8 @@ AS_CASE([$target], [have_broken_printf=true]) AS_IF([${have_broken_printf}], - [AC_DEFINE([HAVE_BROKEN_PRINTF], [1], - [m4_normalize([Define if floats are printed as "Infinity" and "Inf" instead - of the expected "inf".])])]) + [AC_DEFINE([HAVE_BROKEN_PRINTF], [1], [Define if floats are printed as + "Infinity" and "Inf" instead of the expected "inf".])]) AS_IF([$have_ipv6], [AC_DEFINE([HAVE_IPV6], [1], [Define if IPv6 is supported.])]) diff --git a/runtime/amd64.S b/runtime/amd64.S index 5c36868a7c6a..78deb71feed6 100644 --- a/runtime/amd64.S +++ b/runtime/amd64.S @@ -18,7 +18,7 @@ /* PIC mode support based on contribution by Paul Stravers (see PR#4795) */ -#include "caml/m.h" +#include "caml/config.h" #include "caml/asm.h" #if defined(SYS_macosx) diff --git a/runtime/arm64.S b/runtime/arm64.S index 2082ae4fd824..ff9c5f3bc32b 100644 --- a/runtime/arm64.S +++ b/runtime/arm64.S @@ -18,7 +18,7 @@ /* Asm part of the runtime system, ARM processor, 64-bit mode */ /* Must be preprocessed by cpp */ -#include "caml/m.h" +#include "caml/config.h" #include "caml/asm.h" /* Special registers */ diff --git a/runtime/caml/config.h b/runtime/caml/conf_post.h similarity index 98% rename from runtime/caml/config.h rename to runtime/caml/conf_post.h index ab8db87b9b49..2b0f4fc04394 100644 --- a/runtime/caml/config.h +++ b/runtime/caml/conf_post.h @@ -13,11 +13,6 @@ /* */ /**************************************************************************/ -#ifndef CAML_CONFIG_H -#define CAML_CONFIG_H - -#include "m.h" -#include "s.h" #include "compatibility.h" /* CAML_NAME_SPACE was introduced in OCaml 3.08 to declare compatibility with @@ -262,5 +257,3 @@ typedef uint64_t uintnat; #elif (!defined(NATIVE_CODE)) #define Cache_line_bsize 64 #endif - -#endif /* CAML_CONFIG_H */ diff --git a/runtime/caml/config.h.in b/runtime/caml/config.h.in new file mode 100644 index 000000000000..10d44e9a30fe --- /dev/null +++ b/runtime/caml/config.h.in @@ -0,0 +1,543 @@ +/* runtime/caml/config.h.in. Generated from configure.ac by autoheader. */ + +#ifndef CAML_CONFIG_H +#define CAML_CONFIG_H + +/* The normal alignment of 'double', in bytes. */ +#undef ALIGNOF_DOUBLE + +/* The normal alignment of 'long', in bytes. */ +#undef ALIGNOF_LONG + +/* The normal alignment of 'long long', in bytes. */ +#undef ALIGNOF_LONG_LONG + +/* TODO */ +#undef ARCH_ALIGN_DOUBLE + +/* TODO */ +#undef ARCH_ALIGN_INT64 + +/* TODO */ +#undef ARCH_SIXTYFOUR + +/* TODO */ +#undef ASM_CFI_SUPPORTED + +/* TODO */ +#undef CAML_WITH_FPIC + +/* TODO */ +#undef EXEC_FORMAT + +/* TODO */ +#undef EXEC_MAGIC_LENGTH + +/* TODO */ +#undef FLAT_FLOAT_ARRAY + +/* TODO */ +#undef FUNCTION_SECTIONS + +/* TODO */ +#undef HAS_BSD_GETAFFINITY_NP + +/* TODO */ +#undef HAS_C99_FLOAT_OPS + +/* TODO */ +#undef HAS_CLOCK_GETTIME_NSEC_NP + +/* TODO */ +#undef HAS_FCHMOD + +/* TODO */ +#undef HAS_FULL_THREAD_VARIABLES + +/* TODO */ +#undef HAS_GETHOSTBYADDR_R + +/* TODO */ +#undef HAS_GETHOSTBYNAME_R + +/* TODO */ +#undef HAS_GNU_GETAFFINITY_NP + +/* TODO */ +#undef HAS_HUGE_PAGES + +/* TODO */ +#undef HAS_LIBUNWIND + +/* TODO */ +#undef HAS_LOCALE_H + +/* TODO */ +#undef HAS_MMAP + +/* TODO */ +#undef HAS_POSIX_MONOTONIC_CLOCK + +/* TODO */ +#undef HAS_POSIX_SPAWN + +/* TODO */ +#undef HAS_SELECT + +/* TODO */ +#undef HAS_SETENV_UNSETENV + +/* TODO */ +#undef HAS_SYMLINK + +/* TODO */ +#undef HAS_TERMIOS + +/* TODO */ +#undef HAS_TRUNCATE + +/* TODO */ +#undef HAS_UTIME + +/* TODO */ +#undef HAS_XLOCALE_H + +/* TODO */ +#undef HAS_ZSTD + +/* Define to 1 if you have the 'accept' function. */ +#undef HAVE_ACCEPT + +/* Define to 1 if you have the 'accept4' function. */ +#undef HAVE_ACCEPT4 + +/* Define to 1 if you have the 'acosh' function. */ +#undef HAVE_ACOSH + +/* Define to 1 if you have the header file. */ +#undef HAVE_AFUNIX_H + +/* Define HAVE_ARCH_CODE32 if, on a 64-bit machine, code pointers fit in 32 + bits, i.e. the code segment resides in the low 4G of the addressing space. + HAVE_ARCH_CODE32 is ignored on 32-bit machines. */ +#undef HAVE_ARCH_CODE32 + +/* Define to 1 if you have the 'asinh' function. */ +#undef HAVE_ASINH + +/* Define to 1 if you have the 'atanh' function. */ +#undef HAVE_ATANH + +/* Define to 1 if you have the 'bind' function. */ +#undef HAVE_BIND + +/* Define if floats are printed as "Infinity" and "Inf" instead of the + expected "inf". */ +#undef HAVE_BROKEN_PRINTF + +/* Define to 1 if you have the 'cbrt' function. */ +#undef HAVE_CBRT + +/* Define to 1 if you have the 'clock_gettime_nsec_np' function. */ +#undef HAVE_CLOCK_GETTIME_NSEC_NP + +/* Define to 1 if you have the 'connect' function. */ +#undef HAVE_CONNECT + +/* Define to 1 if you have the 'copysign' function. */ +#undef HAVE_COPYSIGN + +/* Define to 1 if you have the declaration of 'SetThreadDescription', and to 0 + if you don't. */ +#undef HAVE_DECL_SETTHREADDESCRIPTION + +/* Define to 1 if you have the header file. */ +#undef HAVE_DIRENT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_DLFCN_H + +/* Define to 1 if you have the 'dup3' function. */ +#undef HAVE_DUP3 + +/* Define to 1 if you have the 'erf' function. */ +#undef HAVE_ERF + +/* Define to 1 if you have the 'erfc' function. */ +#undef HAVE_ERFC + +/* Define to 1 if you have the 'execvpe' function. */ +#undef HAVE_EXECVPE + +/* Define to 1 if you have the 'exp2' function. */ +#undef HAVE_EXP2 + +/* Define to 1 if you have the 'expm1' function. */ +#undef HAVE_EXPM1 + +/* Define to 1 if you have the 'fma' function. */ +#undef HAVE_FMA + +/* Define to 1 if you have the seven-argument form of gethostbyaddr_r(). */ +#undef HAVE_FUNC_GETHOSTBYADDR_R_7 + +/* Define to 1 if you have the eight-argument form of gethostbyaddr_r(). */ +#undef HAVE_FUNC_GETHOSTBYADDR_R_8 + +/* Define to 1 if you have the three-argument form of gethostbyname_r(). */ +#undef HAVE_FUNC_GETHOSTBYNAME_R_3 + +/* Define to 1 if you have the five-argument form of gethostbyname_r(). */ +#undef HAVE_FUNC_GETHOSTBYNAME_R_5 + +/* Define to 1 if you have the six-argument form of gethostbyname_r(). */ +#undef HAVE_FUNC_GETHOSTBYNAME_R_6 + +/* Define to 1 if you have the 'getaddrinfo' function. */ +#undef HAVE_GETADDRINFO + +/* Define to 1 if you have the 'getauxval' function. */ +#undef HAVE_GETAUXVAL + +/* Define to 1 if you have the 'getcwd' function. */ +#undef HAVE_GETCWD + +/* Define to 1 if you have the 'getentropy' function. */ +#undef HAVE_GETENTROPY + +/* Define to 1 if you have the 'getgroups' function. */ +#undef HAVE_GETGROUPS + +/* Define to 1 if you have some form of gethostbyaddr_r(). */ +#undef HAVE_GETHOSTBYADDR_R + +/* Define to 1 if you have some form of gethostbyname_r(). */ +#undef HAVE_GETHOSTBYNAME_R + +/* Define to 1 if you have the 'gethostname' function. */ +#undef HAVE_GETHOSTNAME + +/* Define to 1 if you have the 'getnameinfo' function. */ +#undef HAVE_GETNAMEINFO + +/* Define to 1 if you have the 'getrusage' function. */ +#undef HAVE_GETRUSAGE + +/* Define to 1 if you have the 'gettimeofday' function. */ +#undef HAVE_GETTIMEOFDAY + +/* Define to 1 if you have the 'hypot' function. */ +#undef HAVE_HYPOT + +/* Define to 1 if you have the 'inet_aton' function. */ +#undef HAVE_INET_ATON + +/* Define to 1 if you have the 'inet_ntop' function. */ +#undef HAVE_INET_NTOP + +/* Define to 1 if you have the 'inet_pton' function. */ +#undef HAVE_INET_PTON + +/* Define to 1 if you have the 'initgroups' function. */ +#undef HAVE_INITGROUPS + +/* Define to 1 if you have the header file. */ +#undef HAVE_INTTYPES_H + +/* Define if IPv6 is supported. */ +#undef HAVE_IPV6 + +/* Define to 1 if you have the 'issetugid' function. */ +#undef HAVE_ISSETUGID + +/* Define if the C compiler supports the labels as values extension. */ +#undef HAVE_LABELS_AS_VALUES + +/* Define to 1 if you have the header file. */ +#undef HAVE_LINUX_FUTEX_H + +/* Define to 1 if you have the 'listen' function. */ +#undef HAVE_LISTEN + +/* Define to 1 if you have the 'lockf' function. */ +#undef HAVE_LOCKF + +/* Define to 1 if you have the 'log1p' function. */ +#undef HAVE_LOG1P + +/* Define to 1 if you have the 'log2' function. */ +#undef HAVE_LOG2 + +/* Define to 1 if the system has the type 'max_align_t'. */ +#undef HAVE_MAX_ALIGN_T + +/* Define to 1 if you have the 'mkfifo' function. */ +#undef HAVE_MKFIFO + +/* Define to 1 if you have the 'mkstemp' function. */ +#undef HAVE_MKSTEMP + +/* Define to 1 if you have the 'mktime' function. */ +#undef HAVE_MKTIME + +/* Define to 1 if you have the 'nanosleep' function. */ +#undef HAVE_NANOSLEEP + +/* Define if you have nice(). */ +#undef HAVE_NICE + +/* Define to 1 if you have the 'pipe2' function. */ +#undef HAVE_PIPE2 + +/* Define to 1 if you have the 'prctl' function. */ +#undef HAVE_PRCTL + +/* Define to 1 if you have the header file. */ +#undef HAVE_PTHREAD_NP_H + +/* Have PTHREAD_PRIO_INHERIT. */ +#undef HAVE_PTHREAD_PRIO_INHERIT + +/* Define to 1 if you have the 'pthread_setname_np' function. */ +#undef HAVE_PTHREAD_SETNAME_NP + +/* Define to 1 if you have the 'pthread_set_name_np' function. */ +#undef HAVE_PTHREAD_SET_NAME_NP + +/* Define to 1 if you have the 'putenv' function. */ +#undef HAVE_PUTENV + +/* Define to 1 if you have the 'pwrite' function. */ +#undef HAVE_PWRITE + +/* Define to 1 if you have the 'realpath' function. */ +#undef HAVE_REALPATH + +/* Define to 1 if you have the 'rewinddir' function. */ +#undef HAVE_REWINDDIR + +/* Define to 1 if you have the 'round' function. */ +#undef HAVE_ROUND + +/* Define to 1 if you have the 'secure_getenv' function. */ +#undef HAVE_SECURE_GETENV + +/* Define to 1 if you have the 'setgroups' function. */ +#undef HAVE_SETGROUPS + +/* Define to 1 if you have the 'setitimer' function. */ +#undef HAVE_SETITIMER + +/* Define to 1 if you have the 'setsid' function. */ +#undef HAVE_SETSID + +/* Define to 1 if you have the 'SetThreadDescription' function. */ +#undef HAVE_SETTHREADDESCRIPTION + +/* Define to 1 if you have the 'shmat' function. */ +#undef HAVE_SHMAT + +/* Define to 1 if you have the 'socket' function. */ +#undef HAVE_SOCKET + +/* Define to 1 if you have the 'socketpair' function. */ +#undef HAVE_SOCKETPAIR + +/* Define if you have BSD sockets. */ +#undef HAVE_SOCKETS + +/* Define to 1 if the system has the type 'socklen_t'. */ +#undef HAVE_SOCKLEN_T + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDINT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDIO_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDLIB_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRINGS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRING_H + +/* Define to 1 if you have the 'strtod_l' function. */ +#undef HAVE_STRTOD_L + +/* Define to 1 if 'st_atimensec' is a member of 'struct stat'. */ +#undef HAVE_STRUCT_STAT_ST_ATIMENSEC + +/* Define to 1 if 'st_atimespec.tv_nsec' is a member of 'struct stat'. */ +#undef HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC + +/* Define to 1 if 'st_atim.tv_nsec' is a member of 'struct stat'. */ +#undef HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC + +/* Define to 1 if you have the 'system' function. */ +#undef HAVE_SYSTEM + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_MMAN_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_SELECT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_SHM_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_STAT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TYPES_H + +/* Define to 1 if you have the 'times' function. */ +#undef HAVE_TIMES + +/* Define to 1 if you have the 'trunc' function. */ +#undef HAVE_TRUNC + +/* Define to 1 if you have the 'uname' function. */ +#undef HAVE_UNAME + +/* Define to 1 if you have the header file. */ +#undef HAVE_UNISTD_H + +/* Define to 1 if you have the 'utimes' function. */ +#undef HAVE_UTIMES + +/* Define to 1 if you have the 'wait4' function. */ +#undef HAVE_WAIT4 + +/* Define to 1 if you have the 'waitpid' function. */ +#undef HAVE_WAITPID + +/* Define to 1 if 'fma' works. The newlib library (intentionally) simply + contains return x * y + z. This workaround is also used for + https://sourceforge.net/p/mingw-w64/bugs/848/ */ +#undef HAVE_WORKING_FMA + +/* Define to 1 if 'round' works. This workaround exists primarily for + https://sourceforge.net/p/mingw-w64/bugs/573/ */ +#undef HAVE_WORKING_ROUND + +/* Define to 1 if you have the '__secure_getenv' function. */ +#undef HAVE___SECURE_GETENV + +/* TODO */ +#undef HEADER_RESERVED_BITS + +/* TODO */ +#undef HUGE_PAGE_SIZE + +/* Define to the sub-directory where libtool stores uninstalled libraries. */ +#undef LT_OBJDIR + +/* TODO */ +#undef MAGIC_NUMBER_PREFIX + +/* TODO */ +#undef MAGIC_NUMBER_VERSION + +/* TODO */ +#undef OCAML_OS_TYPE + +/* TODO */ +#undef OCAML_VERSION + +/* TODO */ +#undef OCAML_VERSION_ADDITIONAL + +/* TODO */ +#undef OCAML_VERSION_EXTRA + +/* TODO */ +#undef OCAML_VERSION_MAJOR + +/* TODO */ +#undef OCAML_VERSION_MINOR + +/* TODO */ +#undef OCAML_VERSION_PATCHLEVEL + +/* TODO */ +#undef OCAML_VERSION_STRING + +/* Define to the address where bug reports for this package should be sent. */ +#undef PACKAGE_BUGREPORT + +/* Define to the full name of this package. */ +#undef PACKAGE_NAME + +/* Define to the full name and version of this package. */ +#undef PACKAGE_STRING + +/* Define to the one symbol short name of this package. */ +#undef PACKAGE_TARNAME + +/* Define to the home page for this package. */ +#undef PACKAGE_URL + +/* Define to the version of this package. */ +#undef PACKAGE_VERSION + +/* TODO */ +#undef POSIX_SIGNALS + +/* Define to necessary symbol if this constant uses a non-standard name on + your system. */ +#undef PTHREAD_CREATE_JOINABLE + +/* The size of 'int', as computed by sizeof. */ +#undef SIZEOF_INT + +/* The size of 'long', as computed by sizeof. */ +#undef SIZEOF_LONG + +/* The size of 'long long', as computed by sizeof. */ +#undef SIZEOF_LONG_LONG + +/* The size of 'long *', as computed by sizeof. */ +#undef SIZEOF_LONG_P + +/* The size of 'short', as computed by sizeof. */ +#undef SIZEOF_SHORT + +/* Define to 1 if all of the C89 standard headers exist (not just the ones + required in a freestanding environment). This macro is provided for + backward compatibility; new code need not use it. */ +#undef STDC_HEADERS + +/* TODO */ +#undef SUPPORTS_TREE_VECTORIZE + +/* TODO */ +#undef SUPPORT_DYNAMIC_LINKING + +/* Define to use mmap MAP_STACK. */ +#undef USE_MMAP_MAP_STACK + +/* TODO */ +#undef WITH_FRAME_POINTERS + +/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most + significant byte first (like Motorola and SPARC, unlike Intel). */ +#if defined AC_APPLE_UNIVERSAL_BUILD +# if defined __BIG_ENDIAN__ +# define WORDS_BIGENDIAN 1 +# endif +#else +# ifndef WORDS_BIGENDIAN +# undef WORDS_BIGENDIAN +# endif +#endif + +/* Define to 'long int' if does not define. */ +#undef off_t + +#include "conf_post.h" + +#endif /* CAML_CONFIG_H */ diff --git a/runtime/power.S b/runtime/power.S index 88ebe2945162..eb4b2d87b976 100644 --- a/runtime/power.S +++ b/runtime/power.S @@ -13,7 +13,7 @@ /* */ /**************************************************************************/ -#include "caml/m.h" +#include "caml/config.h" #include "caml/asm.h" .abiversion 2 diff --git a/runtime/riscv.S b/runtime/riscv.S index 099a48a96435..205ea6df80ad 100644 --- a/runtime/riscv.S +++ b/runtime/riscv.S @@ -16,7 +16,7 @@ /* Asm part of the runtime system, RISC-V processor, 64-bit mode */ /* Must be preprocessed by cpp */ -#include "caml/m.h" +#include "caml/config.h" #include "caml/asm.h" #define DOMAIN_STATE_PTR s11 diff --git a/runtime/s390x.S b/runtime/s390x.S index 7ae504992cda..2c86ba30176f 100644 --- a/runtime/s390x.S +++ b/runtime/s390x.S @@ -15,7 +15,7 @@ /* */ /**************************************************************************/ -#include "caml/m.h" +#include "caml/config.h" #include "caml/asm.h" /* Special registers */ diff --git a/stdlib/header.c b/stdlib/header.c index 3e71883f0f4a..d0e60cdefdb2 100644 --- a/stdlib/header.c +++ b/stdlib/header.c @@ -20,7 +20,6 @@ #include #include #include -#include "caml/s.h" #ifndef _WIN32 #include #endif diff --git a/testsuite/tests/cxx-api/all-includes.h b/testsuite/tests/cxx-api/all-includes.h index 668619d38a43..d4afc8f9760a 100644 --- a/testsuite/tests/cxx-api/all-includes.h +++ b/testsuite/tests/cxx-api/all-includes.h @@ -7,7 +7,6 @@ #include #include #include -#include #include #include #include @@ -34,7 +33,6 @@ #include #include #include -#include #include #include #include diff --git a/testsuite/tests/lib-unix/unix-execvpe/has-execvpe.sh b/testsuite/tests/lib-unix/unix-execvpe/has-execvpe.sh index b08499f5cea9..b1ebaa597cd1 100755 --- a/testsuite/tests/lib-unix/unix-execvpe/has-execvpe.sh +++ b/testsuite/tests/lib-unix/unix-execvpe/has-execvpe.sh @@ -5,7 +5,7 @@ # It makes sense to run the tests only if execvpe is nt implemented. # If it is implemented, the test is skipped. -if grep -q "#define HAVE_EXECVPE" ${ocamlsrcdir}/runtime/caml/s.h; then +if grep -q "#define HAVE_EXECVPE" ${ocamlsrcdir}/runtime/caml/config.h; then exit ${TEST_SKIP}; fi exit ${TEST_PASS}