Changeset c015b3


Ignore:
Timestamp:
Dec 28, 2011, 3:24:57 PM (13 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.
Files:
6 added
4 deleted
8 edited
14 moved

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
  • src/Actions/Makefile.am

    rf3b8a5 rc015b3  
    427427#libMolecuilderActionPython_la_includedir = $(includedir)/MoleCuilder/Actions/
    428428
    429 BUILT_SOURCES += AllActionHeaders.hpp AllActionPython.hpp
     429BUILT_SOURCES += AllActionHeaders.hpp
     430if CONDPYTHON
     431BUILT_SOURCES += AllActionPython.hpp
     432endif
    430433#$(ACTIONPYTHONSOURCE)
    431434
     
    489492        echo "#endif /* ALLACTIONHEADERS_HPP_ */" >>$@;
    490493
     494MOSTLYCLEANFILES += \
     495        AllActionHeaders.hpp
     496
     497if CONDPYTHON
    491498AllActionPython.hpp: $(ACTIONPROTOTYPESHEADER)
    492499        echo "#ifndef ALLACTIONPYTHON_HPP_" >$@; \
     
    499506        echo "#endif /* ALLACTIONPYTHON_HPP_ */" >>$@;
    500507
    501 
    502508MOSTLYCLEANFILES += \
    503         AllActionHeaders.hpp \
    504509        AllActionPython.hpp
    505 #$(ACTIONPYTHONSOURCE)
     510
     511endif
  • src/Makefile.am

    rf3b8a5 rc015b3  
    253253libmenu_a_SOURCES = ${UISOURCE} ${UIHEADER}
    254254noinst_LIBRARIES = libmenu.a
    255 bin_PROGRAMS += molecuilder molecuildergui joiner analyzer
     255bin_PROGRAMS += molecuilder joiner analyzer
    256256EXTRA_PROGRAMS = unity
    257257
     
    270270        ${top_srcdir}/data/molecules/*.pdb
    271271
    272 
     272if CONDPYTHON
    273273pyexec_LTLIBRARIES += pyMoleCuilder.la
    274274pyMoleCuilder_la_SOURCES = \
     
    286286        ${CodePatterns_LIBS} \
    287287        -l$(PYTHON_LIB)
     288endif
    288289
    289290
     
    308309
    309310#Stuff for building the GUI using Qt
     311if CONDQTGUI
     312bin_PROGRAMS += molecuildergui
    310313molecuildergui_SOURCES = \
    311314        builder.cpp \
     
    327330        $(BOOST_FILESYSTEM_LIBS) \
    328331        $(GUI_LIBS)
     332endif
    329333
    330334joiner_SOURCES = Fragmentation/joiner.cpp Fragmentation/datacreator.cpp Fragmentation/datacreator.hpp
  • src/UIElements/Makefile.am

    rf3b8a5 rc015b3  
    250250  UIElements/Qt4/Pipe/QtQueryListPipe.hpp
    251251
    252 lib_LTLIBRARIES += libMolecuilderUI.la \
    253   libMolecuilderQtUI.la
     252lib_LTLIBRARIES += libMolecuilderUI.la
    254253libMolecuilderUI_la_includedir = $(includedir)/MoleCuilder/UIElements/
    255 libMolecuilderQtUI_la_includedir = $(includedir)/MoleCuilder/UIElements/
    256254libMolecuilderUI_la_CPPFLAGS = ${BOOST_CPPFLAGS} ${CodePatterns_CFLAGS}
    257 libMolecuilderQtUI_la_CPPFLAGS = ${QT_CFLAGS} ${GLU_CXXFLAGS} ${BOOST_CPPFLAGS} ${CodePatterns_CFLAGS}
    258255libMolecuilderUI_la_LDFLAGS = $(AM_LDFLAGS) $(BOOST_FILESYSTEM_LDFLAGS) $(BOOST_PROGRAM_OPTIONS_LDFLAGS) $(BOOST_RANDOM_LDFLAGS) $(BOOST_SYSTEM_LDFLAGS) $(BOOST_THREAD_LDFLAGS)
    259 libMolecuilderQtUI_la_LDFLAGS = $(AM_LDFLAGS) $(BOOST_FILESYSTEM_LDFLAGS) $(BOOST_PROGRAM_OPTIONS_LDFLAGS) $(BOOST_RANDOM_LDFLAGS) $(BOOST_SYSTEM_LDFLAGS) $(BOOST_THREAD_LDFLAGS)
     256
    260257# NOTE: ActionPrototypes BEFORE Actions!
    261258# this is to ensure that static Action prototypes are instantiated after
     
    280277        $(BOOST_SYSTEM_LDFLAGS) $(BOOST_SYSTEM_LIBS)
    281278
    282 libMolecuilderQtUI_la_LIBADD = \
    283         ${QT_LIBS} \
    284         -lQtOpenGL \
    285         ${GLU_LIBS}
    286 
    287 
    288279nobase_libMolecuilderUI_la_include_HEADERS = ${UIHEADER}
    289 nobase_libMolecuilderQtUI_la_include_HEADERS = ${QTUIHEADER} $(QTUIUI_UIFILES)
    290280
    291281## Define the source file list for the "libexample-@MOLECUILDER_API_VERSION@.la"
     
    298288## which are already listed elsewhere in a _HEADERS variable assignment.
    299289libMolecuilderUI_la_SOURCES = ${UISOURCE}
    300 libMolecuilderQtUI_la_SOURCES = ${QTUISOURCE}
    301 nodist_libMolecuilderQtUI_la_SOURCES =
    302290
    303291## Instruct libtool to include ABI version information in the generated shared
     
    305293## that all version information is kept in one place.
    306294libMolecuilderUI_la_LDFLAGS += -version-info $(MOLECUILDER_SO_VERSION)
    307 libMolecuilderQtUI_la_LDFLAGS += -version-info $(MOLECUILDER_SO_VERSION)
    308295
    309296## The generated configuration header is installed in its own subdirectory of
     
    319306## shipped with the source tarball.
    320307#libMolecuilderUI_libincludedir = $(libdir)/MoleCuilder/include
    321 #libMolecuilderQtUI_libincludedir = $(libdir)/MoleCuilder/include
    322308#nodist_libMolecuilderUI_libinclude_HEADERS = $(top_builddir)/libmolecuilder_config.h
    323 #nodist_libMolecuilderQtUI_libinclude_HEADERS = $(top_builddir)/libmolecuilder_config.h
    324309
    325310## Install the generated pkg-config file (.pc) into the expected location for
     
    330315#pkgconfig_DATA = $(top_builddir)/MoleCuilder.pc
    331316
    332 # This is the old stuff from branch molecuilderGUI which does not work
    333 #%.h: %.ui
    334 #       $(UIC) -o $@ $<
    335 #       
    336 #%.cpp: %.ui
    337 #       $(UIC) -o $@ -impl $*.h $<
     317if CONDQTGUI
     318lib_LTLIBRARIES += libMolecuilderQtUI.la
     319
     320libMolecuilderQtUI_la_includedir = $(includedir)/MoleCuilder/UIElements/
     321libMolecuilderQtUI_la_CPPFLAGS = ${QT_CFLAGS} ${GLU_CXXFLAGS} ${BOOST_CPPFLAGS} ${CodePatterns_CFLAGS}
     322libMolecuilderQtUI_la_LDFLAGS = $(AM_LDFLAGS) $(BOOST_FILESYSTEM_LDFLAGS) $(BOOST_PROGRAM_OPTIONS_LDFLAGS) $(BOOST_RANDOM_LDFLAGS) $(BOOST_SYSTEM_LDFLAGS) $(BOOST_THREAD_LDFLAGS)
     323
     324libMolecuilderQtUI_la_LIBADD = \
     325        ${QT_LIBS} \
     326        -lQtOpenGL \
     327        ${GLU_LIBS}
     328
     329nobase_libMolecuilderQtUI_la_include_HEADERS = ${QTUIHEADER} $(QTUIUI_UIFILES)
     330libMolecuilderQtUI_la_SOURCES = ${QTUISOURCE}
     331nodist_libMolecuilderQtUI_la_SOURCES =
     332libMolecuilderQtUI_la_LDFLAGS += -version-info $(MOLECUILDER_SO_VERSION)
     333#libMolecuilderQtUI_libincludedir = $(libdir)/MoleCuilder/include
     334#nodist_libMolecuilderQtUI_libinclude_HEADERS = $(top_builddir)/libmolecuilder_config.h
    338335
    339336BUILT_SOURCES += ui_dialoglight.h ui_changeposition.h
    340337
    341 #noinst_HEADERS = dialoglight.h changeposition.h
    342 
    343338nodist_libMolecuilderQtUI_la_SOURCES += moc_dialoglight.cpp moc_changeposition.cpp
    344339
    345 #libMolecuilderQtUI_la_SOURCES += dialoglight.cpp changeposition.cpp
     340MOSTLYCLEANFILES += \
     341        *.moc.cpp \
     342        moc_*.cpp \
     343        ui_*.h
    346344
    347345ui_dialoglight.h: UIElements/Views/Qt4/dialoglight.ui
     
    373371        done;
    374372
    375 MOSTLYCLEANFILES += \
    376         *.moc.cpp \
    377         moc_*.cpp \
    378         ui_*.h
    379 
     373endif
  • tests/Makefile.am

    rf3b8a5 rc015b3  
    1 SUBDIRS = \
     1SUBDIRS =
     2
     3SUBDIRS += \
    24        CodeChecks \
    35        regression \
     
    57        Tesselations
    68
     9if CONDPYTHON
     10SUBDIRS += Python
     11endif
     12
  • tests/Python/CommandHelp/testsuite-python-commandhelp.at

    rf3b8a5 rc015b3  
    77print pyMoleCuilder.CommandHelp("help")
    88]])
    9 AT_CHECK([../../Python/run pythontest.py], 0, [stdout], [ignore])
     9AT_CHECK([../../run pythontest.py], 0, [stdout], [ignore])
    1010AT_CHECK([fgrep "Options available for action 'help':" stdout], 0, [ignore], [ignore])
    1111AT_CLEANUP
  • tests/Python/ReturnValueActions/testsuite-python-returnvalueactions.at

    rf3b8a5 rc015b3  
    1212  sys.exit(1)
    1313]])
    14 AT_CHECK([../../Python/run pythontest.py], 0, [stdout], [ignore])
     14AT_CHECK([../../run pythontest.py], 0, [stdout], [ignore])
    1515AT_CHECK([fgrep "volume is 8000" stdout], 0, [ignore], [ignore])
    1616AT_CLEANUP
  • tests/regression/Makefile.am

    rf3b8a5 rc015b3  
    2525DISTCLEANFILES = atconfig
    2626
    27 TESTSCRIPTS = \
     27TESTSCRIPTS =
     28
     29TESTSCRIPTS += \
    2830        $(srcdir)/Atoms/testsuite-atoms.at \
    2931        $(srcdir)/Atoms/Add/testsuite-atoms-add.at \
     
    128130        $(srcdir)/Parser/Xyz/testsuite-parser-xyz-multiple-timesteps.at \
    129131        $(srcdir)/Parser/Xyz/testsuite-parser-xyz-save.at \
    130         $(srcdir)/Python/testsuite-python.at \
    131         $(srcdir)/Python/AllActions/testsuite-python-allactions.at \
    132         $(srcdir)/Python/AllActions/testsuite-python-options_dat.at \
    133         $(srcdir)/Python/BoxMaker/testsuite-python-boxmaker.at \
    134         $(srcdir)/Python/CommandHelp/testsuite-python-commandhelp.at \
    135         $(srcdir)/Python/ReturnValueActions/testsuite-python-returnvalueactions.at \
    136132        $(srcdir)/RandomNumbers/testsuite-randomnumbers.at \
    137133        $(srcdir)/RandomNumbers/Distribution/testsuite-set-random-number-distribution.at \
     
    175171        $(srcdir)/Tesselation/BigConvex/testsuite-tesselation-big-convex-envelope.at
    176172
    177 
    178173max_jobs = 4
    179174 
  • tests/regression/testsuite.at

    rf3b8a5 rc015b3  
    1515# Use colored output with new-enough Autotest.
    1616m4_ifdef([AT_COLOR_TESTS], [AT_COLOR_TESTS])
    17 
    18 m4_include(Python/testsuite-python.at)
    1917
    2018m4_include(Options/testsuite-options.at)
  • utils/Makefile.am

    rf3b8a5 rc015b3  
     1BUILT_SOURCES =
     2CLEANFILES =
     3bin_SCRIPTS =
     4pyexec_SCRIPTS =
    15
     6if CONDPYTHON
    27PYTHON_TOOLS = \
    38        boxmaker
     9endif
    410
    511${PYTHON_TOOLS}: python_wrapper
    612        cp $< $@
    713
    8 BUILT_SOURCES = ${PYTHON_TOOLS}
    9 CLEANFILES = ${PYTHON_TOOLS}
    10 bin_SCRIPTS = ${PYTHON_TOOLS}
    11 
    12 pyexec_SCRIPTS = boxmaker.py
     14if CONDPYTHON
     15BUILT_SOURCES += ${PYTHON_TOOLS}
     16CLEANFILES += ${PYTHON_TOOLS}
     17bin_SCRIPTS += ${PYTHON_TOOLS}
     18pyexec_SCRIPTS += boxmaker.py
     19endif
Note: See TracChangeset for help on using the changeset viewer.