From 42f43a11627e9950c0fd2b70ebec7140e5be7f5a Mon Sep 17 00:00:00 2001 Message-Id: <42f43a11627e9950c0fd2b70ebec7140e5be7f5a.1715588519.git.mdw@distorted.org.uk> From: Mark Wooding Date: Sun, 23 Mar 2008 17:31:30 +0000 Subject: [PATCH] configure.ac: on FreeBSD, look in the various places that libdb might get installed. Organization: Straylight/Edgeware From: Richard Kettlewell README.developers: (probably partial) list of packages required to build and test DisOrder on FreeBSD. --- README.developers | 14 ++++++++++++++ configure.ac | 17 ++++++++++++++--- 2 files changed, 28 insertions(+), 3 deletions(-) diff --git a/README.developers b/README.developers index 3302f5a..ae84515 100644 --- a/README.developers +++ b/README.developers @@ -14,6 +14,20 @@ Dependencies: libao-dev libmad0-dev libasound2-dev libdb4.3-dev \ libflac-dev + * On FreeBSD you'll need at least these packages: + autotools + bash + flac + mad + boehm-gc + db43 + gmake + gsed + libao + libgcrypt + wget + vorbis-tools + * Please report unstated dependencies (here, README or debian/control). Building: diff --git a/configure.ac b/configure.ac index 84dffd9..2607d91 100644 --- a/configure.ac +++ b/configure.ac @@ -111,9 +111,20 @@ case "$host" in # there by default LDFLAGS="${LDFLAGS} -L/usr/local/lib" CPPFLAGS="${CPPFLAGS} -isystem /usr/local/include" - # libdb installs elsewhere again - LDFLAGS="${LDFLAGS} -L/usr/local/lib/db44" - CPPFLAGS="${CPPFLAGS} -isystem /usr/local/include/db44" + # Look for a suitable version of libdb among the versions found in FreeBSD 7.0 + AC_CACHE_CHECK([looking for a libdb install],[rjk_cv_libdb],[ + rjk_cv_libdb="none" + for db in db43 db44 db45 db46; do + if test -e /usr/local/lib/$db; then + rjk_cv_libdb=$db + break + fi + done + ]) + if test $rjk_cv_libdb != none; then + LDFLAGS="${LDFLAGS} -L/usr/local/lib/$rjk_cv_libdb" + CPPFLAGS="${CPPFLAGS} -isystem /usr/local/include/$rjk_cv_libdb" + fi ;; * ) AC_MSG_RESULT([unknown, winging it]) -- [mdw]