ObjQt  Check-in [7a43c3a524]

Overview
Comment:Check whether Qt requires PIC

Also includes a buildsys update required for this.

Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 7a43c3a52403830494d3bdebe9d903feb802c51b037f21f99843d71a0ca159f2
User & Date: js on 2017-04-18 00:09:15
Other Links: manifest | tags
Context
2017-04-18
02:27
Add QtAbstractButton check-in: 462c91f6d6 user: js tags: trunk
00:09
Check whether Qt requires PIC check-in: 7a43c3a524 user: js tags: trunk
2017-04-17
23:25
Add a proper build system check-in: baf52ea3b1 user: js tags: trunk
Changes

Modified buildsys.mk.in from [f487541287] to [b35882c209].

197
198
199
200
201
202
203
204
205
206
207
208
209
210
211

.m.m.dep:
	${CPP} ${CPPFLAGS} ${OBJCFLAGS} -M $< | \
	sed 's/^\([^\.]*\)\.o:/\1.o \1.lib.o \1.plugin.o:/' >$@ || \
	{ rm -f $@; false; }

.mm.mm.dep:
	${CPP} ${CPPFLAGS} ${OBJCPPFLAGS} -M $< | \
	sed 's/^\([^\.]*\)\.o:/\1.o \1.lib.o \1.plugin.o:/' >$@ || \
	{ rm -f $@; false; }

.S.S.dep:
	${CPP} ${CPPFLAGS} ${ASFLAGS} -M $< | \
	sed 's/^\([^\.]*\)\.o:/\1.o \1.lib.o \1.plugin.o:/' >$@ || \
	{ rm -f $@; false; }







|







197
198
199
200
201
202
203
204
205
206
207
208
209
210
211

.m.m.dep:
	${CPP} ${CPPFLAGS} ${OBJCFLAGS} -M $< | \
	sed 's/^\([^\.]*\)\.o:/\1.o \1.lib.o \1.plugin.o:/' >$@ || \
	{ rm -f $@; false; }

.mm.mm.dep:
	${CPP} ${CPPFLAGS} ${OBJCXXFLAGS} -M $< | \
	sed 's/^\([^\.]*\)\.o:/\1.o \1.lib.o \1.plugin.o:/' >$@ || \
	{ rm -f $@; false; }

.S.S.dep:
	${CPP} ${CPPFLAGS} ${ASFLAGS} -M $< | \
	sed 's/^\([^\.]*\)\.o:/\1.o \1.lib.o \1.plugin.o:/' >$@ || \
	{ rm -f $@; false; }
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
		${COMPILE_PLUGIN_FAILED}; \
	fi

.mm.o:
	${COMPILE_STATUS}
	in="$<"; \
	out="$@"; \
	if ${OBJCXX} ${OBJCXXFLAGS} ${OBJCFLAGS} ${CXXFLAGS} ${CPPFLAGS} ${OBJCXXFLAGS_$@} -c -o $@ $<; then \
		${COMPILE_OK}; \
	else \
		${COMPILE_FAILED}; \
	fi
.mm.lib.o:
	${COMPILE_LIB_STATUS}
	in="$<"; \
	out="$@"; \
	if ${OBJCXX} ${LIB_CFLAGS} ${OBJCXXFLAGS} ${OBJCFLAGS} ${CXXFLAGS} ${CPPFLAGS} ${OBJCXXFLAGS_$@} -c -o $@ $<; then \
		${COMPILE_LIB_OK}; \
	else \
		${COMPILE_LIB_FAILED}; \
	fi
.mm.plugin.o:
	${COMPILE_PLUGIN_STATUS}
	in="$<"; \
	out="$@"; \
	if ${OBJCXX} ${PLUGIN_CFLAGS} ${OBJCXXFLAGS} ${OBJCFLAGS} ${CXXFLAGS} ${CPPFLAGS} ${OBJCXXFLAGS_$@} -c -o $@ $<; then \
		${COMPILE_PLUGIN_OK}; \
	else \
		${COMPILE_PLUGIN_FAILED}; \
	fi

.po.mo:
	${COMPILE_STATUS}







|








|








|







509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
		${COMPILE_PLUGIN_FAILED}; \
	fi

.mm.o:
	${COMPILE_STATUS}
	in="$<"; \
	out="$@"; \
	if ${OBJCXX} ${OBJCXXFLAGS} ${CPPFLAGS} ${OBJCXXFLAGS_$@} -c -o $@ $<; then \
		${COMPILE_OK}; \
	else \
		${COMPILE_FAILED}; \
	fi
.mm.lib.o:
	${COMPILE_LIB_STATUS}
	in="$<"; \
	out="$@"; \
	if ${OBJCXX} ${LIB_CFLAGS} ${OBJCXXFLAGS} ${CPPFLAGS} ${OBJCXXFLAGS_$@} -c -o $@ $<; then \
		${COMPILE_LIB_OK}; \
	else \
		${COMPILE_LIB_FAILED}; \
	fi
.mm.plugin.o:
	${COMPILE_PLUGIN_STATUS}
	in="$<"; \
	out="$@"; \
	if ${OBJCXX} ${PLUGIN_CFLAGS} ${OBJCXXFLAGS} ${CPPFLAGS} ${OBJCXXFLAGS_$@} -c -o $@ $<; then \
		${COMPILE_PLUGIN_OK}; \
	else \
		${COMPILE_PLUGIN_FAILED}; \
	fi

.po.mo:
	${COMPILE_STATUS}

Modified configure.ac from [edb0054b32] to [67be020224].

15
16
17
18
19
20
21

22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
])

AC_LANG([Objective C++])
AC_PROG_OBJCXX(clang++ g++)
AC_PROG_OBJCXXCPP
AC_PROG_LN_S
AC_PROG_INSTALL


CPP="$OBJCXXCPP"
CPPFLAGS="$CPPFLAGS $OBJCPPFLAGS $($OBJFW_CONFIG --cppflags)"
OBJCFLAGS="$OBJCFLAGS -Wall $($OBJFW_CONFIG --objcflags)"
LDFLAGS="$LDFLAGS $($OBJFW_CONFIG --ldflags --rpath)"
LIBS="$LIBS $($OBJFW_CONFIG --libs)"

AX_CHECK_COMPILER_FLAGS(-std=c++11, [CXXFLAGS="$CXXFLAGS -std=c++11"], [
	AC_MSG_ERROR(You need a compiler that supports C++11!)
])

AX_CHECK_COMPILER_FLAGS(-pipe, [OBJCFLAGS="$OBJCFLAGS -pipe"])
AX_CHECK_COMPILER_FLAGS(-fno-common, [OBJCFLAGS="$OBJCFLAGS -fno-common"])
AX_CHECK_COMPILER_FLAGS(-Wobjc-missing-property-synthesis -Werror,
	[OBJCFLAGS="$OBJCFLAGS -Wobjc-missing-property-synthesis"])







>







|







15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
])

AC_LANG([Objective C++])
AC_PROG_OBJCXX(clang++ g++)
AC_PROG_OBJCXXCPP
AC_PROG_LN_S
AC_PROG_INSTALL
AC_PROG_EGREP

CPP="$OBJCXXCPP"
CPPFLAGS="$CPPFLAGS $OBJCPPFLAGS $($OBJFW_CONFIG --cppflags)"
OBJCFLAGS="$OBJCFLAGS -Wall $($OBJFW_CONFIG --objcflags)"
LDFLAGS="$LDFLAGS $($OBJFW_CONFIG --ldflags --rpath)"
LIBS="$LIBS $($OBJFW_CONFIG --libs)"

AX_CHECK_COMPILER_FLAGS(-std=c++11, [OBJCXXFLAGS="$OBJCXXFLAGS -std=c++11"], [
	AC_MSG_ERROR(You need a compiler that supports C++11!)
])

AX_CHECK_COMPILER_FLAGS(-pipe, [OBJCFLAGS="$OBJCFLAGS -pipe"])
AX_CHECK_COMPILER_FLAGS(-fno-common, [OBJCFLAGS="$OBJCFLAGS -fno-common"])
AX_CHECK_COMPILER_FLAGS(-Wobjc-missing-property-synthesis -Werror,
	[OBJCFLAGS="$OBJCFLAGS -Wobjc-missing-property-synthesis"])
83
84
85
86
87
88
89














90
91
92
93
94
95
96
97
98
99
100
101
102
	LIBS="$LIBS $Qt5Widgets_LIBS"
], [
	AC_MSG_ERROR(You need Qt5Widgets >= 5.5 installed!)
])
AS_IF([test x"$GOBJC" = x"yes"], [
	OBJCFLAGS="$OBJCFLAGS -Wwrite-strings -Wpointer-arith -Werror"
])















BUILDSYS_INIT

dnl We don't call AC_PROG_CPP or AC_PROG_OBJC, but only AC_PROG_OBJCPPCXX and
dnl set CPP and OBJCC to OBJCPPCXX and add OBJCXXCPPFLAGS to CPPFLAGS, thus we
dnl need to AC_SUBST these ourself.
AC_SUBST(CPP)
AC_SUBST(CPPFLAGS)
AC_SUBST(CXXFLAGS)
AC_SUBST(OBJCFLAGS)

AC_CONFIG_FILES([buildsys.mk extra.mk])
AC_OUTPUT







>
>
>
>
>
>
>
>
>
>
>
>
>
>













84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
	LIBS="$LIBS $Qt5Widgets_LIBS"
], [
	AC_MSG_ERROR(You need Qt5Widgets >= 5.5 installed!)
])
AS_IF([test x"$GOBJC" = x"yes"], [
	OBJCFLAGS="$OBJCFLAGS -Wwrite-strings -Wpointer-arith -Werror"
])

AC_MSG_CHECKING(whether Qt requires PIC)
AC_EGREP_CPP(yes, [
	#include <qglobal.h>

	#ifdef QT_REDUCE_RELOCATIONS
	yes
	#endif
], [
	OBJCXXFLAGS="$LIB_CFLAGS $OBJCXXFLAGS"
	AC_MSG_RESULT(yes)
], [
	AC_MSG_RESULT(no)
])

BUILDSYS_INIT

dnl We don't call AC_PROG_CPP or AC_PROG_OBJC, but only AC_PROG_OBJCPPCXX and
dnl set CPP and OBJCC to OBJCPPCXX and add OBJCXXCPPFLAGS to CPPFLAGS, thus we
dnl need to AC_SUBST these ourself.
AC_SUBST(CPP)
AC_SUBST(CPPFLAGS)
AC_SUBST(CXXFLAGS)
AC_SUBST(OBJCFLAGS)

AC_CONFIG_FILES([buildsys.mk extra.mk])
AC_OUTPUT