added support of the library ATI ADL in the build
authorJean-Philippe Orsini <jeanfi@gmail.com>
Mon, 18 Jul 2011 15:51:06 +0000 (15:51 +0000)
committerJean-Philippe Orsini <jeanfi@gmail.com>
Mon, 18 Jul 2011 15:51:06 +0000 (15:51 +0000)
22 files changed:
Makefile.in
config.h.in
configure
configure.ac
pixmaps/14x14/Makefile.in
pixmaps/16x16/Makefile.in
pixmaps/22x22/Makefile.in
pixmaps/24x24/Makefile.in
pixmaps/32x32/Makefile.in
pixmaps/48x48/Makefile.in
pixmaps/64x64/Makefile.in
pixmaps/scalable/Makefile.in
src/Makefile.in
src/glade/Makefile.in
src/lib/Makefile.am
src/lib/Makefile.in
src/libpsensor_json/Makefile.in
src/plib/Makefile.in
src/server/Makefile.in
src/unity/Makefile.in
tests/Makefile.in
www/Makefile.in

index ed81ee3..ad446fb 100644 (file)
@@ -171,6 +171,8 @@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
 JSON_CFLAGS = @JSON_CFLAGS@
 JSON_LIBS = @JSON_LIBS@
 LDFLAGS = @LDFLAGS@
+LIBATIADL_CFLAGS = @LIBATIADL_CFLAGS@
+LIBATIADL_LIBS = @LIBATIADL_LIBS@
 LIBICONV = @LIBICONV@
 LIBINTL = @LIBINTL@
 LIBMICROHTTPD_CFLAGS = @LIBMICROHTTPD_CFLAGS@
index f4776a0..dc01697 100644 (file)
@@ -4,6 +4,9 @@
    language is requested. */
 #undef ENABLE_NLS
 
+/* Define to 1 if you have the <adl_defines.h> header file. */
+#undef HAVE_ADL_DEFINES_H
+
 /* Use AppIndicator > 0.2.9 */
 #undef HAVE_APPINDICATOR
 
@@ -49,6 +52,9 @@
 /* Use JSON */
 #undef HAVE_JSON
 
+/* libatiadl is available */
+#undef HAVE_LIBATIADL
+
 /* Use libmicrohttpd */
 #undef HAVE_LIBMICROHTTPD
 
index 554ad91..8382c23 100755 (executable)
--- a/configure
+++ b/configure
@@ -607,6 +607,10 @@ LIBMICROHTTPD_FALSE
 LIBMICROHTTPD_TRUE
 LIBMICROHTTPD_LIBS
 LIBMICROHTTPD_CFLAGS
+LIBATIADL_LIBS
+LIBATIADL_CFLAGS
+LIBATIADL_FALSE
+LIBATIADL_TRUE
 UNITY_FALSE
 UNITY_TRUE
 UNITY_LIBS
@@ -761,6 +765,7 @@ with_gnu_ld
 enable_rpath
 with_libiconv_prefix
 with_libintl_prefix
+with_libatiadl
 with_gtop
 '
       ac_precious_vars='build_alias
@@ -1436,6 +1441,7 @@ Optional Packages:
   --without-libiconv-prefix     don't search for libiconv in includedir and libdir
   --with-libintl-prefix[=DIR]  search for libintl in DIR/include and DIR/lib
   --without-libintl-prefix     don't search for libintl in includedir and libdir
+  --with-libatiadl=DIR   use libatiadlxx in DIR
   --with-gtop=yes|no   use gtop
 
 Some influential environment variables:
@@ -8064,6 +8070,88 @@ else
 fi
 
 
+# libatiadl
+
+# Check whether --with-libatiadl was given.
+if test "${with_libatiadl+set}" = set; then :
+  withval=$with_libatiadl;
+                  ATIADL_DIR=${withval}
+                  CPPFLAGS="${CPPFLAGS} -I${ATIADL_DIR}/include"
+                  LIBS="$LIBS -L/usr/lib/fglrx"
+
+
+fi
+
+
+for ac_header in adl_defines.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "adl_defines.h" "ac_cv_header_adl_defines_h" "$ac_includes_default"
+if test "x$ac_cv_header_adl_defines_h" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_ADL_DEFINES_H 1
+_ACEOF
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ADL_Main_Control_Refresh in -latiadlxx" >&5
+$as_echo_n "checking for ADL_Main_Control_Refresh in -latiadlxx... " >&6; }
+if test "${ac_cv_lib_atiadlxx_ADL_Main_Control_Refresh+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-latiadlxx  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char ADL_Main_Control_Refresh ();
+int
+main ()
+{
+return ADL_Main_Control_Refresh ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_atiadlxx_ADL_Main_Control_Refresh=yes
+else
+  ac_cv_lib_atiadlxx_ADL_Main_Control_Refresh=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_atiadlxx_ADL_Main_Control_Refresh" >&5
+$as_echo "$ac_cv_lib_atiadlxx_ADL_Main_Control_Refresh" >&6; }
+if test "x$ac_cv_lib_atiadlxx_ADL_Main_Control_Refresh" = x""yes; then :
+
+
+$as_echo "#define HAVE_LIBATIADL 1" >>confdefs.h
+
+                       LIBATIADL_CFLAGS="-I${ATIADL_DIR}/include"
+                       LIBATIADL_LIBS="-L/usr/lib/fglrx -latiadlxx"
+
+fi
+
+fi
+
+done
+
+
+ if test -n "$LIBATIADL_LIBS"; then
+  LIBATIADL_TRUE=
+  LIBATIADL_FALSE='#'
+else
+  LIBATIADL_TRUE='#'
+  LIBATIADL_FALSE=
+fi
+
+
+
+
 ############### psensor-server
 
 # libmicrohttpd, mandatory for psensor-server
@@ -8437,6 +8525,10 @@ if test -z "${UNITY_TRUE}" && test -z "${UNITY_FALSE}"; then
   as_fn_error $? "conditional \"UNITY\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
+if test -z "${LIBATIADL_TRUE}" && test -z "${LIBATIADL_FALSE}"; then
+  as_fn_error $? "conditional \"LIBATIADL\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
 if test -z "${LIBMICROHTTPD_TRUE}" && test -z "${LIBMICROHTTPD_FALSE}"; then
   as_fn_error $? "conditional \"LIBMICROHTTPD\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
index 9e8c101..9b703af 100644 (file)
@@ -151,6 +151,27 @@ AC_SUBST(UNITY_CFLAGS)
 AC_SUBST(UNITY_LIBS)
 AM_CONDITIONAL(UNITY, test -n "$UNITY_LIBS")
 
+# libatiadl
+AC_ARG_WITH(libatiadl,
+[  --with-libatiadl[=DIR]   use libatiadlxx in DIR],[
+                  ATIADL_DIR=${withval}
+                  CPPFLAGS="${CPPFLAGS} -I${ATIADL_DIR}/include"
+                  LIBS="$LIBS -L/usr/lib/fglrx"
+                 ]
+)
+
+AC_CHECK_HEADERS(adl_defines.h,
+       AC_CHECK_LIB(atiadlxx,ADL_Main_Control_Refresh,
+               [
+                       AC_DEFINE(HAVE_LIBATIADL,1,[libatiadl is available])
+                       LIBATIADL_CFLAGS="-I${ATIADL_DIR}/include"
+                       LIBATIADL_LIBS="-L/usr/lib/fglrx -latiadlxx"
+               ]))
+
+AM_CONDITIONAL(LIBATIADL, test -n "$LIBATIADL_LIBS")
+AC_SUBST(LIBATIADL_CFLAGS)
+AC_SUBST(LIBATIADL_LIBS)
+
 ############### psensor-server
 
 # libmicrohttpd, mandatory for psensor-server
index 071f3a3..00c91ec 100644 (file)
@@ -114,6 +114,8 @@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
 JSON_CFLAGS = @JSON_CFLAGS@
 JSON_LIBS = @JSON_LIBS@
 LDFLAGS = @LDFLAGS@
+LIBATIADL_CFLAGS = @LIBATIADL_CFLAGS@
+LIBATIADL_LIBS = @LIBATIADL_LIBS@
 LIBICONV = @LIBICONV@
 LIBINTL = @LIBINTL@
 LIBMICROHTTPD_CFLAGS = @LIBMICROHTTPD_CFLAGS@
index 1ac7109..9a2ada5 100644 (file)
@@ -114,6 +114,8 @@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
 JSON_CFLAGS = @JSON_CFLAGS@
 JSON_LIBS = @JSON_LIBS@
 LDFLAGS = @LDFLAGS@
+LIBATIADL_CFLAGS = @LIBATIADL_CFLAGS@
+LIBATIADL_LIBS = @LIBATIADL_LIBS@
 LIBICONV = @LIBICONV@
 LIBINTL = @LIBINTL@
 LIBMICROHTTPD_CFLAGS = @LIBMICROHTTPD_CFLAGS@
index 8422ad6..289e7a6 100644 (file)
@@ -114,6 +114,8 @@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
 JSON_CFLAGS = @JSON_CFLAGS@
 JSON_LIBS = @JSON_LIBS@
 LDFLAGS = @LDFLAGS@
+LIBATIADL_CFLAGS = @LIBATIADL_CFLAGS@
+LIBATIADL_LIBS = @LIBATIADL_LIBS@
 LIBICONV = @LIBICONV@
 LIBINTL = @LIBINTL@
 LIBMICROHTTPD_CFLAGS = @LIBMICROHTTPD_CFLAGS@
index 61de751..ce8d059 100644 (file)
@@ -114,6 +114,8 @@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
 JSON_CFLAGS = @JSON_CFLAGS@
 JSON_LIBS = @JSON_LIBS@
 LDFLAGS = @LDFLAGS@
+LIBATIADL_CFLAGS = @LIBATIADL_CFLAGS@
+LIBATIADL_LIBS = @LIBATIADL_LIBS@
 LIBICONV = @LIBICONV@
 LIBINTL = @LIBINTL@
 LIBMICROHTTPD_CFLAGS = @LIBMICROHTTPD_CFLAGS@
index 7b5aa92..8977201 100644 (file)
@@ -114,6 +114,8 @@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
 JSON_CFLAGS = @JSON_CFLAGS@
 JSON_LIBS = @JSON_LIBS@
 LDFLAGS = @LDFLAGS@
+LIBATIADL_CFLAGS = @LIBATIADL_CFLAGS@
+LIBATIADL_LIBS = @LIBATIADL_LIBS@
 LIBICONV = @LIBICONV@
 LIBINTL = @LIBINTL@
 LIBMICROHTTPD_CFLAGS = @LIBMICROHTTPD_CFLAGS@
index 2c8866f..e5b72bc 100644 (file)
@@ -114,6 +114,8 @@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
 JSON_CFLAGS = @JSON_CFLAGS@
 JSON_LIBS = @JSON_LIBS@
 LDFLAGS = @LDFLAGS@
+LIBATIADL_CFLAGS = @LIBATIADL_CFLAGS@
+LIBATIADL_LIBS = @LIBATIADL_LIBS@
 LIBICONV = @LIBICONV@
 LIBINTL = @LIBINTL@
 LIBMICROHTTPD_CFLAGS = @LIBMICROHTTPD_CFLAGS@
index e78cb3e..0a87bf8 100644 (file)
@@ -114,6 +114,8 @@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
 JSON_CFLAGS = @JSON_CFLAGS@
 JSON_LIBS = @JSON_LIBS@
 LDFLAGS = @LDFLAGS@
+LIBATIADL_CFLAGS = @LIBATIADL_CFLAGS@
+LIBATIADL_LIBS = @LIBATIADL_LIBS@
 LIBICONV = @LIBICONV@
 LIBINTL = @LIBINTL@
 LIBMICROHTTPD_CFLAGS = @LIBMICROHTTPD_CFLAGS@
index 0897652..c86d526 100644 (file)
@@ -114,6 +114,8 @@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
 JSON_CFLAGS = @JSON_CFLAGS@
 JSON_LIBS = @JSON_LIBS@
 LDFLAGS = @LDFLAGS@
+LIBATIADL_CFLAGS = @LIBATIADL_CFLAGS@
+LIBATIADL_LIBS = @LIBATIADL_LIBS@
 LIBICONV = @LIBICONV@
 LIBINTL = @LIBINTL@
 LIBMICROHTTPD_CFLAGS = @LIBMICROHTTPD_CFLAGS@
index 23c9f25..c975416 100644 (file)
@@ -198,6 +198,8 @@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
 JSON_CFLAGS = @JSON_CFLAGS@
 JSON_LIBS = @JSON_LIBS@
 LDFLAGS = @LDFLAGS@
+LIBATIADL_CFLAGS = @LIBATIADL_CFLAGS@
+LIBATIADL_LIBS = @LIBATIADL_LIBS@
 LIBICONV = @LIBICONV@
 LIBINTL = @LIBINTL@
 LIBMICROHTTPD_CFLAGS = @LIBMICROHTTPD_CFLAGS@
index c96918b..2cadc99 100644 (file)
@@ -114,6 +114,8 @@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
 JSON_CFLAGS = @JSON_CFLAGS@
 JSON_LIBS = @JSON_LIBS@
 LDFLAGS = @LDFLAGS@
+LIBATIADL_CFLAGS = @LIBATIADL_CFLAGS@
+LIBATIADL_LIBS = @LIBATIADL_LIBS@
 LIBICONV = @LIBICONV@
 LIBINTL = @LIBINTL@
 LIBMICROHTTPD_CFLAGS = @LIBMICROHTTPD_CFLAGS@
index eb10b2f..511fe34 100644 (file)
@@ -13,3 +13,8 @@ libpsensor_a_SOURCES = \
 if NVIDIA
 libpsensor_a_SOURCES += nvidia.c
 endif
+
+if LIBATIADL
+LIBS += $(LIBATIADL_LIBS)
+AM_CPPFLAGS = $(LIBATIADL_CFLAGS)
+endif
\ No newline at end of file
index 88d36b1..29dace8 100644 (file)
@@ -35,6 +35,7 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 @NVIDIA_TRUE@am__append_1 = nvidia.c
+@LIBATIADL_TRUE@am__append_2 = $(LIBATIADL_LIBS)
 subdir = src/lib
 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -116,6 +117,8 @@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
 JSON_CFLAGS = @JSON_CFLAGS@
 JSON_LIBS = @JSON_LIBS@
 LDFLAGS = @LDFLAGS@
+LIBATIADL_CFLAGS = @LIBATIADL_CFLAGS@
+LIBATIADL_LIBS = @LIBATIADL_LIBS@
 LIBICONV = @LIBICONV@
 LIBINTL = @LIBINTL@
 LIBMICROHTTPD_CFLAGS = @LIBMICROHTTPD_CFLAGS@
@@ -123,7 +126,7 @@ LIBMICROHTTPD_LIBS = @LIBMICROHTTPD_LIBS@
 LIBNOTIFY_CFLAGS = @LIBNOTIFY_CFLAGS@
 LIBNOTIFY_LIBS = @LIBNOTIFY_LIBS@
 LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
+LIBS = @LIBS@ $(am__append_2)
 LTLIBICONV = @LTLIBICONV@
 LTLIBINTL = @LTLIBINTL@
 LTLIBOBJS = @LTLIBOBJS@
@@ -219,6 +222,7 @@ libpsensor_a_CFLAGS = -pedantic -Werror
 libpsensor_a_SOURCES = measure.h measure.c color.h color.c psensor.h \
        psensor.c hdd.h hdd.c nvidia.h lmsensor.h lmsensor.c \
        $(am__append_1)
+@LIBATIADL_TRUE@AM_CPPFLAGS = $(LIBATIADL_CFLAGS)
 all: all-am
 
 .SUFFIXES:
index a78a730..122945a 100644 (file)
@@ -109,6 +109,8 @@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
 JSON_CFLAGS = @JSON_CFLAGS@
 JSON_LIBS = @JSON_LIBS@
 LDFLAGS = @LDFLAGS@
+LIBATIADL_CFLAGS = @LIBATIADL_CFLAGS@
+LIBATIADL_LIBS = @LIBATIADL_LIBS@
 LIBICONV = @LIBICONV@
 LIBINTL = @LIBINTL@
 LIBMICROHTTPD_CFLAGS = @LIBMICROHTTPD_CFLAGS@
index ef25b12..f25e7f7 100644 (file)
@@ -109,6 +109,8 @@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
 JSON_CFLAGS = @JSON_CFLAGS@
 JSON_LIBS = @JSON_LIBS@
 LDFLAGS = @LDFLAGS@
+LIBATIADL_CFLAGS = @LIBATIADL_CFLAGS@
+LIBATIADL_LIBS = @LIBATIADL_LIBS@
 LIBICONV = @LIBICONV@
 LIBINTL = @LIBINTL@
 LIBMICROHTTPD_CFLAGS = @LIBMICROHTTPD_CFLAGS@
index eefc54b..1cd7671 100644 (file)
@@ -138,6 +138,8 @@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
 JSON_CFLAGS = @JSON_CFLAGS@
 JSON_LIBS = @JSON_LIBS@
 LDFLAGS = @LDFLAGS@
+LIBATIADL_CFLAGS = @LIBATIADL_CFLAGS@
+LIBATIADL_LIBS = @LIBATIADL_LIBS@
 LIBICONV = @LIBICONV@
 LIBINTL = @LIBINTL@
 LIBMICROHTTPD_CFLAGS = @LIBMICROHTTPD_CFLAGS@
index 92605dc..50a302d 100644 (file)
@@ -111,6 +111,8 @@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
 JSON_CFLAGS = @JSON_CFLAGS@
 JSON_LIBS = @JSON_LIBS@
 LDFLAGS = @LDFLAGS@
+LIBATIADL_CFLAGS = @LIBATIADL_CFLAGS@
+LIBATIADL_LIBS = @LIBATIADL_LIBS@
 LIBICONV = @LIBICONV@
 LIBINTL = @LIBINTL@
 LIBMICROHTTPD_CFLAGS = @LIBMICROHTTPD_CFLAGS@
index bfccbe7..992e7a5 100644 (file)
@@ -90,6 +90,8 @@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
 JSON_CFLAGS = @JSON_CFLAGS@
 JSON_LIBS = @JSON_LIBS@
 LDFLAGS = @LDFLAGS@
+LIBATIADL_CFLAGS = @LIBATIADL_CFLAGS@
+LIBATIADL_LIBS = @LIBATIADL_LIBS@
 LIBICONV = @LIBICONV@
 LIBINTL = @LIBINTL@
 LIBMICROHTTPD_CFLAGS = @LIBMICROHTTPD_CFLAGS@
index 4029f9b..692ffcb 100644 (file)
@@ -114,6 +114,8 @@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
 JSON_CFLAGS = @JSON_CFLAGS@
 JSON_LIBS = @JSON_LIBS@
 LDFLAGS = @LDFLAGS@
+LIBATIADL_CFLAGS = @LIBATIADL_CFLAGS@
+LIBATIADL_LIBS = @LIBATIADL_LIBS@
 LIBICONV = @LIBICONV@
 LIBINTL = @LIBINTL@
 LIBMICROHTTPD_CFLAGS = @LIBMICROHTTPD_CFLAGS@