From 64571f0a2f78ebb027b8c3e90ef26d2095c0a6ae Mon Sep 17 00:00:00 2001 From: Stefano Zacchiroli Date: Mon, 11 Sep 2006 11:03:15 +0000 Subject: [PATCH] added detection of native code compilation in "upstream" configure/Makefile (going to remove it from debian/rules now ...) --- DEVEL/lablgtkmathview/Makefile.in | 8 +++++++- DEVEL/lablgtkmathview/configure.in | 3 +++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/DEVEL/lablgtkmathview/Makefile.in b/DEVEL/lablgtkmathview/Makefile.in index ac305e075..788b171ea 100644 --- a/DEVEL/lablgtkmathview/Makefile.in +++ b/DEVEL/lablgtkmathview/Makefile.in @@ -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)/ diff --git a/DEVEL/lablgtkmathview/configure.in b/DEVEL/lablgtkmathview/configure.in index d4c16e55d..2fc3e7ebd 100644 --- a/DEVEL/lablgtkmathview/configure.in +++ b/DEVEL/lablgtkmathview/configure.in @@ -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) -- 2.39.2