On Tue, 29 Jan 2013 09:46:29 +0100 Natanael Copa <nc...@alpinelinux.org> wrote: > > I think that we should use 'pkg-config --exists' instead of testing for given > distros. > > Something like: > if pkg-config --exists lua5.1; then > LUAPKGCONFIG=lua5.1 > else > LUAPKGCONFIG=lua > fi > > In case there might be other variants or if the binding supports both > lua-5.1 and lua-5.2: > > for LUAPKGCONFIG in lua5.2 lua5.1 lua; do > if pkg-config --exists $LUAPKGCONFIG; then > break > fi > done > > I think you can provide a list of modules to PKG_CHECK_MODULES: > > PKG_CHECK_MODULES([LUA], [lua5.1 lua])
No that will fail if any of them are missing. I think this will work: PKG_CHECK_EXISTS([lua5.1], [LUAPKGCONFIG=lua5.1], [LUAPKGCONFIG=lua]) > > > + > > +AC_ARG_ENABLE([lua], > > + [AC_HELP_STRING([--enable-lua], [enable lua binding])], > > + [enable_lua=yes], [enable_lua=no]) > > + > > +AM_CONDITIONAL([ENABLE_LUA], [test "x$enable_lua" = "xyes"]) > > + > > +AM_COND_IF([ENABLE_LUA], > > + [PKG_CHECK_MODULES([LUA], [$LUAPKGCONFIG >= 5.1],[],[AC_MSG_ERROR([You > > must install lua-devel for lua 5.1])]) > > I think this should work without using LUAPKGCONFIG > [PKG_CHECK_MODULE[LUA], [lua5.1 lua >= 5.1],[],[AC_MSG_ERROR([You must > install lua-devel for lua 5.1])]) No, I was wrong. It will not work. -nc ------------------------------------------------------------------------------ Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. ON SALE this month only -- learn more at: http://p.sf.net/sfu/learnnow-d2d _______________________________________________ Lxc-devel mailing list Lxc-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lxc-devel