dnl Process this file with autoconf to produce a configure script. # # THIS SOFTWARE IS SUBJECT TO COPYRIGHT PROTECTION AND IS OFFERED ONLY # PURSUANT TO THE 3DFX GLIDE GENERAL PUBLIC LICENSE. THERE IS NO RIGHT # TO USE THE GLIDE TRADEMARK WITHOUT PRIOR WRITTEN PERMISSION OF 3DFX # INTERACTIVE, INC. A COPY OF THIS LICENSE MAY BE OBTAINED FROM THE # DISTRIBUTOR OR BY CONTACTING 3DFX INTERACTIVE INC(info@3dfx.com). # THIS PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER # EXPRESSED OR IMPLIED. SEE THE 3DFX GLIDE GENERAL PUBLIC LICENSE FOR A # FULL TEXT OF THE NON-WARRANTY PROVISIONS. # # USE, DUPLICATION OR DISCLOSURE BY THE GOVERNMENT IS SUBJECT TO # RESTRICTIONS AS SET FORTH IN SUBDIVISION (C)(1)(II) OF THE RIGHTS IN # TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 252.227-7013, # AND/OR IN SIMILAR OR SUCCESSOR CLAUSES IN THE FAR, DOD OR NASA FAR # SUPPLEMENT. UNPUBLISHED RIGHTS RESERVED UNDER THE COPYRIGHT LAWS OF # THE UNITED STATES. # # COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED # # $Revision: 1.7.2.4.2.1 $ # $Date: 2001/05/31 19:05:51 $ # AC_INIT(h5/glide3/src/glfb.c) AM_INIT_AUTOMAKE(glide, 3.0) AM_CONFIG_HEADER(swlibs/include/config.h) AC_PREFIX_DEFAULT([/usr]) AC_PATH_X AC_SUBST(x_includes) includedir='${prefix}/include/glide3' # # Variables local to the build. # FX_HW_PROJECTS=glide3 AC_SUBST(FX_HW_PROJECTS) # # --enable-fx-glide-hw chooses which ASIC to build for. # AC_ARG_ENABLE([fx-glide-hw], [ --enable-fx-glide-hw=ASIC Build for the given ASIC h5: Voodoo5 h3: Voodoo3 cvg: Voodoo2 [default=h5]], [FX_GLIDE_HW="${enableval}"],[FX_GLIDE_HW=h5]) case ${FX_GLIDE_HW} in h3) FX_GLIDE_H3=1 AC_DEFINE(FX_GLIDE_H3) ;; h5) FX_GLIDE_H5=1 AC_DEFINE(FX_GLIDE_H5) ;; cvg) FX_GLIDE_CVG=1 AC_DEFINE(FX_GLIDE_CVG) ;; *) AC_MSG_ERROR([Illegal value ($enable_fx_glide_hw) for --enable-fx-glide-hw]) ;; esac AC_SUBST(FX_GLIDE_HW) AM_CONDITIONAL(FX_GLIDE_H3, test x$FX_GLIDE_H3 = x1) AM_CONDITIONAL(FX_GLIDE_H5, test x$FX_GLIDE_H5 = x1) AM_CONDITIONAL(FX_GLIDE_CVG, test x$FX_GLIDE_CVG = x1) # # --enable-fx-dri-build chooses to build with or without DRI. # AC_ARG_ENABLE([fx-dri-build], [ --enable-fx-build-dri Build for DRI. [default=yes]], [case ${enableval} in true|yes) DRI_BUILD=1 ;; false|no) DRI_BUILD=0 ;; *) AC_MSG_ERROR([Illegal value (${enableval}) for --enable-fx-build-dri]) ;; esac],[DRI_BUILD=1]) AM_CONDITIONAL(DRI_BUILD,test x$DRI_BUILD = x1) AC_SUBST(DRI_BUILD) if test "$DRI_BUILD" = "1" then AC_DEFINE(DRI_BUILD) fi # # This is makefile.linux behavior. I don't know exactly # what this does. # AM_CONDITIONAL(HAL_HW, test "$FX_GLIDE_HW"=cvg && test ! -z "$HAL_HW") # # Define debugging # AC_ARG_ENABLE([fx-debug], [ --enable-fx-debug Enable a debugging glide build [default=no]], [case ${enableval} in true|yes) GLIDE_DEBUG=1 ;; false|no) GLIDE_DEBUG=0 ;; *) AC_MSG_ERROR([Illegal value (${enableval}) for --enable-fx-debug]) ;; esac],[GLIDE_DEBUG=0]) AM_CONDITIONAL(GLIDE_DEBUG,test x$GLIDE_DEBUG = x1) AC_SUBST(GLIDE_DEBUG) if test "$GLIDE_DEBUG" = "1" then AC_DEFINE(GLIDE_DEBUG) fi # # Define --enable-amd3d # AC_ARG_ENABLE([amd3d], [ --enable-amd3d Enable AMD 3DNow instructions [default=no]], [case ${enableval} in true|yes) enable_amd3d=true ;; false|no) enable_amd3d=false ;; *) AC_MSG_ERROR([Illegal value (${enableval}) for --enable-amd3d]) ;; esac],[enable_amd3d=false]) AM_CONDITIONAL(GL_AMD3D, test x$enable_amd3d = xtrue) # # --enable-fx-texlib=texus2 enables new texus library. # AC_ARG_ENABLE([fx-texlib], [ --enable-fx-tex=dir Enable enhanced texture utilities library texus - original library texus2 - library for compressed textures [default=texus2]], [case ${enableval} in texus|texus2) TEXTURE_UTILITIES_DIR=${enableval} ;; *) AC_MSG_ERROR([Illegal value (${enableval}) for --enable-fx-texus]) ;; esac],[TEXTURE_UTILITIES_DIR=texus2]) AC_SUBST(TEXTURE_UTILITIES_DIR) # # Architecture # AC_ARG_ENABLE([build-architecture], [ --enable-build-architecture Enable AMD 3DNow instructions [default=current]], [case ${enableval} in i[3456]86|alpha) FX_GLIDE_BUILD_ARCHITECTURE=${enableval} ;; *) AC_MSG_ERROR([Illegal value (${enableval}) for --enable-build-architecture]) ;; esac],[FX_GLIDE_BUILD_ARCHITECTURE=`uname -m`]) AC_SUBST(FX_GLIDE_BUILD_ARCHITECTURE) # Appease automake1.5 about assembly targets ASFLAGS= AC_SUBST(ASFLAGS) # # Various tests needed at points in the build # First, we set defaults. # FX_GLIDE_PACKET_FIFO=true FX_GLIDE3=true FX_GLIDE_PACKET_FIFO=true FX_GLIDE_SW_SETUP=false FX_CHRIS_DENIS_ANTHONY_HACK=false FX_GLIDE_ALT_TAB=false FX_GLIDE_DIRECT_WRITE=false HAL_CSIM=false FX_GLIDE_NO_FIFO=false FX_GLIDE_DEBUG_FIFO=false FX_GLIDE_NO_PLUG=false FX_GLIDE_NO_SPLASH=false GLIDE_SANITY_ALL=false GLIDE_SANITY_SIZE=false FX_DLL_BUILD=false FX_GLIDE_HW_CULL=false # Here we define whether we use C versions of cpu detection and triangle setup FX_GLIDE_CTRISETUP=false FX_GLIDE_C_CPU_DETECT=false # Override based on architecture if test "$FX_GLIDE_BUILD_ARCHITECTURE" = "alpha"; then FX_GLIDE_CTRISETUP=true FX_GLIDE_C_CPU_DETECT=true fi if test "$FX_GLIDE_BUILD_ARCHITECTURE" = "ia64"; then FX_GLIDE_CTRISETUP=true fi # Next, we read some configuration options # statically. This is to avoid creating a bunch of # not-terribly-useful --enable options. # if test -f $srcdir/swlibs/include/make/3dfx.config.sh ; then . $srcdir/swlibs/include/make/3dfx.config.sh fi AM_CONDITIONAL(FX_GLIDE3, test x$FX_GLIDE3 = xtrue) AM_CONDITIONAL(FX_CHRIS_DENIS_ANTHONY_HACK,dnl test x$FX_CHRIS_DENIS_ANTHONY_HACK = xtrue) AM_CONDITIONAL(FX_GLIDE_ALT_TAB,dnl test x$FX_GLIDE_ALT_TAB = xtrue) AM_CONDITIONAL(FX_GLIDE_DIRECT_WRITE,dnl test x$FX_GLIDE_DIRECT_WRITE = xtrue) AM_CONDITIONAL(HAL_CSIM,dnl test x$HAL_CSIM = xtrue) AM_CONDITIONAL(FX_GLIDE_SW_SETUP,dnl test x$FX_GLIDE_SW_SETUP = xtrue) AM_CONDITIONAL(FX_GLIDE_NO_FIFO,dnl test x$FX_GLIDE_NO_FIFO = xtrue) AM_CONDITIONAL(FX_GLIDE_DEBUG_FIFO,dnl test x$FX_GLIDE_DEBUG_FIFO = xtrue) AM_CONDITIONAL(FX_GLIDE_NO_PLUG,dnl test x$FX_GLIDE_NO_PLUG = xtrue) AM_CONDITIONAL(FX_GLIDE_NO_SPLASH,dnl test x$FX_GLIDE_NO_SPLASH = xtrue) AM_CONDITIONAL(GLIDE_SANITY_ALL,dnl test x$GLIDE_SANITY_ALL = xtrue) AM_CONDITIONAL(GLIDE_SANITY_SIZE,dnl test x$GLIDE_SANITY_SIZE = xtrue) AM_CONDITIONAL(FX_DLL_BUILD,dnl test x$FX_DLL_BUILD = xtrue) AM_CONDITIONAL(FX_GLIDE_HW_CULL,dnl test x$FX_GLIDE_HW_CULL = xtrue) AM_CONDITIONAL(FX_GLIDE_CTRISETUP,dnl test x$FX_GLIDE_CTRISETUP = xtrue) AM_CONDITIONAL(FX_GLIDE_C_CPU_DETECT,dnl test x$FX_GLIDE_C_CPU_DETECT = xtrue) AM_CONDITIONAL(FX_GLIDE_PACKET_FIFO,dnl test x$FX_GLIDE_PACKET_FIFO = xtrue) AM_CONDITIONAL(FX_GLIDE_VERTEX_TABLE,dnl test x$FX_GLIDE_VERTEX_TABLE = xtrue) AM_CONDITIONAL(FX_HOOPTI_TRI_SETUP_COMPARE,dnl test x$FX_HOOPTI_TRI_SETUP_COMPARE = xtrue) dnl Checks for programs. AC_PROG_CC AC_PROG_CPP AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(CP, cp, false) AC_PROG_INSTALL AM_PROG_LIBTOOL MAKE="gmake -f makefile.autoconf" AC_SUBST(MAKE) dnl Checks for libraries. dnl Checks for header files. AC_PATH_X AC_SUBST(x_includes) AC_HEADER_DIRENT AC_HEADER_STDC AC_CHECK_HEADERS(fcntl.h limits.h malloc.h sys/ioctl.h sys/time.h unistd.h) dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_C_INLINE AC_TYPE_PID_T AC_TYPE_SIZE_T AC_HEADER_TIME AC_STRUCT_TM dnl Checks for library functions. AC_PROG_GCC_TRADITIONAL AC_FUNC_MEMCMP AC_FUNC_MMAP AC_FUNC_VPRINTF AC_CHECK_FUNCS(ftime gethostname select strcspn strdup strstr strtoul) dnl dnl This is complicated perhaps. We create a makefile by concatenating dnl the two files: dnl o $makefile.in dnl o swlibs/include/make/makefile.autoconf.bottom dnl where $makefile is the makefile name. dnl AC_OUTPUT(build.3dfx makefile.autoconf:makefile.autoconf.in:swlibs/include/make/makefile.autoconf.bottom cvg/makefile.autoconf:cvg/makefile.autoconf.in:swlibs/include/make/makefile.autoconf.bottom cvg/incsrc/makefile.autoconf:cvg/incsrc/makefile.autoconf.in:swlibs/include/make/makefile.autoconf.bottom cvg/init/makefile.autoconf:cvg/init/makefile.autoconf.in:swlibs/include/make/makefile.autoconf.bottom cvg/glide3/makefile.autoconf:cvg/glide3/makefile.autoconf.in:swlibs/include/make/makefile.autoconf.bottom cvg/glide3/src/makefile.autoconf:cvg/glide3/src/makefile.autoconf.in:swlibs/include/make/makefile.autoconf.bottom h3/makefile.autoconf:h3/makefile.autoconf.in:swlibs/include/make/makefile.autoconf.bottom h3/incsrc/makefile.autoconf:h3/incsrc/makefile.autoconf.in:swlibs/include/make/makefile.autoconf.bottom h3/minihwc/makefile.autoconf:h3/minihwc/makefile.autoconf.in:swlibs/include/make/makefile.autoconf.bottom h3/glide3/makefile.autoconf:h3/glide3/makefile.autoconf.in:swlibs/include/make/makefile.autoconf.bottom h3/glide3/src/makefile.autoconf:h3/glide3/src/makefile.autoconf.in:swlibs/include/make/makefile.autoconf.bottom h5/makefile.autoconf:h5/makefile.autoconf.in:swlibs/include/make/makefile.autoconf.bottom h5/glide3/makefile.autoconf:h5/glide3/makefile.autoconf.in:swlibs/include/make/makefile.autoconf.bottom h5/glide3/src/makefile.autoconf:h5/glide3/src/makefile.autoconf.in:swlibs/include/make/makefile.autoconf.bottom h5/incsrc/makefile.autoconf:h5/incsrc/makefile.autoconf.in:swlibs/include/make/makefile.autoconf.bottom h5/minihwc/makefile.autoconf:h5/minihwc/makefile.autoconf.in:swlibs/include/make/makefile.autoconf.bottom swlibs/makefile.autoconf:swlibs/makefile.autoconf.in:swlibs/include/make/makefile.autoconf.bottom swlibs/fxmisc/makefile.autoconf:swlibs/fxmisc/makefile.autoconf.in:swlibs/include/make/makefile.autoconf.bottom swlibs/newpci/makefile.autoconf:swlibs/newpci/makefile.autoconf.in:swlibs/include/make/makefile.autoconf.bottom swlibs/newpci/pcilib/makefile.autoconf:swlibs/newpci/pcilib/makefile.autoconf.in:swlibs/include/make/makefile.autoconf.bottom swlibs/texus/makefile.autoconf:swlibs/texus/makefile.autoconf.in:swlibs/include/make/makefile.autoconf.bottom swlibs/texus/lib/makefile.autoconf:swlibs/texus/lib/makefile.autoconf.in:swlibs/include/make/makefile.autoconf.bottom swlibs/texus2/makefile.autoconf:swlibs/texus2/makefile.autoconf.in:swlibs/include/make/makefile.autoconf.bottom swlibs/texus2/lib/makefile.autoconf:swlibs/texus2/lib/makefile.autoconf.in:swlibs/include/make/makefile.autoconf.bottom swlibs/texus2/cmd/makefile.autoconf:swlibs/texus2/cmd/makefile.autoconf.in:swlibs/include/make/makefile.autoconf.bottom ) AC_OUTPUT_COMMANDS([chmod +x build.3dfx]) echo "Configuration complete." echo "" echo -n "Chipset configured : " if test "$FX_GLIDE_HW" = "cvg" then echo "cvg (Voodoo2)" elif test "$FX_GLIDE_HW" = "h3" then echo "h3 (Voodoo3)" elif test "$FX_GLIDE_HW" = "h5" then echo "h5 (Voodoo5)" fi echo -n "DRI Build: " if test "$DRI_BUILD" = "1" then echo "enabled" else echo "disabled" fi echo -n "Debug code: " if test "$GLIDE_DEBUG" = "1" then echo "enabled" else echo "disabled" fi