summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMateusz Kaduk <mateusz.kaduk@gmail.com>2005-05-16 16:52:41 +0000
committerMateusz Kaduk <mateusz.kaduk@gmail.com>2005-05-16 16:52:41 +0000
commitda9cb51751aab141adaf7df93ec0afd706f74d03 (patch)
treea7b6d3f0293693964dd920a587fd30615d555ca9
parent5f6a6445d0156cb9728878688e09884b6a2b0188 (diff)
downloadmana-da9cb51751aab141adaf7df93ec0afd706f74d03.tar.gz
mana-da9cb51751aab141adaf7df93ec0afd706f74d03.tar.bz2
mana-da9cb51751aab141adaf7df93ec0afd706f74d03.tar.xz
mana-da9cb51751aab141adaf7df93ec0afd706f74d03.zip
Added --with-opengl option to configure and checking for guichan headers
-rwxr-xr-xconfigure.ac22
-rw-r--r--src/Makefile.am4
2 files changed, 24 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 6df47582..cb04db7a 100755
--- a/configure.ac
+++ b/configure.ac
@@ -53,6 +53,22 @@ AC_CHECK_FUNCS([atexit floor getcwd gethostbyname memset mkdir select socket])
AM_INIT_AUTOMAKE
+dnl Check for guichan headers
+AC_CHECK_HEADERS(guichan.hpp, have_guichan_h=yes, have_guichan_h=no)
+if test "$have_guichan_h" != yes; then
+ AC_MSG_ERROR([*** Library found but cannot find headers (guichan.sf.net) *** ])
+fi
+
+dnl Option to enable OpenGL
+AC_ARG_WITH(opengl,[ --with-opengl use OpenGL ] )
+if test "x$with_opengl" == "xyes"; then
+ with_opengl=yes
+ OPENGL_CFLAGS=' -DUSE_OPENGL'
+ OPENGL_LIBS=' -lGL -lguichan-opengl'
+ AC_SUBST(OPENGL_CFLAGS)
+else
+ with_opengl=no
+fi
dnl FIND_PATH(programm-name, variable-name, list of directories,
dnl if-not-found, test-parameter)
@@ -141,3 +157,9 @@ docs/Makefile
])
AC_OUTPUT
+
+echo
+echo Build with OpenGL........... : $with_opengl
+echo
+echo configure comlete, not type \"make\"
+echo
diff --git a/src/Makefile.am b/src/Makefile.am
index d1f9e6c1..b0323c5f 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -137,6 +137,6 @@ INCLUDES = \
# the library search path.
tmw_LDFLAGS = $(all_libraries) $(LIBSDL_RPATH) -lguichan_sdl -lguichan `pkg-config --libs libxml-2.0`
-tmw_CXXFLAGS = -Wall $(LIBSDL_CFLAGS) `pkg-config --cflags libxml-2.0` -fno-inline
-tmw_LDADD = $(LIBSDL_LIBS) -lguichan_opengl -lguichan -lGL -lphysfs
+tmw_CXXFLAGS = -Wall $(OPENGL_CFLAGS) $(LIBSDL_CFLAGS) `pkg-config --cflags libxml-2.0` -fno-inline
+tmw_LDADD = $(OPENGL_LIBS) $(LIBSDL_LIBS) -lguichan -lphysfs
tmw_TARGET = tmw