Parcourir la source

Allow builds to opt-out or opt-in to specific archivers, whichever's easier.

Ryan C. Gordon il y a 7 ans
Parent
commit
500033f37d
1 fichiers modifiés avec 19 ajouts et 10 suppressions
  1. 19 10
      src/physfs_internal.h

+ 19 - 10
src/physfs_internal.h

@@ -162,35 +162,44 @@ void __PHYSFS_smallFree(void *ptr);
 #define free(x) Do not use free() directly.
 #define free(x) Do not use free() directly.
 /* !!! FIXME: add alloca check here. */
 /* !!! FIXME: add alloca check here. */
 
 
+
+/* by default, enable things, so builds can opt out of a few things they
+   want to avoid. But you can build with this #defined to 0 if you would
+   like to turn off everything except a handful of things you opt into. */
+#ifndef PHYSFS_SUPPORTS_DEFAULT
+#define PHYSFS_SUPPORTS_DEFAULT 1
+#endif
+
+
 #ifndef PHYSFS_SUPPORTS_ZIP
 #ifndef PHYSFS_SUPPORTS_ZIP
-#define PHYSFS_SUPPORTS_ZIP 1
+#define PHYSFS_SUPPORTS_ZIP PHYSFS_SUPPORTS_DEFAULT
 #endif
 #endif
 #ifndef PHYSFS_SUPPORTS_7Z
 #ifndef PHYSFS_SUPPORTS_7Z
-#define PHYSFS_SUPPORTS_7Z 1
+#define PHYSFS_SUPPORTS_7Z PHYSFS_SUPPORTS_DEFAULT
 #endif
 #endif
 #ifndef PHYSFS_SUPPORTS_GRP
 #ifndef PHYSFS_SUPPORTS_GRP
-#define PHYSFS_SUPPORTS_GRP 1
+#define PHYSFS_SUPPORTS_GRP PHYSFS_SUPPORTS_DEFAULT
 #endif
 #endif
 #ifndef PHYSFS_SUPPORTS_HOG
 #ifndef PHYSFS_SUPPORTS_HOG
-#define PHYSFS_SUPPORTS_HOG 1
+#define PHYSFS_SUPPORTS_HOG PHYSFS_SUPPORTS_DEFAULT
 #endif
 #endif
 #ifndef PHYSFS_SUPPORTS_MVL
 #ifndef PHYSFS_SUPPORTS_MVL
-#define PHYSFS_SUPPORTS_MVL 1
+#define PHYSFS_SUPPORTS_MVL PHYSFS_SUPPORTS_DEFAULT
 #endif
 #endif
 #ifndef PHYSFS_SUPPORTS_WAD
 #ifndef PHYSFS_SUPPORTS_WAD
-#define PHYSFS_SUPPORTS_WAD 1
+#define PHYSFS_SUPPORTS_WAD PHYSFS_SUPPORTS_DEFAULT
 #endif
 #endif
 #ifndef PHYSFS_SUPPORTS_QPAK
 #ifndef PHYSFS_SUPPORTS_QPAK
-#define PHYSFS_SUPPORTS_QPAK 1
+#define PHYSFS_SUPPORTS_QPAK PHYSFS_SUPPORTS_DEFAULT
 #endif
 #endif
 #ifndef PHYSFS_SUPPORTS_SLB
 #ifndef PHYSFS_SUPPORTS_SLB
-#define PHYSFS_SUPPORTS_SLB 1
+#define PHYSFS_SUPPORTS_SLB PHYSFS_SUPPORTS_DEFAULT
 #endif
 #endif
 #ifndef PHYSFS_SUPPORTS_ISO9660
 #ifndef PHYSFS_SUPPORTS_ISO9660
-#define PHYSFS_SUPPORTS_ISO9660 1
+#define PHYSFS_SUPPORTS_ISO9660 PHYSFS_SUPPORTS_DEFAULT
 #endif
 #endif
 #ifndef PHYSFS_SUPPORTS_VDF
 #ifndef PHYSFS_SUPPORTS_VDF
-#define PHYSFS_SUPPORTS_VDF 1
+#define PHYSFS_SUPPORTS_VDF PHYSFS_SUPPORTS_DEFAULT
 #endif
 #endif
 
 
 #if PHYSFS_SUPPORTS_7Z
 #if PHYSFS_SUPPORTS_7Z