[Pkg-opencl-devel] [clinfo] 04/06: Imported Upstream version 0.0.20130513

Andreas Beckmann anbe at moszumanska.debian.org
Sun Nov 9 21:56:10 UTC 2014


This is an automated email from the git hooks/post-receive script.

anbe pushed a commit to branch master
in repository clinfo.

commit be191fe6753a0147fed9f67df9de5d059d51c390
Author: Simon Richter <sjr at debian.org>
Date:   Mon May 13 19:52:36 2013 +0200

    Imported Upstream version 0.0.20130513
---
 Makefile.am           |   6 +-
 Makefile.in           | 116 ++++++++---------
 aclocal.m4            | 337 +++++++++++++++++++++++++++-----------------------
 clinfo.cpp            | 178 +++-----------------------
 configure             | 171 +++++++++++--------------
 configure.ac          |   2 +-
 depcomp               |  89 +------------
 device.cpp            | 176 ++++++++++++++++++++++++++
 device.h              | 113 +++++++++++++++++
 install-sh            |  14 +--
 missing               |  99 +++++++--------
 output_amd_compat.cpp | 137 ++++++++++++++++++++
 output_amd_compat.h   |  10 ++
 output_common.cpp     |  18 +++
 output_common.h       |   8 ++
 platform.cpp          |  65 ++++++++++
 platform.h            |  33 +++++
 17 files changed, 954 insertions(+), 618 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 618436c..e5dcd9e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -16,4 +16,8 @@
 
 bin_PROGRAMS = clinfo
 
-clinfo_SOURCES = clinfo.cpp
+clinfo_SOURCES = clinfo.cpp \
+        device.cpp device.h \
+        output_amd_compat.cpp output_amd_compat.h \
+        output_common.cpp output_common.h \
+        platform.cpp platform.h
diff --git a/Makefile.in b/Makefile.in
index d9f93a1..2bc44e3 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,8 +1,9 @@
-# Makefile.in generated by automake 1.12.6 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2012 Free Software Foundation, Inc.
-
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -81,7 +82,9 @@ CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
 am__installdirs = "$(DESTDIR)$(bindir)"
 PROGRAMS = $(bin_PROGRAMS)
-am_clinfo_OBJECTS = clinfo.$(OBJEXT)
+am_clinfo_OBJECTS = clinfo.$(OBJEXT) device.$(OBJEXT) \
+	output_amd_compat.$(OBJEXT) output_common.$(OBJEXT) \
+	platform.$(OBJEXT)
 clinfo_OBJECTS = $(am_clinfo_OBJECTS)
 clinfo_LDADD = $(LDADD)
 DEFAULT_INCLUDES = -I. at am__isrc@
@@ -93,6 +96,10 @@ CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
 CXXLD = $(CXX)
 CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
 	-o $@
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
 SOURCES = $(clinfo_SOURCES)
 DIST_SOURCES = $(clinfo_SOURCES)
 am__can_run_installinfo = \
@@ -102,8 +109,6 @@ am__can_run_installinfo = \
   esac
 ETAGS = etags
 CTAGS = ctags
-CSCOPE = cscope
-AM_RECURSIVE_TARGETS = cscope
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 distdir = $(PACKAGE)-$(VERSION)
 top_distdir = $(distdir)
@@ -113,10 +118,8 @@ am__remove_distdir = \
       && rm -rf "$(distdir)" \
       || { sleep 5 && rm -rf "$(distdir)"; }; \
   else :; fi
-am__post_remove_distdir = $(am__remove_distdir)
 DIST_ARCHIVES = $(distdir).tar.gz
 GZIP_ENV = --best
-DIST_TARGETS = dist-gzip
 distuninstallcheck_listfiles = find . -type f -print
 am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
   | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
@@ -211,7 +214,12 @@ target_alias = @target_alias@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
-clinfo_SOURCES = clinfo.cpp
+clinfo_SOURCES = clinfo.cpp \
+        device.cpp device.h \
+        output_amd_compat.cpp output_amd_compat.h \
+        output_common.cpp output_common.h \
+        platform.cpp platform.h
+
 all: config.h
 	$(MAKE) $(AM_MAKEFLAGS) all-am
 
@@ -317,6 +325,10 @@ distclean-compile:
 	-rm -f *.tab.c
 
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/clinfo.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/device.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/output_amd_compat.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/output_common.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/platform.Po at am__quote@
 
 .cpp.o:
 @am__fastdepCXX_TRUE@	$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@@ -381,32 +393,8 @@ GTAGS:
 	  && $(am__cd) $(top_srcdir) \
 	  && gtags -i $(GTAGS_ARGS) "$$here"
 
-cscope: cscope.files
-	test ! -s cscope.files \
-	  || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS)
-
-clean-cscope:
-	-rm -f cscope.files
-
-cscope.files: clean-cscope  cscopelist
-
-cscopelist:  $(HEADERS) $(SOURCES) $(LISP)
-	list='$(SOURCES) $(HEADERS) $(LISP)'; \
-	case "$(srcdir)" in \
-	  [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
-	  *) sdir=$(subdir)/$(srcdir) ;; \
-	esac; \
-	for i in $$list; do \
-	  if test -f "$$i"; then \
-	    echo "$(subdir)/$$i"; \
-	  else \
-	    echo "$$sdir/$$i"; \
-	  fi; \
-	done >> $(top_builddir)/cscope.files
-
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-	-rm -f cscope.out cscope.in.out cscope.po.out cscope.files
 
 distdir: $(DISTFILES)
 	$(am__remove_distdir)
@@ -449,36 +437,40 @@ distdir: $(DISTFILES)
 	|| chmod -R a+r "$(distdir)"
 dist-gzip: distdir
 	tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
-	$(am__post_remove_distdir)
+	$(am__remove_distdir)
 
 dist-bzip2: distdir
 	tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
-	$(am__post_remove_distdir)
+	$(am__remove_distdir)
 
 dist-lzip: distdir
 	tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
-	$(am__post_remove_distdir)
+	$(am__remove_distdir)
+
+dist-lzma: distdir
+	tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
+	$(am__remove_distdir)
 
 dist-xz: distdir
 	tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
-	$(am__post_remove_distdir)
+	$(am__remove_distdir)
 
 dist-tarZ: distdir
 	tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
-	$(am__post_remove_distdir)
+	$(am__remove_distdir)
 
 dist-shar: distdir
 	shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
-	$(am__post_remove_distdir)
+	$(am__remove_distdir)
 
 dist-zip: distdir
 	-rm -f $(distdir).zip
 	zip -rq $(distdir).zip $(distdir)
-	$(am__post_remove_distdir)
+	$(am__remove_distdir)
 
-dist dist-all:
-	$(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:'
-	$(am__post_remove_distdir)
+dist dist-all: distdir
+	tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+	$(am__remove_distdir)
 
 # This target untars the dist file and tries a VPATH configuration.  Then
 # it guarantees that the distribution is self-contained by making another
@@ -489,6 +481,8 @@ distcheck: dist
 	  GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
 	*.tar.bz2*) \
 	  bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
+	*.tar.lzma*) \
+	  lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
 	*.tar.lz*) \
 	  lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
 	*.tar.xz*) \
@@ -500,9 +494,9 @@ distcheck: dist
 	*.zip*) \
 	  unzip $(distdir).zip ;;\
 	esac
-	chmod -R a-w $(distdir)
-	chmod u+w $(distdir)
-	mkdir $(distdir)/_build $(distdir)/_inst
+	chmod -R a-w $(distdir); chmod u+w $(distdir)
+	mkdir $(distdir)/_build
+	mkdir $(distdir)/_inst
 	chmod a-w $(distdir)
 	test -d $(distdir)/_build || exit 0; \
 	dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
@@ -534,7 +528,7 @@ distcheck: dist
 	  && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
 	  && cd "$$am__cwd" \
 	  || exit 1
-	$(am__post_remove_distdir)
+	$(am__remove_distdir)
 	@(echo "$(distdir) archives ready for distribution: "; \
 	  list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
 	  sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
@@ -676,20 +670,20 @@ uninstall-am: uninstall-binPROGRAMS
 .MAKE: all install-am install-strip
 
 .PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \
-	clean-binPROGRAMS clean-cscope clean-generic cscope cscopelist \
-	ctags dist dist-all dist-bzip2 dist-gzip dist-lzip dist-shar \
-	dist-tarZ dist-xz dist-zip distcheck distclean \
-	distclean-compile distclean-generic distclean-hdr \
-	distclean-tags distcleancheck distdir distuninstallcheck dvi \
-	dvi-am html html-am info info-am install install-am \
-	install-binPROGRAMS install-data install-data-am install-dvi \
-	install-dvi-am install-exec install-exec-am install-html \
-	install-html-am install-info install-info-am install-man \
-	install-pdf install-pdf-am install-ps install-ps-am \
-	install-strip installcheck installcheck-am installdirs \
-	maintainer-clean maintainer-clean-generic mostlyclean \
-	mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \
-	tags uninstall uninstall-am uninstall-binPROGRAMS
+	clean-binPROGRAMS clean-generic ctags dist dist-all dist-bzip2 \
+	dist-gzip dist-lzip dist-lzma dist-shar dist-tarZ dist-xz \
+	dist-zip distcheck distclean distclean-compile \
+	distclean-generic distclean-hdr distclean-tags distcleancheck \
+	distdir distuninstallcheck dvi dvi-am html html-am info \
+	info-am install install-am install-binPROGRAMS install-data \
+	install-data-am install-dvi install-dvi-am install-exec \
+	install-exec-am install-html install-html-am install-info \
+	install-info-am install-man install-pdf install-pdf-am \
+	install-ps install-ps-am install-strip installcheck \
+	installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-compile \
+	mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
+	uninstall-am uninstall-binPROGRAMS
 
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
diff --git a/aclocal.m4 b/aclocal.m4
index f082e3c..3094178 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1,7 +1,8 @@
-# generated automatically by aclocal 1.12.6 -*- Autoconf -*-
-
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# generated automatically by aclocal 1.11.6 -*- Autoconf -*-
 
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
+# Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -17,24 +18,27 @@ m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
 [m4_warning([this file was generated for autoconf 2.69.
 You have another version of autoconf.  It may work, but is not guaranteed to.
 If you have problems, you may need to regenerate the build system entirely.
-To do so, use the procedure documented by the package, typically 'autoreconf'.])])
+To do so, use the procedure documented by the package, typically `autoreconf'.])])
 
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software
+# Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
+# serial 1
+
 # AM_AUTOMAKE_VERSION(VERSION)
 # ----------------------------
 # Automake X.Y traces this macro to ensure aclocal.m4 has been
 # generated from the m4 files accompanying Automake X.Y.
 # (This private macro should not be called outside this file.)
 AC_DEFUN([AM_AUTOMAKE_VERSION],
-[am__api_version='1.12'
+[am__api_version='1.11'
 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
 dnl require some minimum version.  Point them to the right macro.
-m4_if([$1], [1.12.6], [],
+m4_if([$1], [1.11.6], [],
       [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
 ])
 
@@ -50,22 +54,24 @@ m4_define([_AM_AUTOCONF_VERSION], [])
 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.12.6])dnl
+[AM_AUTOMAKE_VERSION([1.11.6])dnl
 m4_ifndef([AC_AUTOCONF_VERSION],
   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
 
 # AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
 
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
+# serial 1
+
 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
-# $ac_aux_dir to '$srcdir/foo'.  In other projects, it is set to
-# '$srcdir', '$srcdir/..', or '$srcdir/../..'.
+# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
+# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
 #
 # Of course, Automake must honor this variable whenever it calls a
 # tool from the auxiliary directory.  The problem is that $srcdir (and
@@ -84,7 +90,7 @@ _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
 #
 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
 # are both prefixed by $srcdir.  In an in-source build this is usually
-# harmless because $srcdir is '.', but things will broke when you
+# harmless because $srcdir is `.', but things will broke when you
 # start a VPATH build or use an absolute $srcdir.
 #
 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
@@ -110,19 +116,22 @@ am_aux_dir=`cd $ac_aux_dir && pwd`
 
 # AM_CONDITIONAL                                            -*- Autoconf -*-
 
-# Copyright (C) 1997-2012 Free Software Foundation, Inc.
+# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
+# Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
+# serial 9
+
 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
 # -------------------------------------
 # Define a conditional.
 AC_DEFUN([AM_CONDITIONAL],
-[AC_PREREQ([2.52])dnl
- m4_if([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
-       [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+[AC_PREREQ(2.52)dnl
+ ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
+	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
 AC_SUBST([$1_TRUE])dnl
 AC_SUBST([$1_FALSE])dnl
 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
@@ -141,14 +150,16 @@ AC_CONFIG_COMMANDS_PRE(
 Usually this means the macro was only invoked conditionally.]])
 fi])])
 
-# Copyright (C) 1999-2012 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009,
+# 2010, 2011 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
+# serial 12
 
-# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
+# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
 # written in clear, in which case automake, when reading aclocal.m4,
 # will think it sees a *use*, and therefore will trigger all it's
 # C support machinery.  Also note that it means that autoscan, seeing
@@ -158,7 +169,7 @@ fi])])
 # _AM_DEPENDENCIES(NAME)
 # ----------------------
 # See how the compiler implements dependency checking.
-# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
+# NAME is "CC", "CXX", "GCJ", or "OBJC".
 # We try a few techniques and use that to set a single cache variable.
 #
 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
@@ -171,13 +182,12 @@ AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
 AC_REQUIRE([AM_DEP_TRACK])dnl
 
-m4_if([$1], [CC],   [depcc="$CC"   am_compiler_list=],
-      [$1], [CXX],  [depcc="$CXX"  am_compiler_list=],
-      [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
-      [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
-      [$1], [UPC],  [depcc="$UPC"  am_compiler_list=],
-      [$1], [GCJ],  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
-                    [depcc="$$1"   am_compiler_list=])
+ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
+       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
+       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
+       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
+                   [depcc="$$1"   am_compiler_list=])
 
 AC_CACHE_CHECK([dependency style of $depcc],
                [am_cv_$1_dependencies_compiler_type],
@@ -185,8 +195,8 @@ AC_CACHE_CHECK([dependency style of $depcc],
   # We make a subdir and do the tests there.  Otherwise we can end up
   # making bogus files that we don't know about and never remove.  For
   # instance it was reported that on HP-UX the gcc test will end up
-  # making a dummy file named 'D' -- because '-MD' means "put the output
-  # in D".
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
   rm -rf conftest.dir
   mkdir conftest.dir
   # Copy depcomp to subdir because otherwise we won't find it if we're
@@ -226,16 +236,16 @@ AC_CACHE_CHECK([dependency style of $depcc],
     : > sub/conftest.c
     for i in 1 2 3 4 5 6; do
       echo '#include "conftst'$i'.h"' >> sub/conftest.c
-      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
-      # Solaris 10 /bin/sh.
-      echo '/* dummy */' > sub/conftst$i.h
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
     done
     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
 
-    # We check with '-c' and '-o' for the sake of the "dashmstdout"
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
     # mode.  It turns out that the SunPro C++ compiler does not properly
-    # handle '-M -o', and we need to detect this.  Also, some Intel
-    # versions had trouble with output in subdirs.
+    # handle `-M -o', and we need to detect this.  Also, some Intel
+    # versions had trouble with output in subdirs
     am__obj=sub/conftest.${OBJEXT-o}
     am__minus_obj="-o $am__obj"
     case $depmode in
@@ -244,8 +254,8 @@ AC_CACHE_CHECK([dependency style of $depcc],
       test "$am__universal" = false || continue
       ;;
     nosideeffect)
-      # After this tag, mechanisms are not by side-effect, so they'll
-      # only be used when explicitly requested.
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
       if test "x$enable_dependency_tracking" = xyes; then
 	continue
       else
@@ -253,7 +263,7 @@ AC_CACHE_CHECK([dependency style of $depcc],
       fi
       ;;
     msvc7 | msvc7msys | msvisualcpp | msvcmsys)
-      # This compiler won't grok '-c -o', but also, the minuso test has
+      # This compiler won't grok `-c -o', but also, the minuso test has
       # not run yet.  These depmodes are late enough in the game, and
       # so weak that their functioning should not be impacted.
       am__obj=conftest.${OBJEXT-o}
@@ -301,7 +311,7 @@ AM_CONDITIONAL([am__fastdep$1], [
 # AM_SET_DEPDIR
 # -------------
 # Choose a directory name for dependency files.
-# This macro is AC_REQUIREd in _AM_DEPENDENCIES.
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES
 AC_DEFUN([AM_SET_DEPDIR],
 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
@@ -311,13 +321,9 @@ AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
 # AM_DEP_TRACK
 # ------------
 AC_DEFUN([AM_DEP_TRACK],
-[AC_ARG_ENABLE([dependency-tracking], [dnl
-AS_HELP_STRING(
-  [--enable-dependency-tracking],
-  [do not reject slow dependency extractors])
-AS_HELP_STRING(
-  [--disable-dependency-tracking],
-  [speeds up one-time build])])
+[AC_ARG_ENABLE(dependency-tracking,
+[  --disable-dependency-tracking  speeds up one-time build
+  --enable-dependency-tracking   do not reject slow dependency extractors])
 if test "x$enable_dependency_tracking" != xno; then
   am_depcomp="$ac_aux_dir/depcomp"
   AMDEPBACKSLASH='\'
@@ -332,12 +338,14 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl
 
 # Generate code to set up dependency tracking.              -*- Autoconf -*-
 
-# Copyright (C) 1999-2012 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
+# Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
+#serial 5
 
 # _AM_OUTPUT_DEPENDENCY_COMMANDS
 # ------------------------------
@@ -356,7 +364,7 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
     # Strip MF so we end up with the name of the file.
     mf=`echo "$mf" | sed -e 's/:.*$//'`
     # Check whether this is an Automake generated Makefile or not.
-    # We used to match only the files named 'Makefile.in', but
+    # We used to match only the files named `Makefile.in', but
     # some people rename them; so instead we look at the file content.
     # Grep'ing the first line is not enough: some people post-process
     # each Makefile.in and add a new line on top of each file to say so.
@@ -368,19 +376,21 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
       continue
     fi
     # Extract the definition of DEPDIR, am__include, and am__quote
-    # from the Makefile without running 'make'.
+    # from the Makefile without running `make'.
     DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
     test -z "$DEPDIR" && continue
     am__include=`sed -n 's/^am__include = //p' < "$mf"`
     test -z "am__include" && continue
     am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+    # When using ansi2knr, U may be empty or an underscore; expand it
+    U=`sed -n 's/^U = //p' < "$mf"`
     # Find all dependency output files, they are included files with
     # $(DEPDIR) in their names.  We invoke sed twice because it is the
     # simplest approach to changing $(DEPDIR) to its actual value in the
     # expansion.
     for file in `sed -n "
       s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
-	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
+	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
       # Make sure the directory exists.
       test -f "$dirpart/$file" && continue
       fdir=`AS_DIRNAME(["$file"])`
@@ -398,7 +408,7 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
 # This macro should only be invoked once -- use via AC_REQUIRE.
 #
 # This code is only required when automatic dependency tracking
-# is enabled.  FIXME.  This creates each '.P' file that we will
+# is enabled.  FIXME.  This creates each `.P' file that we will
 # need in order to bootstrap the dependency handling code.
 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
 [AC_CONFIG_COMMANDS([depfiles],
@@ -408,12 +418,15 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
 
 # Do all the work for Automake.                             -*- Autoconf -*-
 
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
+# serial 16
+
 # This macro actually does too much.  Some checks are only needed if
 # your package does certain things.  But this isn't really a big deal.
 
@@ -458,41 +471,31 @@ AC_SUBST([CYGPATH_W])
 # Define the identity of the package.
 dnl Distinguish between old-style and new-style calls.
 m4_ifval([$2],
-[AC_DIAGNOSE([obsolete],
-[$0: two- and three-arguments forms are deprecated.  For more info, see:
-http://www.gnu.org/software/automake/manual/automake.html#Modernize-AM_INIT_AUTOMAKE-invocation])
-m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
  AC_SUBST([PACKAGE], [$1])dnl
  AC_SUBST([VERSION], [$2])],
 [_AM_SET_OPTIONS([$1])dnl
 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
-m4_if(
-  m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
-  [ok:ok],,
+m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
   [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
  AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
  AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
 
 _AM_IF_OPTION([no-define],,
-[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
- AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
+[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+ AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
 
 # Some tools Automake needs.
 AC_REQUIRE([AM_SANITY_CHECK])dnl
 AC_REQUIRE([AC_ARG_PROGRAM])dnl
-AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
-AM_MISSING_PROG([AUTOCONF], [autoconf])
-AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
-AM_MISSING_PROG([AUTOHEADER], [autoheader])
-AM_MISSING_PROG([MAKEINFO], [makeinfo])
+AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
+AM_MISSING_PROG(AUTOCONF, autoconf)
+AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
+AM_MISSING_PROG(AUTOHEADER, autoheader)
+AM_MISSING_PROG(MAKEINFO, makeinfo)
 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
 AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
-AC_REQUIRE([AC_PROG_MKDIR_P])dnl
-# For better backward compatibility.  To be removed once Automake 1.9.x
-# dies out for good.  For more background, see:
-# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
-# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
-AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
+AC_REQUIRE([AM_PROG_MKDIR_P])dnl
 # We need awk for the "check" target.  The system "awk" is bad on
 # some platforms.
 AC_REQUIRE([AC_PROG_AWK])dnl
@@ -503,35 +506,28 @@ _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
 			     [_AM_PROG_TAR([v7])])])
 _AM_IF_OPTION([no-dependencies],,
 [AC_PROVIDE_IFELSE([AC_PROG_CC],
-		  [_AM_DEPENDENCIES([CC])],
-		  [m4_define([AC_PROG_CC],
-			     m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
+		  [_AM_DEPENDENCIES(CC)],
+		  [define([AC_PROG_CC],
+			  defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
 AC_PROVIDE_IFELSE([AC_PROG_CXX],
-		  [_AM_DEPENDENCIES([CXX])],
-		  [m4_define([AC_PROG_CXX],
-			     m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
+		  [_AM_DEPENDENCIES(CXX)],
+		  [define([AC_PROG_CXX],
+			  defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
-		  [_AM_DEPENDENCIES([OBJC])],
-		  [m4_define([AC_PROG_OBJC],
-			     m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
-dnl Support for Objective C++ was only introduced in Autoconf 2.65,
-dnl but we still cater to Autoconf 2.62.
-m4_ifdef([AC_PROG_OBJCXX],
-[AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
-		  [_AM_DEPENDENCIES([OBJCXX])],
-		  [m4_define([AC_PROG_OBJCXX],
-			     m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])])dnl
+		  [_AM_DEPENDENCIES(OBJC)],
+		  [define([AC_PROG_OBJC],
+			  defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
 ])
 _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
-dnl The 'parallel-tests' driver may need to know about EXEEXT, so add the
-dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
+dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
+dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
 dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
 AC_CONFIG_COMMANDS_PRE(dnl
 [m4_provide_if([_AM_COMPILER_EXEEXT],
   [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
 ])
 
-dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
+dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
 dnl mangled by Autoconf and run in a shell conditional statement.
 m4_define([_AC_COMPILER_EXEEXT],
@@ -559,12 +555,15 @@ for _am_header in $config_headers :; do
 done
 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
 
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation,
+# Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
+# serial 1
+
 # AM_PROG_INSTALL_SH
 # ------------------
 # Define $install_sh.
@@ -578,14 +577,16 @@ if test x"${install_sh}" != xset; then
     install_sh="\${SHELL} $am_aux_dir/install-sh"
   esac
 fi
-AC_SUBST([install_sh])])
+AC_SUBST(install_sh)])
 
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
+# serial 2
+
 # Check whether the underlying file-system supports filenames
 # with a leading dot.  For instance MS-DOS doesn't.
 AC_DEFUN([AM_SET_LEADING_DOT],
@@ -601,12 +602,14 @@ AC_SUBST([am__leading_dot])])
 
 # Check to see how 'make' treats includes.	            -*- Autoconf -*-
 
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
+# serial 4
+
 # AM_MAKE_INCLUDE()
 # -----------------
 # Check to see how make treats includes.
@@ -624,7 +627,7 @@ am__quote=
 _am_result=none
 # First try GNU make style include.
 echo "include confinc" > confmf
-# Ignore all kinds of additional output from 'make'.
+# Ignore all kinds of additional output from `make'.
 case `$am_make -s -f confmf 2> /dev/null` in #(
 *the\ am__doit\ target*)
   am__include=include
@@ -651,12 +654,15 @@ rm -f confinc confmf
 
 # Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
 
-# Copyright (C) 1997-2012 Free Software Foundation, Inc.
+# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
+# Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
+# serial 6
+
 # AM_MISSING_PROG(NAME, PROGRAM)
 # ------------------------------
 AC_DEFUN([AM_MISSING_PROG],
@@ -664,6 +670,7 @@ AC_DEFUN([AM_MISSING_PROG],
 $1=${$1-"${am_missing_run}$2"}
 AC_SUBST($1)])
 
+
 # AM_MISSING_HAS_RUN
 # ------------------
 # Define MISSING if not defined so far and test if it supports --run.
@@ -684,18 +691,50 @@ if eval "$MISSING --run true"; then
   am_missing_run="$MISSING --run "
 else
   am_missing_run=
-  AC_MSG_WARN(['missing' script is too old or missing])
+  AC_MSG_WARN([`missing' script is too old or missing])
 fi
 ])
 
+# Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation,
+# Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 1
+
+# AM_PROG_MKDIR_P
+# ---------------
+# Check for `mkdir -p'.
+AC_DEFUN([AM_PROG_MKDIR_P],
+[AC_PREREQ([2.60])dnl
+AC_REQUIRE([AC_PROG_MKDIR_P])dnl
+dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
+dnl while keeping a definition of mkdir_p for backward compatibility.
+dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
+dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
+dnl Makefile.ins that do not define MKDIR_P, so we do our own
+dnl adjustment using top_builddir (which is defined more often than
+dnl MKDIR_P).
+AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
+case $mkdir_p in
+  [[\\/$]]* | ?:[[\\/]]*) ;;
+  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
+])
+
 # Helper functions for option handling.                     -*- Autoconf -*-
 
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software
+# Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
+# serial 5
+
 # _AM_MANGLE_OPTION(NAME)
 # -----------------------
 AC_DEFUN([_AM_MANGLE_OPTION],
@@ -705,7 +744,7 @@ AC_DEFUN([_AM_MANGLE_OPTION],
 # --------------------
 # Set option NAME.  Presently that only means defining a flag for this option.
 AC_DEFUN([_AM_SET_OPTION],
-[m4_define(_AM_MANGLE_OPTION([$1]), [1])])
+[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
 
 # _AM_SET_OPTIONS(OPTIONS)
 # ------------------------
@@ -721,16 +760,22 @@ AC_DEFUN([_AM_IF_OPTION],
 
 # Check to make sure that the build environment is sane.    -*- Autoconf -*-
 
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
+# Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
+# serial 5
+
 # AM_SANITY_CHECK
 # ---------------
 AC_DEFUN([AM_SANITY_CHECK],
 [AC_MSG_CHECKING([whether build environment is sane])
+# Just in case
+sleep 1
+echo timestamp > conftest.file
 # Reject unsafe characters in $srcdir or the absolute working directory
 # name.  Accept space and tab only in the latter.
 am_lf='
@@ -741,40 +786,32 @@ case `pwd` in
 esac
 case $srcdir in
   *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
-    AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
+    AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
 esac
 
-# Do 'set' in a subshell so we don't clobber the current shell's
+# Do `set' in a subshell so we don't clobber the current shell's
 # arguments.  Must try -L first in case configure is actually a
 # symlink; some systems play weird games with the mod time of symlinks
 # (eg FreeBSD returns the mod time of the symlink's containing
 # directory).
 if (
-   am_has_slept=no
-   for am_try in 1 2; do
-     echo "timestamp, slept: $am_has_slept" > conftest.file
-     set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
-     if test "$[*]" = "X"; then
-	# -L didn't work.
-	set X `ls -t "$srcdir/configure" conftest.file`
-     fi
-     if test "$[*]" != "X $srcdir/configure conftest.file" \
-	&& test "$[*]" != "X conftest.file $srcdir/configure"; then
-
-	# If neither matched, then we have a broken ls.  This can happen
-	# if, for instance, CONFIG_SHELL is bash and it inherits a
-	# broken ls alias from the environment.  This has actually
-	# happened.  Such a system could not be considered "sane".
-	AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
-  alias in your environment])
-     fi
-     if test "$[2]" = conftest.file || test $am_try -eq 2; then
-       break
-     fi
-     # Just in case.
-     sleep 1
-     am_has_slept=yes
-   done
+   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+   if test "$[*]" = "X"; then
+      # -L didn't work.
+      set X `ls -t "$srcdir/configure" conftest.file`
+   fi
+   rm -f conftest.file
+   if test "$[*]" != "X $srcdir/configure conftest.file" \
+      && test "$[*]" != "X conftest.file $srcdir/configure"; then
+
+      # If neither matched, then we have a broken ls.  This can happen
+      # if, for instance, CONFIG_SHELL is bash and it inherits a
+      # broken ls alias from the environment.  This has actually
+      # happened.  Such a system could not be considered "sane".
+      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
+alias in your environment])
+   fi
+
    test "$[2]" = conftest.file
    )
 then
@@ -784,58 +821,46 @@ else
    AC_MSG_ERROR([newly created file is older than distributed files!
 Check your system clock])
 fi
-AC_MSG_RESULT([yes])
-# If we didn't sleep, we still need to ensure time stamps of config.status and
-# generated files are strictly newer.
-am_sleep_pid=
-if grep 'slept: no' conftest.file >/dev/null 2>&1; then
-  ( sleep 1 ) &
-  am_sleep_pid=$!
-fi
-AC_CONFIG_COMMANDS_PRE(
-  [AC_MSG_CHECKING([that generated files are newer than configure])
-   if test -n "$am_sleep_pid"; then
-     # Hide warnings about reused PIDs.
-     wait $am_sleep_pid 2>/dev/null
-   fi
-   AC_MSG_RESULT([done])])
-rm -f conftest.file
-])
+AC_MSG_RESULT(yes)])
 
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
+# serial 1
+
 # AM_PROG_INSTALL_STRIP
 # ---------------------
-# One issue with vendor 'install' (even GNU) is that you can't
+# One issue with vendor `install' (even GNU) is that you can't
 # specify the program used to strip binaries.  This is especially
 # annoying in cross-compiling environments, where the build's strip
 # is unlikely to handle the host's binaries.
 # Fortunately install-sh will honor a STRIPPROG variable, so we
-# always use install-sh in "make install-strip", and initialize
+# always use install-sh in `make install-strip', and initialize
 # STRIPPROG with the value of the STRIP variable (set by the user).
 AC_DEFUN([AM_PROG_INSTALL_STRIP],
 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
-# Installed binaries are usually stripped using 'strip' when the user
-# run "make install-strip".  However 'strip' might not be the right
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'.  However `strip' might not be the right
 # tool to use in cross-compilation environments, therefore Automake
-# will honor the 'STRIP' environment variable to overrule this program.
-dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
+# will honor the `STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
 if test "$cross_compiling" != no; then
   AC_CHECK_TOOL([STRIP], [strip], :)
 fi
 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
 AC_SUBST([INSTALL_STRIP_PROGRAM])])
 
-# Copyright (C) 2006-2012 Free Software Foundation, Inc.
+# Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
+# serial 3
+
 # _AM_SUBST_NOTMAKE(VARIABLE)
 # ---------------------------
 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
@@ -849,16 +874,18 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
 
 # Check how to create a tarball.                            -*- Autoconf -*-
 
-# Copyright (C) 2004-2012 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
+# serial 2
+
 # _AM_PROG_TAR(FORMAT)
 # --------------------
 # Check how to create a tarball in format FORMAT.
-# FORMAT should be one of 'v7', 'ustar', or 'pax'.
+# FORMAT should be one of `v7', `ustar', or `pax'.
 #
 # Substitute a variable $(am__tar) that is a command
 # writing to stdout a FORMAT-tarball containing the directory
@@ -881,7 +908,7 @@ AC_MSG_CHECKING([how to create a $1 tar archive])
 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
 # Do not fold the above two line into one, because Tru64 sh and
-# Solaris sh will not grok spaces in the rhs of '-'.
+# Solaris sh will not grok spaces in the rhs of `-'.
 for _am_tool in $_am_tools
 do
   case $_am_tool in
diff --git a/clinfo.cpp b/clinfo.cpp
index 9eb989b..9dbe69f 100644
--- a/clinfo.cpp
+++ b/clinfo.cpp
@@ -20,12 +20,20 @@
 
 #include <iostream>
 
+#include "platform.h"
+
+#include "output_amd_compat.h"
+
+#include <list>
+
 int main(int, char **)
 {
+        std::list<platform> platforms;
+
         try
         {
-                cl_uint num_platforms;
-                cl_int rc = clGetPlatformIDs(0, 0, &num_platforms);
+                cl_uint num_platform_ids;
+                cl_int rc = clGetPlatformIDs(0, 0, &num_platform_ids);
                 switch(rc)
                 {
                 case CL_SUCCESS:
@@ -39,173 +47,17 @@ int main(int, char **)
                         throw rc;
                 }
 
-                cl_platform_id platforms[num_platforms];
+                cl_platform_id platform_ids[num_platform_ids];
 
-                rc = clGetPlatformIDs(num_platforms, platforms, 0);
+                rc = clGetPlatformIDs(num_platform_ids, platform_ids, 0);
                 if(rc != CL_SUCCESS)
                         throw rc;
 
-                for(cl_platform_id const *i = platforms; i != platforms + num_platforms; ++i)
-                {
-                        struct platform_info_query
-                        {
-                                cl_platform_info info;
-                                char const *tag;
-                        };
-
-                        static platform_info_query const platform_queries[] =
-                        {
-                                { CL_PLATFORM_NAME, "Platform" },
-                                { CL_PLATFORM_VENDOR, "Vendor" },
-                                { CL_PLATFORM_PROFILE, "Profile" },
-                                { CL_PLATFORM_VERSION, "Version" },
-                                { CL_PLATFORM_EXTENSIONS, "Extensions" }
-                        };
-
-                        char buffer[64];
-                        size_t length;
-
-                        for(platform_info_query const *j = platform_queries; j != platform_queries + 5; ++j)
-                        {
-                                rc = clGetPlatformInfo(*i, j->info, sizeof buffer, buffer, &length);
-                                if(rc != CL_SUCCESS)
-                                        throw rc;
-
-                                std::cout << j->tag << ": " << buffer << std::endl;
-                        }
-
-                        std::cout << std::endl;
+                for(cl_platform_id const *i = platform_ids; i != platform_ids + num_platform_ids; ++i)
+                        platforms.insert(platforms.end(), platform(*i))->load();
 
-                        cl_uint num_devices;
-                        rc = clGetDeviceIDs(*i, CL_DEVICE_TYPE_ALL, 0, 0, &num_devices);
-                        if(rc != CL_SUCCESS)
-                                throw rc;
 
-                        cl_device_id devices[num_devices];
-                        rc = clGetDeviceIDs(*i, CL_DEVICE_TYPE_ALL, num_devices, devices, 0);
-                        if(rc != CL_SUCCESS)
-                                throw rc;
-
-                        for(cl_device_id const *j = devices; j != devices + num_devices; ++j)
-                        {
-                                enum data_type
-                                {
-                                        boolean,
-                                        uint,
-                                        string
-                                };
-
-                                struct device_info_query
-                                {
-                                        cl_device_info info;
-                                        char const *tag;
-                                        data_type type;
-                                };
-
-                                static device_info_query const device_queries[] =
-                                {
-                                        { CL_DEVICE_NAME, "Device", string },
-                                        { CL_DEVICE_VENDOR, "Vendor", string },
-                                        { CL_DEVICE_PROFILE, "Profile", string },
-                                        { CL_DEVICE_VERSION, "Version", string },
-                                        { CL_DEVICE_EXTENSIONS, "Extensions", string },
-                                        { CL_DEVICE_VENDOR_ID, "VendorID", uint },
-                                        { CL_DEVICE_MAX_COMPUTE_UNITS, "MaxComputeUnits", uint },
-                                        { CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS, "MaxWorkItemDimensions", uint },
-                                        { CL_DEVICE_MAX_WORK_GROUP_SIZE, "MaxWorkGroupSize", uint },
-                                        { CL_DEVICE_MAX_WORK_ITEM_SIZES, "MaxWorkItemSizes", uint },
-                                        { CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR, "PreferredVectorWidthChar", uint },
-                                        { CL_DEVICE_NATIVE_VECTOR_WIDTH_CHAR, "NativeVectorWidthChar", uint },
-                                        { CL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORT, "PreferredVectorWidthShort", uint },
-                                        { CL_DEVICE_NATIVE_VECTOR_WIDTH_SHORT, "NativeVectorWidthShort", uint },
-                                        { CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT, "PreferredVectorWidthInt", uint },
-                                        { CL_DEVICE_NATIVE_VECTOR_WIDTH_INT, "NativeVectorWidthInt", uint },
-                                        { CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG, "PreferredVectorWidthLong", uint },
-                                        { CL_DEVICE_NATIVE_VECTOR_WIDTH_LONG, "NativeVectorWidthLong", uint },
-                                        { CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT, "PreferredVectorWidthFloat", uint },
-                                        { CL_DEVICE_NATIVE_VECTOR_WIDTH_FLOAT, "NativeVectorWidthFloat", uint },
-                                        { CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE, "PreferredVectorWidthDouble", uint },
-                                        { CL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE, "NativeVectorWidthDouble", uint },
-                                        { CL_DEVICE_PREFERRED_VECTOR_WIDTH_HALF, "PreferredVectorWidthHalf", uint },
-                                        { CL_DEVICE_NATIVE_VECTOR_WIDTH_HALF, "NativeVectorWidthHalf", uint },
-                                        { CL_DEVICE_MAX_CLOCK_FREQUENCY, "MaxClockFrequency", uint },
-                                        { CL_DEVICE_ADDRESS_BITS, "AddressBits", uint },
-                                        { CL_DEVICE_MAX_READ_IMAGE_ARGS, "MaxReadImageArgs", uint },
-                                        { CL_DEVICE_MAX_WRITE_IMAGE_ARGS, "MaxWriteImageArgs", uint },
-                                        { CL_DEVICE_MAX_MEM_ALLOC_SIZE, "MaxMemAllocSize", uint },
-                                        { CL_DEVICE_IMAGE2D_MAX_WIDTH, "Image2DMaxWidth", uint },
-                                        { CL_DEVICE_IMAGE2D_MAX_HEIGHT, "Image2DMaxHeight", uint },
-                                        { CL_DEVICE_IMAGE3D_MAX_WIDTH, "Image3DMaxWidth", uint },
-                                        { CL_DEVICE_IMAGE3D_MAX_HEIGHT, "Image3DMaxHeight", uint },
-                                        { CL_DEVICE_IMAGE3D_MAX_DEPTH, "Image3DMaxDepth", uint },
-                                        { CL_DEVICE_IMAGE_SUPPORT, "ImageSupport", boolean },
-                                        { CL_DEVICE_MAX_PARAMETER_SIZE, "MaxParameterSize", uint },
-                                        { CL_DEVICE_MAX_SAMPLERS, "MaxSamplers", uint },
-                                        { CL_DEVICE_MEM_BASE_ADDR_ALIGN, "MemBaseAddrAlign", uint },
-                                        { CL_DEVICE_MIN_DATA_TYPE_ALIGN_SIZE, "MinDataTypeAlignSize", uint },
-                                        { CL_DEVICE_SINGLE_FP_CONFIG, "SingleFpConfig", uint },
-                                        { CL_DEVICE_GLOBAL_MEM_CACHE_TYPE, "GlobalMemCacheType", uint },
-                                        { CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE, "GlobalMemCachelineSize", uint },
-                                        { CL_DEVICE_GLOBAL_MEM_CACHE_SIZE, "GlobalMemCacheSize", uint },
-                                        { CL_DEVICE_GLOBAL_MEM_SIZE, "GlobalMemSize", uint },
-                                        { CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE, "MaxConstantBufferSize", uint },
-                                        { CL_DEVICE_MAX_CONSTANT_ARGS, "MaxConstantArgs", uint },
-                                        { CL_DEVICE_LOCAL_MEM_TYPE, "LocalMemType", uint },
-                                        { CL_DEVICE_LOCAL_MEM_SIZE, "LocalMemSize", uint },
-                                        { CL_DEVICE_ERROR_CORRECTION_SUPPORT, "ErrorCorrectionSupport", boolean },
-                                        { CL_DEVICE_PROFILING_TIMER_RESOLUTION, "ProfilingTimerResolution", uint },
-                                        { CL_DEVICE_ENDIAN_LITTLE, "EndianLittle", boolean },
-                                        { CL_DEVICE_AVAILABLE, "DeviceAvailable", boolean },
-                                        { CL_DEVICE_COMPILER_AVAILABLE, "CompilerAvailable", boolean },
-                                        { CL_DEVICE_EXECUTION_CAPABILITIES, "ExecutionCapabilities", uint },
-                                        { CL_DEVICE_QUEUE_PROPERTIES, "QueueProperties", uint },
-                                        //{ CL_DEVICE_PLATFORM, "Platform", uint },
-                                        { CL_DEVICE_DOUBLE_FP_CONFIG, "DoubleFPConfig", uint },
-                                        { CL_DEVICE_HOST_UNIFIED_MEMORY, "HostUnifiedMemory", uint },
-                                        { CL_DEVICE_OPENCL_C_VERSION, "OpenCL-C-Version", string },
-                                        { CL_DEVICE_LINKER_AVAILABLE, "LinkerAvailable", boolean },
-                                        { CL_DEVICE_BUILT_IN_KERNELS, "BuiltInKernels", uint },
-                                        { CL_DEVICE_IMAGE_MAX_BUFFER_SIZE, "ImageMaxBufferSize", uint },
-                                        { CL_DEVICE_IMAGE_MAX_ARRAY_SIZE, "ImageMaxArraySize", uint },
-                                        //{ CL_DEVICE_PARENT_DEVICE, "", uint },
-                                        { CL_DEVICE_PARTITION_MAX_SUB_DEVICES, "PartitionMaxSubDevices", uint },
-                                        { CL_DEVICE_PARTITION_PROPERTIES, "PartitionProperties", uint },
-                                        { CL_DEVICE_PARTITION_AFFINITY_DOMAIN, "PartitionAffinityDomain", uint },
-                                        { CL_DEVICE_PARTITION_TYPE, "PartitionType", uint },
-                                        { CL_DEVICE_REFERENCE_COUNT, "ReferenceCount", uint },
-                                        { CL_DEVICE_PREFERRED_INTEROP_USER_SYNC, "PreferredInteropUserSync", uint },
-                                        { CL_DEVICE_PRINTF_BUFFER_SIZE, "PrintfBufferSize", uint },
-                                };
-
-                                for(device_info_query const *k = device_queries; k != device_queries + (sizeof device_queries / sizeof *device_queries); ++k)
-                                {
-                                        rc = clGetDeviceInfo(*j, k->info, sizeof buffer, buffer, &length);
-                                        if(rc == CL_INVALID_VALUE)
-                                                continue;
-
-                                        if(rc != CL_SUCCESS)
-                                                throw rc;
-
-                                        std::cout << k->tag << ": ";
-                                        switch(k->type)
-                                        {
-                                        case boolean:
-                                                std::cout << ((*reinterpret_cast<cl_uint *>(buffer))?"true":"false");
-                                                break;
-                                        case uint:
-                                                std::cout << *reinterpret_cast<cl_uint *>(buffer);
-                                                break;
-                                        case string:
-                                                std::cout << buffer;
-                                                break;
-                                        }
-
-                                        std::cout << std::endl;
-                                }
-
-                                std::cout << std::endl;
-                        }
-                }
+                output_amd_compat(platforms);
 
                 return 0;
         }
diff --git a/configure b/configure
index a0b6485..7ccf32c 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for clinfo 0.0.20130409.
+# Generated by GNU Autoconf 2.69 for clinfo 0.0.20130513.
 #
 # Report bugs to <Simon.Richter at hogyros.de>.
 #
@@ -580,8 +580,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='clinfo'
 PACKAGE_TARNAME='clinfo'
-PACKAGE_VERSION='0.0.20130409'
-PACKAGE_STRING='clinfo 0.0.20130409'
+PACKAGE_VERSION='0.0.20130513'
+PACKAGE_STRING='clinfo 0.0.20130513'
 PACKAGE_BUGREPORT='Simon.Richter at hogyros.de'
 PACKAGE_URL=''
 
@@ -1270,7 +1270,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures clinfo 0.0.20130409 to adapt to many kinds of systems.
+\`configure' configures clinfo 0.0.20130513 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1336,7 +1336,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of clinfo 0.0.20130409:";;
+     short | recursive ) echo "Configuration of clinfo 0.0.20130513:";;
    esac
   cat <<\_ACEOF
 
@@ -1344,10 +1344,8 @@ Optional Features:
   --disable-option-checking  ignore unrecognized --enable/--with options
   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
-  --enable-dependency-tracking
-                          do not reject slow dependency extractors
-  --disable-dependency-tracking
-                          speeds up one-time build
+  --disable-dependency-tracking  speeds up one-time build
+  --enable-dependency-tracking   do not reject slow dependency extractors
 
 Some influential environment variables:
   CXX         C++ compiler command
@@ -1427,7 +1425,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-clinfo configure 0.0.20130409
+clinfo configure 0.0.20130513
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1730,7 +1728,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by clinfo $as_me 0.0.20130409, which was
+It was created by clinfo $as_me 0.0.20130513, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -2078,7 +2076,7 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
-am__api_version='1.12'
+am__api_version='1.11'
 
 ac_aux_dir=
 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
@@ -2204,6 +2202,9 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
 $as_echo_n "checking whether build environment is sane... " >&6; }
+# Just in case
+sleep 1
+echo timestamp > conftest.file
 # Reject unsafe characters in $srcdir or the absolute working directory
 # name.  Accept space and tab only in the latter.
 am_lf='
@@ -2214,40 +2215,32 @@ case `pwd` in
 esac
 case $srcdir in
   *[\\\"\#\$\&\'\`$am_lf\ \	]*)
-    as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
+    as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
 esac
 
-# Do 'set' in a subshell so we don't clobber the current shell's
+# Do `set' in a subshell so we don't clobber the current shell's
 # arguments.  Must try -L first in case configure is actually a
 # symlink; some systems play weird games with the mod time of symlinks
 # (eg FreeBSD returns the mod time of the symlink's containing
 # directory).
 if (
-   am_has_slept=no
-   for am_try in 1 2; do
-     echo "timestamp, slept: $am_has_slept" > conftest.file
-     set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
-     if test "$*" = "X"; then
-	# -L didn't work.
-	set X `ls -t "$srcdir/configure" conftest.file`
-     fi
-     if test "$*" != "X $srcdir/configure conftest.file" \
-	&& test "$*" != "X conftest.file $srcdir/configure"; then
-
-	# If neither matched, then we have a broken ls.  This can happen
-	# if, for instance, CONFIG_SHELL is bash and it inherits a
-	# broken ls alias from the environment.  This has actually
-	# happened.  Such a system could not be considered "sane".
-	as_fn_error $? "ls -t appears to fail.  Make sure there is not a broken
-  alias in your environment" "$LINENO" 5
-     fi
-     if test "$2" = conftest.file || test $am_try -eq 2; then
-       break
-     fi
-     # Just in case.
-     sleep 1
-     am_has_slept=yes
-   done
+   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+   if test "$*" = "X"; then
+      # -L didn't work.
+      set X `ls -t "$srcdir/configure" conftest.file`
+   fi
+   rm -f conftest.file
+   if test "$*" != "X $srcdir/configure conftest.file" \
+      && test "$*" != "X conftest.file $srcdir/configure"; then
+
+      # If neither matched, then we have a broken ls.  This can happen
+      # if, for instance, CONFIG_SHELL is bash and it inherits a
+      # broken ls alias from the environment.  This has actually
+      # happened.  Such a system could not be considered "sane".
+      as_fn_error $? "ls -t appears to fail.  Make sure there is not a broken
+alias in your environment" "$LINENO" 5
+   fi
+
    test "$2" = conftest.file
    )
 then
@@ -2259,16 +2252,6 @@ Check your system clock" "$LINENO" 5
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-# If we didn't sleep, we still need to ensure time stamps of config.status and
-# generated files are strictly newer.
-am_sleep_pid=
-if grep 'slept: no' conftest.file >/dev/null 2>&1; then
-  ( sleep 1 ) &
-  am_sleep_pid=$!
-fi
-
-rm -f conftest.file
-
 test "$program_prefix" != NONE &&
   program_transform_name="s&^&$program_prefix&;$program_transform_name"
 # Use a double $ so make ignores it.
@@ -2295,8 +2278,8 @@ if eval "$MISSING --run true"; then
   am_missing_run="$MISSING --run "
 else
   am_missing_run=
-  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
-$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
+$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
 fi
 
 if test x"${install_sh}" != xset; then
@@ -2308,10 +2291,10 @@ if test x"${install_sh}" != xset; then
   esac
 fi
 
-# Installed binaries are usually stripped using 'strip' when the user
-# run "make install-strip".  However 'strip' might not be the right
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'.  However `strip' might not be the right
 # tool to use in cross-compilation environments, therefore Automake
-# will honor the 'STRIP' environment variable to overrule this program.
+# will honor the `STRIP' environment variable to overrule this program.
 if test "$cross_compiling" != no; then
   if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
@@ -2450,6 +2433,12 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
 $as_echo "$MKDIR_P" >&6; }
 
+mkdir_p="$MKDIR_P"
+case $mkdir_p in
+  [\\/$]* | ?:[\\/]*) ;;
+  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
+
 for ac_prog in gawk mawk nawk awk
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
@@ -2554,7 +2543,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='clinfo'
- VERSION='0.0.20130409'
+ VERSION='0.0.20130513'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -2582,12 +2571,6 @@ AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
 
 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
 
-# For better backward compatibility.  To be removed once Automake 1.9.x
-# dies out for good.  For more background, see:
-# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
-# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
-mkdir_p='$(MKDIR_P)'
-
 # We need awk for the "check" target.  The system "awk" is bad on
 # some platforms.
 # Always define AMTAR for backward compatibility.  Yes, it's still used
@@ -3129,7 +3112,7 @@ am__quote=
 _am_result=none
 # First try GNU make style include.
 echo "include confinc" > confmf
-# Ignore all kinds of additional output from 'make'.
+# Ignore all kinds of additional output from `make'.
 case `$am_make -s -f confmf 2> /dev/null` in #(
 *the\ am__doit\ target*)
   am__include=include
@@ -3185,8 +3168,8 @@ else
   # We make a subdir and do the tests there.  Otherwise we can end up
   # making bogus files that we don't know about and never remove.  For
   # instance it was reported that on HP-UX the gcc test will end up
-  # making a dummy file named 'D' -- because '-MD' means "put the output
-  # in D".
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
   rm -rf conftest.dir
   mkdir conftest.dir
   # Copy depcomp to subdir because otherwise we won't find it if we're
@@ -3221,16 +3204,16 @@ else
     : > sub/conftest.c
     for i in 1 2 3 4 5 6; do
       echo '#include "conftst'$i'.h"' >> sub/conftest.c
-      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
-      # Solaris 10 /bin/sh.
-      echo '/* dummy */' > sub/conftst$i.h
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
     done
     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
 
-    # We check with '-c' and '-o' for the sake of the "dashmstdout"
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
     # mode.  It turns out that the SunPro C++ compiler does not properly
-    # handle '-M -o', and we need to detect this.  Also, some Intel
-    # versions had trouble with output in subdirs.
+    # handle `-M -o', and we need to detect this.  Also, some Intel
+    # versions had trouble with output in subdirs
     am__obj=sub/conftest.${OBJEXT-o}
     am__minus_obj="-o $am__obj"
     case $depmode in
@@ -3239,8 +3222,8 @@ else
       test "$am__universal" = false || continue
       ;;
     nosideeffect)
-      # After this tag, mechanisms are not by side-effect, so they'll
-      # only be used when explicitly requested.
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
       if test "x$enable_dependency_tracking" = xyes; then
 	continue
       else
@@ -3248,7 +3231,7 @@ else
       fi
       ;;
     msvc7 | msvc7msys | msvisualcpp | msvcmsys)
-      # This compiler won't grok '-c -o', but also, the minuso test has
+      # This compiler won't grok `-c -o', but also, the minuso test has
       # not run yet.  These depmodes are late enough in the game, and
       # so weak that their functioning should not be impacted.
       am__obj=conftest.${OBJEXT-o}
@@ -3854,8 +3837,8 @@ else
   # We make a subdir and do the tests there.  Otherwise we can end up
   # making bogus files that we don't know about and never remove.  For
   # instance it was reported that on HP-UX the gcc test will end up
-  # making a dummy file named 'D' -- because '-MD' means "put the output
-  # in D".
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
   rm -rf conftest.dir
   mkdir conftest.dir
   # Copy depcomp to subdir because otherwise we won't find it if we're
@@ -3890,16 +3873,16 @@ else
     : > sub/conftest.c
     for i in 1 2 3 4 5 6; do
       echo '#include "conftst'$i'.h"' >> sub/conftest.c
-      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
-      # Solaris 10 /bin/sh.
-      echo '/* dummy */' > sub/conftst$i.h
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
     done
     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
 
-    # We check with '-c' and '-o' for the sake of the "dashmstdout"
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
     # mode.  It turns out that the SunPro C++ compiler does not properly
-    # handle '-M -o', and we need to detect this.  Also, some Intel
-    # versions had trouble with output in subdirs.
+    # handle `-M -o', and we need to detect this.  Also, some Intel
+    # versions had trouble with output in subdirs
     am__obj=sub/conftest.${OBJEXT-o}
     am__minus_obj="-o $am__obj"
     case $depmode in
@@ -3908,8 +3891,8 @@ else
       test "$am__universal" = false || continue
       ;;
     nosideeffect)
-      # After this tag, mechanisms are not by side-effect, so they'll
-      # only be used when explicitly requested.
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
       if test "x$enable_dependency_tracking" = xyes; then
 	continue
       else
@@ -3917,7 +3900,7 @@ else
       fi
       ;;
     msvc7 | msvc7msys | msvisualcpp | msvcmsys)
-      # This compiler won't grok '-c -o', but also, the minuso test has
+      # This compiler won't grok `-c -o', but also, the minuso test has
       # not run yet.  These depmodes are late enough in the game, and
       # so weak that their functioning should not be impacted.
       am__obj=conftest.${OBJEXT-o}
@@ -4545,14 +4528,6 @@ LIBOBJS=$ac_libobjs
 LTLIBOBJS=$ac_ltlibobjs
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
-$as_echo_n "checking that generated files are newer than configure... " >&6; }
-   if test -n "$am_sleep_pid"; then
-     # Hide warnings about reused PIDs.
-     wait $am_sleep_pid 2>/dev/null
-   fi
-   { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
-$as_echo "done" >&6; }
  if test -n "$EXEEXT"; then
   am__EXEEXT_TRUE=
   am__EXEEXT_FALSE='#'
@@ -4970,7 +4945,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by clinfo $as_me 0.0.20130409, which was
+This file was extended by clinfo $as_me 0.0.20130513, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -5036,7 +5011,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-clinfo config.status 0.0.20130409
+clinfo config.status 0.0.20130513
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
@@ -5777,7 +5752,7 @@ $as_echo "$as_me: executing $ac_file commands" >&6;}
     # Strip MF so we end up with the name of the file.
     mf=`echo "$mf" | sed -e 's/:.*$//'`
     # Check whether this is an Automake generated Makefile or not.
-    # We used to match only the files named 'Makefile.in', but
+    # We used to match only the files named `Makefile.in', but
     # some people rename them; so instead we look at the file content.
     # Grep'ing the first line is not enough: some people post-process
     # each Makefile.in and add a new line on top of each file to say so.
@@ -5811,19 +5786,21 @@ $as_echo X"$mf" |
       continue
     fi
     # Extract the definition of DEPDIR, am__include, and am__quote
-    # from the Makefile without running 'make'.
+    # from the Makefile without running `make'.
     DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
     test -z "$DEPDIR" && continue
     am__include=`sed -n 's/^am__include = //p' < "$mf"`
     test -z "am__include" && continue
     am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+    # When using ansi2knr, U may be empty or an underscore; expand it
+    U=`sed -n 's/^U = //p' < "$mf"`
     # Find all dependency output files, they are included files with
     # $(DEPDIR) in their names.  We invoke sed twice because it is the
     # simplest approach to changing $(DEPDIR) to its actual value in the
     # expansion.
     for file in `sed -n "
       s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
-	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
+	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
       # Make sure the directory exists.
       test -f "$dirpart/$file" && continue
       fdir=`$as_dirname -- "$file" ||
diff --git a/configure.ac b/configure.ac
index db9f231..4e0edbb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -17,7 +17,7 @@
 # Process this file with autoconf to produce a configure script.
 
 AC_PREREQ([2.67])
-AC_INIT([clinfo], [0.0.20130409], [Simon.Richter at hogyros.de])
+AC_INIT([clinfo], [0.0.20130513], [Simon.Richter at hogyros.de])
 AM_INIT_AUTOMAKE([1.10 foreign])
 
 AC_CONFIG_SRCDIR([clinfo.cpp])
diff --git a/depcomp b/depcomp
index e1f51f4..25a39e6 100755
--- a/depcomp
+++ b/depcomp
@@ -1,9 +1,10 @@
 #! /bin/sh
 # depcomp - compile a program generating dependencies as side-effects
 
-scriptversion=2012-07-12.20; # UTC
+scriptversion=2012-03-27.16; # UTC
 
-# Copyright (C) 1999-2012 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009, 2010,
+# 2011, 2012 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -74,9 +75,6 @@ tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
 
 rm -f "$tmpdepfile"
 
-# Avoid interferences from the environment.
-gccflag= dashmflag=
-
 # Some modes work just like other modes, but use different flags.  We
 # parameterize here, but still list the modes in the big case below,
 # to make depend.m4 easier to write.  Note that we *cannot* use a case
@@ -111,7 +109,7 @@ if test "$depmode" = msvc7msys; then
 fi
 
 if test "$depmode" = xlc; then
-   # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information.
+   # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency informations.
    gccflag=-qmakedep=gcc,-MF
    depmode=gcc
 fi
@@ -145,17 +143,13 @@ gcc3)
   ;;
 
 gcc)
-## Note that this doesn't just cater to obsosete pre-3.x GCC compilers.
-## but also to in-use compilers like IMB xlc/xlC and the HP C compiler.
-## (see the conditional assignment to $gccflag above).
 ## There are various ways to get dependency output from gcc.  Here's
 ## why we pick this rather obscure method:
 ## - Don't want to use -MD because we'd like the dependencies to end
 ##   up in a subdir.  Having to rename by hand is ugly.
 ##   (We might end up doing this anyway to support other compilers.)
 ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
-##   -MM, not -M (despite what the docs say).  Also, it might not be
-##   supported by the other compilers which use the 'gcc' depmode.
+##   -MM, not -M (despite what the docs say).
 ## - Using -M directly means running the compiler twice (even worse
 ##   than renaming).
   if test -z "$gccflag"; then
@@ -341,79 +335,6 @@ icc)
   rm -f "$tmpdepfile"
   ;;
 
-## The order of this option in the case statement is important, since the
-## shell code in configure will try each of these formats in the order
-## listed in this file.  A plain '-MD' option would be understood by many
-## compilers, so we must ensure this comes after the gcc and icc options.
-pgcc)
-  # Portland's C compiler understands '-MD'.
-  # Will always output deps to 'file.d' where file is the root name of the
-  # source file under compilation, even if file resides in a subdirectory.
-  # The object file name does not affect the name of the '.d' file.
-  # pgcc 10.2 will output
-  #    foo.o: sub/foo.c sub/foo.h
-  # and will wrap long lines using '\' :
-  #    foo.o: sub/foo.c ... \
-  #     sub/foo.h ... \
-  #     ...
-  dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
-  test "x$dir" = "x$object" && dir=
-  # Use the source, not the object, to determine the base name, since
-  # that's sadly what pgcc will do too.
-  base=`echo "$source" | sed -e 's|^.*/||' -e 's/\.[-_a-zA-Z0-9]*$//'`
-  tmpdepfile="$base.d"
-
-  # For projects that build the same source file twice into different object
-  # files, the pgcc approach of using the *source* file root name can cause
-  # problems in parallel builds.  Use a locking strategy to avoid stomping on
-  # the same $tmpdepfile.
-  lockdir="$base.d-lock"
-  trap "echo '$0: caught signal, cleaning up...' >&2; rm -rf $lockdir" 1 2 13 15
-  numtries=100
-  i=$numtries
-  while test $i -gt 0 ; do
-    # mkdir is a portable test-and-set.
-    if mkdir $lockdir 2>/dev/null; then
-      # This process acquired the lock.
-      "$@" -MD
-      stat=$?
-      # Release the lock.
-      rm -rf $lockdir
-      break
-    else
-      ## the lock is being held by a different process,
-      ## wait until the winning process is done or we timeout
-      while test -d $lockdir && test $i -gt 0; do
-        sleep 1
-        i=`expr $i - 1`
-      done
-    fi
-    i=`expr $i - 1`
-  done
-  trap - 1 2 13 15
-  if test $i -le 0; then
-    echo "$0: failed to acquire lock after $numtries attempts" >&2
-    echo "$0: check lockdir '$lockdir'" >&2
-    exit 1
-  fi
-
-  if test $stat -ne 0; then
-    rm -f "$tmpdepfile"
-    exit $stat
-  fi
-  rm -f "$depfile"
-  # Each line is of the form `foo.o: dependent.h',
-  # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
-  # Do two passes, one to just change these to
-  # `$object: dependent.h' and one to simply `dependent.h:'.
-  sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
-  # Some versions of the HPUX 10.20 sed can't process this invocation
-  # correctly.  Breaking it into two sed invocations is a workaround.
-  sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
-    sed -e 's/$/ :/' >> "$depfile"
-  rm -f "$tmpdepfile"
-  ;;
-
 hp2)
   # The "hp" stanza above does not work with aCC (C++) and HP's ia64
   # compilers, which have integrated preprocessors.  The correct option
diff --git a/device.cpp b/device.cpp
new file mode 100644
index 0000000..6802021
--- /dev/null
+++ b/device.cpp
@@ -0,0 +1,176 @@
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "device.h"
+
+device::device(cl_device_id id) : id(id)
+{
+        return;
+}
+
+template<typename T>
+void device::query(T &value, cl_device_info info)
+{
+        size_t length;
+        cl_int rc = clGetDeviceInfo(id, info, sizeof value, &value, &length);
+        if(rc != CL_SUCCESS)
+                throw rc;
+        if(length != sizeof value)
+                throw length;
+}
+
+void device::query(std::string &value, cl_device_info info)
+{
+        size_t length;
+        cl_int rc = clGetDeviceInfo(id, info, 0, 0, &length);
+        if(rc != CL_SUCCESS)
+                throw rc;
+        char buffer[length];
+        rc = clGetDeviceInfo(id, info, length, buffer, 0);
+        if(rc != CL_SUCCESS)
+                throw rc;
+        value = buffer;
+}
+
+template<typename T, typename L>
+void device::query(std::vector<T> &value, L count, cl_device_info info)
+{
+        value.resize(count);
+        size_t length;
+        cl_int rc = clGetDeviceInfo(id, info, sizeof(T) * count, value.data(), &length);
+        if(rc != CL_SUCCESS)
+                throw rc;
+        if(length != sizeof(T) * count)
+                throw length;
+}
+
+void device::load()
+{
+        query(address_bits, CL_DEVICE_ADDRESS_BITS);
+        query(available, CL_DEVICE_AVAILABLE);
+        query(built_in_kernels, CL_DEVICE_BUILT_IN_KERNELS);
+        query(compiler_available, CL_DEVICE_COMPILER_AVAILABLE);
+        try
+        {
+                query(double_fp_config, CL_DEVICE_DOUBLE_FP_CONFIG);
+        }
+        catch(cl_int)
+        {
+                double_fp_config = 0;
+        }
+        query(driver_version, CL_DRIVER_VERSION);
+        query(endian_little, CL_DEVICE_ENDIAN_LITTLE);
+        query(error_correction_support, CL_DEVICE_ERROR_CORRECTION_SUPPORT);
+        query(execution_capabilities, CL_DEVICE_EXECUTION_CAPABILITIES);
+        query(extensions, CL_DEVICE_EXTENSIONS);
+        query(global_mem_cacheline_size, CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE);
+        query(global_mem_cache_size, CL_DEVICE_GLOBAL_MEM_CACHE_SIZE);
+        query(global_mem_cache_type, CL_DEVICE_GLOBAL_MEM_CACHE_TYPE);
+        query(global_mem_size, CL_DEVICE_GLOBAL_MEM_SIZE);
+        try
+        {
+                query(half_fp_config, CL_DEVICE_HALF_FP_CONFIG);
+        }
+        catch(cl_int)
+        {
+                half_fp_config = 0;
+        }
+        query(host_unified_memory, CL_DEVICE_HOST_UNIFIED_MEMORY);
+
+        query(image_support, CL_DEVICE_IMAGE_SUPPORT);
+        if(image_support)
+        {
+                query(image2d_max_height, CL_DEVICE_IMAGE2D_MAX_HEIGHT);
+                query(image2d_max_width, CL_DEVICE_IMAGE2D_MAX_WIDTH);
+                query(image3d_max_depth, CL_DEVICE_IMAGE3D_MAX_DEPTH);
+                query(image3d_max_height, CL_DEVICE_IMAGE3D_MAX_HEIGHT);
+                query(image3d_max_width, CL_DEVICE_IMAGE3D_MAX_WIDTH);
+                //query(image_max_array_size, CL_DEVICE_IMAGE_MAX_ARRAY_SIZE);
+                //query(image_max_buffer_size, CL_DEVICE_IMAGE_MAX_BUFFER_SIZE);
+        }
+
+        try
+        {
+                query(linker_available, CL_DEVICE_LINKER_AVAILABLE);
+        }
+        catch(cl_int)
+        {
+                linker_available = CL_FALSE;
+        }
+        query(local_mem_size, CL_DEVICE_LOCAL_MEM_SIZE);
+        query(local_mem_type, CL_DEVICE_LOCAL_MEM_TYPE);
+        query(max_clock_frequency, CL_DEVICE_MAX_CLOCK_FREQUENCY);
+        query(max_compute_units, CL_DEVICE_MAX_COMPUTE_UNITS);
+        query(max_constant_args, CL_DEVICE_MAX_CONSTANT_ARGS);
+        query(max_constant_buffer_size, CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE);
+        query(max_mem_alloc_size, CL_DEVICE_MAX_MEM_ALLOC_SIZE);
+        query(max_parameter_size, CL_DEVICE_MAX_PARAMETER_SIZE);
+        query(max_read_image_args, CL_DEVICE_MAX_READ_IMAGE_ARGS);
+        query(max_samplers, CL_DEVICE_MAX_SAMPLERS);
+        query(max_work_group_size, CL_DEVICE_MAX_WORK_GROUP_SIZE);
+
+        {
+                cl_uint max_work_item_dimensions;
+                query(max_work_item_dimensions, CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS);
+                query(max_work_item_sizes, max_work_item_dimensions, CL_DEVICE_MAX_WORK_ITEM_SIZES);
+        }
+
+        query(max_write_image_args, CL_DEVICE_MAX_WRITE_IMAGE_ARGS);
+        query(mem_base_addr_align, CL_DEVICE_MEM_BASE_ADDR_ALIGN);
+        query(min_data_type_align_size, CL_DEVICE_MIN_DATA_TYPE_ALIGN_SIZE);
+        query(name, CL_DEVICE_NAME);
+        query(native_vector_width_char, CL_DEVICE_NATIVE_VECTOR_WIDTH_CHAR);
+        query(native_vector_width_double, CL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE);
+        query(native_vector_width_float, CL_DEVICE_NATIVE_VECTOR_WIDTH_FLOAT);
+        query(native_vector_width_half, CL_DEVICE_NATIVE_VECTOR_WIDTH_HALF);
+        query(native_vector_width_int, CL_DEVICE_NATIVE_VECTOR_WIDTH_INT);
+        query(native_vector_width_long, CL_DEVICE_NATIVE_VECTOR_WIDTH_LONG);
+        query(native_vector_width_short, CL_DEVICE_NATIVE_VECTOR_WIDTH_SHORT);
+        query(opencl_c_version, CL_DEVICE_OPENCL_C_VERSION);
+        try
+        {
+                query(parent_device, CL_DEVICE_PARENT_DEVICE);
+        }
+        catch(cl_int)
+        {
+                parent_device = 0;
+        }
+        try
+        {
+                query(partition_affinity_domain, CL_DEVICE_PARTITION_AFFINITY_DOMAIN);
+                query(partition_max_sub_devices, CL_DEVICE_PARTITION_MAX_SUB_DEVICES);
+                query(partition_properties, CL_DEVICE_PARTITION_PROPERTIES);
+                query(partition_type, CL_DEVICE_PARTITION_TYPE);
+        }
+        catch(cl_int)
+        {
+        }
+        query(platform, CL_DEVICE_PLATFORM);
+        try
+        {
+                query(preferred_interop_user_sync, CL_DEVICE_PREFERRED_INTEROP_USER_SYNC);
+                query(printf_buffer_size, CL_DEVICE_PRINTF_BUFFER_SIZE);
+        }
+        catch(cl_int)
+        {
+        }
+        query(preferred_vector_width_char, CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR);
+        query(preferred_vector_width_double, CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE);
+        query(preferred_vector_width_float, CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT);
+        query(preferred_vector_width_half, CL_DEVICE_PREFERRED_VECTOR_WIDTH_HALF);
+        query(preferred_vector_width_int, CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT);
+        query(preferred_vector_width_long, CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG);
+        query(preferred_vector_width_short, CL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORT);
+        query(profile, CL_DEVICE_PROFILE);
+        query(queue_properties, CL_DEVICE_QUEUE_PROPERTIES);
+        if(queue_properties & CL_QUEUE_PROFILING_ENABLE)
+        {
+                query(profiling_timer_resolution, CL_DEVICE_PROFILING_TIMER_RESOLUTION);
+        }
+        query(single_fp_config, CL_DEVICE_SINGLE_FP_CONFIG);
+        query(type, CL_DEVICE_TYPE);
+        query(vendor_id, CL_DEVICE_VENDOR_ID);
+        query(vendor, CL_DEVICE_VENDOR);
+        query(version, CL_DEVICE_VERSION);
+}
diff --git a/device.h b/device.h
new file mode 100644
index 0000000..3b58e08
--- /dev/null
+++ b/device.h
@@ -0,0 +1,113 @@
+#ifndef clinfo_device_h_
+#define clinfo_device_h_ 1
+
+#include <CL/cl.h>
+#include <CL/cl_ext.h>
+
+#include <string>
+#include <vector>
+
+struct device
+{
+        device(cl_device_id);
+
+        void load();
+
+        cl_device_id const id;
+
+        cl_device_id parent_device;
+
+        std::string name;
+        cl_platform_id platform;
+        cl_device_type type;
+        cl_uint vendor_id;
+        std::string vendor;
+        std::string profile;
+        std::string version;
+        std::string opencl_c_version;
+        std::string driver_version;
+
+        std::string built_in_kernels;
+
+        // Availability
+        cl_bool available;
+
+        // Extensions
+        std::string extensions;
+
+        // General info
+        cl_uint max_clock_frequency;
+        cl_uint max_compute_units;
+        cl_uint address_bits;
+        cl_bool endian_little;
+        cl_bool error_correction_support;
+        cl_device_exec_capabilities execution_capabilities;
+        cl_command_queue_properties queue_properties;
+
+        std::vector<size_t> max_work_item_sizes;
+
+        size_t max_parameter_size;
+        cl_uint max_constant_args;
+        cl_ulong max_constant_buffer_size;
+        size_t max_work_group_size;
+        size_t printf_buffer_size;
+
+        cl_ulong profiling_timer_resolution;
+
+        // Partitioning
+        cl_uint partition_max_sub_devices;
+        cl_device_partition_property partition_properties;
+        cl_device_affinity_domain partition_affinity_domain;
+        cl_uint partition_type;
+
+        // Tools
+        cl_bool compiler_available;
+        cl_bool linker_available;
+
+        // Floating Point
+        cl_device_fp_config half_fp_config;
+        cl_device_fp_config single_fp_config;
+        cl_device_fp_config double_fp_config;
+
+        // Vector
+        cl_uint native_vector_width_char, preferred_vector_width_char;
+        cl_uint native_vector_width_short, preferred_vector_width_short;
+        cl_uint native_vector_width_int, preferred_vector_width_int;
+        cl_uint native_vector_width_long, preferred_vector_width_long;
+        cl_uint native_vector_width_half, preferred_vector_width_half;
+        cl_uint native_vector_width_float, preferred_vector_width_float;
+        cl_uint native_vector_width_double, preferred_vector_width_double;
+
+        // Memory
+        cl_bool host_unified_memory;
+        cl_ulong global_mem_size;
+        cl_ulong local_mem_size;
+        cl_device_local_mem_type local_mem_type;
+        cl_ulong max_mem_alloc_size;
+        cl_uint min_data_type_align_size;
+        cl_uint mem_base_addr_align;
+
+        // Cache
+        cl_device_mem_cache_type global_mem_cache_type;
+        cl_ulong global_mem_cache_size;
+        cl_uint global_mem_cacheline_size;
+
+        // Images
+        cl_bool image_support;
+        size_t image2d_max_width, image2d_max_height;
+        size_t image3d_max_width, image3d_max_height, image3d_max_depth;
+        cl_uint max_read_image_args, max_write_image_args;
+        cl_uint max_samplers;
+        cl_uint image_max_array_size;
+        cl_uint image_max_buffer_size;
+
+        // Interop
+        cl_uint preferred_interop_user_sync;
+
+private:
+        template<typename T> void query(T &, cl_device_info);
+        void query(std::string &, cl_device_info);
+        template<typename T, typename L> void query(std::vector<T> &, L, cl_device_info);
+};
+
+#endif
diff --git a/install-sh b/install-sh
index 377bb86..a9244eb 100755
--- a/install-sh
+++ b/install-sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 # install - install a program, script, or datafile
 
-scriptversion=2011-11-20.07; # UTC
+scriptversion=2011-01-19.21; # UTC
 
 # This originates from X11R5 (mit/util/scripts/install.sh), which was
 # later released in X11R6 (xc/config/util/install.sh) with the
@@ -35,7 +35,7 @@ scriptversion=2011-11-20.07; # UTC
 # FSF changes to this file are in the public domain.
 #
 # Calling this script install-sh is preferred over install.sh, to prevent
-# 'make' implicit rules from creating a file called install from it
+# `make' implicit rules from creating a file called install from it
 # when there is no Makefile.
 #
 # This script is compatible with the BSD install script, but was written
@@ -156,7 +156,7 @@ while test $# -ne 0; do
     -s) stripcmd=$stripprog;;
 
     -t) dst_arg=$2
-	# Protect names problematic for 'test' and other utilities.
+	# Protect names problematic for `test' and other utilities.
 	case $dst_arg in
 	  -* | [=\(\)!]) dst_arg=./$dst_arg;;
 	esac
@@ -190,7 +190,7 @@ if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
     fi
     shift # arg
     dst_arg=$arg
-    # Protect names problematic for 'test' and other utilities.
+    # Protect names problematic for `test' and other utilities.
     case $dst_arg in
       -* | [=\(\)!]) dst_arg=./$dst_arg;;
     esac
@@ -202,7 +202,7 @@ if test $# -eq 0; then
     echo "$0: no input file specified." >&2
     exit 1
   fi
-  # It's OK to call 'install-sh -d' without argument.
+  # It's OK to call `install-sh -d' without argument.
   # This can happen when creating conditional directories.
   exit 0
 fi
@@ -240,7 +240,7 @@ fi
 
 for src
 do
-  # Protect names problematic for 'test' and other utilities.
+  # Protect names problematic for `test' and other utilities.
   case $src in
     -* | [=\(\)!]) src=./$src;;
   esac
@@ -354,7 +354,7 @@ do
 	      if test -z "$dir_arg" || {
 		   # Check for POSIX incompatibilities with -m.
 		   # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
-		   # other-writable bit of parent directory when it shouldn't.
+		   # other-writeable bit of parent directory when it shouldn't.
 		   # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
 		   ls_ld_tmpdir=`ls -ld "$tmpdir"`
 		   case $ls_ld_tmpdir in
diff --git a/missing b/missing
index 9a55648..86a8fc3 100755
--- a/missing
+++ b/missing
@@ -1,9 +1,10 @@
 #! /bin/sh
 # Common stub for a few missing GNU programs while installing.
 
-scriptversion=2012-01-06.18; # UTC
+scriptversion=2012-01-06.13; # UTC
 
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
+# 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
 # Originally by Fran,cois Pinard <pinard at iro.umontreal.ca>, 1996.
 
 # This program is free software; you can redistribute it and/or modify
@@ -25,7 +26,7 @@ scriptversion=2012-01-06.18; # UTC
 # the same distribution terms that you use for the rest of that program.
 
 if test $# -eq 0; then
-  echo 1>&2 "Try '$0 --help' for more information"
+  echo 1>&2 "Try \`$0 --help' for more information"
   exit 1
 fi
 
@@ -33,7 +34,7 @@ run=:
 sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
 sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
 
-# In the cases where this matters, 'missing' is being run in the
+# In the cases where this matters, `missing' is being run in the
 # srcdir already.
 if test -f configure.ac; then
   configure_ac=configure.ac
@@ -64,7 +65,7 @@ case $1 in
     echo "\
 $0 [OPTION]... PROGRAM [ARGUMENT]...
 
-Handle 'PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
+Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
 error status if there is no known handling for PROGRAM.
 
 Options:
@@ -73,20 +74,20 @@ Options:
   --run           try to run the given command, and emulate it if it fails
 
 Supported PROGRAM values:
-  aclocal      touch file 'aclocal.m4'
-  autoconf     touch file 'configure'
-  autoheader   touch file 'config.h.in'
+  aclocal      touch file \`aclocal.m4'
+  autoconf     touch file \`configure'
+  autoheader   touch file \`config.h.in'
   autom4te     touch the output file, or create a stub one
-  automake     touch all 'Makefile.in' files
-  bison        create 'y.tab.[ch]', if possible, from existing .[ch]
-  flex         create 'lex.yy.c', if possible, from existing .c
+  automake     touch all \`Makefile.in' files
+  bison        create \`y.tab.[ch]', if possible, from existing .[ch]
+  flex         create \`lex.yy.c', if possible, from existing .c
   help2man     touch the output file
-  lex          create 'lex.yy.c', if possible, from existing .c
+  lex          create \`lex.yy.c', if possible, from existing .c
   makeinfo     touch the output file
-  yacc         create 'y.tab.[ch]', if possible, from existing .[ch]
+  yacc         create \`y.tab.[ch]', if possible, from existing .[ch]
 
-Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
-'g' are ignored when checking the name.
+Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and
+\`g' are ignored when checking the name.
 
 Send bug reports to <bug-automake at gnu.org>."
     exit $?
@@ -98,8 +99,8 @@ Send bug reports to <bug-automake at gnu.org>."
     ;;
 
   -*)
-    echo 1>&2 "$0: Unknown '$1' option"
-    echo 1>&2 "Try '$0 --help' for more information"
+    echo 1>&2 "$0: Unknown \`$1' option"
+    echo 1>&2 "Try \`$0 --help' for more information"
     exit 1
     ;;
 
@@ -126,7 +127,7 @@ case $1 in
        exit 1
     elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
        # Could not run --version or --help.  This is probably someone
-       # running '$TOOL --version' or '$TOOL --help' to check whether
+       # running `$TOOL --version' or `$TOOL --help' to check whether
        # $TOOL exists and not knowing $TOOL uses missing.
        exit 1
     fi
@@ -138,27 +139,27 @@ esac
 case $program in
   aclocal*)
     echo 1>&2 "\
-WARNING: '$1' is $msg.  You should only need it if
-         you modified 'acinclude.m4' or '${configure_ac}'.  You might want
-         to install the Automake and Perl packages.  Grab them from
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified \`acinclude.m4' or \`${configure_ac}'.  You might want
+         to install the \`Automake' and \`Perl' packages.  Grab them from
          any GNU archive site."
     touch aclocal.m4
     ;;
 
   autoconf*)
     echo 1>&2 "\
-WARNING: '$1' is $msg.  You should only need it if
-         you modified '${configure_ac}'.  You might want to install the
-         Autoconf and GNU m4 packages.  Grab them from any GNU
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified \`${configure_ac}'.  You might want to install the
+         \`Autoconf' and \`GNU m4' packages.  Grab them from any GNU
          archive site."
     touch configure
     ;;
 
   autoheader*)
     echo 1>&2 "\
-WARNING: '$1' is $msg.  You should only need it if
-         you modified 'acconfig.h' or '${configure_ac}'.  You might want
-         to install the Autoconf and GNU m4 packages.  Grab them
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified \`acconfig.h' or \`${configure_ac}'.  You might want
+         to install the \`Autoconf' and \`GNU m4' packages.  Grab them
          from any GNU archive site."
     files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
     test -z "$files" && files="config.h"
@@ -175,9 +176,9 @@ WARNING: '$1' is $msg.  You should only need it if
 
   automake*)
     echo 1>&2 "\
-WARNING: '$1' is $msg.  You should only need it if
-         you modified 'Makefile.am', 'acinclude.m4' or '${configure_ac}'.
-         You might want to install the Automake and Perl packages.
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
+         You might want to install the \`Automake' and \`Perl' packages.
          Grab them from any GNU archive site."
     find . -type f -name Makefile.am -print |
 	   sed 's/\.am$/.in/' |
@@ -186,10 +187,10 @@ WARNING: '$1' is $msg.  You should only need it if
 
   autom4te*)
     echo 1>&2 "\
-WARNING: '$1' is needed, but is $msg.
+WARNING: \`$1' is needed, but is $msg.
          You might have modified some files without having the
          proper tools for further handling them.
-         You can get '$1' as part of Autoconf from any GNU
+         You can get \`$1' as part of \`Autoconf' from any GNU
          archive site."
 
     file=`echo "$*" | sed -n "$sed_output"`
@@ -209,10 +210,10 @@ WARNING: '$1' is needed, but is $msg.
 
   bison*|yacc*)
     echo 1>&2 "\
-WARNING: '$1' $msg.  You should only need it if
-         you modified a '.y' file.  You may need the Bison package
+WARNING: \`$1' $msg.  You should only need it if
+         you modified a \`.y' file.  You may need the \`Bison' package
          in order for those modifications to take effect.  You can get
-         Bison from any GNU archive site."
+         \`Bison' from any GNU archive site."
     rm -f y.tab.c y.tab.h
     if test $# -ne 1; then
         eval LASTARG=\${$#}
@@ -239,10 +240,10 @@ WARNING: '$1' $msg.  You should only need it if
 
   lex*|flex*)
     echo 1>&2 "\
-WARNING: '$1' is $msg.  You should only need it if
-         you modified a '.l' file.  You may need the Flex package
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified a \`.l' file.  You may need the \`Flex' package
          in order for those modifications to take effect.  You can get
-         Flex from any GNU archive site."
+         \`Flex' from any GNU archive site."
     rm -f lex.yy.c
     if test $# -ne 1; then
         eval LASTARG=\${$#}
@@ -262,10 +263,10 @@ WARNING: '$1' is $msg.  You should only need it if
 
   help2man*)
     echo 1>&2 "\
-WARNING: '$1' is $msg.  You should only need it if
+WARNING: \`$1' is $msg.  You should only need it if
 	 you modified a dependency of a manual page.  You may need the
-	 Help2man package in order for those modifications to take
-	 effect.  You can get Help2man from any GNU archive site."
+	 \`Help2man' package in order for those modifications to take
+	 effect.  You can get \`Help2man' from any GNU archive site."
 
     file=`echo "$*" | sed -n "$sed_output"`
     test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
@@ -280,12 +281,12 @@ WARNING: '$1' is $msg.  You should only need it if
 
   makeinfo*)
     echo 1>&2 "\
-WARNING: '$1' is $msg.  You should only need it if
-         you modified a '.texi' or '.texinfo' file, or any other file
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified a \`.texi' or \`.texinfo' file, or any other file
          indirectly affecting the aspect of the manual.  The spurious
-         call might also be the consequence of using a buggy 'make' (AIX,
-         DU, IRIX).  You might want to install the Texinfo package or
-         the GNU make package.  Grab either from any GNU archive site."
+         call might also be the consequence of using a buggy \`make' (AIX,
+         DU, IRIX).  You might want to install the \`Texinfo' package or
+         the \`GNU make' package.  Grab either from any GNU archive site."
     # The file to touch is that specified with -o ...
     file=`echo "$*" | sed -n "$sed_output"`
     test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
@@ -309,12 +310,12 @@ WARNING: '$1' is $msg.  You should only need it if
 
   *)
     echo 1>&2 "\
-WARNING: '$1' is needed, and is $msg.
+WARNING: \`$1' is needed, and is $msg.
          You might have modified some files without having the
-         proper tools for further handling them.  Check the 'README' file,
+         proper tools for further handling them.  Check the \`README' file,
          it often tells you about the needed prerequisites for installing
          this package.  You may also peek at any GNU archive site, in case
-         some other package would contain this missing '$1' program."
+         some other package would contain this missing \`$1' program."
     exit 1
     ;;
 esac
diff --git a/output_amd_compat.cpp b/output_amd_compat.cpp
new file mode 100644
index 0000000..91bbedc
--- /dev/null
+++ b/output_amd_compat.cpp
@@ -0,0 +1,137 @@
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "output_amd_compat.h"
+
+#include "output_common.h"
+
+#include "device.h"
+
+#include <iostream>
+#include <algorithm>
+
+void output_amd_compat_platform_summary(platform const &p);
+void output_amd_compat_platform_details(platform const &p);
+void output_amd_compat_device(device const &);
+void output_amd_compat_fp_config(cl_device_fp_config);
+
+void output_amd_compat_platform_summary(platform const &p)
+{
+        std::cout << "  Platform Profile:\t\t\t\t " << p.profile << std::endl;
+        std::cout << "  Platform Version:\t\t\t\t " << p.version << std::endl;
+        std::cout << "  Platform Name:\t\t\t\t " << p.name << std::endl;
+        std::cout << "  Platform Vendor:\t\t\t\t " << p.vendor << std::endl;
+        std::cout << "  Platform Extensions:\t\t\t\t " << p.extensions << std::endl;
+}
+
+void output_amd_compat_platform_details(platform const &p)
+{
+        std::cout << "  Platform Name:\t\t\t\t " << p.name << std::endl;
+        std::cout << "Number of devices:\t\t\t\t " << p.devices.size() << std::endl;
+        std::for_each(p.devices.begin(), p.devices.end(), &output_amd_compat_device);
+}
+
+void output_amd_compat_device(device const &d)
+{
+        std::cout << "  Device Type:\t\t\t\t\t " << device_type_to_string(d.type) << std::endl;
+        std::cout << "  Device ID:\t\t\t\t\t " << d.vendor_id << std::endl;
+        //std::cout << "  Board name:\t\t\t\t\t " << d.name << std::endl;
+        std::cout << "  Max compute units:\t\t\t\t " << d.max_compute_units << std::endl;
+        cl_uint max_work_item_dimensions = d.max_work_item_sizes.size();
+        std::cout << "  Max work items dimensions:\t\t\t " << max_work_item_dimensions << std::endl;
+        for(cl_uint i = 0; i < max_work_item_dimensions; ++i)
+                std::cout << "    Max work items[" << i << "]:\t\t\t\t " << d.max_work_item_sizes[i] << std::endl;
+        std::cout << "  Max work group size:\t\t\t\t " << d.max_work_group_size << std::endl;
+        std::cout << "  Preferred vector width char:\t\t\t " << d.preferred_vector_width_char << std::endl;
+        std::cout << "  Preferred vector width short:\t\t\t " << d.preferred_vector_width_short << std::endl;
+        std::cout << "  Preferred vector width int:\t\t\t " << d.preferred_vector_width_int << std::endl;
+        std::cout << "  Preferred vector width long:\t\t\t " << d.preferred_vector_width_long << std::endl;
+        std::cout << "  Preferred vector width float:\t\t\t " << d.preferred_vector_width_float << std::endl;
+        std::cout << "  Preferred vector width double:\t\t " << d.preferred_vector_width_double << std::endl;
+        std::cout << "  Native vector width char:\t\t\t " << d.native_vector_width_char << std::endl;
+        std::cout << "  Native vector width short:\t\t\t " << d.native_vector_width_short << std::endl;
+        std::cout << "  Native vector width int:\t\t\t " << d.native_vector_width_int << std::endl;
+        std::cout << "  Native vector width long:\t\t\t " << d.native_vector_width_long << std::endl;
+        std::cout << "  Native vector width float:\t\t\t " << d.native_vector_width_float << std::endl;
+        std::cout << "  Native vector width double:\t\t\t " << d.native_vector_width_double << std::endl;
+        std::cout << "  Max clock frequency:\t\t\t\t " << d.max_clock_frequency << "Mhz" << std::endl;
+        std::cout << "  Address bits:\t\t\t\t\t " << d.address_bits << std::endl;
+        std::cout << "  Max memory allocation:\t\t\t " << d.max_mem_alloc_size << std::endl;
+        std::cout << "  Image support:\t\t\t\t " << (d.image_support != CL_FALSE ? "Yes":"No") << std::endl;
+        std::cout << "  Max number of images read arguments:\t\t " << d.max_read_image_args << std::endl;
+        std::cout << "  Max number of images write arguments:\t\t " << d.max_write_image_args << std::endl;
+        std::cout << "  Max image 2D width:\t\t\t\t " << d.image2d_max_width << std::endl;
+        std::cout << "  Max image 2D height:\t\t\t\t " << d.image2d_max_height << std::endl;
+        std::cout << "  Max image 3D width:\t\t\t\t " << d.image3d_max_width << std::endl;
+        std::cout << "  Max image 3D height:\t\t\t\t " << d.image3d_max_height << std::endl;
+        std::cout << "  Max image 3D depth:\t\t\t\t " << d.image3d_max_depth << std::endl;
+        std::cout << "  Max samplers within kernel:\t\t\t " << d.max_samplers << std::endl;
+        std::cout << "  Max size of kernel argument:\t\t\t " << d.max_parameter_size << std::endl;
+        std::cout << "  Alignment (bits) of base address:\t\t " << d.mem_base_addr_align << std::endl;
+        std::cout << "  Minimum alignment (bytes) for any datatype:\t " << d.min_data_type_align_size << std::endl;
+        std::cout << "  Single precision floating point capability" << std::endl;
+        output_amd_compat_fp_config(d.single_fp_config);
+        std::cout << "  Cache type:\t\t\t\t\t ";
+        switch(d.global_mem_cache_type)
+        {
+        case CL_NONE:             std::cout << "None";       break;
+        case CL_READ_ONLY_CACHE:  std::cout << "Read Only";  break;
+        case CL_READ_WRITE_CACHE: std::cout << "Read/Write"; break;
+        }
+        std::cout << std::endl;
+        std::cout << "  Cache line size:\t\t\t\t " << d.global_mem_cacheline_size << std::endl;
+        std::cout << "  Cache size:\t\t\t\t\t " << d.global_mem_cache_size << std::endl;
+        std::cout << "  Global memory size:\t\t\t\t " << d.global_mem_size << std::endl;
+        std::cout << "  Constant buffer size:\t\t\t\t " << d.max_constant_buffer_size << std::endl;
+        std::cout << "  Max number of constant args:\t\t\t " << d.max_constant_args << std::endl;
+        std::cout << "  Local memory type:\t\t\t\t ";
+        switch(d.local_mem_type)
+        {
+        case CL_LOCAL:  std::cout << "Local";  break;
+        case CL_GLOBAL: std::cout << "Global"; break;
+        }
+        std::cout << std::endl;
+        std::cout << "  Local memory size:\t\t\t\t " << d.local_mem_size << std::endl;
+        std::cout << "  Error correction support:\t\t\t " << d.error_correction_support << std::endl;
+        std::cout << "  Unified memory for Host and Device:\t\t " << d.host_unified_memory << std::endl;
+        std::cout << "  Profiling timer resolution:\t\t\t " << d.profiling_timer_resolution << std::endl;
+        std::cout << "  Device endianess:\t\t\t\t " << (d.endian_little ? "Little" : "Big") << std::endl;
+        std::cout << "  Available:\t\t\t\t\t " << (d.available ? "Yes":"No") << std::endl;
+        std::cout << "  Compiler available:\t\t\t\t " << (d.compiler_available ? "Yes":"No") << std::endl;
+        std::cout << "  Execution capabilities:\t\t\t\t " << std::endl;
+        std::cout << "    Execute OpenCL kernels:\t\t\t " << ((d.execution_capabilities & CL_EXEC_KERNEL) ? "Yes" : "No") << std::endl;
+        std::cout << "    Execute native function:\t\t\t " << ((d.execution_capabilities & CL_EXEC_NATIVE_KERNEL) ? "Yes" : "No") << std::endl;
+        std::cout << "  Queue properties:\t\t\t\t " << std::endl;
+        std::cout << "    Out-of-Order:\t\t\t\t " << ((d.queue_properties & CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE) ? "Yes":"No") << std::endl;
+        std::cout << "    Profiling :\t\t\t\t\t " << ((d.queue_properties & CL_QUEUE_PROFILING_ENABLE) ? "Yes":"No") << std::endl;
+        std::cout << "  Platform ID:\t\t\t\t\t " << d.platform << std::endl;
+        std::cout << "  Name:\t\t\t\t\t\t " << d.name << std::endl;
+        std::cout << "  Vendor:\t\t\t\t\t " << d.vendor << std::endl;
+        std::cout << "  Device OpenCL C version:\t\t\t " << d.opencl_c_version << std::endl;
+        std::cout << "  Driver version:\t\t\t\t " << d.driver_version << std::endl;
+        std::cout << "  Profile:\t\t\t\t\t " << d.profile << std::endl;
+        std::cout << "  Version:\t\t\t\t\t " << d.version << std::endl;
+        std::cout << "  Extensions:\t\t\t\t\t " << d.extensions << std::endl;
+        std::cout << std::endl;
+        std::cout << std::endl;
+
+}
+
+void output_amd_compat_fp_config(cl_device_fp_config config)
+{
+        std::cout << "    Denorms:\t\t\t\t\t " << ((config & CL_FP_DENORM) ? "Yes":"No") << std::endl;
+        std::cout << "    Quiet NaNs:\t\t\t\t\t " << ((config & CL_FP_INF_NAN) ? "Yes":"No") << std::endl;
+        std::cout << "    Round to nearest even:\t\t\t " << ((config & CL_FP_ROUND_TO_NEAREST) ? "Yes":"No") << std::endl;
+        std::cout << "    Round to zero:\t\t\t\t " << ((config & CL_FP_ROUND_TO_ZERO) ? "Yes":"No") << std::endl;
+        std::cout << "    Round to +ve and infinity:\t\t\t " << ((config & CL_FP_ROUND_TO_INF) ? "Yes":"No") << std::endl;
+        std::cout << "    IEEE754-2008 fused multiply-add:\t\t " << ((config & CL_FP_FMA) ? "Yes":"No") << std::endl;
+}
+
+void output_amd_compat(std::list<platform> const &platforms)
+{
+        std::cout << "Number of platforms:\t\t\t\t " << platforms.size() << std::endl;
+        std::for_each(platforms.begin(), platforms.end(), &output_amd_compat_platform_summary);
+        std::cout << std::endl << std::endl;
+        std::for_each(platforms.begin(), platforms.end(), &output_amd_compat_platform_details);
+}
diff --git a/output_amd_compat.h b/output_amd_compat.h
new file mode 100644
index 0000000..7a12ea6
--- /dev/null
+++ b/output_amd_compat.h
@@ -0,0 +1,10 @@
+#ifndef clinfo_output_amd_compat_h_
+#define clinfo_output_amd_compat_h_ 1
+
+#include "platform.h"
+
+#include <list>
+
+void output_amd_compat(std::list<platform> const &);
+
+#endif
diff --git a/output_common.cpp b/output_common.cpp
new file mode 100644
index 0000000..f7af952
--- /dev/null
+++ b/output_common.cpp
@@ -0,0 +1,18 @@
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "output_common.h"
+
+char const *device_type_to_string(cl_device_type t)
+{
+        switch(t)
+        {
+        case CL_DEVICE_TYPE_GPU:
+                return "CL_DEVICE_TYPE_GPU";
+        case CL_DEVICE_TYPE_CPU:
+                return "CL_DEVICE_TYPE_CPU";
+        default:
+                return "(unknown)";
+        }
+}
diff --git a/output_common.h b/output_common.h
new file mode 100644
index 0000000..564e7a7
--- /dev/null
+++ b/output_common.h
@@ -0,0 +1,8 @@
+#ifndef clinfo_output_common_h_
+#define clinfo_output_common_h_ 1
+
+#include <CL/cl.h>
+
+char const *device_type_to_string(cl_device_type t);
+
+#endif
diff --git a/platform.cpp b/platform.cpp
new file mode 100644
index 0000000..73c365b
--- /dev/null
+++ b/platform.cpp
@@ -0,0 +1,65 @@
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "platform.h"
+
+#include "device.h"
+
+platform::platform(cl_platform_id id) throw() : id(id)
+{
+        return;
+}
+
+platform::platform(platform const &p) :
+        id(p.id),
+        profile(p.profile),
+        version(p.version),
+        name(p.name),
+        vendor(p.vendor),
+        extensions(p.extensions),
+        devices(p.devices)
+{
+        return;
+}
+
+platform::~platform() throw()
+{
+        return;
+}
+
+void platform::load()
+{
+        query(name, CL_PLATFORM_NAME);
+        query(vendor, CL_PLATFORM_VENDOR);
+        query(profile, CL_PLATFORM_PROFILE);
+        query(version, CL_PLATFORM_VERSION);
+        query(extensions, CL_PLATFORM_EXTENSIONS);
+
+        cl_uint num_device_ids;
+        cl_int rc = clGetDeviceIDs(id, CL_DEVICE_TYPE_ALL, 0, 0, &num_device_ids);
+        if(rc != CL_SUCCESS)
+                throw rc;
+
+        cl_device_id device_ids[num_device_ids];
+        rc = clGetDeviceIDs(id, CL_DEVICE_TYPE_ALL, num_device_ids, device_ids, 0);
+        if(rc != CL_SUCCESS)
+                throw rc;
+
+        for(cl_device_id const *i = device_ids; i != device_ids + num_device_ids; ++i)
+                devices.insert(devices.end(), device(*i))->load();
+}
+
+void platform::query(std::string &value, cl_platform_info info)
+{
+        size_t length;
+        cl_int rc = clGetPlatformInfo(id, info, 0, 0, &length);
+        if(rc != CL_SUCCESS)
+                throw rc;
+        char buffer[length];
+        rc = clGetPlatformInfo(id, info, length, buffer, 0);
+        if(rc != CL_SUCCESS)
+                throw rc;
+        value = buffer;
+}
+
diff --git a/platform.h b/platform.h
new file mode 100644
index 0000000..da457d7
--- /dev/null
+++ b/platform.h
@@ -0,0 +1,33 @@
+#ifndef clinfo_platform_h_
+#define clinfo_platform_h_ 1
+
+#include <list>
+#include <string>
+
+#include <CL/cl.h>
+
+struct device;
+
+struct platform
+{
+        platform(cl_platform_id) throw();
+        platform(platform const &);
+        ~platform() throw();
+
+        void load();
+
+        cl_platform_id const id;
+
+        std::string profile;
+        std::string version;
+        std::string name;
+        std::string vendor;
+        std::string extensions;
+
+        std::list<device> devices;
+
+private:
+        void query(std::string &, cl_device_info);
+};
+
+#endif

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-opencl/clinfo.git



More information about the Pkg-opencl-devel mailing list