mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-02 22:44:45 +00:00
replace lxc-version by lxc-config
As we have the correct informations with pkg-config we can write a script which will collect the informations and we get rid of the C program. Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
This commit is contained in:
parent
b6345ba1b3
commit
3eae9733be
@ -20,6 +20,7 @@ AS_AC_EXPAND(BINDIR, $bindir)
|
||||
AS_AC_EXPAND(INCLUDEDIR, $includedir)
|
||||
AS_AC_EXPAND(LIBEXECDIR, $libexecdir)
|
||||
AS_AC_EXPAND(SYSCONFDIR, $sysconfdir)
|
||||
AS_AC_EXPAND(DATADIR, $datadir)
|
||||
AS_AC_EXPAND(LOCALSTATEDIR, $localstatedir)
|
||||
AS_AC_EXPAND(LXCPATH, "${localstatedir}/lib/lxc")
|
||||
AS_AC_EXPAND(LXC_GENERATE_DATE, "$(date)")
|
||||
@ -97,6 +98,7 @@ AC_CONFIG_FILES([
|
||||
src/lxc/lxc-netstat
|
||||
src/lxc/lxc-checkconfig
|
||||
src/lxc/lxc-setcap
|
||||
src/lxc/lxc-config
|
||||
|
||||
etc/Makefile
|
||||
etc/lxc-macvlan.conf
|
||||
|
@ -29,7 +29,6 @@ liblxc_la_SOURCES = \
|
||||
freezer.c \
|
||||
checkpoint.c \
|
||||
restart.c \
|
||||
version.c \
|
||||
error.h error.c \
|
||||
parse.c parse.h \
|
||||
cgroup.c cgroup.h \
|
||||
@ -59,7 +58,8 @@ bin_SCRIPTS = \
|
||||
lxc-netstat \
|
||||
lxc-ls \
|
||||
lxc-checkconfig \
|
||||
lxc-setcap
|
||||
lxc-setcap \
|
||||
lxc-config
|
||||
|
||||
bin_PROGRAMS = \
|
||||
lxc-unshare \
|
||||
@ -76,8 +76,7 @@ bin_PROGRAMS = \
|
||||
lxc-cgroup \
|
||||
lxc-unfreeze \
|
||||
lxc-checkpoint \
|
||||
lxc-restart \
|
||||
lxc-version
|
||||
lxc-restart
|
||||
|
||||
libexec_PROGRAMS = \
|
||||
lxc-init
|
||||
@ -130,8 +129,5 @@ lxc_checkpoint_LDADD = liblxc.la
|
||||
lxc_restart_SOURCES = lxc_restart.c
|
||||
lxc_restart_LDADD = liblxc.la
|
||||
|
||||
lxc_version_SOURCES = lxc_version.c
|
||||
lxc_version_LDADD = liblxc.la
|
||||
|
||||
install-exec-local:
|
||||
@mkdir -p $(DESTDIR)@LXCPATH@
|
||||
|
14
src/lxc/lxc-config.in
Normal file
14
src/lxc/lxc-config.in
Normal file
@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:@DATADIR@/pkgconfig
|
||||
|
||||
echo "lxc version: $(pkg-config --modversion lxc)"
|
||||
echo "libdir : $(pkg-config --variable=libdir lxc)"
|
||||
echo "bindir : $(pkg-config --variable=bindir lxc)"
|
||||
echo "includedir : $(pkg-config --variable=includedir lxc)"
|
||||
echo "statedir : $(pkg-config --variable=localstatedir lxc)"
|
||||
echo "libs : $(pkg-config --libs lxc)"
|
||||
|
||||
if [ "$(pkg-config --cflags lxc)" != " " ]; then
|
||||
echo "cflags : $(pkg-config --cflags lxc)"
|
||||
fi
|
@ -1,30 +0,0 @@
|
||||
/*
|
||||
* lxc: linux Container library
|
||||
*
|
||||
* (C) Copyright IBM Corp. 2007, 2008
|
||||
*
|
||||
* Authors:
|
||||
* Daniel Lezcano <dlezcano at fr.ibm.com>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <lxc/lxc.h>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
printf("Version: %s\n", lxc_version());
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user