added basic autotools scripts
authorPaul Brossier <piem@piem.org>
Thu, 5 Nov 2009 14:13:27 +0000 (15:13 +0100)
committerPaul Brossier <piem@piem.org>
Thu, 5 Nov 2009 14:13:27 +0000 (15:13 +0100)
Makefile.am [new file with mode: 0644]
configure.ac [new file with mode: 0644]

diff --git a/Makefile.am b/Makefile.am
new file mode 100644 (file)
index 0000000..760cb4a
--- /dev/null
@@ -0,0 +1,68 @@
+## Process this file with automake to produce Makefile.in. -*-Makefile-*-
+# inspired from Guenter Geiger's Makefile.am for plugin 
+# pure-data/externals/plugin~/Makefile.am -- rev 1.1
+
+pddir = $(prefix)/lib/pd
+
+## Make and install the shared library.
+pdinstalldir = $(pddir)/extra
+pdinstallrefdir = $(pddir)/doc/5.reference
+pdinstallexpdir = $(pddir)/doc/aubio
+
+if MINGW
+PDEXT = aubio.dll
+else
+if DARWIN
+PDEXT = aubio.pd_darwin
+else
+PDEXT = aubio.pd_linux
+endif
+endif
+
+pdinstall_PROGRAMS = $(PDEXT)
+
+ALLSOURCES = \
+       aubio_setup.c \
+       aubioonset~.c \
+       aubiotempo~.c \
+       aubiotss~.c \
+       aubioquiet~.c \
+       aubiopitch~.c \
+       aubiozcr~.c
+
+aubio_pd_linux_SOURCES = $(ALLSOURCES)
+aubio_pd_darwin_SOURCES = $(ALLSOURCES)
+aubio_dll_SOURCES = $(ALLSOURCES)
+
+pdincludedir = $(pddir)/src
+
+AM_CFLAGS  = -I$(top_srcdir)/src -I$(pdincludedir) -DPD @AUBIO_CFLAGS@
+if MINGW
+else
+AM_CFLAGS += -fPIC -DPIC 
+endif
+
+AM_LDFLAGS  = -L$(top_builddir)/src @AUBIO_LIBS@ 
+if MINGW
+AM_LDFLAGS += -export_dynamic -shared -lpd
+else
+if DARWIN
+AM_LDFLAGS += -bundle -undefined suppress -flat_namespace
+else
+AM_LDFLAGS += --export_dynamic --shared
+endif
+endif
+
+## Install the documentation.
+
+pdinstallref_DATA = \
+       help/aubioonset~-help.pd \
+       help/aubioquiet~-help.pd \
+       help/aubiotempo~-help.pd \
+       help/aubiotss~-help.pd \
+       help/aubiopitch~-help.pd
+
+pdinstallexp_DATA = \
+       examples/onset-cam.pd
+
+EXTRA_DIST = $(pdinstallref_DATA) $(pdinstallexp_DATA)
diff --git a/configure.ac b/configure.ac
new file mode 100644 (file)
index 0000000..80888b0
--- /dev/null
@@ -0,0 +1,41 @@
+dnl Process this file with autoconf to produce a configure script
+
+dnl Init autoconf
+AC_INIT([pd-aubio], [0.0.1])
+AC_CONFIG_SRCDIR([aubio_setup.c])
+
+dnl Init automake
+AM_INIT_AUTOMAKE([dist-bzip2 no-define])
+
+dnl Check for Puredata
+AC_CHECK_HEADER([m_pd.h],PUREDATA=y,AC_MSG_WARN([Puredata header not found.]))
+AM_CONDITIONAL(PUREDATAFOUND, test "${PUREDATA}" = "y")
+
+dnl Check for pkg-config
+AC_PATH_PROG(PKG_CONFIG,pkg-config,no)
+
+dnl Check for aubio
+PKG_CHECK_MODULES(AUBIO, aubio >= 0.4.0, HAVE_AUBIO=1)
+
+AM_CONDITIONAL(MINGW, false)
+AM_CONDITIONAL(DARWIN, false)
+case "${host}" in
+*mingw* | *cygwin*)
+  mingw32_support="yes"
+  AC_CHECK_HEADER(windows.h)
+  AM_CONDITIONAL(MINGW, true)
+  LDFLAGS="$LDFLAGS -no-undefined"
+  ;;
+*darwin* | *rhapsody* | *macosx*)
+  AC_ISC_POSIX
+  AM_CONDITIONAL(DARWIN, true)
+  ;;
+*)
+  AC_ISC_POSIX
+  ;;
+esac
+
+dnl Create Makefiles
+AC_OUTPUT([
+    Makefile
+])