[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Issues using autoconf or automake
From: |
Eric Blake |
Subject: |
Re: Issues using autoconf or automake |
Date: |
Tue, 11 Mar 2014 09:08:39 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 |
On 03/11/2014 08:56 AM, Jim Galarowicz wrote:
>
>
> I'm including a section of m4/ax_libmonitor.m4 where HAVE_LIBMONITOR
> code looks like this:
>
> 52 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
> 53 #include <monitor.h>
> 54 ]], [[
> 55 monitor_init_library();
> 56 ]])], [ AC_MSG_RESULT(yes)
> 57
> 58 AM_CONDITIONAL(HAVE_LIBMONITOR, true)
Wrong place.
> 59 AC_DEFINE(HAVE_LIBMONITOR, 1, [Define to 1 if you
> have libmonitor.])
> 60
> 61 ], [ AC_MSG_RESULT(no)
> 62
> 63 AM_CONDITIONAL(HAVE_LIBMONITOR, false)
Also wrong.
> 64 LIBMONITOR_CPPFLAGS=""
> 65 LIBMONITOR_LDFLAGS=""
> 66 LIBMONITOR_LIBS=""
> 67 LIBMONITOR_DIR=""
> 68
> 69 ]
> 70 )
>
AM_CONDITIONAL is designed to be called at the top level, outside of
AC_LINK_IFELSE. Try:
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#include <monitor.h>
]], [[
monitor_init_library();
]])], [ AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_LIBMONITOR, 1, [Define to 1 if you have
libmonitor.])
], [ AC_MSG_RESULT(no)
LIBMONITOR_CPPFLAGS=""
LIBMONITOR_LDFLAGS=""
LIBMONITOR_LIBS=""
LIBMONITOR_DIR=""
]
)
AM_CONDITIONAL([HAVE_LIBMONITOR], [test "$HAVE_LIBMONITOR" = 1"])
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- Issues using autoconf or automake, Jim Galarowicz, 2014/03/11
- Re: Issues using autoconf or automake, Patrick Welche, 2014/03/11
- Re: Issues using autoconf or automake, Jim Galarowicz, 2014/03/11
- Re: Issues using autoconf or automake,
Eric Blake <=
- Re: Issues using autoconf or automake, Jim Galarowicz, 2014/03/11
- Re: Issues using autoconf or automake, Gavin Smith, 2014/03/11
- Re: Issues using autoconf or automake, Jim Galarowicz, 2014/03/11
- Re: Issues using autoconf or automake, Gavin Smith, 2014/03/11
- Re: Issues using autoconf or automake, Jim Galarowicz, 2014/03/11
- Re: Issues using autoconf or automake, Jim Galarowicz, 2014/03/12
- Re: Issues using autoconf or automake, Gavin Smith, 2014/03/12
- Re: Issues using autoconf or automake, Jim Galarowicz, 2014/03/12