[GRASS-dev] [GRASS GIS] #1943: configure.in: LOC_CHECK_LIB_PATH() does nothing?

#1943: configure.in: LOC_CHECK_LIB_PATH() does nothing?
--------------------------+-------------------------------------------------
Reporter: hamish | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Compiling | Version: svn-trunk
Keywords: configure.in | Platform: Linux
      Cpu: x86-64 |
--------------------------+-------------------------------------------------
Hi,

AFAICT the LOC_CHECK_LIB_PATH() checks in configure.in doesn't actually do
anything beyond print a message to the log saying:
  checking for location of Whatever library...

e.g. I can add this to configure.in:
  LOC_CHECK_LIB_PATH(foo,bar,BAZPATH)

and it just says "checking for location of bar library..." and goes on to
the next thing without error. Nothing to see in the config.log file
either.

?,
Hamish

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1943&gt;
GRASS GIS <http://grass.osgeo.org>

#1943: configure.in: LOC_CHECK_LIB_PATH() does nothing?
--------------------------+-------------------------------------------------
Reporter: hamish | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Compiling | Version: svn-trunk
Keywords: configure.in | Platform: Linux
      Cpu: x86-64 |
--------------------------+-------------------------------------------------

Comment(by glynn):

Replying to [ticket:1943 hamish]:

> AFAICT the LOC_CHECK_LIB_PATH() checks in configure.in doesn't actually
do anything beyond print a message to the log saying:
> checking for location of Whatever library...

It prints a message, checks that that the specified directories exist, and
either adds appropriate -L switches to the variable specified by the third
argument or (if any specified directory doesn't exist) generates an error.

It doesn't check for the existence or validity of a specific library; it
just validates the directories specified with the --with-<package>-libs=
switch. It can't check the validity of a library, as the arguments don't
include the actual link name of a library (the first argument specifies
the name of the switch, the second argument is the name to be printed in
the "Checking ...." message).

Use LOC_CHECK_LIBS or LOC_CHECK_FUNC to check for the validity of
particular libraries.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1943#comment:1&gt;
GRASS GIS <http://grass.osgeo.org>

#1943: configure.in: LOC_CHECK_LIB_PATH() does nothing?
--------------------------+-------------------------------------------------
Reporter: hamish | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Compiling | Version: svn-trunk
Keywords: configure.in | Platform: Linux
      Cpu: x86-64 |
--------------------------+-------------------------------------------------

Comment(by hamish):

> Replying to [ticket:1943 hamish]:
> > AFAICT the LOC_CHECK_LIB_PATH() checks in configure.in doesn't
> > actually do anything beyond print a message to the log saying:
> > checking for location of Whatever library...

Replying to [comment:1 glynn]:
> It prints a message, checks that that the specified directories
> exist, and either adds appropriate -L switches to the variable
> specified by the third argument or (if any specified directory
> doesn't exist) generates an error.

Thanks for the detailed answer, I've had trouble finding the docs online..
however..

I've got the general idea of what it's supposed to do, the trouble is
(AFAICT) is that it isn't doing it. It isn't doing anything beyond
printing the "Checking ..." message.

Thus the made up
{{{
     LOC_CHECK_LIB_PATH(foo,bar,BAZPATH)
}}}

still passes the test, and the variable in the third argument isn't
getting populated with the contents of the --with-xx-libs= string.

i.e., AFAICT, it's broken in multiple ways.

Hamish

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1943#comment:2&gt;
GRASS GIS <http://grass.osgeo.org>

#1943: configure.in: LOC_CHECK_LIB_PATH() does nothing?
------------------------+---------------------------------------------------
  Reporter: hamish | Owner: grass-dev@…
      Type: defect | Status: closed
  Priority: normal | Milestone: 7.0.0
Component: Compiling | Version: svn-trunk
Resolution: invalid | Keywords: configure.in
  Platform: Linux | Cpu: x86-64
------------------------+---------------------------------------------------
Changes (by hamish):

  * status: new => closed
  * resolution: => invalid

Comment:

Replying to [comment:1 glynn]:
> (the first argument specifies the name of the switch,

this was my error. the upper/lower cases was not the same as the switch's
name, so the rest wasn't getting picked up.

fixed in r55961, Platform.make now gets the contents of the --with-xx-libs
line.

I still don't understand why it doesn't pick up my libOpenCL.so in the
ldconfig'd /opt dir, but that's another matter..

thanks,
Hamish

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1943#comment:3&gt;
GRASS GIS <http://grass.osgeo.org>