mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
Sat Nov 12 19:44:43 2005 Søren Sandmann <sandmann@redhat.com> * module/sysprof-module.c (read_frame): New function that uses copy_from_user_inatomic() as check_user_pages_readable() has disappeared in recent kernels. * module/sysprof-module.c (timer_notify): Use it here. * TODO: Updates * configure.ac: Change the wording of the CVS HEAD warning as this change seems to also have fixed the lockup with rawhide kernels.
142 lines
3.5 KiB
Plaintext
142 lines
3.5 KiB
Plaintext
AC_PREREQ(2.54)
|
|
|
|
AC_INIT([sysprof], [1.1.0])
|
|
AC_CONFIG_SRCDIR(sysprof.glade)
|
|
|
|
AM_INIT_AUTOMAKE(no-define)
|
|
|
|
AM_CONFIG_HEADER(config.h)
|
|
|
|
AC_PROG_CC
|
|
AC_PROG_INSTALL
|
|
|
|
changequote(,)dnl
|
|
if test "x$GCC" = "xyes"; then
|
|
case " $CFLAGS " in
|
|
*[\ \ ]-Wall[\ \ ]*) ;;
|
|
*) CFLAGS="$CFLAGS -Wall" ;;
|
|
esac
|
|
fi
|
|
changequote([,])dnl
|
|
|
|
debugdir=${libdir}/debug
|
|
|
|
# Separate debug dir
|
|
|
|
dnl written by Guido Draheim <guidod@gmx.de>, original by Alexandre Oliva
|
|
dnl Version 1.3 (2001/03/02)
|
|
dnl source http://www.gnu.org/software/ac-archive/Miscellaneous/ac_define_dir.html
|
|
|
|
AC_DEFUN([AC_DEFINE_DIR], [
|
|
test "x$prefix" = xNONE && prefix="$ac_default_prefix"
|
|
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
|
|
ac_define_dir=`eval echo [$]$2`
|
|
ac_define_dir=`eval echo [$]ac_define_dir`
|
|
ifelse($3, ,
|
|
AC_DEFINE_UNQUOTED($1, "$ac_define_dir"),
|
|
AC_DEFINE_UNQUOTED($1, "$ac_define_dir", $3))
|
|
])
|
|
|
|
AC_ARG_WITH(separate-debug-dir,
|
|
[ --with-separate-debug-dir=path Look for global separate debug info in this path [LIBDIR/debug]],
|
|
[debugdir="${withval}"])
|
|
|
|
AC_DEFINE_DIR(DEBUGDIR, debugdir,
|
|
[Look for global separate debug info in this path])
|
|
|
|
AC_ARG_ENABLE(kernel-module,
|
|
AC_HELP_STRING(--disable-kernel-module, disable building kernel module))
|
|
|
|
kernel_module="yes"
|
|
if test "x$enableval" = "xno"; then
|
|
kernel_module="no"
|
|
fi
|
|
|
|
if test $kernel_module = "yes"; then
|
|
# Activate build in module/ subdir
|
|
MODULE_SUBDIR=module
|
|
|
|
# Kernel version
|
|
KMAJOR=`uname -r | cut -d"." -f 1`
|
|
KMINOR=`uname -r | cut -d"." -f 2`
|
|
KMICRO=`uname -r | cut -d"." -f 3 | cut -d"-" -f 1`
|
|
|
|
if [[ $KMICRO -lt 11 ]] ; then
|
|
echo *
|
|
echo * Linux \>= 2.6.11 is required
|
|
echo *
|
|
exit 1
|
|
fi
|
|
|
|
if [ ! test -f /lib/modules/`uname -r`/build/Makefile ] ; then
|
|
case `uname -r` in
|
|
*smp) pkg=kernel-smp-devel ;;
|
|
*) pkg=kernel-devel ;;
|
|
esac
|
|
echo \*
|
|
echo \* Sysprof requires the kernel source code to be installed.
|
|
echo \* On a Fedora Core system the relevant package is $pkg
|
|
echo \*
|
|
exit 1
|
|
fi
|
|
fi
|
|
|
|
# Pkgconfig dependencies
|
|
|
|
core_dep="glib-2.0"
|
|
gui_dep="gtk+-2.0 > 2.6.0 gdk-pixbuf-2.0 pangoft2 libglade-2.0"
|
|
|
|
PKG_CHECK_MODULES(CORE_DEP, $core_dep, [],
|
|
AC_MSG_ERROR([sysprof dependencies not satisfied]))
|
|
|
|
PKG_CHECK_MODULES(GUI_DEP, $gui_dep, [],
|
|
AC_MSG_ERROR([sysprof dependencies not satisfied]))
|
|
|
|
# libiberty and libbfd
|
|
|
|
AC_CHECK_LIB(iberty, cplus_demangle,:,
|
|
AC_CHECK_LIB(iberty, cplus_demangle_opname, [],
|
|
AC_MSG_ERROR([libiberty is required to compile sysprof]), -ldl))
|
|
|
|
AC_CHECK_LIB(bfd, bfd_get_error,,
|
|
AC_MSG_ERROR([libbfd is required to compile sysprof]),
|
|
-liberty)
|
|
|
|
CORE_DEP_LIBS="$CORE_DEP_LIBS -lbfd -liberty"
|
|
GUI_DEP_LIBS="$GUI_DEP_LIBS -lbfd -liberty"
|
|
|
|
# emit files
|
|
|
|
AC_SUBST(CORE_DEP_LIBS)
|
|
AC_SUBST(GUI_DEP_LIBS)
|
|
AC_SUBST(MODULE_SUBDIR)
|
|
|
|
AC_CONFIG_FILES([
|
|
Makefile
|
|
])
|
|
|
|
AC_OUTPUT
|
|
|
|
echo
|
|
echo "%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%"
|
|
echo "@"
|
|
echo "@ Thank you for testing cvs HEAD of sysprof."
|
|
echo "%"
|
|
echo "% There are currently no known bugs in the kernel"
|
|
echo "@ module in this version, but there could easily be"
|
|
echo "% unknown ones. Please report any crashes or lockups"
|
|
echo "@ that you experience."
|
|
echo "%"
|
|
echo "@"
|
|
echo "% If you need a stable version of sysprof, either"
|
|
echo "@ get version 1.0 from"
|
|
echo "%"
|
|
echo "@ http://www.daimi.au.dk/~sandmann/sysprof"
|
|
echo "%"
|
|
echo "@ or do"
|
|
echo "%"
|
|
echo "@ cvs -z3 upd -r sysprof-1-0"
|
|
echo "%"
|
|
echo "@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@"
|
|
echo
|