From d929f0d0aaa76c7333af5461ee5a9f9a9df50100 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Tue, 3 Jan 2012 19:55:55 +0100 Subject: [PATCH] Fix bug #1802 configure code to detect LZO is broken --- bacula/autoconf/configure.in | 43 ++++++++++++++++++++---------------- 1 file changed, 24 insertions(+), 19 deletions(-) diff --git a/bacula/autoconf/configure.in b/bacula/autoconf/configure.in index afeaf9cfa8..8a8f06d1a6 100644 --- a/bacula/autoconf/configure.in +++ b/bacula/autoconf/configure.in @@ -2435,14 +2435,19 @@ AC_SUBST(ZLIBS) dnl dnl Check for lzo dnl -AC_CHECK_HEADERS(lzo/lzoconf.h) -AC_CHECK_HEADERS(lzo/lzo1x.h) -AC_CHECK_LIB(lzo2, lzo1x_1_compress, [LZOLIBS="-llzo2"]) have_lzo=no -if test x$LZOLIBS = x-llzo2; then - AC_DEFINE(HAVE_LZO) - have_lzo=yes -fi +AC_CHECK_HEADER(lzo/lzoconf.h, +[ + AC_CHECK_HEADER(lzo/lzo1x.h, + [ + AC_CHECK_LIB(lzo2, lzo1x_1_compress, + [ + LZOLIBS="-llzo2" + AC_DEFINE(HAVE_LZO,1,[Define to 1 if you have LZO compression]) + have_lzo=yes + ]) + ]) +]) AC_SUBST(LZOLIBS) dnl @@ -3133,22 +3138,22 @@ AC_ARG_WITH(systemd, AC_HELP_STRING([--with-systemd@<:@=UNITDIR@:>@], [Include systemd support. UNITDIR is where systemd system .service files are located, default is to ask systemctl.]), [ if test "$withval" != "no"; then - if test "$withval" = "yes"; then - SYSTEMD_UNITDIR="`systemctl show | grep UnitPath | cut -d " " -f2`" - else - SYSTEMD_UNITDIR="${withval}" - fi + if test "$withval" = "yes"; then + SYSTEMD_UNITDIR="`systemctl show | grep UnitPath | cut -d " " -f2`" + else + SYSTEMD_UNITDIR="${withval}" + fi PFILES="${PFILES} \ - platforms/systemd/Makefile \ - platforms/systemd/bacula-dir.service \ - platforms/systemd/bacula-fd.service \ - platforms/systemd/bacula-sd.service" - AC_DEFINE(HAVE_SYSTEMD, 1, [Define to 1 if systemd support should be enabled]) - AC_MSG_RESULT(yes) + platforms/systemd/Makefile \ + platforms/systemd/bacula-dir.service \ + platforms/systemd/bacula-fd.service \ + platforms/systemd/bacula-sd.service" + AC_DEFINE(HAVE_SYSTEMD, 1, [Define to 1 if systemd support should be enabled]) + AC_MSG_RESULT(yes) support_systemd="yes" else - AC_MSG_RESULT(no) + AC_MSG_RESULT(no) support_systemd="no" fi ],[ -- 2.39.5