Changeset a19da5d for configure.ac


Ignore:
Timestamp:
Jun 7, 2008, 1:16:19 PM (17 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:
fa40b5
Parents:
1f6422
Message:

new aclocal macro with controles all the enable-debug/optimization/warning in a unified manner and still keeps packages independent of each other.

Note that Ralf suggested specifying optimizations in CFLAGS directly, due to the load of activateable warnings, i saw it rather fit to make such a configure option.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • configure.ac

    r1f6422 ra19da5d  
    1515AM_MISSING_PROG([DOXYGEN], [doxygen])
    1616
     17AC_ARG_ENABLE([debug],AS_HELP_STRING([--enable-debug],[debugging level of compiler. Argument is yes or debugging level. (default is no)]),
     18              [enable_debugging=$enableval], [enable_debugging=no])
     19AC_ARG_ENABLE([optimization],AS_HELP_STRING([--enable-optimization],[Optimization level of compiler. Argument is yes or optimization. (default is 2)]),
     20              [enable_optimization=$enableval], [enable_optimization=2])
     21AC_ARG_ENABLE([warnings], AS_HELP_STRING([--enable-warnings],[Output compiler warnings, argument is none, some or full (default is some).]),
     22              [enable_warnings=$enableval], [enable_warnings=some])
     23AC_SET_COMPILER_FLAGS([$enable_optimization], [$enable_debugging], [$enable_warnings])
    1724
    1825# Checks for libraries.
     
    3845AC_SEARCH_LIBS(cblas_sdot, blas cblas gslblas gslcblas)
    3946AC_CHECK_LIB(gsl,main)
    40 
    41 # debugging info
    42 AC_ARG_ENABLE([debug],AS_HELP_STRING([--enable-debug],[Output debugging information, argument is yes or debugging level (default is no).]),
    43               [enable_debug=$enableval], [enable_debug=no])
    44 if ! test x"$enable_debug" = xno; then
    45         if test x"${enable_debug}" = xyes; then
    46                 CFLAGS="$CFLAGS -g3"
    47                 CXXFLAGS="$CXXFLAGS -g3"
    48         else
    49                 CFLAGS="$CFLAGS -g${enable_debug}"
    50                 CXXFLAGS="$CXXFLAGS -g${enable_debug}"
    51         fi
    52         dnl enable all warnings
    53         CFLAGS="$CFLAGS -Wall -W -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wshadow -Wpointer-arith -Wcast-align -Wcast-qual -Wwrite-strings -Wredundant-decls -Wnested-externs -Wmissing-noreturn -Wformat-security -Wmissing-format-attribute -Winit-self"
    54         CXXFLAGS="$CXXFLAGS -Wall -W -Wshadow -Wpointer-arith -Wcast-align -Wcast-qual -Wwrite-strings -Wredundant-decls -Wmissing-noreturn -Wformat-security -Wmissing-format-attribute -Winit-self"
    55   AC_DEFINE(HAVE_DEBUG,1, ["Output debugging info"])
    56   AC_SUBST(HAVE_DEBUG)
    57 else
    58         dnl even without debugging we want some minimal info of something's utterly wrong
    59         CFLAGS="$CFLAGS -Wall"
    60         CXXFLAGS="$CXXFLAGS -Wall"
    61 fi
    62 
    63 # optimization level
    64 AC_ARG_ENABLE([optimization],AS_HELP_STRING([--enable-optimization],[Optimization level of compiler. Argument is yes or debugging level. (default is 2)]),
    65               [enable_optimization=$enableval], [enable_optimization=yes])
    66 if test ! x"$enable_optimization" = xno; then
    67         if test x"$enable_debug" = xno; then
    68                 if test x"${enable_optimization}" = xyes; then
    69                         CFLAGS="$CFLAGS -O2"
    70                         CXXFLAGS="$CXXFLAGS -O2"
    71                 else
    72                         CFLAGS="$CFLAGS -O${enable_optimization}"
    73                         CXXFLAGS="$CXXFLAGS -O${enable_optimization}"
    74                 fi
    75 #       else
    76 #               AC_MSG_WARN(["Already specified --enable-debug!"])
    77         fi
    78 fi
    7947
    8048# add replacement/saturation hydrogen or not
     
    10270fi
    10371
     72AC_MSG_NOTICE(["CFLAGS: $CFLAGS, CXXFLAGS: $CXXFLAGS, LDFLAGS: $LDFLAGS, CC: $CC, CXX:, $CXX, MPICC: $MPICC, MPILIBS: $MPILIBS, LIBS: $LIBS"])
     73
    10474# test suite
    10575AC_CONFIG_TESTDIR(tests)
Note: See TracChangeset for help on using the changeset viewer.