
# Copyright (C) 2020-2023 Tommi Höynälänmaa

# This file is part of Theme-D-Intr.

# You can redistribute and/or modify this file under the terms of the
# GNU General Public License as published by the Free Software
# Foundation, either version 3 of the License, or (at your option) any
# later version.

# This file is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.

# You should have received a copy of the GNU General Public License
# along with this program. If not, see https://www.gnu.org/licenses/.


AC_INIT([Theme-D-Intr], [0.14.0], [tommi.hoynalanmaa at iki.fi], [theme-d-intr], [http://www.iki.fi/tohoyn/theme-d-intr/])

AM_INIT_AUTOMAKE

AC_CONFIG_MACRO_DIR([m4])

AC_PROG_LN_S

AC_ARG_WITH([guile],
  [AS_HELP_STRING([--with-guile],
    [Guile version to be used])],
  [guile_spec=$withval],
  [guile_spec=no])

CHECK_GUILE_VERSION
GUILE_PACKAGE=guile-$MY_GUILE_VERSION

AC_ARG_WITH([guile-program],
  [AS_HELP_STRING([--with-guile-program],
    [Guile program to be used])],
    [THEME_D_GUILE=$withval],
    [THEME_D_GUILE=/usr/bin/guile-$MY_GUILE_VERSION])

AC_SUBST(THEME_D_GUILE)

SRC_DIR=$(pwd)

LIB_DIR=$(get-theme-d-config-var lib-dir)

SCRIPT_DIR=$datadir/theme-d-intr/scripts

AC_SUBST(MY_GUILE_VERSION)

AC_SUBST(SRC_DIR)

AC_SUBST(LIB_DIR)

AC_SUBST(MODULE_DIR, $(${PKG_CONFIG} --variable=sitedir $GUILE_PACKAGE))

AC_SUBST(EXAMPLES_DIR, $docdir/examples)

AC_SUBST(SCRIPT_DIR)

API_VERSION=2
AC_SUBST(API_VERSION)

EXTRA_GUILD_OPTIONS=""

AC_SUBST(EXTRA_GUILD_OPTIONS)

AC_CONFIG_FILES([Makefile
		 doc/Makefile
		 theme-d-code/Makefile
                 theme-d-code/theme-d-intr/Makefile
		 guile-code/Makefile
		 guile-code/guile-theme-d-intr/Makefile
		 guile-code/guile-theme-d-intr-support/Makefile
		 scripts/Makefile
		 examples/Makefile
		 examples/intr-gtk3-examples/Makefile
		 examples/intr-gtk3-examples/calc/Makefile
		 examples/intr-gtk3-examples/hello/Makefile
		 examples/intr-gtk3-examples/hello2/Makefile
		 examples/intr-gtk3-examples/hello3/Makefile
		 examples/intr-gtk3-examples/theme-d-intr-demo/Makefile
		 examples/intr-gtk4-examples/Makefile
		 examples/intr-gtk4-examples/appwindow/Makefile
		 examples/intr-gtk4-examples/calc/Makefile
		 examples/intr-gtk4-examples/hello/Makefile
		 examples/intr-gtk4-examples/hello2/Makefile
		 examples/intr-gtk4-examples/hello3/Makefile
		 examples/intr-gtk4-examples/theme-d-intr-demo/Makefile
])
AC_OUTPUT
