Don't link sysprof-text to gtk+.
authorSoren Sandmann <sandmann@redhat.com>
Sun, 30 Oct 2005 20:57:25 +0000 (20:57 +0000)
committerSøren Sandmann Pedersen <ssp@src.gnome.org>
Sun, 30 Oct 2005 20:57:25 +0000 (20:57 +0000)
2005-10-30  Soren Sandmann <sandmann@redhat.com>

* configure.ac, Makefile.am: Don't link sysprof-text to gtk+.

ChangeLog
Makefile.am
TODO
configure.ac

index 5614632..8710a59 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2005-10-30  Soren Sandmann <sandmann@redhat.com>
 
+       * configure.ac, Makefile.am: Don't link sysprof-text to gtk+.
+
+2005-10-30  Soren Sandmann <sandmann@redhat.com>
+
        * Merge stackstash-reorg branch into HEAD
 
 2005-10-30  Soren Sandmann <sandmann@redhat.com>
index 288ee21..5413fdf 100644 (file)
@@ -20,37 +20,52 @@ SYSPROF_CORE =                                      \
        watch.h                                 \
        watch.c
 
+#
+# GUI version
+#
+
 sysprof_SOURCES =                              \
        $(SYSPROF_CORE)                         \
        treeviewutils.h                         \
        treeviewutils.c                         \
        sysprof.c
 
+sysprof_CPPFLAGS =                             \
+       $(GUI_DEP_CFLAGS)                       \
+       -DDATADIR=\"$(pkgdatadir)\"             \
+       -DPIXMAPDIR=\"$(pixmapsdir)\"
+
+sysprof_LDADD = $(GUI_DEP_LIBS)
+
+pixmapsdir = $(datadir)/pixmaps
+
+dist_pkgdata_DATA = sysprof.glade
+dist_pixmaps_DATA = sysprof-icon.png
+
+#
+# Command line version
+#
+
 sysprof_text_SOURCES =                         \
        $(SYSPROF_CORE)                         \
        signal-handler.h                        \
        signal-handler.c                        \
        sysprof-text.c
 
-sysprof_LDADD = $(DEP_LIBS)
+sysprof_text_CPPFLAGS =                                \
+       $(CORE_DEP_CFLAGS)
 
-sysprof_text_LDADD = $(DEP_LIBS)
+sysprof_text_LDADD = $(CORE_DEP_LIBS)
 
-pixmapsdir = $(datadir)/pixmaps
-
-INCLUDES =                                     \
-       $(DEP_CFLAGS)                           \
-       -DDATADIR=\"$(pkgdatadir)\"             \
-       -DPIXMAPDIR=\"$(pixmapsdir)\"
+#
+# Module stuff
+#  
 
 EXTRA_DIST =                                   \
        module/sysprof-module.c                 \
        module/sysprof-module.h                 \
        module/Makefile
 
-dist_pkgdata_DATA = sysprof.glade
-dist_pixmaps_DATA = sysprof-icon.png
-
 insert-module:
        modprobe -r sysprof-module
        modprobe sysprof-module
diff --git a/TODO b/TODO
index cf8e6b6..d92d87a 100644 (file)
--- a/TODO
+++ b/TODO
@@ -63,16 +63,6 @@ Before 1.2:
        - Don't export too much of stackstashes to the rest of the
          app
 
-- Reorganise stackstash and profile
-
-       - Remaining TODO before merging into head:
-
-               - rename profiler->collector
-
-* Consider renaming profiler.[ch] to collector.[ch]
-
-* Make sure sysprof-text is not linked to gtk+
-
 * Figure out how to make sfile.[ch] use less memory.
        - In general clean sfile.[ch] up a little:
        - split out dfa in its own generic class
@@ -468,6 +458,10 @@ Later:
 
 DONE:
 
+* Make sure sysprof-text is not linked to gtk+
+
+* Consider renaming profiler.[ch] to collector.[ch]
+
 * Crash reported by Rudi Chiarito with n_addrs == 0.
 
 * Find out what distributions it actually works on
index e53991f..db5b721 100644 (file)
@@ -78,10 +78,14 @@ if test $kernel_module = "yes"; then
 fi
 
 # Pkgconfig dependencies
-       
-dep_modules="gtk+-2.0 > 2.6.0 gthread-2.0 gdk-pixbuf-2.0 pangoft2 libglade-2.0"
 
-PKG_CHECK_MODULES(DEP, $dep_modules, [],
+core_dep="glib-2.0"
+gui_dep="gtk+-2.0 > 2.6.0 gdk-pixbuf-2.0 pangoft2 libglade-2.0"
+
+PKG_CHECK_MODULES(CORE_DEP, $core_dep, [],
+                 AC_MSG_ERROR([sysprof dependencies not satisfied]))
+
+PKG_CHECK_MODULES(GUI_DEP, $gui_dep, [],
                  AC_MSG_ERROR([sysprof dependencies not satisfied]))
 
 # libiberty and libbfd
@@ -90,14 +94,17 @@ AC_CHECK_LIB(iberty, cplus_demangle,:,
   AC_CHECK_LIB(iberty, cplus_demangle_opname, [],
     AC_MSG_ERROR([libiberty is required to compile sysprof]), -ldl))
 
-AC_CHECK_LIB(bfd, bfd_get_error, [DEP_LIBS="$DEP_LIBS -lbfd -liberty"],
+AC_CHECK_LIB(bfd, bfd_get_error,,
   AC_MSG_ERROR([libbfd is required to compile sysprof]),
   -liberty)
 
+CORE_DEP_LIBS="$CORE_DEP_LIBS -lbfd -liberty"
+GUI_DEP_LIBS="$GUI_DEP_LIBS -lbfd -liberty"
 
 # emit files
 
-AC_SUBST(DEP_LIBS)
+AC_SUBST(CORE_DEP_LIBS)
+AC_SUBST(GUI_DEP_LIBS)
 AC_SUBST(MODULE_SUBDIR)
 
 AC_CONFIG_FILES([