Skip to content

Commit

Permalink
[feature] configure: generating a list of available optional tags, fo…
Browse files Browse the repository at this point in the history
…r plugins building
  • Loading branch information
Louis Gesbert committed Jun 24, 2011
1 parent 8a40e70 commit 7b118ed
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions config.mli
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 8 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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 =
Expand Down

0 comments on commit 7b118ed

Please sign in to comment.