Fix: $scroll,$if_running and $apcupsd_lastxfer can now have long arguments if text_bu...
[monky] / configure.ac.in
index eccabef..f9d3e6f 100644 (file)
@@ -201,7 +201,7 @@ AM_CONDITIONAL(BUILD_IBM, test x$want_ibm = xyes)
 if test x$want_ibm = xyes; then
        if test x"$uname" != xLinux; then
                AC_MSG_NOTICE([support for IBM/Lenovo notebooks not supported on $uname... disabling])
-               want_ibm=no
+               want_ibm="not supported on $uname"
        else
                AC_DEFINE(IBM, 1, [Define if you want support for IBM/Lenovo notebooks (SMAPI)])
        fi
@@ -221,7 +221,7 @@ AM_CONDITIONAL(BUILD_HDDTEMP, test x$want_hddtemp = xyes)
 if test x$want_hddtemp = xyes; then
   if test x"$uname" != xLinux; then
       AC_MSG_NOTICE([hddtemp not supported on $uname... disabling])
-      want_hddtemp=no
+      want_hddtemp="not supported on $uname"
   else
       AC_DEFINE(HDDTEMP, 1, [Define if you want hddtemp support])
   fi
@@ -240,7 +240,7 @@ AC_ARG_ENABLE([apcupsd],
 if test x$want_apcupsd = xyes; then
   if test x"$uname" != xLinux; then
       AC_MSG_NOTICE([apcupsd not supported on $uname... disabling])
-      want_apcupsd=no
+      want_apcupsd="not supported on $uname"
   else
       AC_DEFINE(APCUPSD, 1, [Define if you want apcupsd support])
   fi
@@ -260,7 +260,7 @@ AC_ARG_ENABLE([iostats],
 if test x$want_iostats = xyes; then
   if test x"$uname" != xLinux; then
       AC_MSG_NOTICE([iostats not supported on $uname... disabling])
-      want_iostats=no
+      want_iostats="not supported on $uname"
   else
       AC_DEFINE(IOSTATS, 1, [Define if you want support for per-task I/O statistics])
   fi
@@ -505,7 +505,7 @@ if test x$want_lua = xyes; then
                                                        AC_SUBST(tolua_CFLAGS, "${CFLAGS}")
                                                        ],
                                                   AC_MSG_ERROR([tolua_error not found]),
-                                                  $LUA51_LIBS)
+                                                  [$LUA_LIBS $LUA51_LIBS])
                fi
                conky_LIBS="$conky_LIBS $tolua_LIBS"
                tolua_CFLAGS="$tolua_CFLAGS $LUA_CFLAGS $LUA51_CFLAGS"
@@ -543,7 +543,7 @@ AC_ARG_ENABLE([portmon],
 if test x"$want_portmon" = xyes; then
   if test x"$uname" != xLinux; then
       AC_MSG_NOTICE([port monitors not supported on $uname... disabling])
-      want_portmon=no
+      want_portmon="not supported on $uname"
   else
         AC_CHECK_FUNCS([getnameinfo], [], AC_MSG_ERROR([getnameinfo function not found]))
         AC_CHECK_HEADERS([netdb.h netinet/in.h netinet/tcp.h sys/socket.h arpa/inet.h], [],
@@ -562,12 +562,14 @@ dnl
 dnl ICONV
 dnl
 
+m4_pattern_allow([AM_ICONV])
 AM_ICONV
 if test "$am_cv_func_iconv" != yes; then
   AC_MSG_WARN([Could not find libiconv])
 else
   conky_LIBS="$conky_LIBS $LIBICONV"
 fi
+AM_CONDITIONAL(BUILD_ICONV, test "$am_cv_func_iconv" = yes)
 
 dnl
 dnl Xext Double-buffering Extension
@@ -755,7 +757,7 @@ dnl Some headers
 dnl
 
 AC_CHECK_HEADERS([signal.h unistd.h sys/utsname.h sys/stat.h linux/soundcard.h alsa/asoundlib.h dirent.h mcheck.h \
-      sys/statfs.h sys/param.h pthread.h assert.h errno.h time.h])
+      sys/statfs.h sys/param.h pthread.h semaphore.h assert.h errno.h time.h])
 AC_CHECK_HEADERS([sys/mount.h], [], [],
      [#ifdef HAVE_SYS_PARAM_H
       #include <sys/param.h>
@@ -773,6 +775,7 @@ AC_DEFINE(CONFIG_FILE, "$HOME/.conkyrc", [Configfile of the user])
 AC_DEFINE(MAX_SPECIALS_DEFAULT, 512, [Default maximum number of special things, e.g. fonts, offsets, aligns, etc.])
 AC_DEFINE(MAX_USER_TEXT_DEFAULT, 16384, [Default maximum size of config TEXT buffer, i.e. below TEXT line.])
 AC_DEFINE(DEFAULT_TEXT_BUFFER_SIZE, 256, [Default size used for temporary, static text buffers])
+AC_DEFINE(MAX_NET_INTERFACES, 16, [Maximum number of network devices])
 
 dnl
 dnl Some functions
@@ -899,7 +902,7 @@ AC_ARG_ENABLE([debug],
               [want_debug="$enableval"], [want_debug=no])
 
 if test "x$want_debug" = "xyes" -a $ac_cv_c_compiler_gnu != no; then
-  conky_CFLAGS="$conky_CFLAGS -g3"
+  conky_CFLAGS="$conky_CFLAGS -g3 -O0"
   AC_DEFINE([DEBUG], 1, [Define for debugging])
 fi
 
@@ -916,11 +919,28 @@ if test "x$want_testing" = "xyes" -a $ac_cv_c_compiler_gnu != no; then
     conky_CFLAGS="$conky_CFLAGS -Wextra -Wunused -Wdeclaration-after-statement -Wundef -Wendif-labels -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Wstrict-prototypes -Wold-style-definition -Winline -Wmissing-noreturn -Wmissing-format-attribute -Wredundant-decls -std=c99 -pedantic -Werror"
     AC_DEFINE([TESTING], [], [Define for testing (enables strict compiler flags)])
   else
-    conky_CFLAGS="$conky_CFLAGS -g3 -Wextra -Wunused -Wdeclaration-after-statement -Wundef -Wendif-labels -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Wstrict-prototypes -Wold-style-definition -Winline -Wmissing-noreturn -Wmissing-format-attribute -Wredundant-decls -std=c99 -pedantic -Werror"
+    conky_CFLAGS="$conky_CFLAGS -O0 -g3 -Wextra -Wunused -Wdeclaration-after-statement -Wundef -Wendif-labels -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Wstrict-prototypes -Wold-style-definition -Winline -Wmissing-noreturn -Wmissing-format-attribute -Wredundant-decls -std=c99 -pedantic -Werror"
     AC_DEFINE([TESTING], [], [Define for testing (enables strict compiler flags)])
   fi
 fi
 
+dnl
+dnl profiling
+dnl
+
+AC_ARG_ENABLE([profiling],
+             AC_HELP_STRING([--enable-profiling], [specify compiler flags for use with gprof and gcov @<:@default=no@:>@]),
+             [want_profiling="$enableval"], [want_profiling=no])
+
+if test "x$want_profiling" = "xyes" -a $ac_cv_c_compiler_gnu != no; then
+  if test "x$want_debug" = "xyes"; then
+    conky_CFLAGS="$conky_CFLAGS -pg -fprofile-arcs -ftest-coverage"
+  else
+    conky_CFLAGS="$conky_CFLAGS -g3 -pg -fprofile-arcs -ftest-coverage"
+  fi
+  AC_DEFINE([PROFILING], [], [Define for profiling (gprof and gcov) support])
+fi
+
 AC_SUBST(conky_CFLAGS)
 AC_SUBST(conky_LIBS)
 AC_SUBST(X11_LIBS)