--ldflags oddness in geos-config

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

--ldflags oddness in geos-config

Greg Troxel-2
pkgsrc is carrying this patch.  When expanded  in our build, this turns
into

    --ldflags)
      echo -L${exec_prefix}/lib -Wl,-R/usr/pkg/lib
      ;;

It seems clear that the rpath type instructions need to be continued on;
without it the build of the program that depends on geos will be wrong.
(I'm not clear on why the -L argument doesn't get duplicated.)

Plus, it seems all the --libs stanzas have -L${exec_prefix}/lib in them,
even though those are lddfags, not libs.

Does this work for anyone, intalling into a prefix not in the default
link path, and using geos-config to build something against geos to a
third prefix so that there isn't a rpath command for the geos libdir?

Thoughts?


--- tools/geos-config.in.orig   2019-10-03 17:32:04.000000000 +0000
+++ tools/geos-config.in
@@ -58,7 +58,7 @@ case $1 in
       echo -L@libdir@ -lgeos -lm
       ;;
     --ldflags)
-      echo -L@libdir@
+      echo -L@libdir@ @LDFLAGS@
       ;;
     --includes)
       echo @prefix@/include
_______________________________________________
geos-devel mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geos-devel
Reply | Threaded
Open this post in threaded view
|

Re: --ldflags oddness in geos-config

Greg Troxel-2
Greg Troxel <[hidden email]> writes:

> Plus, it seems all the --libs stanzas have -L${exec_prefix}/lib in them,
> even though those are lddfags, not libs.

Theory:
geos considers "libs" to be
  -L$prefix/lib -lgeos_c
and "ldflags"  to be extra stuff

So in addition to my patch, probably the -L in ldflags should be
dropped.
_______________________________________________
geos-devel mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geos-devel