AC_INIT AC_CONFIG_SRCDIR([parser.g]) AM_INIT_AUTOMAKE(lsys,0.6) AM_CONFIG_HEADER(config.h) AC_PROG_CC AC_HEADER_STDC AC_PROG_CXX AC_LANG(C++) AH_TOP([ using namespace std; ]) AC_CHECK_HEADERS(GL/gl.h,[ AC_CHECK_HEADERS(GL/glu.h,[ AC_PATH_X CPPFLAGS="$CPPFLAGS -I$x_includes" LIBS="$LIBS -L$x_libraries -lX11" AC_CHECK_LIB(Xext,XShapeQueryExtension,[ LIBS="$LIBS -lXext" AC_CHECK_LIB(GL,glBegin,[ AC_CHECK_LIB(GLU,gluCylinder,[ LIBS="$LIBS -lGL -lGLU -lpthread" have_gl=1 ],,$LIBS -lGL -lpthread) ],,$LIBS -lpthread) AC_CHECK_LIB(pthread,pthread_create,[PTHREAD=-lpthread]) if test -z "$have_gl" ; then AC_CHECK_LIB(MesaGL,glBegin,[ AC_CHECK_LIB(MesaGLU,gluCylinder,[ LIBS="$LIBS -lMesaGL -lMesaGLU" have_gl=1 if test -n "$PTHREAD" ; then AC_MSG_CHECKING(wether mesa requires $PTHREAD) AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[glBegin()]])],[AC_MSG_RESULT(no)],[AC_MSG_RESULT(yes) LIBS="$LIBS $PTHREAD"]) fi ],,-lMesaGL $PTHREAD) ],,$PTHREAD) fi ]) ]) ]) AC_MSG_CHECKING(for opengl support) if test -n "$have_gl" ; then AC_MSG_RESULT(yes) AC_DEFINE([HAVE_OPENGL], 1, [Define to 1 if opengl support is available.]) else AC_MSG_RESULT(no) fi AC_CHECK_HEADERS(vector algorithm queue map string cstring cmath) AC_PATH_PROG(ANTLR,antlr) if test -n "$ANTLR" ; then AC_MSG_CHECKING(antlr version) changequote(,)dnl ANTLR_VER=`$ANTLR 2>&1 | grep Version | sed -e 's/^.*Version \\([0-9MR.]\\+\\) .*$/\1/'` changequote([,])dnl if test "$ANTLR_VER" = "1.33MR33" ; then AC_MSG_RESULT([$ANTLR_VER, ok]) AC_PATH_PROG(DLG,dlg) if test -n "$DLG" ; then AC_MSG_CHECKING(dlg version) changequote(,)dnl DLG_VER=`$DLG 2>&1 | grep Version | sed -e 's/^.*Version \([0-9MR.]\+\) .*$/\1/'` changequote([,])dnl if test "$DLG_VER" = "1.33MR33" ; then AC_MSG_RESULT([$DLG_VER, ok]) HAVE_PCCTS=1 else AC_MSG_RESULT([$DLG_VER, but need 1.33MR33]) fi fi else AC_MSG_RESULT([$ANTLR_VER, but need 1.33MR33]) fi fi AM_CONDITIONAL(HAVE_PCCTS,test -n "$HAVE_PCCTS") AC_CHECK_HEADERS(getopt.h) AC_CHECK_FUNCS(getopt_long,,[AC_LIBOBJ(getopt)AC_LIBOBJ(getopt1)]) AC_CONFIG_FILES([Makefile]) AC_OUTPUT