Changeset dc031c
- Timestamp:
- Dec 23, 2010, 5:41:47 PM (15 years ago)
- 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:
- acbe1b
- Parents:
- 56f73b
- git-author:
- Frederik Heber <heber@…> (12/22/10 17:16:07)
- git-committer:
- Frederik Heber <heber@…> (12/23/10 17:41:47)
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
configure.ac
r56f73b rdc031c 32 32 AC_SUBST([MOLECUILDER_API_VERSION], [1.0]) 33 33 34 dnl this macro is used to get the arguments supplied 35 dnl to the configure script (./configure --enable-debug) 36 dnl Check if we have enable debug support. 37 AC_MSG_CHECKING(whether to enable debugging) 38 default="no" 39 have_debug="no" 40 AC_ARG_ENABLE(debug, [ --enable-debug=[no/yes/full] turn on debugging 41 [default=$default]],, enable_debug=$default) 42 if test "x$enable_debug" = "xyes"; then 43 AC_DEFINE(MEMDEBUG,1, ["Use memory debugger."]) 44 AC_DEFINE(HAVE_DEBUG,1, ["Use debug setting to compile code."]) 45 have_debug="yes" 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 have_debug="full" 51 else 52 AC_DEFINE(NDEBUG,1, ["Don't compile in debugging code."]) 53 AC_DEFINE(HAVE_DEBUG,0, ["Use debug setting to compile code."]) 54 have_debug="no" 55 fi 56 AC_MSG_RESULT($have_debug) 57 AC_SUBST(HAVE_DEBUG) 58 59 dnl this macro is used to get the arguments supplied 60 dnl to the configure script (./configure --enable-debug) 61 dnl Check if we have enable debug support. 62 AC_MSG_CHECKING([whether to enable internal caching of values (speedup!)]) 63 default="yes" 64 AC_ARG_ENABLE(cache, [ --enable-cache=[no/yes] turn on caching 65 [default=$default]],, enable_cache=$default) 66 if test "x$enable_cache" = "xno"; then 67 AC_DEFINE(NO_CACHING,1, ["Don't use caching code."]) 68 AC_DEFINE(HAVE_CACHE,0, ["cache variables to speed up the code."]) 69 AC_MSG_RESULT(no) 70 else 71 AC_DEFINE(HAVE_CACHE,1, ["cache variables to speed up the code."]) 72 AC_MSG_RESULT(yes) 73 fi 74 AC_SUBST(HAVE_CACHE) 75 76 #AC_MSG_CHECKING(whether to enable profiling) 77 #default="no" 78 #AC_ARG_ENABLE(debug, [ --enable-profile=[no/yes] turn on profiling 79 # [default=$default]],, enable_profile=$default) 80 #if test "x$enable_profile" = "xyes"; then 81 # CXXFLAGS="$CXXFLAGS -g -DDEBUG -pg" 82 # DEBUG=-pg; 83 # AC_MSG_RESULT(yes) 84 #else 85 # AC_MSG_RESULT(no) 86 #fi 87 88 #AC_MSG_CHECKING(whether to enable serialization) 89 #default="no" 90 #AC_ARG_ENABLE(debug, [ --enable-serialization=[no/yes] turn on serialization support 91 # [default=$default]],, enable_serialization=$default) 92 #if test "x$enable_serialization" = "xyes"; then 93 # CXXFLAGS="$CXXFLAGS -DSERIALIZATION" 94 # serialization=yes; 95 # AC_MSG_RESULT(yes) 96 #else 97 # serialization=no; 98 # AC_MSG_RESULT(no) 99 #fi 100 34 101 # Checks for libraries. 35 102 AC_CHECK_LIB(m, sqrt, , AC_MSG_ERROR([compatible libc math library not found])) … … 46 113 gw_CHECK_QT4 47 114 AX_CHECK_GLU 48 AC_MSG_NOTICE(["GLU_CFLAGS: $GLU_CFLAGS, GLU_CXXFLAGS: $GLU_CXXFLAGS, GLU_LDFLAGS: $GLU_LDFLAGS, GLU_LIBS: $GLU_LIBS"])115 #AC_MSG_NOTICE(["GLU_CFLAGS: $GLU_CFLAGS, GLU_CXXFLAGS: $GLU_CXXFLAGS, GLU_LDFLAGS: $GLU_LDFLAGS, GLU_LIBS: $GLU_LIBS"]) 49 116 50 117 # CodePatterns library 51 AM_PATH_CODEPATTERNS([1.0.0], ,[AC_MSG_ERROR([Missing CodePatterns library, please specify path.])]) 52 #PKG_CHECK_MODULES([CodePatterns], [CodePatterns >= 1.0.0], , [AC_MSG_ERROR([Missing CodePatterns library, please specify path.])]) 53 #AC_SUBST([CodePatterns_CFLAGS]) 54 #AC_SUBST([CodePatterns_LIBS]) 118 AM_PATH_CODEPATTERNS([1.0.1], $have_debug,,[AC_MSG_ERROR([Missing CodePatterns library, please specify PKG_CONFIG_PATH or use --with-codepatterns...])]) 55 119 56 120 # Checks for header files. -
m4/ax_codepatterns.m4
r56f73b rdc031c 1 1 dnl 2 dnl AM_PATH_CODEPATTERNS(MINIMUM-VERSION, [ ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])2 dnl AM_PATH_CODEPATTERNS(MINIMUM-VERSION, [HAVE_DEBUG=no,yes,full], [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) 3 3 dnl 4 4 … … 15 15 16 16 codepatterns_version_min=$1 17 codepatterns_debug=$2 17 18 18 19 CodePatterns_CFLAGS="" … … 31 32 fi 32 33 # 1. test whether pkg-config works 33 CodePatterns_CONFIG="" 34 #AC_MSG_NOTICE([PKG_CONFIG_PATH is $PKG_CONFIG_PATH]) 35 PKG_CHECK_MODULES([CodePatterns], [CodePatterns >= $codepatterns_version_min], [ 34 CodePatterns_CONFIG="no" 35 #AC_MSG_NOTICE([PKG_CONFIG_PATH is $PKG_CONFIG_PATH.]) 36 if test x$codepatterns_debug != xno; then 37 codepatterns_libname="CodePatterns-debug" 38 PKG_CHECK_MODULES([CodePatterns_debug], [CodePatterns >= $codepatterns_version_min], [ 36 39 codepatterns_pkgconfig=yes 37 CodePatterns_CONFIG="pkg-config CodePatterns"40 CodePatterns_CONFIG="pkg-config $codepatterns_libname" 38 41 ], [ 39 42 # 2. if failed, test for binary codepatterns-config 40 43 AC_PATH_PROG(CodePatterns_CONFIG, codepatterns-config, no) 41 if test x$CodePatterns_CONFIG= xno && test x$codepatterns_prefix != x ; then44 if test "x$CodePatterns_CONFIG" = xno && test x$codepatterns_prefix != x ; then 42 45 AC_MSG_CHECKING([for alternative codepatterns-config location]) 43 46 if test -e $codepatterns_prefix/bin/codepatterns-config; then … … 51 54 ]) 52 55 56 else 57 codepatterns_libname="CodePatterns" 58 PKG_CHECK_MODULES([CodePatterns], [CodePatterns >= $codepatterns_version_min], [ 59 codepatterns_pkgconfig=yes 60 CodePatterns_CONFIG="pkg-config $codepatterns_libname" 61 ], [ 62 # 2. if failed, test for binary codepatterns-config 63 AC_PATH_PROG(CodePatterns_CONFIG, codepatterns-config, no) 64 if test "x$CodePatterns_CONFIG" = xno && test x$codepatterns_prefix != x ; then 65 AC_MSG_CHECKING([for alternative codepatterns-config location]) 66 if test -e $codepatterns_prefix/bin/codepatterns-config; then 67 codepatterns_pkgconfig=no 68 CodePatterns_CONFIG="$codepatterns_prefix/bin/codepatterns-config" 69 AC_MSG_RESULT([yes]) 70 else 71 AC_MSG_RESULT([no]) 72 fi 73 fi 74 ]) 75 76 fi 77 53 78 # try to set values via CodePatterns_CONFIG 54 if test ! -z "$CodePatterns_CONFIG"; then79 if test "x$CodePatterns_CONFIG" != xno; then 55 80 CodePatterns_CFLAGS=`$CodePatterns_CONFIG --cflags` 56 81 if test x$codepatterns_pkgconfig = xno; then … … 66 91 if test -e $codepatterns_include_prefix/include; then 67 92 CodePatterns_CFLAGS="$codepatterns_include_prefix/include" 68 AC_MSG_NOTICE([codepatterns include found and used.])93 #AC_MSG_NOTICE([codepatterns include found and used.]) 69 94 else 70 95 AC_MSG_WARN([codepatterns include not found at $codepatterns_include_prefix/include.]) … … 72 97 fi 73 98 if test x$cp_cv_codepatterns_libs_prefix != x ; then 74 if test -e "$cp_cv_codepatterns_libs_prefix/lib/lib CodePatterns.so"; then75 CodePatterns_LIBS="-L$cp_cv_codepatterns_libs_prefix/lib -l CodePatterns"76 AC_MSG_NOTICE([codepatterns libs found and used.])99 if test -e "$cp_cv_codepatterns_libs_prefix/lib/lib$codepatterns_libname.so"; then 100 CodePatterns_LIBS="-L$cp_cv_codepatterns_libs_prefix/lib -l$codepatterns_libname" 101 #AC_MSG_NOTICE([codepatterns libs found and used.]) 77 102 else 78 103 AC_MSG_WARN([codepatterns libs not found at $cp_cv_codepatterns_libs_prefix.]) … … 93 118 codepatterns_version=no 94 119 if test x$codepatterns = xyes; then 95 AC_MSG_CHECKING(for CodePatterns- version >= $codepatterns_version_min)96 if test "x$CodePatterns_CONFIG" != "x"; then120 AC_MSG_CHECKING(for $codepatterns_libname - version >= $codepatterns_version_min) 121 if test "x$CodePatterns_CONFIG" != xno; then 97 122 codepatterns_version=`$CodePatterns_CONFIG --version` 98 123 else … … 157 182 fi 158 183 fi 159 160 # check presence of lib 161 SAVE_CPPFLAGS="$CPPFLAGS" 162 SAVE_LIBS="$LIBS" 163 CPPFLAGS="$CodePatterns_CFLAGS" 164 LIBS="$CodePatterns_LIBS -lboost_thread" 165 if test x$codepatterns_version = xyes; then 166 AC_CACHE_CHECK(for CodePatterns lib, cp_cv_codepatterns_lib, [ 167 AC_LANG_PUSH([C++]) 168 AC_LINK_IFELSE( 169 [ 170 AC_LANG_PROGRAM([ 184 else 185 # with pkg-config version is checked 186 codepatterns_version=yes 187 fi 188 # check presence of lib 189 SAVE_CPPFLAGS="$CPPFLAGS" 190 SAVE_LIBS="$LIBS" 191 CPPFLAGS="$CodePatterns_CFLAGS" 192 LIBS="$CodePatterns_LIBS -lboost_thread" 193 if test x$codepatterns_version = xyes; then 194 AC_CACHE_CHECK(for $codepatterns_libname lib, cp_cv_codepatterns_lib, [ 195 AC_LANG_PUSH([C++]) 196 AC_LINK_IFELSE( 197 [ 198 AC_LANG_PROGRAM([ 171 199 #include "CodePatterns/Singleton.hpp" 172 200 #include "CodePatterns/Singleton_impl.hpp" … … 197 225 SingletonStub::getInstance(); 198 226 ]) 199 ],[ 200 cp_cv_codepatterns_lib="yes" 201 ], [ 202 cp_cv_codepatterns_lib="no" 203 ] 204 ) 205 AC_LANG_POP([C++]) 206 ]) 207 fi 208 CPPFLAGS="$SAVE_CPPFLAGS" 209 LIBS="$SAVE_LIBS" 210 211 if test "x$cp_cv_codepatterns_lib" = xyes ; then 212 ifelse([$2], , :, [$2]) 213 else 214 CodePatterns_CFLAGS="" 215 CodePatterns_LDFLAGS="" 216 CodePatterns_LIBS="" 217 ifelse([$3], , :, [$3]) 218 fi 227 ],[ 228 cp_cv_codepatterns_lib="yes" 229 ], [ 230 cp_cv_codepatterns_lib="no" 231 ] 232 ) 233 AC_LANG_POP([C++]) 234 ]) 235 fi 236 CPPFLAGS="$SAVE_CPPFLAGS" 237 LIBS="$SAVE_LIBS" 238 239 if test "x$cp_cv_codepatterns_lib" = xyes ; then 240 ifelse([$3], , :, [$3]) 241 else 242 CodePatterns_CFLAGS="" 243 CodePatterns_LDFLAGS="" 244 CodePatterns_LIBS="" 245 ifelse([$4], , :, [$4]) 219 246 fi 220 247
Note:
See TracChangeset
for help on using the changeset viewer.