Commit fef7b6a6 authored by Pietro Abate's avatar Pietro Abate
Browse files

- add --with[out]-cgi to configure.ml

parent 80454c16
...@@ -16,7 +16,7 @@ ifeq ($(NATIVE),true) ...@@ -16,7 +16,7 @@ ifeq ($(NATIVE),true)
all: cduce_lib.cmxa all: cduce_lib.cmxa
endif endif
PACKAGES = camlp4 ulex pcre num netstring cgi PACKAGES = camlp4 ulex pcre num netstring
# Call make with VERBOSE=true to get a trace of commands # Call make with VERBOSE=true to get a trace of commands
...@@ -205,10 +205,12 @@ else ...@@ -205,10 +205,12 @@ else
endif endif
ifeq ($(PXP),true) ifeq ($(PXP),true)
OBJECTS += runtime/cduce_pxp.cmo ifeq ($(CGI),true)
PACKAGES += $(PXP_PACK) OBJECTS += runtime/cduce_pxp.cmo
ALL_TARGET += dtd2cduce PACKAGES += $(PXP_PACK) cgi
INSTALL_BINARIES += dtd2cduce ALL_TARGET += dtd2cduce
INSTALL_BINARIES += dtd2cduce
endif
endif endif
ifeq ($(EXPAT), true) ifeq ($(EXPAT), true)
OBJECTS += runtime/cduce_expat.cmo OBJECTS += runtime/cduce_expat.cmo
......
...@@ -29,6 +29,7 @@ Optional features: ...@@ -29,6 +29,7 @@ Optional features:
expat support for the expat XML parser expat support for the expat XML parser
curl support for the libcurl library curl support for the libcurl library
netclient support for the netclient library netclient support for the netclient library
cgi support for the cgi library [default: false]
OCaml/CDuce interface: OCaml/CDuce interface:
--mliface=DIR build the interface with the OCaml sources in DIR --mliface=DIR build the interface with the OCaml sources in DIR
...@@ -54,6 +55,7 @@ let features = ...@@ -54,6 +55,7 @@ let features =
"expat", ref `auto; "expat", ref `auto;
"curl", ref `auto; "curl", ref `auto;
"netclient", ref `auto; "netclient", ref `auto;
"cgi", ref `no;
"pxp_wlex", ref `no ] "pxp_wlex", ref `no ]
let vars = let vars =
...@@ -209,6 +211,7 @@ let pxp = check_feature "pxp" (check_pkg "pxp") ...@@ -209,6 +211,7 @@ let pxp = check_feature "pxp" (check_pkg "pxp")
let expat = check_feature "expat" (check_pkg "expat") let expat = check_feature "expat" (check_pkg "expat")
let curl = check_feature "curl" (check_pkg "curl") let curl = check_feature "curl" (check_pkg "curl")
let netclient = check_feature "netclient" (check_pkg "netclient") let netclient = check_feature "netclient" (check_pkg "netclient")
let cgi = check_feature "cgi" (check_pkg "cgi")
let pxp_wlex = check_feature "pxp_wlex" (check_pkg "pxp-wlex-utf8") let pxp_wlex = check_feature "pxp_wlex" (check_pkg "pxp-wlex-utf8")
let prefix = dir "prefix" let prefix = dir "prefix"
let bindir = dir ~def:(prefix^"/bin") "bindir" let bindir = dir ~def:(prefix^"/bin") "bindir"
...@@ -239,7 +242,13 @@ let pxp,expat = ...@@ -239,7 +242,13 @@ let pxp,expat =
false,false false,false
| c,n -> c,n | c,n -> c,n
let required_packages = ["camlp4"; "num"; "pcre"; "ulex"; "cgi"; "netstring"] let cgi =
if not(cgi) then
(warning "No package to build dtd2cduce and the web interface";
false)
else true
let required_packages = ["camlp4"; "num"; "pcre"; "ulex"; "netstring"]
let has_forpack = let has_forpack =
print "testing for -for-pack option: "; print "testing for -for-pack option: ";
...@@ -279,6 +288,7 @@ let () = ...@@ -279,6 +288,7 @@ let () =
fprintf out "EXPAT=%b\n" expat; fprintf out "EXPAT=%b\n" expat;
fprintf out "CURL=%b\n" curl; fprintf out "CURL=%b\n" curl;
fprintf out "NETCLIENT=%b\n" netclient; fprintf out "NETCLIENT=%b\n" netclient;
fprintf out "CGI=%b\n" cgi;
fprintf out "PXP_WLEX=%b\n" pxp_wlex; fprintf out "PXP_WLEX=%b\n" pxp_wlex;
fprintf out "BINDIR=%s\n" bindir; fprintf out "BINDIR=%s\n" bindir;
fprintf out "MANDIR=%s\n" mandir; fprintf out "MANDIR=%s\n" mandir;
......
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