Files
guru/gui-libs/cubegui/files/cubegui-4.7-custom-compiler.patch
Alessandro Barbieri 8a5b37df3b gui-libs/cubegui: fix QT build
Signed-off-by: Alessandro Barbieri <lssndrbarbieri@gmail.com>
2022-06-26 04:29:44 +02:00

305 lines
7.4 KiB
Diff

--- a/configure
+++ b/configure
@@ -5042,6 +5042,7 @@
fi
+
if test ! -n "$ac_scorep_platform_data_provided" || \
test "x${ac_scorep_platform_data_provided}" = "xno"; then :
@@ -6528,17 +6529,137 @@
QT_CXX=`basename $at_cv_env_QT_CXX`
- case $QT_CXX in #(
- "g++") :
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler vendor" >&5
+$as_echo_n "checking for C++ compiler vendor... " >&6; }
+if ${ax_cv_cxx_compiler_vendor+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ vendors="
+ intel: __ICC,__ECC,__INTEL_COMPILER
+ ibm: __xlc__,__xlC__,__IBMC__,__IBMCPP__,__ibmxl__clang__,__ibmxl__
+ pathscale: __PATHCC__,__PATHSCALE__
+ clang: __clang__
+ cray: _CRAYC,_CRAYFTN
+ fujitsu: __FUJITSU
+ sdcc: SDCC,__SDCC
+ sx: _SX
+ portland: __PGI
+ flang: __flang__,__PGLLVM__
+ gnu: __GNUC__
+ sun: __SUNPRO_C,__SUNPRO_CC,__SUNPRO_F90,__SUNPRO_F95
+ hp: __HP_cc,__HP_aCC
+ dec: __DECC,__DECCXX,__DECC_VER,__DECCXX_VER
+ borland: __BORLANDC__,__CODEGEARC__,__TURBOC__
+ comeau: __COMO__
+ kai: __KCC
+ lcc: __LCC__
+ sgi: __sgi,sgi
+ microsoft: _MSC_VER
+ metrowerks: __MWERKS__
+ watcom: __WATCOMC__
+ tcc: __TINYC__
+ unknown: UNKNOWN
+ "
+ for ventest in $vendors; do
+ case $ventest in #(
+ *:)
+ vendor=${ventest%:*}
+ continue
+ ;; #(
+ *)
+ vencpp="defined("`echo $ventest | sed 's/,/) || defined(/g'`")"
+ ;;
+ esac
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+#if !($vencpp)
+ thisisanerror;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ break
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+
+ ax_cv_cxx_compiler_vendor=$vendor
+
+ flang_variants="classic: __PGLLVM__"
+ portland_variants="llvm: __PGLLVM__"
+ eval variants=\"\$${ax_cv_cxx_compiler_vendor}_variants : NONE\"
+ for vartest in $variants; do
+ case $vartest in #(
+ *:)
+ variant=${vartest%:*};
+ continue
+ ;; #(
+ *)
+ varcpp="defined("`echo $vartest | sed 's/,/) && defined(/g'`")"
+ ;;
+ esac
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+#if !($varcpp)
+ thisisanerror;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ break
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+ as_fn_append ax_cv_cxx_compiler_vendor ${variant:+/$variant}
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compiler_vendor" >&5
+case "$ax_cv_cxx_compiler_vendor" in #(
+ yes|ok|yes[\ ,]*) :
+ $as_echo "${as__grn}$ax_cv_cxx_compiler_vendor${as__std}" >&6 ;; #(
+ no|failed|unsupported|no[\ ,]*) :
+ $as_echo "${as__red}$ax_cv_cxx_compiler_vendor${as__std}" >&6 ;; #(
+ *) :
+ $as_echo "${as__blu}$ax_cv_cxx_compiler_vendor${as__std}" >&6 ;;
+esac; }
+
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ case ${ax_cv_cxx_compiler_vendor%/*} in #(
+ gnu) :
qt_compiler="gcc" ;; #(
- "xlC") :
- qt_compiler="ibm" ;; #(
- "clang++") :
+ clang) :
qt_compiler="clang" ;; #(
- "icpc") :
+ intel) :
qt_compiler="intel" ;; #(
- "openCC") :
- qt_compiler="open64" ;; #(
*) :
as_fn_error $? "Qt compiler \"${QT_CXX}\" is not supported by --with-frontend-compiler-suite." "$LINENO" 5 ;;
esac
--- a/build-frontend/configure
+++ b/build-frontend/configure
@@ -22090,17 +22090,137 @@
QT_CXX=`basename $at_cv_env_QT_CXX`
- case $QT_CXX in #(
- "g++") :
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler vendor" >&5
+$as_echo_n "checking for C++ compiler vendor... " >&6; }
+if ${ax_cv_cxx_compiler_vendor+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ vendors="
+ intel: __ICC,__ECC,__INTEL_COMPILER
+ ibm: __xlc__,__xlC__,__IBMC__,__IBMCPP__,__ibmxl__clang__,__ibmxl__
+ pathscale: __PATHCC__,__PATHSCALE__
+ clang: __clang__
+ cray: _CRAYC,_CRAYFTN
+ fujitsu: __FUJITSU
+ sdcc: SDCC,__SDCC
+ sx: _SX
+ portland: __PGI
+ flang: __flang__,__PGLLVM__
+ gnu: __GNUC__
+ sun: __SUNPRO_C,__SUNPRO_CC,__SUNPRO_F90,__SUNPRO_F95
+ hp: __HP_cc,__HP_aCC
+ dec: __DECC,__DECCXX,__DECC_VER,__DECCXX_VER
+ borland: __BORLANDC__,__CODEGEARC__,__TURBOC__
+ comeau: __COMO__
+ kai: __KCC
+ lcc: __LCC__
+ sgi: __sgi,sgi
+ microsoft: _MSC_VER
+ metrowerks: __MWERKS__
+ watcom: __WATCOMC__
+ tcc: __TINYC__
+ unknown: UNKNOWN
+ "
+ for ventest in $vendors; do
+ case $ventest in #(
+ *:)
+ vendor=${ventest%:*}
+ continue
+ ;; #(
+ *)
+ vencpp="defined("`echo $ventest | sed 's/,/) || defined(/g'`")"
+ ;;
+ esac
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+#if !($vencpp)
+ thisisanerror;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ break
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+
+ ax_cv_cxx_compiler_vendor=$vendor
+
+ flang_variants="classic: __PGLLVM__"
+ portland_variants="llvm: __PGLLVM__"
+ eval variants=\"\$${ax_cv_cxx_compiler_vendor}_variants : NONE\"
+ for vartest in $variants; do
+ case $vartest in #(
+ *:)
+ variant=${vartest%:*};
+ continue
+ ;; #(
+ *)
+ varcpp="defined("`echo $vartest | sed 's/,/) && defined(/g'`")"
+ ;;
+ esac
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+#if !($varcpp)
+ thisisanerror;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ break
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+ as_fn_append ax_cv_cxx_compiler_vendor ${variant:+/$variant}
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compiler_vendor" >&5
+case "$ax_cv_cxx_compiler_vendor" in #(
+ yes|ok|yes[\ ,]*) :
+ $as_echo "${as__grn}$ax_cv_cxx_compiler_vendor${as__std}" >&6 ;; #(
+ no|failed|unsupported|no[\ ,]*) :
+ $as_echo "${as__red}$ax_cv_cxx_compiler_vendor${as__std}" >&6 ;; #(
+ *) :
+ $as_echo "${as__blu}$ax_cv_cxx_compiler_vendor${as__std}" >&6 ;;
+esac; }
+
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ case ${ax_cv_cxx_compiler_vendor%/*} in #(
+ gnu) :
qt_compiler="gcc" ;; #(
- "xlC") :
- qt_compiler="ibm" ;; #(
- "clang++") :
+ clang) :
qt_compiler="clang" ;; #(
- "icpc") :
+ intel) :
qt_compiler="intel" ;; #(
- "openCC") :
- qt_compiler="open64" ;; #(
*) :
as_fn_error $? "Qt compiler \"${QT_CXX}\" is not supported by --with-frontend-compiler-suite." "$LINENO" 5 ;;
esac