Changeset f99714


Ignore:
Timestamp:
Dec 28, 2011, 3:24:58 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:
30c753, 908dc7
Parents:
d103d3
git-author:
Frederik Heber <heber@…> (12/21/11 15:01:47)
git-committer:
Frederik Heber <heber@…> (12/28/11 15:24:58)
Message:

FIX: Finally correctly implemented all --enable-... switches in configure.

  • The principle is: AC_ARG_ENABLE([option], [help], [if present], [if not present]). In the last we set the default value of our own variable (e.g. enable_...="no"), in the last but one we simply set enable_...=$enableval to get the value from the command line.
  • also I used AS_IF everywhere in checking the enable_... value.
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • LinearAlgebra/configure.ac

    rd103d3 rf99714  
    3838dnl Check if we have enable debug support.
    3939AC_MSG_CHECKING(whether to enable debugging)
    40 AC_ARG_ENABLE(debug, [  --enable-debug=[no/yes/full] turn on debugging
    41                      [default=yes]],, enable_debug=$enableval)
     40have_debug="no"
     41AC_ARG_ENABLE(
     42        [debug],
     43        AS_HELP_STRING([--enable-debug],[turn on debugging [default=no]]),
     44        enable_debug=$enableval,
     45        enable_debug="no")
    4246AC_MSG_RESULT($enable_debug)
    43 if test "x$enable_debug" = "xyes"; then
     47AS_IF([test x"$enable_debug" = x"yes"],[
    4448  AC_DEFINE(MEMDEBUG,1, ["Use memory debugger."])
    4549  AC_DEFINE(HAVE_DEBUG,1, ["Use debug setting to compile code."])
    46 elif test "x$enable_debug" = "xfull"; then
    47   AC_DEFINE(MEMDEBUG,1, ["Use memory debugger."])
    48   AC_DEFINE(LOG_OBSERVER,1, ["Use observer log."])
    49   AC_DEFINE(HAVE_DEBUG,2, ["Use debug setting to compile code."])
    50 else
    51   AC_DEFINE(NDEBUG,1, ["Don't compile in debugging code."])
    52   AC_DEFINE(HAVE_DEBUG,0, ["Use debug setting to compile code."])
    53 fi
     50  have_debug="yes"
     51],[
     52        AS_IF([test x"$enable_debug" = x"full"],[
     53          AC_DEFINE(MEMDEBUG,1, ["Use memory debugger."])
     54          AC_DEFINE(LOG_OBSERVER,1, ["Use observer log."])
     55          AC_DEFINE(HAVE_DEBUG,2, ["Use debug setting to compile code."])
     56          AC_DEFINE(QT_DEBUG,, ["Enable Qt debug messages."])
     57          have_debug="full"
     58        ],[
     59          AC_DEFINE(NDEBUG,1, ["Don't compile in debugging code."])
     60          AC_DEFINE(HAVE_DEBUG,0, ["Use debug setting to compile code."])
     61          AC_DEFINE(QT_NO_DEBUG,, ["Disable Qt debug messages."])
     62          have_debug="no"
     63        ])
     64])
    5465AC_SUBST(HAVE_DEBUG)
    5566
     
    5768dnl to the configure script (./configure --enable-debug)
    5869dnl Check if we have enable debug support.
    59 AC_MSG_CHECKING([whether to enable internal caching of values (speedup!)])
    60 AC_ARG_ENABLE(cache, [  --enable-cache=[no/yes] turn on caching
    61                      [default=yes]],, enable_cache=$enableval)
     70AC_MSG_CHECKING(whether to enable internal caching/lazy evaluation)
     71AC_ARG_ENABLE(
     72        [cache],
     73        AS_HELP_STRING([--enable-cache],[turn on internal lazy evaluation [default=yes]]),
     74        enable_cache=$enableval,
     75        enable_cache="yes")
    6276AC_MSG_RESULT($enable_cache)
    63 if test "x$enable_cache" = "xno"; then
     77AS_IF([test x"$enable_cache" != x"no"],[
     78  AC_DEFINE(HAVE_CACHE,1, ["cache variables to speed up the code."])
     79],[
    6480  AC_DEFINE(NO_CACHING,1, ["Don't use caching code."])
    6581  AC_DEFINE(HAVE_CACHE,0, ["cache variables to speed up the code."])
    66 else
    67   AC_DEFINE(HAVE_CACHE,1, ["cache variables to speed up the code."])
    68   AC_MSG_RESULT(yes)
    69 fi
     82])
    7083AC_SUBST(HAVE_CACHE)
    7184
     
    111124
    112125# use CppUnit TestRunner or not
    113 AC_ARG_ENABLE([ecut],AS_HELP_STRING([--enable-ecut],[Use ECut TestRunnerClient (default is no)]),
    114               [enable_ecut=$enableval], [enable_ecut=no])
    115 if test x"$enable_ecut" = xyes; then
     126AC_MSG_CHECKING(whether to enable ECut TestRunnerClient)
     127AC_ARG_ENABLE(
     128        [ecut],
     129        AS_HELP_STRING([--enable-ecut],[Use ECut TestRunnerClient [default=no]]),
     130        enable_ecut=$disableval,
     131        enable_ecut="no")
     132AC_MSG_RESULT($enable_ecut)
     133AS_IF([test x"$enable_ecut" = x"yes"],[
    116134  AC_DEFINE(HAVE_ECUT,1, ["Use ECut TestRunnerClient instead of our own."])
    117135  AC_SUBST(HAVE_ECUT)
    118 fi
     136])
    119137
    120138# with valgrinding testsuite or not
    121139AC_MSG_CHECKING(whether to enable valgrind memory checking in testsuite)
    122 AC_ARG_WITH([valgrind],AS_HELP_STRING([--with-valgrind],[Use Valgrind on the testsuite (default is no)]),
    123               [with_valgrind=$withval], [with_valgrind=no])
    124 AC_MSG_RESULT($with_valgrind)
    125 AS_IF([test "$with_valgrind" = yes],[
     140AC_ARG_ENABLE(
     141        [valgrind],
     142        AS_HELP_STRING([--enable-valgrind],[Use Valgrind on the testsuite [default=no]]),
     143        enable_valgrind=$enableval,
     144        enable_valgrind="no")
     145AC_MSG_RESULT($enable_valgrind)
     146AS_IF([test x"$enable_valgrind" = x"yes"], [
    126147  AC_CHECK_HEADER([valgrind/valgrind.h],
    127148    [
  • configure.ac

    rd103d3 rf99714  
    2424# python module
    2525AC_MSG_CHECKING(whether to enable python module)
    26 AC_ARG_ENABLE(python, [  --enable-python=[no/yes] turn on python module
    27                      [default=yes]],, enable_python=$enableval)
     26AC_ARG_ENABLE(
     27        [python],
     28        AS_HELP_STRING([--enable-python],[turn on python module [default=yes]]),
     29        enable_python=$enableval,
     30        enable_python="yes")
    2831AC_MSG_RESULT($enable_python)
    2932AS_IF([test x"$enable_python" != x"no"],[
     
    3841dnl Check if we have enable qtgui
    3942# Qt programs
    40 have_qtgui_path=""
    41 AC_ARG_WITH([Qt-bin],
    42         [AC_HELP_STRING([--with-Qt-bin], [give path to Qt binaries])],
     43AC_ARG_WITH(
     44        [Qt-bin],
     45        [AS_HELP_STRING([--with-Qt-bin], [give path to Qt binaries])],
    4346        [have_qtgui_path=$withval
    44         enable_qtgui="yes"],,)
    45 
     47         enable_qtgui="yes"],
     48        have_qtgui_path="")
    4649AC_MSG_CHECKING(whether to enable Qt-based GUI)
    47 AC_ARG_ENABLE(qtgui, [  --enable-qtgui=[no/yes] turn on Qt GUI compilation
    48                      [default=yes]],, enable_qtgui=$enableval)
     50AC_ARG_ENABLE(
     51        [qtgui],
     52        AS_HELP_STRING([--enable-qtgui],[turn on Qt GUI compilation [default=yes]]),
     53        enable_qtgui=$enableval,
     54        enable_qtgui="yes")
    4955AC_MSG_RESULT($enable_qtgui)
    5056AS_IF([test x"$enable_qtgui" != x"no"],[
     
    8995AC_MSG_CHECKING(whether to enable debugging)
    9096have_debug="no"
    91 AC_ARG_ENABLE(debug, [  --enable-debug=[no/yes/full] turn on debugging
    92                      [default=no]],, enable_debug=$enableval)
    93 if test "x$enable_debug" = "xyes"; then
     97AC_ARG_ENABLE(
     98        [debug],
     99        AS_HELP_STRING([--enable-debug],[turn on debugging [default=no]]),
     100        enable_debug=$enableval,
     101        enable_debug="no")
     102AC_MSG_RESULT($enable_debug)
     103AS_IF([test x"$enable_debug" = x"yes"],[
    94104  AC_DEFINE(MEMDEBUG,1, ["Use memory debugger."])
    95105  AC_DEFINE(HAVE_DEBUG,1, ["Use debug setting to compile code."])
    96106  have_debug="yes"
    97 elif test "x$enable_debug" = "xfull"; then
    98   AC_DEFINE(MEMDEBUG,1, ["Use memory debugger."])
    99   AC_DEFINE(LOG_OBSERVER,1, ["Use observer log."])
    100   AC_DEFINE(HAVE_DEBUG,2, ["Use debug setting to compile code."])
    101   AC_DEFINE(QT_DEBUG,, ["Enable Qt debug messages."])
    102   have_debug="full"
    103 else
    104   AC_DEFINE(NDEBUG,1, ["Don't compile in debugging code."])
    105   AC_DEFINE(HAVE_DEBUG,0, ["Use debug setting to compile code."])
    106   AC_DEFINE(QT_NO_DEBUG,, ["Disable Qt debug messages."])
    107   have_debug="no"
    108 fi
    109 AC_MSG_RESULT($have_debug)
     107],[
     108        AS_IF([test x"$enable_debug" = x"full"],[
     109          AC_DEFINE(MEMDEBUG,1, ["Use memory debugger."])
     110          AC_DEFINE(LOG_OBSERVER,1, ["Use observer log."])
     111          AC_DEFINE(HAVE_DEBUG,2, ["Use debug setting to compile code."])
     112          AC_DEFINE(QT_DEBUG,, ["Enable Qt debug messages."])
     113          have_debug="full"
     114        ],[
     115          AC_DEFINE(NDEBUG,1, ["Don't compile in debugging code."])
     116          AC_DEFINE(HAVE_DEBUG,0, ["Use debug setting to compile code."])
     117          AC_DEFINE(QT_NO_DEBUG,, ["Disable Qt debug messages."])
     118          have_debug="no"
     119        ])
     120])
    110121AC_SUBST(HAVE_DEBUG)
    111122
     
    114125dnl Check if we have enable debug support.
    115126AC_MSG_CHECKING(whether to enable internal caching/lazy evaluation)
    116 AC_ARG_ENABLE(cache, [  --enable-cache=[no/yes] turn on caching
    117                      [default=yes]],, enable_cache=$enableval)
     127AC_ARG_ENABLE(
     128        [cache],
     129        AS_HELP_STRING([--enable-cache],[turn on internal lazy evaluation [default=yes]]),
     130        enable_cache=$enableval,
     131        enable_cache="yes")
    118132AC_MSG_RESULT($enable_cache)
    119 if test "x$enable_cache" = "xno"; then
     133AS_IF([test x"$enable_cache" != x"no"],[
     134  AC_DEFINE(HAVE_CACHE,1, ["cache variables to speed up the code."])
     135],[
    120136  AC_DEFINE(NO_CACHING,1, ["Don't use caching code."])
    121137  AC_DEFINE(HAVE_CACHE,0, ["cache variables to speed up the code."])
    122 else
    123   AC_DEFINE(HAVE_CACHE,1, ["cache variables to speed up the code."])
    124 fi
     138])
    125139AC_SUBST(HAVE_CACHE)
    126140
     
    180194
    181195# use CppUnit TestRunner or not
    182 AC_ARG_ENABLE([ecut],AS_HELP_STRING([--enable-ecut],[Use ECut TestRunnerClient (default is no)]),
    183               [enable_ecut=$enableval], [enable_ecut=no])
    184 if test x"$enable_ecut" = xyes; then
     196AC_MSG_CHECKING(whether to enable ECut TestRunnerClient)
     197AC_ARG_ENABLE(
     198        [ecut],
     199        AS_HELP_STRING([--enable-ecut],[Use ECut TestRunnerClient [default=no]]),
     200        enable_ecut=$disableval,
     201        enable_ecut="no")
     202AC_MSG_RESULT($enable_ecut)
     203AS_IF([test x"$enable_ecut" = x"yes"],[
    185204  AC_DEFINE(HAVE_ECUT,1, ["Use ECut TestRunnerClient instead of our own."])
    186205  AC_SUBST(HAVE_ECUT)
    187 fi
     206])
    188207
    189208# with valgrinding testsuite or not
    190209AC_MSG_CHECKING(whether to enable valgrind memory checking in testsuite)
    191 AC_ARG_WITH([valgrind],AS_HELP_STRING([--with-valgrind],[Use Valgrind on the testsuite (default is no)]),
    192               [with_valgrind=$withval], [with_valgrind=no])
    193 AC_MSG_RESULT($with_valgrind)
    194 AS_IF([test "$with_valgrind" = "yes"], [
     210AC_ARG_ENABLE(
     211        [valgrind],
     212        AS_HELP_STRING([--enable-valgrind],[Use Valgrind on the testsuite [default=no]]),
     213        enable_valgrind=$enableval,
     214        enable_valgrind="no")
     215AC_MSG_RESULT($enable_valgrind)
     216AS_IF([test x"$enable_valgrind" = x"yes"], [
    195217  AC_CHECK_HEADER([valgrind/valgrind.h],
    196218    [
Note: See TracChangeset for help on using the changeset viewer.