head 1.10; access; symbols start:1.1.1.1 main:1.1.1; locks; strict; comment @# @; 1.10 date 2004.03.27.00.02.07; author davidr; state Exp; branches; next 1.9; 1.9 date 2004.03.06.13.58.17; author davidr; state Exp; branches; next 1.8; 1.8 date 2004.02.16.22.02.40; author davidr; state Exp; branches; next 1.7; 1.7 date 2004.02.03.15.12.11; author davidr; state Exp; branches; next 1.6; 1.6 date 2003.12.13.10.44.41; author davidr; state Exp; branches; next 1.5; 1.5 date 2003.12.13.02.28.43; author davidr; state Exp; branches; next 1.4; 1.4 date 2003.12.05.23.48.01; author davidr; state Exp; branches; next 1.3; 1.3 date 2003.12.05.21.57.19; author davidr; state Exp; branches; next 1.2; 1.2 date 2003.12.05.01.55.31; author davidr; state Exp; branches; next 1.1; 1.1 date 2003.11.27.11.45.39; author davidr; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 2003.11.27.11.45.39; author davidr; state Exp; branches; next ; desc @@ 1.10 log @Added clipping and new polygon drawing code @ text @# Process this file with autoconf to produce a configure script. AC_INIT(src/glc.h) dnl =========================================================================== # Package version number, (as distinct from shared library version) # This must be manually synchronized with the version in src/glc.h LIBGLC_VERSION=0.1.0 # libtool shared library version # Increment if the interface has additions, changes, removals. LT_CURRENT=1 # Increment any time the source changes; set to # 0 if you increment CURRENT LT_REVISION=0 # Increment if any interfaces have been added; set to 0 # if any interfaces have been removed. removal has # precedence over adding, so set to 0 if both happened. LT_AGE=0 VERSION_INFO="$LT_CURRENT:$LT_REVISION:$LT_AGE" AC_SUBST(VERSION_INFO) dnl =========================================================================== AC_CONFIG_AUX_DIR(config) AM_INIT_AUTOMAKE(libglc, $LIBGLC_VERSION) AM_CONFIG_HEADER(config.h) AM_MAINTAINER_MODE AC_ISC_POSIX AC_PROG_CC AC_PROG_CPP AC_PROG_AWK AM_PROG_LIBTOOL AC_STDC_HEADERS if test "x$GCC" = "xyes"; then case " $CFLAGS " in *[[\ \ ]]-Wall[[\ \ ]]*) ;; *) CFLAGS="$CFLAGS -Wall" ;; esac if test "x$enable_ansi" = "xyes"; then case " $CFLAGS " in *[[\ \ ]]-ansi[[\ \ ]]*) ;; *) CFLAGS="$CFLAGS -ansi" ;; esac case " $CFLAGS " in *[[\ \ ]]-pedantic[[\ \ ]]*) ;; *) CFLAGS="$CFLAGS -pedantic" ;; esac fi fi dnl =========================================================================== AC_ARG_ENABLE(glx, AC_HELP_STRING([--enable-glx], [Enable libglc's GLX backend]), [use_glx=$enableval], [use_glx=no]) AC_ARG_ENABLE(agl, AC_HELP_STRING([--enable-agl], [Enable libglc's AGL backend]), [use_agl=$enableval], [use_agl=no]) if test "x$use_agl" != "xyes"; then use_glx="yes" else if test "x$use_glx" != "xyes"; then use_agl="yes" else AC_MSG_ERROR(libglc cannot be compiled for both GLX and AGL) fi fi dnl =========================================================================== AH_TEMPLATE([XTHREADS], [Define if Xlib supports XTHREADS]) if test "x$use_glx" != "xyes"; then GLX_BACKEND_FEATURE=LIBGLC_HAS_NO_GLX_BACKEND AM_CONDITIONAL(LIBGLC_HAS_GLX_BACKEND, false) else GLX_BACKEND_FEATURE=LIBGLC_HAS_GLX_BACKEND AC_PATH_XTRA GLX_LIBS="$X_LIBS -lX11 -lGL" GLX_CFLAGS="$X_CFLAGS" # Check for XTHREADS save_LIBS="$LIBS" save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $GLX_CFLAGS" LIBS="$LIBS $GLX_LIBS" AC_MSG_CHECKING([for XTHREADS in Xlib]) AC_RUN_IFELSE( [AC_LANG_PROGRAM([[#include ]], [[return XInitThreads() == 0 ? 0 : 1;]])], [xthreads=no], [xthreads=yes], [xthreads=yes]) AC_MSG_RESULT($xthreads) LIBS="$save_LIBS" CFLAGS="$save_CFLAGS" if test "x$xthreads" = "xyes" then GLX_LIBS="$GLX_LIBS -lpthread" AC_DEFINE(XTHREADS, 1) fi AM_CONDITIONAL(LIBGLC_HAS_GLX_BACKEND, true) fi AC_SUBST(GLX_BACKEND_FEATURE) AC_SUBST(GLX_CFLAGS) AC_SUBST(GLX_LIBS) dnl =========================================================================== AH_TEMPLATE([PTHREADS], [Define if PTHREADS are supported]) if test "x$use_agl" != "xyes"; then AGL_BACKEND_FEATURE=LIBGLC_HAS_NO_AGL_BACKEND AM_CONDITIONAL(LIBGLC_HAS_AGL_BACKEND, false) else AC_MSG_CHECKING([for AGL.framework]) save_libs="$LIBS" LIBS="-framework AGL" AC_TRY_LINK_FUNC(aglCreateContext, [use_agl=yes], [use_agl=no]) LIBS="$save_libs" AC_MSG_RESULT([$use_agl]) if test "x$use_agl" != "xyes"; then AC_MSG_ERROR(I need AGL.framework to compile AGL backend) fi save_libs="$LIBS" LIBS="-lpthread" AC_MSG_CHECKING([for PTHREADS]) AC_TRY_LINK_FUNC(pthread_key_create, [use_pthreads=yes], [use_pthreads=no]) LIBS="$save_LIBS" if test "x$use_pthreads" = "xyes" then AGL_LIBS="$AGL_LIBS -lpthread" AC_DEFINE(PTHREADS, 1) fi AC_MSG_RESULT($use_pthreads) AGL_BACKEND_FEATURE=LIBGLC_HAS_AGL_BACKEND AM_CONDITIONAL(LIBGLC_HAS_AGL_BACKEND, true) fi AC_SUBST(AGL_BACKEND_FEATURE) AC_SUBST(AGL_CFLAGS) AC_SUBST(AGL_LIBS) dnl =========================================================================== AC_OUTPUT([ Makefile src/Makefile src/glc-features.h libglc.pc libglc-glx.pc libglc-agl.pc ]) @ 1.9 log @Included our own GL extension definitions @ text @d178 1 @ 1.8 log @Dynamic lookup of all GL and GLX extension symbols @ text @a86 1 AH_TEMPLATE([HAVE_GL_GLXATI_H], [Define if exists]) a121 64 # Check glext.h version AC_MSG_CHECKING(version of GL/glext.h) AC_RUN_IFELSE([ AC_LANG_PROGRAM( [ #include #include ], [ #if GL_GLEXT_VERSION < 21 return 1; #endif ])], AC_MSG_RESULT(ok), AC_MSG_RESULT(failed) AC_MSG_RESULT(** WARNING **: I'd like to have a newer . Please download it from http://oss.sgi.com/projects/ogl-sample/ABI/), AC_MSG_RESULT(ok)) # Check for GLX 1.3 in glx.h AC_MSG_CHECKING(for GLX 1.3 in GL/glx.h) AC_RUN_IFELSE([ AC_LANG_PROGRAM( [ #include ], [ #ifndef GLX_VERSION_1_3 return 1; #endif ])], AC_MSG_RESULT(ok), AC_MSG_RESULT(failed) AC_MSG_RESULT(** WARNING **: is missing GLX 1.3), AC_MSG_RESULT(ok)) # Check glxext.h version AC_MSG_CHECKING(version of GL/glxext.h) AC_RUN_IFELSE([ AC_LANG_PROGRAM( [ #include #include ], [ #if GLX_GLXEXT_VERSION < 5 return 1; #endif ])], AC_MSG_RESULT(ok), AC_MSG_RESULT(failed) AC_MSG_RESULT(** WARNING **: I'd like to have a newer . Please download it from http://oss.sgi.com/projects/ogl-sample/ABI/), AC_MSG_RESULT(ok)) # Check for glxATI.h AC_MSG_CHECKING(for GL/glxATI.h) AC_TRY_COMPILE( [ #include #include ], [], AC_DEFINE(HAVE_GL_GLXATI_H, 1) AC_MSG_RESULT(yes), AC_MSG_RESULT(no)) @ 1.7 log @Restructuring of internal rendering model, AGL backend added @ text @d66 19 a84 2 AC_HELP_STRING([--disable-glx], [Disable libglc's GLX backend]), [use_glx=$enableval], [use_glx=yes]) d123 53 a195 4 AC_ARG_ENABLE(agl, AC_HELP_STRING([--disable-agl], [Disable libglc's AGL backend]), [use_agl=$enableval], [use_agl=yes]) d198 4 a201 1 if test "x$use_agl" = "xyes"; then a207 1 fi d209 4 a212 1 if test "x$use_agl" = "xyes"; then a230 3 else AGL_BACKEND_FEATURE=LIBGLC_HAS_NO_AGL_BACKEND AM_CONDITIONAL(LIBGLC_HAS_AGL_BACKEND, false) @ 1.6 log @Added --disable-glx switch @ text @a29 4 RENDER_REQUIRED=0.8 dnl =========================================================================== a64 14 PKG_CHECK_MODULES(LIBGLC, render >= $RENDER_REQUIRED) AC_SUBST(LIBGLC_CFLAGS) AC_SUBST(LIBGLC_LIBS) dnl =========================================================================== GL_CFLAGS="" GL_LIBS="-lGL" AC_SUBST(GL_CFLAGS) AC_SUBST(GL_LIBS) dnl =========================================================================== d70 1 d78 1 a78 1 GLX_LIBS="$X_LIBS -lX11" a81 1 d106 11 d126 45 d176 1 @ 1.5 log @Directly fold in slim stuff rather than depending on it from an external package @ text @d69 6 d83 3 a85 3 PKG_CHECK_MODULES(LIBGLC, render >= $RENDER_REQUIRED) AC_SUBST(LIBGLC_CFLAGS) AC_SUBST(LIBGLC_LIBS) d87 1 a87 5 dnl =========================================================================== # Check for X AC_PATH_XTRA X_LIBS="$X_LIBS -lX11" d89 1 a89 1 if test "x$have_x" != "xyes"; then d91 1 d94 3 a96 1 fi d98 1 a98 10 AC_SUBST(GLX_BACKEND_FEATURE) AM_CONDITIONAL(LIBGLC_HAS_GLX_BACKEND, test x$have_x = xyes) dnl =========================================================================== # Check for XTHREADS XTHREADS_CFLAGS="" XTHREADS_LIBS="" a99 3 AH_TEMPLATE([XTHREADS], [Define if Xlib supports XTHREADS]) if test "x$have_x" = "xyes"; then d102 2 a103 2 CFLAGS="$CFLAGS $X_CFLAGS" LIBS="$LIBS $X_LIBS" d120 1 a120 2 XTHREADS_CFLAGS="" XTHREADS_LIBS="-lpthread" d123 2 d127 3 a129 2 AC_SUBST(XTHREADS_CFLAGS) AC_SUBST(XTHREADS_LIBS) a133 1 libglc-glx.pc d137 1 @ 1.4 log @pthread linking fix @ text @a29 1 SLIM_REQUIRED=0.2.0 d77 1 a77 1 PKG_CHECK_MODULES(LIBGLC, slim >= $SLIM_REQUIRED render >= $RENDER_REQUIRED) @ 1.3 log @Keeping up with cairo @ text @d129 1 a129 1 XTHREADS_LIBS="-pthread" @ 1.2 log @Added conditional backend building @ text @d89 1 a89 1 GLX_BACKEND_DEFINE=LIBGLC_HAS_NO_GLX_BACKEND d91 1 a91 1 GLX_BACKEND_DEFINE=LIBGLC_HAS_GLX_BACKEND d94 1 a94 1 AC_SUBST(GLX_BACKEND_DEFINE) d96 1 a96 1 AM_CONDITIONAL(HAVE_GLX_BACKEND, test x$have_x = xyes) d143 1 a143 1 src/glc-config.h @ 1.1 log @Initial revision @ text @d68 15 a82 1 dnl ========================================================================== d86 1 d88 4 a91 3 if test "x$no_x" = "xyes" then AC_MSG_ERROR([X is required, but it was either disabled or not found.]) d94 6 d102 16 a117 9 save_LIBS="$LIBS" save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $X_CFLAGS" LIBS="$LIBS $X_LIBS -lX11" AC_MSG_CHECKING([for XTHREADS in Xlib]) AC_TRY_RUN([ #include int main() { return (!(XInitThreads())); }], a118 1 [xthreads=no], d121 1 a121 1 AC_MSG_RESULT($xthreads) d123 2 a124 2 LIBS="$save_LIBS" CFLAGS="$save_CFLAGS" d126 6 a131 3 if test "x$xthreads" = "xyes" then AC_DEFINE(XTHREADS, 1) d134 2 a135 5 dnl =========================================================================== PKG_CHECK_MODULES(LIBGLC, slim >= $SLIM_REQUIRED render >= $RENDER_REQUIRED) AC_SUBST(LIBGLC_CFLAGS) AC_SUBST(LIBGLC_LIBS) d140 1 a140 1 libglc.pc d143 1 @ 1.1.1.1 log @Initial import of libglc code @ text @@