[GRASS5] Re: auto-locate EPSG
Hamish
hamish_nospam at yahoo.com
Sun Apr 30 23:28:31 EDT 2006
> > I have things in /usr/local/... and usually do not use any
> > parameters for proj.
> > Maybe /usr/local/share needs to be predefined somewhere to catch
> > that?
back to the hardcoded /usr/local/share ...
If you are going to hardcode something, at least scan a little to cover
the other common cases, (add osx? fink? cygwin?)
# Define share/proj/ directory for epsg code file
PROJSHARE=
if test -n "$PROJINC"; then
PROJSHARE="$PROJINC/../share/proj"
else
for testdir in /usr /usr/local ; do
if test -d $testdir/share/proj ; then
PROJSHARE=$testdir/share/proj
break
fi
done
fi
# if unset default to /usr/local/share/proj as a hint
if [ -z "$PROJSHARE" ] ; then
PROJSHARE=/usr/local/share/proj
fi
> I guess that
> $PROJLIB/../share
> should be predefined (will catch most cases).
but that means you have to use --with-proj-libs=/usr/local/lib to
get $PROJLIB defined? AFAIK it isn't autodetected, it just either is in
the search path or requires a custom setting. So back to the same
problem.
is there a `dirname, pwd, eval` combo that can change local/lib/../share
into local/share ?
Hamish
Hamish
More information about the grass-dev
mailing list