Mercurial > minori
annotate configure.ac @ 284:e66ffc338d82
anime: refactor title structure to a map
author | Paper <paper@paper.us.eu.org> |
---|---|
date | Wed, 08 May 2024 16:21:05 -0400 |
parents | 19eb6c4dca78 |
children | 8535eb5fb836 |
rev | line source |
---|---|
236
4d461ef7d424
HUGE UPDATE: convert build system to autotools
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
1 AC_INIT([minori], [0.1.0-alpha.1]) |
4d461ef7d424
HUGE UPDATE: convert build system to autotools
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
2 |
4d461ef7d424
HUGE UPDATE: convert build system to autotools
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
3 AC_CANONICAL_HOST |
4d461ef7d424
HUGE UPDATE: convert build system to autotools
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
4 |
258 | 5 AC_CONFIG_SUBDIRS([dep/pugixml dep/animone dep/anitomy]) |
236
4d461ef7d424
HUGE UPDATE: convert build system to autotools
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
6 AC_CONFIG_SRCDIR([src/main.cc]) |
4d461ef7d424
HUGE UPDATE: convert build system to autotools
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
7 AC_CONFIG_AUX_DIR([build-aux]) |
4d461ef7d424
HUGE UPDATE: convert build system to autotools
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
8 AC_CONFIG_MACRO_DIRS([m4]) |
4d461ef7d424
HUGE UPDATE: convert build system to autotools
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
9 |
4d461ef7d424
HUGE UPDATE: convert build system to autotools
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
10 AM_INIT_AUTOMAKE([-Wall -Wportability foreign subdir-objects]) |
4d461ef7d424
HUGE UPDATE: convert build system to autotools
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
11 |
264 | 12 dnl need C compiler for utf8proc |
13 AC_PROG_CC | |
14 | |
250 | 15 dnl Do we have a C++17 compiler |
273
f31305b9f60a
*: various code safety changes
Paper <paper@paper.us.eu.org>
parents:
271
diff
changeset
|
16 : ${CXXFLAGS=""} |
236
4d461ef7d424
HUGE UPDATE: convert build system to autotools
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
17 AC_PROG_CXX |
237 | 18 AX_CXX_COMPILE_STDCXX([17], [noext], [mandatory]) |
236
4d461ef7d424
HUGE UPDATE: convert build system to autotools
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
19 |
250 | 20 dnl Init libtool |
236
4d461ef7d424
HUGE UPDATE: convert build system to autotools
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
21 AM_PROG_AR |
4d461ef7d424
HUGE UPDATE: convert build system to autotools
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
22 LT_INIT |
4d461ef7d424
HUGE UPDATE: convert build system to autotools
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
23 |
282
19eb6c4dca78
autotools: ax_have_qt sucks, use pkgconf instead
Paper <paper@paper.us.eu.org>
parents:
273
diff
changeset
|
24 |
250 | 25 dnl Qt? |
282
19eb6c4dca78
autotools: ax_have_qt sucks, use pkgconf instead
Paper <paper@paper.us.eu.org>
parents:
273
diff
changeset
|
26 AS_IF([test "${enable_qt}" != "no"], [ |
19eb6c4dca78
autotools: ax_have_qt sucks, use pkgconf instead
Paper <paper@paper.us.eu.org>
parents:
273
diff
changeset
|
27 PKG_CHECK_MODULES([QT], [Qt5Core >= 5.5.0 Qt5Widgets Qt5Gui Qt5Svg], [ |
19eb6c4dca78
autotools: ax_have_qt sucks, use pkgconf instead
Paper <paper@paper.us.eu.org>
parents:
273
diff
changeset
|
28 QT_PATH="$(eval $PKG_CONFIG --variable=exec_prefix Qt5Core)" |
19eb6c4dca78
autotools: ax_have_qt sucks, use pkgconf instead
Paper <paper@paper.us.eu.org>
parents:
273
diff
changeset
|
29 QT_HOST_PATH="$(eval $PKG_CONFIG --variable=host_bins Qt5Core)" |
19eb6c4dca78
autotools: ax_have_qt sucks, use pkgconf instead
Paper <paper@paper.us.eu.org>
parents:
273
diff
changeset
|
30 QT_VERSION="$(eval $PKG_CONFIG --modversion Qt5Gui)" |
19eb6c4dca78
autotools: ax_have_qt sucks, use pkgconf instead
Paper <paper@paper.us.eu.org>
parents:
273
diff
changeset
|
31 AC_PATH_PROGS(QT_MOC, [moc-qt5 moc], moc, ["${QT_HOST_PATH}" "${QT_PATH}/bin"]) |
19eb6c4dca78
autotools: ax_have_qt sucks, use pkgconf instead
Paper <paper@paper.us.eu.org>
parents:
273
diff
changeset
|
32 AC_PATH_PROGS(QT_RCC, [rcc-qt5 rcc], rcc, ["${QT_HOST_PATH}" "${QT_PATH}/bin"]) |
19eb6c4dca78
autotools: ax_have_qt sucks, use pkgconf instead
Paper <paper@paper.us.eu.org>
parents:
273
diff
changeset
|
33 AC_PATH_PROGS(QT_UIC, [uic-qt5 uic], uic, ["${QT_HOST_PATH}" "${QT_PATH}/bin"]) |
19eb6c4dca78
autotools: ax_have_qt sucks, use pkgconf instead
Paper <paper@paper.us.eu.org>
parents:
273
diff
changeset
|
34 AC_PATH_PROGS(QT_LRELEASE, [lrelease-qt5 lrelease], lrelease, ["${QT_HOST_PATH}" "${QT_PATH}/bin"]) |
19eb6c4dca78
autotools: ax_have_qt sucks, use pkgconf instead
Paper <paper@paper.us.eu.org>
parents:
273
diff
changeset
|
35 AC_PATH_PROGS(QT_LUPDATE, [lupdate-qt5 lupdate], lupdate, ["${QT_HOST_PATH}" "${QT_PATH}/bin"]) |
19eb6c4dca78
autotools: ax_have_qt sucks, use pkgconf instead
Paper <paper@paper.us.eu.org>
parents:
273
diff
changeset
|
36 ], [ |
19eb6c4dca78
autotools: ax_have_qt sucks, use pkgconf instead
Paper <paper@paper.us.eu.org>
parents:
273
diff
changeset
|
37 AC_MSG_ERROR([${QT_PKG_ERRORS}]) |
19eb6c4dca78
autotools: ax_have_qt sucks, use pkgconf instead
Paper <paper@paper.us.eu.org>
parents:
273
diff
changeset
|
38 ]) |
19eb6c4dca78
autotools: ax_have_qt sucks, use pkgconf instead
Paper <paper@paper.us.eu.org>
parents:
273
diff
changeset
|
39 ]) |
236
4d461ef7d424
HUGE UPDATE: convert build system to autotools
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
40 |
250 | 41 dnl need this for moc |
42 AC_PROG_MKDIR_P | |
43 AC_SUBST([MKDIR_P]) | |
236
4d461ef7d424
HUGE UPDATE: convert build system to autotools
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
44 |
250 | 45 dnl libcurl? |
237 | 46 LIBCURL_CHECK_CONFIG([yes], [7.7.2], [have_libcurl=yes], [have_libcurl=no]) |
236
4d461ef7d424
HUGE UPDATE: convert build system to autotools
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
47 |
250 | 48 AS_IF([test "x$have_libcurl" = "xno"], [AC_MSG_ERROR([*** libcurl not found.])]) |
236
4d461ef7d424
HUGE UPDATE: convert build system to autotools
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
49 |
4d461ef7d424
HUGE UPDATE: convert build system to autotools
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
50 build_windows=no |
4d461ef7d424
HUGE UPDATE: convert build system to autotools
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
51 build_osx=no |
250 | 52 build_linux=no |
236
4d461ef7d424
HUGE UPDATE: convert build system to autotools
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
53 build_glib=no |
4d461ef7d424
HUGE UPDATE: convert build system to autotools
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
54 |
250 | 55 AS_CASE(["$host_os"], |
56 [cygwin*|mingw*], [build_windows=yes], | |
57 [darwin*], [build_osx=yes], | |
58 [linux*], [build_linux=yes], | |
59 []) | |
60 | |
61 if test "x$build_windows" = "xyes"; then | |
62 AC_DEFINE([WIN32]) | |
63 | |
64 dnl Check for windres | |
65 AC_CHECK_TOOL([WINDRES], [windres]) | |
66 AC_SUBST([WINDRES]) | |
67 elif test "x$build_osx" = "xyes"; then | |
68 AC_DEFINE([MACOSX]) | |
69 else | |
70 AS_IF([test "x$build_linux" = "xyes"], [AC_DEFINE([linux])]) | |
71 | |
72 PKG_CHECK_MODULES([GLIB], [gio-2.0 glib-2.0], [build_glib=yes], [build_glib=no]) | |
73 if test "x$build_glib" = "xyes"; then | |
74 AC_DEFINE([GLIB]) | |
75 | |
76 AC_SUBST([GLIB_CFLAGS]) | |
77 AC_SUBST([GLIB_LIBS]) | |
78 fi | |
79 fi | |
236
4d461ef7d424
HUGE UPDATE: convert build system to autotools
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
80 |
267
09c5bd74fe93
win32: make builds work again
Paper <paper@paper.us.eu.org>
parents:
264
diff
changeset
|
81 AC_DEFINE([UTF8PROC_STATIC]) |
09c5bd74fe93
win32: make builds work again
Paper <paper@paper.us.eu.org>
parents:
264
diff
changeset
|
82 |
236
4d461ef7d424
HUGE UPDATE: convert build system to autotools
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
83 AM_CONDITIONAL([BUILD_WIN], [test "x$build_windows" = "xyes"]) |
4d461ef7d424
HUGE UPDATE: convert build system to autotools
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
84 AM_CONDITIONAL([BUILD_OSX], [test "x$build_osx" = "xyes"]) |
4d461ef7d424
HUGE UPDATE: convert build system to autotools
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
85 AM_CONDITIONAL([BUILD_GLIB], [test "x$build_glib" = "xyes"]) |
4d461ef7d424
HUGE UPDATE: convert build system to autotools
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
86 AM_CONDITIONAL([BUILD_WINDRES], [test "x$WINDRES" != "x"]) |
4d461ef7d424
HUGE UPDATE: convert build system to autotools
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
87 |
4d461ef7d424
HUGE UPDATE: convert build system to autotools
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
88 AC_CONFIG_FILES([Makefile]) |
4d461ef7d424
HUGE UPDATE: convert build system to autotools
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
89 AC_OUTPUT |