1 AC_INIT(configuration.ml.in)
3 PACKAGE=helm_gtk_interface
7 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION
9 if test "x$prefix" != xNONE; then
10 RESOLVED_PREFIX=$prefix
12 RESOLVED_PREFIX=$ac_default_prefix
15 if test "x$exec_prefix" != xNONE; then
16 RESOLVED_EXEC_PREFIX=$exec_prefix
18 RESOLVED_EXEC_PREFIX=$RESOLVED_PREFIX
21 dnl The following is the directory where the binary will be installed
22 BIN_DIR=$RESOLVED_EXEC_PREFIX/bin
24 AC_PATH_PROG(PERL_BINARY,perl,no)
25 if test $PERL_BINARY = no ; then
26 AC_MSG_ERROR(Could not find perl)
30 dnl ocaml-findlib, ocaml-netstring, ocaml-pxp
33 AC_CHECK_PROG(HAVE_OCAMLC, ocamlc, yes, no)
34 if test $HAVE_OCAMLC = "no"; then
35 AC_MSG_ERROR(could not find ocamlc in PATH, please make sure ocaml is installed)
38 dnl Check for the Ocaml library dir
39 AC_MSG_CHECKING("for the ocaml library dir")
40 OCAML_ROOT=`ocamlc -v | grep "^Standard" | sed 's/^.*: *//'`
41 AC_MSG_RESULT($OCAML_ROOT)
43 dnl Check for mlminidom
44 AC_CHECK_FILE($OCAML_ROOT/mlminidom/minidom.mli,
46 MLMINIDOM_LIB_DIR=$OCAML_ROOT/mlminidom,
50 if test $RES = "no"; then
52 echo "It seems that mlminidom isn't installed in the default directory"
53 echo "$OCAML_ROOT/mlminidom. Where can I find it?"
55 AC_CACHE_VAL(mmlinterface_cv_MLMINIDOM_LIB_DIR,
56 read mmlinterface_cv_MLMINIDOM_LIB_DIR
58 MLMINIDOM_LIB_DIR=$mmlinterface_cv_MLMINIDOM_LIB_DIR
62 AC_CHECK_FILE($OCAML_ROOT/lablgtk/gtk.ml,
64 LABLGTK_LIB_DIR=$OCAML_ROOT/lablgtk,
68 if test $RES = "no"; then
70 echo "It seems that lablgtk isn't installed in the default directory"
71 echo "$OCAML_ROOT/lablgtk. Where can I find it?"
73 AC_CACHE_VAL(mmlinterface_cv_LABLGTK_LIB_DIR,
74 read mmlinterface_cv_LABLGTK_LIB_DIR
76 LABLGTK_LIB_DIR=$mmlinterface_cv_LABLGTK_LIB_DIR
79 dnl Check for lablgtkmathview
80 AC_CHECK_FILE($OCAML_ROOT/lablgtkmathview/gtkMathView.ml,
82 LABLGTKMATHVIEW_LIB_DIR=$OCAML_ROOT/lablgtkmathview,
86 if test $RES = "no"; then
88 echo "It seems that lablgtkmathview isn't installed in the default directory"
89 echo "$OCAML_ROOT/lablgtkmathview. Where can I find it?"
91 AC_CACHE_VAL(mmlinterface_cv_LABLGTKMATHVIEW_LIB_DIR,
92 read mmlinterface_cv_LABLGTKMATHVIEW_LIB_DIR
94 LABLGTKMATHVIEW_LIB_DIR=$mmlinterface_cv_LABLGTKMATHVIEW_LIB_DIR
98 AC_CHECK_PROG(HAVE_HELM_CONFIG, helm-config, yes, no)
99 if test $HAVE_HELM_CONFIG = "no"; then
100 AC_MSG_ERROR(Could not find helm-config)
103 HELM_DEFAULT_CONFIGURATION_DIR=`helm-config --etc-dir`
108 AC_SUBST(MLMINIDOM_LIB_DIR)
109 AC_SUBST(LABLGTK_LIB_DIR)
110 AC_SUBST(LABLGTKMATHVIEW_LIB_DIR)
112 AC_SUBST(HELM_DEFAULT_CONFIGURATION_DIR)
113 AC_SUBST(PERL_BINARY)
119 helm_gtk_interface.spec