+###############################################################################
+#
+# Function to work around the fucked up gcc 2.96 included in Red Hat 7.0
+#
+###############################################################################
+
+AC_DEFUN(AC_ESCHEW_REDHAT_GCC_LOSSAGE,
+ [if test -n "$GCC"; then
+ AC_MSG_CHECKING(for Red Hat GCC lossage)
+ AC_CACHE_VAL(ac_cv_red_hat_gcc_lossage,
+ [ac_cv_red_hat_gcc_lossage=no
+ AC_EGREP_CPP(lossage,
+ [#include <stdlib.h>
+ #if !defined(__USE_POSIX) || !defined(__USE_SVID) || !defined(__USE_BSD)
+ lossage
+ #endif
+ ], ac_cv_red_hat_gcc_lossage=yes)
+ ])
+
+ ac_red_hat_gcc_lossage=$ac_cv_red_hat_gcc_lossage
+ if test "$ac_cv_red_hat_gcc_lossage" = yes ; then
+ rh_defines="-D_POSIX_SOURCE -D_SVID_SOURCE -D_BSD_SOURCE";
+ CC="$CC $rh_defines"
+ AC_MSG_RESULT(yes: need $rh_defines)
+ else
+ AC_MSG_RESULT(no)
+ fi
+ fi
+])
+
+