[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

simple autoconf question

From: Eric Gorr
Subject: simple autoconf question
Date: Tue, 20 Dec 2011 14:28:55 -0500

I am just starting to experiment with build tools like autoconf, etc. and had 
what I am sure is a silly/stupid/easy question, but one that I still don't know 
the answer to.

I am just trying to write a very simple, "hello, world" script 
using a AC_DEFUN macro that I wrote to print "hello world". What I have is the 

   AC_INIT(autoconf_test, 1.0,address@hidden)

   # -----------------------------
   m4_warn( [all], [hello world] )
   ) # EG_MY_MACRO


However, when I execute autoconf, I get the following error message:

   ~/depot/autoconf_test $autoconf
   unknown channel all at /usr/bin/../share/autoconf/Autom4te/ line 
       Autom4te::Channels::msg('all', '', 'warning: hello world 
') called at /usr/bin/autom4te line 1012

and there is no configure script generated.

Furthermore, what prompted this question is one I posted to stackoverflow...if 
you know the answer to this, I would be interested.

I'm sure this is a fairly simple problem. I have a very simple 
file which I am using to just learn how autoconf & pkg-config work together. 
The file looks like:

   AC_INIT(autoconf_test, 1.0,address@hidden)

   PKG_CHECK_MODULES(libusbmuxd, libusbmuxd >= 0.1.4)

I can then execute autoconf from the command line and it does produce a 
configure script. However, when I run the configure script, I get the following 

   ./configure: line 1618: syntax error near unexpected token `libusbmuxd,'
   ./configure: line 1618: `PKG_CHECK_MODULES(libusbmuxd, libusbmuxd >= 0.1.4)'

If I use the pkg-config program from the command line to check to see whether 
it can find this library, it succeeds.

   /usr/lib/pkgconfig $pkg-config --libs --cflags --modversion libusbmuxd

-L/usr/local/Cellar/usbmuxd/1.0.7/lib -lusbmuxd

So, it seems clear that for some reason the PGK_CHECK_MODULE macro cannot be 
located and I am not sure why.

This probably isn't OS specific, but I am using Mac OS X 10.6.8.

Thank you.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]