chiark / gitweb /
configure.ac: on FreeBSD, look in the various places that libdb might
authorRichard Kettlewell <richard@heceptor.anjou.terraraq.org.uk>
Sun, 23 Mar 2008 17:31:30 +0000 (17:31 +0000)
committerRichard Kettlewell <richard@heceptor.anjou.terraraq.org.uk>
Sun, 23 Mar 2008 17:31:30 +0000 (17:31 +0000)
get installed.

README.developers: (probably partial) list of packages required to build
and test DisOrder on FreeBSD.

README.developers
configure.ac

index 3302f5a..ae84515 100644 (file)
@@ -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:
index 84dffd9..2607d91 100644 (file)
@@ -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])