--- /dev/null
+#!/bin/sh
+
+echo "Rebuilding build system......"
+
+autoreconf --version 2>&1 > /dev/null 2>&1
+
+if [ $? -eq 0 ]; then
+ AUTORECONF=autoreconf
+else
+ AUTORECONF=
+fi
+
+error() {
+ echo "Missing tool: $1"
+ echo "Cannot proceed until the missing tool is available"
+ exit 1
+}
+
+if [ ! -z ${AUTORECONF} ]; then
+ echo "Using autoreconf to rebuild build system"
+ autoreconf --force --install --symlink
+else
+ echo "No autoreconf found. Using plain old tools to rebuild build system"
+ libtoolize --automake --force || error libtoolize
+ aclocal -I m4|| error aclocal
+ autoheader --force || error autoheader
+ automake --add-missing --force-missing --gnu || error automake
+ autoconf --force || error autoconf
+fi
+./configure --enable-maintainer-mode $*
+
+exit 0
--- /dev/null
+AUTOMAKE_OPTIONS = gnu
+
+AM_CPPFLAGS = \
+ @GLIB_CFLAGS@ \
+ @CURL_CFLAGS@ \
+ -I$(top_srcdir) -I$(top_builddir) \
+ -I$(top_srcdir)/src -I$(top_builddir)/src
+
+lib_LTLIBRARIES = libcaldav.la
+
+libcaldav_la_SOURCES = \
+ caldav.c \
+ curllib.c
+
+nodist_include_HEADERS = \
+ globals.h \
+ curllib.h
+
+libcaldavincludedir = $(pkgincludedir)
+libcaldavinclude_HEADERS = \
+ caldav.h
+
+libcaldav_la_LDFLAGS = \
+ -version-info @LIBVERSION@
+
+libcaldav_la_LIBADD = \
+ $(GLIB_LIBS) \
+ @CURL_LIBS@