Source

ocaml-dbm-heroku / configure

Full commit
#! /bin/sh

#########################################################################
#                                                                       #
#                                 CamlDBM                               #
#                                                                       #
#            Xavier Leroy, projet Gallium, INRIA Rocquencourt           #
#                                                                       #
#   Copyright 2011 Institut National de Recherche en Informatique et    #
#   en Automatique.  All rights reserved.  This file is distributed     #
#   under the terms of the GNU Library General Public License, with     #
#   the special exception on linking described in file LICENSE.         #
#                                                                       #
#########################################################################

version=`ocamlc -version`

if test $? -ne 0; then
  echo "ocamlc not found, aborting."
  exit 2
fi

echo "Configuring for OCaml version $version"
echo

stdlib=`ocamlc -where`

LIBDIR=/app/vendor/gdbm/lib

dbm_include=/app/vendor/gdbm/include
dbm_defines=
dbm_link="-L/app/vendor/gdbm/lib -lgdbm_compat -lgdbm"

echo "Configuration for the \"camldbm\" library:"
echo "        headers found in ......... $dbm_include"
echo "        options for compiling .... $dbm_defines"
echo "        options for linking ...... $dbm_link"
echo
echo "Configuration successful"
echo

if test "$dbm_include" = "/usr/include"; then
  dbm_include=""
else
  dbm_include="-I$dbm_include"
fi

echo "OCAML_STDLIB=$stdlib" > Makefile.config
echo "DBM_INCLUDES=$dbm_include" >> Makefile.config
echo "DBM_LINK=$dbm_link" >> Makefile.config
echo "DBM_DEFINES=$dbm_defines" >> Makefile.config