3 dnl Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
5 dnl This program is free software; you can redistribute it and/or modify
6 dnl it under the terms of the GNU General Public License as published by
7 dnl the Free Software Foundation; either version 2, or (at your option)
10 dnl This program is distributed in the hope that it will be useful,
11 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
12 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 dnl GNU General Public License for more details.
15 dnl You should have received a copy of the GNU General Public License
16 dnl along with this program; if not, write to the Free Software
17 dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20 dnl As a special exception to the GNU General Public License, if you
21 dnl distribute this file as part of a program that contains a configuration
22 dnl script generated by Autoconf, you may include it under the same
23 dnl distribution terms that you use for the rest of that program.
28 AC_INIT(util-vserver, 0.26.1, enrico.scholz@informatik.tu-chemnitz.de)
29 AC_CONFIG_SRCDIR([src/capchroot.c])
30 AC_CONFIG_HEADER([config.h])
32 AM_INIT_AUTOMAKE([gnu dist-bzip2 subdir-objects])
36 # Checks for programs.
44 ENSC_CHECK_CC_FLAG([-std=c99 -Wall -pedantic -W -Wno-unused-parameter])
45 ENSC_CHECK_CXX_FLAG([-ansi -Wall -pedantic -W -fmessage-length=0])
47 AC_ARG_VAR(CC, [The C compiler])
48 ENSC_KERNEL_HEADERS(kernelincludedir)
49 ENSC_UV_VROOTDIR(vserverdir)
50 ENSC_CHANGELOG([SYSCALL_SWITCH])
52 dnl Check whether to enable linuxconf
53 AC_MSG_CHECKING([whether to enable linuxconf modules])
54 AC_ARG_ENABLE([linuxconf],
55 [AC_HELP_STRING([--enable-linuxconf],
56 [enable 'newvserver' linuxconf module (default: no)])],
59 *) AC_MSG_ERROR(['$i' is not a supported value for '--enable-linuxconf']);;
61 [enable_linuxconf=no])
63 AM_CONDITIONAL(ENSC_ENABLE_LINUXCONF, [test x"$enable_linuxconf" = xyes])
64 AC_MSG_RESULT($enable_linuxconf)
67 dnl Check whether to use external kernel headers
68 AC_MSG_CHECKING([whether to use internal kernel headers])
69 AC_ARG_ENABLE([internal-headers],
70 [AC_HELP_STRING([--disable-internal-headers],
71 [use vserver specific headers from the kernel instead of the shipped versions (default: no)])],
74 *) AC_MSG_ERROR(['$i' is not a supported value for '--disable-internal-headers']);;
76 [enable_internal_headers=yes])
78 AM_CONDITIONAL(ENSC_ENABLE_INTERNAL_HEADERS, [test x"$enable_internal_headers" = xyes])
79 AC_MSG_RESULT([$enable_internal_headers])
82 dnl Check for the APIs to be used
83 AC_MSG_CHECKING([for supported APIs])
85 [AC_HELP_STRING([--enable-apis=APIS],
86 [enable support for the given apis; possible values are: legacy,compat,v11,ALL (default: ALL)])],
90 test x"$enable_apis" != xALL || enable_apis='legacy,compat,v11'
93 for i in $enable_apis; do
95 compat) AC_DEFINE(VC_ENABLE_API_COMPAT, 1, [Enable support for compatibily syscall API]);;
96 legacy) AC_DEFINE(VC_ENABLE_API_LEGACY, 1, [Enable support for old, /proc parsing API]);;
97 v11) AC_DEFINE(VC_ENABLE_API_V11, 1, [Enable support for API of vserver 1.1.x]);;
98 *) AC_MSG_ERROR(['$i' is not a supported API]);;
102 AC_MSG_RESULT([$enable_apis])
104 AC_CHECK_HEADERS([ext2fs/ext2fs.h], [],
105 [AC_CHECK_HEADERS([linux/ext2_fs.h], [],
106 [AC_MSG_ERROR([Sorry, do not know, how to include 'ext2fs.h'])])])
108 AC_CHECK_FUNCS([sys_virtual_context])
109 AC_CHECK_DECLS(MS_MOVE,,,[#include <linux/fs.h>])
110 AC_CHECK_TYPES(xid_t,,,[#include <sys/types.h>])
112 AC_CONFIG_FILES([util-vserver.spec Makefile])