Mercurial > minori
comparison 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 |
comparison
equal
deleted
inserted
replaced
235:593108b3d555 | 236:4d461ef7d424 |
---|---|
1 AC_INIT([minori], [0.1.0-alpha.1]) | |
2 | |
3 AC_CANONICAL_HOST | |
4 | |
5 AC_CONFIG_SRCDIR([src/main.cc]) | |
6 AC_CONFIG_AUX_DIR([build-aux]) | |
7 AC_CONFIG_MACRO_DIRS([m4]) | |
8 | |
9 AM_INIT_AUTOMAKE([-Wall -Wportability foreign subdir-objects]) | |
10 | |
11 # Do we have a C++17 compiler | |
12 AC_PROG_CXX | |
13 AX_CXX_COMPILE_STDCXX(17, noext, mandatory) | |
14 | |
15 AM_PROG_AR | |
16 LT_INIT | |
17 | |
18 # Qt? | |
19 AX_HAVE_QT | |
20 | |
21 if test "x$have_qt" = "xno"; then | |
22 AC_MSG_ERROR([*** Qt not found.]) | |
23 fi | |
24 | |
25 # need this for moc | |
26 AC_PROG_MKDIR_P | |
27 | |
28 # libcurl? | |
29 LIBCURL_CHECK_CONFIG(yes, 7.7.2, [have_libcurl=yes], [have_libcurl=no]) | |
30 | |
31 if test "x$have_libcurl" = "xno"; then | |
32 AC_MSG_ERROR([*** libcurl not found.]) | |
33 fi | |
34 | |
35 build_windows=no | |
36 build_osx=no | |
37 build_glib=no | |
38 | |
39 case "${host_os}" in | |
40 cygwin*|mingw*) | |
41 # Windows | |
42 build_windows=yes | |
43 AC_CHECK_TOOL([WINDRES], [windres]) | |
44 AC_SUBST(WINDRES) | |
45 AC_DEFINE(WIN32) | |
46 ;; | |
47 darwin*) | |
48 # Mac OS X | |
49 build_osx=yes | |
50 AC_DEFINE(MACOSX) | |
51 ;; | |
52 *) | |
53 if test "x$host_os" = "xlinux"; then | |
54 AC_DEFINE(LINUX) | |
55 fi | |
56 # Everything else | |
57 AC_SUBST([GIO_CFLAGS]) | |
58 AC_SUBST([GIO_LIBS]) | |
59 PKG_CHECK_MODULES(GIO, gio-2.0, [build_glib=yes], []) | |
60 ;; | |
61 esac | |
62 | |
63 AM_CONDITIONAL([BUILD_WIN], [test "x$build_windows" = "xyes"]) | |
64 AM_CONDITIONAL([BUILD_OSX], [test "x$build_osx" = "xyes"]) | |
65 AM_CONDITIONAL([BUILD_GLIB], [test "x$build_glib" = "xyes"]) | |
66 AM_CONDITIONAL([BUILD_WINDRES], [test "x$WINDRES" != "x"]) | |
67 | |
68 AC_CONFIG_SUBDIRS([dep/pugixml dep/animia dep/anitomy]) | |
69 | |
70 AC_CONFIG_FILES([Makefile]) | |
71 AC_OUTPUT |