Mercurial > minori
comparison configure.ac @ 290:9347e2eaf6e5
autoconf: add checking message for Qt PIC stuff
author | Paper <paper@paper.us.eu.org> |
---|---|
date | Wed, 08 May 2024 17:32:28 -0400 |
parents | 3dbf01233fec |
children | 9a88e1725fd2 |
comparison
equal
deleted
inserted
replaced
289:3dbf01233fec | 290:9347e2eaf6e5 |
---|---|
9 | 9 |
10 AM_INIT_AUTOMAKE([-Wall -Wportability foreign subdir-objects]) | 10 AM_INIT_AUTOMAKE([-Wall -Wportability foreign subdir-objects]) |
11 | 11 |
12 dnl need C compiler for utf8proc | 12 dnl need C compiler for utf8proc |
13 AC_PROG_CC | 13 AC_PROG_CC |
14 AC_LANG([C++]) | |
15 | 14 |
16 dnl Do we have a C++17 compiler | 15 dnl Do we have a C++17 compiler |
17 AC_PROG_CXX | 16 AC_PROG_CXX |
18 AX_CXX_COMPILE_STDCXX([17], [noext], [mandatory]) | 17 AX_CXX_COMPILE_STDCXX([17], [noext], [mandatory]) |
18 AC_LANG([C++]) | |
19 | 19 |
20 dnl Init libtool | 20 dnl Init libtool |
21 AM_PROG_AR | 21 AM_PROG_AR |
22 LT_INIT | 22 LT_INIT |
23 | 23 |
42 dnl | 42 dnl |
43 dnl Unfortunately there's no way to check for this | 43 dnl Unfortunately there's no way to check for this |
44 dnl without using qmake (bleugh), so we use this check | 44 dnl without using qmake (bleugh), so we use this check |
45 dnl to see if qglobal.h can be included without PIC. | 45 dnl to see if qglobal.h can be included without PIC. |
46 | 46 |
47 AC_MSG_CHECKING([for Qt requiring -fPIC]) | |
48 | |
47 saved_CXXFLAGS="$CXXFLAGS" | 49 saved_CXXFLAGS="$CXXFLAGS" |
48 CXXFLAGS="$CXXFLAGS $QT_CFLAGS" | 50 CXXFLAGS="$CXXFLAGS $QT_CFLAGS" |
49 AC_COMPILE_IFELSE( | 51 AC_COMPILE_IFELSE( |
50 [AC_LANG_PROGRAM([#include <qglobal.h>], [])], | 52 [AC_LANG_PROGRAM([#include <qglobal.h>], [])], |
51 [CXXFLAGS="$saved_CXXFLAGS"], | 53 [ |
52 [CXXFLAGS="$saved_CXXFLAGS -fPIC"] | 54 AC_MSG_RESULT([no]) |
55 CXXFLAGS="$saved_CXXFLAGS" | |
56 ], | |
57 [ | |
58 AC_MSG_RESULT([yes]) | |
59 CXXFLAGS="$saved_CXXFLAGS -fPIC -DPIC" | |
60 ] | |
53 ) | 61 ) |
54 | 62 |
55 dnl need this for moc | 63 dnl need this for moc |
56 AC_PROG_MKDIR_P | 64 AC_PROG_MKDIR_P |
57 AC_SUBST([MKDIR_P]) | 65 AC_SUBST([MKDIR_P]) |