aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris E Ferron <chris.e.ferron@linux.intel.com>2012-07-19 11:52:35 -0700
committerChris E Ferron <chris.e.ferron@linux.intel.com>2012-07-19 11:52:35 -0700
commit0a8fbf9c4dc1f18a97bf17c741a5ddccfc448b34 (patch)
tree6481ba33356178ba7e1d0f613320af8ac4d4db54
parent98ca605e7cf856795facc4a3a4f9c5b9baf1cab1 (diff)
For systems with pci you will want libpci, but for systems that do not have pci you will not.
libpci has been made an optional lib, but for thoes who have pci, a warning has been added. this warning is to let people know that PowerTOP was configured with pci support.
-rw-r--r--configure.ac17
1 files changed, 14 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index cb14cf3..e9d0ae7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -47,9 +47,10 @@ AC_CHECK_FUNCS([fdatasync getpagesize gettimeofday memmove memset mkdir munmap p
AC_SEARCH_LIBS([delwin], [ncursesw ncurses], [], AC_MSG_ERROR([ncurses is required but was not found]), [])
-PKG_CHECK_MODULES([PCIUTILS], [libpci],[],[
- AC_SEARCH_LIBS([pci_get_dev], [pci],[], AC_DEFINE([HAVE_NO_PCI],[1],[Define if pci is not supported]), [])
-])
+has_libpci=0
+PKG_CHECK_MODULES([PCIUTILS], [libpci],[has_libpci=1],[
+ AC_SEARCH_LIBS([pci_get_dev], [pci],[has_libpci=1], [has_libpci=0] )])
+
has_libnl_ver=0
PKG_CHECK_MODULES([LIBNL], [libnl-1], [has_libnl_ver=1], [
@@ -65,6 +66,16 @@ if (test "$has_libnl_ver" -gt 1); then
AC_DEFINE([HAVE_LIBNL20], [1], [Define if you have libnl-2.0 or higher])
fi
+if (test "$has_libpci" -eq 0); then
+ AC_DEFINE([HAVE_NO_PCI],[1],[Define if pci is not supported])
+ AC_MSG_WARN([
+ ************* LIBPCI SUPPORT NOT CONFIGURED**************
+ If you need or want pci support, please install libpci
+ and re-configure PowerTOP.
+ *********************************************************
+ ])
+fi
+
AC_SEARCH_LIBS([pthread_create], [pthread], [], AC_MSG_ERROR([libpthread is required but was not found]), [])
AC_SEARCH_LIBS([inet_aton], [resolv], [], AC_MSG_ERROR([libresolv is required but was not found]), [])