From df38435c2d0e6c54385cefd66a347d57add9ae67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?IOhannes=20m=20zm=C3=B6lnig?= Date: Fri, 8 Jul 2005 11:32:04 +0000 Subject: moved ACONNECT_VERSION from aconnect.c to configure.ac svn path=/trunk/externals/iem/aconnect/; revision=3306 --- Makefile | 2 +- aconnect.c | 7 ++++--- configure | 4 ++++ configure.ac | 4 ++++ 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index a15fdd5..239e3c9 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ INSTALL_BIN=$(PREFIX)/extra INSTALL_DOC=$(PREFIX)/extra/help-$(LIBNAME) EXT = pd_linux -DEFS = -DHAVE_ALSA +DEFS = -DACONNECT_VERSION=\"0.2\" -DHAVE_ALSA IFLAGS = -I. $(INCLUDES) CC = gcc diff --git a/aconnect.c b/aconnect.c index 21f347d..0bce411 100644 --- a/aconnect.c +++ b/aconnect.c @@ -18,8 +18,6 @@ * license: GNU General Public License v.2 * ******************************************************/ -#define ACONNECT_VERSION "0.2" - #include "m_pd.h" /* aconnect :: connect/disconnect 2 ALSA sequencer subscriber ports */ @@ -394,7 +392,10 @@ void aconnect_setup(void) post(" ported to pure-data by IOhannes m zmölnig 2005"); post(" institute of electronic music and acoustics (iem)"); post(" published under the GNU General Public License version 2"); - post(" version:"ACONNECT_VERSION"\tcompiled: "__DATE__""); +#ifdef ACONNECT_VERSION + startpost(" version:"ACONNECT_VERSION); +#endif + post("\tcompiled: "__DATE__""); aconnect_class = class_new(gensym("aconnect"), (t_newmethod)aconnect_new, 0, sizeof(t_aconnect), 0, 0); diff --git a/configure b/configure index 8d0b0fb..fe1a4ee 100755 --- a/configure +++ b/configure @@ -1291,6 +1291,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu +VERSION=0.2 + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -2531,6 +2533,8 @@ if test "x$ac_cv_lib_asound_snd_seq_close" = "xyes"; then DFLAGS="-DHAVE_ALSA ${DFLAGS}" fi +DFLAGS="-DACONNECT_VERSION=\\\"${VERSION}\\\" ${DFLAGS}" + if test "x$includedir" != "x"; then for id in $includedir do diff --git a/configure.ac b/configure.ac index 71aa3d2..03ff035 100644 --- a/configure.ac +++ b/configure.ac @@ -1,6 +1,8 @@ dnl Process this file with autoconf to produce a configure script. AC_INIT(aconnect.c) +VERSION=0.2 + dnl Checks for programs. AC_PROG_CC @@ -39,6 +41,8 @@ if test "x$ac_cv_lib_asound_snd_seq_close" = "xyes"; then DFLAGS="-DHAVE_ALSA ${DFLAGS}" fi +DFLAGS="-DACONNECT_VERSION=\\\"${VERSION}\\\" ${DFLAGS}" + if test "x$includedir" != "x"; then for id in $includedir do -- cgit v1.2.1