Lines 357-389
if test "x$HAVE_POLKIT" = "xyes"; then
Link Here
|
357 |
enable_suid=no |
357 |
enable_suid=no |
358 |
fi |
358 |
fi |
359 |
|
359 |
|
360 |
AC_ARG_WITH([cpufreq-lib], |
360 |
build_cpufreq_applet=yes |
361 |
AS_HELP_STRING([--with-cpufreq-lib=lib], [library to use for cpufreq applet @<:@default=cpufreq@:>@]), |
361 |
AS_IF([test "x$disable_cpufreq" = "xno"], [ |
362 |
[with_cpufreq_lib=$withval], [with_cpufreq_lib="cpupower"]) |
362 |
case "${host}" in |
|
|
363 |
*linux*) |
364 |
AC_CHECK_HEADER([cpufreq.h], [ |
365 |
AC_CHECK_LIB([cpupower], [cpupower_is_cpu_online], [ |
366 |
AC_DEFINE([HAVE_IS_CPU_ONLINE], 1, |
367 |
[Define to 1 if cpupower_is_cpu_online() is available]) |
368 |
cpufreq_lib="cpupower" |
363 |
|
369 |
|
364 |
AC_CHECK_HEADER(cpufreq.h, have_libcpufreq=yes, have_libcpufreq=no) |
370 |
AC_CHECK_LIB([cpupower], [cpufreq_get_frequencies], [ |
365 |
LIBCPUFREQ_LIBS= |
371 |
AC_DEFINE([HAVE_GET_FREQUENCIES], 1, |
366 |
if test "x$have_libcpufreq" = "xyes"; then |
372 |
[Define to 1 if cpufreq_get_frequencies() is available]) |
367 |
AC_DEFINE([HAVE_LIBCPUFREQ], [1], [Have libcpufreq.]) |
373 |
]) |
368 |
LIBCPUFREQ_LIBS="-l$with_cpufreq_lib" |
374 |
], [ |
369 |
fi |
375 |
AC_CHECK_LIB([cpupower], [cpufreq_cpu_exists], [ |
370 |
AM_CONDITIONAL(HAVE_LIBCPUFREQ, test x$have_libcpufreq = xyes) |
376 |
cpufreq_lib="cpupower" |
371 |
AC_SUBST(LIBCPUFREQ_LIBS) |
377 |
], [ |
372 |
|
378 |
AC_CHECK_LIB([cpufreq], [cpufreq_cpu_exists], [ |
373 |
build_cpufreq_applet=no |
379 |
cpufreq_lib="cpufreq" |
|
|
380 |
], [cpufreq_lib=]) |
381 |
]) |
382 |
]) |
374 |
|
383 |
|
375 |
if test x$disable_cpufreq = xno; then |
384 |
AS_IF([test "x$cpufreq_lib" != "x"], [ |
376 |
case "${host}" in |
385 |
LIBCPUFREQ_LIBS="-l$cpufreq_lib" |
377 |
*linux*) |
386 |
AC_DEFINE([HAVE_LIBCPUFREQ], [1], [Have libcpufreq.]) |
378 |
build_cpufreq_applet=yes |
387 |
AC_SUBST([LIBCPUFREQ_LIBS]) |
379 |
;; |
388 |
], [ |
380 |
*) |
389 |
AC_MSG_WARN([*** cpufreq applet will not be built ***]) |
381 |
AC_MSG_WARN([${host} is not supported by cpufreq applet, not building]) |
390 |
build_cpufreq_applet=no |
382 |
build_cpufreq_applet=no |
391 |
]) |
383 |
;; |
392 |
], [ |
384 |
esac |
393 |
AC_MSG_WARN([*** can't find cpufreq.h, cpufreq applet will not be built ***]) |
385 |
fi |
394 |
build_cpufreq_applet=no |
|
|
395 |
]) |
396 |
;; |
397 |
*) |
398 |
AC_MSG_WARN([${host} is not supported by cpufreq applet, not building]) |
399 |
build_cpufreq_applet=no |
400 |
;; |
401 |
esac |
402 |
], [build_cpufreq_applet=no]) |
386 |
|
403 |
|
|
|
404 |
AM_CONDITIONAL(HAVE_LIBCPUFREQ, test x$cpufreq_lib != x) |
387 |
AM_CONDITIONAL(BUILD_CPUFREQ_APPLET, test x$build_cpufreq_applet = xyes) |
405 |
AM_CONDITIONAL(BUILD_CPUFREQ_APPLET, test x$build_cpufreq_applet = xyes) |
388 |
AM_CONDITIONAL(BUILD_CPUFREQ_SELECTOR, test x$enable_selector = xyes) |
406 |
AM_CONDITIONAL(BUILD_CPUFREQ_SELECTOR, test x$enable_selector = xyes) |
389 |
AM_CONDITIONAL(CPUFREQ_SELECTOR_SUID, test x$enable_suid = xyes) |
407 |
AM_CONDITIONAL(CPUFREQ_SELECTOR_SUID, test x$enable_suid = xyes) |