PACKAGE = @PACKAGE@
VERSION = @MLMINIDOM_VERSION@
-LIBDIR = @OCAML_ROOT@
+INCLUDEDIR = @OCAML_INCLUDE_DIR@
+LIBDIR = @OCAML_LIB_DIR@
INSTALLDIR = $(LIBDIR)/mlminidom
OBJECTS = minidom.cmi minidom.cmo ml_minidom.o ominidom.cmi ominidom.cmo
OBJECTS_OPT = minidom.cmx ominidom.cmx
rm -rf $(PACKAGE)-$(VERSION)
ml_minidom.o: ml_minidom.c
- gcc -c -I$(LIBDIR)/caml/ `glib-config --cflags` `minidom-config --cflags` $<
+ gcc -c -I$(INCLUDEDIR) `glib-config --cflags` `minidom-config --cflags` $<
minidom.cmi: minidom.mli
ocamlc -c $<
AC_MSG_ERROR(could not find ocamlc in PATH, please make sure ocaml is installed)
fi
+
AC_MSG_CHECKING("for the ocaml library dir")
-OCAML_ROOT=`ocamlc -v | grep "^Standard" | sed 's/^.*: *//'`
-AC_MSG_RESULT($OCAML_ROOT)
+OCAML_LIB_DIR=`ocamlc -v | grep "^Standard" | sed 's/^.*: *//'`
+AC_MSG_RESULT($OCAML_LIB_DIR)
+
+AC_CHECK_FILE(/usr/include/caml/mlvalues.h,
+ OCAML_INCLUDE_DIR=/usr/include/caml,
+ OCAML_INCLUDE_DIR=$OCAML_LIB_DIR
+)
AC_SUBST(PACKAGE)
AC_SUBST(VERSION)
-AC_SUBST(OCAML_ROOT)
+AC_SUBST(OCAML_INCLUDE_DIR)
+AC_SUBST(OCAML_LIB_DIR)
AC_OUTPUT([Makefile])