initial checkin
[util-vserver.git] / util-vserver / configure.ac
index 5e7b319..e02efe3 100644 (file)
@@ -24,13 +24,14 @@ dnl distribution terms that you use for the rest of that program.
 dnl  
 
 AC_PREREQ(2.57)
-AC_INIT(util-vserver, 0.23.5, enrico.scholz@informatik.tu-chemnitz.de)
+AC_INIT(util-vserver, 0.23.89.1, enrico.scholz@informatik.tu-chemnitz.de)
 AC_CONFIG_SRCDIR([src/capchroot.c])
 AC_CONFIG_HEADER([config.h])
 
 AM_INIT_AUTOMAKE([gnu dist-bzip2 subdir-objects])
 AM_MAINTAINER_MODE
 
+AC_SUBST(CVS2CL_TAG, [])
 
 # Checks for programs.
 AC_PROG_CXX
@@ -40,8 +41,54 @@ AC_PROG_LN_S
 AC_PROG_RANLIB
 AM_PROG_CC_C_O
 
+check_paths=$PATH:/sbin:/usr/sbin:/usr/local/sbin
+AC_PATH_PROGS(AWK,     [awk],     [awk],     [ $check_paths ])
+AC_PATH_PROGS(GREP,    [grep],    [grep],    [ $check_paths ])
+AC_PATH_PROGS(IP,      [ip],      [ip],      [ $check_paths ])
+AC_PATH_PROGS(MOUNT,   [mount],   [mount],   [ $check_paths ])
+AC_PATH_PROGS(NICE,    [nice],    [nice],    [ $check_paths ])
+AC_PATH_PROGS(VCONFIG, [vconfig], [vconfig], [ $check_paths ])
+AC_PATH_PROGS(WC,      [wc],      [wc],      [ $check_paths ])
+
+AC_CHECK_PROGS(CVS2CL, [cvs2cl])
+AM_CONDITIONAL(HAVE_CVS2CL,  [test x"$CVS2CL" != x])
+
 ENSC_CHECK_CC_FLAG([-std=c99])
 
+AC_MSG_CHECKING([whether to enable dietlibc])
+AC_ARG_ENABLE([dietlibc],
+             [AC_HELP_STRING([--disable-dietlibc],
+                             [do not use dietlibc (default: use dietlibc)])],
+             [case "$withval" in
+                 yes)  use_dietlibc=forced;;
+                 no)   use_dietlibc=forced_no;;
+                 *)    AC_MSG_ERROR(['$withval' is not a valid value for --enable-dietlibc]);;
+              esac],
+             [: ${DIET:=diet}
+              which "$DIET" >/dev/null 2>/dev/null && use_dietlibc=detected || use_dietlibc=detected_no])
+
+case x"$use_dietlibc" in
+    xdetected)
+       AM_CONDITIONAL(USE_DIETLIBC, true)
+       AC_MSG_RESULT([yes (autodetected)])
+       ;;
+    xforced)
+       AM_CONDITIONAL(USE_DIETLIBC, true)
+       AC_MSG_RESULT([yes (forced)])
+       ;;
+    xdetected_no)
+       AM_CONDITIONAL(USE_DIETLIBC, false)
+       AC_MSG_RESULT([no (detected)])
+       ;;
+    xforced_no)
+       AM_CONDITIONAL(USE_DIETLIBC, false)
+       AC_MSG_RESULT([no (forced)])
+       ;;
+    *)
+       AC_MSG_ERROR([internal error, use_dietlibc was "$use_dietlibc"])
+       ;;
+esac
+
 AC_ARG_VAR(CC, [The C compiler])
 AC_MSG_CHECKING([for linux kernel headers])
 AC_ARG_WITH([kerneldir],
@@ -65,5 +112,5 @@ AC_SUBST(kernelincludedir)
 AC_MSG_RESULT($kernelincludedir/linux)
                
 
-AC_CONFIG_FILES([vserver.spec Makefile])
+AC_CONFIG_FILES([util-vserver.spec Makefile distrib/Makefile])
 AC_OUTPUT