Another commit from hell! Fixes to autoconf for Utah GLX and the base of

support for the return of a glide target.  Things are still a bit broken
however as I need to write glide build rules.  I probably have more to do
in configure.in, I want to make libGL detection work more like Glide's
does now.  The Glide detection rule was lifted almost wholesale from Mesa
because it works and I couldn't write anything that would work better.
This commit is contained in:
Joseph Carter 1999-12-30 08:23:07 +00:00
parent 46c70038b4
commit 36b6af4cd2
3 changed files with 724 additions and 523 deletions

View file

@ -7,4 +7,9 @@ Merge of the QW/Q1 trees done largely by:
Autoconf support:
Loring Holden <lsh@cs.brown.edu>
Joseph Carter <knghtbrd@debian.org>
Bill Currie <bill@taniwha.org>
Sound cleanups:
Ryan C. Gordon <ryan_gordon@hotmail.com>

1057
configure vendored

File diff suppressed because it is too large Load diff

View file

@ -24,20 +24,38 @@ AC_SUBST(RELEASE)
dnl Checks for OGL support
AC_ARG_ENABLE(OpenGLLIB,
[ --enable-OpenGLLIB=ARG Use OpenGL - the libraries are in ARG],
[ --enable-OpenGLLIB=DIR Use OpenGL - the libraries are in DIR],
[HAS_OGL_LIB=yes; OGL_LIB_PATH=$enable_OpenGLLIB;
OGL_LDFLAGS=-L$enable_OpenGLLIB])
AC_SUBST(OGL_LDFLAGS)
AC_ARG_ENABLE(OpenGLINC,
[ --enable-OpenGLINC=ARG Use OpenGL - the include files are in ARG],
[ --enable-OpenGLINC=DIR Use OpenGL - the header files are in DIR],
HAS_OGL_INC=yes; OGL_INC_PATH=$enable_OpenGLINC; OGL_CFLAGS=-I$enable_OpenGLINC)
AC_SUBST(OGL_CFLAGS)
dnl Check for X first...
AC_PATH_XTRA
AC_SUBST(x_libraries)
AC_SUBST(x_includes)
if test "x$no_x" = x; then
HAS_X11=yes
if test "x$x_libraries" != x; then
X_LIB_PATH_L=-L${x_libraries};
else
X_LIB_PATH_L=
fi
AC_CHECK_LIB(Xext, XShmQueryExtension, [X11_SHM_LIB=-lXext],
[X11_SHM_LIB=], ${X_LIB_PATH_L})
AC_SUBST(X11_SHM_LIB)
fi
AC_SUBST(HAS_X11)
if test "x$HAS_OGL_LIB" = x; then
AC_CHECK_LIB(GL, glColor4f, [HAS_OGL_LIB=yes],
AC_CHECK_LIB(MesaGL, glColor4f, [HAS_OGL_LIB=yes],
if test "x$HAS_OGL_INC" != x; then
if test "x$HAS_OGL_LIB" != xyes; then
POSS_OGL_LDFLAGS=`echo $enable_OpenGLINC| sed 's/include/lib/i'`;
AC_MSG_CHECKING(for $POSS_OGL_LDFLAGS/libGL.so)
if test -f "$POSS_OGL_LDFLAGS"/libGL.so; then
@ -46,26 +64,46 @@ AC_CHECK_LIB(GL, glColor4f, [HAS_OGL_LIB=yes],
OGL_LDFLAGS=-L$POSS_OGL_LDFLAGS
OGL_LIB_PATH=$POSS_OGL_LDFLAGS
else
AC_MSG_RESULT(no)
AC_MSG_RESULT(no)
if test "x$x_libraries" != x; then
AC_MSG_CHECKING(for $x_libraries/libGL.so)
if test -f "$x_libraries"/libGL.so; then
AC_MSG_RESULT(yes)
HAS_OGL_LIB=yes
OGL_LDFLAGS=-L$x_libraries
OGL_LIB_PATH=$x_libraries
else
AC_MSG_RESULT(no)
fi
fi
fi
fi
)
)
dnl Need to be able to check /usr/X11R6/lib...
fi
if test "x$HAS_OGL_INC" = x; then
AC_CHECK_HEADER(GL/gl.h, [HAS_OGL_INC=yes],
if test "x$HAS_OGL_LIB" != x; then
POSS_OGL_CFLAGS=`echo $enable_OpenGLLIB| sed 's/lib/include/i'`;
AC_MSG_CHECKING(for $POSS_OGL_CFLAGS/GL/gl.h)
if test -f "$POSS_OGL_CFLAGS/GL/gl.h"; then
HAS_OGL_INC=yes
OGL_CFLAGS=-I$POSS_OGL_CFLAGS
OGL_INC_PATH=$POSS_OGL_CFLAGS
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
if test "x$x_includes" != x; then
AC_MSG_CHECKING(for $x_includes/GL/gl.h)
if test -f "$x_includes"/GL/gl.h; then
HAS_OGL_INC=yes
OGL_CFLAGS=-I$x_includes
OGL_INC_PATH=$x_includes
AC_MSG_RESULT(yes)
else
POSS_OGL_CFLAGS=`echo $enable_OpenGLLIB| sed 's/lib/include/i'`;
AC_MSG_CHECKING(for $POSS_OGL_CFLAGS/GL/gl.h)
if test -f "$POSS_OGL_CFLAGS/GL/gl.h"; then
HAS_OGL_INC=yes
OGL_CFLAGS=-I$POSS_OGL_CFLAGS
OGL_INC_PATH=$POSS_OGL_CFLAGS
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi
fi
fi
fi
)
@ -75,7 +113,11 @@ AC_MSG_CHECKING(for OpenGL support)
if test "x$HAS_OGL_INC" != x; then
if test "x$HAS_OGL_LIB" != x; then
HAS_OGL=yes
AC_MSG_RESULT([yes, include ($OGL_CFLAGS), lib ($OGL_LDFLAGS)])
if test "x$OGL_CFLAGS" != x; then
AC_MSG_RESULT([yes, libraries $OGL_LDFLAGS, headers $OGL_CFLAGS])
else
AC_MSG_RESULT(yes)
fi
if test "x$OGL_LDFLAGS" = x-L; then
AC_MSG_ERROR(OpenGL LDFLAGS is -L with no directory)
fi
@ -108,24 +150,42 @@ AC_CHECK_LIB(vga, vga_getmousetype, [HAS_VGA=yes], [HAS_VGA=])
AC_SUBST(HAS_VGA)
AC_CHECK_LIB(xil,xil_import, [HAS_XIL=yes], [HAS_XIL=])
AC_SUBST(HAS_XIL)
AC_PATH_XTRA
AC_SUBST(x_libraries)
if test "x$no_x" = x; then
HAS_X11=yes
if test "x$x_libraries" != x; then
X_LIB_PATH_L=-L${x_libraries};
else
X_LIB_PATH_L=
dnl Checks for GLIDE support
dnl this rule lifted almost wholesale from Mesa
GLIDE_CFLAGS=""
GLIDE_LDFLAGS=""
AC_ARG_ENABLE(glide,
[ --enable-glide=DIR Use glide with header files found in DIR],
HAS_GLIDE=$withval, HAS_GLIDE=auto
)
if test "x$HAS_GLIDE" != xno; then
if test "x$HAS_GLIDE" != xauto; then
GLIDE_CFLAGS="-I$withval/include"
GLIDE_LDFLAGS="-L$withval/lib"
fi
save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $GLIDE_CFLAGS"
AC_CHECK_HEADER(glide.h, HAS_GLIDE=yes, HAS_GLIDE=no)
if test "x$HAS_GLIDE" != xyes; then
CPPFLAGS="$save_CPPFLAGS -I/usr/include/glide -I/usr/local/include/glide"
AC_CHECK_HEADER(glide/glide.h,
GLIDE_CFLAGS="-I/usr/include/glide -I/usr/local/include/glide"
HAS_GLIDE=yes)
fi
CPPFLAGS="$save_CPPFLAGS"
if test "x$HAS_GLIDE" = xyes; then
AC_CHECK_LIB(glide2x, main, GLIDE_LDFLAGS="$GLIDE_LDFLAGS -lglide2x"
HAS_GLIDE=yes, HAS_GLIDE=no, -lm)
LIBS="$save_LIBS"
fi
if test "x$HAS_GLIDE" != xyes; then
GLIDE_CFLAGS="" GLIDE_LIBS=""
fi
AC_CHECK_LIB(Xext, XShmQueryExtension, [X11_SHM_LIB=-lXext], [X11_SHM_LIB=], ${X_LIB_PATH_L})
AC_SUBST(X11_SHM_LIB)
fi
AC_SUBST(HAS_X11)
dnl Checks for header files.
AC_CHECK_HEADER(glide.h, [HAS_GLIDE=yes], [HAS_GLIDE=])
AC_SUBST(HAS_GLIDE)
AC_SUBST(GLIDE_CFLAGS)
AC_SUBST(GLIDE_LDFLAGS)
dnl Checks for library functions.
AC_PROG_GCC_TRADITIONAL
@ -140,32 +200,33 @@ AC_SUBST(STRICMP_DEF)
# Release (optimized) compiler settings (GCC only)
#
if test "x$RELEASE" = xyes; then
if test "x$GCC" = xyes; then
AC_MSG_CHECKING(for special release compiler settings)
BASE_RELEASE_CFLAGS="-O6 -ffast-math -funroll-loops -fomit-frame-pointer -fexpensive-optimizations"
case "${target}" in
changequote(,)dnl
i[34567]86-*-linux-gnu*)
changequote([,])dnl
case "${target_cpu}" in
i486) GCC_EMULATION="-m486" ;;
i586) GCC_EMULATION="-mpentium" ;;
i686) GCC_EMULATION="-mpentiumpro" ;;
esac
MORE_RELEASE_CFLAGS="${GCC_EMULATION} -malign-loops=2 -malign-jumps=2 -malign-functions=2" ;;
*) MORE_RELEASE_CFLAGS="" ;;
esac
if test "x$MORE_RELEASE_CFLAGS" = x; then
RELEASE_CFLAGS=-O
AC_MSG_RESULT([no - using standard flags])
RELEASE_CFLAGS=$BASE_RELEASE_CFLAGS
else
AC_MSG_RESULT(yes)
RELEASE_CFLAGS="$BASE_RELEASE_CFLAGS $MORE_RELEASE_CFALGS"
fi
else
RELEASE_CFLAGS=-O2
fi
if test "x$GCC" = xyes; then
AC_MSG_CHECKING(for special release compiler settings)
BASE_RELEASE_CFLAGS="-O6 -ffast-math -funroll-loops -fomit-frame-pointer -fexpensive-optimizations"
dnl FIX: Someone PLEASE be so kind as to make this -mcpu stuff sane?
case "${target}" in
changequote(,)dnl
i[34567]86-*-linux-gnu*)
changequote([,])dnl
case "${target_cpu}" in
changequote(,)dnl
i[456]86) CPU_SUBMODEL="-mcpu=${target_cpu}" ;;
changequote([,])dnl
esac
MORE_RELEASE_CFLAGS="${GCC_EMULATION} -malign-loops=2 -malign-jumps=2 -malign-functions=2" ;;
*) MORE_RELEASE_CFLAGS="" ;;
esac
if test "x$MORE_RELEASE_CFLAGS" = x; then
RELEASE_CFLAGS=-O
AC_MSG_RESULT([no])
RELEASE_CFLAGS=$BASE_RELEASE_CFLAGS
else
AC_MSG_RESULT(yes)
RELEASE_CFLAGS="$BASE_RELEASE_CFLAGS $MORE_RELEASE_CFALGS"
fi
else
RELEASE_CFLAGS=-O2
fi
fi
AC_SUBST(RELEASE_CFLAGS)
@ -199,9 +260,9 @@ changequote([,])dnl
CD_AUDIO_SRC="cd_null.c" ;;
esac
if test "x$CD_AUDIO_SRC" = xcd_null.c; then
AC_MSG_RESULT(no - using cd_null.c)
AC_MSG_RESULT(no)
else
AC_MSG_RESULT(yes - $CD_AUDIO_SRC)
AC_MSG_RESULT(yes ($CD_AUDIO_SRC))
fi
AC_SUBST(CD_AUDIO_SRC)
@ -224,9 +285,9 @@ changequote([,])dnl
# XXX - need to add dos, Windows
esac
if test "x$SND_SRC" = xsnd_null.c; then
AC_MSG_RESULT(no - using snd_null.c)
AC_MSG_RESULT(no)
else
AC_MSG_RESULT(yes - $SND_SRC)
AC_MSG_RESULT(yes ($SND_SRC))
fi
AC_SUBST(SND_SRC)
@ -258,9 +319,9 @@ changequote([,])dnl
# XXX - need to add dos, Windows
esac
if test "x$DEFAULT_SYS" = xyes; then
AC_MSG_RESULT(no - using default)
AC_MSG_RESULT([no, using default])
else
AC_MSG_RESULT(yes - $SYS_SRC / $QW_SYS_SRC)
AC_MSG_RESULT(yes ($SYS_SRC $QW_CL_SYS_SRC $QW_SRV_SYS_SRC))
fi
AC_SUBST(SYS_SRC)
AC_SUBST(QW_CL_SYS_SRC)
@ -287,7 +348,7 @@ esac
if test "x$X11_VID_SRC" = x; then
AC_MSG_RESULT(no)
else
AC_MSG_RESULT(yes - $X11_VID_SRC)
AC_MSG_RESULT(yes ($X11_VID_SRC))
fi
AC_SUBST(X11_VID_SRC)