On 03/11/05 16:57, Markus Neteler wrote:
> Does anyone know how to modify 'configure.in' for this problem?

LOC_CHECK_VERSION does 2 tests. First it tries to compile this program:
#include "confdefs.h"

#include <stdio.h>
#include <proj_api.h>
int main(void) {
 FILE *fp = fopen("conftestdata","w");
 fputs(PJ_VERSION, fp);
 return 0;

Since PJ_VERSION is defined to be 449 or some similar number this will
produce a compiler warning. -Werror will make gcc act as if warning are
errors ==> compilation fails and this is never run. The macro then tries
to build this program:

#include "confdefs.h"

#include <stdio.h>
#include <$1>
int main(void) {
 FILE *fp = fopen("conftestdata","w");
 fprintf(fp, "%d", $2);
 return 0;

which will compile in this case, and write the version to the
conftestdata file.

So to fix this all you need to do is introduce the -Werror flag to the
gcc commandline, which is trivial to do. All you need to do is modify
configure.in line 516. Add -Werror to the 5th parameter of the macro call.

Your line should now look something like this: (without linebreaks).

                External PROJ.4,proj_ver,$PROJINC -Werror,UNKNOWN)

I don't have a BSD to test on so I can't say if this works or not, but
on GNU/Linux PowerPC it does work.



<:3 )---- Wolf Bergenheim ----( 8:>

Pkg-grass-devel mailing list

Reply via email to