[SCM] Gerris Flow Solver branch, upstream, updated. e8f73a07832050124d2b8bf6c6f35b33180e65a8

Stephane Popinet s.popinet at niwa.co.nz
Tue Nov 24 12:25:27 UTC 2009


The following commit has been merged in the upstream branch:
commit 0b2352f2f3dd2bce08fe57ce61a3d97f43a7e7dd
Author: Stephane Popinet <s.popinet at niwa.co.nz>
Date:   Sun Nov 1 13:15:55 2009 +1100

    Macros only work with gawk (i.e. not mawk)
    
    Ignore-this: 8c1777edce66b43946e05d9be5b1ba35
    
    darcs-hash:20091101021555-fbd8f-bcbb61a366c058645352917039b1faeaf831852a.gz

diff --git a/configure.in b/configure.in
index 036e5d9..0d9072c 100644
--- a/configure.in
+++ b/configure.in
@@ -261,12 +261,12 @@ else
   AC_DEFINE(HAVE_PKG_CONFIG, 0)
 fi
 
-# checks for awk and m4
-AC_CHECK_PROG(have_awk, awk, yes, no)
+# checks for gawk and m4
+AC_CHECK_PROG(have_awk, gawk, yes, no)
 if test "$have_awk" = "yes"; then
    AC_CHECK_PROG(have_m4, m4, yes, no)
    if test "$have_m4" = "yes"; then
-      AC_DEFINE(HAVE_M4, 1, [Define to 1 if awk and m4 are available.])
+      AC_DEFINE(HAVE_M4, 1, [Define to 1 if gawk and m4 are available.])
    else
       AC_DEFINE(HAVE_M4, 0)
    fi
diff --git a/src/gerris.c b/src/gerris.c
index be85be5..c03c1dd 100644
--- a/src/gerris.c
+++ b/src/gerris.c
@@ -118,6 +118,10 @@ int main (int argc, char * argv[])
       /* fall through */
     }
     case 'm': /* macros */
+#ifndef HAVE_M4
+      gfs_error (0, "gerris: macros are not supported on this system\n");
+      return 1;
+#endif /* not HAVE_M4 */
       macros = TRUE;
       break;
     case 'd': /* data */
@@ -149,7 +153,7 @@ int main (int argc, char * argv[])
 	     "  -DNAME=VALUE         (macro support is implicitly turned on)\n"
 	     "         --define=NAME\n"
              "         --define=NAME=VALUE\n"
-#endif /* have m4 */
+#endif /* HAVE_M4 */
 	     "  -eEV   --event=EV    Evaluates GfsEvent EV and returns the simulation\n"
 	     "  -v     --verbose     Display more messages\n"
 	     "  -h     --help        display this help and exit\n"
@@ -165,7 +169,7 @@ int main (int argc, char * argv[])
 	       "  compiled with flags: %s\n"
 	       "  MPI:          %s\n"
 	       "  pkg-config:   %s\n"
-	       "  m4 and awk:   %s\n"
+	       "  m4 and gawk:  %s\n"
 	       "Copyright (C) 2001-2009 NIWA.\n"
 	       "This is free software; see the source for copying conditions.  There is NO\n"
 	       "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n",
@@ -205,7 +209,7 @@ int main (int argc, char * argv[])
   }
 
   if (macros) {
-    const gchar awk[] = "awk -f " GFS_MODULES_DIR "/m4.awk ";
+    const gchar awk[] = "gawk -f " GFS_MODULES_DIR "/m4.awk ";
     gchar * command;
     
     if (!strcmp (argv[optind], "-"))

-- 
Gerris Flow Solver



More information about the debian-science-commits mailing list