changeset 1918:55af06da5523

merge in recent changes from main repo
author corvid <corvid@lavabit.com>
date Fri, 25 Feb 2011 08:37:13 +0000
parents d3689f044909 (current diff) ab62ebbd29ba (diff)
children e920355164cf a5176865375c
files configure.in dpi/downloads.cc
diffstat 14 files changed, 267 insertions(+), 211 deletions(-) [+]
line wrap: on
line diff
--- a/.hgignore	Fri Feb 25 07:22:30 2011 +0000
+++ b/.hgignore	Fri Feb 25 08:37:13 2011 +0000
@@ -16,7 +16,6 @@
 ^missing$
 (^|/)tags$
 ^src/dillo$
-^d_size\.h$
 ^dpi/[^/]*\.dpi$
 ^dpid/dpid$
 ^dpid/dpidc$
--- a/Makefile.am	Fri Feb 25 07:22:30 2011 +0000
+++ b/Makefile.am	Fri Feb 25 08:37:13 2011 +0000
@@ -1,5 +1,5 @@
 SUBDIRS = lout dw dlib dpip src doc dpid dpi test
 
-EXTRA_DIST = Doxyfile dillorc install-dpi-local
+EXTRA_DIST = Doxyfile dillorc install-dpi-local d_size.h
 
 sysconf_DATA = dillorc
--- a/config.h.in	Fri Feb 25 07:22:30 2011 +0000
+++ b/config.h.in	Fri Feb 25 08:37:13 2011 +0000
@@ -105,8 +105,29 @@
 /* Version number of package */
 #undef VERSION
 
+/* Define for Solaris 2.5.1 so the uint32_t typedef from <sys/synch.h>,
+   <pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
+   #define below would cause a syntax error. */
+#undef _UINT32_T
+
 /* Use char pointers for newer libiconv */
 #undef inbuf_t
 
+/* Define to the type of a signed integer type of width exactly 16 bits if
+   such a type exists and the standard includes do not define it. */
+#undef int16_t
+
+/* Define to the type of a signed integer type of width exactly 32 bits if
+   such a type exists and the standard includes do not define it. */
+#undef int32_t
+
 /* Define the real type of socklen_t */
 #undef socklen_t
+
+/* Define to the type of an unsigned integer type of width exactly 16 bits if
+   such a type exists and the standard includes do not define it. */
+#undef uint16_t
+
+/* Define to the type of an unsigned integer type of width exactly 32 bits if
+   such a type exists and the standard includes do not define it. */
+#undef uint32_t
--- a/configure.in	Fri Feb 25 07:22:30 2011 +0000
+++ b/configure.in	Fri Feb 25 08:37:13 2011 +0000
@@ -53,43 +53,10 @@
 AC_CHECK_SIZEOF(int)     
 AC_CHECK_SIZEOF(void *)
 
-case 2 in
-$ac_cv_sizeof_short)            gint16=short;;
-$ac_cv_sizeof_int)              gint16=int;;
-esac
-case 4 in
-$ac_cv_sizeof_short)            gint32=short;;
-$ac_cv_sizeof_int)              gint32=int;;
-$ac_cv_sizeof_long)             gint32=long;;
-esac
-
-cat >d_size.h <<_______EOF
-#ifndef __D_SIZE_H__
-#define __D_SIZE_H__
-
-
-#include "config.h"
-
-#if HAVE_STDINT_H == 0
-#include <stdint.h>
-#elif defined(HAVE_INTTYPES_H)
-#include <inttypes.h>
-#else
-typedef signed $gint16    int16_t;
-typedef unsigned $gint16  uint16_t;
-typedef signed $gint32      int32_t;
-typedef unsigned $gint32    uint32_t;
-#endif
-typedef unsigned char   uchar_t;
-typedef unsigned short  ushort_t;
-typedef unsigned long   ulong_t;
-typedef unsigned int    uint_t; 
-typedef unsigned char   bool_t;
-
-
-#endif /* __D_SIZE_H__ */
-_______EOF
-
+AC_TYPE_INT16_T
+AC_TYPE_UINT16_T
+AC_TYPE_INT32_T
+AC_TYPE_UINT32_T
 
 dnl --------------------------------------
 dnl Check whether to add /usr/local or not
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/d_size.h	Fri Feb 25 08:37:13 2011 +0000
@@ -0,0 +1,24 @@
+#ifndef __D_SIZE_H__
+#define __D_SIZE_H__
+
+
+#include "config.h"
+
+#ifdef HAVE_STDINT_H
+#include <stdint.h>
+#else
+#ifdef HAVE_INTTYPES_H
+#include <inttypes.h>
+#else
+/* config.h defines {int,uint}*_t */
+#endif /* HAVE_INTTYPES_H */
+#endif /*HAVE_STDINT_H */
+
+typedef unsigned char   uchar_t;
+typedef unsigned short  ushort_t;
+typedef unsigned long   ulong_t;
+typedef unsigned int    uint_t;
+typedef unsigned char   bool_t;
+
+
+#endif /* __D_SIZE_H__ */
--- a/dlib/Makefile.am	Fri Feb 25 07:22:30 2011 +0000
+++ b/dlib/Makefile.am	Fri Feb 25 08:37:13 2011 +0000
@@ -1,3 +1,6 @@
+AM_CPPFLAGS = \
+	-I$(top_srcdir)
+
 noinst_LIBRARIES = libDlib.a
 
 libDlib_a_SOURCES = \
--- a/dpi/Makefile.am	Fri Feb 25 07:22:30 2011 +0000
+++ b/dpi/Makefile.am	Fri Feb 25 08:37:13 2011 +0000
@@ -1,3 +1,6 @@
+AM_CPPFLAGS = \
+	-I$(top_srcdir)
+
 bookmarksdir = $(libdir)/dillo/dpi/bookmarks
 downloadsdir = $(libdir)/dillo/dpi/downloads
 ftpdir = $(libdir)/dillo/dpi/ftp
@@ -17,15 +20,33 @@
 cookies_PROGRAMS = cookies.dpi
 datauri_PROGRAMS = datauri.filter.dpi
 
-bookmarks_dpi_LDADD = ../dpip/libDpip.a ../dlib/libDlib.a
-downloads_dpi_LDADD = @LIBFLTK_LIBS@ ../dpip/libDpip.a ../dlib/libDlib.a
-ftp_filter_dpi_LDADD = ../dpip/libDpip.a ../dlib/libDlib.a
-https_filter_dpi_LDADD = @LIBSSL_LIBS@ ../dpip/libDpip.a ../dlib/libDlib.a
-hello_filter_dpi_LDADD = ../dpip/libDpip.a ../dlib/libDlib.a
-vsource_filter_dpi_LDADD = ../dpip/libDpip.a ../dlib/libDlib.a
-file_dpi_LDADD = ../dpip/libDpip.a ../dlib/libDlib.a
-cookies_dpi_LDADD = ../dpip/libDpip.a ../dlib/libDlib.a
-datauri_filter_dpi_LDADD = ../dpip/libDpip.a ../dlib/libDlib.a
+bookmarks_dpi_LDADD = \
+	$(top_builddir)/dpip/libDpip.a \
+	$(top_builddir)/dlib/libDlib.a
+downloads_dpi_LDADD = @LIBFLTK_LIBS@ \
+	$(top_builddir)/dpip/libDpip.a \
+	$(top_builddir)/dlib/libDlib.a
+ftp_filter_dpi_LDADD = \
+	$(top_builddir)/dpip/libDpip.a \
+	$(top_builddir)/dlib/libDlib.a
+https_filter_dpi_LDADD = @LIBSSL_LIBS@ \
+	$(top_builddir)/dpip/libDpip.a \
+	$(top_builddir)/dlib/libDlib.a
+hello_filter_dpi_LDADD = \
+	$(top_builddir)/dpip/libDpip.a \
+	$(top_builddir)/dlib/libDlib.a
+vsource_filter_dpi_LDADD = \
+	$(top_builddir)/dpip/libDpip.a \
+	$(top_builddir)/dlib/libDlib.a
+file_dpi_LDADD = \
+	$(top_builddir)/dpip/libDpip.a \
+	$(top_builddir)/dlib/libDlib.a
+cookies_dpi_LDADD = \
+	$(top_builddir)/dpip/libDpip.a \
+	$(top_builddir)/dlib/libDlib.a
+datauri_filter_dpi_LDADD = \
+	$(top_builddir)/dpip/libDpip.a \
+	$(top_builddir)/dlib/libDlib.a
 
 downloads_dpi_CXXFLAGS = @LIBFLTK_CXXFLAGS@
 
--- a/dpi/downloads.cc	Fri Feb 25 07:22:30 2011 +0000
+++ b/dpi/downloads.cc	Fri Feb 25 08:37:13 2011 +0000
@@ -70,33 +70,33 @@
 // class FL_API ProgressBar : public Fl_Widget {
 class ProgressBar : public Fl_Widget {
 protected:
-  double mMin;
-  double mMax;
-  double mPresent;
-  double mStep;
-  bool mShowPct, mShowMsg;
-  char mMsg[64];
-  Fl_Color mTextColor;
-  void draw();
+   double mMin;
+   double mMax;
+   double mPresent;
+   double mStep;
+   bool mShowPct, mShowMsg;
+   char mMsg[64];
+   Fl_Color mTextColor;
+   void draw();
 public:
-  ProgressBar(int x, int y, int w, int h, const char *lbl = 0);
-  void range(double min, double max, double step = 1)  {
-     mMin = min; mMax = max; mStep = step;
-  };
-  void step(double step)        { mPresent += step; redraw(); };
-  void move(double step);
-  double minimum()        { return mMin; }
-  double maximum()        { return mMax; }
-  void minimum(double nm) { mMin = nm; };
-  void maximum(double nm) { mMax = nm; };
-  double position  ()     { return mPresent; }
-  double step()           { return mStep; }
-  void position(double pos)     { mPresent = pos; redraw(); }
-  void showtext(bool st)        { mShowPct = st; }
-  void message(char *msg) { mShowMsg = true; strncpy(mMsg,msg,63); redraw(); }
-  bool showtext()               { return mShowPct; }
-  void text_color(Fl_Color col) { mTextColor = col; }
-  Fl_Color text_color()    { return mTextColor; }
+   ProgressBar(int x, int y, int w, int h, const char *lbl = 0);
+   void range(double min, double max, double step = 1)  {
+      mMin = min; mMax = max; mStep = step;
+   };
+   void step(double step)        { mPresent += step; redraw(); };
+   void move(double step);
+   double minimum()        { return mMin; }
+   double maximum()        { return mMax; }
+   void minimum(double nm) { mMin = nm; };
+   void maximum(double nm) { mMax = nm; };
+   double position  ()     { return mPresent; }
+   double step()           { return mStep; }
+   void position(double pos)     { mPresent = pos; redraw(); }
+   void showtext(bool st)        { mShowPct = st; }
+   void message(char *msg) { mShowMsg = true; strncpy(mMsg,msg,63); redraw(); }
+   bool showtext()               { return mShowPct; }
+   void text_color(Fl_Color col) { mTextColor = col; }
+   Fl_Color text_color()   { return mTextColor; }
 };
 
 // Download-item class -------------------------------------------------------
@@ -309,6 +309,8 @@
    // Init value. Reset later, upon the first data bytes arrival
    init_time = time(NULL);
 
+   twosec_time = onesec_time = init_time;
+
    // BUG:? test a URL with ' inside.
    /* escape "'" character for the shell. Is it necessary? */
    esc_url = Escape_uri_str(url, "'");
@@ -340,72 +342,72 @@
    gw = 400, gh = 70;
    group = new Fl_Group(0,0,gw,gh);
    group->begin();
-    prTitle = new Fl_Box(24, 7, 290, 23, shortname);
-    prTitle->box(FL_RSHADOW_BOX);
-    prTitle->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE|FL_ALIGN_CLIP);
-    //prTitle->clear_flag (SHORTCUT_LABEL);
-    // Attach this 'log_text' to the tooltip
-    log_text_add("Target File: ", 13);
-    log_text_add(fullname, strlen(fullname));
-    log_text_add("\n\n", 2);
-
-    prBar = new ProgressBar(24, 40, 92, 20);
-    prBar->box(FL_BORDER_BOX); // ENGRAVED_BOX
-    prBar->tooltip("Progress Status");
-
-    int ix = 122, iy = 36, iw = 50, ih = 14;
-    Fl_Widget *o = new Fl_Box(ix,iy,iw,ih, "Got");
-    o->box(FL_RFLAT_BOX);
-    o->color((Fl_Color)0xc0c0c000);
-    o->tooltip("Downloaded Size");
-    prGot = new Fl_Box(ix,iy+14,iw,ih, "0KB");
-    prGot->align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE);
-    prGot->labelcolor((Fl_Color)0x6c6cbd00);
-    prGot->box(FL_NO_BOX);
-
-    ix += iw;
-    o = new Fl_Box(ix,iy,iw,ih, "Size");
-    o->box(FL_RFLAT_BOX);
-    o->color((Fl_Color)0xc0c0c000);
-    o->tooltip("Total Size");
-    prSize = new Fl_Box(ix,iy+14,iw,ih, "??");
-    prSize->align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE);
-    prSize->box(FL_NO_BOX);
+   prTitle = new Fl_Box(24, 7, 290, 23, shortname);
+   prTitle->box(FL_RSHADOW_BOX);
+   prTitle->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE|FL_ALIGN_CLIP);
+   //prTitle->clear_flag (SHORTCUT_LABEL);
+   // Attach this 'log_text' to the tooltip
+   log_text_add("Target File: ", 13);
+   log_text_add(fullname, strlen(fullname));
+   log_text_add("\n\n", 2);
 
-    ix += iw;
-    o = new Fl_Box(ix,iy,iw,ih, "Rate");
-    o->box(FL_RFLAT_BOX);
-    o->color((Fl_Color)0xc0c0c000);
-    o->tooltip("Current transfer Rate (KBytes/sec)");
-    prRate = new Fl_Box(ix,iy+14,iw,ih, "??");
-    prRate->align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE);
-    prRate->box(FL_NO_BOX);
+   prBar = new ProgressBar(24, 40, 92, 20);
+   prBar->box(FL_BORDER_BOX); // ENGRAVED_BOX
+   prBar->tooltip("Progress Status");
 
-    ix += iw;
-    o = new Fl_Box(ix,iy,iw,ih, "~Rate");
-    o->box(FL_RFLAT_BOX);
-    o->color((Fl_Color)0xc0c0c000);
-    o->tooltip("Average transfer Rate (KBytes/sec)");
-    pr_Rate = new Fl_Box(ix,iy+14,iw,ih, "??");
-    pr_Rate->align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE);
-    pr_Rate->box(FL_NO_BOX);
+   int ix = 122, iy = 36, iw = 50, ih = 14;
+   Fl_Widget *o = new Fl_Box(ix,iy,iw,ih, "Got");
+   o->box(FL_RFLAT_BOX);
+   o->color((Fl_Color)0xc0c0c000);
+   o->tooltip("Downloaded Size");
+   prGot = new Fl_Box(ix,iy+14,iw,ih, "0KB");
+   prGot->align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE);
+   prGot->labelcolor((Fl_Color)0x6c6cbd00);
+   prGot->box(FL_NO_BOX);
 
-    ix += iw;
-    prETAt = o = new Fl_Box(ix,iy,iw,ih, "ETA");
-    o->box(FL_RFLAT_BOX);
-    o->color((Fl_Color)0xc0c0c000);
-    o->tooltip("Estimated Time of Arrival");
-    prETA = new Fl_Box(ix,iy+14,iw,ih, "??");
-    prETA->align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE);
-    prETA->box(FL_NO_BOX);
+   ix += iw;
+   o = new Fl_Box(ix,iy,iw,ih, "Size");
+   o->box(FL_RFLAT_BOX);
+   o->color((Fl_Color)0xc0c0c000);
+   o->tooltip("Total Size");
+   prSize = new Fl_Box(ix,iy+14,iw,ih, "??");
+   prSize->align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE);
+   prSize->box(FL_NO_BOX);
 
-    //ix += 50;
-    //prButton = new Fl_Button(ix, 41, 38, 19, "Stop");
-    prButton = new Fl_Button(328, 9, 38, 19, "Stop");
-    prButton->tooltip("Stop this transfer");
-    prButton->box(FL_UP_BOX);
-    prButton->clear_visible_focus();
-    prButton->callback(prButton_scb, this);
+   ix += iw;
+   o = new Fl_Box(ix,iy,iw,ih, "Rate");
+   o->box(FL_RFLAT_BOX);
+   o->color((Fl_Color)0xc0c0c000);
+   o->tooltip("Current transfer Rate (KBytes/sec)");
+   prRate = new Fl_Box(ix,iy+14,iw,ih, "??");
+   prRate->align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE);
+   prRate->box(FL_NO_BOX);
+
+   ix += iw;
+   o = new Fl_Box(ix,iy,iw,ih, "~Rate");
+   o->box(FL_RFLAT_BOX);
+   o->color((Fl_Color)0xc0c0c000);
+   o->tooltip("Average transfer Rate (KBytes/sec)");
+   pr_Rate = new Fl_Box(ix,iy+14,iw,ih, "??");
+   pr_Rate->align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE);
+   pr_Rate->box(FL_NO_BOX);
+
+   ix += iw;
+   prETAt = o = new Fl_Box(ix,iy,iw,ih, "ETA");
+   o->box(FL_RFLAT_BOX);
+   o->color((Fl_Color)0xc0c0c000);
+   o->tooltip("Estimated Time of Arrival");
+   prETA = new Fl_Box(ix,iy+14,iw,ih, "??");
+   prETA->align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE);
+   prETA->box(FL_NO_BOX);
+
+   //ix += 50;
+   //prButton = new Fl_Button(ix, 41, 38, 19, "Stop");
+   prButton = new Fl_Button(328, 9, 38, 19, "Stop");
+   prButton->tooltip("Stop this transfer");
+   prButton->box(FL_UP_BOX);
+   prButton->clear_visible_focus();
+   prButton->callback(prButton_scb, this);
 
    group->box(FL_ROUND_UP_BOX);
    group->end();
@@ -1069,13 +1071,13 @@
    // Create the empty main window
    mWin = new Fl_Window(ww, wh, "Downloads:");
    mWin->begin();
-    mScroll = new Fl_Scroll(0,0,ww,wh);
-    mScroll->begin();
-     mPG = new Fl_Pack(0,0,ww,wh);
-     mPG->end();
-     //mPG->spacing(10);
-    mScroll->end();
-    mScroll->type(Fl_Scroll::VERTICAL);
+   mScroll = new Fl_Scroll(0,0,ww,wh);
+   mScroll->begin();
+   mPG = new Fl_Pack(0,0,ww,wh);
+   mPG->end();
+   //mPG->spacing(10);
+   mScroll->end();
+   mScroll->type(Fl_Scroll::VERTICAL);
    mWin->end();
    mWin->resizable(mScroll);
    mWin->callback(dlwin_esc_cb, NULL);
--- a/dpid/Makefile.am	Fri Feb 25 07:22:30 2011 +0000
+++ b/dpid/Makefile.am	Fri Feb 25 08:37:13 2011 +0000
@@ -1,8 +1,14 @@
-AM_CPPFLAGS=-DDPIDRC_SYS='"$(sysconfdir)/dpidrc"'
+AM_CPPFLAGS = \
+	-I$(top_srcdir) \
+	-DDPIDRC_SYS='"$(sysconfdir)/dpidrc"'
 
 bin_PROGRAMS = dpid dpidc
-dpid_LDADD = ../dpip/libDpip.a ../dlib/libDlib.a
-dpidc_LDADD = ../dpip/libDpip.a ../dlib/libDlib.a
+dpid_LDADD = \
+	$(top_builddir)/dpip/libDpip.a \
+	$(top_builddir)/dlib/libDlib.a
+dpidc_LDADD = \
+	$(top_builddir)/dpip/libDpip.a \
+	$(top_builddir)/dlib/libDlib.a
 
 EXTRA_DIST = dpidrc.in
 
--- a/dpip/Makefile.am	Fri Feb 25 07:22:30 2011 +0000
+++ b/dpip/Makefile.am	Fri Feb 25 08:37:13 2011 +0000
@@ -1,3 +1,6 @@
+AM_CPPFLAGS = \
+	-I$(top_srcdir)
+
 noinst_LIBRARIES = libDpip.a
 
 libDpip_a_SOURCES = \
--- a/dw/Makefile.am	Fri Feb 25 07:22:30 2011 +0000
+++ b/dw/Makefile.am	Fri Feb 25 08:37:13 2011 +0000
@@ -1,3 +1,6 @@
+AM_CPPFLAGS = \
+	-I$(top_srcdir)
+
 noinst_LIBRARIES = \
 	libDw-core.a \
 	libDw-fltk.a \
--- a/lout/Makefile.am	Fri Feb 25 07:22:30 2011 +0000
+++ b/lout/Makefile.am	Fri Feb 25 08:37:13 2011 +0000
@@ -1,3 +1,6 @@
+AM_CPPFLAGS = \
+	-I$(top_srcdir)
+
 noinst_LIBRARIES = liblout.a
 
 liblout_a_SOURCES = \
--- a/src/IO/Makefile.am	Fri Feb 25 07:22:30 2011 +0000
+++ b/src/IO/Makefile.am	Fri Feb 25 08:37:13 2011 +0000
@@ -1,4 +1,6 @@
-AM_CPPFLAGS=-DDILLO_BINDIR='"$(bindir)/"'
+AM_CPPFLAGS = \
+	-I$(top_srcdir) \
+	-DDILLO_BINDIR='"$(bindir)/"'
 AM_CFLAGS = @LIBFLTK_CFLAGS@
 AM_CXXFLAGS = @LIBFLTK_CXXFLAGS@
 
--- a/test/Makefile.am	Fri Feb 25 07:22:30 2011 +0000
+++ b/test/Makefile.am	Fri Feb 25 08:37:13 2011 +0000
@@ -1,3 +1,5 @@
+AM_CPPFLAGS = \
+	-I$(top_srcdir)
 AM_CFLAGS = @LIBFLTK_CFLAGS@
 AM_CXXFLAGS = @LIBFLTK_CXXFLAGS@
 
@@ -23,115 +25,115 @@
 
 dw_anchors_test_SOURCES = dw_anchors_test.cc
 dw_anchors_test_LDADD = \
-	../dw/libDw-widgets.a \
-	../dw/libDw-fltk.a \
-	../dw/libDw-core.a \
-	../lout/liblout.a \
+	$(top_builddir)/dw/libDw-widgets.a \
+	$(top_builddir)/dw/libDw-fltk.a \
+	$(top_builddir)/dw/libDw-core.a \
+	$(top_builddir)/lout/liblout.a \
 	@LIBFLTK_LIBS@
 
 dw_example_SOURCES = dw_example.cc
 dw_example_LDADD = \
-	../dw/libDw-widgets.a \
-	../dw/libDw-fltk.a \
-	../dw/libDw-core.a \
-	../lout/liblout.a \
+	$(top_builddir)/dw/libDw-widgets.a \
+	$(top_builddir)/dw/libDw-fltk.a \
+	$(top_builddir)/dw/libDw-core.a \
+	$(top_builddir)/lout/liblout.a \
 	@LIBFLTK_LIBS@
 
 dw_find_test_SOURCES = dw_find_test.cc
 dw_find_test_LDADD = \
-	../dw/libDw-widgets.a \
-	../dw/libDw-fltk.a \
-	../dw/libDw-core.a \
-	../lout/liblout.a \
+	$(top_builddir)/dw/libDw-widgets.a \
+	$(top_builddir)/dw/libDw-fltk.a \
+	$(top_builddir)/dw/libDw-core.a \
+	$(top_builddir)/lout/liblout.a \
 	@LIBFLTK_LIBS@
 
 dw_links_SOURCES = dw_links.cc
 dw_links_LDADD = \
-	../dw/libDw-widgets.a \
-	../dw/libDw-fltk.a \
-	../dw/libDw-core.a \
-	../lout/liblout.a \
+	$(top_builddir)/dw/libDw-widgets.a \
+	$(top_builddir)/dw/libDw-fltk.a \
+	$(top_builddir)/dw/libDw-core.a \
+	$(top_builddir)/lout/liblout.a \
 	@LIBFLTK_LIBS@
 
 dw_links2_SOURCES = dw_links2.cc
 dw_links2_LDADD = \
-	../dw/libDw-widgets.a \
-	../dw/libDw-fltk.a \
-	../dw/libDw-core.a \
-	../lout/liblout.a \
+	$(top_builddir)/dw/libDw-widgets.a \
+	$(top_builddir)/dw/libDw-fltk.a \
+	$(top_builddir)/dw/libDw-core.a \
+	$(top_builddir)/lout/liblout.a \
 	@LIBFLTK_LIBS@
 
 dw_images_simple_SOURCES = dw_images_simple.cc
 dw_images_simple_LDADD = \
-	../dw/libDw-widgets.a \
-	../dw/libDw-fltk.a \
-	../dw/libDw-core.a \
-	../lout/liblout.a \
+	$(top_builddir)/dw/libDw-widgets.a \
+	$(top_builddir)/dw/libDw-fltk.a \
+	$(top_builddir)/dw/libDw-core.a \
+	$(top_builddir)/lout/liblout.a \
 	@LIBFLTK_LIBS@
 
 dw_images_scaled_SOURCES = dw_images_scaled.cc
 dw_images_scaled_LDADD = \
-	../dw/libDw-widgets.a \
-	../dw/libDw-fltk.a \
-	../dw/libDw-core.a \
-	../lout/liblout.a \
+	$(top_builddir)/dw/libDw-widgets.a \
+	$(top_builddir)/dw/libDw-fltk.a \
+	$(top_builddir)/dw/libDw-core.a \
+	$(top_builddir)/lout/liblout.a \
 	@LIBFLTK_LIBS@
 
 dw_images_scaled2_SOURCES = dw_images_scaled2.cc
 dw_images_scaled2_LDADD = \
-	../dw/libDw-widgets.a \
-	../dw/libDw-fltk.a \
-	../dw/libDw-core.a \
-	../lout/liblout.a \
+	$(top_builddir)/dw/libDw-widgets.a \
+	$(top_builddir)/dw/libDw-fltk.a \
+	$(top_builddir)/dw/libDw-core.a \
+	$(top_builddir)/lout/liblout.a \
 	@LIBFLTK_LIBS@
 
 dw_lists_SOURCES = dw_lists.cc
 dw_lists_LDADD = \
-	../dw/libDw-widgets.a \
-	../dw/libDw-fltk.a \
-	../dw/libDw-core.a \
-	../lout/liblout.a \
+	$(top_builddir)/dw/libDw-widgets.a \
+	$(top_builddir)/dw/libDw-fltk.a \
+	$(top_builddir)/dw/libDw-core.a \
+	$(top_builddir)/lout/liblout.a \
 	@LIBFLTK_LIBS@
 
 dw_table_aligned_SOURCES = dw_table_aligned.cc
 dw_table_aligned_LDADD = \
-	../dw/libDw-widgets.a \
-	../dw/libDw-fltk.a \
-	../dw/libDw-core.a \
-	../lout/liblout.a \
+	$(top_builddir)/dw/libDw-widgets.a \
+	$(top_builddir)/dw/libDw-fltk.a \
+	$(top_builddir)/dw/libDw-core.a \
+	$(top_builddir)/lout/liblout.a \
 	@LIBFLTK_LIBS@
 
 dw_table_SOURCES = dw_table.cc
 dw_table_LDADD = \
-	../dw/libDw-widgets.a \
-	../dw/libDw-fltk.a \
-	../dw/libDw-core.a \
-	../lout/liblout.a \
+	$(top_builddir)/dw/libDw-widgets.a \
+	$(top_builddir)/dw/libDw-fltk.a \
+	$(top_builddir)/dw/libDw-core.a \
+	$(top_builddir)/lout/liblout.a \
 	@LIBFLTK_LIBS@
 
 dw_border_test_SOURCES = dw_border_test.cc
 dw_border_test_LDADD = \
-	../dw/libDw-widgets.a \
-	../dw/libDw-fltk.a \
-	../dw/libDw-core.a \
-	../lout/liblout.a \
+	$(top_builddir)/dw/libDw-widgets.a \
+	$(top_builddir)/dw/libDw-fltk.a \
+	$(top_builddir)/dw/libDw-core.a \
+	$(top_builddir)/lout/liblout.a \
 	@LIBFLTK_LIBS@
 
 
 dw_imgbuf_mem_test_SOURCES = dw_imgbuf_mem_test.cc
 dw_imgbuf_mem_test_LDADD = \
-	../dw/libDw-widgets.a \
-	../dw/libDw-fltk.a \
-	../dw/libDw-core.a \
-	../lout/liblout.a \
+	$(top_builddir)/dw/libDw-widgets.a \
+	$(top_builddir)/dw/libDw-fltk.a \
+	$(top_builddir)/dw/libDw-core.a \
+	$(top_builddir)/lout/liblout.a \
 	@LIBFLTK_LIBS@
 
 dw_resource_test_SOURCES = dw_resource_test.cc
 dw_resource_test_LDADD = \
-	../dw/libDw-widgets.a \
-	../dw/libDw-fltk.a \
-	../dw/libDw-core.a \
-	../lout/liblout.a \
+	$(top_builddir)/dw/libDw-widgets.a \
+	$(top_builddir)/dw/libDw-fltk.a \
+	$(top_builddir)/dw/libDw-core.a \
+	$(top_builddir)/lout/liblout.a \
 	@LIBFLTK_LIBS@
 
 dw_ui_test_SOURCES = \
@@ -139,10 +141,10 @@
 	form.cc \
 	form.hh
 dw_ui_test_LDADD = \
-	../dw/libDw-widgets.a \
-	../dw/libDw-fltk.a \
-	../dw/libDw-core.a \
-	../lout/liblout.a \
+	$(top_builddir)/dw/libDw-widgets.a \
+	$(top_builddir)/dw/libDw-fltk.a \
+	$(top_builddir)/dw/libDw-core.a \
+	$(top_builddir)/lout/liblout.a \
 	@LIBFLTK_LIBS@
 
 fltk_browser_SOURCES = fltk_browser.cc
@@ -150,10 +152,10 @@
 
 shapes_SOURCES = shapes.cc
 shapes_LDADD = \
-	../dw/libDw-core.a \
-	../lout/liblout.a
+	$(top_builddir)/dw/libDw-core.a \
+	$(top_builddir)/lout/liblout.a
 
 cookies_SOURCES = cookies.c
 cookies_LDADD = \
-	../dpip/libDpip.a \
-	../dlib/libDlib.a
+	$(top_builddir)/dpip/libDpip.a \
+	$(top_builddir)/dlib/libDlib.a