Revert "Added support for and fixed on Linux"
[monky] / configure.ac.in
index eccabef..e85f9b9 100644 (file)
@@ -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"
@@ -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>
@@ -921,6 +923,23 @@ if test "x$want_testing" = "xyes" -a $ac_cv_c_compiler_gnu != no; then
   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)