autoconf
[Top][All Lists]
Advanced

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

Re: Issues using autoconf or automake


From: Jim Galarowicz
Subject: Re: Issues using autoconf or automake
Date: Tue, 11 Mar 2014 10:00:26 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0

Hi Eric, Patrick, all,

I made those changes also. Here is what I have in the two m4 files now (for that area).

m4/ax_qt3.m4:

   450        if test $found_all_qt -eq 1; then
451 AC_DEFINE(HAVE_QTLIB, 1, [Define to 1 if you have Qt library 3.3 >])
   452        fi
   453
   454        AM_CONDITIONAL([HAVE_QTLIB], [test $found_all_qt -eq 1])
   455
   456    ])

m4/ax_libmonitor.m4:

    52        AC_LINK_IFELSE([AC_LANG_PROGRAM([[
    53            #include <monitor.h>
    54            ]], [[
    55            monitor_init_library();
    56            ]])], [ AC_MSG_RESULT(yes)
    57
58 AC_DEFINE(HAVE_LIBMONITOR, 1, [Define to 1 if you have libmonitor.])
    59
    60            ], [ AC_MSG_RESULT(no)
    61
    62                LIBMONITOR_CPPFLAGS=""
    63                LIBMONITOR_LDFLAGS=""
    64                LIBMONITOR_LIBS=""
    65                LIBMONITOR_DIR=""
    66
    67            ]
    68        )
69 AM_CONDITIONAL([HAVE_LIBMONITOR], [test "$HAVE_LIBMONITOR" = 1])
    70


Same results:

config.status: config.h is unchanged
config.status: executing depfiles commands
config.status: executing libtool commands
address@hidden OpenSpeedShop]$ make
CDPATH="${ZSH_VERSION+.}:" && cd . && aclocal-1.13 -I libltdl/m4
 cd . && automake-1.13 --foreign
Makefile.am:63: error: HAVE_QTLIB does not appear in AM_CONDITIONAL
libopenss-runtime/Makefile.am:31: error: HAVE_LIBMONITOR does not appear in AM_CONDITIONAL libopenss-runtime/Makefile.am:72: error: HAVE_LIBMONITOR does not appear in AM_CONDITIONAL libopenss-runtime/Makefile.am:80: error: HAVE_PAPI does not appear in AM_CONDITIONAL libopenss-runtime/Makefile.am:92: error: HAVE_BINUTILS does not appear in AM_CONDITIONAL libopenss-runtime/Makefile.am:104: error: HAVE_LIBUNWIND does not appear in AM_CONDITIONAL libopenss-runtime/Makefile.am:128: error: HAVE_LIBMONITOR does not appear in AM_CONDITIONAL
l...


I removed the autom4te.cache directory before the bootstrap and then grepped for HAVE_QTLIB after the bootstrap in that directory. Does this help to see anything wrong? It appears to be showing that it was not defined, even with the new syntax: AM_CONDITIONAL([HAVE_QTLIB], [test $found_all_qt -eq 1])
greps for HAVE_LIBMONITOR shows similar output.

address@hidden autom4te.cache]$ grep HAVE_QTLIB *
output.0:HAVE_QTLIB_FALSE
output.0:HAVE_QTLIB_TRUE
output.0:$as_echo "@%:@define HAVE_QTLIB 1" >>confdefs.h
output.0:  HAVE_QTLIB_TRUE=
output.0:  HAVE_QTLIB_FALSE='#'
output.0:  HAVE_QTLIB_TRUE='#'
output.0:  HAVE_QTLIB_FALSE=
output.0:if test -z "${HAVE_QTLIB_TRUE}" && test -z "${HAVE_QTLIB_FALSE}"; then
output.0:  as_fn_error $? "conditional \"HAVE_QTLIB\" was never defined.
output.1:HAVE_QTLIB_FALSE
output.1:HAVE_QTLIB_TRUE
output.1:$as_echo "@%:@define HAVE_QTLIB 1" >>confdefs.h
output.1:  HAVE_QTLIB_TRUE=
output.1:  HAVE_QTLIB_FALSE='#'
output.1:  HAVE_QTLIB_TRUE='#'
output.1:  HAVE_QTLIB_FALSE=
output.1:if test -z "${HAVE_QTLIB_TRUE}" && test -z "${HAVE_QTLIB_FALSE}"; then
output.1:  as_fn_error $? "conditional \"HAVE_QTLIB\" was never defined.
output.2:HAVE_QTLIB_FALSE
output.2:HAVE_QTLIB_TRUE
output.2:$as_echo "@%:@define HAVE_QTLIB 1" >>confdefs.h
output.2:  HAVE_QTLIB_TRUE=
output.2:  HAVE_QTLIB_FALSE='#'
output.2:  HAVE_QTLIB_TRUE='#'
output.2:  HAVE_QTLIB_FALSE=
output.2:if test -z "${HAVE_QTLIB_TRUE}" && test -z "${HAVE_QTLIB_FALSE}"; then
output.2:  as_fn_error $? "conditional \"HAVE_QTLIB\" was never defined.
traces.0: AC_DEFINE(HAVE_QTLIB, 1, [Define to 1 if you have Qt library 3.3 >])
traces.0:    AM_CONDITIONAL([HAVE_QTLIB], [test $found_all_qt -eq 1])
traces.0:m4trace:configure.ac:574: -1- m4_pattern_allow([^HAVE_QTLIB$])
traces.0:m4trace:configure.ac:574: -1- AM_CONDITIONAL([HAVE_QTLIB], [test $found_all_qt -eq 1])
traces.0:m4trace:configure.ac:574: -1- m4_pattern_allow([^HAVE_QTLIB_TRUE$])
traces.0:m4trace:configure.ac:574: -1- m4_pattern_allow([^HAVE_QTLIB_FALSE$])
traces.0:m4trace:configure.ac:574: -1- _AM_SUBST_NOTMAKE([HAVE_QTLIB_TRUE])
traces.0:m4trace:configure.ac:574: -1- _AM_SUBST_NOTMAKE([HAVE_QTLIB_FALSE])
traces.1: AC_DEFINE(HAVE_QTLIB, 1, [Define to 1 if you have Qt library 3.3 >])
traces.1:    AM_CONDITIONAL([HAVE_QTLIB], [test $found_all_qt -eq 1])
traces.1:m4trace:configure.ac:574: -1- m4_pattern_allow([^HAVE_QTLIB$])
traces.1:m4trace:configure.ac:574: -1- AM_CONDITIONAL([HAVE_QTLIB], [test $found_all_qt -eq 1])
traces.1:m4trace:configure.ac:574: -1- m4_pattern_allow([^HAVE_QTLIB_TRUE$])
traces.1:m4trace:configure.ac:574: -1- m4_pattern_allow([^HAVE_QTLIB_FALSE$])
traces.1:m4trace:configure.ac:574: -1- _AM_SUBST_NOTMAKE([HAVE_QTLIB_TRUE])
traces.1:m4trace:configure.ac:574: -1- _AM_SUBST_NOTMAKE([HAVE_QTLIB_FALSE])
traces.2:m4trace:configure.ac:574: -1- AC_DEFINE_TRACE_LITERAL([HAVE_QTLIB])
traces.2:m4trace:configure.ac:574: -1- m4_pattern_allow([^HAVE_QTLIB$])
traces.2:m4trace:configure.ac:574: -1- AH_OUTPUT([HAVE_QTLIB], [/* Define to 1 if you have Qt library 3.3 > */
traces.2:@%:@undef HAVE_QTLIB])
traces.2:m4trace:configure.ac:574: -1- AM_CONDITIONAL([HAVE_QTLIB], [test $found_all_qt -eq 1])
traces.2:m4trace:configure.ac:574: -1- AC_SUBST([HAVE_QTLIB_TRUE])
traces.2:m4trace:configure.ac:574: -1- AC_SUBST_TRACE([HAVE_QTLIB_TRUE])
traces.2:m4trace:configure.ac:574: -1- m4_pattern_allow([^HAVE_QTLIB_TRUE$])
traces.2:m4trace:configure.ac:574: -1- AC_SUBST([HAVE_QTLIB_FALSE])
traces.2:m4trace:configure.ac:574: -1- AC_SUBST_TRACE([HAVE_QTLIB_FALSE])
traces.2:m4trace:configure.ac:574: -1- m4_pattern_allow([^HAVE_QTLIB_FALSE$])
traces.2:m4trace:configure.ac:574: -1- _AM_SUBST_NOTMAKE([HAVE_QTLIB_TRUE])
traces.2:m4trace:configure.ac:574: -1- _AM_SUBST_NOTMAKE([HAVE_QTLIB_FALSE])
address@hidden autom4te.cache]$ cd ..

Thanks for any additional advice.

Jim G

On 03/11/2014 08:08 AM, Eric Blake wrote:
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"])





reply via email to

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