[lxc-devel] [PATCH v2] configure/makefile: Allow specify Lua pkg-config file with --with-lua-pc

Stéphane Graber stgraber at ubuntu.com
Fri Sep 6 01:46:00 UTC 2013


Right, same thing showed up in the latest daily build.

As that's quite problematic for all of us who don't have lua, I'll
revert the lua commits if we don't get this fixed tomorrow.

Sorry for not spotting this when testing the commits, unfortunately my
dev machine did have the lua headers installed...


On Thu, Sep 05, 2013 at 08:17:09PM -0400, S.Çağlar Onur wrote:
> Hi,
> 
> It looks like this patch changed the default behavior and configure started
> to enable Lua even when it gets called without --enable-lua parameter.
> 
> ./configure --prefix=/usr --sysconfdir=/etc --bindir=/usr/bin
> --libdir=/usr/lib/x86_64-linux-gnu/ --localstatedir=/var
> --includedir=/usr/include --disable-rpath --enable-python
> 
> checking for a BSD-compatible install... /usr/bin/install -c
> checking whether build environment is sane... yes
> checking for a thread-safe mkdir -p... /bin/mkdir -p
> checking for gawk... gawk
> checking whether make sets $(MAKE)... yes
> checking build system type... x86_64-unknown-linux-gnu
> checking host system type... x86_64-unknown-linux-gnu
> checking for style of include used by make... GNU
> checking for gcc... gcc
> checking whether the C compiler works... yes
> checking for C compiler default output file name... a.out
> checking for suffix of executables...
> checking whether we are cross compiling... no
> checking for suffix of object files... o
> checking whether we are using the GNU C compiler... yes
> checking whether gcc accepts -g... yes
> checking for gcc option to accept ISO C89... none needed
> checking dependency style of gcc... gcc3
> checking whether gcc and cc understand -c and -o together... yes
> checking how to run the C preprocessor... gcc -E
> checking for grep that handles long lines and -e... /bin/grep
> checking for egrep... /bin/grep -E
> checking for ANSI C header files... yes
> checking for sys/types.h... yes
> checking for sys/stat.h... yes
> checking for stdlib.h... yes
> checking for string.h... yes
> checking for memory.h... yes
> checking for strings.h... yes
> checking for inttypes.h... yes
> checking for stdint.h... yes
> checking for unistd.h... yes
> checking minix/config.h usability... no
> checking minix/config.h presence... no
> checking for minix/config.h... no
> checking whether it is safe to define __EXTENSIONS__... yes
> checking host distribution... ubuntu
> checking for newuidmap... no
> checking for docbook2x-man... no
> checking for aa_change_profile in -lapparmor... no
> checking for gnutls_hash_fast in -lgnutls... no
> checking for seccomp_init in -lseccomp... no
> checking for scmp_filter_ctx... no
> checking for pkg-config... /usr/bin/pkg-config
> checking pkg-config is at least version 0.9.0... yes
> checking for a Python interpreter with version >= 3.2... python3
> checking for python3... /usr/bin/python3
> checking for python3 version... 3.3
> checking for python3 platform... linux
> checking for python3 script directory... ${prefix}/lib/python3/dist-packages
> checking for python3 extension module directory...
> ${exec_prefix}/lib/python3/dist-packages
> checking for PYTHONDEV... yes
> checking for LUA... no
> checking for LUA... no
> checking for LUA... no
> configure: error: Package requirements (lua5.1) were not met:
> 
> No package 'lua5.1' found
> 
> Consider adjusting the PKG_CONFIG_PATH environment variable if you
> installed software in a non-standard prefix.
> 
> Alternatively, you may set the environment variables LUA_CFLAGS
> and LUA_LIBS to avoid the need to call pkg-config.
> See the pkg-config man page for more details.
> 
> 
> On Thu, Sep 5, 2013 at 11:13 AM, Natanael Copa <ncopa at alpinelinux.org>wrote:
> 
> > Enable support for both Lua 5.1 and 5.2 by let user specify the Lua
> > pkg-config package name. By default it will use 'lua' and try figure
> > out which version it is.
> >
> > Signed-off-by: Natanael Copa <ncopa at alpinelinux.org>
> > ---
> > Changes v1 -> v2:
> >  - define PKG_CHECK_VAR which was introduced in pkg-config 0.28. Ubuntu
> >    ships 0.26.
> >
> >  configure.ac            | 47
> > ++++++++++++++++++++++++++++++++++++++---------
> >  src/lua-lxc/Makefile.am |  4 ++--
> >  2 files changed, 40 insertions(+), 11 deletions(-)
> >
> > diff --git a/configure.ac b/configure.ac
> > index 6b68703..1e2c713 100644
> > --- a/configure.ac
> > +++ b/configure.ac
> > @@ -150,22 +150,51 @@ AM_COND_IF([ENABLE_PYTHON],
> >         PKG_CHECK_MODULES([PYTHONDEV], [python3 >=
> > 3.2],[],[AC_MSG_ERROR([You must install python3-dev])])
> >         AC_DEFINE_UNQUOTED([ENABLE_PYTHON], 1, [Python3 is available])])
> >
> > -# Lua module and scripts
> > -if test x"$with_distro" = "xdebian" -o x"$with_distro" = "xubuntu" ; then
> > -    LUAPKGCONFIG=lua5.1
> > -else
> > -    LUAPKGCONFIG=lua
> > -fi
> > +dnl PKG_CHECK_VAR was introduced with pkg-config 0.28
> > +m4_ifdef([PKG_CHECK_VAR], [],
> > +[AC_DEFUN([PKG_CHECK_VAR],
> > +    [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
> > +     AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
> > +     _PKG_CONFIG([$1], [variable="][$3]["], [$2])
> > +     AS_VAR_COPY([$1], [pkg_cv_][$1])
> > +     AS_VAR_IF([$1], [""], [$5], [$4])dnl
> > +    ])# PKG_CHECK_VAR
> > +])
> >
> > +# Lua module and scripts
> >  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"])
> > +AC_ARG_WITH([lua-pc],
> > +       [AS_HELP_STRING(
> > +               [--with-lua-pc=PKG],
> > +               [Specify pkg-config package name for lua]
> > +       )],
> > +       [LUAPKGCONFIG=$with_lua_pc
> > +       enable_lua=yes], [with_lua_pc=auto])
> > +
> > +AM_CONDITIONAL([ENABLE_LUA],
> > +       [test "x$enable_lua" = "xyes" -o "xwith_lua_pc != xno"])
> >
> >  AM_COND_IF([ENABLE_LUA],
> > -       [PKG_CHECK_MODULES([LUA], [$LUAPKGCONFIG >=
> > 5.1],[],[AC_MSG_ERROR([You must install lua-devel for lua 5.1])])
> > -       AC_DEFINE_UNQUOTED([ENABLE_LUA], 1, [Lua is available])])
> > +       [AS_IF([test "x$with_lua_pc" = "xauto"],
> > +               [PKG_CHECK_MODULES([LUA], [lua],[LUAPKGCONFIG=lua],
> > +                       [PKG_CHECK_MODULES([LUA],
> > [lua5.2],[LUAPKGCONFIG=lua5.2],
> > +                               [PKG_CHECK_MODULES([LUA], [lua5.1],
> > +                                       [LUAPKGCONFIG=lua5.1])]
> > +                       )]
> > +               )],
> > +               [PKG_CHECK_MODULES([LUA], [$with_lua_pc])])
> > +       AC_MSG_CHECKING([Lua version])
> > +       PKG_CHECK_VAR([LUA_VERSION], [$LUAPKGCONFIG], [V],,
> > +               [PKG_CHECK_VAR([LUA_VERSION], [$LUAPKGCONFIG],
> > [major_version])])
> > +       AC_MSG_RESULT([$LUA_VERSION])
> > +       PKG_CHECK_VAR([LUA_INSTALL_CMOD], [$LUAPKGCONFIG], [INSTALL_CMOD],,
> > +               [LUA_INSTALL_CMOD=$libdir/lua/$LUA_VERSION])
> > +       PKG_CHECK_VAR([LUA_INSTALL_LMOD], [$LUAPKGCONFIG], [INSTALL_LMOD],,
> > +               [LUA_INSTALL_LMOD=$datadir/lua/$LUA_VERSION])
> > +       ])
> >
> >  # Optional test binaries
> >  AC_ARG_ENABLE([tests],
> > diff --git a/src/lua-lxc/Makefile.am b/src/lua-lxc/Makefile.am
> > index 82dbae8..11eabfd 100644
> > --- a/src/lua-lxc/Makefile.am
> > +++ b/src/lua-lxc/Makefile.am
> > @@ -1,7 +1,7 @@
> >  if ENABLE_LUA
> >
> > -luadir=$(datadir)/lua/5.1
> > -sodir=$(libdir)/lua/5.1/lxc
> > +luadir=$(LUA_INSTALL_LMOD)
> > +sodir=$(LUA_INSTALL_CMOD)/lxc
> >
> >  lua_SCRIPTS=lxc.lua
> >
> > --
> > 1.8.4
> >
> >
> >
> > ------------------------------------------------------------------------------
> > Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
> > Discover the easy way to master current and previous Microsoft technologies
> > and advance your career. Get an incredible 1,500+ hours of step-by-step
> > tutorial videos with LearnDevNow. Subscribe today and save!
> > http://pubads.g.doubleclick.net/gampad/clk?id=58041391&iu=/4140/ostg.clktrk
> > _______________________________________________
> > Lxc-devel mailing list
> > Lxc-devel at lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/lxc-devel
> >
> 
> 
> 
> -- 
> S.Çağlar Onur <caglar at 10ur.org>

> ------------------------------------------------------------------------------
> Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
> Discover the easy way to master current and previous Microsoft technologies
> and advance your career. Get an incredible 1,500+ hours of step-by-step
> tutorial videos with LearnDevNow. Subscribe today and save!
> http://pubads.g.doubleclick.net/gampad/clk?id=58041391&iu=/4140/ostg.clktrk

> _______________________________________________
> Lxc-devel mailing list
> Lxc-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/lxc-devel


-- 
Stéphane Graber
Ubuntu developer
http://www.ubuntu.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20130905/b4678ed5/attachment.pgp>


More information about the lxc-devel mailing list