Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[feature] configure: generating a list of available optional tags, fo…

…r plugins building
  • Loading branch information...
commit 7b118edd5cf5e596ec3c95542fdfa6da544082d2 1 parent 8a40e70
Louis Gesbert authored
Showing with 12 additions and 0 deletions.
  1. +4 −0 config.mli
  2. +8 −0 configure
View
4 config.mli
@@ -45,6 +45,10 @@ val libnatpmp : (string*string*string) option (** name of the lib, lib dir, incl
val miniupnpc : (string*string*string) option (** name of the lib, lib dir, include dir *)
+(** list all of the optional tags that have been detected available (eg
+ "camlidl", "libnatpmp", "miniupnpc", ...) *)
+val available : string list
+
(** are we compiling in release or debug mode ? In release mode,
assertions and debug variables are disabled *)
val is_release : bool
View
8 configure
@@ -546,6 +546,12 @@ camlopt() {
fi
}
+TAGS_LIST=""
+for tag in camlidl libnatpmp miniupnpc; do
+ hasvar=HAS_${tag^^}
+ if [ -n "${!hasvar}" ]; then TAGS_LIST="$TAGS_LIST\"$tag\"; "; fi
+done
+
# See config.mli for the documentation and spec of these variables
cat >config.ml <<EOF
let prefix = "$PREFIX"
@@ -560,6 +566,8 @@ let camlidl = $(camlopt "$HAS_CAMLIDL" '"'"$CAMLIDL"'"')
let libnatpmp = $(camlopt "$HAS_LIBNATPMP" "$(camlstrtuple "${LIBNATPMP[@]}")")
let miniupnpc = $(camlopt "$HAS_MINIUPNPC" "$(camlstrtuple "${MINIUPNPC[@]}")")
+let available = [ $TAGS_LIST]
+
let is_release = $(camlbool "$IS_RELEASE")
type os = Linux | Mac | Win32 | Cygwin
let os =
Please sign in to comment.
Something went wrong with that request. Please try again.