Changeset 10430 for trunk


Ignore:
Timestamp:
04/20/11 17:17:12 (14 years ago)
Author:
tbretz
Message:
Added checks for root.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/configure.ac

    r10402 r10430  
    33######################################################################
    44
     5#[AC_]PACKAGE_NAME
     6#[AC_]PACKAGE_TARNAME
     7#[AC_]PACKAGE_VERSION
     8#[AC_]PACKAGE_STRING
     9#[AC_]PACKAGE_BUGREPORT
    510AC_INIT([FACT++],[1.0],[thomas.bretz@epfl.ch],[FACTpp],[http://hello.example.com/])
    611AC_PREREQ([2.65])
     
    140145# Needed to compile FACT++
    141146AX_BOOST_BASE([1.40], [],
    142    [
    143       echo "Error! The boost C++ libraries are not properly installed."
    144       exit -1
    145    ]
     147   AC_MSG_ERROR([The boost C++ libraries (>=1.40) are not properly installed.])
    146148)
    147149
     
    198200   [], [QT4_DO_IT_ALL])
    199201
    200 #AC_CHECK_PROG(QT4_MOC, moc, moc,
    201 #   AC_MSG_ERROR([QT4 executable 'moc' not found in path.]))
    202 #AC_CHECK_PROG(QT4_UIC, uic, uic,
    203 #   AC_MSG_ERROR([QT4 executable 'moc' not found in path.]))
    204 
    205202######################################################################
    206203# ROOT SUPPORT
    207204######################################################################
    208205
    209 # ROOT_PATH([5.12/00, [ACTION-IF-FOUND, [ACTION-IF-NOT-FOUND]]])
    210 # ROOT_PATH([5.12/00])
    211 # ROOT_PATH(3.03/05, , AC_MSG_ERROR(Your ROOT version is too old))
    212 # ROOT_PATH(, AC_DEFINE([HAVE_ROOT]))
    213 
    214 # ROOTCONF           full path to root-config
    215 # ROOTEXEC           full path to root
    216 # ROOTCINT           full path to rootcint
    217 # ROOTLIBDIR         Where the ROOT libraries are
    218 # ROOTINCDIR         Where the ROOT headers are
    219 # ROOTETCDIR         Where the ROOT configuration is
    220 # ROOTCFLAGS         Extra compiler flags
    221 # ROOTLIBS           ROOT basic libraries
    222 # ROOTGLIBS          ROOT basic + GUI libraries
    223 # ROOTAUXLIBS        Auxilary libraries and linker flags for ROOT
    224 # ROOTAUXCFLAGS      Auxilary compiler flags
    225 # ROOTRPATH          Same as ROOTLIBDIR
    226 
     206AC_ARG_WITH([root],
     207   [AS_HELP_STRING([--without-root], [Disable root, i.e. disable gui support.])],
     208   [], [ROOT_PATH([5.12/00])]
     209)
     210
     211HAVE_ROOT_QT=no
     212
     213if test "$ROOTEXEC" != no ;
     214then
     215
     216   ROOTCPPFLAGS=$ROOTCFLAGS" "$ROOTAUXCFLAGS
     217   ROOTLDFLAGS="-L"$ROOTLIBDIR" "$ROOTGLIBS" -lGQt "$ROOTAUXLIBS
     218
     219   ROOT_FEATURE([qt], [HAVE_ROOT_QT=yes])
     220
     221   AC_SUBST(ROOTCPPFLAGS)
     222   AC_SUBST(ROOTLDFLAGS)
     223
     224fi
    227225
    228226######################################################################
     
    269267AM_CONDITIONAL(HAS_COLORGCC,  [test "$GCC" = colorgcc])
    270268AM_CONDITIONAL(HAS_QT4,       [test -n "$QT4_VERSION"])
     269AM_CONDITIONAL(HAS_ROOT,      [test "$ROOTEXEC" != no])
     270AM_CONDITIONAL(HAS_ROOT_QT,   [test "$HAVE_ROOT_QT" = yes])
     271AM_CONDITIONAL(HAS_GUI,       [test "$QT4_VERSION" -a "$HAVE_ROOT_QT" = yes])
    271272
    272273##########################################################################
     
    304305)
    305306AM_COND_IF(HAS_QT4,
    306    AC_MSG_NOTICE([ GUI support enabled    / QT4 toolkit      found: yes]),
    307    AC_MSG_NOTICE([ GUI support enabled    / QT4 toolkit      found: no])
    308 )
     307   AC_MSG_NOTICE([ QT4 support enabled    /  QT4 toolkit     found: yes]),
     308   AC_MSG_NOTICE([ QT4 support enabled    /  QT4 toolkit     found: no])
     309)
     310AC_MSG_NOTICE([ ROOT support enabled   /  root >= 5.12/00 found: $ROOTEXEC])
     311AC_MSG_NOTICE([ ROOT built with --with-qt                 found: $HAVE_ROOT_QT])
    309312AM_COND_IF(HAS_QT4, [
    310313   AC_MSG_NOTICE()
     
    320323   AC_MSG_NOTICE([ UIC4 = $UIC4])
    321324   AC_MSG_NOTICE([ RCC4 = $RCC4])
     325],[])
     326AM_COND_IF(HAS_QT4, [
     327   AC_MSG_NOTICE()
     328   AC_MSG_NOTICE(--------------------------------------------------------------------)
     329   AC_MSG_NOTICE()
     330   AC_MSG_NOTICE([ ROOTVERSION   = $ROOTVERSION])
     331   AC_MSG_NOTICE()
     332   AC_MSG_NOTICE([ ROOTEXEC      = $ROOTEXEC])
     333   AC_MSG_NOTICE([ ROOTCONF      = $ROOTCONF])
     334   AC_MSG_NOTICE([ ROOTCINT      = $ROOTCINT])
     335   AC_MSG_NOTICE([ ROOTCPPFLAGS  = $ROOTCPPFLAGS])
     336   AC_MSG_NOTICE([ ROOTLDFLAGS   = $ROOTLDFLAGS])
    322337],[])
    323338AC_MSG_NOTICE()
     
    354369AC_MSG_NOTICE([ man:           build all buildable documentation])
    355370AC_MSG_NOTICE()
    356 
    357 #[AC_]PACKAGE_NAME
    358 #[AC_]PACKAGE_TARNAME
    359 #[AC_]PACKAGE_VERSION
    360 #[AC_]PACKAGE_STRING
    361 #[AC_]PACKAGE_BUGREPORT
     371AC_MSG_NOTICE(--------------------------------------------------------------------)
     372AC_MSG_NOTICE()
     373AM_COND_IF(HAS_ROOT, 
     374   [AM_COND_IF(HAS_ROOT_QT, [],
     375      AC_MSG_WARN([ root found but it was built without the --with-qt option])
     376   )]
     377)
     378AM_COND_IF(HAS_GUI, [],
     379      AC_MSG_WARN([ Either QT4 or qt-root is missing: GUI disabled!])
     380)
     381AC_MSG_NOTICE()
Note: See TracChangeset for help on using the changeset viewer.