Opened 12 years ago

Closed 12 years ago

#1943 closed defect (invalid)

configure.in: LOC_CHECK_LIB_PATH() does nothing?

Reported by: hamish Owned by: grass-dev@…
Priority: normal Milestone: 7.0.0
Component: Compiling Version: svn-trunk
Keywords: configure.in Cc:
CPU: x86-64 Platform: Linux

Description

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

Change History (3)

in reply to:  description ; comment:1 by glynn, 12 years ago

Replying to 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.

in reply to:  1 comment:2 by hamish, 12 years ago

Replying to 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 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

in reply to:  1 comment:3 by hamish, 12 years ago

Resolution: invalid
Status: newclosed

Replying to 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

Note: See TracTickets for help on using tickets.