Commit 05b19639 authored by Adam Jackson's avatar Adam Jackson 🎧
Browse files

xproto: Move NARROWPROTO logic out of configure time


Signed-off-by: Adam Jackson's avatarAdam Jackson <ajax@redhat.com>
parent 627f4f40
......@@ -65,10 +65,6 @@ AC_ARG_ENABLE(nested-prototypes,
AS_HELP_STRING([--enable-nested-prototypes],
[nested prototypes are supported (default: auto)]),
[NESTEDPROTO=$enableval], [NESTEDPROTO=auto])
AC_ARG_ENABLE(wide-prototypes,
AS_HELP_STRING([--enable-wide-prototypes],
[widen function prototypes (default: auto)]),
[WIDEPROTO=$enableval], [WIDEPROTO=auto])
AC_CHECK_HEADERS([sys/select.h sys/param.h sys/types.h sys/time.h])
......@@ -219,22 +215,6 @@ else
fi
fi
AC_MSG_CHECKING([whether to widen function prototypes])
if test "x$WIDEPROTO" = xauto; then
case $host_os in
linux*) WIDEPROTO=no ;;
freebsd*) WIDEPROTO=no ;;
netbsd*) WIDEPROTO=no ;;
openbsd*) WIDEPROTO=no ;;
*) WIDEPROTO=yes ;;
esac
fi
AC_MSG_RESULT([$WIDEPROTO])
if test "x$WIDEPROTO" = xno; then
AC_DEFINE(NARROWPROTO, [], [Narrow prototypes])
fi
AC_CONFIG_FILES([applewmproto.pc
bigreqsproto.pc
compositeproto.pc
......
......@@ -48,8 +48,9 @@ in this Software without prior written authorization from The Open Group.
#endif /* _Xconst */
/* Function prototype configuration (see configure for more info) */
#ifndef NARROWPROTO
#undef NARROWPROTO
#if !defined(NARROWPROTO) && \
(defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__))
#define NARROWPROTO
#endif
#ifndef FUNCPROTO
#undef FUNCPROTO
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment