Cleaned up X11 extension tests.

This commit is contained in:
John R. Sheets 2000-05-23 21:18:51 +00:00 committed by Alexandre Julliard
parent c804e3eac4
commit f2b77ccb77
2 changed files with 370 additions and 311 deletions

564
configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -140,62 +140,85 @@ then
ac_save_CPPFLAGS="$CPPFLAGS" ac_save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $X_CFLAGS" CPPFLAGS="$CPPFLAGS $X_CFLAGS"
dnl Check for -lXpm dnl *** Check for -lXpm
AC_CHECK_HEADERS(X11/xpm.h) AC_CHECK_HEADERS(X11/xpm.h,
if test "$ac_cv_header_X11_xpm_h" = "yes" [ dnl *** If X11/xpm.h exists...
then AC_CHECK_LIB(Xpm, XpmCreatePixmapFromData,
AC_CHECK_LIB(Xpm,XpmCreatePixmapFromData,AC_DEFINE(HAVE_LIBXXPM) X_PRE_LIBS="$X_PRE_LIBS -lXpm",,$X_LIBS -lXext -lX11 $X_EXTRA_LIBS) [ AC_DEFINE(HAVE_LIBXXPM) X_PRE_LIBS="$X_PRE_LIBS -lXpm"],,
else $X_LIBS -lXext -lX11 $X_EXTRA_LIBS
echo "When compiling with X support, you need the Xpm library, or" )
echo "WINE will not work. This Xpm library is within the following RPM," ],
echo "which you need to install:" [ dnl *** If X11/xpm.h does not exist...
echo "Redhat : xpm, xpm-devel" dnl NOTE: autoconf does not allow commas inside the third
echo "Caldera OpenLinux : xpm, xpm-devel, xpm-devel-static" dnl parameter to AC_CHECK_HEADERS, due to some quoting
dnl magic it does.
echo "Redhat : xpm xpm-devel"
echo "Caldera OpenLinux : xpm xpm-devel xpm-devel-static"
echo "SuSE : xpm" echo "SuSE : xpm"
echo "Debian/Corel Linux: xpm4g, xpm4g-dev" echo "Debian/Corel Linux: xpm4g xpm4g-dev"
echo echo
echo "Or get the sources from ftp.x.org and all its mirror sites from " echo "Or get the sources from ftp.x.org and all its mirror sites from "
echo "the directory /contrib/libraries." echo "the directory /contrib/libraries."
echo echo
exit 1 exit 1
fi ]
)
dnl *** All three of the following tests require X11/Xlib.h
AC_CHECK_HEADERS(X11/Xlib.h,
[
dnl *** Check for X Shm extension
AC_CHECK_HEADERS(X11/extensions/XShm.h,
[ dnl *** If X11/extensions/XShm.h exists...
AC_CHECK_LIB(Xext, XShmQueryExtension,
AC_DEFINE(HAVE_LIBXXSHM),,
$X_LIBS -lXext -lX11 $X_EXTRA_LIBS)
],
AC_MSG_WARN([Xshm extension not found!!])
)
dnl Check for X Shm extension dnl *** Check for XFree86 DGA / DGA 2.0 extension
AC_CHECK_HEADERS(X11/Xlib.h X11/extensions/XShm.h) AC_CHECK_HEADERS(X11/extensions/xf86dga.h,
if test "$ac_cv_header_X11_Xlib_h" = "yes" -a "$ac_cv_header_X11_extensions_XShm_h" = "yes" [ dnl *** If X11/extensions/xf86dga.h exists, check
then dnl *** for XDGAQueryExtension()...
AC_CHECK_LIB(Xext,XShmQueryExtension,AC_DEFINE(HAVE_LIBXXSHM),,$X_LIBS -lXext -lX11 $X_EXTRA_LIBS) AC_CHECK_LIB(Xxf86dga, XDGAQueryExtension,
fi [ dnl *** If found...
dnl Check for XFree86 DGA / DGA 2.0 extension AC_DEFINE(HAVE_LIBXXF86DGA2)
AC_CHECK_HEADERS(X11/Xlib.h X11/extensions/xf86dga.h) AC_DEFINE(HAVE_LIBXXF86DGA)
if test "$ac_cv_header_X11_Xlib_h" = "yes" -a "$ac_cv_header_X11_extensions_xf86dga_h" = "yes" X_PRE_LIBS="$X_PRE_LIBS -lXxf86dga"
then DGA_SRCS='$(DGA_SRCS)'
AC_CHECK_LIB(Xxf86dga, DGA2_SRCS='$(DGA2_SRCS)'
XDGAQueryExtension, ],
AC_DEFINE(HAVE_LIBXXF86DGA2) [ dnl *** If not found, look for XF86DGAQueryExtension()
AC_DEFINE(HAVE_LIBXXF86DGA) dnl *** instead (DGA 2.0 not found)...
X_PRE_LIBS="$X_PRE_LIBS -lXxf86dga" AC_CHECK_LIB(Xxf86dga, XF86DGAQueryExtension,
DGA_SRCS='$(DGA_SRCS)' [ AC_DEFINE(HAVE_LIBXXF86DGA)
DGA2_SRCS='$(DGA2_SRCS)' X_PRE_LIBS="$X_PRE_LIBS -lXxf86dga"
,,$X_LIBS -lXext -lX11 $X_EXTRA_LIBS DGA_SRCS='$(DGA_SRCS)'
) ],,
if test "$ac_cv_lib_Xxf86dga_XDGAQueryExtension" = "no" $X_LIBS -lXext -lX11 $X_EXTRA_LIBS
then )
AC_CHECK_LIB(Xxf86dga,XF86DGAQueryExtension, ],
AC_DEFINE(HAVE_LIBXXF86DGA) $X_LIBS -lXext -lX11 $X_EXTRA_LIBS
X_PRE_LIBS="$X_PRE_LIBS -lXxf86dga" )
DGA_SRCS='$(DGA_SRCS)' ],
,,$X_LIBS -lXext -lX11 $X_EXTRA_LIBS) AC_MSG_WARN([DGA extension not found!!])
fi )
fi
dnl Check for XFree86 VMODE extension dnl *** Check for XFree86 VMODE extension
AC_CHECK_HEADERS(X11/Xlib.h X11/extensions/xf86vmode.h) AC_CHECK_HEADERS(X11/extensions/xf86vmode.h,
if test "$ac_cv_header_X11_Xlib_h" = "yes" -a "$ac_cv_header_X11_extensions_xf86vmode_h" = "yes" [ dnl *** If X11/extensions/xf86vmode.h exists...
then AC_CHECK_LIB(Xxf86vm, XF86VidModeQueryExtension,
AC_CHECK_LIB(Xxf86vm,XF86VidModeQueryExtension,AC_DEFINE(HAVE_LIBXXF86VM) X_PRE_LIBS="$X_PRE_LIBS -lXxf86vm",,$X_LIBS -lXext -lX11 $X_EXTRA_LIBS) [ AC_DEFINE(HAVE_LIBXXF86VM)
fi X_PRE_LIBS="$X_PRE_LIBS -lXxf86vm"
],,
$X_LIBS -lXext -lX11 $X_EXTRA_LIBS
)
],
AC_MSG_WARN([XFree86 VMODE extension not found!!])
)
]
) dnl *** End of X11/Xlib.h check
dnl Check for the presence of OpenGL dnl Check for the presence of OpenGL
if test $OPENGL = "yes" -o $OPENGL = "normal" if test $OPENGL = "yes" -o $OPENGL = "normal"