Make unix, vmthreads and str optional libraries
--disable-unix-lib, --disable-vmthreads and --disable-str-lib added to prevent building these three libraries. ocamldoc, the debugger and caml-tex are automatically disabled if their prerequisites are not built. Using --enable-debugger and --enable-ocamldoc will result in errors if these tools cannot be built.master
parent
91611d0b77
commit
832db132d9
|
@ -227,6 +227,7 @@ MKEXEDEBUGFLAG=@mkexedebugflag@
|
|||
RUNTIMED=@debug_runtime@
|
||||
RUNTIMEI=@instrumented_runtime@
|
||||
WITH_DEBUGGER=@with_debugger@
|
||||
WITH_CAMLTEX=@with_camltex@
|
||||
WITH_OCAMLDOC=@ocamldoc@
|
||||
ASM_CFI_SUPPORTED=@asm_cfi_supported@
|
||||
WITH_FRAME_POINTERS=@frame_pointers@
|
||||
|
|
|
@ -724,6 +724,7 @@ x_libraries
|
|||
x_includes
|
||||
pthread_link
|
||||
ocamldoc
|
||||
with_camltex
|
||||
with_debugger
|
||||
as_has_debug_prefix_map
|
||||
cc_has_debug_prefix_map
|
||||
|
@ -824,10 +825,13 @@ enable_debug_runtime
|
|||
enable_debugger
|
||||
with_dllibs
|
||||
enable_instrumented_runtime
|
||||
enable_vmthreads
|
||||
enable_systhreads
|
||||
with_libunwind
|
||||
with_libunwind_include_dir
|
||||
enable_graph_lib
|
||||
enable_str_lib
|
||||
enable_unix_lib
|
||||
enable_ocamldoc
|
||||
enable_frame_pointers
|
||||
enable_naked_pointers
|
||||
|
@ -1502,8 +1506,11 @@ Optional Features:
|
|||
--enable-debugger build the debugger [default=yes]
|
||||
--enable-instrumented-runtime
|
||||
build the instrumented runtime [default=auto]
|
||||
--disable-vmthreads disable the bytecode threads library
|
||||
--disable-systhreads disable the Win32/POSIX threads library
|
||||
--disable-graph-lib do not build the graphics library
|
||||
--disable-str-lib do not build the str library
|
||||
--disable-unix-lib do not build the unix library
|
||||
--disable-ocamldoc do not build the ocamldoc documentation system
|
||||
--enable-frame-pointers use frame pointers in runtime and generated code
|
||||
--disable-naked-pointers
|
||||
|
@ -2821,6 +2828,7 @@ VERSION=4.08.0+dev0-2018-04-09
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## Generated files
|
||||
|
@ -2982,7 +2990,7 @@ fi
|
|||
if test "${enable_debugger+set}" = set; then :
|
||||
enableval=$enable_debugger;
|
||||
else
|
||||
enable_debugger=yes
|
||||
enable_debugger=auto
|
||||
fi
|
||||
|
||||
|
||||
|
@ -3003,6 +3011,12 @@ else
|
|||
fi
|
||||
|
||||
|
||||
# Check whether --enable-vmthreads was given.
|
||||
if test "${enable_vmthreads+set}" = set; then :
|
||||
enableval=$enable_vmthreads;
|
||||
fi
|
||||
|
||||
|
||||
# Check whether --enable-systhreads was given.
|
||||
if test "${enable_systhreads+set}" = set; then :
|
||||
enableval=$enable_systhreads;
|
||||
|
@ -3029,9 +3043,23 @@ if test "${enable_graph_lib+set}" = set; then :
|
|||
fi
|
||||
|
||||
|
||||
# Check whether --enable-str-lib was given.
|
||||
if test "${enable_str_lib+set}" = set; then :
|
||||
enableval=$enable_str_lib;
|
||||
fi
|
||||
|
||||
|
||||
# Check whether --enable-unix-lib was given.
|
||||
if test "${enable_unix_lib+set}" = set; then :
|
||||
enableval=$enable_unix_lib;
|
||||
fi
|
||||
|
||||
|
||||
# Check whether --enable-ocamldoc was given.
|
||||
if test "${enable_ocamldoc+set}" = set; then :
|
||||
enableval=$enable_ocamldoc;
|
||||
else
|
||||
ocamldoc=auto
|
||||
fi
|
||||
|
||||
|
||||
|
@ -3157,6 +3185,25 @@ if test "${with_afl+set}" = set; then :
|
|||
fi
|
||||
|
||||
|
||||
if test x"$enable_unix_lib" = "xno"; then :
|
||||
if test x"$enable_debugger" = "xyes"; then :
|
||||
as_fn_error $? "replay debugger requires the unix library" "$LINENO" 5
|
||||
else
|
||||
enable_debugger="no"
|
||||
fi
|
||||
fi
|
||||
|
||||
if test x"$enable_unix_lib" = "xno" -o x"$enable_str_lib" = "xno"; then :
|
||||
if test x"$enable_ocamldoc" = "xyes"; then :
|
||||
as_fn_error $? "ocamldoc requires the unix and str libraries" "$LINENO" 5
|
||||
else
|
||||
enable_ocamldoc="no"
|
||||
with_camltex=""
|
||||
fi
|
||||
else
|
||||
with_camltex="true"
|
||||
fi
|
||||
|
||||
# Initialization of libtool
|
||||
# Allow the MSVC linker to be found even if ld isn't installed.
|
||||
# User-specified LD still takes precedence.
|
||||
|
@ -12257,7 +12304,13 @@ case $host in #(
|
|||
cc_profile='-pg' ;;
|
||||
esac
|
||||
|
||||
otherlibraries="$unixlib str dynlink bigarray"
|
||||
otherlibraries="dynlink"
|
||||
if test x"$enable_unix_lib" != "xno"; then :
|
||||
otherlibraries="$otherlibraries $unixlib bigarray"
|
||||
fi
|
||||
if test x"$enable_str_lib" != "xno"; then :
|
||||
otherlibraries="$otherlibraries str"
|
||||
fi
|
||||
|
||||
# Checks for system services
|
||||
|
||||
|
@ -15971,14 +16024,24 @@ fi
|
|||
|
||||
## Determine if the bytecode thread library is supported
|
||||
|
||||
if $select && $setitimer && $gettimeofday && $wait; then :
|
||||
if test x"$enable_vmthreads" = "xno"; then :
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: the bytecode threads library is disabled" >&5
|
||||
$as_echo "$as_me: the bytecode threads library is disabled" >&6;}
|
||||
else
|
||||
if $select && $setitimer && $gettimeofday && $wait; then :
|
||||
otherlibraries="$otherlibraries threads"
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: the bytecode threads library is supported" >&5
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: the bytecode threads library is supported" >&5
|
||||
$as_echo "$as_me: the bytecode threads library is supported" >&6;}
|
||||
else
|
||||
if test x"$enable_vmthreads" = "xyes"; then :
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: the bytecode threads library is not available" >&5
|
||||
$as_echo "$as_me: the bytecode threads library is not available" >&6;}
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: the bytecode threads library is not supported" >&5
|
||||
$as_echo "$as_me: the bytecode threads library is not supported" >&6;}
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
## XWindow
|
||||
|
||||
|
@ -16798,7 +16861,7 @@ else
|
|||
install_source_artifacts=true
|
||||
fi
|
||||
|
||||
if test x"$enable_ocamldoc" == "xno"; then :
|
||||
if test x"$enable_ocamldoc" = "xno"; then :
|
||||
ocamldoc=""
|
||||
else
|
||||
ocamldoc=ocamldoc
|
||||
|
|
51
configure.ac
51
configure.ac
|
@ -124,6 +124,7 @@ AC_SUBST([otherlibraries])
|
|||
AC_SUBST([cc_has_debug_prefix_map])
|
||||
AC_SUBST([as_has_debug_prefix_map])
|
||||
AC_SUBST([with_debugger]) # TODO: rename this variable
|
||||
AC_SUBST([with_camltex])
|
||||
AC_SUBST([ocamldoc])
|
||||
AC_SUBST([pthread_link])
|
||||
AC_SUBST([x_includes])
|
||||
|
@ -207,7 +208,7 @@ AC_ARG_ENABLE([debugger],
|
|||
[AS_HELP_STRING([--enable-debugger],
|
||||
[build the debugger @<:@default=yes@:>@])],
|
||||
[],
|
||||
[enable_debugger=yes])
|
||||
[enable_debugger=auto])
|
||||
|
||||
AC_ARG_WITH([dllibs],
|
||||
[AS_HELP_STRING([--with-dllibs=LIBS],
|
||||
|
@ -221,6 +222,10 @@ AC_ARG_ENABLE([instrumented-runtime],
|
|||
[],
|
||||
[enable_instrumented_runtime=auto])
|
||||
|
||||
AC_ARG_ENABLE([vmthreads],
|
||||
[AS_HELP_STRING([--disable-vmthreads],
|
||||
[disable the bytecode threads library])])
|
||||
|
||||
AC_ARG_ENABLE([systhreads],
|
||||
[AS_HELP_STRING([--disable-systhreads],
|
||||
[disable the Win32/POSIX threads library])])
|
||||
|
@ -237,9 +242,19 @@ AC_ARG_ENABLE([graph-lib],
|
|||
[AS_HELP_STRING([--disable-graph-lib],
|
||||
[do not build the graphics library])])
|
||||
|
||||
AC_ARG_ENABLE([str-lib],
|
||||
[AS_HELP_STRING([--disable-str-lib],
|
||||
[do not build the str library])])
|
||||
|
||||
AC_ARG_ENABLE([unix-lib],
|
||||
[AS_HELP_STRING([--disable-unix-lib],
|
||||
[do not build the unix library])])
|
||||
|
||||
AC_ARG_ENABLE([ocamldoc],
|
||||
[AS_HELP_STRING([--disable-ocamldoc],
|
||||
[do not build the ocamldoc documentation system])])
|
||||
[do not build the ocamldoc documentation system])],
|
||||
[],
|
||||
[ocamldoc=auto])
|
||||
|
||||
AC_ARG_ENABLE([frame-pointers],
|
||||
[AS_HELP_STRING([--enable-frame-pointers],
|
||||
|
@ -328,6 +343,18 @@ AC_ARG_WITH([afl],
|
|||
[AS_HELP_STRING([--with-afl],
|
||||
[use the AFL fuzzer])])
|
||||
|
||||
AS_IF([test x"$enable_unix_lib" = "xno"],
|
||||
[AS_IF([test x"$enable_debugger" = "xyes"],
|
||||
[AC_MSG_ERROR([replay debugger requires the unix library])],
|
||||
[enable_debugger="no"])])
|
||||
|
||||
AS_IF([test x"$enable_unix_lib" = "xno" -o x"$enable_str_lib" = "xno"],
|
||||
[AS_IF([test x"$enable_ocamldoc" = "xyes"],
|
||||
[AC_MSG_ERROR([ocamldoc requires the unix and str libraries])],
|
||||
[enable_ocamldoc="no"
|
||||
with_camltex=""])],
|
||||
[with_camltex="true"])
|
||||
|
||||
# Initialization of libtool
|
||||
# Allow the MSVC linker to be found even if ld isn't installed.
|
||||
# User-specified LD still takes precedence.
|
||||
|
@ -383,7 +410,11 @@ AS_CASE([$host],
|
|||
graphlib="graph"
|
||||
cc_profile='-pg'])
|
||||
|
||||
otherlibraries="$unixlib str dynlink bigarray"
|
||||
otherlibraries="dynlink"
|
||||
AS_IF([test x"$enable_unix_lib" != "xno"],
|
||||
[otherlibraries="$otherlibraries $unixlib bigarray"])
|
||||
AS_IF([test x"$enable_str_lib" != "xno"],
|
||||
[otherlibraries="$otherlibraries str"])
|
||||
|
||||
# Checks for system services
|
||||
|
||||
|
@ -1435,10 +1466,14 @@ AS_IF([test x"$enable_systhreads" = "xno"],
|
|||
|
||||
## Determine if the bytecode thread library is supported
|
||||
|
||||
AS_IF([$select && $setitimer && $gettimeofday && $wait],
|
||||
[otherlibraries="$otherlibraries threads"
|
||||
AC_MSG_NOTICE([the bytecode threads library is supported])],
|
||||
[AC_MSG_NOTICE([the bytecode threads library is not supported])])
|
||||
AS_IF([test x"$enable_vmthreads" = "xno"],
|
||||
[AC_MSG_NOTICE([the bytecode threads library is disabled])],
|
||||
[AS_IF([$select && $setitimer && $gettimeofday && $wait],
|
||||
[otherlibraries="$otherlibraries threads"
|
||||
AC_MSG_NOTICE([the bytecode threads library is supported])],
|
||||
[AS_IF([test x"$enable_vmthreads" = "xyes"],
|
||||
[AC_MSG_NOTICE([the bytecode threads library is not available])],
|
||||
[AC_MSG_NOTICE([the bytecode threads library is not supported])])])])
|
||||
|
||||
## XWindow
|
||||
|
||||
|
@ -1580,7 +1615,7 @@ AS_IF([test x"$enable_installing_source_artifacts" = "xno"],
|
|||
[install_source_artifacts=false],
|
||||
[install_source_artifacts=true])
|
||||
|
||||
AS_IF([test x"$enable_ocamldoc" == "xno"],
|
||||
AS_IF([test x"$enable_ocamldoc" = "xno"],
|
||||
[ocamldoc=""],
|
||||
[ocamldoc=ocamldoc])
|
||||
|
||||
|
|
|
@ -405,7 +405,9 @@ caml-tex: $(CAMLTEX)
|
|||
|
||||
# we need str and unix which depend on the bytecode version of other tools
|
||||
# thus we delay building caml-tex to the opt.opt stage
|
||||
ifneq "$(WITH_CAMLTEX)" ""
|
||||
opt.opt:caml-tex
|
||||
endif
|
||||
clean::
|
||||
rm -f -- caml-tex caml_tex.cm?
|
||||
|
||||
|
|
Loading…
Reference in New Issue