+AC_PREREQ([2.71])
+AC_INIT([enfusegtk],[0.1],[mir@datanom.net])
+AC_COPYRIGHT([Copyright (c) 2023 Michael Rasmussen.])
+AC_CONFIG_MACRO_DIR([m4])
+AC_CONFIG_AUX_DIR(auxdir)
+AC_CANONICAL_TARGET
+
+AC_CONFIG_SRCDIR([src/main.c])
+AM_INIT_AUTOMAKE([gnu no-dist-gzip dist-bzip2 1.10])
+AC_CONFIG_HEADERS([config.h])
+AM_MAINTAINER_MODE
+
+CFLAGS="-g -Wall"
+
+if test "x$USE_MAINTAINER_MODE" = "xyes"; then
+ CFLAGS="${CFLAGS} -Werror -DDEBUG"
+ AC_DEFINE_UNQUOTED(DEBUG, [1], [Enable debug mode.])
+else
+ CFLAGS="${CFLAGS} -O -O2"
+fi
+GLIB_REQUIRED=2.70.0
+GOBJECT_REQUIRED=2.70.0
+GTK_REQUIRED=3.14.0
+
+AC_SUBST(GLIB_REQUIRED)
+AC_SUBST(GOBJECT_REQUIRED)
+AC_SUBST(GTK_REQUIRED)
+
+# Checks for programs.
+AC_PROG_CC
+AC_PROG_CPP
+LT_INIT
+if test -n "$lt_prog_compiler_pic"; then
+ CFLAGS="$CFLAGS $lt_prog_compiler_pic"
+fi
+
+PKG_PROG_PKG_CONFIG
+AC_LIB_PREFIX
+
+# Checks for libraries.
+PKG_CHECK_MODULES([GLIB],
+ [glib-2.0 >= $GLIB_REQUIRED
+ gobject-2.0 >= $GOBJECT_REQUIRED
+ gmodule-2.0 >= $GOBJECT_REQUIRED]
+)
+AC_SUBST(GLIB_CFLAGS)
+AC_SUBST(GLIB_LIBS)
+
+PKG_CHECK_MODULES([GTK], gtk+-3.0 >= $GTK_REQUIRED)
+AC_SUBST(GTK_CFLAGS)
+AC_SUBST(GTK_LIBS)
+
+AC_CONFIG_FILES([
+ Makefile
+ src/Makefile
+])
+
+AC_OUTPUT
+echo "
+Configuration:
+
+ Source code: ${ac_pwd}
+ Compiler: ${CC} $($CC -dumpversion)
+ CFLAGS: ${CFLAGS}
+"