Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

conditional compile if libsndfile is not present

git-svn-id: http://svn.metadecks.org/libremix/trunk@375 e2d53364-18fc-0310-981e-b60a84739af0
  • Loading branch information...
commit 97a47b0c2c6bdf824180c9b541f59d285ffc6be3 1 parent 4498d14
conrad authored
11 configure.ac
View
@@ -4,6 +4,8 @@ AC_INIT(src/libremix/remix_base.c)
AM_INIT_AUTOMAKE(remix, 0.2.3)
AM_CONFIG_HEADER(config.h)
+example_programs="noisedemo squaredemo"
+
dnl Checks for programs.
AM_PROG_LIBTOOL
AC_PROG_INSTALL
@@ -67,9 +69,10 @@ if test "$HAVE_LIBSNDFILE1" = "yes" ; then
AC_DEFINE([HAVE_LIBSNDFILE1], [], [Define if libsndfile version 1 found])
AC_SUBST(SNDFILE_LIBS)
AC_SUBST(SNDFILE_CFLAGS)
+ example_programs="${example_programs} sndfiledemo"
else
- AC_CHECK_LIB(sndfile, sf_open, SNDFILE_LIBS="maybe")
- if test "$SNDFILE_LIBS" = "maybe" ; then
+ AC_CHECK_LIB(sndfile, sf_open, HAVE_LIBSNDFILE1="maybe")
+ if test "$HAVE_LIBSNDFILE1" = "maybe" ; then
AC_MSG_ERROR([
***
*** libsndfile-1.0.0 or greater seems to exist on your system, however
@@ -89,6 +92,8 @@ else
fi
fi
+AM_CONDITIONAL(HAVE_LIBSNDFILE1,$HAVE_LIBSNDFILE1)
+
dnl Checks for header files.
AC_HEADER_STDC
@@ -169,7 +174,7 @@ AC_MSG_RESULT([
Example programs (./src/examples):
- noisedemo sndfiledemo squaredemo
+ ${example_programs}
Installation paths:
8 src/examples/Makefile.am
View
@@ -2,10 +2,14 @@
INCLUDES = -I$(top_srcdir)/src/ctxdata -I$(top_srcdir)/include -I../ctxdata
if BUILD_MONITOR
-monitor_programs = noisedemo squaredemo sndfiledemo
+monitor_programs = noisedemo squaredemo
+if HAVE_LIBSNDFILE1
+sndfile_programs = sndfiledemo
endif
-noinst_PROGRAMS = cd_list_test $(monitor_programs)
+endif
+
+noinst_PROGRAMS = cd_list_test $(monitor_programs) $(sndfile_programs)
EXTRA_DIST = 909_cl.wav 1052.wav
6 src/libremix/Makefile.am
View
@@ -6,8 +6,13 @@ if BUILD_MONITOR
monitor_sources = remix_monitor.c
endif
+if HAVE_LIBSNDFILE1
+sndfile_sources = remix_sndfile.c
+endif
+
libremix_la_SOURCES = \
$(monitor_sources) \
+ $(sndfile_sources) \
remix_base.c \
remix_channel.c \
remix_channelset.c \
@@ -23,7 +28,6 @@ libremix_la_SOURCES = \
remix_null.c \
remix_pcm.c \
remix_plugin.c \
- remix_sndfile.c \
remix_sound.c \
remix_squaretone.c \
remix_stream.c \
3  src/libremix/remix_plugin.c
View
@@ -47,7 +47,10 @@ remix_plugin_initialise_static (RemixEnv * env)
CDList * plugins = cd_list_new (env);
plugins = cd_list_join (env, plugins, __gain_init (env));
+
+#ifdef HAVE_LIBSNDFILE1
plugins = cd_list_join (env, plugins, __sndfile_init (env));
+#endif
return plugins;
}
Please sign in to comment.
Something went wrong with that request. Please try again.