Commit 94db916d authored by Pietro Abate's avatar Pietro Abate

[r2004-04-20 22:23:29 by afrisch] clean up Makefile, configure script

Original author: afrisch
Date: 2004-04-20 22:23:30+00:00
parent b8fac4e9
NATIVE=false
include Makefile.distrib
# For development
......@@ -46,7 +44,7 @@ debug:
# Packaging
DISTRIB = $(DIRS) cduce.spec expat tools web depend INSTALL INSTALL.WIN32 CHANGES LICENSE README Makefile.conf doc
DISTRIB = $(DIRS) cduce.spec expat tools web depend INSTALL INSTALL.WIN32 CHANGES LICENSE README Makefile.conf.template configure configure.ml doc
PACKAGE = cduce-$(VERSION)
.PHONY: package
......
## CDuce compilation options ##
## Here are some global options with their default value commented. ##
# Default value is commented.
# build CDuce using OCaml native code compiler
# NATIVE = true
# profiling support
# PROFILE = false
# .mli/.cmi file support to interface CDuce with OCaml.
# ML_INTERFACE = false
# use wlex lexers for parsing XML files with PXP
# PXP_WLEX = false
# include support for expat
# EXPAT = false
# use curl library to load remote xml files and schemas
# CURL = false
# use netclient library to load remote xml files and schemas
# NETCLIENT = true
# Installation directory
# cduce and dtd2cduce => $(PREFIX)/bin
# cduce.1 => $(PREFIX)/man/man1
# PREFIX = /usr/local
# Customize the following variables to match the settings
# of your local web server
# Root directory of your local web-server
# WEB_PREFIX = /var/www
# directory for installing the cgi-bin of the cduce interpreter
# CGI_DIR = $(WEB_PREFIX)/cgi-bin
# installation directory for the website and man-pages
# HTML_DIR = $(WEB_PREFIX)/html
# where temporary files of local interactive interpreter are put
# SESSION_DIR = /tmp/cduce_sessions
## Starting from now you don't need any modifications. ##
# We now define the default value for compilation variables not
# already defined (here or in environnement).
# build CDuce using OCaml native code compiler (default : true)
ifeq ($(NATIVE), false)
else
NATIVE = true
endif
# profiling support (default : false)
ifndef PROFILE
PROFILE = false
endif
# .mli/.cmi file support to interface CDuce with OCaml. (default : false)
ifndef ML_INTERFACE
ML_INTERFACE = false
endif
# use wlex lexers for parsing XML files with PXP (default : false)
ifndef PXP_WLEX
PXP_WLEX = false
endif
# include support for expat (default : false)
ifndef EXPAT
EXPAT = false
endif
# use curl library to load remote xml files and schemas (default : false)
ifndef CURL
CURL = false
endif
# use netclient library to load remote xml files and schemas
# (default : true)
ifndef NETCLIENT
NETCLIENT = true
endif
# Installation directory (default : /usr/local)
# cduce and dtd2cduce => $(PREFIX)/bin
# cduce.1 => $(PREFIX)/man/man1
ifndef PREFIX
PREFIX = /usr/local
endif
# Customize the following variables to match the settings
# of your local web server
# Root directory of your local web-server (default : /var/www)
ifndef WEB_PREFIX
WEB_PREFIX = /var/www
endif
# directory for installing the cgi-bin of the cduce interpreter
# (default : $(WEB_PREFIX)/cgi-bin)
ifndef CGI_DIR
CGI_DIR = $(WEB_PREFIX)/cgi-bin
endif
# installation directory for the website and man-pages
# (default : $(WEB_PREFIX)/html)
ifndef HTML_DIR
HTML_DIR = $(WEB_PREFIX)/html
endif
# where temporary files of local interactive interpreter are put
# (default : /tmp/cduce_sessions)
ifndef SESSION_DIR
SESSION_DIR = /tmp/cduce_sessions
endif
## CDuce compilation options
##
## You can either modify this file, or run the configure script
# build CDuce using OCaml native code compiler
NATIVE = true
# profiling support
PROFILE = false
# .mli/.cmi file support to interface CDuce with OCaml.
ML_INTERFACE = false
# use wlex lexers for parsing XML files with PXP
PXP_WLEX = false
# include support for expat
EXPAT = false
# use curl library to load remote xml files and schemas
CURL = false
# use netclient library to load remote xml files and schemas
NETCLIENT = true
# Installation directories
PREFIX = /usr/local
BINDIR = $(PREFIX)/bin
MANDIR = $(PREFIX)/man
# Customize the following variables to match the settings
# of your local web server
# Root directory of your local web-server
WEB_PREFIX = /var/www
# directory for installing the cgi-bin of the cduce interpreter
CGI_DIR = $(WEB_PREFIX)/cgi-bin
# installation directory for the website and man-pages
HTML_DIR = $(WEB_PREFIX)/html
# where temporary files of local interactive interpreter are put
SESSION_DIR = /tmp/cduce_sessions
# extension for programs (.exe under Cygwin)
EXE =
......@@ -8,20 +8,6 @@ else
PACKAGES += pxp-lex-utf8
endif
#
# Check if running Cygwin
#
ifneq (,$(findstring Cygwin, $(shell echo "Sys.os_type;;" | ocaml)))
EXE=.exe
else
EXE=
endif
SYNTAX = -I misc/ q_symbol.cmo \
-symbol cduce_version=\"$(VERSION)\" \
-symbol build_date=\"$(shell date +%Y-%m-%d)\" \
......@@ -34,8 +20,8 @@ else
endif
ifeq ($(EXPAT), true)
PACKAGES += expat
SYNTAX += -symbol EXPAT=
PACKAGES += expat
SYNTAX += -symbol EXPAT=
endif
ifeq ($(CURL), true)
......@@ -53,14 +39,14 @@ SYNTAX_PARSER = -syntax camlp4o $(SYNTAX:%=-ppopt %)
CAMLC_P = ocamlc -g
DEPEND_OCAMLDEP = misc/q_symbol.cmo
ifeq ($(PROFILE), true)
CAMLOPT_P = ocamlopt -p
ifeq ($(NATIVE), false)
CAMLC_P = ocamlcp -p a
SYNTAX_PARSER =
DEPEND_OCAMLDEP =
endif
CAMLOPT_P = ocamlopt -p
ifeq ($(NATIVE), false)
CAMLC_P = ocamlcp -p a
SYNTAX_PARSER =
DEPEND_OCAMLDEP =
endif
else
CAMLOPT_P = ocamlopt -inline 25
CAMLOPT_P = ocamlopt -inline 25
endif
OPT = -warn-error FPS
......@@ -77,15 +63,15 @@ CAMLC = $(OCAMLFIND) $(CAMLC_P) $(OPT) -package "$(PACKAGES)"
CAMLOPT = $(OCAMLFIND) $(CAMLOPT_P) $(OPT) -package "$(PACKAGES)"
ifeq ($(NATIVE), true)
EXTENSION = cmx
EXTENSION_LIB = cmxa
COMPILE = $(CAMLOPT)
LINK = $(CAMLOPT) -linkpkg gramlib.cmxa
EXTENSION = cmx
EXTENSION_LIB = cmxa
COMPILE = $(CAMLOPT)
LINK = $(CAMLOPT) -linkpkg gramlib.cmxa
else
EXTENSION = cmo
EXTENSION_LIB = cma
COMPILE = $(CAMLC)
LINK = $(CAMLC) -custom -linkpkg gramlib.cma
EXTENSION = cmo
EXTENSION_LIB = cma
COMPILE = $(CAMLC)
LINK = $(CAMLC) -custom -linkpkg gramlib.cma
endif
ifeq ($(ML_INTERFACE), true)
......@@ -103,23 +89,19 @@ endif
INSTALL := $(shell which install)
all: cduce cDuce_all.cma dtd2cduce validate
all: cduce dtd2cduce validate
install: all
mkdir -p $(PREFIX)/bin/
mkdir -p $(PREFIX)/man/man1/
$(INSTALL) -m755 cduce$(EXE) dtd2cduce$(EXE) validate$(EXE) $(PREFIX)/bin/
$(INSTALL) -m644 doc/cduce.1 $(PREFIX)/man/man1/
$(INSTALL) -m644 doc/dtd2cduce.1 $(PREFIX)/man/man1/
$(INSTALL) -m644 doc/validate.1 $(PREFIX)/man/man1/
mkdir -p $(BINDIR)
mkdir -p $(MANDIR)/man1
$(INSTALL) -m755 cduce$(EXE) dtd2cduce$(EXE) validate$(EXE) $(BINDIR)/
$(INSTALL) -m644 doc/cduce.1 $(MANDIR)/man1/
$(INSTALL) -m644 doc/dtd2cduce.1 $(MANDIR)/man1/
$(INSTALL) -m644 doc/validate.1 $(MANDIR)/man1/
uninstall:
rm $(PREFIX)/bin/cduce$(EXE) \
$(PREFIX)/bin/dtd2cduce$(EXE) \
$(PREFIX)/bin/validate$(EXE) \
$(PREFIX)/man/man1/cduce.1 \
$(PREFIX)/man/man1/dtd2cduce.1 \
$(PREFIX)/man/man1/validate.1
rm $(BINDIR)/cduce$(EXE) $(BINDIR)/dtd2cduce$(EXE) $(BINDIR)/validate$(EXE)
rm $(MANDIR)/man1/cduce.1 $(MANDIR)/man1/dtd2cduce.1 $(MANDIR)/man1/validate.1
help:
@echo "GOALS"
......@@ -134,16 +116,6 @@ help:
@echo " install : install cduce dtd2cduce, validate et man pages"
@echo " clean : back to the starting point"
@echo " uninstall : remove installed files"
@echo ""
@echo "OPTIONS (default value in brackets)"
@echo " PREFIX=<path> : set the prefix for installation [/usr/local]"
@echo " NATIVE=true|false : use the OCaml native code compiler to build CDuce [true]"
@echo " PXP_WLEX=true|false : use wlex for parsing UTF-8 XML files [false]"
@echo " EXPAT=true|false : build expat support [false]"
@echo " CURL=true|false: build curl support [false]"
@echo " NETCLIENT=true|false: build netclient support [true]"
@echo " ML_INTERFACE=true|false: build support for OCaml [false]"
@echo ""
# Source directories
......@@ -244,8 +216,12 @@ clean:
rm -f dtd2cduce pool webiface validate
rm -Rf prepro package
rm -f web/www/*.html web/*~
rm -f web/*.cdo
distclean: clean
rm -f Makefile.conf
.SUFFIXES: .ml .mli .cmo .cmi .cmx
......@@ -287,4 +263,4 @@ install_web: website
mkdir $(HTML_DIR)/img; \
fi;
cp web/img/*.* $(HTML_DIR)/img
#*: help
#
# sample Makefile for Objective Caml
# Copyright (C) 2001 Jean-Christophe FILLIATRE
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License version 2, as published by the Free Software Foundation.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
# See the GNU Library General Public License version 2 for more details
# (enclosed in the file LGPL).
# where to install the binaries
prefix=@prefix@
exec_prefix=@exec_prefix@
BINDIR=@bindir@
# where to install the man page
MANDIR=@mandir@
# other variables set by ./configure
OCAMLC = @OCAMLC@
OCAMLOPT = @OCAMLOPT@
OCAMLDEP = @OCAMLDEP@
OCAMLLEX = @OCAMLLEX@
OCAMLYACC= @OCAMLYACC@
OCAMLLIB = @OCAMLLIB@
OCAMLBEST= @OCAMLBEST@
OCAMLVERSION = @OCAMLVERSION@
OCAMLWEB = @OCAMLWEB@
OCAMLWIN32 = @OCAMLWIN32@
EXE = @EXE@
INCLUDES =
BFLAGS = -g $(INCLUDES)
OFLAGS = $(INCLUDES)
# main target
#############
NAME = cduce
NATIVE = true
PROFILE = false
PXP_WLEX = false
PACKAGES = -package "pxp-engine pxp-lex-iso88591 wlexing camlp4 num cgi"
ifeq ($(PXP_WLEX), true)
PACKAGES += -package pxp-wlex-utf8
else
PACKAGES += -package pxp-lex-utf8
endif
SYNTAX = camlp4o pa_extend.cmo
VERSION = 0.0.91
ifeq ($(PROFILE), true)
CAMLC_P = ocamlcp -p a
CAMLOPT_P = ocamlopt -p
SYNTAX_PARSER =
else
CAMLC_P = ocamlc
CAMLOPT_P = ocamlopt
SYNTAX_PARSER = -pp '$(SYNTAX)'
endif
OPT = -warn-error A
CAMLC = ocamlfind $(CAMLC_P) $(OPT) $(PACKAGES)
CAMLOPT = ocamlfind $(CAMLOPT_P) $(OPT) $(PACKAGES)
ifeq ($(NATIVE), true)
EXTENSION = cmx
LINK = $(CAMLOPT) -linkpkg gramlib.cmxa
else
EXTENSION = cmo
LINK = $(CAMLC) -custom -linkpkg gramlib.cma
endif
all: cduce dtd2cduce local_website
# Source directories
DIRS = misc parser typing types runtime driver
CLEAN_DIRS = $(DIRS) tools tests
# Objects to build
OBJECTS = \
misc/cduce_config.cmo \
misc/state.cmo misc/pool.cmo misc/encodings.cmo misc/bool.cmo \
misc/pretty.cmo \
\
types/sortedList.cmo types/boolean.cmo types/ident.cmo \
types/intervals.cmo types/chars.cmo types/atoms.cmo types/normal.cmo \
types/types.cmo types/patterns.cmo types/sequence.cmo \
types/sample.cmo \
\
parser/location.cmo parser/wlexer.cmo parser/ast.cmo parser/parser.cmo \
\
typing/typed.cmo typing/typer.cmo \
\
runtime/value.cmo runtime/load_xml.cmo runtime/run_dispatch.cmo \
runtime/print_xml.cmo runtime/eval.cmo \
\
types/builtin.cmo driver/cduce.cmo
CDUCE = $(OBJECTS) driver/run.cmo
WEBIFACE = $(OBJECTS) driver/examples.cmo driver/webiface.cmo
DTD2CDUCE = tools/dtd2cduce.cmo
DEPEND = $(DIRS:=/*.ml) $(DIRS:=/*.mli)
INCLUDES = $(DIRS:%=-I %)
PREPRO = $(SYNTAX) pr_o.cmo
misc/cduce_config.cmo: misc/cduce_config.ml
$(CAMLC) -c $(SYNTAX_PARSER) $(INCLUDES) $<
rm -f misc/cduce_config.ml
misc/cduce_config.cmx: misc/cduce_config.ml
$(CAMLOPT) -c $(SYNTAX_PARSER) $(INCLUDES) $<
rm -f misc/cduce_config.ml
misc/cduce_config.ml:
sed -e 's|%%VERSION%%|$(VERSION)|' \
-e 's|%%BUILD_DATE%%|$(shell date +%Y-%m-%d)|' \
-e 's|%%NATIVE%%|$(NATIVE)|' \
misc/cduce_config.mlp > misc/cduce_config.ml
cduce: $(CDUCE:.cmo=.$(EXTENSION))
$(LINK) $(INCLUDES) -o $@ $^
webiface: $(WEBIFACE:.cmo=.$(EXTENSION))
$(LINK) -o $@ $^
dtd2cduce: $(DTD2CDUCE:.cmo=.$(EXTENSION))
$(LINK) -o $@ $^
.PHONY: compute_depend
compute_depend:
@echo "Computing dependencies ..."
ocamldep $(INCLUDES) $(SYNTAX_PARSER) $(DEPEND) > depend
parser/wlexer.ml: parser/wlexer.mll
wlex parser/wlexer.mll
# bytecode and native-code compilation
######################################
CMO =
CMX = $(CMO:.cmo=.cmx)
GENERATED = version.ml
byte: $(NAME).byte
opt: $(NAME).opt
$(NAME).byte: $(CMO)
$(OCAMLC) $(BFLAGS) -o $@ $^
$(NAME).opt: $(CMX)
$(OCAMLOPT) $(OFLAGS) -o $@ $^
version.ml: Makefile
echo "let version = \""$(VERSION)"\"" > version.ml
echo "let date = \""`date`"\"" >> version.ml
# installation
##############
install-indep:
mkdir -p $(BINDIR)
mkdir -p $(MANDIR)/man1
cp -f doc/$(NAME).1 $(MANDIR)/man1
install: install-indep
cp -f $(NAME)$(EXE) $(BINDIR)/
cp -f dtd2cduce$(EXE) $(BINDIR)/
# generic rules
###############
.SUFFIXES: .mli .ml .cmi .cmo .cmx
.ml.cmo:
$(CAMLC) -c $(SYNTAX_PARSER) $(INCLUDES) $<
.ml.cmx:
$(CAMLOPT) -c $(SYNTAX_PARSER) $(INCLUDES) $<
.mli.cmi:
$(CAMLC) -c $(SYNTAX_PARSER) $(INCLUDES) $<
include depend
# CDuce-generated files
driver/examples.ml: cduce web/examples/build.cd web/examples/examples.xml
(cd web/examples; ../../cduce --quiet build.cd)
web/files: cduce web/site.cd
(cd web; ../cduce --quiet site.cd --arg -php site.xml)
#
# Customize the following variables to match the settings
# of your local web server
#
WEB_PREFIX = /var/www
CGI_DIR = $(WEB_PREFIX)/cgi-bin
CDUCE_HTML_DIR = $(WEB_PREFIX)/html
install_web_local:web/files webiface
cp web/www/*.php web/cduce.css $(CDUCE_HTML_DIR)/
cp webiface $(CGI_DIR)/
if test ! -d "$(CDUCE_HTML_DIR)/img" ; then \
mkdir $(CDUCE_HTML_DIR)/img; \
fi;
cp web/img/*.* $(CDUCE_HTML_DIR)/img
local_website: cduce
(cd web; ../cduce --quiet site.cd --arg site.xml)
# Makefile is rebuilt whenever Makefile.in or configure.in is modified
######################################################################
Makefile: Makefile.in config.status
./config.status
config.status: configure
./config.status --recheck
configure: configure.in
autoconf
# clean
#######
clean::
for i in $(CLEAN_DIRS); do \
(cd $$i; rm -f *.cmi *.cmo *.cma *.cmx *.o *~); \
done
rm -f `find -name "*~"`
rm -f *.cmi *.cmo *.cma *.cmx *.a *.cmxa *.o *~
rm -f cduce ocamlprof.dump
rm -f dtd2cduce pool webiface
rm -Rf prepro package
rm -f web/www/*.php web/www/*.html web/*~
dist-clean distclean:: clean
rm -f Makefile config.cache config.log config.status
include Makefile.distrib
# For development
pull: tools/pull.$(EXTENSION)
$(LINK) -o $@ $^
profile:
rm -Rf prepro
mkdir prepro
for i in $(DIRS); do \
mkdir prepro/$$i; \
for j in $$i/*.ml $$i/*.mli; do \
if [ -f "$$j" ]; then \
echo $$j; \
$(PREPRO) $$j -o prepro/$$j; \
fi; \
done; \
done
cp parser/wlexer.mll prepro/parser/
cp Makefile depend prepro/
(cd prepro; $(MAKE) cduce PROFILE=true SYNTAX_PARSER= NATIVE=false)
# Site-specific installation
cedre_build:
rsh cedre ". .env; cd IMPLEM/CDUCE; $(MAKE) webiface; $(MAKE) web/files"
install_web:
scp web/www/*.php web/cduce.css cduce@iris:public_html/
scp webiface cduce@iris:cgi-bin/cduce
ssh cduce@iris "chmod +s cgi-bin/cduce"
website: web/files
scp web/www/*.php web/cduce.css cduce@iris.ens.fr:public_html/
# Packaging
DISTRIB = $(DIRS) tools web depend INSTALL INSTALL.WIN32 CHANGES LICENSE README doc
PACKAGE = $(NAME)-$(VERSION)
.PHONY: package
package:
rm -Rf $(PACKAGE)
mkdir $(PACKAGE)
cp -R $(DISTRIB) $(PACKAGE)/
cp Makefile.distrib.in $(PACKAGE)/Makefile.in
cp configure.distrib.in $(PACKAGE)/configure.in
(cd $(PACKAGE); \
autoconf;\
rm -f types/IDEAS; \
headache -h ../header $(DEPEND))
tar czf $(PACKAGE).tar.gz --exclude CVS --exclude ".#*" --exclude IDEAS $(PACKAGE)
rm -Rf $(PACKAGE)
#! /bin/sh
ocaml configure.ml $@
#
# autoconf input for Objective Caml programs
# Copyright (C) 2001 Jean-Christophe Fillitre
# from a first script by Georges Mariano
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License version 2, as published by the Free Software Foundation.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
# See the GNU Library General Public License version 2 for more details
# (enclosed in the file LGPL).
# the script generated by autoconf from this input will set the following
# variables:
# OCAMLC "ocamlc" if present in the path, or a failure
# or "ocamlc.opt" if present with same version number as ocamlc
# OCAMLOPT "ocamlopt" (or "ocamlopt.opt" if present), or "no"
# OCAMLBEST either "byte" if no native compiler was found,
# or "opt" otherwise
# OCAMLDEP "ocamldep"
# OCAMLLEX "ocamllex" (or "ocamllex.opt" if present)
# OCAMLYACC "ocamlyac"
# OCAMLLIB the path to the ocaml standard library
# OCAMLVERSION the ocaml version number
# OCAMLWEB "ocamlweb" (not mandatory)
# OCAMLWIN32 "yes"/"no" depending on Sys.os_type = "Win32"
# EXE ".exe" if OCAMLWIN32=yes, "" otherwise
# check for one particular file of the sources
# ADAPT THE FOLLOWING LINE TO YOUR SOURCES!
AC_INIT(driver/cduce.mli)
# Check for Ocaml compilers
# we first look for ocamlc in the path; if not present, we fail
AC_CHECK_PROG(OCAMLC,ocamlc,ocamlc,no)
if test "$OCAMLC" = no ; then
AC_MSG_ERROR(Cannot find ocamlc.)
fi
# we extract Ocaml version number and library path
OCAMLVERSION=`$OCAMLC -v | sed -n -e 's|.*version *\(.*\)$|\1|p' `
echo "ocaml version is $OCAMLVERSION"
OCAMLLIB=`$OCAMLC -v | tail -1 | cut -f 4 -d " "`
echo "ocaml library path is $OCAMLLIB"
# then we look for ocamlopt; if not present, we issue a warning
# if the version is not the same, we also discard it
# we set OCAMLBEST to "opt" or "byte", whether ocamlopt is available or not
AC_CHECK_PROG(OCAMLOPT,ocamlopt,ocamlopt,no)
OCAMLBEST=byte
if test "$OCAMLOPT" = no ; then
AC_MSG_WARN(Cannot find ocamlopt; bytecode compilation only.)
else
AC_MSG_CHECKING(ocamlopt version)
TMPVERSION=`$OCAMLOPT -v | sed -n -e 's|.*version *\(.*\)$|\1|p' `
if test "$TMPVERSION" != "$OCAMLVERSION" ; then
AC_MSG_RESULT(differs from ocamlc; ocamlopt discarded.)
OCAMLOPT=no
else
AC_MSG_RESULT(ok)
OCAMLBEST=opt
fi
fi
# checking for ocamlc.opt
AC_CHECK_PROG(OCAMLCDOTOPT,ocamlc.opt,ocamlc.opt,no)
if test "$OCAMLCDOTOPT" != no ; then
AC_MSG_CHECKING(ocamlc.opt version)
TMPVERSION=`$OCAMLCDOTOPT -v | sed -n -e 's|.*version *\(.*\)$|\1|p' `
if test "$TMPVERSION" != "$OCAMLVERSION" ; then
AC_MSG_RESULT(differs from ocamlc; ocamlc.opt discarded.)
else
AC_MSG_RESULT(ok)
OCAMLC=$OCAMLCDOTOPT
fi
fi
# checking for ocamlopt.opt
if test "$OCAMLOPT" != no ; then
AC_CHECK_PROG(OCAMLOPTDOTOPT,ocamlopt.opt,ocamlopt.opt,no)
if test "$OCAMLOPTDOTOPT" != no ; then
AC_MSG_CHECKING(ocamlc.opt version)
TMPVER=`$OCAMLOPTDOTOPT -v | sed -n -e 's|.*version *\(.*\)$|\1|p' `
if test "$TMPVER" != "$OCAMLVERSION" ; then
AC_MSG_RESULT(differs from ocamlc; ocamlopt.opt discarded.)
else
AC_MSG_RESULT(ok)
OCAMLOPT=$OCAMLOPTDOTOPT
fi
fi
fi
# ocamldep, ocamllex and ocamlyacc should also be present in the path
AC_CHECK_PROG(OCAMLDEP,ocamldep,ocamldep,no)
if test "$OCAMLDEP" = no ; then
AC_MSG_ERROR(Cannot find ocamldep.)
fi
AC_CHECK_PROG(OCAMLLEX,ocamllex,ocamllex,no)
if test "$OCAMLLEX" = no ; then
AC_MSG_ERROR(Cannot find ocamllex.)
else
AC_CHECK_PROG(OCAMLLEXDOTOPT,ocamllex.opt,ocamllex.opt,no)
if test "$OCAMLLEXDOTOPT" != no ; then
OCAMLLEX=$OCAMLLEXDOTOPT
fi
fi
AC_CHECK_PROG(OCAMLYACC,ocamlyacc,ocamlyacc,no)
if test "$OCAMLYACC" = no ; then
AC_MSG_ERROR(Cannot find ocamlyacc.)
fi
AC_CHECK_PROG(OCAMLWEB,ocamlweb,ocamlweb,true)
# platform