/* Define to avoid using the passwd/shadow file for authentication. */
#undef WITHOUT_PASSWD
-/* Enable non-POSIX extensions on AIX. */
-#ifndef _ALL_SOURCE
-# undef _ALL_SOURCE
-#endif
-
-/* Enable non-POSIX extensions on ConvexOS. */
-#ifndef _CONVEX_SOURCE
-# undef _CONVEX_SOURCE
-#endif
-
-/* Enable GNU extensions on systems that have them. */
-#ifndef _GNU_SOURCE
-# define _GNU_SOURCE 1
-#endif
-
/* Define to empty if `const' does not conform to ANSI C. */
#undef const
;;
*-*-aix*)
# To get all prototypes (so we pass -Wall)
- CPPFLAGS="${CPPFLAGS} -D_XOPEN_EXTENDED_SOURCE"
- cat >>confdefs.h <<\EOF
-#define _ALL_SOURCE 1
-EOF
-
+ CPPFLAGS="${CPPFLAGS} -D_XOPEN_EXTENDED_SOURCE -D_ALL_SOURCE"
SUDO_LDFLAGS="${SUDO_LDFLAGS} -Wl,-bI:\$(srcdir)/aixcrypt.exp"
if test X"$with_blibpath" != X"no"; then
echo "$as_me:$LINENO: checking if linker accepts -Wl,-blibpath" >&5
: ${mansectform='4'}
;;
*-*-linux*)
+ CPPFLAGS="${CPPFLAGS} -D_GNU_SOURCE"
# Some Linux versions need to link with -lshadow
if test "$CHECKSHADOW" = "true"; then
: ${with_pam='maybe'}
;;
*-convex-bsd*)
- cat >>confdefs.h <<\EOF
-#define _CONVEX_SOURCE 1
-EOF
-
+ CPPFLAGS="${CPPFLAGS} -D_CONVEX_SOURCE"
if test -z "$GCC"; then
CFLAGS="${CFLAGS} -D__STDC__"
fi
: ${mansectsu='1m'}
: ${mansectform='4'}
;;
+ *-gnu*)
+ CPPFLAGS="${CPPFLAGS} -D_GNU_SOURCE"
+ ;;
esac
: ${mansectsu='8'}
-
-
-
-
-
-
-
-
-
;;
*-*-aix*)
# To get all prototypes (so we pass -Wall)
- CPPFLAGS="${CPPFLAGS} -D_XOPEN_EXTENDED_SOURCE"
- SUDO_DEFINE(_ALL_SOURCE)
+ CPPFLAGS="${CPPFLAGS} -D_XOPEN_EXTENDED_SOURCE -D_ALL_SOURCE"
SUDO_LDFLAGS="${SUDO_LDFLAGS} -Wl,-bI:\$(srcdir)/aixcrypt.exp"
if test X"$with_blibpath" != X"no"; then
AC_MSG_CHECKING([if linker accepts -Wl,-blibpath])
: ${mansectform='4'}
;;
*-*-linux*)
+ CPPFLAGS="${CPPFLAGS} -D_GNU_SOURCE"
# Some Linux versions need to link with -lshadow
if test "$CHECKSHADOW" = "true"; then
AC_CHECK_FUNCS(getspnam, , [AC_CHECK_LIB(shadow, getspnam, AC_DEFINE(HAVE_GETSPNAM) [SUDO_LIBS="${SUDO_LIBS} -lshadow"; LIBS="${LIBS} -lshadow"])])
: ${with_pam='maybe'}
;;
*-convex-bsd*)
- SUDO_DEFINE(_CONVEX_SOURCE)
+ CPPFLAGS="${CPPFLAGS} -D_CONVEX_SOURCE"
if test -z "$GCC"; then
CFLAGS="${CFLAGS} -D__STDC__"
fi
: ${mansectsu='1m'}
: ${mansectform='4'}
;;
+ *-gnu*)
+ CPPFLAGS="${CPPFLAGS} -D_GNU_SOURCE"
+ ;;
esac
dnl
dnl
dnl Bits to copy verbatim into config.h.in
dnl
-AH_VERBATIM([_GNU_SOURCE],
-[/* Enable GNU extensions on systems that have them. */
-#ifndef _GNU_SOURCE
-# define _GNU_SOURCE 1
-#endif])
-
-AH_VERBATIM([_ALL_SOURCE],
-[/* Enable non-POSIX extensions on AIX. */
-#ifndef _ALL_SOURCE
-# undef _ALL_SOURCE
-#endif])
-
-AH_VERBATIM([_CONVEX_SOURCE],
-[/* Enable non-POSIX extensions on ConvexOS. */
-#ifndef _CONVEX_SOURCE
-# undef _CONVEX_SOURCE
-#endif])
-
AH_TOP([#ifndef _SUDO_CONFIG_H
#define _SUDO_CONFIG_H])