configure: use variables rather than arguments for a few options (#8616)
This commit replaces a few configure command-line options by configuration variables: - "--with-dllibs" is replaced by DLLIBS - "--with-reserved-header-bits" is replaced by RESERVED_HEADER_BITS - "--with-default-string" is replaced by DEFAULT_STRINGmaster
parent
89b1ab4aca
commit
17feab2a4f
3
Changes
3
Changes
|
@ -856,6 +856,9 @@ OCaml 4.08.0
|
|||
- GPR#2207,#8604: Add opam files to allow pinning
|
||||
(Leo White, Greta Yorsh, review by Gabriel Radanne)
|
||||
|
||||
- #8616: configure: use variables rather than arguments for a few options
|
||||
(Sébastien Hinderer, review by David Allsopp and Gabriel Scherer)
|
||||
|
||||
### Internal/compiler-libs changes:
|
||||
|
||||
- #7918, #1703, #1944, #2213, #2257: Add the module
|
||||
|
|
|
@ -181,7 +181,7 @@ EXE=@exeext@
|
|||
OUTPUTEXE=@outputexe@
|
||||
SUPPORTS_SHARED_LIBRARIES=@supports_shared_libraries@
|
||||
MKSHAREDLIBRPATH=@mksharedlibrpath@
|
||||
DYNLINKOPTS=@dllibs@
|
||||
DYNLINKOPTS=@DLLIBS@
|
||||
NATDYNLINK=@natdynlink@
|
||||
NATDYNLINKOPTS=@natdynlinkopts@
|
||||
SYSLIB=@syslib@
|
||||
|
|
|
@ -671,7 +671,9 @@ CFLAGS
|
|||
LIBTOOL
|
||||
ac_ct_LD
|
||||
LD
|
||||
DEFAULT_STRING
|
||||
WINDOWS_UNICODE_MODE
|
||||
DLLIBS
|
||||
PARTIALLD
|
||||
target_os
|
||||
target_vendor
|
||||
|
@ -743,7 +745,6 @@ ocamlopt_cflags
|
|||
ocamlc_cppflags
|
||||
ocamlc_cflags
|
||||
nativecclibs
|
||||
dllibs
|
||||
bytecclibs
|
||||
oc_ldflags
|
||||
oc_cppflags
|
||||
|
@ -819,7 +820,6 @@ ac_user_opts='
|
|||
enable_option_checking
|
||||
enable_debug_runtime
|
||||
enable_debugger
|
||||
with_dllibs
|
||||
enable_instrumented_runtime
|
||||
enable_vmthreads
|
||||
enable_systhreads
|
||||
|
@ -841,9 +841,8 @@ enable_native_compiler
|
|||
enable_flambda
|
||||
enable_flambda_invariants
|
||||
with_target_bindir
|
||||
with_reserved_header_bits
|
||||
enable_reserved_header_bits
|
||||
enable_force_safe_string
|
||||
with_default_string
|
||||
enable_flat_float_array
|
||||
with_afl
|
||||
enable_shared
|
||||
|
@ -861,7 +860,9 @@ target_alias
|
|||
AS
|
||||
ASPP
|
||||
PARTIALLD
|
||||
DLLIBS
|
||||
WINDOWS_UNICODE_MODE
|
||||
DEFAULT_STRING
|
||||
CC
|
||||
CFLAGS
|
||||
LDFLAGS
|
||||
|
@ -1508,6 +1509,9 @@ Optional Features:
|
|||
--enable-flambda enable flambda optimizations
|
||||
--enable-flambda-invariants
|
||||
enable invariants checks in flambda
|
||||
--enable-reserved-header-bits=BITS
|
||||
reserve BITS (between 0 and 31) bits in block
|
||||
headers for profiling info
|
||||
--enable-force-safe-string
|
||||
force strings to be safe
|
||||
--disable-flat-float-array
|
||||
|
@ -1521,18 +1525,10 @@ Optional Features:
|
|||
Optional Packages:
|
||||
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
|
||||
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
|
||||
--with-dllibs=LIBS use LIBS (in addition to dl) to load dynamic libs
|
||||
[default=""]
|
||||
--with-libunwind location of the libunwind package
|
||||
--with-libunwind-include-dir
|
||||
location of header files for libunwind
|
||||
--with-target-bindir location of binary programs on target system
|
||||
--with-reserved-header-bits=BITS
|
||||
reserve BITS bits in block headers for profiling
|
||||
info
|
||||
--with-default-string=mode
|
||||
whether strings should be safe or unsafe by default
|
||||
[default=safe]
|
||||
--with-afl use the AFL fuzzer
|
||||
--with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use
|
||||
both]
|
||||
|
@ -1547,8 +1543,12 @@ Some influential environment variables:
|
|||
AS which assembler to use
|
||||
ASPP which assembler (with preprocessor) to use
|
||||
PARTIALLD how to build partial (relocatable) object files
|
||||
DLLIBS which libraries to use (in addition to -ldl) to load dynamic
|
||||
libs
|
||||
WINDOWS_UNICODE_MODE
|
||||
how to handle Unicode under Windows: ansi, compatible
|
||||
DEFAULT_STRING
|
||||
whether strings should be safe (default) or unsafe
|
||||
CC C compiler command
|
||||
CFLAGS C compiler flags
|
||||
LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
|
||||
|
@ -2769,7 +2769,6 @@ VERSION=4.10.0+dev0-2019-04-23
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# TODO: rename this variable
|
||||
|
@ -2973,13 +2972,6 @@ fi
|
|||
|
||||
|
||||
|
||||
# Check whether --with-dllibs was given.
|
||||
if test "${with_dllibs+set}" = set; then :
|
||||
withval=$with_dllibs; otherdllibs=$withval
|
||||
else
|
||||
otherdllibs=""
|
||||
fi
|
||||
|
||||
|
||||
# Check whether --enable-instrumented-runtime was given.
|
||||
if test "${enable_instrumented_runtime+set}" = set; then :
|
||||
|
@ -3116,10 +3108,18 @@ if test "${with_target_bindir+set}" = set; then :
|
|||
fi
|
||||
|
||||
|
||||
|
||||
# Check whether --with-reserved-header-bits was given.
|
||||
if test "${with_reserved_header_bits+set}" = set; then :
|
||||
withval=$with_reserved_header_bits;
|
||||
# Check whether --enable-reserved-header-bits was given.
|
||||
if test "${enable_reserved_header_bits+set}" = set; then :
|
||||
enableval=$enable_reserved_header_bits; case $enable_reserved_header_bits in #(
|
||||
0) :
|
||||
with_profinfo=false
|
||||
profinfo_width=0 ;; #(
|
||||
[1-9]|1[0-9]|2[0-1]) :
|
||||
with_profinfo=true
|
||||
profinfo_width="$enable_reserved_header_bits" ;; #(
|
||||
*) :
|
||||
as_fn_error $? "invalid argument to --enable-reserved-header-bits" "$LINENO" 5 ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
|
||||
|
@ -3127,7 +3127,7 @@ fi
|
|||
|
||||
# There are two configure-time string safety options,
|
||||
# --(enable|disable)-force-safe-string and
|
||||
# --with-default-string=safe|unsafe that
|
||||
# DEFAULT_STRING=safe|unsafe that
|
||||
# interact with a compile-time (un)safe-string option.
|
||||
#
|
||||
# If --enable-force-safe-string is set at configure time, then the compiler
|
||||
|
@ -3139,13 +3139,13 @@ fi
|
|||
# If --disable-force-safe-string is set at configure-time, the compiler
|
||||
# will use the compile-time (un)safe-string option to decide whether
|
||||
# string and bytes are compatible on a per-file basis. The
|
||||
# configure-time options --with-default-string=safe|unsafe decides which
|
||||
# configuration variable DEFAULT_STRING=safe|unsafe decides which
|
||||
# setting will be chosen by default, if no compile-time option is
|
||||
# explicitly passed.
|
||||
#
|
||||
# The configure-time behavior of OCaml 4.05 and older was equivalent
|
||||
# to --disable-force-safe-string --with-default-string=unsafe. OCaml 4.06
|
||||
# and later uses --disable-force-safe-string --with-default-string=safe. We
|
||||
# to --disable-force-safe-string DEFAULT_STRING=unsafe. OCaml 4.06
|
||||
# and later use --disable-force-safe-string DEFAULT_STRING=safe. We
|
||||
# expect --enable-force-safe-string to become the default in the future.
|
||||
|
||||
# Check whether --enable-force-safe-string was given.
|
||||
|
@ -3155,11 +3155,6 @@ fi
|
|||
|
||||
|
||||
|
||||
# Check whether --with-default-string was given.
|
||||
if test "${with_default_string+set}" = set; then :
|
||||
withval=$with_default_string;
|
||||
fi
|
||||
|
||||
|
||||
# Check whether --enable-flat-float-array was given.
|
||||
if test "${enable_flat_float_array+set}" = set; then :
|
||||
|
@ -14473,11 +14468,11 @@ esac
|
|||
if $shared_libraries_supported; then :
|
||||
case $host in #(
|
||||
*-*-mingw32|*-pc-windows) :
|
||||
supports_shared_libraries=$shared_libraries_supported; dllibs="" ;; #(
|
||||
supports_shared_libraries=$shared_libraries_supported; DLLIBS="" ;; #(
|
||||
*) :
|
||||
ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
|
||||
if test "x$ac_cv_func_dlopen" = xyes; then :
|
||||
supports_shared_libraries=true dllibs=""
|
||||
supports_shared_libraries=true DLLIBS=""
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
|
||||
$as_echo_n "checking for dlopen in -ldl... " >&6; }
|
||||
|
@ -14516,7 +14511,7 @@ fi
|
|||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
|
||||
$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
|
||||
if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
|
||||
supports_shared_libraries=true dllibs="-ldl $otherdllibs"
|
||||
supports_shared_libraries=true DLLIBS="-ldl $DLLIBS"
|
||||
else
|
||||
supports_shared_libraries=false
|
||||
fi
|
||||
|
@ -16474,7 +16469,7 @@ else
|
|||
force_safe_string=false
|
||||
fi
|
||||
|
||||
if test x"$with_default_string" = "xunsafe"; then :
|
||||
if test x"$DEFAULT_STRING" = "xunsafe"; then :
|
||||
default_safe_string=false
|
||||
else
|
||||
default_safe_string=true
|
||||
|
@ -16496,8 +16491,8 @@ case $host in #(
|
|||
bytecclibs="advapi32.lib ws2_32.lib version.lib"
|
||||
nativecclibs="advapi32.lib ws2_32.lib version.lib" ;; #(
|
||||
*) :
|
||||
bytecclibs="$cclibs $dllibs $pthread_link $instrumented_runtime_libs"
|
||||
nativecclibs="$cclibs $dllibs" ;;
|
||||
bytecclibs="$cclibs $DLLIBS $pthread_link $instrumented_runtime_libs"
|
||||
nativecclibs="$cclibs $DLLIBS" ;;
|
||||
esac
|
||||
|
||||
if test x"$libdir" = x'${exec_prefix}/lib'; then :
|
||||
|
|
48
configure.ac
48
configure.ac
|
@ -102,7 +102,6 @@ AC_SUBST([oc_cflags])
|
|||
AC_SUBST([oc_cppflags])
|
||||
AC_SUBST([oc_ldflags])
|
||||
AC_SUBST([bytecclibs])
|
||||
AC_SUBST([dllibs])
|
||||
AC_SUBST([nativecclibs])
|
||||
AC_SUBST([ocamlc_cflags])
|
||||
AC_SUBST([ocamlc_cppflags])
|
||||
|
@ -207,11 +206,8 @@ AC_ARG_ENABLE([debugger],
|
|||
[],
|
||||
[enable_debugger=auto])
|
||||
|
||||
AC_ARG_WITH([dllibs],
|
||||
[AS_HELP_STRING([--with-dllibs=LIBS],
|
||||
[use LIBS (in addition to dl) to load dynamic libs @<:@default=""@:>@])],
|
||||
[otherdllibs=$withval],
|
||||
[otherdllibs=""])
|
||||
AC_ARG_VAR([DLLIBS],
|
||||
[which libraries to use (in addition to -ldl) to load dynamic libs])
|
||||
|
||||
AC_ARG_ENABLE([instrumented-runtime],
|
||||
[AS_HELP_STRING([--enable-instrumented-runtime],
|
||||
|
@ -303,16 +299,24 @@ AC_ARG_WITH([target-bindir],
|
|||
[AS_HELP_STRING([--with-target-bindir],
|
||||
[location of binary programs on target system])])
|
||||
|
||||
AC_ARG_WITH([reserved-header-bits],
|
||||
[AS_HELP_STRING([--with-reserved-header-bits=BITS],
|
||||
[reserve BITS bits in block headers for profiling info])])
|
||||
AC_ARG_ENABLE([reserved-header-bits],
|
||||
[AS_HELP_STRING([--enable-reserved-header-bits=BITS],
|
||||
[reserve BITS (between 0 and 31) bits in block headers for profiling info])],
|
||||
[AS_CASE([$enable_reserved_header_bits],
|
||||
[0],
|
||||
[with_profinfo=false
|
||||
profinfo_width=0],
|
||||
[[[1-9]]|1[[0-9]]|2[[0-1]]],
|
||||
[with_profinfo=true
|
||||
profinfo_width="$enable_reserved_header_bits"],
|
||||
[AC_MSG_ERROR([invalid argument to --enable-reserved-header-bits])])])
|
||||
|
||||
AC_ARG_VAR([WINDOWS_UNICODE_MODE],
|
||||
[how to handle Unicode under Windows: ansi, compatible])
|
||||
|
||||
# There are two configure-time string safety options,
|
||||
# --(enable|disable)-force-safe-string and
|
||||
# --with-default-string=safe|unsafe that
|
||||
# DEFAULT_STRING=safe|unsafe that
|
||||
# interact with a compile-time (un)safe-string option.
|
||||
#
|
||||
# If --enable-force-safe-string is set at configure time, then the compiler
|
||||
|
@ -324,23 +328,21 @@ AC_ARG_VAR([WINDOWS_UNICODE_MODE],
|
|||
# If --disable-force-safe-string is set at configure-time, the compiler
|
||||
# will use the compile-time (un)safe-string option to decide whether
|
||||
# string and bytes are compatible on a per-file basis. The
|
||||
# configure-time options --with-default-string=safe|unsafe decides which
|
||||
# configuration variable DEFAULT_STRING=safe|unsafe decides which
|
||||
# setting will be chosen by default, if no compile-time option is
|
||||
# explicitly passed.
|
||||
#
|
||||
# The configure-time behavior of OCaml 4.05 and older was equivalent
|
||||
# to --disable-force-safe-string --with-default-string=unsafe. OCaml 4.06
|
||||
# and later uses --disable-force-safe-string --with-default-string=safe. We
|
||||
# to --disable-force-safe-string DEFAULT_STRING=unsafe. OCaml 4.06
|
||||
# and later use --disable-force-safe-string DEFAULT_STRING=safe. We
|
||||
# expect --enable-force-safe-string to become the default in the future.
|
||||
|
||||
AC_ARG_ENABLE([force-safe-string],
|
||||
[AS_HELP_STRING([--enable-force-safe-string],
|
||||
[force strings to be safe])])
|
||||
|
||||
AC_ARG_WITH([default-string],
|
||||
[AS_HELP_STRING([--with-default-string=mode],
|
||||
[whether strings should be safe or unsafe by default
|
||||
@<:@default=safe@:>@])])
|
||||
AC_ARG_VAR([DEFAULT_STRING],
|
||||
[whether strings should be safe (default) or unsafe])
|
||||
|
||||
AC_ARG_ENABLE([flat-float-array],
|
||||
[AS_HELP_STRING([--disable-flat-float-array],
|
||||
|
@ -1261,11 +1263,11 @@ AS_CASE([$host],
|
|||
AS_IF([$shared_libraries_supported],
|
||||
[AS_CASE([$host],
|
||||
[*-*-mingw32|*-pc-windows],
|
||||
[supports_shared_libraries=$shared_libraries_supported; dllibs=""],
|
||||
[supports_shared_libraries=$shared_libraries_supported; DLLIBS=""],
|
||||
[AC_CHECK_FUNC([dlopen],
|
||||
[supports_shared_libraries=true dllibs=""],
|
||||
[supports_shared_libraries=true DLLIBS=""],
|
||||
[AC_CHECK_LIB([dl], [dlopen],
|
||||
[supports_shared_libraries=true dllibs="-ldl $otherdllibs"],
|
||||
[supports_shared_libraries=true DLLIBS="-ldl $DLLIBS"],
|
||||
[supports_shared_libraries=false])])])],
|
||||
[supports_shared_libraries=false])
|
||||
|
||||
|
@ -1579,7 +1581,7 @@ AS_IF([test x"$enable_force_safe_string" = "xyes"],
|
|||
force_safe_string=true],
|
||||
[force_safe_string=false])
|
||||
|
||||
AS_IF([test x"$with_default_string" = "xunsafe"],
|
||||
AS_IF([test x"$DEFAULT_STRING" = "xunsafe"],
|
||||
[default_safe_string=false],
|
||||
[default_safe_string=true])
|
||||
|
||||
|
@ -1598,8 +1600,8 @@ AS_CASE([$host],
|
|||
[*-pc-windows],
|
||||
[bytecclibs="advapi32.lib ws2_32.lib version.lib"
|
||||
nativecclibs="advapi32.lib ws2_32.lib version.lib"],
|
||||
[bytecclibs="$cclibs $dllibs $pthread_link $instrumented_runtime_libs"
|
||||
nativecclibs="$cclibs $dllibs"])
|
||||
[bytecclibs="$cclibs $DLLIBS $pthread_link $instrumented_runtime_libs"
|
||||
nativecclibs="$cclibs $DLLIBS"])
|
||||
|
||||
AS_IF([test x"$libdir" = x'${exec_prefix}/lib'],
|
||||
[libdir="$libdir"/ocaml])
|
||||
|
|
Loading…
Reference in New Issue