hal: Branch 'master'

Danny Kukawka dkukawka at kemper.freedesktop.org
Wed Aug 27 11:54:20 PDT 2008


 configure.in |   23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

New commits:
commit 2d5fcc4c2362457d814bd96d7ecb709361c68b15
Author: Danny Kukawka <danny.kukawka at web.de>
Date:   Wed Aug 27 20:51:11 2008 +0200

    added configure check for libsmbios >= 2.0.3
    
    Added configure check for libsmbios >= 2.0.3 needed for usage
    of smi::getPasswordStatus(). We check for the libsmbios version
    because you can't use AC_CHECK_LIB to check the function.

diff --git a/configure.in b/configure.in
index 5cc6e5d..87cd285 100644
--- a/configure.in
+++ b/configure.in
@@ -430,6 +430,29 @@ if test "x$use_smbios" = "xyes" ; then
   		USE_SMBIOS=no
   		AM_CONDITIONAL(HAVE_SMBIOS, [false])
 	fi
+	# yes this is ugly, but there is AFAIK no other way to check for getPasswordStatus()
+	if test "x$USE_SMBIOS" = "xyes" ; then
+   		AC_MSG_CHECKING([for libsmbios >= 2.0.3])
+   		AC_RUN_IFELSE([AC_LANG_SOURCE([[
+   		#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 == 2 && minor == 0 && micro >= 3) ||
+               		       (major == 2 && minor > 0) ||
+               		       (major >= 2)) {
+			         return 0;
+	    		    }
+			}
+			return 1;
+   		}]])], [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SMBIOS_2_0_3, 1 , [Set to 1 if we have libsmbios >= v2.0.3])],
+       		[AC_MSG_RESULT(failed)])
+	fi
+	
 else
     	USE_SMBIOS=no
 	AM_CONDITIONAL(HAVE_SMBIOS, [false])


More information about the hal-commit mailing list