Re: [Discuss] [PATCH 1/2] configure: fix to support libnl-3.0
On Friday 27 April 2012 10:51:22 Arjan van de Ven wrote: On 4/27/2012 7:35 AM, Mike Frysinger wrote: On Friday 27 April 2012 09:29:13 Sergey Senozhatsky wrote: --- a/configure.ac +++ b/configure.ac PKG_CHECK_MODULES([LIBNIL], [libnl-1],[],[ - PKG_CHECK_MODULES([LIBNIL], [libnl-2.0],[] ,[ - PKG_CHECK_MODULES([LIBNIL], [libnl-3.0],[] ,[AC_MSG_ERROR([libnl is required but was not found])]) + PKG_CHECK_MODULES([LIBNIL], [libnl-2.0],[AC_DEFINE([HAVE_LIBNL20],[1],[Define if you have libnl-2.0 or higher])] ,[ + PKG_CHECK_MODULES([LIBNIL], [libnl-3.0, libnl-genl-3.0],[AC_DEFINE([HAVE_LIBNL20],[1],[Define if you have libnl-3.0 or higher])] ,[AC_MSG_ERROR([libnl is required but was not found])]) ]) ]) that really needs some line wrapping nah my screen is - - this wide.. we're not google+ if it makes it more readable, I rather have things on one line than artificially broken up. wrapping+indenting at [ boundaries is accepted autoconf practice, and which you've already done here: PKG_CHECK_MODULES([LIBNIL], [libnl-1],[],[ PKG_CHECK_MODULES([LIBNIL], [libnl-2.0],[] ,[ PKG_CHECK_MODULES([LIBNIL], [libnl-3.0 ... so continuing that practice makes sense -mike signature.asc Description: This is a digitally signed message part. ___ Power mailing list Power@bughost.org https://bughost.org/mailman/listinfo/power
Re: [Discuss] [PATCH 1/2] configure: fix to support libnl-3.0
On Friday 27 April 2012 11:02:34 Sergey Senozhatsky wrote: PKG_CHECK_MODULES([LIBNIL], [libnl-1],[],[ - PKG_CHECK_MODULES([LIBNIL], [libnl-2.0],[] ,[ - PKG_CHECK_MODULES([LIBNIL], [libnl-3.0],[] ,[AC_MSG_ERROR([libnl is required but was not found])]) + PKG_CHECK_MODULES([LIBNIL], [libnl-2.0],[AC_DEFINE([HAVE_LIBNL20],[1],[Define if you have libnl-2.0 or higher])], + [ + PKG_CHECK_MODULES([LIBNIL], [libnl-3.0 libnl-genl-3.0], + [AC_DEFINE([HAVE_LIBNL20],[1],[Define if you have libnl-3.0 or higher])], + [AC_MSG_ERROR([libnl is required but was not found])]) ]) ]) does autoheader allow the same symbol to be defined multiple times ? how about: PKG_CHECK_MODULES([LIBNIL], [libnl-1],[libnl_ver=1],[ PKG_CHECK_MODULES([LIBNIL], [libnl-2.0],[libnl_ver=2],[ PKG_CHECK_MODULES([LIBNIL], [libnl-3.0 libnl-genl-3.0], [libnl_ver=3],[ AC_MSG_ERROR([libnl is required but was not found]) ]) ]) ]) AS_IF([test 1 != $libnl_ver], [ AC_DEFINE([HAVE_LIBNL20], [1], [Define if you have libnl-2.0 or higher]) ]) -mike signature.asc Description: This is a digitally signed message part. ___ Power mailing list Power@bughost.org https://bughost.org/mailman/listinfo/power