AC_INIT(src/gltext.h) AC_CONFIG_AUX_DIR(config) VERSION=0.3.1 PACKAGE=gltext AC_SUBST(VERSION) AC_SUBST(PACKAGE) AM_INIT_AUTOMAKE($PACKAGE, $VERSION) AC_MSG_WARN(GLText autoconf build system is deprecated.) AC_MSG_WARN(Try running 'scons'.) dnl Checks for options. dnl Checks for programs. AC_PROG_CXX AC_PROG_CXXCPP AC_PROG_MAKE_SET AM_PROG_LIBTOOL dnl If building with gcc, build with all warnings except "class has virtual dnl functions but non-virtual destructor". if test "x$GXX" = "xyes" ; then CXXFLAGS="$CXXFLAGS -Wall -Wno-non-virtual-dtor" fi if test "x$GCC" = "xyes" ; then CFLAGS="$CFLAGS -Wall -Wno-non-virtual-dtor" fi dnl Look for where X is installed AC_PATH_X X_LDFLAGS='' if test "x$x_libraries" != "xNONE" -a "x$x_libraries" != "x" ; then X_LDFLAGS="-L$x_libraries" fi LDFLAGS="$X_LDFLAGS $LDFLAGS" dnl Checks for libraries. AC_PATH_PROG(FT_CONFIG, freetype-config, no, $PATH:/usr/local/bin) if test "$FT_CONFIG" = "" ; then AC_MSG_ERROR(freetype not found) fi FT_FLAGS=`freetype-config --cflags` FT_LIBS=`freetype-config --libs` CXXFLAGS="$FT_FLAGS $CXXFLAGS" LIBS="$FT_LIBS $LIBS" # Check for glutMainLoop in -lglut32. We have to use AC_TRY_LINK because # we need to include glut.h for the link to work. Cygwin has glut32 (native # Win32), and we want to use it over -lglut if we can. AC_MSG_CHECKING(glutMainLoop in -lglut32) GLUT_SAVE_LIBS=$LIBS LIBS="-lglut32 -lopengl32 -lglu32 $LIBS" AC_TRY_LINK( #include , glutMainLoop(); , HAVE_GLUT=true GLUT_SAVE_LIBS=$LIBS AC_MSG_RESULT(yes) , AC_MSG_RESULT(no)) LIBS=$GLUT_SAVE_LIBS if [[ "x$HAVE_GLUT" != "xtrue" ]]; then # Check for glutMainLoop in -lglut. We have to use AC_TRY_LINK because # we need to include glut.h for the link to work. AC_MSG_CHECKING(glutMainLoop in -lglut) GLUT_SAVE_LIBS=$LIBS LIBS="-lglut -lGL -lGLU -lX11 -lXmu $LIBS" AC_TRY_LINK( #include , glutMainLoop(); , HAVE_GLUT=true GLUT_SAVE_LIBS=$LIBS AC_MSG_RESULT(yes) , AC_MSG_RESULT(no)) LIBS=$GLUT_SAVE_LIBS fi if [[ "x$HAVE_GLUT" != "xtrue" ]]; then AC_MSG_WARN(GLUT not found... not building examples) fi AM_CONDITIONAL(BUILD_EXAMPLES, test x$HAVE_GLUT = xtrue) dnl Checks for header files. AC_HEADER_STDC FTCFLAGS=`freetype-config --cflags` CXXFLAGS="$CXXFLAGS $FTCFLAGS" dnl Checks for typedefs, structures, and compiler characteristics. dnl Output makefiles. AC_OUTPUT( Makefile doc/Makefile src/Makefile examples/Makefile examples/alpha/Makefile examples/fps/Makefile examples/simple/Makefile examples/sizes/Makefile)