-1

I did install the libnfc 1.5.1 in the default directory (/usr/loca/ lib).

if i do an ls i see the libs there:

foo:libnfc-1.5.1 bar$ ls -l /usr/local/lib/libnfc* 
-rwxr-xr-x  1 root  wheel   62092 Nov 23 09:05 /usr/local/lib/libnfc.2.dylib 
-rw-r--r--  1 root  wheel  226696 Nov 23 09:05 /usr/local/lib/libnfc.a 
lrwxr-xr-x  1 root  wheel      14 Nov 23 09:05 /usr/local/lib/libnfc.dylib ->libnfc.2.dylib 
-rwxr-xr-x  1 root  wheel     930 Nov 23 09:05 /usr/local/lib/libnfc.la 
foo:libnfc-1.5.1 bar$ 

I did try to run the configure script from mfoc with the following command:

LDFLAGS="-L/usr/local/lib"  ./configure 

it says that I don't have libnfc >= 1.5.1

checking for LIBNFC... no 
configure: error: libnfc >= 1.5.1 is mandatory. 

any idea?

VP.
  • 5,122
  • 6
  • 46
  • 71
  • 2 ideas: 1) Stale cache. 2) Look in config.log (it will tell you exactly why it couldn't find the library.) – William Pursell Nov 23 '11 at 11:43
  • 3rd idea: the configure script from mfoc is fubar. (I know nothing about mfoc, but it is common for configure scripts to be broken. Do not expect this, but do not discount it either.) – William Pursell Nov 23 '11 at 11:45
  • 1
    4 idea: Is it using pkg-config? The error looks a bit like that. Try setting PKG_CONFIG_PATH=/usr/local/lib/pkgconfig – William Pursell Nov 23 '11 at 11:46
  • 1
    I'm assuming this configure script is generated by autoconf; is that correct? (If so, the question should probably be tagged autoconf.) – William Pursell Nov 23 '11 at 11:50

2 Answers2

3

This is a guess, but the error looks like it comes from pkg-config. Try:

$ ./configure LDFLAGS=-L/usr/local/lib PKG_CONFIG_PATH=/usr/local/lib/pkgconfig

You really need to look in config.log to see exactly why it cannot find the library.

EDIT: It has often been claimed that pkg-config is fundamentally broken. This case has finally persuaded me that that is indeed true. Setting LDFLAGS should be sufficient, and the fact that it isn't renders this configure script broken. With that in mind, it might be better to disable pkg-config by running configure with the argument PKG_CONFIG=:

William Pursell
  • 204,365
  • 48
  • 270
  • 300
1

Try setting DYLD_LIBRARY_PATH variable and point it to /usr/local/lib before running ./configure:

$ export DYLD_LIBRARY_PATH=/usr/local/lib
$ ./configure
Pablo Santa Cruz
  • 176,835
  • 32
  • 241
  • 292