Changeset c015b3 for configure.ac


Ignore:
Timestamp:
Dec 28, 2011, 3:24:57 PM (14 years ago)
Author:
Frederik Heber <heber@…>
Branches:
Action_Thermostats, Add_AtomRandomPerturbation, Add_FitFragmentPartialChargesAction, Add_RotateAroundBondAction, Add_SelectAtomByNameAction, Added_ParseSaveFragmentResults, AddingActions_SaveParseParticleParameters, Adding_Graph_to_ChangeBondActions, Adding_MD_integration_tests, Adding_ParticleName_to_Atom, Adding_StructOpt_integration_tests, AtomFragments, Automaking_mpqc_open, AutomationFragmentation_failures, Candidate_v1.5.4, Candidate_v1.6.0, Candidate_v1.6.1, ChangeBugEmailaddress, ChangingTestPorts, ChemicalSpaceEvaluator, CombiningParticlePotentialParsing, Combining_Subpackages, Debian_Package_split, Debian_package_split_molecuildergui_only, Disabling_MemDebug, Docu_Python_wait, EmpiricalPotential_contain_HomologyGraph, EmpiricalPotential_contain_HomologyGraph_documentation, Enable_parallel_make_install, Enhance_userguide, Enhanced_StructuralOptimization, Enhanced_StructuralOptimization_continued, Example_ManyWaysToTranslateAtom, Exclude_Hydrogens_annealWithBondGraph, FitPartialCharges_GlobalError, Fix_BoundInBox_CenterInBox_MoleculeActions, Fix_ChargeSampling_PBC, Fix_ChronosMutex, Fix_FitPartialCharges, Fix_FitPotential_needs_atomicnumbers, Fix_ForceAnnealing, Fix_IndependentFragmentGrids, Fix_ParseParticles, Fix_ParseParticles_split_forward_backward_Actions, Fix_PopActions, Fix_QtFragmentList_sorted_selection, Fix_Restrictedkeyset_FragmentMolecule, Fix_StatusMsg, Fix_StepWorldTime_single_argument, Fix_Verbose_Codepatterns, Fix_fitting_potentials, Fixes, ForceAnnealing_goodresults, ForceAnnealing_oldresults, ForceAnnealing_tocheck, ForceAnnealing_with_BondGraph, ForceAnnealing_with_BondGraph_continued, ForceAnnealing_with_BondGraph_continued_betteresults, ForceAnnealing_with_BondGraph_contraction-expansion, FragmentAction_writes_AtomFragments, FragmentMolecule_checks_bonddegrees, GeometryObjects, Gui_Fixes, Gui_displays_atomic_force_velocity, ImplicitCharges, IndependentFragmentGrids, IndependentFragmentGrids_IndividualZeroInstances, IndependentFragmentGrids_IntegrationTest, IndependentFragmentGrids_Sole_NN_Calculation, JobMarket_RobustOnKillsSegFaults, JobMarket_StableWorkerPool, JobMarket_unresolvable_hostname_fix, MoreRobust_FragmentAutomation, ODR_violation_mpqc_open, PartialCharges_OrthogonalSummation, PdbParser_setsAtomName, PythonUI_with_named_parameters, QtGui_reactivate_TimeChanged_changes, Recreated_GuiChecks, Rewrite_FitPartialCharges, RotateToPrincipalAxisSystem_UndoRedo, SaturateAtoms_findBestMatching, SaturateAtoms_singleDegree, StoppableMakroAction, Subpackage_CodePatterns, Subpackage_JobMarket, Subpackage_LinearAlgebra, Subpackage_levmar, Subpackage_mpqc_open, Subpackage_vmg, Switchable_LogView, ThirdParty_MPQC_rebuilt_buildsystem, TrajectoryDependenant_MaxOrder, TremoloParser_IncreasedPrecision, TremoloParser_MultipleTimesteps, TremoloParser_setsAtomName, Ubuntu_1604_changes, stable
Children:
db1a72
Parents:
f3b8a5
git-author:
Frederik Heber <heber@…> (11/11/11 12:16:24)
git-committer:
Frederik Heber <heber@…> (12/28/11 15:24:57)
Message:

Added enable-switches for Qt-based GUI and python module and scripts.

  • note that encapsulation in AS_IF is absolutely required as otherwise lateron checks will produce strange errors as required checks reside in an unseen if ..; then branch, initiated by AC_PROG() ... or other contained macros.
  • Added AM_CONDITIIONAL's to modify Makefile.ams depending on above enable switches.
  • AM_COND_IF controls whether certain Makefile's are produced or not.
  • moved Python regression tests into own folder to control whether they are executed or not.
  • molecuildergui and libMolecuilderQtUI are only compiled with qtgui enabled.
  • same for pyMoleCuilder and its scripts only when python enabled.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • configure.ac

    rf3b8a5 rc015b3  
    2121AC_PROG_INSTALL
    2222
     23dnl Check if we have enable python
     24# python module
     25AC_MSG_CHECKING(whether to enable python module)
     26AC_ARG_ENABLE(python, [  --enable-python=[no/yes] turn on python module
     27                     [default=yes]],, enable_python=$enableval)
     28AC_MSG_RESULT($enable_python)
     29AS_IF([test x"$enable_python" != x"no"],[
     30  # Python (for boost::python)
     31  AM_PATH_PYTHON([2.2])
     32  AX_PYTHON
     33  AC_DEFINE(HAVE_PYTHON,1, ["Build python module and scripts."])
     34])
     35AM_CONDITIONAL([CONDPYTHON], [test x"$enable_python" != x"no"])
     36AC_SUBST(HAVE_PYTHON)
     37
     38dnl Check if we have enable qtgui
    2339# Qt programs
     40have_qtgui_path=""
    2441AC_ARG_WITH([Qt-bin],
    2542        [AC_HELP_STRING([--with-Qt-bin], [give path to Qt binaries])],
    26         echo "Looking for binaries in $withval ... "
    27         [AC_PATH_PROGS([QT_MOC],
     43        [have_qtgui_path=$withval
     44        enable_qtgui="yes"],,)
     45
     46AC_MSG_CHECKING(whether to enable Qt-based GUI)
     47AC_ARG_ENABLE(qtgui, [  --enable-qtgui=[no/yes] turn on Qt GUI compilation
     48                     [default=yes]],, enable_qtgui=$enableval)
     49AC_MSG_RESULT($enable_qtgui)
     50AS_IF([test x"$enable_qtgui" != x"no"],[
     51        AC_PATH_PROGS([QT_MOC],
    2852                [moc-qt4 moc],
    2953                [AC_MSG_ERROR(["Qts moc not found, please use --with-Qt-bin."])],
    30                 [$withval]
     54                [$have_qtgui_path]
    3155        )
    3256        AC_PATH_PROGS([QT_UIC],
    3357                [uic-qt4 uic],
    3458                [AC_MSG_ERROR(["Qts uic not found, please use --with-Qt-bin."])],
    35                 [$withval]
    36         )],
    37         [AC_PATH_PROGS([QT_MOC],
    38                 [moc-qt4 moc],
    39                 [AC_MSG_ERROR(["Qts moc not found, please use --with-Qt-bin."])]
     59                [$have_qtgui_path]
    4060        )
    41         AC_PATH_PROGS([QT_UIC],
    42                 [uic-qt4 uic],
    43                 [AC_MSG_ERROR(["Qts uic not found, please use --with-Qt-bin."])]
    44         )]
    45 )
    46 PKG_CHECK_MODULES([QT], [QtCore QtGui Qt3D], [
    47 ])
    48 AC_SUBST([QT_CFLAGS])
    49 AC_SUBST([QT_LIBS])
     61        PKG_CHECK_MODULES([QT], [QtCore QtGui Qt3D], [
     62        ])
     63        AC_SUBST([QT_CFLAGS])
     64        AC_SUBST([QT_LIBS])
     65        AC_DEFINE(HAVE_QTGUI,1, ["Build Qt-based GUI"])
     66])
     67AM_CONDITIONAL([CONDQTGUI], [test x"$enable_qtgui" != x"no"])
     68AC_SUBST(HAVE_QTGUI)
    5069
    5170# use doxygen
     
    5473DX_PDF_FEATURE(OFF)
    5574DX_INIT_DOXYGEN(MoleCuilder, Doxyfile, ${docdir})
    56 
    57 # Python (for boost::python)
    58 AM_PATH_PYTHON([2.2])
    59 AX_PYTHON
    6075
    6176# use libtool
     
    7489AC_MSG_CHECKING(whether to enable debugging)
    7590have_debug="no"
    76 AC_MSG_RESULT($have_debug)
    7791AC_ARG_ENABLE(debug, [  --enable-debug=[no/yes/full] turn on debugging
    7892                     [default=no]],, enable_debug=$enableval)
     
    93107  have_debug="no"
    94108fi
     109AC_MSG_RESULT($have_debug)
    95110AC_SUBST(HAVE_DEBUG)
    96111
     
    132147BOOST_FILESYSTEM
    133148BOOST_PROGRAM_OPTIONS
    134 BOOST_PYTHON
     149AS_IF([test x"$enable_python" != x"no"], [BOOST_PYTHON])
    135150BOOST_SERIALIZATION
    136151BOOST_THREADS
     
    233248        tests/regression/atlocal
    234249        tests/regression/Makefile])
    235 AC_CONFIG_FILES([tests/regression/Python/run], [chmod +x tests/regression/Python/run])
    236250AC_CONFIG_FILES([tests/regression/molecuilder], [chmod +x tests/regression/molecuilder])
    237251
     
    255269        src/unittests/Makefile
    256270])
    257 AC_CONFIG_FILES([utils/boxmaker.py:utils/boxmaker.py.in], [chmod +x utils/boxmaker.py])
    258 AC_CONFIG_FILES([utils/python_wrapper:utils/python_wrapper.in], [chmod +x utils/python_wrapper])
     271# produce python scripts and tests only when python's present
     272AM_COND_IF([CONDPYTHON],[
     273        AC_CONFIG_TESTDIR([tests/Python])
     274        AC_CONFIG_FILES([utils/boxmaker.py:utils/boxmaker.py.in], [chmod +x utils/boxmaker.py])
     275        AC_CONFIG_FILES([utils/python_wrapper:utils/python_wrapper.in], [chmod +x utils/python_wrapper])
     276        AC_CONFIG_FILES([tests/Python/run], [chmod +x tests/Python/run])
     277        AC_CONFIG_FILES([tests/Python/atlocal])
     278        AC_CONFIG_FILES([tests/Python/Makefile])
     279])
    259280AC_OUTPUT
Note: See TracChangeset for help on using the changeset viewer.