[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" configure.ac script
using a AC_DEFUN macro that I wrote to print "hello world". What I have is the
following:
AC_PREREQ(2.61)
AC_INIT(autoconf_test, 1.0,address@hidden)
# EG_MY_MACRO
# -----------------------------
AC_DEFUN( [EG_MY_MACRO],
m4_warn( [all], [hello world] )
) # EG_MY_MACRO
#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/Channels.pm line
546
Autom4te::Channels::msg('all', 'configure.ac:8', '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.
http://stackoverflow.com/questions/8578181/using-the-pkg-config-macro-pkg-check-modules-failing
I'm sure this is a fairly simple problem. I have a very simple configure.ac
file which I am using to just learn how autoconf & pkg-config work together.
The confgure.ac file looks like:
AC_PREREQ(2.61)
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
error:
./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
1.0.7
-I/usr/local/Cellar/usbmuxd/1.0.7/include
-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.
- simple autoconf question,
Eric Gorr <=