configure
authorBrenden Matthews <brenden1@rty.ca>
Fri, 12 Aug 2005 04:34:06 +0000 (04:34 +0000)
committerBrenden Matthews <brenden1@rty.ca>
Fri, 12 Aug 2005 04:34:06 +0000 (04:34 +0000)
git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky@105 7f574dfc-610e-0410-a909-a81674777703

Conky.kdevelop
config.h.in
configure
configure.in
conky.c
conky.h

index 336ab59..f5dfc0e 100644 (file)
   <kdevautoproject>
     <general>
       <activetarget>conky</activetarget>
-      <useconfiguration>debug</useconfiguration>
+      <useconfiguration>debug-no-x</useconfiguration>
     </general>
     <run>
       <mainprogram>conky</mainprogram>
       <directoryradio>build</directoryradio>
       <customdirectory>/</customdirectory>
-      <programargs/>
+      <programargs></programargs>
       <terminal>false</terminal>
       <autocompile>true</autocompile>
       <envvars/>
@@ -53,7 +53,7 @@
         <ccompiler>kdevgccoptions</ccompiler>
         <cxxcompiler>kdevgppoptions</cxxcompiler>
         <f77compiler>kdevpgf77options</f77compiler>
-        <cflags>-O2 -Wall -fexceptions -fomit-frame-pointer -fshort-enums -g3</cflags>
+        <cflags>-O2 -Wall -fexceptions -fomit-frame-pointer -fshort-enums -ggdb</cflags>
         <envvars/>
         <topsourcedir></topsourcedir>
         <cppflags></cppflags>
         <envvars/>
         <configargs>--enable-debug=full --prefix=/usr --enable-mpd --enable-xft --enable-seti --enable-double-buffer --enable-own-window --enable-metar --enable-mldonkey --disable-x11</configargs>
         <builddir>debug-no-x</builddir>
-        <topsourcedir/>
-        <cppflags/>
-        <ldflags/>
+        <topsourcedir></topsourcedir>
+        <cppflags></cppflags>
+        <ldflags></ldflags>
         <ccompiler>kdevgccoptions</ccompiler>
         <cxxcompiler>kdevgppoptions</cxxcompiler>
         <f77compiler>kdevpgf77options</f77compiler>
-        <ccompilerbinary/>
-        <cxxcompilerbinary/>
-        <f77compilerbinary/>
-        <cflags>-O2 -Wall -fexceptions -fomit-frame-pointer -fshort-enums -g3</cflags>
-        <cxxflags/>
-        <f77flags/>
+        <ccompilerbinary></ccompilerbinary>
+        <cxxcompilerbinary></cxxcompilerbinary>
+        <f77compilerbinary></f77compilerbinary>
+        <cflags>-O2 -Wall -fexceptions -fomit-frame-pointer -fshort-enums -ggdb</cflags>
+        <cxxflags></cxxflags>
+        <f77flags></f77flags>
       </debug-no-x>
     </configurations>
     <make>
index 862b92a..ef702cb 100644 (file)
@@ -24,6 +24,9 @@
 /* Define if you have kstat (Solaris) */
 #undef HAVE_KSTAT
 
+/* Define if you have libXext */
+#undef HAVE_LIBXEXT
+
 /* Define to 1 if you have the <linux/soundcard.h> header file. */
 #undef HAVE_LINUX_SOUNDCARD_H
 
index d6d12ad..45bf0e7 100755 (executable)
--- a/configure
+++ b/configure
@@ -5130,6 +5130,149 @@ fi
 
 done
 
+echo "$as_me:$LINENO: checking for XOpenDisplay in -lX11" >&5
+echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
+if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lX11 -L$x_libraries $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char XOpenDisplay ();
+int
+main ()
+{
+XOpenDisplay ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"
+                        || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_X11_XOpenDisplay=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_X11_XOpenDisplay=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_X11_XOpenDisplay" >&5
+echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
+if test $ac_cv_lib_X11_XOpenDisplay = yes; then
+  X11_LIBS="-lX11"
+fi
+
+echo "$as_me:$LINENO: checking for XdbeQueryExtension in -lXext" >&5
+echo $ECHO_N "checking for XdbeQueryExtension in -lXext... $ECHO_C" >&6
+if test "${ac_cv_lib_Xext_XdbeQueryExtension+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lXext -L$x_libraries $X11_LIBS $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char XdbeQueryExtension ();
+int
+main ()
+{
+XdbeQueryExtension ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"
+                        || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_Xext_XdbeQueryExtension=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_Xext_XdbeQueryExtension=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XdbeQueryExtension" >&5
+echo "${ECHO_T}$ac_cv_lib_Xext_XdbeQueryExtension" >&6
+if test $ac_cv_lib_Xext_XdbeQueryExtension = yes; then
+
+   X11_LIBS="$X11_LIBS -lXext"
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LIBXEXT 1
+_ACEOF
+
+
+fi
+
     if test "x$X11_MISSING" = xyes; then
       { { echo "$as_me:$LINENO: error: something went wrong when checking for X11, you're probably missing headers or it's not installed, either re-run configure with --disable-x11, or fix this" >&5
 echo "$as_me: error: something went wrong when checking for X11, you're probably missing headers or it's not installed, either re-run configure with --disable-x11, or fix this" >&2;}
@@ -5147,6 +5290,149 @@ _ACEOF
 
 fi
 
+echo "$as_me:$LINENO: checking for XOpenDisplay in -lX11" >&5
+echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
+if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lX11 -L$x_libraries $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char XOpenDisplay ();
+int
+main ()
+{
+XOpenDisplay ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"
+                        || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_X11_XOpenDisplay=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_X11_XOpenDisplay=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_X11_XOpenDisplay" >&5
+echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
+if test $ac_cv_lib_X11_XOpenDisplay = yes; then
+  X11_LIBS="-lX11"
+fi
+
+echo "$as_me:$LINENO: checking for XdbeQueryExtension in -lXext" >&5
+echo $ECHO_N "checking for XdbeQueryExtension in -lXext... $ECHO_C" >&6
+if test "${ac_cv_lib_Xext_XdbeQueryExtension+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lXext -L$x_libraries $X11_LIBS $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char XdbeQueryExtension ();
+int
+main ()
+{
+XdbeQueryExtension ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"
+                        || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_Xext_XdbeQueryExtension=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_Xext_XdbeQueryExtension=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XdbeQueryExtension" >&5
+echo "${ECHO_T}$ac_cv_lib_Xext_XdbeQueryExtension" >&6
+if test $ac_cv_lib_Xext_XdbeQueryExtension = yes; then
+
+   X11_LIBS="$X11_LIBS -lXext"
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LIBXEXT 1
+_ACEOF
+
+
+fi
+
 
 if test "$x_libraries" != ""; then
   LDFLAGS="$LDFLAGS -L$x_libraries"
index 81da35e..a75ecdc 100644 (file)
@@ -196,6 +196,11 @@ AC_ARG_ENABLE(x11,
 AM_CONDITIONAL(BUILD_X11, test x$want_x11 == xyes)
 if test x$want_x11 == xyes; then
 AC_CHECK_HEADERS([X11/Xlib.h], [], [X11_MISSING=yes])
+AC_CHECK_LIB([X11], [XOpenDisplay], [X11_LIBS="-lX11"], [], [[-L$x_libraries]])
+AC_CHECK_LIB([Xext], [XdbeQueryExtension], [
+   X11_LIBS="$X11_LIBS -lXext"
+   AC_DEFINE(HAVE_LIBXEXT, 1, [Define if you have libXext])
+ ], [], [[-L$x_libraries $X11_LIBS]])
     if test "x$X11_MISSING" = xyes; then
       AC_MSG_ERROR([something went wrong when checking for X11, you're probably missing headers or it's not installed, either re-run configure with --disable-x11, or fix this])
   fi
@@ -208,11 +213,11 @@ dnl   exit 1
 dnl fi
 dnl AC_DEFINE(HAVE_X11, 1, [Define if you have X11])
 
-dnl AC_CHECK_LIB([X11], [XOpenDisplay], [X11_LIBS="-lX11"], [], [[-L$x_libraries]])
-dnl AC_CHECK_LIB([Xext], [XdbeQueryExtension], [
-dnl   X11_LIBS="$X11_LIBS -lXext"
-dnl   AC_DEFINE(HAVE_LIBXEXT, 1, [Define if you have libXext])
-dnl ], [], [[-L$x_libraries $X11_LIBS]])
+AC_CHECK_LIB([X11], [XOpenDisplay], [X11_LIBS="-lX11"], [], [[-L$x_libraries]])
+AC_CHECK_LIB([Xext], [XdbeQueryExtension], [
+   X11_LIBS="$X11_LIBS -lXext"
+   AC_DEFINE(HAVE_LIBXEXT, 1, [Define if you have libXext])
+ ], [], [[-L$x_libraries $X11_LIBS]])
 
 if test "$x_libraries" != ""; then
   LDFLAGS="$LDFLAGS -L$x_libraries"
diff --git a/conky.c b/conky.c
index 322a0d2..20816a9 100644 (file)
--- a/conky.c
+++ b/conky.c
@@ -631,7 +631,7 @@ static void human_readable(long long a, char *buf, int size)
        if(a / 1024 / 1024 / 1024.0 > 1024.0){
                snprintf(buf, size, "%.2fT", (a / 1024 / 1024) / 1024 / 1024.0);
        }
-       else if (a >= 1024 * 1024 * 1024){
+       else if (a >= 1024 * 1024 * 1024) {
                snprintf(buf, size, "%.2fG", (a / 1024 / 1024) / 1024.0);
        }
        else if (a >= 1024 * 1024) {
diff --git a/conky.h b/conky.h
index e7d219a..ea5822a 100644 (file)
--- a/conky.h
+++ b/conky.h
@@ -9,9 +9,8 @@
 #ifndef _conky_h_
 #define _conky_h_
 
-#undef MALLOC_CHECK_
 
-//#include <mcheck.h>
+#include <mcheck.h>
 #include "config.h"
 #include <sys/utsname.h>
 #include <stdio.h>