Skip to content
This repository has been archived by the owner on Apr 15, 2020. It is now read-only.

Commit

Permalink
switch to autoconf
Browse files Browse the repository at this point in the history
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
  • Loading branch information
hallyn committed Jan 6, 2014
1 parent 4960f03 commit 90bbfd3
Show file tree
Hide file tree
Showing 10 changed files with 502 additions and 67 deletions.
Empty file added AUTHORS
Empty file.
Empty file added ChangeLog
Empty file.
370 changes: 370 additions & 0 deletions INSTALL

Large diffs are not rendered by default.

67 changes: 0 additions & 67 deletions Makefile

This file was deleted.

65 changes: 65 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
ACLOCAL_AMFLAGS = -I m4

VERSION_CURRENT = 0
VERSION_REVISION = 0
VERSION_AGE = 0

LIBCGMANAGER_VERSION = $(VERSION_CURRENT):$(VERSION_REVISION):$(VERSION_AGE)
LIBCGMANAGER_VERSION_DOTTED = $(VERSION_CURRENT).$(VERSION_REVISION).$(VERSION_AGE)

AM_CFLAGS = -Wall -ggdb -D_GNU_SOURCE
AM_CFLAGS += $(DBUS_CFLAGS) $(NIH_CFLAGS) $(NIH_DBUS_CFLAGS)
AM_LDFLAGS = $(DBUS_LIBS) $(NIH_LIBS) $(NIH_DBUS_LIBS)
client_files_OUTPUTS = cgmanager-client.c cgmanager-client.h
manager_files_OUTPUTS = org.linuxcontainers.cgmanager.c org.linuxcontainers.cgmanager.h

CLEANFILES = $(manager_files_OUTPUTS) \
$(client_files_OUTPUTS) getpidcgroup movepid cgmanager chowncgroup cgproxy *.o *.so

bin_PROGRAMS = cgmanager cgproxy movepid getpidcgroup chowncgroup
bin_SCRIPTS = runtests.sh

lib_LTLIBRARIES = libcgmanager_client.la

$(manager_files_OUTPUTS): org.linuxcontainers.cgmanager.xml
$(AM_V_GEN)$(NIH_DBUS_TOOL) \
--package=cgmanager \
--mode=object \
--prefix=cgmanager \
--default-interface=org.linuxcontainers.cgmanager0_0 \
org.linuxcontainers.cgmanager.xml

$(client_files_OUTPUTS): org.linuxcontainers.cgmanager.xml
$(AM_V_GEN)$(NIH_DBUS_TOOL) \
--package=cgmanager \
--mode=proxy --prefix=cgmanager \
--default-interface=org.linuxcontainers.cgmanager0_0 \
--output=cgmanager-client.c \
org.linuxcontainers.cgmanager.xml

cgmanager_SOURCES = cgmanager.c \
$(manager_files_OUTPUTS) \
access_checks.h access_checks.c \
fs.c fs.h

cgproxy_SOURCES = cgmanager-proxy.c \
$(manager_files_OUTPUTS) \
access_checks.c access_checks.h \
fs.c fs.h

getpidcgroup_SOURCES = getpidcgroup.c
chowncgroup_SOURCES = chowncgroup.c
movepid_SOURCES = movepid.c

libcgmanager_client_la_SOURCES = \
$(client_files_OUTPUTS) \
org.linuxcontainers.cgmanager.xml

libcgmanager_client_la_CFLAGS = -fPIC -DPIC $(DBUS_CFLAGS) $(NIH_CFLAGS) $(NIH_DBUS_CFLAGS)

libcgmanager_client_la_LDFLAGS = \
-shared -module -E \
-version-info $(LIBCGMANAGER_VERSION)

libcgmanager_client_la_LIBADD = \
$(DBUS_LIBS) $(NIH_CFLAGS) $(NIH_DBUS_CFLAGS) -ldl
Empty file added NEWS
Empty file.
Empty file added README
Empty file.
31 changes: 31 additions & 0 deletions bootstrap.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/bin/sh

# lxc: linux Container library
#
# (C) Copyright IBM Corp. 2007, 2008
#
# Authors:
# Daniel Lezcano <daniel.lezcano at free.fr>
#
# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

set -x
set -e

test -d autom4te.cache && rm -rf autom4te.cache
aclocal
autoheader
autoconf
automake --add-missing --copy
21 changes: 21 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Process this file with autoconf to produce a configure script.

AC_PREREQ(2.61)
AC_INIT([cgmanager], [0.02], [cgmanager-devel@lists.linuxcontainers.org])

AC_GNU_SOURCE
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES([Makefile])

AM_INIT_AUTOMAKE

LT_INIT
AC_PROG_CC

AC_PATH_PROG([NIH_DBUS_TOOL], [nih-dbus-tool])

PKG_CHECK_MODULES([NIH], [libnih >= 1.0.2])
PKG_CHECK_MODULES([NIH_DBUS], [libnih-dbus >= 1.0.0])
PKG_CHECK_MODULES([DBUS], [dbus-1 >= 1.2.16])

AC_OUTPUT
15 changes: 15 additions & 0 deletions tests/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
bin_SCRIPTS = \
test01.sh \
test02.sh \
test03.sh \
test04.sh \
test05.sh \
test06.sh \
test07.sh \
test08.sh \
test09.sh \
test10.sh \
test11.sh \
test12.sh \
test13.sh \
test14.sh

0 comments on commit 90bbfd3

Please sign in to comment.