Changeset f99714 for LinearAlgebra


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.
File:
1 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    [
Note: See TracChangeset for help on using the changeset viewer.