From d50f9170922db61fea5c1b2eee73c0d47e9f4af5 Mon Sep 17 00:00:00 2001 From: Claudio Matsuoka Date: Mon, 24 Mar 2014 18:03:43 -0300 Subject: [PATCH] Re-enable with-libxmp configure option Mostly in a standards-compliant way this time, complain if set as "no". This is being re-added by user request. Signed-off-by: Claudio Matsuoka --- configure.ac | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 56f2f51..d0d2535 100644 --- a/configure.ac +++ b/configure.ac @@ -8,6 +8,8 @@ AC_ARG_ENABLE(alsa, [ --disable-alsa don't compile ALSA support]) AC_ARG_ENABLE(pulseaudio, [ --enable-pulseaudio compile PulseAudio support]) +AC_ARG_WITH(libxmp, + [ --with-libxmp= libxmp prefix (optional)]) AC_SUBST(LD_VERSCRIPT) AC_CANONICAL_HOST @@ -28,7 +30,21 @@ esac AC_PROG_INSTALL AM_INIT_AUTOMAKE([foreign subdir-objects tar-pax]) -PKG_CHECK_MODULES([libxmp], [libxmp >= 4.1]) +dnl For the case where we don't have pkgconfig and we have the library +dnl installed in a non-default location + +if test "x$with_libxmp" = "xno"; then + AC_ERROR(libxmp is required) +fi +if test "x$with_libxmp" != "x"; then + CPPFLAGS="${CPPFLAGS} -I${with_libxmp}/include" + LDFLAGS="${LDFLAGS} -L${with_libxmp}/lib" + if test ! -f "${with_libxmp}/include/xmp.h"; then + AC_ERROR(can't find ${with_libxmp}/include/xmp.h) + fi +else + PKG_CHECK_MODULES([libxmp], [libxmp >= 4.1]) +fi dnl Don't use things like /usr/etc or /usr/var