--- /dev/null
+David Henningsson <david.henningsson@canonical.com>
--- /dev/null
+For news and changelog, refer to git repository history. This file is only present because autotools requires it.
+++ /dev/null
-SOURCES = main-gtk.c sysfs-pin-configs.c apply-changes.c
-
-build:
- $(shell sed 's/\\/\\\\/g;s/"/\\"/g;s/^/"/;s/$$/\\n"/;' < README > README.generated.h)
- gcc -g -O0 -Wall -o hda-jack-retask $(SOURCES) $(shell pkg-config --cflags --libs gtk+-3.0)
-
-clean:
- -rm hda-jack-retask
- -rm README.generated.h
-
-install:
- install -Dm755 hda-jack-retask $(DESTDIR)/usr/bin/hda-jack-retask
- install -Dm644 README $(DESTDIR)/usr/share/doc/hda-jack-retask/README
-
-uninstall:
- -rm $(DESTDIR)/usr/bin/hda-jack-retask
-
-.PHONY: build install uninstall
--- /dev/null
+EXTRA_DIST = gitcompile README
+AM_CFLAGS = @GTK3_CFLAGS@
+bin_PROGRAMS = hdajackretask
+man_MANS =
+hdajackretask_SOURCES = main-gtk.c sysfs-pin-configs.c apply-changes.c
+hdajackretask_LDADD = @GTK3_LIBS@
+
+BUILT_SOURCES = README.generated.h
+nodist_hdajackretask_SOURCES = README.generated.h
+CLEANFILES = README.generated.h
+
+README.generated.h:
+ sed 's/\\/\\\\/g;s/"/\\"/g;s/^/"/;s/$$/\\n"/;' README >$@
+
+alsa-dist: distdir
+ @rm -rf ../distdir/hdajackretask
+ @mkdir -p ../distdir/hdajackretask
+ @cp -RLpv $(distdir)/* ../distdir/hdajackretask
+ @rm -rf $(distdir)
+
--- /dev/null
+For news and changelog, refer to git repository history. This file is only present because autotools requires it.
--- /dev/null
+AC_INIT([hdajackretask], [0.20120413])
+AC_CONFIG_SRCDIR([main-gtk.c])
+AM_INIT_AUTOMAKE
+AC_PROG_CC
+AC_PROG_INSTALL
+AC_HEADER_STDC
+
+PKG_CHECK_MODULES(GTK3, gtk+-3.0)
+
+AC_OUTPUT(Makefile)
-#!/bin/sh
+#!/bin/bash
-make GITCOMPILE_ARGS="$*"
+if test -z "$AUTOMAKE_DIR"; then
+ if test -d /usr/local/share/automake; then
+ AUTOMAKE_DIR=/usr/local/share/automake
+ fi
+ if test -d /usr/share/automake; then
+ AUTOMAKE_DIR="/usr/share/automake"
+ fi
+ if test -z "$AUTOMAKE_DIR"; then
+ AUTOMAKE_DIR=/usr/share/`ls /usr/share | grep automake | tail -n 1`
+ fi
+fi
+
+for f in install-sh mkinstalldirs missing; do
+ cp -av $AUTOMAKE_DIR/$f . || exit 1
+done
+
+aclocal $ACLOCAL_FLAGS || exit 1
+automake --add-missing --copy || exit 1
+touch depcomp || exit 1
+autoconf || exit 1
+export CFLAGS='-O2 -Wall -pipe -g'
+echo "CFLAGS=$CFLAGS"
+echo "./configure $@"
+./configure $@ || exit 1
+unset CFLAGS
+if [ -z "$GITCOMPILE_NO_MAKE" ]; then
+ make || exit 1
+fi