Put LDFLAGS near the end because we don't want the MacPorts -L flag to supersede the project's own -L flags. We want to use the just-built copy of libtaucs, not an older one that was already installed. --- configurator/taucs_config.c.orig 2003-09-04 04:08:32.000000000 -0500 +++ configurator/taucs_config.c 2018-11-27 14:27:51.000000000 -0600 @@ -432,9 +432,9 @@ fprintf(f, "\t $(CILKOUTFLG)%s\n", get_full_name(i,object)); } - fprintf(f,"\t- $(LD) $(LDFLAGS) \\\n"); + fprintf(f,"\t- $(LD) \\\n"); fprintf(f,"\t $(LOUTFLG)%s \\\n",get_full_name(i,executable)); - fprintf(f,"\t %s $(LIBS)\n",get_full_name(i,object)); + fprintf(f,"\t %s $(LDFLAGS) $(LIBS)\n",get_full_name(i,object)); fprintf(f,"\t- %s",get_full_name(i,executable)); fprintf(f, " %s%c%s%s%c%s\n", @@ -587,7 +587,7 @@ } fprintf(f,"\n"); - fprintf(f,"\t$(LD) $(LDFLAGS) \\\n"); + fprintf(f,"\t$(LD) \\\n"); fprintf(f,"\t$(LOUTFLG)%s \\\n",get_full_name(i,0)); for (k=0; files[k].name; k++) { if (files[k].state != i) continue; @@ -599,7 +599,7 @@ if ( ! (files[k].state) ) continue; /* except if the lib is not built at all */ fprintf(f, "\t%s \\\n",get_lib_spec(k)); } - fprintf(f,"\t$(LIBS)\n"); + fprintf(f,"\t$(LDFLAGS) $(LIBS)\n"); } }