aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--CHANGES1
-rw-r--r--config/coq_config.mli4
-rwxr-xr-xconfigure23
-rw-r--r--lib/flags.ml5
4 files changed, 28 insertions, 5 deletions
diff --git a/CHANGES b/CHANGES
index 86f197c61..1c6a1e036 100644
--- a/CHANGES
+++ b/CHANGES
@@ -436,6 +436,7 @@ Miscellaneous
- Syntax of "Test Printing Let ref" and "Test Printing If ref" changed into
"Test Printing Let for ref" and "Test Printing If for ref".
- An overhauled build system (new Makefiles); see dev/doc/build-system.txt
+- Add -browser option to configure script
Changes from V8.1gamma to V8.1
==============================
diff --git a/config/coq_config.mli b/config/coq_config.mli
index f72fa33c5..e8c1b5304 100644
--- a/config/coq_config.mli
+++ b/config/coq_config.mli
@@ -38,3 +38,7 @@ val contrib_dirs : string list
val exec_extension : string (* "" under Unix, ".exe" under MS-windows *)
val with_geoproof : bool ref (* to (de)activate functions specific to Geoproof with Coqide *)
+
+val browser : string
+(** default web browser to use, may be overriden by environment
+ variable COQREMOTEBROWSER *)
diff --git a/configure b/configure
index c27ff74d1..6681c91b5 100755
--- a/configure
+++ b/configure
@@ -25,7 +25,7 @@ done
}
usage () {
- echo "Available options for configure are:\n"
+ printf "Available options for configure are:\n"
echo "-help"
printf "\tDisplays this help page\n"
echo "-prefix <dir>"
@@ -59,6 +59,8 @@ usage () {
printf "\tSpecifies whether or not to compile full FSets/Reals library\n"
echo "-coqide (opt|byte|no)"
printf "\tSpecifies whether or not to compile Coqide\n"
+ echo "-browser <command>"
+ printf "\tUse <command> to open URL %%s\n"
echo "-with-doc (yes|no)"
printf "\tSpecifies whether or not to compile the documentation\n"
echo "-with-geoproof (yes|no)"
@@ -117,6 +119,7 @@ fsets=all
reals=all
arch_spec=no
coqide_spec=no
+browser_spec=no
with_geoproof=false
with_doc=all
with_doc_spec=no
@@ -189,6 +192,9 @@ while : ; do
*) COQIDE=no
esac
shift;;
+ -browser|--browser) browser_spec=yes
+ BROWSER=$2
+ shift;;
-with-doc|--with-doc) with_doc_spec=yes
case "$2" in
yes|all) with_doc=all;;
@@ -333,6 +339,15 @@ else
echo "Cannot find GNU Make 3.81"
fi
+# Browser command
+
+if [ "$browser_spec" = "no" ]; then
+ case $ARCH in
+ win32) BROWSER='C:\PROGRA~1\INTERN~1\IEXPLORE %s' ;;
+ *) BROWSER='firefox -remote "OpenURL(%s,new-tab)" || firefox %s &' ;;
+ esac
+fi
+
#########################################
# Objective Caml programs
@@ -783,6 +798,7 @@ else
echo " Documentation : None"
fi
echo " CoqIde : $COQIDE"
+echo " Web browser : $BROWSER"
echo ""
echo " Paths for true installation:"
@@ -804,6 +820,10 @@ escape_var () {
EOF
}
+# Escaped version of browser command
+export BROWSER
+ESCBROWSER=`VAR=BROWSER escape_var`
+
# damned backslashes under M$Windows
case $ARCH in
win32)
@@ -859,6 +879,7 @@ let vo_magic_number = $VOMAGIC
let state_magic_number = $STATEMAGIC
let exec_extension = "$EXE"
let with_geoproof = ref $with_geoproof
+let browser = "$ESCBROWSER"
END_OF_COQ_CONFIG
diff --git a/lib/flags.ml b/lib/flags.ml
index 4743345de..0378e11fb 100644
--- a/lib/flags.ml
+++ b/lib/flags.ml
@@ -106,7 +106,4 @@ let browser_cmd_fmt =
let coq_netscape_remote_var = "COQREMOTEBROWSER" in
Sys.getenv coq_netscape_remote_var
with
- Not_found ->
- if Sys.os_type = "Win32"
- then "C:\\PROGRA~1\\INTERN~1\\IEXPLORE %s"
- else "firefox -remote \"OpenURL(%s,new-tab)\" || firefox %s &"
+ Not_found -> Coq_config.browser