diff configure.ac @ 236:4d461ef7d424

HUGE UPDATE: convert build system to autotools why? because cmake sucks :)
author Paper <mrpapersonic@gmail.com>
date Fri, 19 Jan 2024 00:24:02 -0500
parents
children a7d0d543b334 1ae4d8b28a5c
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/configure.ac	Fri Jan 19 00:24:02 2024 -0500
@@ -0,0 +1,71 @@
+AC_INIT([minori], [0.1.0-alpha.1])
+
+AC_CANONICAL_HOST
+
+AC_CONFIG_SRCDIR([src/main.cc])
+AC_CONFIG_AUX_DIR([build-aux])
+AC_CONFIG_MACRO_DIRS([m4])
+
+AM_INIT_AUTOMAKE([-Wall -Wportability foreign subdir-objects])
+
+# Do we have a C++17 compiler
+AC_PROG_CXX
+AX_CXX_COMPILE_STDCXX(17, noext, mandatory)
+
+AM_PROG_AR
+LT_INIT
+
+# Qt?
+AX_HAVE_QT
+
+if test "x$have_qt" = "xno"; then
+	AC_MSG_ERROR([*** Qt not found.])
+fi
+
+# need this for moc
+AC_PROG_MKDIR_P
+
+# libcurl?
+LIBCURL_CHECK_CONFIG(yes, 7.7.2, [have_libcurl=yes], [have_libcurl=no])
+
+if test "x$have_libcurl" = "xno"; then
+	AC_MSG_ERROR([*** libcurl not found.])
+fi
+
+build_windows=no
+build_osx=no
+build_glib=no
+
+case "${host_os}" in
+	cygwin*|mingw*)
+		# Windows
+		build_windows=yes
+		AC_CHECK_TOOL([WINDRES], [windres])
+		AC_SUBST(WINDRES)
+		AC_DEFINE(WIN32)
+		;;
+	darwin*)
+		# Mac OS X
+		build_osx=yes
+		AC_DEFINE(MACOSX)
+		;;
+	*)
+		if test "x$host_os" = "xlinux"; then
+			AC_DEFINE(LINUX)
+		fi
+		# Everything else
+		AC_SUBST([GIO_CFLAGS])
+		AC_SUBST([GIO_LIBS])
+		PKG_CHECK_MODULES(GIO, gio-2.0, [build_glib=yes], [])
+		;;
+esac
+
+AM_CONDITIONAL([BUILD_WIN], [test "x$build_windows" = "xyes"])
+AM_CONDITIONAL([BUILD_OSX], [test "x$build_osx" = "xyes"])
+AM_CONDITIONAL([BUILD_GLIB], [test "x$build_glib" = "xyes"])
+AM_CONDITIONAL([BUILD_WINDRES], [test "x$WINDRES" != "x"])
+
+AC_CONFIG_SUBDIRS([dep/pugixml dep/animia dep/anitomy])
+
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT