+# Copyright (C) 2009 Nick Bowler
+# Copying and distribution of this file, with or without modification,
+# are permitted in any medium without royalty provided the copyright
+# notice and this notice are preserved. This file is offered as-is,
+# without any warranty.
+
ACLOCAL_AMFLAGS = -I m4
-lib_LTLIBRARIES = libupkg.la
-bin_PROGRAMS = upkg
+EXTRA_DIST = m4/gnulib-cache.m4
+
+dist_man_MANS = doc/man/upkg.1
+
+DIST_SUBDIRS = libltdl lib src
+SUBDIRS = lib
-libupkg_la_SOURCES = libupkg.c pack.c
-include_HEADERS = upkg.h
-noinst_HEADERS = pack.h
+if BUNDLED_LIBLTDL
+SUBDIRS += libltdl
+endif
-upkg_SOURCES = upkg.c
-upkg_LDADD = libupkg.la
+SUBDIRS += src