openbsd-ports/net/pmacct/patches/patch-configure_ac
2023-01-03 14:54:06 +00:00

32 lines
1018 B
Plaintext

- Drop forced -O2
- Use C++ compiler for linking test
Index: configure.ac
--- configure.ac.orig
+++ configure.ac
@@ -30,12 +30,6 @@ AC_MSG_RESULT($host_os)
AC_MSG_CHECKING(hardware)
AC_MSG_RESULT($host_cpu)
-dnl initial checks; tweakings to CFLAGS and LDFLAGS
-dnl see final checks for tweakings to LIBS
-if test "x$ac_cv_prog_gcc" = xyes ; then
- CFLAGS="-O2 ${CFLAGS}"
-fi
-
dnl: shared object handling
AC_MSG_CHECKING([whether to disable linking against shared objects])
AC_ARG_ENABLE(so,
@@ -1217,10 +1211,9 @@ AC_LANG_PUSH([C++])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],[AC_MSG_RESULT(yes)],[AC_MSG_ERROR([No C++ compiler found])])
AC_LANG_POP([C++])
-LIBS="-lcdada -lstdc++ ${LIBS}"
AS_CASE(["$WITH_EXTERNAL_DEPS"],
[yes], [],
- [no], [AC_CHECK_LIB([cdada], [cdada_get_ver], [], [AC_MSG_ERROR([Could not find libcdada])])],
+ [no], [AC_LANG_PUSH([C++]) AC_CHECK_LIB([cdada], [cdada_get_ver], [], [AC_MSG_ERROR([Could not find libcdada])]) AC_LANG_POP([C++])],
[])
dnl set debug level