-AC_INIT(stopish, 1.0)
-AC_CONFIG_SRCDIR(Makefile.am)
-AM_INIT_AUTOMAKE
+AC_INIT(Makefile.am)
+AM_INIT_AUTOMAKE(stopish, 0.9)
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_LIBTOOL
+# Option to enable debugging
+AC_ARG_ENABLE(debug,
+ [AC_HELP_STRING([ --enable-debug],[Debugging (default=no)])],
+ [with_debug=yes], [with_debug=no])
+
+if test "x$with_debug" == "xyes" ; then
+ CFLAGS="$CFLAGS -ggdb -O0 -DDEBUG -Wall "
+else
+ CFLAGS="$CFLAGS -O2 -Wall "
+fi
+
PKG_CHECK_MODULES(GTK, gtk+-2.0)
AC_SUBST(GTK_LIBS)
AC_SUBST(GTK_CFLAGS)
AC_SUBST(DESKTOP_LIBS)
AC_SUBST(DESKTOP_CFLAGS)
-AC_OUTPUT([ Makefile])
+# Application icon install directories
+icon_16x16dir=$datadir/icons/hicolor/16x16/hildon
+icon_26x26dir=$datadir/icons/hicolor/26x26/hildon
+icon_40x40dir=$datadir/icons/hicolor/40x40/hildon
+icon_scalabledir=$datadir/icons/hicolor/scalable/hildon
+AC_SUBST(icon_16x16dir)
+AC_SUBST(icon_26x26dir)
+AC_SUBST(icon_40x40dir)
+AC_SUBST(icon_scalabledir)
+
+# Produce output files
+AC_OUTPUT(
+ Makefile \
+ src/Makefile \
+ data/Makefile
+)