2

After many issues, I think I successfully installed/compiled libnfc using these instructions.

Now I am trying to compile/install mfcuk. Once I get to the ./configure step I get the following error

Sam@Sam-PC /c/Users/Sam/Documents/mfcuk/mfcuk-read-only
$ ./configure
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.exe
checking for suffix of executables... .exe
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for a BSD-compatible install... /bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
./configure: line 3739: syntax error near unexpected token `LIBNFC,'
./configure: line 3739: `PKG_CHECK_MODULES(LIBNFC, libnfc >= $LIBNFC_REQUIRED_VE
RSION, , AC_MSG_ERROR([libnfc >= $LIBNFC_REQUIRED_VERSION is mandatory.]))'

I'm guessing this has something to do with my not properly telling something(pkg-config?) where libnfc is? Any help is greatly appreciated.

2 Answers 2

0

A "syntax error" is usually not the expected error message if pkg-config can't find a module. But it may be that the properly installed libnfc will provide the LIBNFC macro that configure purports to be unable to find.

You could try ./autogen.sh and then re-run configure; that might help if the default shipped configure script is bad (autogen.sh regenerates configure from configure.in, provided you have the correct dependencies installed (autoconf, automake, GNU make, and, usually, libtool.)

If that doesn't work, you need to run ./configure --help and figure out the environment variables to specify to manually set the path to libnfc's headers and libraries. The paths to actually set in the environment will depend entirely on where (if anywhere) you installed libnfc... the headers are the .h files and the libs are the .dll files (or .a files if you're compiling statically).

Don't have specific experience with mfcuk but autoconf stuff should work the same between packages... I do have a fair bit of experience with autoconf on Windows/MinGW32. So post back if you get stuck.

1
  • Unable to get anything from here to make a difference. ./autogen.sh doesn't run, nothing in the ./configure --help seems to be particularly like an option to set the environment variables for libnfc (though I have set them in windows) I did try --libexecdir, to no avail.
    – Drake
    Jul 24, 2012 at 8:06
0

If the package you are compiling is nfc-tools, then this problem is described in Issue 76: Compile libnfc-llcp - error.

It is claimed that this was fixed by revision r955, dating from Oct 18, 2011 :

libnfc-llcp: set mqueue.h and pkg-config as requierements in configure.ac (Fixes Issue 76 )

You might try to get a newer version of configure.ac to fix the error.

The Download page lists as latest nfc-eventd-0.1.5.tar.gz from November 2011 which might be useful, or you could try the svn source.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .