]> matita.cs.unibo.it Git - helm.git/commitdiff
added detection of native code compilation in "upstream" configure/Makefile (going...
authorStefano Zacchiroli <zack@upsilon.cc>
Mon, 11 Sep 2006 11:03:15 +0000 (11:03 +0000)
committerStefano Zacchiroli <zack@upsilon.cc>
Mon, 11 Sep 2006 11:03:15 +0000 (11:03 +0000)
DEVEL/lablgtkmathview/Makefile.in
DEVEL/lablgtkmathview/configure.in

index ac305e0750799cca6f1690d7225911b8b0b6839b..788b171ea4675ddb9c05ebd95652d5ba93b68522 100644 (file)
@@ -2,6 +2,7 @@ PACKAGE = @PACKAGE@
 VERSION = @VERSION@
 INCLUDEDIR = @OCAML_INCLUDE_DIR@
 PROPCC = @OCAML_LIB_DIR@/lablgtk2/propcc
+NATIVE = @HAVE_OCAMLOPT@
 PREFIX = 
 OBJECTS_C = ml_gtk_mathview.o
 OBJECTS = gtkMathViewProps.cmo ogtkMathViewProps.cmo gtk_mathview.cmo gtkMathView.cmo gMathView.cmo gMathViewAux.cmo
@@ -44,11 +45,16 @@ TESTDIR = ./test
 TMPDIR = .test
 TMPPKGDIR = $(TMPDIR)/$(PACKAGE)
 
+ifeq ($(NATIVE),yes)
+world: all opt
+else
+world: all
+endif
+
 all: $(ARCHIVE).cma lib$(ARCHIVE).a $(DLL)
 opt: $(ARCHIVE).cmxa $(ARCHIVE).a
 test: $(TESTDIR)/test
 test.opt: $(TESTDIR)/test.opt
-world: all opt
 
 dist:
        rm -rf $(DIST_DIR)/
index d4c16e55df5b034a1208054410d999cf373528e1..2fc3e7ebdede337db16e01275f185ad6b37bb79c 100644 (file)
@@ -21,6 +21,8 @@ if test $HAVE_OCAMLC = "no"; then
   AC_MSG_ERROR(could not find ocamlc in PATH, please make sure ocaml is installed)
 fi
 
+AC_CHECK_PROG(HAVE_OCAMLOPT, ocamlopt, yes, no)
+
 AC_CHECK_PROG(HAVE_OCAMLFIND, ocamlfind, yes, no)
 if test $HAVE_OCAMLFIND = "no"; then
   AC_MSG_ERROR(could not find ocamlfind in PATH, please make sure findlib is installed)
@@ -46,6 +48,7 @@ AC_CHECK_FILE(/usr/include/caml/mlvalues.h,
 
 AC_SUBST(PACKAGE)
 AC_SUBST(VERSION)
+AC_SUBST(HAVE_OCAMLOPT)
 AC_SUBST(OCAML_INCLUDE_DIR)
 AC_SUBST(OCAML_LIB_DIR)
 AC_SUBST(OCAML_STUB_DIR)