source: m4/cppunit.m4@ 4464ef

Action_Thermostats Add_AtomRandomPerturbation Add_RotateAroundBondAction Add_SelectAtomByNameAction Adding_Graph_to_ChangeBondActions Adding_MD_integration_tests Adding_StructOpt_integration_tests Automaking_mpqc_open AutomationFragmentation_failures Candidate_v1.6.0 Candidate_v1.6.1 ChangeBugEmailaddress ChangingTestPorts ChemicalSpaceEvaluator Combining_Subpackages Debian_Package_split Debian_package_split_molecuildergui_only Disabling_MemDebug Docu_Python_wait EmpiricalPotential_contain_HomologyGraph_documentation Enable_parallel_make_install Enhance_userguide Enhanced_StructuralOptimization Enhanced_StructuralOptimization_continued Example_ManyWaysToTranslateAtom Exclude_Hydrogens_annealWithBondGraph FitPartialCharges_GlobalError Fix_ChronosMutex Fix_StatusMsg Fix_StepWorldTime_single_argument Fix_Verbose_Codepatterns ForceAnnealing_goodresults ForceAnnealing_oldresults ForceAnnealing_tocheck ForceAnnealing_with_BondGraph ForceAnnealing_with_BondGraph_continued ForceAnnealing_with_BondGraph_continued_betteresults ForceAnnealing_with_BondGraph_contraction-expansion GeometryObjects Gui_displays_atomic_force_velocity IndependentFragmentGrids_IntegrationTest JobMarket_RobustOnKillsSegFaults JobMarket_StableWorkerPool JobMarket_unresolvable_hostname_fix ODR_violation_mpqc_open PartialCharges_OrthogonalSummation PythonUI_with_named_parameters QtGui_reactivate_TimeChanged_changes Recreated_GuiChecks RotateToPrincipalAxisSystem_UndoRedo StoppableMakroAction Subpackage_levmar Subpackage_vmg ThirdParty_MPQC_rebuilt_buildsystem TremoloParser_IncreasedPrecision TremoloParser_MultipleTimesteps Ubuntu_1604_changes stable
Last change on this file since 4464ef was 62c3dde, checked in by Frederik Heber <heber@…>, 14 years ago

Added m4 files containing AX_LANG_COMPILER_MS and AM_PATH_CPPUNIT to repository.

  • kudos to Ralf for pointing this out
  • Property mode set to 100644
File size: 3.1 KB
Line 
1dnl
2dnl AM_PATH_CPPUNIT(MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
3dnl
4AC_DEFUN([AM_PATH_CPPUNIT],
5[
6
7AC_ARG_WITH(cppunit-prefix,[ --with-cppunit-prefix=PFX Prefix where CppUnit is installed (optional)],
8 cppunit_config_prefix="$withval", cppunit_config_prefix="")
9AC_ARG_WITH(cppunit-exec-prefix,[ --with-cppunit-exec-prefix=PFX Exec prefix where CppUnit is installed (optional)],
10 cppunit_config_exec_prefix="$withval", cppunit_config_exec_prefix="")
11
12 if test x$cppunit_config_exec_prefix != x ; then
13 cppunit_config_args="$cppunit_config_args --exec-prefix=$cppunit_config_exec_prefix"
14 if test x${CPPUNIT_CONFIG+set} != xset ; then
15 CPPUNIT_CONFIG=$cppunit_config_exec_prefix/bin/cppunit-config
16 fi
17 fi
18 if test x$cppunit_config_prefix != x ; then
19 cppunit_config_args="$cppunit_config_args --prefix=$cppunit_config_prefix"
20 if test x${CPPUNIT_CONFIG+set} != xset ; then
21 CPPUNIT_CONFIG=$cppunit_config_prefix/bin/cppunit-config
22 fi
23 fi
24
25 AC_PATH_PROG(CPPUNIT_CONFIG, cppunit-config, no)
26 cppunit_version_min=$1
27
28 AC_MSG_CHECKING(for Cppunit - version >= $cppunit_version_min)
29 no_cppunit=""
30 if test "$CPPUNIT_CONFIG" = "no" ; then
31 AC_MSG_RESULT(no)
32 no_cppunit=yes
33 else
34 CPPUNIT_CFLAGS=`$CPPUNIT_CONFIG --cflags`
35 CPPUNIT_LIBS=`$CPPUNIT_CONFIG --libs`
36 cppunit_version=`$CPPUNIT_CONFIG --version`
37
38 cppunit_major_version=`echo $cppunit_version | \
39 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
40 cppunit_minor_version=`echo $cppunit_version | \
41 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
42 cppunit_micro_version=`echo $cppunit_version | \
43 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
44
45 cppunit_major_min=`echo $cppunit_version_min | \
46 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
47 if test "x${cppunit_major_min}" = "x" ; then
48 cppunit_major_min=0
49 fi
50
51 cppunit_minor_min=`echo $cppunit_version_min | \
52 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
53 if test "x${cppunit_minor_min}" = "x" ; then
54 cppunit_minor_min=0
55 fi
56
57 cppunit_micro_min=`echo $cppunit_version_min | \
58 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
59 if test "x${cppunit_micro_min}" = "x" ; then
60 cppunit_micro_min=0
61 fi
62
63 cppunit_version_proper=`expr \
64 $cppunit_major_version \> $cppunit_major_min \| \
65 $cppunit_major_version \= $cppunit_major_min \& \
66 $cppunit_minor_version \> $cppunit_minor_min \| \
67 $cppunit_major_version \= $cppunit_major_min \& \
68 $cppunit_minor_version \= $cppunit_minor_min \& \
69 $cppunit_micro_version \>= $cppunit_micro_min `
70
71 if test "$cppunit_version_proper" = "1" ; then
72 AC_MSG_RESULT([$cppunit_major_version.$cppunit_minor_version.$cppunit_micro_version])
73 else
74 AC_MSG_RESULT(no)
75 no_cppunit=yes
76 fi
77 fi
78
79 if test "x$no_cppunit" = x ; then
80 ifelse([$2], , :, [$2])
81 else
82 CPPUNIT_CFLAGS=""
83 CPPUNIT_LIBS=""
84 ifelse([$3], , :, [$3])
85 fi
86
87 AC_SUBST(CPPUNIT_CFLAGS)
88 AC_SUBST(CPPUNIT_LIBS)
89])
90
91
92
Note: See TracBrowser for help on using the repository browser.