1 dnl febootstrap configure.ac
2 dnl (C) Copyright 2009-2011 Red Hat Inc.
4 dnl This program is free software; you can redistribute it and/or modify
5 dnl it under the terms of the GNU General Public License as published by
6 dnl the Free Software Foundation; either version 2 of the License, or
7 dnl (at your option) any later version.
9 dnl This program is distributed in the hope that it will be useful,
10 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
11 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 dnl GNU General Public License for more details.
14 dnl You should have received a copy of the GNU General Public License
15 dnl along with this program; if not, write to the Free Software
16 dnl Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18 dnl Written by Richard W.M. Jones <rjones@redhat.com>
20 AC_INIT(febootstrap,3.10)
23 dnl Check for basic C environment.
31 test "x$U" != "x" && AC_MSG_ERROR([Compiler not ANSI compliant])
35 dnl Check support for 64 bit file offsets.
43 # OCaml and ocamlfind are required to compile.
45 if test "$OCAMLC" = "no"; then
46 AC_MSG_ERROR([You must install the OCaml compiler])
48 AM_CONDITIONAL([HAVE_OCAMLOPT],[test "$OCAMLBEST" = "opt"])
50 if test "$OCAMLFIND" = "no"; then
51 AC_MSG_ERROR([You must install OCaml findlib (the ocamlfind command)])
54 dnl Optional programs.
55 AC_CHECK_PROG(PERLDOC,[perldoc],[perldoc],[no])
56 if test "x$PERLDOC" = "xno" ; then
57 AC_MSG_WARN([perldoc not found - install perl to make man pages])
59 AM_CONDITIONAL(HAVE_PERLDOC,[test "$perldoc" != "no"])
61 dnl For yum-rpm handler.
62 AC_CHECK_PROG(YUM,[yum],[yum],[no])
63 AC_CHECK_PROG(RPM,[rpm],[rpm],[no])
64 AC_CHECK_PROG(YUMDOWNLOADER,[yumdownloader],[yumdownloader],[no])
66 dnl For Debian handler.
67 AC_CHECK_PROG(APTITUDE,[aptitude],[aptitude],[no])
68 AC_CHECK_PROG(APT_CACHE,[apt-cache],[apt-cache],[no])
69 AC_CHECK_PROG(DPKG,[dpkg],[dpkg],[no])
71 dnl Include workaround for broken apt-cache depends --recurse (Ubuntu 10.04)?
72 if test "x$APT_CACHE" != "xno"; then
73 AC_MSG_CHECKING([if apt-cache depends --recurse is broken])
74 if ! $APT_CACHE depends --recurse -i bash | grep -q '^libc6$'; then
76 APT_CACHE_DEPENDS_RECURSE_BROKEN=true
79 APT_CACHE_DEPENDS_RECURSE_BROKEN=false
82 APT_CACHE_DEPENDS_RECURSE_BROKEN=false
84 AC_SUBST([APT_CACHE_DEPENDS_RECURSE_BROKEN])
86 dnl For ArchLinux handler.
87 AC_CHECK_PROG(PACMAN,[pacman],[pacman],[no])
89 dnl Support for gzipped kernel modules.
90 AC_CHECK_LIB([z],[gzopen])
92 dnl Required programs, libraries.
93 AC_PATH_PROG([MKE2FS],[mke2fs],[no],
94 [$PATH$PATH_SEPARATOR/sbin$PATH_SEPARATOR])
95 if test "x$MKE2FS" = "xno" ; then
96 AC_MSG_FAILURE([mke2fs program not found])
98 AC_DEFINE_UNQUOTED([MKE2FS],["$MKE2FS"],
99 [Full path to the mke2fs program.])
102 AC_CHECK_LIB([com_err],[error_message],[],[
103 AC_MSG_FAILURE([com_err library not found (part of e2fsprogs)])
108 AC_CHECK_LIB([ext2fs],[ext2fs_file_open2],[],[
109 AC_MSG_FAILURE([libext2fs library not found (part of e2fsprogs)])
111 AC_CHECK_FUNCS([ext2fs_close2])
114 AC_CHECK_HEADER([ext2fs/ext2fs.h],[],[
115 AC_MSG_FAILURE([Header <ext2fs/ext2fs.h> not found (part of e2fsprogs)])
118 AC_CHECK_PROG(GAWK,[gawk],[gawk],[no])
119 if test "x$GAWK" = "xno" ; then
120 AC_MSG_FAILURE([gawk (GNU awk) not found])
123 AC_CONFIG_HEADERS([config.h])
124 AC_CONFIG_FILES([Makefile