1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84
|
dnl Process this file with autoconf to produce a configure script.
AC_INIT(gtkgl/gtkglarea.h)
VERSION=0.6
PACKAGE=gtkglarea
#shared library versioning
GTKGL_LIBRARY_VERSION=0:6:0
# | | |
# +------+ | +---+
# | | |
# current:revision:age
# | | |
# | | +- increment if interfaces have been added
# | | set to zero if interfaces have been removed or changed
# | +- increment if source code has changed
# | set to zero if current is incremented
# +- increment if interfaces have been added, removed or changed
#
AM_INIT_AUTOMAKE($PACKAGE, $VERSION, no-define)
AC_SUBST(GTKGL_LIBRARY_VERSION)
dnl Checks for programs.
AM_PROG_LIBTOOL
AM_SANITY_CHECK
AC_PROG_CC
dnl Check for GTK libraries
AM_PATH_GTK(1.0.0,,AC_MSG_ERROR([Cannot find proper gtk version]))
dnl Check for GL/MesaGL libraries
AC_ARG_WITH(GL-prefix, [ --with-GL-prefix=DIR Prefix where GL/MesaGL is installed])
AC_ARG_WITH(lib-GL, [ --with-lib-GL use '-lGL'])
AC_ARG_WITH(lib-MesaGL, [ --with-lib-MesaGL use '-lMesaGL'])
GL_LDOPTS=""
GL_CFLAGS=""
if test -n "${with_GL_prefix}"; then
GL_LDOPTS="-L${with_GL_prefix}/lib"
GL_CFLAGS="-I${with_GL_prefix}/include"
fi
AC_CHECK_LIB(MesaGL, glBegin, have_MesaGL=yes, ,${GTK_LIBS} ${GL_LDOPTS})
AC_CHECK_LIB(GL, glBegin, have_GL=yes, ,${GTK_LIBS} ${GL_LDOPTS})
if test "$have_GL" != yes && test "$with_lib_GL" = yes; then
AC_MSG_ERROR([Missing GL library])
fi
if test "$have_MesaGL" != yes && test "$with_lib_MesaGL" = yes; then
AC_MSG_ERROR([Missing MesaGL library])
fi
if test "$have_GL" = yes; then
GL_LIBS="${GL_LDOPTS} -lGLU -lGL"
elif test "$have_MesaGL" = yes; then
GL_LIBS="${GL_LDOPTS} -lMesaGLU -lMesaGL"
else
AC_MSG_ERROR([You need GL or MesaGL libraries])
fi
AC_SUBST(GL_CFLAGS)
AC_SUBST(GL_LIBS)
CFLAGS="$CFLAGS $GTK_CFLAGS $GL_CFLAGS"
dnl Checks for header files.
AC_HEADER_STDC
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
dnl Checks for library functions.
AC_OUTPUT(Makefile
gtkgl/Makefile
docs/Makefile
examples/Makefile)
|