From: Sven Panne Date: Mon, 3 Jan 2005 10:57:58 +0000 (+0000) Subject: autoconf'd and handling X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=commitdiff_plain;ds=sidebyside;h=db165b756c33137939afe0d77b8c01d120892693;hp=2c9161e532490d2623896ad4720fb5e7bb6480bb;p=freeglut autoconf'd and handling git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@550 7f0cb862-5218-0410-a997-914c9d46530a --- diff --git a/configure.ac b/configure.ac index 9d5bc07..a1f37be 100644 --- a/configure.ac +++ b/configure.ac @@ -23,7 +23,7 @@ AC_SUBST([LIBXXF86VM]) # Checks for header files. AC_HEADER_STDC -AC_CHECK_HEADERS([sys/time.h GL/gl.h GL/glu.h GL/glx.h]) +AC_CHECK_HEADERS([GL/gl.h GL/glu.h GL/glx.h fcntl.h sys/ioctl.h sys/time.h]) AC_HEADER_TIME save_CFLAGS="$CFLAGS" @@ -32,6 +32,7 @@ AC_CHECK_HEADERS([X11/extensions/xf86vmode.h], [], [], [#include ]) CFLAGS="$save_CFLAGS" # Checks for library functions. +AC_PROG_GCC_TRADITIONAL AC_CHECK_LIBM AC_SUBST([LIBM]) diff --git a/src/freeglut_joystick.c b/src/freeglut_joystick.c index fb77bb4..061a038 100644 --- a/src/freeglut_joystick.c +++ b/src/freeglut_joystick.c @@ -68,11 +68,16 @@ #if TARGET_HOST_UNIX_X11 # define _JS_MAX_AXES 16 +# if HAVE_SYS_IOCTL_H +# include +# endif +# if HAVE_FCNTL_H +# include +# endif # if defined(__FreeBSD__) || defined(__NetBSD__) /* XXX The below hack is done until freeglut's autoconf is updated. */ # define HAVE_USB_JS 1 -# include # if defined(__FreeBSD__) && __FreeBSD_version >= 500000 # include # else @@ -89,11 +94,9 @@ # define JS_RETURN (sizeof(struct JS_DATA_TYPE)) # endif -# include # include # if defined(__linux__) -# include # include /* check the joystick driver version */