ac50c77
diff -up irrlicht-1.7.2/include/IrrCompileConfig.h.optflags irrlicht-1.7.2/include/IrrCompileConfig.h
ac50c77
--- irrlicht-1.7.2/include/IrrCompileConfig.h.optflags	2010-10-24 12:26:28.000000000 -0400
ac50c77
+++ irrlicht-1.7.2/include/IrrCompileConfig.h	2011-12-06 15:01:10.114944711 -0500
5b65b8a
@@ -176,7 +176,7 @@ the engine will no longer read .jpeg ima
5b65b8a
 //! Define _IRR_USE_NON_SYSTEM_JPEG_LIB_ to let irrlicht use the jpeglib which comes with irrlicht.
5b65b8a
 /** If this is commented out, Irrlicht will try to compile using the jpeg lib installed in the system.
5b65b8a
 	This is only used when _IRR_COMPILE_WITH_LIBJPEG_ is defined. */
5b65b8a
-#define _IRR_USE_NON_SYSTEM_JPEG_LIB_
5b65b8a
+// #define _IRR_USE_NON_SYSTEM_JPEG_LIB_
5b65b8a
 
5b65b8a
 
5b65b8a
 //! Define _IRR_COMPILE_WITH_LIBPNG_ to enable compiling the engine using libpng.
5b65b8a
@@ -187,7 +187,7 @@ the engine will no longer read .png imag
5b65b8a
 //! Define _IRR_USE_NON_SYSTEM_LIBPNG_ to let irrlicht use the libpng which comes with irrlicht.
5b65b8a
 /** If this is commented out, Irrlicht will try to compile using the libpng installed in the system.
5b65b8a
 	This is only used when _IRR_COMPILE_WITH_LIBPNG_ is defined. */
5b65b8a
-#define _IRR_USE_NON_SYSTEM_LIB_PNG_
5b65b8a
+// #define _IRR_USE_NON_SYSTEM_LIB_PNG_
5b65b8a
 
5b65b8a
 
5b65b8a
 //! Define _IRR_D3D_NO_SHADER_DEBUGGING to disable shader debugging in D3D9
ac50c77
@@ -348,7 +348,7 @@ ones. */
5b65b8a
 /** If this is commented out, Irrlicht will try to compile using the zlib
5b65b8a
 installed on the system. This is only used when _IRR_COMPILE_WITH_ZLIB_ is
5b65b8a
 defined. */
5b65b8a
-#define _IRR_USE_NON_SYSTEM_ZLIB_
5b65b8a
+// #define _IRR_USE_NON_SYSTEM_ZLIB_
5b65b8a
 //! Define _IRR_COMPILE_WITH_ZIP_ENCRYPTION_ if you want to read AES-encrypted ZIP archives
5b65b8a
 #define _IRR_COMPILE_WITH_ZIP_ENCRYPTION_
5b65b8a
 //! Define _IRR_COMPILE_WITH_BZIP2_ if you want to support bzip2 compressed zip archives
ac50c77
@@ -360,7 +360,7 @@ library. */
5b65b8a
 /** If this is commented out, Irrlicht will try to compile using the bzlib
5b65b8a
 installed on the system. This is only used when _IRR_COMPILE_WITH_BZLIB_ is
5b65b8a
 defined. */
5b65b8a
-#define _IRR_USE_NON_SYSTEM_BZLIB_
5b65b8a
+// #define _IRR_USE_NON_SYSTEM_BZLIB_
5b65b8a
 //! Define _IRR_COMPILE_WITH_LZMA_ if you want to use LZMA compressed zip files.
5b65b8a
 /** LZMA is a very efficient compression code, known from 7zip. Irrlicht
5b65b8a
 currently only supports zip archives, though. */
ac50c77
diff -up irrlicht-1.7.2/source/Irrlicht/Makefile.optflags irrlicht-1.7.2/source/Irrlicht/Makefile
ac50c77
--- irrlicht-1.7.2/source/Irrlicht/Makefile.optflags	2010-10-31 17:53:30.000000000 -0400
ac50c77
+++ irrlicht-1.7.2/source/Irrlicht/Makefile	2011-12-06 15:03:00.473901933 -0500
5b65b8a
@@ -49,18 +49,17 @@ BZIP2OBJ = bzip2/blocksort.o bzip2/huffm
5b65b8a
 EXTRAOBJ =
5b65b8a
 LINKOBJ = $(IRRMESHOBJ) $(IRROBJ) $(IRRPARTICLEOBJ) $(IRRANIMOBJ) \
5b65b8a
 	$(IRRVIDEOOBJ) $(IRRSWRENDEROBJ) $(IRRIOOBJ) $(IRROTHEROBJ) \
5b65b8a
-	$(IRRGUIOBJ) $(ZLIBOBJ) $(JPEGLIBOBJ) $(LIBPNGOBJ) $(LIBAESGM) \
5b65b8a
-	$(BZIP2OBJ) $(EXTRAOBJ)
5b65b8a
+	$(IRRGUIOBJ) $(EXTRAOBJ)
5b65b8a
 
5b65b8a
 ###############
5b65b8a
 #Compiler flags
5b65b8a
-CXXINCS = -I../../include -Izlib -Ijpeglib -Ilibpng
5b65b8a
-CPPFLAGS += $(CXXINCS) -DIRRLICHT_EXPORTS=1
5b65b8a
-CXXFLAGS += -Wall -pipe -fno-exceptions -fno-rtti -fstrict-aliasing
ac50c77
+CXXINCS = -I../../include `libpng-config --cflags`
5b65b8a
+CPPFLAGS += $(CXXINCS) -DIRRLICHT_EXPORTS=1 $(RPM_OPT_FLAGS)
5b65b8a
+CXXFLAGS += $(RPM_OPT_FLAGS) -Wall -pipe -fno-exceptions -fno-rtti -fstrict-aliasing
5b65b8a
 ifndef NDEBUG
5b65b8a
 CXXFLAGS += -g -D_DEBUG
5b65b8a
 else
5b65b8a
-CXXFLAGS += -fexpensive-optimizations -O3
5b65b8a
+CXXFLAGS += -fexpensive-optimizations -O3 $(RPM_OPT_FLAGS)
5b65b8a
 endif
5b65b8a
 ifdef PROFILE
5b65b8a
 CXXFLAGS += -pg
ac50c77
@@ -82,7 +81,7 @@ LIB_PATH = ../../lib/$(SYSTEM)
5b65b8a
 INSTALL_DIR = /usr/local/lib
5b65b8a
 sharedlib install: SHARED_LIB = libIrrlicht.so
5b65b8a
 staticlib sharedlib: LDFLAGS += --no-export-all-symbols --add-stdcall-alias
5b65b8a
-sharedlib: LDFLAGS += -L/usr/X11R6/lib$(LIBSELECT) -lGL -lXxf86vm
ac50c77
+sharedlib: LDFLAGS += -L/usr/X11R6/lib$(LIBSELECT) -lGL -lXxf86vm -lz -ljpeg `libpng-config --libs` -lbz2 -laesgm
5b65b8a
 staticlib sharedlib: CXXINCS += -I/usr/X11R6/include
5b65b8a
 
5b65b8a
 #OSX specific options