]> www.ginac.de Git - ginac.git/blobdiff - ginac.m4
Better output for slashed expressions (C.Dams' patch).
[ginac.git] / ginac.m4
index 6108986e55b50b506f016e4382db912da0abd17f..3e36e00f792f1921ca4ca76b87c87822be7c5dc8 100644 (file)
--- a/ginac.m4
+++ b/ginac.m4
 dnl AM_PATH_GINAC([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
 dnl Test for GiNaC, and define GINACLIB_CPPFLAGS and GINACLIB_LIBS
 dnl
 dnl AM_PATH_GINAC([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
 dnl Test for GiNaC, and define GINACLIB_CPPFLAGS and GINACLIB_LIBS
 dnl
-AC_DEFUN(AM_PATH_GINAC,
+AC_DEFUN([AM_PATH_GINAC],
 [dnl 
 dnl Get the cppflags and libraries from the ginac-config script
 dnl
 [dnl 
 dnl Get the cppflags and libraries from the ginac-config script
 dnl
-AC_ARG_WITH(ginac-prefix,[  --with-ginac-prefix=PFX Prefix where GiNaC is installed (optional)],
+AC_ARG_WITH(ginac-prefix, AC_HELP_STRING([--with-ginac-prefix=PFX], [Prefix where GiNaC is installed (optional)]),
             ginac_prefix="$withval", ginac_prefix="")
             ginac_prefix="$withval", ginac_prefix="")
-AC_ARG_WITH(ginac-exec-prefix,[  --with-ginac-exec-prefix=PFX Exec prefix where GiNaC is installed (optional)],
+AC_ARG_WITH(ginac-exec-prefix, AC_HELP_STRING([--with-ginac-exec-prefix=PFX], [Exec prefix where GiNaC is installed (optional)]),
             ginac_exec_prefix="$withval", ginac_exec_prefix="")
             ginac_exec_prefix="$withval", ginac_exec_prefix="")
-AC_ARG_ENABLE(ginactest, [  --disable-ginactest     Do not try to compile and run a test GiNaC program],
+AC_ARG_ENABLE(ginactest, AC_HELP_STRING([--disable-ginactest], [Do not try to compile and run a test GiNaC program]),
               , enable_ginactest=yes)
 
 if test x$ginac_exec_prefix != x ; then
               , enable_ginactest=yes)
 
 if test x$ginac_exec_prefix != x ; then
@@ -54,11 +54,12 @@ dnl Parse required version and the result of ginac-config.
             sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
     GINACLIB_CPPFLAGS=`$GINACLIB_CONFIG $ginac_args --cppflags`
     GINACLIB_LIBS=`$GINACLIB_CONFIG $ginac_args --libs`
             sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
     GINACLIB_CPPFLAGS=`$GINACLIB_CONFIG $ginac_args --cppflags`
     GINACLIB_LIBS=`$GINACLIB_CONFIG $ginac_args --libs`
-    ginac_config_major_version=`$GINACLIB_CONFIG $ginac_args --version | \
+    ginac_config_version=`$GINACLIB_CONFIG $ginac_args --version`
+    ginac_config_major_version=`echo $ginac_config_version | \
             sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
             sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
-    ginac_config_minor_version=`$GINACLIB_CONFIG $ginac_args --version | \
+    ginac_config_minor_version=`echo $ginac_config_version | \
             sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
             sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
-    ginac_config_micro_version=`$GINACLIB_CONFIG $ginac_args --version | \
+    ginac_config_micro_version=`echo $ginac_config_version | \
             sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
 dnl Check if the installed GiNaC is sufficiently new according to ginac-config.
     if test \( $ginac_config_major_version -lt $ginac_min_major_version \) -o \
             sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
 dnl Check if the installed GiNaC is sufficiently new according to ginac-config.
     if test \( $ginac_config_major_version -lt $ginac_min_major_version \) -o \
@@ -90,7 +91,7 @@ dnl match the version of the headers and the version built into the library, too
    prototype for exit() that conflicts with the one in stdlib.h */
 extern "C" int system(const char *);
 
    prototype for exit() that conflicts with the one in stdlib.h */
 extern "C" int system(const char *);
 
-int main(void)
+int main()
 {
     int major, minor, micro;
     char *tmp_version;
 {
     int major, minor, micro;
     char *tmp_version;
@@ -122,7 +123,7 @@ int main(void)
             LIBS="$ac_save_LIBS"
         fi
         if test "x$no_ginac" = x ; then
             LIBS="$ac_save_LIBS"
         fi
         if test "x$no_ginac" = x ; then
-            AC_MSG_RESULT([yes, `$GINACLIB_CONFIG $ginac_args --version`])
+            AC_MSG_RESULT([yes, $ginac_config_version])
             ifelse([$2], , :, [$2])
         else
             AC_MSG_RESULT(no)
             ifelse([$2], , :, [$2])
         else
             AC_MSG_RESULT(no)