diff --git a/m4/gnu-source.m4 b/m4/gnu-source.m4 new file mode 100644 index 000000000..d8332f4cb --- /dev/null +++ b/m4/gnu-source.m4 @@ -0,0 +1,17 @@ +# AC_GNU_SOURCE +# -------------- +AC_DEFUN([AC_GNU_SOURCE], +[AH_VERBATIM([_GNU_SOURCE], +[/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# undef _GNU_SOURCE +#endif +/* Enable many GNU extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# undef __EXTENSIONS__ +#endif])dnl +AC_BEFORE([$0], [AC_COMPILE_IFELSE])dnl +AC_BEFORE([$0], [AC_RUN_IFELSE])dnl +AC_DEFINE([_GNU_SOURCE]) +AC_DEFINE([__EXTENSIONS__]) +])