]> git.sur5r.net Git - bacula/bacula/commitdiff
kes Implement ./configure search for qwt libraries.
authorKern Sibbald <kern@sibbald.com>
Sat, 14 Jul 2007 13:08:57 +0000 (13:08 +0000)
committerKern Sibbald <kern@sibbald.com>
Sat, 14 Jul 2007 13:08:57 +0000 (13:08 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@5178 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/autoconf/configure.in
bacula/configure
bacula/src/version.h

index b8d7156f89b2ac29680673749a1ab418c25ccd9d..dd4264c5d8c2b184e8290f41f4add0965e7967e8 100644 (file)
@@ -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}
index fb139b2f61d5ea2d14a0c4fefe47a015147e677b..01602b2fb11369b5df6e82aae028baa724386b33 100755 (executable)
 #
 #  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}
index 10b95455236b6d4039ce7eee8f3cb5fd90decd82..fea4a0e17c9767ef3469f56ef1957dca2f16a954 100644 (file)
@@ -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 */