git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@553
7f0cb862-5218-0410-a997-
914c9d46530a
***************************************************************************
(230) Removed acconfig.h, it is deprecated and we don't need it.
+
+(231) Cleaned up and autoconf'd the header inclusion story a bit.
# Checks for header files.
AC_HEADER_STDC
-AC_CHECK_HEADERS([GL/gl.h GL/glu.h GL/glx.h fcntl.h limits.h sys/ioctl.h sys/param.h sys/time.h])
+AC_CHECK_HEADERS([GL/gl.h GL/glu.h GL/glx.h errno.h fcntl.h limits.h sys/ioctl.h sys/param.h sys/time.h])
AC_HEADER_TIME
save_CFLAGS="$CFLAGS"
# if HAVE_FCNTL_H
# include <fcntl.h>
# endif
+# if HAVE_ERRNO_H
+# include <errno.h>
+# endif
# if defined(__FreeBSD__) || defined(__NetBSD__)
/* XXX The below hack is done until freeglut's autoconf is updated. */
# define HAVE_USB_JS 1
# define JS_RETURN (sizeof(struct JS_DATA_TYPE))
# endif
-# include <errno.h>
-
# if defined(__linux__)
# include <linux/joystick.h>
#include <GL/freeglut.h>
#include "freeglut_internal.h"
+#if HAVE_ERRNO_H
+# include <errno.h>
+#endif
-#if TARGET_HOST_UNIX_X11
-#include <errno.h>
-#include <sys/stat.h>
-#elif TARGET_HOST_WIN32
-#elif TARGET_HOST_WINCE
+#if TARGET_HOST_WINCE
typedef struct GXDisplayProperties GXDisplayProperties;
typedef struct GXKeyList GXKeyList;