Commit 4b4d5adf authored by stolpmann's avatar stolpmann

Improved the configure script a bit.


git-svn-id: https://godirepo.camlcity.org/svn/wdialog/trunk@209 f54c9a64-0731-4a92-b797-30fd5898f27c
parent 64af1be6
#! /bin/sh
# $Id: configure,v 3.14 2005-05-13 20:18:35 gremlin43820 Exp $
# $Id: configure,v 3.15 2005-06-02 21:14:35 stolpmann Exp $
#--- Options ---
# value -1: off by command line ("forced")
......@@ -25,7 +25,8 @@ version="2.0.2"
exec_suffix=""
ehelp_findlib="Enable/disable installation as findlib package"
whelp_wdialog_session_daemon="Include/omit the session state daemon"
whelp_wd_session_daemon="Include/omit the session state daemon"
whelp_wd_inmemory_session="Include/omit support for in-memory sessions"
whelp_wdialog_p4="Include/omit wdialog syntax extensions (camlp4)"
whelp_wdialog_perlguts="Include/omit library for interfacing Perl"
#whelp_wd_debugger="Inlude/omit wdialog debugger"
......@@ -48,8 +49,11 @@ libdir=`ocamlc -where`/wdialog
perl_libdir=/usr/local/libexec/wdialog
# Packages to include anyway: (extended later)
requires="pxp-engine netstring unix pcre cgi rpc inifiles"
libs_cma="unix.cma pxre.cma netstring.cma netcgi.cma pxp_engine.cma"
requires="pxp-engine netstring unix pcre cgi"
libs_cma="unix.cma pcre.cma netstring.cma netcgi.cma pxp_engine.cma"
# For the META file of wdialog only:
requires_wdialog="$requires"
check_library () {
# $1: the name of the library (findlib)
......@@ -282,11 +286,11 @@ case "$ov" in
echo "too old"
exit 1
;;
*\ version\ 3\.0[46]*)
*\ version\ 3\.0[46789]*)
echo "good"
;;
*)
echo "not recognized (newer than 3.06?) - trying to continue"
echo "not recognized (newer than 3.09?) - trying to continue"
;;
esac
......@@ -425,6 +429,7 @@ if true; then
printf "%s" "Checking for PXP lexer (wlex)... "
if check_library pxp-wlex pxp_wlex_link.cmi; then
requires="$requires pxp-wlex"
requires_wdialog="$requires_wdialog pxp-wlex"
libs_cma="$libs_cma pxp_wlex.cma"
echo "found"
else
......@@ -432,21 +437,64 @@ if true; then
printf "%s" "Checking for PXP lexer (ISO-8859-1)... "
if check_library pxp-lex-iso88591 pxp_lex_link_iso88591.cmi; then
echo "found"
requires="$requires pxp-lex-iso88591"
requires_wdialog="$requires_wdialog pxp-lex-iso88591"
libs_cma="$libs_cma pxp_lex_iso88591.cma"
else
echo "not found"
echo "Sorry, the lexer for ISO-8859-1 is missing"
exit 1
fi
printf "%s" "Checking for PXP lexer (UTF-8)... "
if check_library pxp-lex-utf8 pxp_lex_link_utf8.cmi; then
printf "%s" "Checking for PXP lexer (ulex)... "
if check_library pxp-ulex-utf8 pxp_ulex_link_utf8.cmi; then
requires="$requires pxp-ulex-utf8"
requires_wdialog="$requires_wdialog pxp-ulex-utf8"
libs_cma="$libs_cma pxp_ulex_utf8.cma"
echo "found"
else
echo "not found"
echo "Sorry, the lexer for UTF-8 is missing"
exit 1
printf "%s" "Checking for PXP lexer (lex UTF-8)... "
if check_library pxp-lex-utf8 pxp_lex_link_utf8.cmi; then
echo "found"
requires="$requires pxp-lex-utf8"
requires_wdialog="$requires_wdialog pxp-lex-utf8"
libs_cma="$libs_cma pxp_lex_utf8.cma"
else
echo "not found"
echo "Sorry, the lexer for UTF-8 is missing"
exit 1
fi
fi
requires="$requires pxp-lex-iso88591 pxp-lex-utf8"
libs_cma="$libs_cma pxp_lex_iso88591.cma pxp_lex_utf8.cma"
fi
fi
######################################################################
# Check for wd-session-daemon and rpc, inifiles
if [ $with_wd_session_daemon -gt 0 ]; then
printf "%s" "Checking for RPC... "
if check_library rpc rpc.cmi; then
echo "found"
requires="$requires rpc"
libs_cma="$libs_cma rpc.cma"
# but requires_wdialog is not extended
else
echo "not found"
echo "Sorry, you need RPC for the wd-session-daemon"
exit 1
fi
printf "%s" "Checking for Inifiles... "
if check_library inifiles inifiles.cmi; then
echo "found"
requires="$requires inifiles"
libs_cma="$libs_cma inifiles.cma"
# but requires_wdialog is not extended
else
echo "not found"
echo "Sorry, you need Inifiles for the wd-session-daemon"
exit 1
fi
fi
......@@ -665,7 +713,7 @@ done
for pkg in $pkglist; do
echo "Writing src/$pkg/META"
sed -e "s/@VERSION@/$version/g" \
-e "s/@REQUIRES@/$requires/g" \
-e "s/@REQUIRES@/$requires_wdialog/g" \
src/$pkg/META.in >src/$pkg/META
done
......
requires="wdialog rpc"
requires="wdialog rpc inifiles"
version="@VERSION@"
archive(byte)="wd_daemon_session.cma"
archive(native)="wd_daemon_session.cmxa"
......@@ -21,7 +21,7 @@
* </>
*)
(* $Id: wd_var_functions.mli,v 1.4 2004-12-12 17:57:32 stolpmann Exp $
(* $Id: wd_var_functions.mli,v 1.5 2005-06-02 21:14:35 stolpmann Exp $
* ----------------------------------------------------------------------
*
*)
......@@ -38,11 +38,55 @@
open Wd_types
(* - length
* - card
* - modulo
* - self
*
* -- from ui:ifvar
* - eq, ne, match, nomatch
* - int-eq, int-ne, int-lt, int-le, int-gt, int-ge
* - contains, mentions
* - card-eq, card-ne, card-lt, card-le, card-gt, card-ge
* - dialog-exists
*
* -- other:
* - and, or, not, true, false
* - if (cond, then-case, else-case) LAZY!!!
* - <ui:ifexpr expr="$[...]">
* - min, max, abs, sign
*
* -- Template support (SPECIAL):
* - $[t:my_template(arg1=string1,arg2=string2)]
* - $[q:my_template(arg1=string1,arg2=string2,body)]
* - $[context(arg1=string1,...,body)]
*
* -- String literals in bracket expr
*)
val size : dialog_type -> var_value list -> var_value
(** Returns the size of the single argument, which may be a [String_value],
* [Enum_value], [Dyn_enum_value], or an [Alist_value].
* The returned size is encoded as [String_value].
*
* {b [size] is deprecated! Use either [length] or [card] instead!}
*)
(*
val length : dialog_type -> var_value list -> var_value
(** Returns the length of the single string argument in characters.
*)
*)
(*
val card : dialog_type -> var_value list -> var_value
(** Returns the cardinality of the single argument. The cardinality are the
* number of iterations <ui:iterate> or <ui:enumerate> would do for a
* variable with the given value:
* - For a string: the number of words of the string
* - For an enumerator: the number of elements
* - For an association: the number of elements
*)
*)
val add : dialog_type -> var_value list -> var_value
(** Adds the numbers encoded as [String_value], and returns the sum as
......@@ -66,6 +110,14 @@ val div : dialog_type -> var_value list -> var_value
* [String_value].
*)
(*
val modulo : dialog_type -> var_value list -> var_value
(** The first number module the second number. Both numbers
* must be encoded as [String_value]. Returns the result as
* [String_value].
*)
*)
val assoc : dialog_type -> var_value list -> var_value
(** Looks the second argument up in the first argument, which must be
* an [Alist_value]. The index, i.e. second argument, must be an
......@@ -139,6 +191,11 @@ val var : dialog_type -> var_value list -> var_value
val dialog : dialog_type -> var_value list -> var_value
(** Returns the name of the current dialog (no arguments) *)
(*
val self : dialog_type -> var_value list -> var_value
(** Returns the current dialog (no arguments) *)
*)
val page : dialog_type -> var_value list -> var_value
(** Returns the name of the current page (no arguments) *)
......@@ -162,7 +219,10 @@ val create_xanchor_event : dialog_type -> var_value list -> var_value
* History:
*
* $Log: wd_var_functions.mli,v $
* Revision 1.4 2004-12-12 17:57:32 stolpmann
* Revision 1.5 2005-06-02 21:14:35 stolpmann
* Improved the configure script a bit.
*
* Revision 1.4 2004/12/12 17:57:32 stolpmann
* Added <q:wd-link> and <q:wd-xlink> to generate links for
* applications that cannot use Javascript. Limited functionality, however.
* See stdlib.xml for details.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment