1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-05-01 16:19:43 +02:00
audacity/m4/audacity_checklib_redland.m4
lllucius 15eef6421e Applying 2 of Benjamin's patches to add an autogen script and to
enable support for using the system portaudio library.  The latter
also corrects a long standing bug that prevented using config.status
to regenerate src/Makefile.

As a result of the above, I've taken Benjamin's *_LOCAL_CONFIGURE_ARGS
idea and propagated its usage to the other place where ac_configure_args
was being set directly.

Removed old stuff from lib-src/Makefile.in and made the library locations
for portaudio and portmixer like the rest (a symlink in lib-src).

Reworked portmixer's configure.ac to properly detect host apis.
2011-03-30 16:14:51 +00:00

54 lines
2.6 KiB
Plaintext

dnl add Audacity / Redland license?
dnl Please increment the serial number below whenever you alter this macro
dnl for the benefit of automatic macro update systems
# audacity_checklib_redland.m4 serial 1
AC_DEFUN([AUDACITY_CHECKLIB_REDLAND], [
AC_ARG_WITH(redland,
[AS_HELP_STRING([--with-redland],
[use Redland for reading RDF data ])],
REDLAND_ARGUMENT=$withval,
REDLAND_ARGUMENT="unspecified")
dnl Check for a system copy of Redland to use.
PKG_CHECK_MODULES(REDLAND, redland >= 1.0.7,
redland_available_system="yes",
redland_available_system="no")
REDLAND_SYSTEM_AVAILABLE="no"
if test "x$redland_available_system" = "xyes" ; then
REDLAND_SYSTEM_AVAILABLE="yes"
REDLAND_SYSTEM_LIBS="$REDLAND_LIBS"
REDLAND_SYSTEM_CXXFLAGS="$REDLAND_CFLAGS"
AC_MSG_NOTICE([Redland available as system library])
fi
if test "x$REDLAND_SYSTEM_AVAILABLE" = "xno" ; then
AC_MSG_NOTICE([Redland NOT available as system library])
fi
dnl Check if Redland is available locally.
AC_CHECK_FILE(${srcdir}/lib-src/redland/librdf/librdf.h,
librdf_h_found="yes",
librdf_h_found="no")
if test "x$librdf_h_found" = "xyes" ; then
REDLAND_LOCAL_AVAILABLE="yes"
REDLAND_LOCAL_LIBS="librdf.a libraptor.a librasqal.a"
REDLAND_LOCAL_CXXFLAGS='-I$(top_srcdir)/lib-src/redland/librdf -I$(top_srcdir)/lib-src/redland/raptor/src -I$(top_srcdir)/lib-src/redland/rasqal/src'
if test ! -f lib-src/redland/Makefile ; then
REDLAND_LOCAL_CONFIG_SUBDIRS="lib-src/redland"
fi
if test "x$LIBEXPAT_SYSTEM_AVAILABLE" = "xno" ; then
# This is a horrible hack to keep from having to modify the raptor/configure.ac. It makes
# the raptor configure think there's a full expat source tree. But, all we have is expat.h
# tucked away in audacity/src/include. So, we trick it...
REDLAND_LOCAL_CONFIGURE_ARGS="\"--with-expat-source=dummy_magic\" CPPFLAGS='$CPPFLAGS -I../../../src/include'"
fi
REDLAND_LOCAL_CONFIGURE_ARGS="$REDLAND_LOCAL_CONFIGURE_ARGS RAPTOR_CFLAGS='-I../../redland/raptor/src' RAPTOR_LIBS='-L.. -L../.. -lraptor' REDLAND_CFLAGS='-I../../redland/raptor/src -I../../redland/rasqal/src -I../../redland/librdf' REDLAND_LIBS='-L.. -L../.. -lrdf -lraptor -lrasqal'"
AC_MSG_NOTICE([Redland is available in the local tree])
else
REDLAND_LOCAL_AVAILABLE="no"
AC_MSG_NOTICE([Redland is NOT available in the local tree])
fi
])