Page 1 of 1

configure.ac:27: error: possibly undefined macro: AS_IF

Posted: 17 Aug 2007 00:55
by herman.schultz
Hi,

I am trying to compile vlc under RHEL4.

I have 'automake 1.9.6' 'autoconf 2.61' 'aclocal 1.9.6' 'm4 1.4.8' in my system:

And when I run 'bootstrap' , i get the following error:
Copying file po/Makevars.template
+ rm -f po/Makevars.template
+ aclocal-1.9 -I /root/build-bin/share/aclocal-1.9 -I
/root/build-bin/share/aclocal -I /root/build-bin/share/autoconf -I
/root/video-dep-bin/share/aclocal -I m4
+ autoconf
configure.ac:1: error: possibly undefined macro: dnl
If this token and others are legitimate, please use
m4_pattern_allow.
See the Autoconf documentation.
configure.ac:27: error: possibly undefined macro: AS_IF
configure.ac:41: error: possibly undefined macro: AC_DEFINE
configure.ac:78: error: possibly undefined macro: AC_MSG_ERROR
configure.ac:81: error: possibly undefined macro: AC_MSG_WARN
configure.ac:181: error: possibly undefined macro: AC_ARG_ENABLE
configure.ac:379: error: possibly undefined macro: AC_CHECK_LIB
configure.ac:449: error: possibly undefined macro: AC_CHECK_HEADERS
configure.ac:2089: error: possibly undefined macro: AC_PATH_PROG
configure.ac:5094: error: possibly undefined macro: AC_PATH_PROGS

I see this thread has similar problem,
viewtopic.php?f=13&t=32996&start=0&st=0&sk=t&sd=a

But for my case, I already have 'automake 1.9.6' 'autoconf 2.61' 'aclocal 1.9.6' installed.
And that did not help my problem.

Re: configure.ac:27: error: possibly undefined macro: AS_IF

Posted: 17 Aug 2007 16:29
by funman
do you have libtool ?

Re: configure.ac:27: error: possibly undefined macro: AS_IF

Posted: 04 Sep 2007 02:49
by autotools_suck
Your autotools probably can't see certain m4 macros. I had the exact same error message as you. The problem in my case was that the macros for pkg-config could not be found. So I added "-I /opt/pkg-config/share/aclocal" (pkg-config is installed under /opt/pkg-config on my system) to the contents of the environment variable "ACLOCAL_ARGS", re-ran bootstrap and it worked.

The macros mentioned in the error message, "dnl", "AS_IF", etc., had nothing to do with my problem. The error messages produced by the autotools appear to be useless. They should just print "Something went wrong, I don't know what." That would at least be honest, and arguably more helpful.

Re: configure.ac:27: error: possibly undefined macro: AS_IF

Posted: 09 Sep 2007 19:28
by RĂ©mi Denis-Courmont
Looks like your "autoconf" is autoconf 2.1x, even though you may have autoconf 2.61 installed under a different name.

Re: configure.ac:27: error: possibly undefined macro: AS_IF

Posted: 25 Oct 2007 20:11
by delfo
I found this post while looking for a solution to "possibly undefined macro: AC_MSG_WARN" messages. I was running autoconf 2.61 under Cygwin. I just installed pkg-config and the problem went away. Thanks.

Re: configure.ac:27: error: possibly undefined macro: AS_IF

Posted: 12 Jan 2012 11:04
by ccsosnfs
Your autotools probably can't see certain m4 macros. I had the exact same error message as you. The problem in my case was that the macros for pkg-config could not be found. So I added "-I /opt/pkg-config/share/aclocal" (pkg-config is installed under /opt/pkg-config on my system) to the contents of the environment variable "ACLOCAL_ARGS", re-ran bootstrap and it worked.

The macros mentioned in the error message, "dnl", "AS_IF", etc., had nothing to do with my problem. The error messages produced by the autotools appear to be useless. They should just print "Something went wrong, I don't know what." That would at least be honest, and arguably more helpful.
Thank you.It worked

Re: configure.ac:27: error: possibly undefined macro: AS_IF

Posted: 10 Jan 2013 22:20
by Vaselinessa
I had this problem, and the fix was to run Cygwin's setup.exe file again and use it to install pkg-config (which was skipped by default).