X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/disorder/blobdiff_plain/70f47acd6b573060c23eafe8ec290bd9b6ca2e01..7a4c02b06ea54d59bb3b724119542726da830ddd:/configure.ac diff --git a/configure.ac b/configure.ac index c167d8d..22c47f6 100644 --- a/configure.ac +++ b/configure.ac @@ -85,8 +85,13 @@ case "$host" in *-freebsd* ) AC_MSG_RESULT([FreeBSD]) want_server=yes + # Ports install to /usr/local but the compiler stupidly doesn't look + # there by default LDFLAGS="${LDFLAGS} -L/usr/local/lib" - CPPFLAGS="${CPPFLAGS} -I/usr/local/include" + CPPFLAGS="${CPPFLAGS} -isystem /usr/local/include" + # libdb installs elsewhere again + LDFLAGS="${LDFLAGS} -L/usr/local/lib/db44" + CPPFLAGS="${CPPFLAGS} -isystem /usr/local/include/db44" ;; * ) AC_MSG_RESULT([unknown, winging it]) @@ -150,6 +155,20 @@ AC_DISABLE_STATIC AC_PROG_LIBTOOL +AC_CACHE_CHECK([for GNU sed],[rjk_cv_gnused],[ + rjk_cv_gnused="not found" + for candidate in sed gsed; do + if $candidate --version >/dev/null 2>&1; then + rjk_cv_gnused=$candidate + fi + done +]) +GNUSED="${GNUSED:-$rjk_cv_gnused}" +if test "$GNUSED" = "not found"; then + AC_MSG_ERROR([GNU sed is required to build this program]) +fi +AC_SUBST([GNUSED]) + missing_libraries="" missing_headers="" missing_functions="" @@ -211,6 +230,9 @@ if test $want_server = yes; then [AC_SUBST(LIBFLAC,[-lFLAC])], [missing_libraries="$missing_libraries libFLAC"]) fi +AC_CHECK_LIB([pthread], [pthread_create], + [AC_SUBST(LIBPTHREAD,[-lpthread])], + [missing_libraries="$missing_libraries libpthread"]) if test $want_gtk = yes; then AM_PATH_GLIB_2_0([],[],[missing_libraries="$missing_libraries libglib"]) @@ -383,7 +405,7 @@ if test $want_server = yes; then #if DB_VERSION_MAJOR < 4 # error inadequate db version #endif - #if DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR < 2 + #if DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR <= 2 # error inadequate db version #endif ],