On (04/27/12 10:35), 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
> 
> i don't think there should be a comma between libnl-3.0 and libnl-genl-3.0

Thank you.
Well, seems you're right. I suck at those autotools things. 


----8<----8<-----

configure: fix to support libnl-3.0

Rename previously used CONFIG_LIBNL20 define to HAVE_LIBNL20 and move it
to generated config.h file.

HAVE_LIBNL20 should be defined for both libnl-2.0 and libnl-3.0 cases.
For libnl3 we should also add libnl-3.0 and libnl-genl-3.0 libs.

Signed-off-by: Sergey Senozhatsky <sergey.senozhat...@gmail.com>

---

 configure.ac |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index c18a000..22da9a5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -49,8 +49,11 @@ PKG_CHECK_MODULES([NCURSES], [ncurses])
 PKG_CHECK_MODULES([PCIUTILS], [libpci]) 
 
 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])])
        ])
 ])
        

_______________________________________________
Power mailing list
Power@bughost.org
https://bughost.org/mailman/listinfo/power

Reply via email to