Skip to content

Commit

Permalink
* Added a base macros for bindings' autoconf. Currently, it does:
Browse files Browse the repository at this point in the history
 * Check for C and OCaml compilers
 * Check for PIC flags and add it to C*FLAGS
 * Check that running user is not root
 * Add prefix to compilation flags if passed to configure
* Factorized bootstrap scripts.
* Other nasty and boring things not worh reporting..

--HG--
rename : m4/cpp_check_class.m4 => autoconf/m4/cpp_check_class.m4
rename : m4/detect_binding.m4 => autoconf/m4/detect_binding.m4
rename : m4/ocaml.m4 => autoconf/m4/ocaml.m4
rename : m4/ocaml_compilers.m4 => autoconf/m4/ocaml_compilers.m4
rename : m4/pkg_config.m4 => autoconf/m4/pkg_config.m4
rename : m4/strict_check_tool.m4 => autoconf/m4/strict_check_tool.m4
extra : rebase_source : d5a87a6b3591321cbb7365f5c64cdc2513c3acdf
  • Loading branch information
toots committed Sep 27, 2011
1 parent 0163dc0 commit 92238ae
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 25 deletions.
6 changes: 3 additions & 3 deletions Makefile.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
PROGNAME := ocaml-dssi
DISTFILES := COPYING CHANGES Makefile.in \
bootstrap configure configure.ac m4/*.m4 \
DISTFILES := @AUTOCONF_INSTALL_FILES@ COPYING CHANGES Makefile.in \
bootstrap configure configure.ac \
$(wildcard src/*.ml src/*.mli src/*.c) src/Makefile.in src/META.in \
src/OCamlMakefile \
$(wildcard examples/*/*.ml examples/*/Makefile examples/*/OCamlMakefile)
Expand All @@ -22,7 +22,7 @@ doc:
dist:
rm -rf $(PROGNAME)-$(VERSION)
mkdir $(PROGNAME)-$(VERSION)
cp -r --parents $(DISTFILES) $(PROGNAME)-$(VERSION)
cp -R -L --parents $(DISTFILES) $(PROGNAME)-$(VERSION)
tar zcvf ../$(PROGNAME)-$(VERSION).tar.gz $(PROGNAME)-$(VERSION)
rm -rf $(PROGNAME)-$(VERSION)

Expand Down
5 changes: 0 additions & 5 deletions bootstrap

This file was deleted.

1 change: 1 addition & 0 deletions bootstrap
19 changes: 3 additions & 16 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -1,22 +1,10 @@
# check for one particular file of the sources
AC_INIT(ocaml-dssi, 0.1.0, savonet-users@lists.sourceforge.net)
AC_INIT([ocaml-dssi],[0.1.0],[savonet-users@lists.sourceforge.net])

VERSION=$PACKAGE_VERSION
AC_MSG_RESULT([configuring $PACKAGE_STRING])

# Add prefix to compilation variables
# if passed
if test "x$prefix" != "xNONE"; then
CFLAGS="$CFLAGS -I$prefix/include"
LDFLAGS="$LDFLAGS -L$prefix/lib"
CPPFLAGS="$CPPFLAGS -I$prefix/include"
fi

AC_CHECK_OCAML_COMPILERS()

AC_PROG_CC()
AC_CHECK_TOOL([AR],[ar],no)
AC_SUBST(AR)
AC_BASE_CHECKS()

# Check for DSSI
AC_CHECK_HEADERS([dssi.h], [ac_have_dssi="yes"])
Expand All @@ -25,8 +13,7 @@ if test "$ac_have_dssi" != "yes"; then
fi

# Check for LADSPA
AC_ARG_WITH([ladspa-dir],AC_HELP_STRING([--with-ladspa-dir=path],
[use "path" as the location of ocaml-ladspa (autodetected by default)]))
AC_ARG_WITH([ladspa-dir],AS_HELP_STRING([--with-ladspa-dir=path],[use "path" as the location of ocaml-ladspa (autodetected by default)]))
if test -z "$with_ladspa_dir"; then
AC_MSG_CHECKING(for ocaml-ladspa)
if ($OCAMLFIND query ladspa > /dev/null 2>&1); then
Expand Down
2 changes: 1 addition & 1 deletion m4

0 comments on commit 92238ae

Please sign in to comment.