1
0
forked from pool/trigger-rally
Frank Schäfer 2009-03-06 10:00:44 +00:00 committed by Git OBS Bridge
parent 5669b87475
commit d0832b4182

View File

@ -1,230 +0,0 @@
--- Jamconfig.in
+++ Jamconfig.in
@@ -72,9 +72,6 @@
AUDIOLIB_AVAILABLE ?= "@AUDIOLIB_AVAILABLE@" ;
AUDIOLIB_CFLAGS ?= "@AUDIOLIB_CFLAGS@" ;
AUDIOLIB_LIBS ?= "@AUDIOLIB_LIBS@" ;
-AUDIOLIB_AVAILABLE ?= "@AUDIOLIB_AVAILABLE@" ;
-AUDIOLIB_CFLAGS ?= "@AUDIOLIB_CFLAGS@" ;
-AUDIOLIB_LIBS ?= "@AUDIOLIB_LIBS@" ;
PHYSFS_AVAILABLE ?= "@PHYSFS_AVAILABLE@" ;
PHYSFS_CFLAGS ?= "@PHYSFS_CFLAGS@" ;
PHYSFS_LIBS ?= "@PHYSFS_LIBS@" ;
@@ -91,6 +88,8 @@
GL_LIBS ?= "@GL_LIBS@" ;
GLU_CFLAGS ?= "@GLU_CFLAGS@" ;
GLU_LIBS ?= "@GLU_LIBS@" ;
+GLEW_CFLAGS ?= "@GLEW_CFLAGS@" ;
+GLEW_LIBS ?= "@GLEW_LIBS@" ;
prefix ?= "@prefix@" ;
exec_prefix ?= "@exec_prefix@" ;
bindir ?= "@bindir@" ;
--- configure
+++ configure
@@ -311,7 +311,7 @@
# include <unistd.h>
#endif"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os VARIANT CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA SDL_CONFIG CC CFLAGS ac_ct_CC SDL_CFLAGS SDL_LIBS SDLIMAGE_AVAILABLE SDLIMAGE_CFLAGS SDLIMAGE_LIBS AUDIOLIB_AVAILABLE AUDIOLIB_CFLAGS AUDIOLIB_LIBS PHYSFS_AVAILABLE PHYSFS_CFLAGS PHYSFS_LIBS CPP acx_pthread_config PTHREAD_CC PTHREAD_LIBS PTHREAD_CFLAGS EGREP GL_CFLAGS GL_LIBS GLU_CFLAGS GLU_LIBS INSTALL LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os VARIANT CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA SDL_CONFIG CC CFLAGS ac_ct_CC SDL_CFLAGS SDL_LIBS SDLIMAGE_AVAILABLE SDLIMAGE_CFLAGS SDLIMAGE_LIBS AUDIOLIB_AVAILABLE AUDIOLIB_CFLAGS AUDIOLIB_LIBS PHYSFS_AVAILABLE PHYSFS_CFLAGS PHYSFS_LIBS CPP acx_pthread_config PTHREAD_CC PTHREAD_LIBS PTHREAD_CFLAGS EGREP GL_CFLAGS GL_LIBS GLU_CFLAGS GLU_LIBS GLEW_CFLAGS GLEW_LIBS INSTALL LIBOBJS LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
@@ -5226,6 +5226,131 @@
{ (exit 1); exit 1; }; }
fi
+GLEW_CFLAGS="${GL_CFLAGS}"
+if test "X${with_apple_opengl_framework}" != "Xyes"; then
+ echo "$as_me:$LINENO: checking for OpenGL Extension Wrangler library" >&5
+echo $ECHO_N "checking for OpenGL Extension Wrangler library... $ECHO_C" >&6
+if test "${ax_cv_check_glew_libglew+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ax_cv_check_glew_libglew="no"
+ ax_save_CPPFLAGS="${CPPFLAGS}"
+ CPPFLAGS="${GL_CFLAGS} ${CPPFLAGS}"
+ ax_save_LIBS="${LIBS}"
+ LIBS=""
+ ax_check_libs="-lglew32 -lGLEW"
+ for ax_lib in ${ax_check_libs}; do
+ if test X$ax_compiler_ms = Xyes; then
+ ax_try_lib=`echo $ax_lib | sed -e 's/^-l//' -e 's/$/.lib/'`
+ else
+ ax_try_lib="${ax_lib}"
+ fi
+ LIBS="${ax_try_lib} ${GL_LIBS} ${ax_save_LIBS}"
+ #
+ # libGLEW typically links with libstdc++ on POSIX platforms. However,
+ # setting the language to C++ means that test program source is named
+ # "conftest.cc"; and Microsoft cl doesn't know what to do with such a
+ # file.
+ #
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ if test X$ax_compiler_ms = Xyes; then
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ fi
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+# if HAVE_WINDOWS_H && defined(_WIN32)
+# include <windows.h>
+# endif
+# include <GL/glew.h>
+int
+main ()
+{
+glewInit();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ax_cv_check_glew_libglew="${ax_try_lib}"; break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ if test X$ax_compiler_ms = Xyes; then
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ fi
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ done
+ LIBS=${ax_save_LIBS}
+ CPPFLAGS=${ax_save_CPPFLAGS}
+fi
+echo "$as_me:$LINENO: result: $ax_cv_check_glew_libglew" >&5
+echo "${ECHO_T}$ax_cv_check_glew_libglew" >&6
+ if test "X${ax_cv_check_glew_libglew}" = "Xno"; then
+ no_glew="yes"
+ GLEW_CFLAGS=""
+ GLEW_LIBS=""
+ else
+ GLEW_LIBS="${ax_cv_check_glew_libglew} ${GL_LIBS}"
+ fi
+fi
+
+
+
+if test "x$GLEW_CFLAGS" = "x" -a "x$GLEW_LIBS" = "x"; then
+ { { echo "$as_me:$LINENO: error: Couldn't find GLEW library and headers" >&5
+echo "$as_me: error: Couldn't find GLEW library and headers" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
# Um, can't get this to substitute [app]datadir :/
#AC_DEFINE([DATADIR], [$(datadir)], [comment])
@@ -5963,6 +6088,8 @@
s,@GL_LIBS@,$GL_LIBS,;t t
s,@GLU_CFLAGS@,$GLU_CFLAGS,;t t
s,@GLU_LIBS@,$GLU_LIBS,;t t
+s,@GLEW_CFLAGS@,$GLEW_CFLAGS,;t t
+s,@GLEW_LIBS@,$GLEW_LIBS,;t t
s,@INSTALL@,$INSTALL,;t t
s,@LIBOBJS@,$LIBOBJS,;t t
s,@LTLIBOBJS@,$LTLIBOBJS,;t t
--- configure.ac
+++ configure.ac
@@ -123,6 +123,11 @@
AC_MSG_ERROR([Couldn't find GLU library and headers])
fi
+AX_CHECK_GLEW
+if test "x$GLEW_CFLAGS" = "x" -a "x$GLEW_LIBS" = "x"; then
+ AC_MSG_ERROR([Couldn't find GLEW library and headers])
+fi
+
# Um, can't get this to substitute [app]datadir :/
#AC_DEFINE([DATADIR], [$(datadir)], [comment])
--- src/Jamfile
+++ src/Jamfile
@@ -7,7 +7,6 @@
C++FLAGS += -DDATADIR='\"$(datadir)\"' ;
-SubInclude TOP src glew ;
SubInclude TOP src pengine ;
SubInclude TOP src psim ;
SubInclude TOP src trigger ;
--- src/pengine/Jamfile
+++ src/pengine/Jamfile
@@ -3,7 +3,4 @@
Help pengine : "Build the pengine library" ;
Library pengine : [ Wildcard *.c *.cpp *.h ]
[ Wildcard GL : *.h ] ;
-ExternalLibs pengine : SDL SDLIMAGE AUDIOLIB GL GLU PHYSFS ;
-LinkWith pengine : glew ;
-
-IncludeDir pengine : ../glew ;
+ExternalLibs pengine : SDL SDLIMAGE AUDIOLIB GL GLU GLEW PHYSFS ;
--- src/psim/Jamfile
+++ src/psim/Jamfile
@@ -2,6 +2,4 @@
Help psim : "Build the psim library" ;
Library psim : [ Wildcard *.cpp *.h ] ;
-ExternalLibs psim : SDL SDLIMAGE AUDIOLIB GL GLU PHYSFS ;
-
-IncludeDir psim : ../glew ;
+ExternalLibs psim : SDL SDLIMAGE AUDIOLIB GL GLU GLEW PHYSFS ;
--- src/trigger/Jamfile
+++ src/trigger/Jamfile
@@ -2,7 +2,5 @@
Help trigger : "Build trigger (main application)" ;
Application trigger : [ Wildcard *.cpp *.h ] ;
-LinkWith trigger : pengine psim glew ;
-ExternalLibs trigger : SDL SDLIMAGE GL GLU AUDIOLIB PHYSFS ;
-
-IncludeDir trigger : ../glew ;
+LinkWith trigger : pengine psim ;
+ExternalLibs trigger : SDL SDLIMAGE GL GLU GLEW AUDIOLIB PHYSFS ;