On Fri, 12 Feb 2010, Braden McDaniel wrote:
So, what I would like to do is checking Mac OS X headers in an m4 macro.
If the objective C compiler is installed, no problem. If it is not, i
would like that, in the m4 macro, the test not to be done.
i think that you didn't understood the problem or i didn't explain it
very well.
Well, I think you would have been able to describe the problem better if
you had simplified your test.
AFAICT, this is all you need to demonstrate the problem:
AC_INIT([test], [0.0])
AM_INIT_AUTOMAKE
LT_INIT
AC_PROG_OBJC
AC_PROG_OBJCPP
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
Actually, if everything is in the configure, i know how to avoid the
problem:
m4_ifdef([AC_PROG_OBJC],
[
AC_PROG_OBJC
_AM_DEPENDENCIES(OBJC)
],
[
AC_CHECK_TOOL([OBJC], [gcc])
AC_SUBST([OBJC])
AC_SUBST([OBJCFLAGS])
])
AC_PROG_CC
if test "x${ac_cv_objc_compiler_gnu}" = "xyes" ; then
AC_LANG_PUSH([Objective C])
AC_CHECK_HEADER([Cocoa/Cocoa.h],
[
have_quartz="yes"
quartz_ldflags="-framework Cocoa"
],
[have_quartz="no"])
AC_LANG_POP([Objective C])
fi
but doing the same test in the m4 macro does not work. I don't understand
why.
Vincent Torri
_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
http://lists.gnu.org/mailman/listinfo/autoconf