hal: Branch 'master'

Danny Kukawka dkukawka at kemper.freedesktop.org
Wed Feb 7 10:51:09 PST 2007


 configure.in |   29 +++++++++++++++++++++++++----
 1 files changed, 25 insertions(+), 4 deletions(-)

New commits:
diff-tree 4e78e06043a92e7c9df57f8ef989da9f8fa5712f (from 1d1d38d1d73a5d7c26fe6adfc6cdf40a985de45b)
Author: Danny Kukawka <danny.kukawka at web.de>
Date:   Wed Feb 7 19:51:06 2007 +0100

    fixed detection of libsmbios to check for >= v0.11.6
    
    This patch adds a check to configure to get the correct libsmbios version for
    the addon-dell-backlight addon for linux.  The in the code needed function
    getSmiDetails() was introduced with/after 0.11.x. Added a check for >= 0.11.6
    since there is no version of the 0.11.x tree under 0.11.6 available.

diff --git a/configure.in b/configure.in
index 7b0eb23..5411b18 100644
--- a/configure.in
+++ b/configure.in
@@ -301,9 +301,30 @@ else
 fi
 
 dnl Check for libsmbios 
-AC_CHECK_LIB(smbios, SMBIOSFreeMemory, [
-		     USE_SMBIOS=yes; AM_CONDITIONAL(HAVE_SMBIOS,true)], [
-		     USE_SMBIOS=no; AM_CONDITIONAL(HAVE_SMBIOS,false)])
+AC_CHECK_LIB(smbios, SMBIOSFreeMemory, LIB_SMBIOS=yes , LIB_SMBIOS=no )
+if test "$LIB_SMBIOS" = "yes" ; then 
+   AC_MSG_CHECKING(for libsmbios >= 0.11.6 )	
+   AC_TRY_RUN(
+   #include <smbios/version.h>
+   int main ()
+   {
+        int major ;
+        int minor ;
+        int micro ;
+	
+        if ( sscanf( LIBSMBIOS_RELEASE_VERSION , "%d.%d.%d", &major, &minor, &micro ) == 3 ) {
+	    if ((major == 0 && minor == 11 && micro >= 6) ||
+               (major >= 0 && minor > 11)) {
+		return 0; 
+	    } 
+	}
+	return 1;
+   } , [USE_SMBIOS=yes; AC_MSG_RESULT(yes); AM_CONDITIONAL(HAVE_SMBIOS,true)], 
+       [USE_SMBIOS=no; AC_MSG_RESULT(failed); AM_CONDITIONAL(HAVE_SMBIOS,false)])
+else
+  USE_SMBIOS=no
+  AM_CONDITIONAL(HAVE_SMBIOS,false)
+fi
 
 dnl Check for libpci
 AC_CHECK_HEADERS(pci/pci.h, [
@@ -769,7 +790,7 @@ echo "
         Macbook Pro utils:          ${BUILD_MACBOOKPRO} (Linux only, x86 only, requires libpci)
         CPU frequency scaling:      ${BUILD_CPUFREQ} (Linux only)
 	USB wireless mouse power:   ${BUILD_USBCSR} (Linux only, requires libusb)
-	Dell Backlight              ${BUILD_DELL} (Linux only, requires libsmbios)
+	Dell Backlight              ${BUILD_DELL} (Linux only, requires libsmbios >= 0.11.6)
 
         Maintainer mode:            ${USE_MAINTAINER_MODE}
         Building verbose mode:      ${enable_verbose_mode}


More information about the hal-commit mailing list