Make ISO9660 archiver optional.
authorRyan C. Gordon <icculus@icculus.org>
Wed, 17 Mar 2010 15:35:29 -0400
changeset 1066 e1d83e3b5d32
parent 1065 eb39b3977c2d
child 1067 67221fb394d8
Make ISO9660 archiver optional.
CMakeLists.txt
src/archiver_iso9660.c
src/physfs.c
--- a/CMakeLists.txt	Wed Mar 17 15:34:30 2010 -0400
+++ b/CMakeLists.txt	Wed Mar 17 15:35:29 2010 -0400
@@ -272,6 +272,11 @@
     ADD_DEFINITIONS(-DPHYSFS_SUPPORTS_QPAK=1)
 ENDIF(PHYSFS_ARCHIVE_QPAK)
 
+OPTION(PHYSFS_ARCHIVE_ISO9660 "Enable ISO9660 support" TRUE)
+IF(PHYSFS_ARCHIVE_ISO9660)
+    ADD_DEFINITIONS(-DPHYSFS_SUPPORTS_ISO9660=1)
+ENDIF(PHYSFS_ARCHIVE_ISO9660)
+
 
 # See if some archiver required zlib, and see about using system version.
 
--- a/src/archiver_iso9660.c	Wed Mar 17 15:34:30 2010 -0400
+++ b/src/archiver_iso9660.c	Wed Mar 17 15:35:29 2010 -0400
@@ -22,7 +22,7 @@
  * - Ambiguities in the standard
  */
 
-#include "physfs.h"
+#if (defined PHYSFS_SUPPORTS_GRP)
 
 #define __PHYSICSFS_INTERNAL__
 #include "physfs_internal.h"
@@ -1025,5 +1025,7 @@
     ISO9660_stat                /* stat() method           */
 };
 
+#endif  /* defined PHYSFS_SUPPORTS_ISO9660 */
+
 /* end of archiver_iso9660.c ... */
 
--- a/src/physfs.c	Wed Mar 17 15:34:30 2010 -0400
+++ b/src/physfs.c	Wed Mar 17 15:35:29 2010 -0400
@@ -93,7 +93,9 @@
 #if (defined PHYSFS_SUPPORTS_WAD)
     &__PHYSFS_ArchiveInfo_WAD,
 #endif
+#if (defined PHYSFS_SUPPORTS_ISO9660)
     &__PHYSFS_ArchiveInfo_ISO9660,
+#endif
     NULL
 };
 
@@ -121,7 +123,9 @@
 #if (defined PHYSFS_SUPPORTS_WAD)
     &__PHYSFS_Archiver_WAD,
 #endif
+#if (defined PHYSFS_SUPPORTS_ISO9660)
     &__PHYSFS_Archiver_ISO9660,
+#endif
     NULL
 };