ports/x11/rxvt-unicode/patches/patch-configure_ac

34 lines
1 KiB
Text
Raw Normal View History

2023-08-16 22:26:55 +00:00
Don't use gcc specific flags, because it causes various undefined
reference errors with ports-gcc>=6 when -lsupc++ is used. We could
use libesupc++ but there is not much incentive to do so.
Index: configure.ac
--- configure.ac.orig
+++ configure.ac
@@ -28,25 +28,6 @@ AC_USE_SYSTEM_EXTENSIONS
AC_LANG(C++)
LINKER="$CXX"
-dnl check whether we can link with gcc -lsupc++
-if test x$GCC = xyes && test x$GXX = xyes; then
- dnl FreeBSD (at least up to 5.3) has a broken GCC, workaround it
- AC_MSG_CHECKING([for working libsupc++])
- save_CXX="$CXX"
- save_LIBS="$LIBS"
- CXX="$CC"
- LIBS="$LIBS -lsupc++"
- AC_LINK_IFELSE(
- [AC_LANG_PROGRAM([struct test { }; void f() try { throw new test; } catch (...) { throw; }],[])],
- [AC_MSG_RESULT(ok)
- LINKER="$CC"],
- [
- AC_MSG_RESULT([no, making everything bigger and slower])
- LIBS="$save_LIBS"
- ]
- )
- CXX="$save_CXX"
-fi
AC_SUBST(LINKER,[$LINKER])
dnl# --------------------------------------------------------------------------