Commit 73482144 authored by Alexandre Julliard's avatar Alexandre Julliard

Merged some of the header checks to reduce the size of the generated

configure script a bit.
parent a02c5f83
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -172,11 +172,15 @@ dnl **** Check for header files **** ...@@ -172,11 +172,15 @@ dnl **** Check for header files ****
AC_CHECK_HEADERS(\ AC_CHECK_HEADERS(\
IOKit/IOKitLib.h \ IOKit/IOKitLib.h \
alsa/asoundlib.h \
arpa/inet.h \ arpa/inet.h \
arpa/nameser.h \ arpa/nameser.h \
asm/types.h \ asm/types.h \
capi20.h \
cups/cups.h \ cups/cups.h \
curses.h \
direct.h \ direct.h \
dlfcn.h \
elf.h \ elf.h \
float.h \ float.h \
fontconfig/fontconfig.h \ fontconfig/fontconfig.h \
...@@ -187,10 +191,12 @@ AC_CHECK_HEADERS(\ ...@@ -187,10 +191,12 @@ AC_CHECK_HEADERS(\
jack/jack.h \ jack/jack.h \
jpeglib.h \ jpeglib.h \
lber.h \ lber.h \
lcms/lcms.h \
lcms.h \ lcms.h \
lcms/lcms.h \
ldap.h \ ldap.h \
libaudioio.h \
link.h \ link.h \
linux/capi.h \
linux/cdrom.h \ linux/cdrom.h \
linux/compiler.h \ linux/compiler.h \
linux/hdreg.h \ linux/hdreg.h \
...@@ -204,7 +210,9 @@ AC_CHECK_HEADERS(\ ...@@ -204,7 +210,9 @@ AC_CHECK_HEADERS(\
mach/machine.h \ mach/machine.h \
machine/cpu.h \ machine/cpu.h \
machine/limits.h \ machine/limits.h \
machine/soundcard.h \
mntent.h \ mntent.h \
ncurses.h \
netdb.h \ netdb.h \
netinet/in.h \ netinet/in.h \
netinet/in_systm.h \ netinet/in_systm.h \
...@@ -217,15 +225,17 @@ AC_CHECK_HEADERS(\ ...@@ -217,15 +225,17 @@ AC_CHECK_HEADERS(\
pwd.h \ pwd.h \
regex.h \ regex.h \
sched.h \ sched.h \
scsi/sg.h \
scsi/scsi.h \ scsi/scsi.h \
scsi/scsi_ioctl.h \ scsi/scsi_ioctl.h \
scsi/sg.h \
soundcard.h \
stdint.h \ stdint.h \
strings.h \ strings.h \
sys/asoundlib.h \
sys/cdio.h \ sys/cdio.h \
sys/elf32.h \ sys/elf32.h \
sys/errno.h \
sys/epoll.h \ sys/epoll.h \
sys/errno.h \
sys/exec_elf.h \ sys/exec_elf.h \
sys/filio.h \ sys/filio.h \
sys/ioctl.h \ sys/ioctl.h \
...@@ -244,7 +254,7 @@ AC_CHECK_HEADERS(\ ...@@ -244,7 +254,7 @@ AC_CHECK_HEADERS(\
sys/signal.h \ sys/signal.h \
sys/socket.h \ sys/socket.h \
sys/sockio.h \ sys/sockio.h \
sys/statfs.h \ sys/soundcard.h \
sys/statvfs.h \ sys/statvfs.h \
sys/strtio.h \ sys/strtio.h \
sys/syscall.h \ sys/syscall.h \
...@@ -253,11 +263,11 @@ AC_CHECK_HEADERS(\ ...@@ -253,11 +263,11 @@ AC_CHECK_HEADERS(\
sys/times.h \ sys/times.h \
sys/uio.h \ sys/uio.h \
sys/un.h \ sys/un.h \
sys/vfs.h \
sys/vm86.h \ sys/vm86.h \
sys/wait.h \ sys/wait.h \
syscall.h \ syscall.h \
termios.h \ termios.h \
unicode/ubidi.h \
unistd.h \ unistd.h \
utime.h \ utime.h \
valgrind/memcheck.h valgrind/memcheck.h
...@@ -273,21 +283,22 @@ then ...@@ -273,21 +283,22 @@ then
CPPFLAGS="$CPPFLAGS $X_CFLAGS" CPPFLAGS="$CPPFLAGS $X_CFLAGS"
dnl *** All of the following tests require X11/Xlib.h dnl *** All of the following tests require X11/Xlib.h
AC_CHECK_HEADERS(X11/Xlib.h, AC_CHECK_HEADERS([X11/Xlib.h \
[ X11/XKBlib.h \
AC_CHECK_HEADERS([X11/XKBlib.h \ X11/Xutil.h \
X11/Xutil.h \ X11/extensions/shape.h \
X11/extensions/shape.h \ X11/extensions/XInput.h \
X11/extensions/XInput.h \ X11/extensions/XShm.h \
X11/extensions/XShm.h \ X11/extensions/Xrandr.h \
X11/extensions/Xrandr.h \ X11/extensions/Xrender.h \
X11/extensions/Xrender.h \ X11/extensions/xf86dga.h \
X11/extensions/xf86dga.h \ X11/extensions/xf86vmode.h],,,
X11/extensions/xf86vmode.h],,, [#ifdef HAVE_X11_XLIB_H
[#include <X11/Xlib.h> # include <X11/Xlib.h>
#ifdef HAVE_X11_XUTIL_H #endif
# include <X11/Xutil.h> #ifdef HAVE_X11_XUTIL_H
#endif]) # include <X11/Xutil.h>
#endif])
dnl *** Check for X keyboard extension dnl *** Check for X keyboard extension
if test "$ac_cv_header_X11_XKBlib_h" = "yes" if test "$ac_cv_header_X11_XKBlib_h" = "yes"
...@@ -350,16 +361,17 @@ then ...@@ -350,16 +361,17 @@ then
[Define if Xrender has the XRenderSetPictureTransform function])],, [Define if Xrender has the XRenderSetPictureTransform function])],,
$X_LIBS -lXext -lX11 $X_EXTRA_LIBS) $X_LIBS -lXext -lX11 $X_EXTRA_LIBS)
fi fi
] dnl *** End of X11/Xlib.h check
) dnl *** End of X11/Xlib.h check
dnl Check for the presence of OpenGL dnl Check for the presence of OpenGL
if test "x$with_opengl" != "xno" if test "x$with_opengl" != "xno"
then then
AC_CHECK_HEADERS(GL/gl.h GL/glx.h) AC_CHECK_HEADERS(GL/gl.h GL/glx.h GL/glext.h,,,
[#ifdef HAVE_GL_GLX_H
# include <GL/glx.h>
#endif])
if test "$ac_cv_header_GL_gl_h" = "yes" -a "$ac_cv_header_GL_glx_h" = "yes" if test "$ac_cv_header_GL_gl_h" = "yes" -a "$ac_cv_header_GL_glx_h" = "yes"
then then
AC_CHECK_HEADERS(GL/glext.h,,,[#include <GL/glx.h>])
dnl Check for some problems due to old Mesa versions dnl Check for some problems due to old Mesa versions
AC_CACHE_CHECK([for up-to-date OpenGL version], wine_cv_opengl_version_OK, AC_CACHE_CHECK([for up-to-date OpenGL version], wine_cv_opengl_version_OK,
AC_TRY_COMPILE( AC_TRY_COMPILE(
...@@ -441,14 +453,17 @@ dnl **** Check which curses lib to use *** ...@@ -441,14 +453,17 @@ dnl **** Check which curses lib to use ***
CURSESLIBS="" CURSESLIBS=""
if test "x$with_curses" != "xno" if test "x$with_curses" != "xno"
then then
AC_CHECK_HEADERS(ncurses.h, if test "$ac_cv_header_ncurses_h" = "yes"
[AC_CHECK_LIB(ncurses,waddch, then
AC_CHECK_LIB(ncurses,waddch,
[AC_DEFINE(HAVE_LIBNCURSES, 1, [Define if you have the ncurses library (-lncurses)]) [AC_DEFINE(HAVE_LIBNCURSES, 1, [Define if you have the ncurses library (-lncurses)])
CURSESLIBS="-lncurses"], CURSESLIBS="-lncurses"])
[AC_CHECK_HEADERS(curses.h, elif test "$ac_cv_header_curses_h" = "yes"
[AC_CHECK_LIB(curses,waddch, then
[AC_DEFINE(HAVE_LIBCURSES, 1, [Define if you have the curses library (-lcurses)]) AC_CHECK_LIB(curses,waddch,
CURSESLIBS="-lcurses"])])])]) [AC_DEFINE(HAVE_LIBCURSES, 1, [Define if you have the curses library (-lcurses)])
CURSESLIBS="-lcurses"])
fi
fi fi
AC_SUBST(CURSESLIBS) AC_SUBST(CURSESLIBS)
...@@ -479,7 +494,6 @@ AC_SUBST(SANELIBS) ...@@ -479,7 +494,6 @@ AC_SUBST(SANELIBS)
AC_SUBST(SANEINCL) AC_SUBST(SANEINCL)
dnl **** Check for the ICU library **** dnl **** Check for the ICU library ****
AC_CHECK_HEADERS(unicode/ubidi.h)
if test "$ac_cv_header_unicode_ubidi_h" = "yes" if test "$ac_cv_header_unicode_ubidi_h" = "yes"
then then
saved_libs="$LIBS" saved_libs="$LIBS"
...@@ -654,8 +668,6 @@ AC_CHECK_FUNCS(\ ...@@ -654,8 +668,6 @@ AC_CHECK_FUNCS(\
LIBS="$ac_save_LIBS" LIBS="$ac_save_LIBS"
dnl **** Check for Open Sound System **** dnl **** Check for Open Sound System ****
AC_CHECK_HEADERS(sys/soundcard.h machine/soundcard.h soundcard.h, break)
AC_CACHE_CHECK([for Open Sound System], AC_CACHE_CHECK([for Open Sound System],
ac_cv_c_opensoundsystem, ac_cv_c_opensoundsystem,
AC_TRY_COMPILE([ AC_TRY_COMPILE([
...@@ -748,7 +760,6 @@ fi ...@@ -748,7 +760,6 @@ fi
dnl **** Check for ALSA 1.x **** dnl **** Check for ALSA 1.x ****
AC_SUBST(ALSALIBS,"") AC_SUBST(ALSALIBS,"")
AC_CHECK_HEADERS(alsa/asoundlib.h sys/asoundlib.h, break)
if test "$ac_cv_header_sys_asoundlib_h" = "yes" -o "$ac_cv_header_alsa_asoundlib_h" = "yes" if test "$ac_cv_header_sys_asoundlib_h" = "yes" -o "$ac_cv_header_alsa_asoundlib_h" = "yes"
then then
AC_CHECK_LIB(asound,snd_pcm_hw_params_get_access, AC_CHECK_LIB(asound,snd_pcm_hw_params_get_access,
...@@ -765,20 +776,19 @@ fi ...@@ -765,20 +776,19 @@ fi
dnl **** Check for libaudioio (which can be used to get solaris audio support) **** dnl **** Check for libaudioio (which can be used to get solaris audio support) ****
AC_SUBST(AUDIOIOLIBS,"") AC_SUBST(AUDIOIOLIBS,"")
AC_CHECK_HEADERS(libaudioio.h, if test "$ac_cv_header_libaudioio_h" = "yes"
[AC_CHECK_LIB(audioio,AudioIOGetVersion, then
AC_CHECK_LIB(audioio,AudioIOGetVersion,
[AUDIOIOLIBS="-laudioio" [AUDIOIOLIBS="-laudioio"
AC_DEFINE(HAVE_LIBAUDIOIO, 1, [Define if you have libaudioIO])])]) AC_DEFINE(HAVE_LIBAUDIOIO, 1, [Define if you have libaudioIO])])
fi
dnl **** Check for capi4linux **** dnl **** Check for capi4linux ****
AC_CHECK_HEADERS(capi20.h,[ if test "$ac_cv_header_capi20_h" = "yes" -a "$ac_cv_header_linux_capi_h" = "yes"
AC_CHECK_HEADERS(linux/capi.h,[ then
AC_CHECK_LIB(capi20,capi20_register,[ AC_CHECK_LIB(capi20,capi20_register,[AC_DEFINE(HAVE_CAPI4LINUX,1,[Define if you have capi4linux libs and headers])])
AC_DEFINE(HAVE_CAPI4LINUX,1,[Define if you have capi4linux libs and headers]) fi
])
])
])
dnl **** Check for broken glibc mmap64 **** dnl **** Check for broken glibc mmap64 ****
...@@ -962,13 +972,16 @@ case $host_os in ...@@ -962,13 +972,16 @@ case $host_os in
WIN16_INSTALL="" WIN16_INSTALL=""
;; ;;
*) *)
AC_CHECK_HEADERS(dlfcn.h, if test "$ac_cv_header_dlfcn_h" = "yes"
[AC_CHECK_FUNCS(dlopen,, then
AC_CHECK_FUNCS(dlopen,,
[AC_CHECK_LIB(dl,dlopen, [AC_CHECK_LIB(dl,dlopen,
[AC_DEFINE(HAVE_DLOPEN,1,[Define if you have dlopen]) [AC_DEFINE(HAVE_DLOPEN,1,[Define if you have dlopen])
DLLIBS="-ldl"], DLLIBS="-ldl"],
[LIBEXT="a"])])], [LIBEXT="a"])])
[LIBEXT="a"]) else
LIBEXT="a"
fi
if test "$LIBEXT" = "so" if test "$LIBEXT" = "so"
then then
...@@ -1220,13 +1233,13 @@ AC_CHECK_FUNCS(\ ...@@ -1220,13 +1233,13 @@ AC_CHECK_FUNCS(\
dnl **** Checks for headers that depend on other ones **** dnl **** Checks for headers that depend on other ones ****
AC_CHECK_HEADERS(sys/mount.h sys/user.h,,, AC_CHECK_HEADERS([sys/mount.h sys/statfs.h sys/user.h sys/vfs.h],,,
[#include <sys/types.h> [#include <sys/types.h>
#if HAVE_SYS_PARAM_H #if HAVE_SYS_PARAM_H
# include <sys/param.h> # include <sys/param.h>
#endif]) #endif])
AC_CHECK_HEADERS([net/if.h net/if_arp.h net/if_dl.h net/if_types.h net/route.h],,, AC_CHECK_HEADERS([net/if.h net/if_arp.h net/if_dl.h net/if_types.h net/route.h netipx/ipx.h],,,
[#include <sys/types.h> [#include <sys/types.h>
#if HAVE_SYS_SOCKET_H #if HAVE_SYS_SOCKET_H
# include <sys/socket.h> # include <sys/socket.h>
...@@ -1246,9 +1259,7 @@ AC_CHECK_HEADERS([resolv.h],,, ...@@ -1246,9 +1259,7 @@ AC_CHECK_HEADERS([resolv.h],,,
AC_CHECK_HEADERS(ucontext.h,,,[#include <signal.h>]) AC_CHECK_HEADERS(ucontext.h,,,[#include <signal.h>])
dnl **** Check for v4l(2) headers **** AC_CHECK_HEADERS([linux/ipx.h linux/videodev.h],,,
AC_CHECK_HEADERS(linux/videodev.h,,,
[#ifdef HAVE_SYS_TIME_H [#ifdef HAVE_SYS_TIME_H
#include <sys/time.h> #include <sys/time.h>
#endif #endif
...@@ -1257,44 +1268,6 @@ AC_CHECK_HEADERS(linux/videodev.h,,, ...@@ -1257,44 +1268,6 @@ AC_CHECK_HEADERS(linux/videodev.h,,,
#include <asm/types.h> #include <asm/types.h>
#endif]) #endif])
dnl **** Check for IPX headers (currently Linux only) ****
AC_CACHE_CHECK([for GNU style IPX support], ac_cv_c_ipx_gnu,
AC_TRY_COMPILE(
[#include <sys/types.h>
#ifdef HAVE_SYS_SOCKET_H
# include <sys/socket.h>
#endif
#include <netipx/ipx.h>],
[((struct sockaddr_ipx *)0)->sipx_family == AF_IPX],
[ac_cv_c_ipx_gnu="yes"],
[ac_cv_c_ipx_gnu="no"])
)
if test "$ac_cv_c_ipx_gnu" = "yes"
then
AC_DEFINE(HAVE_IPX_GNU, 1, [Define if IPX should use netipx/ipx.h from libc])
fi
if test "$ac_cv_c_ipx_gnu" = "no"
then
AC_CACHE_CHECK([for linux style IPX support], ac_cv_c_ipx_linux,
AC_TRY_COMPILE(
[#include <sys/types.h>
#ifdef HAVE_SYS_SOCKET_H
# include <sys/socket.h>
#endif
#include <asm/types.h>
#include <linux/ipx.h>],
[((struct sockaddr_ipx *)0)->sipx_family == AF_IPX],
[ac_cv_c_ipx_linux="yes"],
[ac_cv_c_ipx_linux="no"])
)
if test "$ac_cv_c_ipx_linux" = "yes"
then
AC_DEFINE(HAVE_IPX_LINUX, 1, [Define if IPX includes are taken from Linux kernel])
fi
fi
dnl **** Check for types **** dnl **** Check for types ****
AC_C_CONST AC_C_CONST
......
...@@ -19,6 +19,8 @@ ...@@ -19,6 +19,8 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#include "config.h"
#include <string.h> #include <string.h>
#include <stdarg.h> #include <stdarg.h>
#include <stdio.h> #include <stdio.h>
......
...@@ -94,11 +94,11 @@ ...@@ -94,11 +94,11 @@
#ifdef HAVE_NET_IF_H #ifdef HAVE_NET_IF_H
# include <net/if.h> # include <net/if.h>
#endif #endif
#ifdef HAVE_IPX_GNU
#ifdef HAVE_NETIPX_IPX_H
# include <netipx/ipx.h> # include <netipx/ipx.h>
# define HAVE_IPX # define HAVE_IPX
#endif #elif defined(HAVE_LINUX_IPX_H)
#ifdef HAVE_IPX_LINUX
# ifdef HAVE_ASM_TYPES_H # ifdef HAVE_ASM_TYPES_H
# include <asm/types.h> # include <asm/types.h>
# endif # endif
......
...@@ -233,12 +233,6 @@ ...@@ -233,12 +233,6 @@
/* Define to 1 if you have the <io.h> header file. */ /* Define to 1 if you have the <io.h> header file. */
#undef HAVE_IO_H #undef HAVE_IO_H
/* Define if IPX should use netipx/ipx.h from libc */
#undef HAVE_IPX_GNU
/* Define if IPX includes are taken from Linux kernel */
#undef HAVE_IPX_LINUX
/* Define to 1 if you have the `iswalnum' function. */ /* Define to 1 if you have the `iswalnum' function. */
#undef HAVE_ISWALNUM #undef HAVE_ISWALNUM
...@@ -350,6 +344,9 @@ ...@@ -350,6 +344,9 @@
/* Define to 1 if you have the <linux/ioctl.h> header file. */ /* Define to 1 if you have the <linux/ioctl.h> header file. */
#undef HAVE_LINUX_IOCTL_H #undef HAVE_LINUX_IOCTL_H
/* Define to 1 if you have the <linux/ipx.h> header file. */
#undef HAVE_LINUX_IPX_H
/* Define to 1 if you have the <linux/joystick.h> header file. */ /* Define to 1 if you have the <linux/joystick.h> header file. */
#undef HAVE_LINUX_JOYSTICK_H #undef HAVE_LINUX_JOYSTICK_H
...@@ -422,6 +419,9 @@ ...@@ -422,6 +419,9 @@
/* Define to 1 if you have the <netinet/tcp.h> header file. */ /* Define to 1 if you have the <netinet/tcp.h> header file. */
#undef HAVE_NETINET_TCP_H #undef HAVE_NETINET_TCP_H
/* Define to 1 if you have the <netipx/ipx.h> header file. */
#undef HAVE_NETIPX_IPX_H
/* Define to 1 if you have the <net/if_arp.h> header file. */ /* Define to 1 if you have the <net/if_arp.h> header file. */
#undef HAVE_NET_IF_ARP_H #undef HAVE_NET_IF_ARP_H
......
...@@ -35,11 +35,10 @@ ...@@ -35,11 +35,10 @@
#include <stdio.h> #include <stdio.h>
#include <stdarg.h> #include <stdarg.h>
#include <stdlib.h> #include <stdlib.h>
#ifdef HAVE_CURSES_H
#include <curses.h>
#endif
#ifdef HAVE_NCURSES_H #ifdef HAVE_NCURSES_H
#include <ncurses.h> # include <ncurses.h>
#elif defined(HAVE_CURSES_H)
# include <curses.h>
#endif #endif
#undef KEY_EVENT /* avoid redefinition warning */ #undef KEY_EVENT /* avoid redefinition warning */
#ifdef HAVE_UNISTD_H #ifdef HAVE_UNISTD_H
......
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