From ec19c39c2b0d933af381650b6a642dd83133e10c Mon Sep 17 00:00:00 2001 From: shlainn Date: Fri, 10 Sep 2010 21:33:04 +0200 Subject: [PATCH] * added .gitignore magic * fixed eternal issues with irrKlang on x64 and src/dep/openssl on linux To compile the IrrKlang Library stub for x64 use ./configure --with-irrklang The openssl thing is rather hacky. Will require final solution at some point. --- .gitignore | 70 +++++++++++++++++++++++++++ configure.ac | 35 +++++++++++--- src/Client/Makefile.am | 2 +- src/dep/include/openssl/opensslconf.h | 3 +- src/dep/src/Makefile.am | 2 +- src/dep/src/irrKlang/Makefile.am | 5 ++ 6 files changed, 107 insertions(+), 10 deletions(-) create mode 100644 .gitignore create mode 100644 src/dep/src/irrKlang/Makefile.am diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..bdf8c0b --- /dev/null +++ b/.gitignore @@ -0,0 +1,70 @@ +# Compiled source # +################### +*.com +*.class +*.dll +*.exe +*.o +*.a +*.so +*.d +*.so.* +Makefile +Makefile.in +*~ +.deps +.libs + +# +# Build generated files +# +aclocal.m4 +autom4te.cache +compile +config.guess +config.h.in +config.log +config.status +config.sub +configure +depcomp +libtool +install-sh +ltmain.sh +missing +stamp-h1 + +Makefile.in +Makefile + +# Packages # +############ +# it's better to unpack these files and commit the raw source +# git has its own built in compression methods +*.7z +*.dmg +*.gz +*.iso +*.jar +*.rar +*.tar +*.zip + +# Logs and databases # +###################### +*.log +*.sql +*.sqlite +*.conf + +# OS generated files # +###################### +.DS_Store? +ehthumbs.db +Icon? +Thumbs.db + +# EXCEPTIONS # +###################### +!src/dep/src/irrlicht/Makefile + diff --git a/configure.ac b/configure.ac index b90227b..a2a252f 100644 --- a/configure.ac +++ b/configure.ac @@ -19,10 +19,8 @@ AC_PROG_LIBTOOL AC_CHECK_LIB([Xxf86vm], [main], [], [echo "ERROR: Xxf86vm library not found." && exit 1]) AC_CHECK_LIB([GL], [main], [], [echo "ERROR: GL library not found." && exit 1]) AC_CHECK_LIB([GLU], [main], [], [echo "ERROR: GLU library not found." && exit 1]) -# AC_CHECK_LIB([Irrlicht], [main], [], [echo "ERROR: Irrlicht library not found." && exit 1]) AC_CHECK_LIB([ssl], [main], [], [echo "ERROR: ssl library not found." && exit 1]) AC_CHECK_LIB([crypto], [main], [], [echo "ERROR: ssl crypto library not found." && exit 1]) -# AC_CHECK_LIB([ZThread], [main], [], [echo "ERROR: ZThread library not found." && exit 1]) # Checks for header files. AC_PATH_X @@ -59,17 +57,40 @@ AC_FUNC_UTIME_NULL AC_FUNC_VPRINTF AC_CHECK_FUNCS([floor ftime ftruncate getcwd gethostbyaddr gethostbyname gethostname gettimeofday memmove memset mkdir pow realpath select socket sqrt strerror strrchr strstr strtol strtoul uname utime]) -#AC_CONFIG_FILES([src/dep/src/irrlicht/Makefile -# src/dep/src/zlib/Makefile -# src/dep/src/zthread/Makefile]) -#AC_CONFIG_SUBDIRS([src/dep/src/irrlicht/jpeglib -# src/dep/src/irrlicht/libpng]) + +# Check if IrrKlang stub needs to be built + +AC_ARG_WITH(irrklang, +[ --with-irrklang Use IrrKlang stub (needed for x64 (default: no)], +[case "${withval}" in + yes) DO_IRRKLANG=yes ;; + no) DO_IRRKLANG=no ;; + maybe) DO_IRRKLANG=maybe ;; + *) AC_MSG_ERROR(Bad value ${withval} for --with-irrklang) ;; + esac], +[DO_IRRKLANG=no]) +AC_MSG_CHECKING(whether to build/link IrrKlang) +if test "x$DO_IRRKLANG" = "xyes"; then + AC_MSG_RESULT($DO_IRRKLANG) + IRRKLANG_DIR=irrKlang + IRRKLANG_LIB=../dep/src/irrKlang/libIrrKlang.la +else + AC_MSG_RESULT($DO_IRRKLANG) + IRRKLANG_DIR= + IRRKLANG_LIB=$(prefix)/bin/libIrrKlang.so +fi +AC_SUBST([IRRKLANG_DIR]) +AC_SUBST([IRRKLANG_LIB]) + + + AC_CONFIG_FILES([Makefile src/Makefile src/dep/Makefile src/dep/src/Makefile src/dep/src/zlib/Makefile src/dep/src/zthread/Makefile + src/dep/src/irrKlang/Makefile src/tools/Makefile src/tools/viewer/Makefile src/tools/stuffextract/Makefile diff --git a/src/Client/Makefile.am b/src/Client/Makefile.am index 4013837..bd5874f 100644 --- a/src/Client/Makefile.am +++ b/src/Client/Makefile.am @@ -24,7 +24,7 @@ pseuwow_LDADD = ../shared/libshared.a\ DefScript/libdefscript.a\ World/libworld.a \ GUI/libgui.a\ - $(prefix)/libIrrKlang.so\ + $(IRRKLANG_LIB)\ ../dep/lib/linux-gcc/libIrrlicht.a\ ../dep/src/zlib/libzlib.a\ ../dep/src/zthread/libZThread.a diff --git a/src/dep/include/openssl/opensslconf.h b/src/dep/include/openssl/opensslconf.h index d216fc5..2255814 100644 --- a/src/dep/include/openssl/opensslconf.h +++ b/src/dep/include/openssl/opensslconf.h @@ -2,7 +2,8 @@ /* WARNING: Generated automatically from opensslconf.h.in by Configure. */ /* OpenSSL was configured with the following options: */ -#ifndef OPENSSL_SYSNAME_WIN32 +// #ifndef OPENSSL_SYSNAME_WIN32 +#if defined( __WIN32__ ) || defined( WIN32 ) || defined( _WIN32 ) # define OPENSSL_SYSNAME_WIN32 #endif #ifndef OPENSSL_DOING_MAKEDEPEND diff --git a/src/dep/src/Makefile.am b/src/dep/src/Makefile.am index 100ee29..d8f378e 100644 --- a/src/dep/src/Makefile.am +++ b/src/dep/src/Makefile.am @@ -1,4 +1,4 @@ ## Makefile.am - process this file with automake AM_CPPFLAGS = -I$(top_builddir)/src/Client -I$(top_builddir)/src/shared -I$(top_builddir)/src/Client/DefScript -I$(top_builddir)/src/Client/World -I$(top_builddir)/src/Client/Realm -Wall -SUBDIRS = irrlicht zlib zthread +SUBDIRS = irrlicht zlib zthread $(IRRKLANG_DIR) ## End Makefile.am diff --git a/src/dep/src/irrKlang/Makefile.am b/src/dep/src/irrKlang/Makefile.am new file mode 100644 index 0000000..e6decd2 --- /dev/null +++ b/src/dep/src/irrKlang/Makefile.am @@ -0,0 +1,5 @@ +INCLUDES = -I../../include/irrklang -I../../include +lib_LTLIBRARIES = libIrrKlang.la + +libIrrKlang_la_SOURCES = irrKlang.cpp +libIrrKlang_la_LDFLAGS = -shared -static \ No newline at end of file