1 AC_INIT([Ksplice], [0.9.3], [devel@ksplice.com])
2 AC_SUBST([KSPLICE_API_VERSION], [1])
5 [ --with-libbfd=FILE path to libbfd.a],
9 AC_ARG_WITH([libiberty],
10 [ --with-libiberty=FILE path to libiberty.a],
11 [ac_libiberty=$withval],
15 [ --with-libz=FILE path to libz.a],
19 AC_ARG_WITH([bfd-include-dir],
20 [ --with-bfd-include-dir=DIR
21 path to directory containing bfd.h],
22 [ac_bfd_include_dir=$withval],
23 [ac_bfd_include_dir=NONE])
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_HEADERS([bfd.h], , [BFD_H="no"])
50 AC_CHECK_MEMBER([struct bfd_hash_table.entsize],
51 [CPPFLAGS="$CPPFLAGS -DBFD_HASH_TABLE_HAS_ENTSIZE"],
55 if ! test -e "objmanip-static"; then
56 if test "$ac_libbfd" = "NONE"; then
58 echo "Ksplice could not locate libbfd.a and/or libiberty.a on your system."
59 echo "You can obtain these libraries from the GNU binutils collection."
60 echo "These libraries are available on many Linux distributions as a"
61 echo "package called 'binutils-dev' or 'binutils-devel'."
62 echo "If your distribution does not provide GNU binutils, you can install"
63 echo "GNU binutils from source -- see http://www.gnu.org/software/binutils/."
65 echo "If these libraries are already installed on your system, then you need"
66 echo "to tell Ksplice where to find them by running configure again:"
68 echo " ./configure --with-libbfd=<libbfd.a> --with-libiberty=<libiberty.a>"
70 echo "Depending on the host system you may also need to provide zlib:"
72 echo " ./configure ... --with-libz=<libz.a>"
77 if test "$BFD_H" = "no"; then
79 echo "Ksplice could not locate bfd.h on your system."
80 echo "If this header file is already installed on your system, then you need"
81 echo "to tell Ksplice where to find it by running configure again:"
83 echo " ./configure --with-bfd-include-dir=<directory-containing-bfd.h>"
89 AC_PATH_PROG([PATCH], [patch])
90 AC_PATH_PROG([POD2MAN], [pod2man])
91 if test "$PATCH" = ""; then
93 echo "Ksplice could not locate patch on your system."
97 if test "$POD2MAN" = ""; then
99 echo "Ksplice could not locate pod2man on your system."
104 AC_PROG_PERL_MODULES([Cwd Getopt::Long File::Basename File::Copy File::Path File::Spec::Functions File::Temp Fatal IPC::Open2 IPC::Open3 Pod::Usage Text::ParseWords], ,
105 [AC_MSG_ERROR([Missing some required perl modules])])
107 AC_CONFIG_FILES([Makefile kmodsrc/Makefile])