Skip to content

Commit 70266e9

Browse files
committed
build: fix qt5.7 build under macOS
OBJCXX's std flags don't get defined by our cxx macro. Rather than hard-coding to c++11, just force OBJCXX to be the same as CXX unless the user specified otherwise.
1 parent 6eeac6e commit 70266e9

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

configure.ac

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ else
4545
CXXFLAGS_overridden=no
4646
fi
4747
AC_PROG_CXX
48-
m4_ifdef([AC_PROG_OBJCXX],[AC_PROG_OBJCXX])
4948

5049
dnl By default, libtool for mingw refuses to link static libs into a dll for
5150
dnl fear of mixing pic/non-pic objects, and import/export complications. Since
@@ -60,6 +59,15 @@ AX_CXX_COMPILE_STDCXX([11], [noext], [mandatory])
6059
dnl Check if -latomic is required for <std::atomic>
6160
CHECK_ATOMIC
6261

62+
dnl Unless the user specified OBJCXX, force it to be the same as CXX. This ensures
63+
dnl that we get the same -std flags for both.
64+
m4_ifdef([AC_PROG_OBJCXX],[
65+
if test "x${OBJCXX+set}" = "x"; then
66+
OBJCXX="${CXX}"
67+
fi
68+
AC_PROG_OBJCXX
69+
])
70+
6371
dnl Libtool init checks.
6472
LT_INIT([pic-only])
6573

0 commit comments

Comments
 (0)