Commit e13fb99a authored by bguillaum's avatar bguillaum

version 2.7.0 upgrade to new caml/lablgtk versions

git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/semagramme/dep2pict/trunk@7339 7838e531-6607-4d57-9587-6c381814729c
parent a3c57fd4
VERSION = 2.6.1
VERSION = 2.7.0
INSTALL_DIR = @prefix@@bindir@
DATA_DIR = @prefix@@datarootdir@/dep2pict/
......@@ -13,8 +13,6 @@ OCAMLLIB = @OCAMLLIB@
OCAMLYACC = @OCAMLYACC@
OCAMLLEX = @OCAMLLEX@
OCAMLFIND = @OCAMLFIND@
RSVG = @RSVG@
RSVG_CONVERT = @RSVG_CONVERT@
ANSITERMINAL_DIR = @ANSITERMINAL_INCLUDE@
ANSITERMINAL_BYTE = $(ANSITERMINAL_DIR) ANSITerminal.cma
......@@ -24,10 +22,13 @@ XML_LIGHT_DIR = @XMLLIGHT_INCLUDE@
XML_LIGHT_BYTE = $(XML_LIGHT_DIR) xml-light.cma
XML_LIGHT_OPT = $(XML_LIGHT_DIR) xml-light.cmxa
LABLGTK_DIR = -I +lablgtk2
LABLGTK_BYTE = $(LABLGTK_DIR) lablgtk.cma lablglade.cma lablrsvg.cma -I +cairo cairo.cma cairo_lablgtk.cma
LABLGTK_OPT = $(LABLGTK_DIR) lablgtk.cmxa lablglade.cmxa lablrsvg.cmxa -I +cairo cairo.cmxa cairo_lablgtk.cmxa
LABLGTK_OPT_LIGHT = $(LABLGTK_DIR) lablgtk.cmxa -I +cairo cairo.cmxa cairo_lablgtk.cmxa
CAIRO_DIR = @CAIRO_INCLUDE@
CAIRO_BYTE = $(CAIRO_DIR) cairo.cma
CAIRO_OPT = $(CAIRO_DIR) cairo.cmxa
LABLGTK_DIR = @LABLGTK_INCLUDE@
LABLGTK_BYTE = $(LABLGTK_DIR) lablgtk.cma lablglade.cma lablrsvg.cma
LABLGTK_OPT = $(LABLGTK_DIR) lablgtk.cmxa lablglade.cmxa lablrsvg.cmxa
DEP2PICT_DIR = @DEP2PICT_INCLUDE@
DEP2PICT_BYTE = $(DEP2PICT_DIR) dep2pict.cma
......@@ -53,6 +54,7 @@ infos:
@echo "data install dir -> " $(DATA_DIR)
@echo "doc install dir -> " $(DOC_DIR)
@echo ""
@echo "BUILD_GUI -> " @BUILD_GUI@
@echo ""
@echo "byte compil flags -> " $(BYTE_FLAGS)
@echo "native compil flags -> " $(OPT_FLAGS)
......@@ -61,9 +63,9 @@ infos:
@echo "OCAMLYACC -> " $(OCAMLYACC)
@echo "OCAMLLEX -> " $(OCAMLLEX)
@echo "OCAMLFIND -> " $(OCAMLFIND)
@echo "RSVG -> " $(RSVG)
@echo "RSVG_CONVERT -> " $(RSVG_CONVERT)
@echo "LABLGTK2 -> " $(LABLGTK_OPT)
@echo "LABLGTK -> " $(LABLGTK_OPT)
@echo "CAIRO -> " $(CAIRO_OPT)
@echo "DEP2PICT -> " $(DEP2PICT_OPT)
@echo "LOG -> " $(LOG_OPT)
@echo "ANSITERMINAL -> " $(ANSITERMINAL_OPT)
......
......@@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.63])
AC_INIT(dep2pict, 2.0.3, paul.masson@inria.fr)
AC_INIT(dep2pict, 2.7.0, bruno.guillaume@inria.fr)
AC_ARG_ENABLE(
[config],
......@@ -10,21 +10,30 @@ AC_ARG_ENABLE(
[config=$enableval],
[config=yes])
AC_ARG_ENABLE(
[gui],
[AS_HELP_STRING([--enable-gui],[build GUI extension (default is yes)])],
[with_gui=$enableval],
[with_gui=yes])
AC_ARG_ENABLE(
[debug],
[AS_HELP_STRING([--enable-debug], [Display debug trace])],
[with_debug=$enableval],
[with_debug=no])
AC_ARG_ENABLE(
[warning],
[AS_HELP_STRING([--enable-warning], [Display warning trace])],
[with_warning=$enableval],
[with_warning=no])
AC_ARG_ENABLE(
[message],
[AS_HELP_STRING([--enable-message], [Display message trace])],
[with_message=$enableval],
[with_message=yes])
AC_ARG_ENABLE(
[info],
[AS_HELP_STRING([--enable-info], [Display info trace])],
......@@ -68,18 +77,6 @@ if test "$config" = yes ; then
fi
AC_SUBST(OCAMLYACC)
AC_PATH_PROG(RSVG,rsvg,no)
if test "$RSVG" = no ; then
AC_MSG_WARN(Cannot find rsvg)
fi
AC_SUBST(RSVG)
AC_PATH_PROG(RSVG_CONVERT,rsvg-convert,no)
if test "$RSVG_CONVERT" = no ; then
AC_MSG_ERROR(Cannot find rsvg-convert)
fi
AC_SUBST(RSVG_CONVERT)
# Look for ocamlfind
AC_PATH_PROG(OCAMLFIND,ocamlfind,no)
if test "$OCAMLFIND" = no ; then
......@@ -88,9 +85,6 @@ if test "$config" = yes ; then
AC_SUBST(OCAMLFIND)
m4_include(ac_lib_checking.m4)
......@@ -109,96 +103,24 @@ if test "$config" = yes ; then
AC_LIB_CHECKING(Xml-light,xml-light,xml-light,xml-light,XmlParser,"",true)
AC_SUBST(XMLLIGHT_INCLUDE,$LIB_INCLUDE)
# Build GUI.
AC_ARG_ENABLE(
[gui],
[AS_HELP_STRING(
[--enable-gui],
[build GUI extension (default is yes)])],
[with_gui=$enableval],
[with_gui=yes])
if test "x$with_gui" != xno ; then
echo ""
echo "Trying to configure with gui enabled."
echo ""
# Look for lablgtk2
AC_PATH_PROG(LABLGTK2,lablgtk2,no)
if test "$LABLGTK2" = no ; then
AC_MSG_WARN(Cannot find lablgtk2.)
else
AC_SUBST(HAVE_GTK,yes)
fi
# Look for lablgtkrsvg with or without ocamlfind
AC_MSG_CHECKING([for lablrsvg])
if test -f c_check_lablrsvg.ml ; then
if test -w c_check_lablrsvg.ml ; then
rm c_check_lablrsvg.ml >& /dev/null
else
AC_MSG_ERROR(Cannot remove c_check_lablrsvg.ml. Please change its right with chmod 666 c_check_lablrsvg.ml)
fi
fi
echo "open Rsvg;;" > c_check_lablrsvg.ml
if (ocaml -I +lablgtk2 lablgtk.cma lablrsvg.cma c_check_lablrsvg.ml >& /dev/null) ; then
AC_MSG_RESULT(standard)
LABLRSVG="yes"
else
if test "$OCAMLFIND" = no ; then
AC_MSG_WARN(The lablrsvg library is missing.)
LABLRSVG="no"
else
if $OCAMLFIND query lablrsvg > /dev/null 2>&1 ; then
AC_MSG_RESULT(ocamlfind)
else
AC_MSG_WARN(The lablrsvg library is missing.)
LABLRSVG="no"
fi
fi
fi
rm c_check_lablrsvg.ml >& /dev/null
# Look for lablglade with or without ocamlfind
AC_MSG_CHECKING([for lablglade])
if test -f c_check_lablglade.ml ; then
if test -w c_check_lablglade.ml ; then
rm c_check_lablglade.ml >& /dev/null
else
AC_MSG_ERROR(Cannot remove c_check_lablglade.ml. Please change its right with chmod 666 c_check_lablglade.ml)
fi
fi
echo "open GMain;; open Glade;;" > c_check_lablglade.ml
if (ocamlc -I +lablgtk2 lablgtk.cma lablglade.cma c_check_lablglade.ml >& /dev/null) ; then
AC_MSG_RESULT(lablglade)
LABLGLADE="yes"
else
if test "$OCAMLFIND" = no ; then
AC_MSG_WARN(The lablglade library is missing.)
LABLGLADE="no"
else
if $OCAMLFIND query lablglade > /dev/null 2>&1 ; then
AC_MSG_RESULT(ocamlfind)
else
AC_MSG_WARN(The lablglade library is missing.)
LABLGLADE="no"
fi
fi
fi
rm c_check_lablglade.ml >& /dev/null
# Check whether build or not gui
if test "$LABLGTK2" = no || test "$DOT" = no || test "$LABLRSVG" = no || test $CAIRO = no || test $LABLGLADE = no; then
AC_MSG_WARN(Will not build leopar GUI extension.)
else
AC_SUBST(BUILD_GUI,yes)
fi
fi
if test "x$with_gui" = xno ; then
AC_SUBST(BUILD_GUI,no)
else
AC_LIB_CHECKING(Lablgtk2,lablgtk2,lablgtk2,lablgtk,GMain,"",false,true)
AC_SUBST(LABLGTK_INCLUDE,$LIB_INCLUDE)
AC_LIB_CHECKING(Cairo,cairo,cairo,cairo,Cairo,"",false,true)
AC_SUBST(CAIRO_INCLUDE,$LIB_INCLUDE)
if test "$LABLGTK_INCLUDE" = no ;
then AC_SUBST(BUILD_GUI,no)
else
if test "$CAIRO_INCLUDE" = no ;
then AC_SUBST(BUILD_GUI,no)
else AC_SUBST(BUILD_GUI,yes)
fi
fi
fi
if test "x$with_debug" != xno ; then
AC_SUBST(DEBUG,yes)
......@@ -230,18 +152,6 @@ if test "$config" = yes ; then
SYSTEM=`uname`
AC_SUBST(SYSTEM)
# Checks for header files.
# Checks for typedefs, structures, and compiler characteristics.
# Checks for library functions.
AC_SUBST(DEBUG)
AC_SUBST(WARNING)
AC_SUBST(INFO)
AC_SUBST(MESSAGE)
AC_SUBST(LIB)
fi
AC_SUBST(SET_MAKE)
......
This diff is collapsed.
......@@ -15,10 +15,10 @@ ui.ml : dep2pict.glade
mv ui.tmp ui.ml
ui.cmx : ui.ml
$(OCAMLOPT) -c $(LABLGTK_OPT) ui.ml
$(OCAMLOPT) -c $(LABLGTK_OPT) $(CAIRO_OPT) ui.ml
DEP_OPT= unix.cmxa str.cmxa $(LABLGTK_OPT) $(XML_LIGHT_OPT) $(ANSITERMINAL_OPT) $(LOG_OPT) $(DEP2PICT_OPT)
DEP_OPT_LIGHT= unix.cmxa str.cmxa $(LABLGTK_OPT_LIGHT) $(XML_LIGHT_OPT) $(ANSITERMINAL_OPT) $(LOG_OPT) $(DEP2PICT_OPT)
DEP_OPT= unix.cmxa str.cmxa $(LABLGTK_OPT) $(CAIRO_OPT) $(XML_LIGHT_OPT) $(ANSITERMINAL_OPT) $(LOG_OPT) $(DEP2PICT_OPT)
DEP_OPT_NOGUI= unix.cmxa str.cmxa $(CAIRO_OPT) $(XML_LIGHT_OPT) $(ANSITERMINAL_OPT) $(LOG_OPT) $(DEP2PICT_OPT)
gui.cmx : gui.ml ui.cmx
$(OCAMLOPT) -c -pp 'camlp4o pa_macro.cmo -DBUILD_GUI -DDATA_DIR=\"$(DATA_DIR)\" $(LOG) -DVERSION=\"$(VERSION)\"' $(DEP_OPT) ui.cmx gui.ml
......@@ -37,5 +37,5 @@ endif
ifeq (@BUILD_GUI@,yes)
$(OCAMLOPT) -o ../bin/dep2pict.opt -pp 'camlp4o pa_macro.cmo -DBUILD_GUI -DDATA_DIR=\"$(DATA_DIR)\" $(LOG) -DVERSION=\"$(VERSION)\"' $(DEP_OPT) ui.cmx gui.cmx main.cmx
else
$(OCAMLOPT) -o ../bin/dep2pict.opt -pp 'camlp4o pa_macro.cmo -DDATA_DIR=\"$(DATA_DIR)\" $(LOG) -DVERSION=\"$(VERSION)\"' $(DEP_OPT_LIGHT) main.cmx
$(OCAMLOPT) -o ../bin/dep2pict.opt -pp 'camlp4o pa_macro.cmo -DDATA_DIR=\"$(DATA_DIR)\" $(LOG) -DVERSION=\"$(VERSION)\"' $(DEP_OPT_NOGUI) main.cmx
endif
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