# -*- Autoconf -*- # Process this file with autoconf to produce a configure script. AC_PREREQ(2.59) AC_INIT(orxonox, 0.1-pre-alpha, orxonox-dev@mail.datacore.ch) AM_INIT_AUTOMAKE AC_CONFIG_SRCDIR([.]) AC_CONFIG_HEADER([config.h]) AC_MSG_CHECKING([for mingw]) case `uname` in *MINGW*) mingw=yes MSBITFIELDS="-mms-bitfields" ;; *) mingw=no ;; esac AC_MSG_RESULT([$mingw]) AC_SUBST(MSBITFIELDS) # Checks for programs. AC_PROG_CXX AC_PROG_CC # Checks for libraries. # cheking for libGL AC_CHECK_HEADERS(GL/gl.h ,, [AC_MSG_ERROR([cannot find opengl headers]) ]) # checking for Unix GL AC_CHECK_LIB([GL], [main], FOUND_GL=yes) if test "$FOUND_GL" = "yes" ; then LIBS="$LIBS -lGL" # checking for Windows openGl library else echo "We did not find the Linux opengl Library. Checking for Windows Library" AC_CHECK_LIB([opengl32], [main], FOUND_opengl32=yes, "gl/gl.h") if test "$FOUND_opengl32" = "yes" ; then LIBS="$LIBS -lopengl32" else echo "------------------" echo "opengl not found." echo "please install the opengl package which can be found at http://www.opengl.org" echo "------------------" exit -1 fi fi # cheking for libGLU AC_CHECK_HEADERS(GL/glu.h ,, [AC_MSG_ERROR([cannot find opengl headers]) ]) AC_CHECK_LIB([GLU], [gluProject], FOUND_GLU=yes) if test "$FOUND_GLU" = "yes" ; then LIBS="$LIBS -lGLU" # checking for Windows GLU32 library else echo "We did not find the Linux GLU Library. Checking for Windows Library" AC_CHECK_LIB([glu32], [main], FOUND_glu32=yes) if test "$FOUND_glu32" = "yes" ; then LIBS="$LIBS -lGLU32" else echo "------------------" echo "GLU library not found." echo "please install the GLU library, that should come with openGL, which can be found at http://www.opengl.org" echo "------------------" exit -1 fi fi # FIXME: Replace `main' with a function in `-lOSMesa': AC_CHECK_LIB([OSMesa], [main]) # FIXME: Replace `main' with a function in `-lX11': AC_CHECK_LIB([X11], [main]) # FIXME: Replace `main' with a function in `-lXt': AC_CHECK_LIB([Xt], [main]) # cheking for libglut32 AC_CHECK_HEADERS(GL/glut.h ,, [AC_MSG_ERROR([cannot find glut headers]) ]) AC_CHECK_LIB([glut], [glutInit], FOUND_glut=yes) if test "$FOUND_glut" = "yes" ; then LIBS="$LIBS -lglut" # checking for Windows glut32 library else echo "We did not find the Linux glut Library. Checking for Windows Library" AC_CHECK_LIB([glut32], [main], FOUND_glut32=yes) if test "$FOUND_glut32" = "yes" ; then LIBS="$LIBS -lglut32" else echo "------------------" echo "glut library not found." echo "please install the glut library, which can be found at http://www.xmission.com/~nate/glut.html" echo "------------------" exit -1 fi fi # FIXME: Replace `main' with a function in `-lm': AC_CHECK_LIB([m], [main]) LIBS="$LIBS `pkg-config --libs gtk+-2.0`" # Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS([stdlib.h string.h]) # Checks for typedefs, structures, and compiler characteristics. AC_HEADER_STDBOOL # Checks for library functions. AC_FUNC_MALLOC AC_CHECK_FUNCS([bzero sqrt]) AC_CONFIG_FILES([Makefile console/Makefile gui/Makefile src/Makefile]) AC_OUTPUT