From: Richard W.M. Jones <"Richard W.M. Jones "> Date: Thu, 1 May 2008 17:49:47 +0000 (+0100) Subject: Add --enable-profiling, set OCAMLCFLAGS and OCAMLOPTFLAGS. X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=7ad89902cab806330bda56e283ff1c79686d68ca;p=virt-df.git Add --enable-profiling, set OCAMLCFLAGS and OCAMLOPTFLAGS. --- diff --git a/configure.ac b/configure.ac index 6800654..b26d226 100644 --- a/configure.ac +++ b/configure.ac @@ -113,6 +113,20 @@ EOT fi done +dnl Enable type annotation files (always, there's no penalty for doing +dnl this). Use C-c C-t in emacs to print the type of an expression. +OCAMLCFLAGS="-dtypes -g" +OCAMLOPTFLAGS="" + +dnl Enable profiling support for native code. +AC_ARG_ENABLE([profiling], + [AS_HELP_STRING([--enable-profiling], + [enable profiling for native code])], + [OCAMLOPTFLAGS="$OCAMLOPTFLAGS -p"]) + +AC_SUBST(OCAMLCFLAGS) +AC_SUBST(OCAMLOPTFLAGS) + dnl Summary. echo "------------------------------------------------------------" echo "Thanks for downloading" $PACKAGE_STRING diff --git a/diskzip/Makefile.in b/diskzip/Makefile.in index 6cbc50e..72ad5d7 100644 --- a/diskzip/Makefile.in +++ b/diskzip/Makefile.in @@ -34,17 +34,17 @@ ifneq ($(pkg_gettext),no) OCAMLCPACKAGES += -package gettext-stub endif -OBJS := diskzip_gettext.cmo diskzip.cmo +OBJS := diskzip_gettext.cmo diskzip_bitmap.cmo diskzip.cmo XOBJS := $(OBJS:.cmo=.cmx) SYNTAX := -pp "camlp4o -I`ocamlc -where`/bitmatch pa_bitmatch.cmo" -OCAMLCFLAGS := -g -w s $(SYNTAX) +OCAMLCFLAGS := @OCAMLCFLAGS@ $(SYNTAX) #OCAMLCLIBS := -linkpkg diskimage.cma OCAMLCLIBS := -linkpkg bitmatch.cma diskimage.cma OCAMLOPTPACKAGES := $(OCAMLCPACKAGES) -OCAMLOPTFLAGS := -w s $(SYNTAX) +OCAMLOPTFLAGS := @OCAMLOPTFLAGS@ $(SYNTAX) #OCAMLOPTLIBS := -linkpkg diskimage.cmxa OCAMLOPTLIBS := -linkpkg bitmatch.cmxa diskimage.cmxa diff --git a/lib/Makefile.in b/lib/Makefile.in index 794447a..befbac9 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -54,12 +54,12 @@ XOBJS := $(OBJS:.cmo=.cmx) SYNTAX := -pp "camlp4o -I`ocamlc -where`/bitmatch pa_bitmatch.cmo" -OCAMLCFLAGS := -g -w s -dtypes $(SYNTAX) +OCAMLCFLAGS := @OCAMLCFLAGS@ $(SYNTAX) #OCAMLCLIBS := -linkpkg OCAMLCLIBS := -linkpkg bitmatch.cma OCAMLOPTPACKAGES := $(OCAMLCPACKAGES) -OCAMLOPTFLAGS := -w s $(SYNTAX) +OCAMLOPTFLAGS := @OCAMLOPTFLAGS@ $(SYNTAX) #OCAMLOPTLIBS := $(OCAMLCLIBS) OCAMLOPTLIBS := -linkpkg bitmatch.cmxa diff --git a/virt-df/Makefile.in b/virt-df/Makefile.in index 16347fa..f140f14 100644 --- a/virt-df/Makefile.in +++ b/virt-df/Makefile.in @@ -53,12 +53,12 @@ XOBJS := $(OBJS:.cmo=.cmx) #---------------------------------------------------------------------- -OCAMLCFLAGS := -g -w s +OCAMLCFLAGS := @OCAMLCFLAGS@ #OCAMLCLIBS := -linkpkg diskimage.cma OCAMLCLIBS := -linkpkg bitmatch.cma diskimage.cma OCAMLOPTPACKAGES := $(OCAMLCPACKAGES) -OCAMLOPTFLAGS := -w s +OCAMLOPTFLAGS := @OCAMLOPTFLAGS@ #OCAMLOPTLIBS := -linkpkg diskimage.cmxa OCAMLOPTLIBS := -linkpkg bitmatch.cmxa diskimage.cmxa