From d57d9c45f8f9cfd61174cdf20683ff8b94b6cbe7 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Sat, 14 Jul 2007 13:08:57 +0000 Subject: [PATCH] kes Implement ./configure search for qwt libraries. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@5178 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/autoconf/configure.in | 41 +++++++++++++++++++++++++------- bacula/configure | 46 +++++++++++++++++++++++++++++------- bacula/src/version.h | 4 ++-- 3 files changed, 73 insertions(+), 18 deletions(-) diff --git a/bacula/autoconf/configure.in b/bacula/autoconf/configure.in index b8d7156f89..dd4264c5d8 100644 --- a/bacula/autoconf/configure.in +++ b/bacula/autoconf/configure.in @@ -273,27 +273,52 @@ fi # # If bat is enabled, we need the qwt library got_qwt=no +QWT_INC= +QWT_LDFLAGS= if test x$support_bat = xyes; then + AC_MSG_CHECKING(for qwt support) AC_ARG_WITH(qwt, [ --with-qwt@<:@=DIR@:>@ specify qwt library directory], [ case "$with_qwt" in - no) : ;; + no) + ;; yes|*) if test -f ${with_qwt}/include/qwt.h; then QWT_INC="${with_qwt}/include" QWT_LDFLAGS="-L${with_qwt}/lib" - else - echo " " - echo "qwt.h not found. bat turned off ..." - echo " " - BAT_DIR= - support_bat=no fi ;; esac ] ) +# +# Search in standard places, or --with-qwt not specified +# + if test x$QWT_INC = x; then + for root in /usr /usr/local; do + for ver in qwt qwt5; do + if test -f ${root}/include/${ver}/qwt.h; then + QWT_INC="${root}/include/${ver}" + if test -d ${root}/lib64/; then + QWT_LDFLAGS="-L${root}/lib64" + else + QWT_LDFLAGS="-L${root}/lib" + fi + got_qwt=yes + break; + fi + done + done + fi + if test x$QWT_INC = x; then + AC_MSG_RESULT(no) + AC_MSG_ERROR(Unable to find qwt package needed by bat) + BAT_DIR= + support_bat=no + else + AC_MSG_RESULT(yes) + fi fi AC_SUBST(BAT_DIR) @@ -2320,7 +2345,7 @@ Configuration on `date`: Encryption support: ${support_crypto} ZLIB support: ${have_zlib} enable-smartalloc: ${support_smartalloc} - enable-bat: ${support_bat} + bat support: ${support_bat} ${QWT_LDFLAGS} enable-gnome: ${support_gnome} ${gnome_version} enable-bwx-console: ${support_wx_console} ${wx_version} enable-tray-monitor: ${support_tray_monitor} diff --git a/bacula/configure b/bacula/configure index fb139b2f61..01602b2fb1 100755 --- a/bacula/configure +++ b/bacula/configure @@ -14712,23 +14712,22 @@ fi # # If bat is enabled, we need the qwt library got_qwt=no +QWT_INC= +QWT_LDFLAGS= if test x$support_bat = xyes; then + { echo "$as_me:$LINENO: checking for qwt support" >&5 +echo $ECHO_N "checking for qwt support... $ECHO_C" >&6; } # Check whether --with-qwt was given. if test "${with_qwt+set}" = set; then withval=$with_qwt; case "$with_qwt" in - no) : ;; + no) + ;; yes|*) if test -f ${with_qwt}/include/qwt.h; then QWT_INC="${with_qwt}/include" QWT_LDFLAGS="-L${with_qwt}/lib" - else - echo " " - echo "qwt.h not found. bat turned off ..." - echo " " - BAT_DIR= - support_bat=no fi ;; esac @@ -14736,6 +14735,37 @@ if test "${with_qwt+set}" = set; then fi +# +# Search in standard places, or --with-qwt not specified +# + if test x$QWT_INC = x; then + for root in /usr /usr/local; do + for ver in qwt qwt5; do + if test -f ${root}/include/${ver}/qwt.h; then + QWT_INC="${root}/include/${ver}" + if test -d ${root}/lib64/; then + QWT_LDFLAGS="-L${root}/lib64" + else + QWT_LDFLAGS="-L${root}/lib" + fi + got_qwt=yes + break; + fi + done + done + fi + if test x$QWT_INC = x; then + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + { { echo "$as_me:$LINENO: error: Unable to find qwt package needed by bat" >&5 +echo "$as_me: error: Unable to find qwt package needed by bat" >&2;} + { (exit 1); exit 1; }; } + BAT_DIR= + support_bat=no + else + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + fi fi @@ -35979,7 +36009,7 @@ Configuration on `date`: Encryption support: ${support_crypto} ZLIB support: ${have_zlib} enable-smartalloc: ${support_smartalloc} - enable-bat: ${support_bat} + bat support: ${support_bat} ${QWT_LDFLAGS} enable-gnome: ${support_gnome} ${gnome_version} enable-bwx-console: ${support_wx_console} ${wx_version} enable-tray-monitor: ${support_tray_monitor} diff --git a/bacula/src/version.h b/bacula/src/version.h index 10b9545523..fea4a0e17c 100644 --- a/bacula/src/version.h +++ b/bacula/src/version.h @@ -4,8 +4,8 @@ #undef VERSION #define VERSION "2.1.27" -#define BDATE "13 July 2007" -#define LSMDATE "13Jul07" +#define BDATE "14 July 2007" +#define LSMDATE "14Jul07" #define PROG_COPYRIGHT "Copyright (C) %d-2007 Free Software Foundation Europe e.V.\n" #define BYEAR "2007" /* year for copyright messages in progs */ -- 2.39.5