1 AC_INIT([Ksplice], [0.9.0], [ksplice@mit.edu])
4 [ --with-libbfd=FILE path to libbfd.a],
8 AC_ARG_WITH([libiberty],
9 [ --with-libiberty=FILE path to libiberty.a],
10 [ac_libiberty=$withval],
14 [ --with-libz=FILE path to libz.a],
18 AC_ARG_WITH([bfd-include-dir],
19 [ --with-bfd-include-dir=DIR
20 path to directory containing bfd.h],
21 [ac_bfd_include_dir=$withval],
22 [ac_bfd_include_dir=NONE])
25 AC_CHECK_HEADERS([bfd.h], , [BFD_H="no"])
27 if test "$ac_libz" = "NONE"; then
28 AC_CHECK_LIB([z], [zlibVersion])
32 if test "$ac_libiberty" = "NONE"; then
33 AC_CHECK_LIB([iberty], [objalloc_create])
35 LIBS="$ac_libiberty $LIBS"
37 if test "$ac_libbfd" = "NONE"; then
39 AC_CHECK_LIB([bfd], [bfd_openr], , [ac_libbfd=NONE])
41 LIBS="$ac_libbfd $LIBS"
44 if test "$ac_bfd_include_dir" != "NONE"; then
45 CPPFLAGS="$CPPFLAGS -I$ac_bfd_include_dir"
48 AC_CHECK_MEMBER([struct bfd_hash_table.entsize],
49 [CPPFLAGS="$CPPFLAGS -DBFD_HASH_TABLE_HAS_ENTSIZE"],
53 if ! test -e "objmanip-static"; then
54 if test "$ac_libbfd" = "NONE"; then
56 echo "Ksplice could not locate libbfd.a and/or libiberty.a on your system."
57 echo "You can obtain these libraries from the GNU binutils collection."
58 echo "These libraries are available on many Linux distributions as a"
59 echo "package called 'binutils-dev' or 'binutils-devel'."
60 echo "If your distribution does not provide GNU binutils, you can install"
61 echo "GNU binutils from source -- see http://www.gnu.org/software/binutils/."
63 echo "If these libraries are already installed on your system, then you need"
64 echo "to tell Ksplice where to find them by running configure again:"
66 echo " ./configure --with-libbfd=<libbfd.a> --with-libiberty=<libiberty.a>"
68 echo "Depending on the host system you may also need to provide zlib:"
70 echo " ./configure ... --with-libz=<libz.a>"
75 if test "$BFD_H" = "no"; then
77 echo "Ksplice could not locate bfd.h on your system."
78 echo "If this header file is already installed on your system, then you need"
79 echo "to tell Ksplice where to find it by running configure again:"
81 echo " ./configure --with-bfd-include-dir=<directory-containing-bfd.h>"
87 AC_PATH_PROG([PATCH], [patch])
88 AC_PATH_PROG([POD2MAN], [pod2man])
89 if test "$PATCH" = ""; then
91 echo "Ksplice could not locate patch on your system."
95 if test "$POD2MAN" = ""; then
97 echo "Ksplice could not locate pod2man on your system."
102 AC_PROG_PERL_MODULES([Cwd], ,
103 [AC_MSG_ERROR([Required perl module Cwd not found])])
104 AC_PROG_PERL_MODULES([Pod::Usage], ,
105 [AC_MSG_ERROR([Required perl module Pod::Usage not found])])
106 AC_PROG_PERL_MODULES([File::Temp], ,
107 [AC_MSG_ERROR([Required perl module File::Temp not found])])
109 AC_CONFIG_FILES([Makefile kmodsrc/Makefile])