@@ -663,6 +663,7 @@ PRIMARY_FLAVOR
663663JIT_ARCH
664664JIT_ENABLED
665665EMU_LDFLAGS
666+ ERTS_USE_BUILTIN_RYU
666667M4
667668LIBRT
668669BITS64
@@ -853,6 +854,7 @@ with_with_sparc_memory_order
853854enable_ppc_lwsync_instruction
854855with_threadnames
855856enable_use_embedded_3pp_alternatives
857+ enable_builtin_ryu
856858enable_builtin_zstd
857859enable_builtin_zlib
858860enable_esock
@@ -1601,13 +1603,22 @@ Optional Features:
16011603 disable use of powerpc lwsync instruction
16021604 --enable-use-embedded-3pp-alternatives
16031605 use all available alternatives instead of embedded
1604- 3pps
1606+ 3pps. Implies all --disable-builtin-* options. Can
1607+ be overridden by individual --enable-builtin-*
1608+ options.
16051609 --disable-use-embedded-3pp-alternatives
1606- do not use any alternatives to embedded 3pps
1610+ do not use any alternatives to embedded 3pps.
1611+ Implies all --enable-builtin-* options. Can be
1612+ overridden by individual --disable-builtin-*
1613+ options.
1614+ --enable-builtin-ryu use our own built-in ryu for float to short string
1615+ (default)
1616+ --disable-builtin-ryu use C++17 as an alternative for built-in ryu
16071617 --enable-builtin-zstd force use of our own built-in zstd
16081618 --disable-builtin-zstd try to find a static libzstd on the system to use
1619+ (default)
16091620 --enable-builtin-zlib force use of our own built-in zlib
1610- --disable-builtin-zlib try to find a zlib on the system to use
1621+ --disable-builtin-zlib try to find a zlib on the system to use (default)
16111622 --enable-esock enable builtin socket (as a nif) support (default)
16121623 --disable-esock disable builtin socket (as a nif) support
16131624 --enable-esock-rcvsndtimeo
@@ -16670,21 +16681,28 @@ if test ${enable_use_embedded_3pp_alternatives+y}
1667016681then :
1667116682 enableval=$enable_use_embedded_3pp_alternatives; case "$enableval" in
1667216683 no)
16684+ builtin_ryu=yes
1667316685 builtin_zstd=yes
1667416686 builtin_zlib=yes
1667516687 ;;
1667616688 *)
16689+ builtin_ryu=no
1667716690 builtin_zstd=no
1667816691 builtin_zlib=no
1667916692 ;;
1668016693 esac
1668116694
16682- else case e in #(
16683- e)
16684- builtin_zstd=no
16685- builtin_zlib=no
16686- ;;
16687- esac
16695+ fi
16696+
16697+
16698+
16699+ # Check whether --enable-builtin-ryu was given.
16700+ if test ${enable_builtin_ryu+y}
16701+ then :
16702+ enableval=$enable_builtin_ryu; case "$enableval" in
16703+ no) builtin_ryu=no ;;
16704+ *) builtin_ryu=yes ;;
16705+ esac
1668816706fi
1668916707
1669016708
@@ -16701,7 +16719,7 @@ fi
1670116719
1670216720LIBZSTD=
1670316721
16704- if test "$builtin_zstd" = "no "
16722+ if test "$builtin_zstd" ! = "yes "
1670516723then :
1670616724
1670716725 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for static libzstd of version 1.5.6 or higher" >&5
@@ -16740,8 +16758,14 @@ printf "%s\n" "yes" >&6; }
1674016758
1674116759else case e in #(
1674216760 e)
16743- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no, using builtin zstd instead" >&5
16744- printf "%s\n" "no, using builtin zstd instead" >&6; }
16761+ if test "$builtin_zstd" = "no"
16762+ then :
16763+ as_fn_error $? "libzstd not found" "$LINENO" 5
16764+ else case e in #(
16765+ e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no, using builtin zstd instead" >&5
16766+ printf "%s\n" "no, using builtin zstd instead" >&6; } ;;
16767+ esac
16768+ fi
1674516769 ;;
1674616770esac
1674716771fi
@@ -16777,17 +16801,9 @@ fi
1677716801
1677816802Z_LIB=
1677916803
16780- if test "x $builtin_zlib" = "xyes "
16804+ if test "$builtin_zlib" ! = "yes "
1678116805then :
1678216806
16783-
16784- printf "%s\n" "#define HAVE_ZLIB_INFLATEGETDICTIONARY 1" >>confdefs.h
16785-
16786- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Using our own built-in zlib source" >&5
16787- printf "%s\n" "$as_me: Using our own built-in zlib source" >&6;}
16788-
16789- else case e in #(
16790- e)
1679116807{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for zlib 1.2.5 or higher" >&5
1679216808printf %s "checking for zlib 1.2.5 or higher... " >&6; }
1679316809zlib_save_LIBS=$LIBS
@@ -16826,8 +16842,14 @@ printf "%s\n" "yes" >&6; }
1682616842
1682716843else case e in #(
1682816844 e)
16829- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16830- printf "%s\n" "no" >&6; }
16845+ if test "$builtin_zlib" = "no"
16846+ then :
16847+ as_fn_error $? "zlib not found" "$LINENO" 5
16848+ else case e in #(
16849+ e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no, using builtin zlib instead" >&5
16850+ printf "%s\n" "no, using builtin zlib instead" >&6; } ;;
16851+ esac
16852+ fi
1683116853 ;;
1683216854esac
1683316855fi
@@ -16911,17 +16933,21 @@ fi
1691116933
1691216934LIBS=$zlib_save_LIBS
1691316935
16914- ;;
16915- esac
16936+
1691616937fi
1691716938
1691816939if test "$Z_LIB" = ""
1691916940then :
1692016941
16942+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Using our own built-in zlib source" >&5
16943+ printf "%s\n" "$as_me: Using our own built-in zlib source" >&6;}
1692116944
1692216945printf "%s\n" "#define ERTS_USE_BUILTIN_ZLIB 1" >>confdefs.h
1692316946
1692416947
16948+ printf "%s\n" "#define HAVE_ZLIB_INFLATEGETDICTIONARY 1" >>confdefs.h
16949+
16950+
1692516951fi
1692616952
1692716953
@@ -26278,7 +26304,6 @@ fi
2627826304
2627926305
2628026306JIT_ARCH=
26281-
2628226307if test ${enable_jit} != no
2628326308then :
2628426309
@@ -26345,7 +26370,10 @@ printf "%s\n" "$as_me: WARNING: JIT disabled due to lack to support on $ARCH-$OP
2634526370 ;;
2634626371 esac
2634726372
26348- if test ${enable_jit} != no
26373+ fi
26374+
26375+
26376+ if test ${enable_jit} != no -o "$builtin_ryu" = "no"
2634926377then :
2635026378
2635126379 if test "$CXX" != false
@@ -26384,6 +26412,7 @@ else case e in #(
2638426412printf %s "checking for C++17 support... " >&6; }
2638526413 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
2638626414printf "%s\n" "no" >&6; }
26415+ CXXFLAGS=$old_CXXFLAGS
2638726416 HAVE_CXX17=false ;;
2638826417esac
2638926418fi
@@ -26397,27 +26426,50 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
2639726426
2639826427fi
2639926428 if test "$CXX" = false -o "$HAVE_CXX17" = false; then
26429+ # C++17 not found
26430+ if test "$builtin_ryu" = "no"; then
26431+ as_fn_error $? "Alternative to builtin ryu needs C++17 support" "$LINENO" 5
26432+ else
26433+ builtin_ryu=yes
26434+ fi
2640026435 if test ${enable_jit} = yes; then
2640126436 as_fn_error $? "JIT needs a C++ compiler with C++17 support" "$LINENO" 5
26402- else
26437+ fi
26438+ if test ${enable_jit} != no; then
2640326439 enable_jit=no
2640426440 cat >> $ERL_TOP/erts/CONF_INFO <<EOF
2640526441
2640626442 JIT disabled due to lack of compiler with C++17 support
2640726443EOF
2640826444 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: JIT disable due to lack of C++ compiler with C++17 support" >&5
2640926445printf "%s\n" "$as_me: WARNING: JIT disable due to lack of C++ compiler with C++17 support" >&2;}
26410- fi
26411- fi
26446+ fi
26447+ else
26448+ # C++17 found
26449+ if test ${enable_jit} != no; then
26450+ enable_jit=yes
26451+ fi
26452+ fi
2641226453
2641326454fi
2641426455
26415- if test ${enable_jit} != no; then
26416- enable_jit=yes
26417- fi
26456+ if test "$builtin_ryu" = "no"
26457+ then :
2641826458
26459+ ERTS_USE_BUILTIN_RYU=no
26460+
26461+ else case e in #(
26462+ e)
26463+
26464+ printf "%s\n" "#define ERTS_USE_BUILTIN_RYU 1" >>confdefs.h
26465+
26466+ ERTS_USE_BUILTIN_RYU=yes
26467+ ;;
26468+ esac
2641926469fi
2642026470
26471+
26472+
2642126473if test ${enable_jit} != no
2642226474then :
2642326475
0 commit comments