Re: AC_ARG_ENABLE: problem with the output of configure --help

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

 





On Sat, 31 Mar 2007, Andreas Schwab wrote:

I've written an m4 macro (see attached file).

ENOENT.

Oups, here it is :)

Vincent Torri
dnl use: AC_CHECK_ECORE_MODULE(Foo, default-enabled[, dependancy[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]])
AC_DEFUN([AC_CHECK_ECORE_MODULE],
[
pushdef([UP], translit([$1], [a-z], [A-Z]))dnl
pushdef([DOWN], translit([$1], [A-Z], [a-z]))dnl

have_ecore_[]DOWN="no"
ecore_[]DOWN[]_cflags=""
ecore_[]DOWN[]_libs=""

if test "x$2" = "xno" ; then
  AC_ARG_ENABLE(ecore-[]DOWN,
    AS_HELP_STRING(
      [--enable-ecore-[]DOWN],
      [enable the ecore_[]DOWN module. [[default=disabled]]]
    ),
    [ want_ecore_[]DOWN=$enableval ],
    [ want_ecore_[]DOWN=no ])
else
  AC_ARG_ENABLE(ecore-[]DOWN,
    AS_HELP_STRING(
      [--disable-ecore-[]DOWN],
      [disable the ecore_[]DOWN module. [[default=enabled]]]
    ),
    [ want_ecore_[]DOWN=$enableval ],
    [ want_ecore_[]DOWN=yes ])
fi

AC_MSG_CHECKING(whether ecore_[]DOWN module is to be built)

if test "x$want_ecore_[]DOWN" = "xyes" ; then
  if test "x$3" = "x" -o "x$3" = "xyes" ; then
    AC_DEFINE(BUILD_ECORE_[]UP, 1, [Build Ecore_$1 Module])
    have_ecore_[]DOWN="yes"
    ecore_[]DOWN[]_libs="-lecore_[]DOWN"
    AC_MSG_RESULT([yes])
  else
    AC_MSG_RESULT([no (dependancy failed)])
  fi
else
  AC_MSG_RESULT([no])
fi

AM_CONDITIONAL(BUILD_ECORE_[]UP, test $have_ecore_[]DOWN = yes)

if test "x$have_ecore_[]DOWN" = "xyes" ; then
  ifelse([$4], , :, [$4])
else
  ifelse([$5], , :, [$5])
fi

AC_SUBST(ecore_[]DOWN[]_cflags)
AC_SUBST(ecore_[]DOWN[]_libs)

popdef([UP])
popdef([DOWN])
])
_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
http://lists.gnu.org/mailman/listinfo/autoconf

[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux