--- geopolmap.c.orig	2022-11-25 12:07:10
+++ geopolmap.c	2022-11-25 12:09:23
@@ -303,7 +303,7 @@
     char test_path[128];
 
     strcpy(test_path, env);
-    strcat(test_path, "/bin/gmt");
+    strcat(test_path, "/bin/gmt6");
 
     stat(test_path, &sb);
     if ((sb.st_mode & S_IFMT) == S_IFREG) {
@@ -312,9 +312,9 @@
     }
   }
 
-  stat("/usr/local/bin/gmt", &sb);
+  stat("@@PREFIX@@/bin/gmt6", &sb);
   if ((sb.st_mode & S_IFMT) == S_IFREG) {
-    strcpy(gmt_path, "/usr/local");
+    strcpy(gmt_path, "@@PREFIX@@");
     rc = true;
   }
 
@@ -324,7 +324,7 @@
     rc = true;
   }
 
-  stat("/bin/gmt", &sb);
+  stat("/bin/gmt6", &sb);
   if ((sb.st_mode & S_IFMT) == S_IFREG) {
     rc = true;
   }
@@ -361,7 +361,7 @@
   /* GMT5 only supports one of borders, shores, or rivers in in one command.
    * So now we have to string multiple pscoast commands together.
    */
-  sprintf(command, "%s/bin/gmt pscoast -R%d/%d/%d/%d -M -Jx1d %s",
+  sprintf(command, "%s/bin/gmt6 pscoast -R%d/%d/%d/%d -M -Jx1d %s",
 	gmt_path, xMin, xMax, yMin, yMax, scale_str);
 
   sprintf(buf, "(%s -Na; %s -W;", command, command);
