Diff of /configure.ac [18c4a6] .. [442b5d] Maximize Restore

  Switch to unified view

a/configure.ac b/configure.ac
...
...
64
[AS_HELP_STRING([--with-kernel=dir], [Path to kernel include directory (e.g. /tmp/linux-xyz) to use.
64
[AS_HELP_STRING([--with-kernel=dir], [Path to kernel include directory (e.g. /tmp/linux-xyz) to use.
65
If this option is not specified, configure will look for kernel header files in the usual installation location
65
If this option is not specified, configure will look for kernel header files in the usual installation location
66
for a kernel-headers package -- /usr. Use this option in cross-compile enviroments
66
for a kernel-headers package -- /usr. Use this option in cross-compile enviroments
67
or in situations where the host system does not support perf_events but you wish to build binaries
67
or in situations where the host system does not support perf_events but you wish to build binaries
68
for a target system that does support perf_events. Because of OProfile's use of syscalls,
68
for a target system that does support perf_events. Because of OProfile's use of syscalls,
69
kernel headers used during build must match the architecture of the intended target system.])],
69
kernel headers used during build must match the architecture of the intended target system.
70
NOTE:  Run the command 'make headers_install INSTALL_HDR_PATH=<kernel-hdrs-install-dir>'
71
from the root directory of your kernel source tree, and use <kernel-hdrs-install-dir> for
72
oprofile's '--with-kernel' configure option.])],
70
KERNELDIR=$withval)
73
KERNELDIR=$withval)
71
74
72
75
73
dnl Check kernel version for perf_events supported
76
dnl Check kernel version for perf_events supported
74
if test "$KERNELDIR" != ""; then
77
if test "$KERNELDIR" != ""; then
78
  if test -d $KERNELDIR; then
75
    KINC="$KERNELDIR/include"
79
     KINC="$KERNELDIR/include"
76
    PERF_EVENT_FLAGS=" -I$KERNELDIR/include"
80
     PERF_EVENT_FLAGS=" -I$KERNELDIR/include"
77
    AC_SUBST(PERF_EVENT_FLAGS)
81
     AC_SUBST(PERF_EVENT_FLAGS)
78
    PERF_EVENT_H="$KERNELDIR/include/linux/perf_event.h"
82
     PERF_EVENT_H="$KERNELDIR/include/linux/perf_event.h"
83
  else
84
      echo "$KERNELDIR does not exist."
85
  fi
79
else
86
else
80
    PERF_EVENT_H="/usr/include/linux/perf_event.h"
87
    PERF_EVENT_H="/usr/include/linux/perf_event.h"
81
fi
88
fi
82
89
83
PERF_EVENT_H_EXISTS="no"
90
PERF_EVENT_H_EXISTS="no"
...
...
470
477
471
if  test "$PERF_EVENT_H_EXISTS" != "yes" && test "$kernel_may_have_perf_events_support" = "yes"; then
478
if  test "$PERF_EVENT_H_EXISTS" != "yes" && test "$kernel_may_have_perf_events_support" = "yes"; then
472
    echo "Warning: perf_event.h not found.  Either install the kernel headers package or"
479
    echo "Warning: perf_event.h not found.  Either install the kernel headers package or"
473
    echo "use the --with-kernel option if you want the non-root, single application"
480
    echo "use the --with-kernel option if you want the non-root, single application"
474
    echo "profiling support provided by operf."
481
    echo "profiling support provided by operf."
482
  echo ""
483
  echo "If you run 'make' now, only the legacy ocontrol-based profiler will be built."
484
fi
485
486
if test "$KERNELDIR" != "" && test "$kernel_has_perf_events_support" != "yes"; then
487
  if ! test -d $KERNELDIR; then
488
      echo "WARNING: You passed '--with-kernel=$KERNELDIR', but $KERNELDIR"
489
      echo "does not exist."
490
  else
491
      echo "Warning: You requested to build with the '--with-kernel' option, but your kernel"
492
      echo "headers were not accessible at the given location. Be sure you have run the following"
493
      echo "command from within your kernel source tree:"
494
      echo "     make headers_install INSTALL_HDR_PATH=<kernel-hdrs-install-dir>"
495
      echo "Then pass <kernel-hdrs-install-dir> to oprofile's '--with-kernel' configure option."
475
fi
496
  fi
476
497
  echo ""
498
  echo "If you run 'make' now, only the legacy ocontrol-based profiler will be built."
499
fi