<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Arial,Helvetica,sans-serif;" dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Arial,Helvetica,sans-serif;" dir="ltr">
<p>-1</p>
<p><br>
</p>
<p>We have the options to build drivers against static and dynamic libraries of its SDKs, like HDF4,5 and openjpeg for example, using the same "--with-driver-name" </p>
<p><span style="font-size: 12pt;"><br>
</span></p>
<p><span style="font-size: 12pt;">Why not keep that same option for proj4?</span></p>
<p><span style="font-size: 12pt;"><br>
</span></p>
<p>--with-proj4=<static or dynamic>-library-path</p>
<p><br>
</p>
<p>I have projects where I let user to decide if they want to download and install proj4 while using GDAL and I would prefer to keep that option. </p>
<p><br>
</p>
<p>Maybe with a compiler option we can basically "remove" the dynamic load when static linked proj4 was used. Config can translate the --with-proj4 into a C++ define, right?</p>
<p><br>
</p>
<p><span style="font-size: 12pt;">Regards,</span><br>
</p>
<p>Ivan</p>
<p><br>
</p>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> gdal-dev <gdal-dev-bounces@lists.osgeo.org> on behalf of Kurt Schwehr <schwehr@gmail.com><br>
<b>Sent:</b> Saturday, May 6, 2017 11:20:34 AM<br>
<b>To:</b> Even Rouault<br>
<b>Cc:</b> gdal dev<br>
<b>Subject:</b> Re: [gdal-dev] Dropping dlopen/LoadLibrary loading of proj.4 ?</font>
<div> </div>
</div>
<div>
<div dir="auto">+1</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On May 6, 2017 4:58 AM, "Even Rouault" <<a href="mailto:even.rouault@spatialys.com">even.rouault@spatialys.com</a>> wrote:<br type="attribution">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<u></u>
<div style="font-family:'monospace';font-size:9pt;font-weight:400;font-style:normal">
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">
Hi,</p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">
</p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">
Currently the default mode of linking GDAL with proj.4 is to use dynamic loading mechanism (dlopen on Unix, LoadLibary on Windows). I believe the reason for that was that it could have make it easier to use an alternate projection engine, but apparently nobody
cared enough to plug a new one, and it could be done with standard linking. One downside of the current mechanism (besides code complication) is that it requires to list the exact library name of proj4 in GDAL source code, which can change depending on the
soname of proj4. And this can cause subtle issues like</p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">
<a href="https://trac.osgeo.org/gdal/ticket/6881" target="_blank">https://trac.osgeo.org/gdal/<wbr>ticket/6881</a></p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">
</p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">
So I'd suggest just keeping standard linking mechanism, and renaming the current --with-static-proj4 configure flag as --with-proj4, as the current name is confusing, and making it the default behaviour.</p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">
</p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">
Any thoughts ?</p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">
</p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">
Even</p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">
</p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">
-- </p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">
Spatialys - Geospatial professional services</p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">
<a href="http://www.spatialys.com" target="_blank">http://www.spatialys.com</a></p>
</div>
<br>
______________________________<wbr>_________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev" rel="noreferrer" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/gdal-dev</a><br>
</blockquote>
</div>
</div>
</div>
</div>
</body>
</html>