diff --git a/Makefile.am b/Makefile.am index 06315c4..d05d3db 100644 --- a/Makefile.am +++ b/Makefile.am @@ -3,7 +3,7 @@ ## If you don't want it to overwrite it, ## Please disable it in the Anjuta project configuration -SUBDIRS = src data +SUBDIRS = include src data bomberclonedocdir = ${prefix}/doc/bomberclone bomberclonedoc_DATA = \ diff --git a/bomberclone.prj b/bomberclone.prj index 51e92c0..c0f725b 100644 --- a/bomberclone.prj +++ b/bomberclone.prj @@ -55,7 +55,7 @@ project.excluded.modules=intl project.config.extra.modules.before= project.config.extra.modules.after= project.config.blocked=0 -project.config.disable.overwriting=1 1 1 0 0 0 1 0 0 +project.config.disable.overwriting=1 1 1 1 1 1 1 1 1 project.menu.entry=bomberclone project.menu.group=Games @@ -80,53 +80,53 @@ preferences.help.browser=devhelp -s '$(current.file.selection)' module.include.name=include module.include.type= -module.include.expanded=0 -module.include.files= +module.include.expanded=1 +module.include.files=\ + basic.h\ + bomberclone.h\ + chat.h\ + gamesrv.h\ + font.h\ + gfx.h\ + keybinput.h\ + map.h\ + network.h\ + packets.h\ + sound.h\ + sysfunc.h module.source.name=src module.source.type= module.source.expanded=1 module.source.files=\ - main.c\ - bomb.c\ - bomberclone.h\ + sysfunc.c\ + udp.c\ + tileset.c\ + special.c\ + sound.c\ + configuration.c\ + chat.c\ debug.c\ - packets.c\ + field.c\ font.c\ - gfx.c\ - player.c\ - packets.h\ + bomb.c\ game.c\ - netmenu.c\ - network.c\ - menu.c\ - field.c\ - network.h\ - configuration.c\ - udp.c\ - sysfunc.c\ - pkgcache.c\ - gamesrv.h\ gamesrv.c\ - gfx.h\ - basic.h\ - chat.c\ - multiwait.c\ - chat.h\ + gfx.c\ + gfxengine.c\ + gfxpixelimage.c\ keybinput.c\ - keybinput.h\ - single.c\ - sysfunc.h\ - mapmenu.c\ - special.c\ - sound.h\ - sound.c\ - font.h\ + main.c\ map.c\ - tileset.c\ - map.h\ - gfxpixelimage.c\ - gfxengine.c + mapmenu.c\ + menu.c\ + multiwait.c\ + netmenu.c\ + network.c\ + packets.c\ + pkgcache.c\ + player.c\ + single.c module.pixmap.name=pixmaps module.pixmap.type= diff --git a/configure.in b/configure.in index 76632b6..21f278b 100644 --- a/configure.in +++ b/configure.in @@ -43,15 +43,67 @@ case "$target" in *cygwin* | *mingw32* | *mingw32msvc* ) CFLAGS="$CFLAGS" LIBS="$LIBS -liberty -lwsock32" + MATHLIB="" + SYS_GL_LIBS="-lopengl32 -lglu32" ;; *solaris* ) CFLAGS="$CFLAGS" LIBS="$LIBS -lsocket -lnsl -lm" - ;; + MATHLIB="-lm" + AC_PATH_X + AC_PATH_XTRA + if test x$have_x = xyes; then + CFLAGS="$CFLAGS $X_CFLAGS" + SYS_GL_LIBS="$X_LIBS -lGL -lGLU" + else + SYS_GL_LIBS="-lGL -lGLU" + fi + ;; + *) + MATHLIB="-lm" + AC_PATH_X + AC_PATH_XTRA + if test x$have_x = xyes; then + CFLAGS="$CFLAGS $X_CFLAGS" + SYS_GL_LIBS="$X_LIBS -lGL -lGLU" + else + SYS_GL_LIBS="-lGL -lGLU" + fi + ;; esac CFLAGS="$CFLAGS -Wall" +AC_SUBST(MATHLIB) + + + +dnl Check for OpenGL ***********************+ +AC_MSG_CHECKING(for OpenGL support) +have_opengl=no +AC_TRY_COMPILE([ + #if defined(__APPLE__) && defined(__MACH__) + #include + #include + #else + #include + #include + #endif +],[ +],[ +have_opengl=yes +]) +AC_MSG_RESULT($have_opengl) +if test x$have_opengl = xyes; then + CFLAGS="$CFLAGS" + LIBS="$LIBS $SYS_GL_LIBS" + AC_DEFINE(HAVE_OPENGL, [1], [OpenGL Headers found]) +else + AC_MSG_WARN(Unable to find OpenGL headers and libraries) +fi + + + dnl SDL_mixer ********************************** AC_ARG_WITH(sdlmixer-prefix, [ --with-sdlmixer-prefix=PFX prefix where SDL_mixer library is installed], sdlmixer_prefix="$withval", sdlmixer_prefix="") @@ -139,5 +191,6 @@ AC_DEFINE_UNQUOTED(PACKAGE_SOURCE_DIR, "${packagesrcdir}") AC_OUTPUT([ Makefile src/Makefile +include/Makefile data/Makefile ]) diff --git a/include/Makefile.am b/include/Makefile.am new file mode 100644 index 0000000..34f7915 --- /dev/null +++ b/include/Makefile.am @@ -0,0 +1,22 @@ +## Process this file with automake to produce Makefile.in + +## Created by Anjuta - will be overwritten +## If you don't want it to overwrite it, +## Please disable it in the Anjuta project configuration + +bomberclone_includedir = $(pkgincludedir) + +bomberclone_include_DATA = \ + basic.h \ + bomberclone.h \ + chat.h \ + font.h \ + gamesrv.h \ + gfx.h \ + keybinput.h \ + map.h \ + network.h \ + packets.h \ + sysfunc.h + +EXTRA_DIST = $(bomberclone_include_DATA) diff --git a/src/basic.h b/include/basic.h similarity index 99% rename from src/basic.h rename to include/basic.h index 8787e9e..0e360b9 100644 --- a/src/basic.h +++ b/include/basic.h @@ -1,4 +1,4 @@ -/* $Id: basic.h,v 1.53 2003/09/10 22:21:18 stpohle Exp $ */ +/* $Id: basic.h,v 1.1 2003/09/21 20:15:28 stpohle Exp $ */ /* basic types which we need everywhere */ #ifndef _BC_BASIC_H_ diff --git a/src/bomberclone.h b/include/bomberclone.h similarity index 99% rename from src/bomberclone.h rename to include/bomberclone.h index 1f63ece..497b0a2 100644 --- a/src/bomberclone.h +++ b/include/bomberclone.h @@ -1,4 +1,4 @@ -/* $Id: bomberclone.h,v 1.54 2003/08/29 23:50:39 stpohle Exp $ */ +/* $Id: bomberclone.h,v 1.1 2003/09/21 20:15:28 stpohle Exp $ */ /* bomberclone.h */ #ifndef _BOMBERCLONE_H_ diff --git a/src/chat.h b/include/chat.h similarity index 100% rename from src/chat.h rename to include/chat.h diff --git a/src/font.h b/include/font.h similarity index 100% rename from src/font.h rename to include/font.h diff --git a/src/gamesrv.h b/include/gamesrv.h similarity index 100% rename from src/gamesrv.h rename to include/gamesrv.h diff --git a/src/gfx.h b/include/gfx.h similarity index 98% rename from src/gfx.h rename to include/gfx.h index 749c4d7..0f57830 100644 --- a/src/gfx.h +++ b/include/gfx.h @@ -1,4 +1,4 @@ -/* $Id: gfx.h,v 1.18 2003/07/25 12:28:50 stpohle Exp $ */ +/* $Id: gfx.h,v 1.1 2003/09/21 20:15:28 stpohle Exp $ */ #ifndef _GFX_H_ #define _GFX_H_ diff --git a/src/keybinput.h b/include/keybinput.h similarity index 100% rename from src/keybinput.h rename to include/keybinput.h diff --git a/src/map.h b/include/map.h similarity index 96% rename from src/map.h rename to include/map.h index 1bcad66..37a0f5f 100644 --- a/src/map.h +++ b/include/map.h @@ -1,4 +1,4 @@ -/* $Id: map.h,v 1.6 2003/09/10 21:32:22 stpohle Exp $ */ +/* $Id: map.h,v 1.1 2003/09/21 20:15:28 stpohle Exp $ */ /* map.h */ #ifndef _MAP_H_ diff --git a/src/network.h b/include/network.h similarity index 100% rename from src/network.h rename to include/network.h diff --git a/src/packets.h b/include/packets.h similarity index 100% rename from src/packets.h rename to include/packets.h diff --git a/src/sound.h b/include/sound.h similarity index 92% rename from src/sound.h rename to include/sound.h index 6f0aa92..17ad787 100644 --- a/src/sound.h +++ b/include/sound.h @@ -1,4 +1,4 @@ -/* $Id: sound.h,v 1.3 2003/08/06 19:29:10 stpohle Exp $ */ +/* $Id: sound.h,v 1.1 2003/09/21 20:15:28 stpohle Exp $ */ /* include file for the sound */ #ifndef _SOUND_H_ diff --git a/src/sysfunc.h b/include/sysfunc.h similarity index 91% rename from src/sysfunc.h rename to include/sysfunc.h index a2f1d14..5ba957f 100644 --- a/src/sysfunc.h +++ b/include/sysfunc.h @@ -1,4 +1,4 @@ -/* $Id: sysfunc.h,v 1.8 2003/09/10 21:32:22 stpohle Exp $ */ +/* $Id: sysfunc.h,v 1.1 2003/09/21 20:15:28 stpohle Exp $ */ /* include some system near functions */ #ifndef _SYSFUNC_H_ diff --git a/src/Makefile.am b/src/Makefile.am index 44defe2..26535f0 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,48 +1,36 @@ -INCLUDES = +INCLUDES = -I../include bin_PROGRAMS = bomberclone bomberclone_SOURCES = \ - basic.h\ main.c\ bomb.c\ - bomberclone.h\ debug.c\ packets.c\ font.c\ - font.h\ - gfx.h\ gfx.c\ gfxengine.c\ gfxpixelimage.c\ player.c\ - packets.h\ game.c\ netmenu.c\ network.c\ udp.c\ menu.c\ map.c\ - map.h\ mapmenu.c\ tileset.c\ field.c\ - network.h\ - sysfunc.h\ sysfunc.c\ configuration.c\ pkgcache.c\ - gamesrv.h\ gamesrv.c \ chat.c \ multiwait.c \ - chat.h \ - keybinput.h \ keybinput.c \ single.c \ special.c \ - sound.h \ sound.c ## bomberclone_LDADD =