diff -up irrlicht-1.5/include/IrrCompileConfig.h.optflags irrlicht-1.5/include/IrrCompileConfig.h
--- irrlicht-1.5/include/IrrCompileConfig.h.optflags 2009-01-08 18:47:11.000000000 -0500
+++ irrlicht-1.5/include/IrrCompileConfig.h 2009-01-08 18:47:41.000000000 -0500
@@ -138,7 +138,7 @@ ones. */
//! Define _IRR_USE_NON_SYSTEM_ZLIB_ to let irrlicht use the zlib which comes with irrlicht.
/** If this is commented out, Irrlicht will try to compile using the zlib installed in the system.
This is only used when _IRR_COMPILE_WITH_ZLIB_ is defined. */
-#define _IRR_USE_NON_SYSTEM_ZLIB_
+// #define _IRR_USE_NON_SYSTEM_ZLIB_
//! Define _IRR_COMPILE_WITH_JPEGLIB_ to enable compiling the engine using libjpeg.
@@ -149,7 +149,7 @@ the engine will no longer read .jpeg ima
//! Define _IRR_USE_NON_SYSTEM_JPEG_LIB_ to let irrlicht use the jpeglib which comes with irrlicht.
/** If this is commented out, Irrlicht will try to compile using the jpeg lib installed in the system.
This is only used when _IRR_COMPILE_WITH_LIBJPEG_ is defined. */
-#define _IRR_USE_NON_SYSTEM_JPEG_LIB_
+// #define _IRR_USE_NON_SYSTEM_JPEG_LIB_
//! Define _IRR_COMPILE_WITH_LIBPNG_ to enable compiling the engine using libpng.
@@ -160,7 +160,7 @@ the engine will no longer read .png imag
//! Define _IRR_USE_NON_SYSTEM_LIBPNG_ to let irrlicht use the libpng which comes with irrlicht.
/** If this is commented out, Irrlicht will try to compile using the libpng installed in the system.
This is only used when _IRR_COMPILE_WITH_LIBPNG_ is defined. */
-#define _IRR_USE_NON_SYSTEM_LIB_PNG_
+// #define _IRR_USE_NON_SYSTEM_LIB_PNG_
//! Define _IRR_D3D_NO_SHADER_DEBUGGING to disable shader debugging in D3D9
diff -up irrlicht-1.5/source/Irrlicht/Makefile.optflags irrlicht-1.5/source/Irrlicht/Makefile
--- irrlicht-1.5/source/Irrlicht/Makefile.optflags 2009-01-08 18:48:16.000000000 -0500
+++ irrlicht-1.5/source/Irrlicht/Makefile 2009-01-08 18:51:11.000000000 -0500
@@ -43,13 +43,13 @@ LIBPNGOBJ = libpng/png.o libpng/pngerror
EXTRAOBJ =
LINKOBJ = $(IRRMESHOBJ) $(IRROBJ) $(IRRPARTICLEOBJ) $(IRRANIMOBJ) \
$(IRRVIDEOOBJ) $(IRRSWRENDEROBJ) $(IRRIOOBJ) $(IRROTHEROBJ) \
- $(IRRGUIOBJ) $(ZLIBOBJ) $(JPEGLIBOBJ) $(LIBPNGOBJ) $(EXTRAOBJ)
+ $(IRRGUIOBJ) $(EXTRAOBJ)
###############
#Compiler flags
-CXXINCS = -I../../include -Izlib -Ijpeglib -Ilibpng
-CPPFLAGS = $(CXXINCS) -DIRRLICHT_EXPORTS=1
-CXXFLAGS = -Wall -pipe
+CXXINCS = -I../../include
+CPPFLAGS = $(CXXINCS) -DIRRLICHT_EXPORTS=1 $(RPM_OPT_FLAGS)
+CXXFLAGS = -Wall -pipe $(RPM_OPT_FLAGS)
ifndef NDEBUG
CXXFLAGS += -g -D_DEBUG
else
@@ -58,7 +58,7 @@ endif
ifdef PROFILE
CXXFLAGS += -pg
endif
-CFLAGS := -fexpensive-optimizations -O3 -DPNG_THREAD_UNSAFE_OK -DPNG_NO_MMX_CODE -DPNG_NO_MNG_FEATURES
+CFLAGS := -fexpensive-optimizations -O3 -DPNG_THREAD_UNSAFE_OK -DPNG_NO_MMX_CODE -DPNG_NO_MNG_FEATURES $(RPM_OPT_FLAGS)
sharedlib sharedlib_osx: CXXFLAGS += -fpic
sharedlib sharedlib_osx: CFLAGS += -fpic
@@ -74,9 +74,9 @@ STATIC_LIB = libIrrlicht.a
IRRLICHT_DLL := ../../bin/Win32-gcc/Irrlicht.dll
LIB_PATH = ../../lib/$(SYSTEM)
INSTALL_DIR = /usr/local/lib
-sharedlib: SHARED_LIB = libIrrlicht.so
+sharedlib install: SHARED_LIB = libIrrlicht.so
staticlib sharedlib: LDFLAGS = --no-export-all-symbols --add-stdcall-alias
-sharedlib: LDFLAGS += -L/usr/X11R6/lib$(LIBSELECT) -lGL -lXxf86vm
+sharedlib: LDFLAGS += -L/usr/X11R6/lib$(LIBSELECT) -lGL -lXxf86vm -lz -ljpeg -lpng
staticlib sharedlib: CXXINCS += -I/usr/X11R6/include
#OSX specific options
@@ -128,7 +128,6 @@ sharedlib_osx: $(LINKOBJ)
install:
cp $(LIB_PATH)/$(SHARED_LIB).$(VERSION) $(INSTALL_DIR)
cd $(INSTALL_DIR) && ln -s libIrrlicht.so.$(VERSION) $(SHARED_LIB)
- ldconfig -n $(INSTALL_DIR)
install_osx:
cp $(LIB_PATH)/$(SHARED_LIB).$(VERSION) $(INSTALL_DIR)