dnl Process this file with autoconf to produce a configure script. # Copyright (C) 1996 Keith Whitwell. # This file may only be copied under the terms of the GNU Library General # Public License - see the file COPYING in the lib3d distribution. # Contributed by Markus F.X.J. Oberhumer AC_INIT(src/Node.cc) AC_PREREQ(2.12) AC_CONFIG_AUX_DIR(acconfig) AC_PREFIX_DEFAULT(/usr/local) AM_INIT_AUTOMAKE(lib3d,0.1.9) AM_CONFIG_HEADER(config.h:config.hin) AC_CANONICAL_HOST AM_MAINTAINER_MODE enable_static=no AM_PROG_LIBTOOL lib3d='$(top_builddir)/src/lib3d.la' libprimitive='$(top_builddir)/primitive/libprimitive.la' AC_SUBST(lib3d) AC_SUBST(libprimitive) dnl Checks for programs. AM_PROG_INSTALL AC_PROG_CXX AC_LANG_CPLUSPLUS AC_PATH_X dnl *** Set debug flags here *** if test "$GCC" = yes; then CXXFLAGS="-O2 -Wall -Winline -fomit-frame-pointer -fconserve-space -DNO_DEBUG" dnl CXXFLAGS="-g -fno-inline -Wall -Winline" CXXFLAGS="$CXXFLAGS -Wpointer-arith -Wcast-align -Wbad-function-cast -Wwrite-strings" if test "x$depend" = x ; then depend="\$(CXX) \$(INCLUDES) -M \$(SOURCES) > depend.mkf" fi else CXXFLAGS="-O -DNO_DEBUG" AC_CHECK_PROG(depend,makedepend,makedepend \$(INCLUDES) -- \$(SOURCES), @echo no makedepend autodetected,,,) fi dnl AC_MSG_CHECKING(machine specific fpu control) case "$host" in i*86-*-linux-*) echo "ix86-linux" arch=i486-unknown-linux.lo ;; *) echo "generic" arch=generic.lo CXXFLAGS="$CXXFLAGS -DROUNDING=0.5" ;; esac dnl If we have X, try to find out what extensions are available. dnl if test "$have_x" = yes; then AC_CHECK_LIB(X11,XOpenDisplay,LIBS="$LIBS -L$x_libraries -lX11"; extra_devices="$extra_devices XDevice.lo XImageDevice.lo XHandler.lo"; extra_demos="$extra_demos testxlib",,"-L$x_libraries") AC_CHECK_LIB(Xext,XShmQueryExtension,LIBS="$LIBS -lXext"; extra_devices="$extra_devices XShmDevice.lo" ,,"-L$x_libraries") AC_CHECK_LIB(Xxf86dga,main,LIBS="$LIBS -lXxf86dga"; extra_devices="$extra_devices DgaDevice.lo" ,,"-L$x_libraries") fi dnl Check for SVGAlib... dnl AC_CHECK_LIB(vga,vga_init,LIBS="$LIBS -lvga"; extra_devices="$extra_devices SvgaDevice.lo",,) dnl Checks for libraries. AC_CHECK_LIB(m, sin) dnl Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS(sys/file.h sys/time.h unistd.h sys/ipc.h sys/shm.h X11/extensions/XShm.h X11/extensions/xf86dga.h) MACH=`uname -m` if test "$GCC" = yes; then case $MACH in i486) CXXFLAGS="$CXXFLAGS -m486";; i586) CXXFLAGS="$CXXFLAGS -m486 -malign-loops=2 -malign-jumps=2 -malign-functions=2";; esac fi dnl Checks for typedefs, structures, and compiler characteristics. AC_TYPE_SIZE_T AC_HEADER_TIME AC_SUBST(depend) AC_SUBST(extra_devices) AC_SUBST(extra_demos) AC_SUBST(dynalinkflag) AC_SUBST(x_includes) AC_SUBST(x_libraries) AC_SUBST(arch) AC_OUTPUT(Makefile src/Makefile primitive/Makefile demos/Makefile)