diff --git a/configure.ac b/configure.ac
index 8ee47f3..79e831e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -112,6 +112,39 @@ fi
AC_SUBST([DDCPCI])
+# AMD ADL support check
+support_amdadl=
+AC_ARG_ENABLE(amdadl,
+ [ --enable-amdadl enable AMD Display Library support (autodetect) ],
+ [if test x$enableval = xno; then
+ support_amdadl=no
+ else
+ support_amdadl=yes
+ fi])
+
+AMDADL=
+if test x$support_amdadl = xyes; then
+ AC_CHECK_HEADERS([ADL/adl_sdk.h], [], [AC_MSG_ERROR([ADL headers not found, but ADL support requested.], [1])],
+ [#ifndef __stdcall
+ #define __stdcall
+ #endif
+ ])
+ AMDADL=amdadl
+elif test x$support_amdadl = x; then
+ AC_CHECK_HEADERS([ADL/adl_sdk.h], [
+ AMDADL=amdadl
+ ], [], [#ifndef __stdcall
+ #define __stdcall
+ #endif
+ ])
+fi
+
+if test x$AMDADL = xamdadl; then
+ AC_DEFINE_UNQUOTED(HAVE_AMDADL, 1, [Define if ddccontrol is built with ADL support.])
+fi
+
+AC_SUBST([AMDADL])
+
# Gnome check
support_gnome=yes
AC_ARG_ENABLE(gnome,
diff --git a/src/config.h.in b/src/config.h.in
index 971ec71..e0f31c6 100644
--- a/src/config.h.in
+++ b/src/config.h.in
@@ -4,6 +4,12 @@
language is requested. */
#undef ENABLE_NLS
+/* Define to 1 if you have the <ADL/adl_sdk.h> header file. */
+#undef HAVE_ADL_ADL_SDK_H
+
+/* Define if ddccontrol is built with ADL support. */
+#undef HAVE_AMDADL
+
/* Define if linux/i2c-dev.h is buggy on your system, so defaults constants
and structures must be used */
#undef HAVE_BUGGY_I2C_DEV
@@ -41,7 +47,7 @@
/* Define if ddccontrol is built with /dev/i2c-* support. */
#undef HAVE_I2C_DEV
-/* Define if you have the iconv() function. */
+/* Define if you have the iconv() function and it works. */
#undef HAVE_ICONV
/* Define to 1 if you have the <inttypes.h> header file. */
@@ -50,6 +56,9 @@
/* Define to 1 if you have the `pci' library (-lpci). */
#undef HAVE_LIBPCI
+/* Define to 1 if you have the `z' library (-lz). */
+#undef HAVE_LIBZ
+
/* Define to 1 if you have the <linux/types.h> header file. */
#undef HAVE_LINUX_TYPES_H
@@ -89,6 +98,10 @@
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
+/* Define to the sub-directory in which libtool stores uninstalled libraries.
+ */
+#undef LT_OBJDIR
+
/* Name of package */
#undef PACKAGE
@@ -104,6 +117,9 @@
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
+/* Define to the home page for this package. */
+#undef PACKAGE_URL
+
/* Define to the version of this package. */
#undef PACKAGE_VERSION
diff --git a/src/lib/Makefile.am b/src/lib/Makefile.am
index ce18dcf..775629e 100644
--- a/src/lib/Makefile.am
+++ b/src/lib/Makefile.am
@@ -11,6 +11,7 @@ $(pkgconfig_DATA): $(srcdir)/ddccontrol.pc.in $(top_builddir)/config.status
lib_LTLIBRARIES = libddccontrol.la
libddccontrol_la_SOURCES = ddcci.c ddcci.h monitor_db.c monitor_db.h \
- ddcpci-ipc.h i2c-dev.h conf.c conf.h
+ ddcpci-ipc.h i2c-dev.h conf.c conf.h amd_adl.c amd_adl.h
+
libddccontrol_la_LIBADD = $(LIBXML2_LDFLAGS)
AM_CFLAGS = $(LIBXML2_CFLAGS)
|