summaryrefslogtreecommitdiff
path: root/debian/patches/use-env-in-coq-config.dpatch
blob: 1f01315f5403c78f85b5b67920498e0ab7e79783 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#! /bin/sh /usr/share/dpatch/dpatch-run
## use-env-in-coq-config.dpatch by Stephane Glondu <steph@glondu.net>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Use environment variables by default in coq_config.ml

@DPATCH@
diff --git a/configure b/configure
index 2747ee2..a57b996 100755
--- a/configure
+++ b/configure
@@ -862,9 +862,9 @@ cat << END_OF_COQ_CONFIG > $mlconfig_file
 (* DO NOT EDIT THIS FILE: automatically generated by ../configure *)
 
 let local = $local
-let bindir = "$ESCBINDIR" 
-let coqlib = "$ESCLIBDIR"
-let coqtop = "$ESCCOQTOP"
+let bindir = try Sys.getenv "COQBIN" with Not_found -> "$ESCBINDIR"
+let coqlib = try Sys.getenv "COQLIB" with Not_found -> "$ESCLIBDIR"
+let coqtop = try Sys.getenv "COQTOP" with Not_found -> "$ESCCOQTOP"
 let camldir = "$ESCCAMLDIR"
 let camllib = "$ESCCAMLLIB"
 let camlp4 = "$CAMLP4"