aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorletouzey2008-12-16 13:56:19 +0000
committerletouzey2008-12-16 13:56:19 +0000
commitc215c4429a85a6d73cc1a33041258cacbe4de199 (patch)
tree4af1be58159858191ab85936ac57bd042853a4ae /configure
parenta869d74f414ba786c66b8eb7450ff6343ff12ebd (diff)
Take advantage of natdynlink when available: almost all contribs become loadable plugins
- Any contrib foo leads to contrib/foo/foo_plugin.cmxs (and .cma for bytecode). - Features that were available without any Require are now loaded systematically when launching coqtop (see Coqtop.load_initial_plugins): extraction, jprover, cc, ground, dp, recdef, xml - The other plugins are loaded when a corresponding Require is done: quote, ring, field, setoid_ring, omega, romega, micromega, fourier - I experienced a crash (segfault) while turning subtac into a plugin, so this one stays statically linked into coqtop for now - When the ocaml version doesn't support natdynlink, or if "-natdynlink no" is explicitely given to configure, coqtop is statically linked with all of the above code as usual. Some messages [Ignore ML file Foo_plugin] may appear. - How should coqdep handle a "Declare ML Module "foo"" if foo is an archive and not a ml file ? For now, we suppose that the foo.{cmxs,cma} are at the same location as the .v during the build, but can be moved later in any place of the ml loadpath. This is clearly an experimentation. Feedback most welcome... git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@11687 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure12
1 files changed, 10 insertions, 2 deletions
diff --git a/configure b/configure
index a64f561481..b9e6f9ea8f 100755
--- a/configure
+++ b/configure
@@ -59,6 +59,8 @@ usage () {
printf "\tSpecifies the architecture\n"
echo "-opt"
printf "\tSpecifies whether or not to generate optimized executables\n"
+ echo "-natdynlink (yes|no)"
+ printf "\tSpecifies whether or not to use dynamic loading of native code\n"
echo "-fsets (all|basic)"
echo "-reals (all|basic)"
printf "\tSpecifies whether or not to compile full FSets/Reals library\n"
@@ -104,6 +106,7 @@ coq_profile_flag=
coq_annotate_flag=
best_compiler=opt
cflags="-fno-defer-pop -Wall -Wno-unused"
+natdynlink=yes
gcc_exec=gcc
ar_exec=ar
@@ -186,6 +189,11 @@ while : ; do
-opt|--opt) bytecamlc=ocamlc.opt
camlp4oexec=camlp4o # can't add .opt since dyn load'll be required
nativecamlc=ocamlopt.opt;;
+ -natdynlink|--natdynlink) case "$2" in
+ yes) natdynlink=yes;;
+ *) natdynlink=no
+ esac
+ shift;;
-fsets|--fsets) case "$2" in
yes|all) fsets=all;;
*) fsets=basic
@@ -212,7 +220,7 @@ while : ; do
esac
shift;;
-with-geoproof|--with-geoproof)
- case $2 in
+ case "$2" in
yes) with_geoproof=true;;
no) with_geoproof=false;;
esac
@@ -442,7 +450,7 @@ if [ "$coq_debug_flag" = "-g" ]; then
fi
# Native dynlink
-if test -f `"$CAMLC" -where`/dynlink.cmxa; then
+if [ "$natdynlink" = "yes" -a -f `"$CAMLC" -where`/dynlink.cmxa ]; then
HASNATDYNLINK=true
else
HASNATDYNLINK=false