Mercurial > minori
comparison configure.ac @ 291:9a88e1725fd2
*: refactor lots of stuff
I forgot to put this into different commits, oops!
anyway, it doesn't really matter *that* much since this is an
unfinished hobby project anyway. once it starts getting stable
commit history will be more important, but for now it's not
that big of a deal
author | Paper <paper@paper.us.eu.org> |
---|---|
date | Sun, 12 May 2024 16:31:07 -0400 |
parents | 9347e2eaf6e5 |
children | 703fb7d7c917 |
comparison
equal
deleted
inserted
replaced
290:9347e2eaf6e5 | 291:9a88e1725fd2 |
---|---|
21 AM_PROG_AR | 21 AM_PROG_AR |
22 LT_INIT | 22 LT_INIT |
23 | 23 |
24 | 24 |
25 dnl Qt? | 25 dnl Qt? |
26 | |
27 | |
26 PKG_CHECK_MODULES([QT], [Qt5Core >= 5.7.0 Qt5Widgets Qt5Gui], [ | 28 PKG_CHECK_MODULES([QT], [Qt5Core >= 5.7.0 Qt5Widgets Qt5Gui], [ |
27 QT_PATH="$(eval $PKG_CONFIG --variable=exec_prefix Qt5Core)" | 29 QT_PATH="$(eval $PKG_CONFIG --variable=exec_prefix Qt5Core)" |
28 QT_HOST_PATH="$(eval $PKG_CONFIG --variable=host_bins Qt5Core)" | 30 QT_HOST_PATH="$(eval $PKG_CONFIG --variable=host_bins Qt5Core)" |
29 QT_VERSION="$(eval $PKG_CONFIG --modversion Qt5Gui)" | 31 |
30 AC_PATH_PROGS(QT_MOC, [moc-qt5 moc], moc, ["${QT_HOST_PATH}" "${QT_PATH}/bin"]) | 32 AC_PATH_PROGS(QT_MOC, [moc-qt5 moc], moc, ["${QT_HOST_PATH}" "${QT_PATH}/bin"]) |
31 AC_PATH_PROGS(QT_RCC, [rcc-qt5 rcc], rcc, ["${QT_HOST_PATH}" "${QT_PATH}/bin"]) | 33 AC_PATH_PROGS(QT_RCC, [rcc-qt5 rcc], rcc, ["${QT_HOST_PATH}" "${QT_PATH}/bin"]) |
32 AC_PATH_PROGS(QT_UIC, [uic-qt5 uic], uic, ["${QT_HOST_PATH}" "${QT_PATH}/bin"]) | 34 AC_PATH_PROGS(QT_UIC, [uic-qt5 uic], uic, ["${QT_HOST_PATH}" "${QT_PATH}/bin"]) |
33 AC_PATH_PROGS(QT_LRELEASE, [lrelease-qt5 lrelease], lrelease, ["${QT_HOST_PATH}" "${QT_PATH}/bin"]) | 35 AC_PATH_PROGS(QT_LRELEASE, [lrelease-qt5 lrelease], lrelease, ["${QT_HOST_PATH}" "${QT_PATH}/bin"]) |
34 AC_PATH_PROGS(QT_LUPDATE, [lupdate-qt5 lupdate], lupdate, ["${QT_HOST_PATH}" "${QT_PATH}/bin"]) | 36 AC_PATH_PROGS(QT_LUPDATE, [lupdate-qt5 lupdate], lupdate, ["${QT_HOST_PATH}" "${QT_PATH}/bin"]) |
37 | |
38 dnl On some platforms (see: Debian), Qt is built with | |
39 dnl `-reduce-relocations`, which requires applications | |
40 dnl to be built with position-independent code. | |
41 dnl | |
42 dnl Unfortunately there's no way to check for this | |
43 dnl without using qmake (bleugh), so we use this check | |
44 dnl to see if qglobal.h can be included without PIC. | |
45 | |
46 AC_MSG_CHECKING([for Qt requiring -fPIC]) | |
47 | |
48 saved_CXXFLAGS="$CXXFLAGS" | |
49 CXXFLAGS="$CXXFLAGS $QT_CFLAGS" | |
50 AC_COMPILE_IFELSE( | |
51 [AC_LANG_PROGRAM([#include <qglobal.h>], [])], | |
52 [ | |
53 AC_MSG_RESULT([no]) | |
54 CXXFLAGS="$saved_CXXFLAGS" | |
55 ], | |
56 [ | |
57 AC_MSG_RESULT([yes]) | |
58 CXXFLAGS="$saved_CXXFLAGS -fPIC -DPIC" | |
59 ] | |
60 ) | |
35 ], [ | 61 ], [ |
36 AC_MSG_ERROR([${QT_PKG_ERRORS}.]) | 62 PKG_CHECK_MODULES([QT], [Qt6Core Qt6Widgets Qt6Gui], [ |
63 QT_BIN_DIRECTORY="$(eval $PKG_CONFIG --variable=bindir Qt6Core)" | |
64 QT_LIBEXEC_DIRECTORY="$(eval $PKG_CONFIG --variable=libexecdir Qt6Core)" | |
65 | |
66 AC_PATH_PROGS(QT_MOC, [moc], moc, ["${QT_LIBEXEC_DIRECTORY}"]) | |
67 AC_PATH_PROGS(QT_RCC, [rcc], rcc, ["${QT_LIBEXEC_DIRECTORY}"]) | |
68 AC_PATH_PROGS(QT_UIC, [uic], uic, ["${QT_LIBEXEC_DIRECTORY}"]) | |
69 AC_PATH_PROGS(QT_LRELEASE, [lrelease], lrelease, ["${QT_BIN_DIRECTORY}"]) | |
70 AC_PATH_PROGS(QT_LUPDATE, [lupdate], lupdate, ["${QT_BIN_DIRECTORY}"]) | |
71 | |
72 dnl in my testing Qt 6 seems to require PIC unconditionally... | |
73 CXXFLAGS="$CXXFLAGS -fPIC" | |
74 ], [ | |
75 AC_MSG_ERROR([${QT_PKG_ERRORS}.]) | |
76 ]) | |
37 ]) | 77 ]) |
38 | |
39 dnl On some platforms (see: Debian), Qt is built with | |
40 dnl `-reduce-relocations`, which requires applications | |
41 dnl to be built with position-independent code. | |
42 dnl | |
43 dnl Unfortunately there's no way to check for this | |
44 dnl without using qmake (bleugh), so we use this check | |
45 dnl to see if qglobal.h can be included without PIC. | |
46 | |
47 AC_MSG_CHECKING([for Qt requiring -fPIC]) | |
48 | |
49 saved_CXXFLAGS="$CXXFLAGS" | |
50 CXXFLAGS="$CXXFLAGS $QT_CFLAGS" | |
51 AC_COMPILE_IFELSE( | |
52 [AC_LANG_PROGRAM([#include <qglobal.h>], [])], | |
53 [ | |
54 AC_MSG_RESULT([no]) | |
55 CXXFLAGS="$saved_CXXFLAGS" | |
56 ], | |
57 [ | |
58 AC_MSG_RESULT([yes]) | |
59 CXXFLAGS="$saved_CXXFLAGS -fPIC -DPIC" | |
60 ] | |
61 ) | |
62 | 78 |
63 dnl need this for moc | 79 dnl need this for moc |
64 AC_PROG_MKDIR_P | 80 AC_PROG_MKDIR_P |
65 AC_SUBST([MKDIR_P]) | 81 AC_SUBST([MKDIR_P]) |
66 | 82 |
67 dnl libcurl? | 83 dnl libcurl? |
68 LIBCURL_CHECK_CONFIG([yes], [7.7.2], [have_libcurl=yes], [have_libcurl=no]) | 84 LIBCURL_CHECK_CONFIG([yes], [7.87.0], [have_libcurl=yes], [have_libcurl=no]) |
69 | 85 |
70 AS_IF([test "x$have_libcurl" = "xno"], [AC_MSG_ERROR([*** libcurl not found.])]) | 86 AS_IF([test "x$have_libcurl" = "xno"], [AC_MSG_ERROR([*** libcurl not found.])]) |
71 | 87 |
72 build_windows=no | 88 build_windows=no |
73 build_osx=no | 89 build_osx=no |