X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;ds=sidebyside;f=bacula%2Fautoconf%2Fconfigure.in;h=7044b0257b822d897db29921bd85af6b42c0681a;hb=aeffd73445e2f27dc34021a9546d98e7b61eb5fb;hp=95fb2c2f3b621fe5a402aab93b420817f0e60a63;hpb=9ac993a748f26f22f3aa3062a6d64a3528fac767;p=bacula%2Fbacula diff --git a/bacula/autoconf/configure.in b/bacula/autoconf/configure.in index 95fb2c2f3b..7044b0257b 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) @@ -1003,7 +1028,7 @@ AC_SUBST(piddir) # ------------------------------------ # Where to place subsys "lock file" # ------------------------------------ -ubsysdir=/var/run/subsys +subsysdir=/var/run/subsys if test -d /var/run/subsys; then subsysdir=/var/run/subsys elif test -d /var/lock/subsys; then @@ -1899,7 +1924,7 @@ freebsd) largefile_support="yes" ;; hpux) - PSCMD="UNIX95=1 ps -e -o pid,comm" + PSCMD="UNIX95=1; ps -e -o pid,comm" CFLAGS="${CFLAGS} -D_XOPEN_SOURCE_EXTENDED=1" DISTVER=`uname -r` TAPEDRIVE="/dev/rmt/0hnb" @@ -2179,9 +2204,20 @@ AC_OUTPUT([autoconf/Make.common \ src/tools/Makefile \ po/Makefile.in \ $PFILES ], - [(echo "Doing make of dependencies"; ${MAKE:-make} depend;) ] + [ ] ) +if test "${support_bat}" = "yes" ; then + cd src/qt-console + chmod 755 install_conf_file build-depkgs-qt-console + echo "Creating bat Makefile" + qmake + cd ${BUILD_DIR} +fi + +echo "Doing make of dependencies" +${MAKE:-make} depend + cd scripts chmod 755 startmysql stopmysql bacula startit stopit btraceback mtx-changer chmod 755 dvd-handler dvd-simulator @@ -2214,13 +2250,6 @@ chmod 755 $c/mysql chmod 755 src/win32/build-depkgs-mingw32 -if test "${support_bat}" = "yes" ; then - cd src/qt-console - a=`pwd` - chmod 755 install_conf_file build-depkgs-qt-console - echo "Creating bat Makefile" - qmake -fi if test "x$ac_cv_sys_largefile_CFLAGS" != "xno" ; then @@ -2320,7 +2349,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}