Commit 1caa7204 authored by POGODALLA Sylvain's avatar POGODALLA Sylvain

Configuration file modified to take the kaputt library into account

parent 23f2c244
......@@ -99,41 +99,73 @@ if test -n "$DYPGENLIB_PATH" ; then
DYPGEN_PLACE=$DYPGENLIB_PATH
DYPGEN_INCLUDE="-I $DYPGEN_PLACE"
if test -f $DYPGEN_PLACE/dyp.cma ; then
AC_MSG_RESULT(dypgen library is $DYPGEN_PLACE/dypgen.cma)
AC_MSG_RESULT(dypgen library is $DYPGEN_PLACE/dyp.cma)
else
AC_MSG_ERROR(Could not find dypgen library in $DYPGEN_PLACE)
AC_MSG_ERROR(Could not find dypgen library in $DYPGEN_PLACE)
fi
else
if test "$OCAMLFIND" != no ; then
if $OCAMLFIND query dypgen > /dev/null 2>&1 ; then
DYPGEN_INCLUDE_DIR=`$OCAMLFIND query dypgen`
DYPGEN_FINDLIB=yes
DYPGEN_PLACE=$DYPGEN_INCLUDE_DIR
DYPGEN_INCLUDE="-I $DYPGEN_INCLUDE_DIR"
else
DYPGEN_FINDLIB=no
if $OCAMLFIND query dyp > /dev/null 2>&1 ; then
DYPGEN_INCLUDE_DIR=`$OCAMLFIND query dyp`
DYPGEN_PLACE=$DYPGEN_INCLUDE_DIR
DYPGEN_INCLUDE="-I $DYPGEN_INCLUDE_DIR"
else
AC_MSG_RESULT(dypgen library was not installed by ocamlfind)
fi
fi
else
DYPGEN_FINDLIB=no
fi
if test "$DYPGEN_FINDLIB" = no ; then
DYPGEN_PLACE=`$OCAMLC -where`
else
DYPGEN_PLACE=$DYPGEN_INCLUDE_DIR
DYPGEN_INCLUDE="-I $DYPGEN_INCLUDE_DIR"
fi
# Old versions of dypgen where put in a dypgen directory
if test -f $DYPGEN_PLACE/dypgen/dyp.cma ; then
DYPGEN_INCLUDE="-I +dypgen"
AC_MSG_RESULT(dypgen library is $DYPGEN_PLACE/dypgen/dypgen.cma)
else
# New versions of dypgen where put in a dyp directory
if test -f $DYPGEN_PLACE/dyp/dyp.cma ; then
DYPGEN_INCLUDE="-I +dyp"
AC_MSG_RESULT(dypgen library is $DYPGEN_PLACE/dyp/dypgen.cma)
else
AC_MSG_ERROR(Could not find dypgen library in $DYPGEN_PLACE)
fi
OCAML_LIB=`$OCAMLC -where`
# Old versions of dypgen where put in a dypgen directory
if test -d $OCAML_LIB/dypgen ; then
DYPGEN_PLACE=$OCAML_LIB/dypgen
DYPGEN_INCLUDE="-I +dypgen"
else
# New versions of dypgen where put in a dyp directory
if test -d $OCAML_LIB/dyp ; then
DYPGEN_PLACE=$OCAML_LIB/dyp
DYPGEN_INCLUDE="-I +dyp"
else
AC_MSG_ERROR(Could not find a suitable place for dypgen library in $OCAML_LIB)
fi
fi
fi
fi
if test -f $DYPGEN_PLACE/dyp.cma ; then
AC_MSG_RESULT(dypgen library is $DYPGEN_PLACE/dyp.cma)
else
AC_MSG_ERROR(Could not find dypgen library "dyp.cma" in $DYPGEN_PLACE)
fi
# Look for KAPUTT_LIB with ocamlfind
AC_MSG_CHECKING([(optional) kaputt library])
if test "$OCAMLFIND" != no ; then
if $OCAMLFIND query kaputt > /dev/null 2>&1 ; then
KAPUTT_INCLUDE_DIR=`$OCAMLFIND query kaputt`
KAPUTT_PLACE=$KAPUTT_INCLUDE_DIR
KAPUTT_INCLUDE="-I $KAPUTT_INCLUDE_DIR"
else
AC_MSG_RESULT(kaputt library was not installed by ocamlfind)
fi
else
OCAML_LIB=`$OCAMLC -where`
if test -d $OCAML_LIB/kaputt ; then
KAPUTT_PLACE=$OCAML_LIB/kaputt
KAPUTT_INCLUDE="-I +kaputt"
else
AC_MSG_RESULT(Could not find a suitable place for kaputt library in $OCAML_LIB. No link to the kaputt library will be allowed in compilation)
fi
fi
if test -f $KAPUTT_PLACE/kaputt.cma ; then
AC_MSG_RESULT(kaputt library is $KAPUTT_PLACE/kaputt.cma)
else
AC_MSG_RESULT(Could not find kaputt library "kaputt.cma" in $KAPUTT_PLACE. No link to the kaputt library will be allowed in compilation)
fi
# What is the OCAML version ?
......@@ -197,6 +229,7 @@ AC_SUBST(OCAMLLEX)
#AC_SUBST(OCAMLYACC)
AC_SUBST(DYPGEN)
AC_SUBST(DYPGEN_INCLUDE)
AC_SUBST(KAPUTT_INCLUDE)
AC_SUBST(TYPES)
AC_SUBST(OCAML09WARNINGS)
......
......@@ -570,6 +570,7 @@ SET_MAKE
OCAMLP4_LOC
OCAML09WARNINGS
TYPES
KAPUTT_INCLUDE
DYPGEN_INCLUDE
CAMLP4_LIB
DYPGENLIB_PATH
......@@ -2161,44 +2162,81 @@ if test -n "$DYPGENLIB_PATH" ; then
DYPGEN_PLACE=$DYPGENLIB_PATH
DYPGEN_INCLUDE="-I $DYPGEN_PLACE"
if test -f $DYPGEN_PLACE/dyp.cma ; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: dypgen library is $DYPGEN_PLACE/dypgen.cma" >&5
$as_echo "dypgen library is $DYPGEN_PLACE/dypgen.cma" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: dypgen library is $DYPGEN_PLACE/dyp.cma" >&5
$as_echo "dypgen library is $DYPGEN_PLACE/dyp.cma" >&6; }
else
as_fn_error $? "Could not find dypgen library in $DYPGEN_PLACE" "$LINENO" 5
as_fn_error $? "Could not find dypgen library in $DYPGEN_PLACE" "$LINENO" 5
fi
else
if test "$OCAMLFIND" != no ; then
if $OCAMLFIND query dypgen > /dev/null 2>&1 ; then
DYPGEN_INCLUDE_DIR=`$OCAMLFIND query dypgen`
DYPGEN_FINDLIB=yes
DYPGEN_PLACE=$DYPGEN_INCLUDE_DIR
DYPGEN_INCLUDE="-I $DYPGEN_INCLUDE_DIR"
else
DYPGEN_FINDLIB=no
if $OCAMLFIND query dyp > /dev/null 2>&1 ; then
DYPGEN_INCLUDE_DIR=`$OCAMLFIND query dyp`
DYPGEN_PLACE=$DYPGEN_INCLUDE_DIR
DYPGEN_INCLUDE="-I $DYPGEN_INCLUDE_DIR"
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: dypgen library was not installed by ocamlfind" >&5
$as_echo "dypgen library was not installed by ocamlfind" >&6; }
fi
fi
else
DYPGEN_FINDLIB=no
fi
if test "$DYPGEN_FINDLIB" = no ; then
DYPGEN_PLACE=`$OCAMLC -where`
else
DYPGEN_PLACE=$DYPGEN_INCLUDE_DIR
DYPGEN_INCLUDE="-I $DYPGEN_INCLUDE_DIR"
fi
# Old versions of dypgen where put in a dypgen directory
if test -f $DYPGEN_PLACE/dypgen/dyp.cma ; then
DYPGEN_INCLUDE="-I +dypgen"
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: dypgen library is $DYPGEN_PLACE/dypgen/dypgen.cma" >&5
$as_echo "dypgen library is $DYPGEN_PLACE/dypgen/dypgen.cma" >&6; }
else
# New versions of dypgen where put in a dyp directory
if test -f $DYPGEN_PLACE/dyp/dyp.cma ; then
DYPGEN_INCLUDE="-I +dyp"
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: dypgen library is $DYPGEN_PLACE/dyp/dypgen.cma" >&5
$as_echo "dypgen library is $DYPGEN_PLACE/dyp/dypgen.cma" >&6; }
else
as_fn_error $? "Could not find dypgen library in $DYPGEN_PLACE" "$LINENO" 5
fi
OCAML_LIB=`$OCAMLC -where`
# Old versions of dypgen where put in a dypgen directory
if test -d $OCAML_LIB/dypgen ; then
DYPGEN_PLACE=$OCAML_LIB/dypgen
DYPGEN_INCLUDE="-I +dypgen"
else
# New versions of dypgen where put in a dyp directory
if test -d $OCAML_LIB/dyp ; then
DYPGEN_PLACE=$OCAML_LIB/dyp
DYPGEN_INCLUDE="-I +dyp"
else
as_fn_error $? "Could not find a suitable place for dypgen library in $OCAML_LIB" "$LINENO" 5
fi
fi
fi
fi
if test -f $DYPGEN_PLACE/dyp.cma ; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: dypgen library is $DYPGEN_PLACE/dyp.cma" >&5
$as_echo "dypgen library is $DYPGEN_PLACE/dyp.cma" >&6; }
else
as_fn_error $? "Could not find dypgen library \"dyp.cma\" in $DYPGEN_PLACE" "$LINENO" 5
fi
# Look for KAPUTT_LIB with ocamlfind
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking (optional) kaputt library" >&5
$as_echo_n "checking (optional) kaputt library... " >&6; }
if test "$OCAMLFIND" != no ; then
if $OCAMLFIND query kaputt > /dev/null 2>&1 ; then
KAPUTT_INCLUDE_DIR=`$OCAMLFIND query kaputt`
KAPUTT_PLACE=$KAPUTT_INCLUDE_DIR
KAPUTT_INCLUDE="-I $KAPUTT_INCLUDE_DIR"
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: kaputt library was not installed by ocamlfind" >&5
$as_echo "kaputt library was not installed by ocamlfind" >&6; }
fi
else
OCAML_LIB=`$OCAMLC -where`
if test -d $OCAML_LIB/kaputt ; then
KAPUTT_PLACE=$OCAML_LIB/kaputt
KAPUTT_INCLUDE="-I +kaputt"
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Could not find a suitable place for kaputt library in $OCAML_LIB. No link to the kaputt library will be allowed in compilation" >&5
$as_echo "Could not find a suitable place for kaputt library in $OCAML_LIB. No link to the kaputt library will be allowed in compilation" >&6; }
fi
fi
if test -f $KAPUTT_PLACE/kaputt.cma ; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: kaputt library is $KAPUTT_PLACE/kaputt.cma" >&5
$as_echo "kaputt library is $KAPUTT_PLACE/kaputt.cma" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Could not find kaputt library \"kaputt.cma\" in $KAPUTT_PLACE. No link to the kaputt library will be allowed in compilation" >&5
$as_echo "Could not find kaputt library \"kaputt.cma\" in $KAPUTT_PLACE. No link to the kaputt library will be allowed in compilation" >&6; }
fi
# What is the OCAML version ?
......@@ -2299,6 +2337,7 @@ $as_echo "$OCAMLP4 calls will be done with the $CAMLP4_LIB library" >&6; }
ac_config_files="$ac_config_files ./Makefile config/Makefile src/Makefile.master src/Makefile.common src/Makefile src/utils/Makefile src/logic/Makefile src/grammars/Makefile src/acg-data/Makefile src/scripting/Makefile src/datalog/Makefile"
......
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