X-Git-Url: https://ginac.de/CLN/cln.git//cln.git?a=blobdiff_plain;f=cln.m4;h=e012b9b8bde231907c573f124238cdd44be4499d;hb=22b09542dcc56209019cc30c94fbc3086e47105f;hp=f79a95f7e8e47ba18453b65e1ee3a7683eb5ec21;hpb=b172f24992f572c8010e0c754723a55dd93562b1;p=cln.git diff --git a/cln.m4 b/cln.m4 index f79a95f..e012b9b 100644 --- a/cln.m4 +++ b/cln.m4 @@ -10,7 +10,7 @@ dnl AC_PATH_CLN([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) dnl Test for installed CLN library, and define CLN_CPPFLAGS and CLN_LIBS dnl -AC_DEFUN(AC_PATH_CLN, +AC_DEFUN([AC_PATH_CLN], [dnl dnl Get the cppflags and libraries from the cln-config script dnl @@ -54,11 +54,12 @@ dnl Parse required version and the result of cln-config. sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` CLN_CPPFLAGS=`$CLN_CONFIG $cln_config_args --cppflags` CLN_LIBS=`$CLN_CONFIG $cln_config_args --libs` - cln_config_major_version=`$CLN_CONFIG $cln_config_args --version | \ + cln_config_version=`$CLN_CONFIG $cln_config_args --version` + cln_config_major_version=`echo $cln_config_version | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` - cln_config_minor_version=`$CLN_CONFIG $cln_config_args --version | \ + cln_config_minor_version=`echo $cln_config_version | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` - cln_config_micro_version=`$CLN_CONFIG $cln_config_args --version | \ + cln_config_micro_version=`echo $cln_config_version | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` dnl Check if the installed CLN is sufficiently new according to cln-config. if test \( $cln_config_major_version -lt $cln_min_major_version \) -o \ @@ -92,9 +93,6 @@ extern "C" int system(const char *); int main(void) { - int major, minor, micro; - char *tmp_version; - system("touch conf.clntest"); if ((CL_VERSION_MAJOR != $cln_config_major_version) || @@ -122,7 +120,7 @@ int main(void) LIBS="$ac_save_LIBS" fi if test "x$no_cln" = x ; then - AC_MSG_RESULT([yes, `$CLN_CONFIG $cln_config_args --version`]) + AC_MSG_RESULT([yes, $cln_config_version]) ifelse([$2], , :, [$2]) else AC_MSG_RESULT(no) @@ -138,7 +136,7 @@ int main(void) echo "*** that the run-time linker is not finding CLN or finding the wrong" echo "*** version of CLN. If it is not finding CLN, you'll need to set your" echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" - echo "*** to the installed location Also, make sure you have run ldconfig if that" + echo "*** to the installed location. Also, make sure you have run ldconfig if that" echo "*** is required on your system."], [ echo "*** The test program failed to compile or link. See the file config.log for the" echo "*** exact error that occured. This usually means CLN was incorrectly installed"