Commits

camlspotter committed bc4aba3

SUPPORTED_FORMATS fix

  • Participants
  • Parent commits 5b69a15

Comments (0)

Files changed (1)

   LDFLAGS_gif=
   if $(true_if_not_defined ARG_WANT_GIF)
     if $(not $(pkg_config gif, libgif))
-      HAVE_GIF = $(Check_header_library gif, gif_lib.h, DGifOpenFileNamex)
+      HAVE_GIF = $(Check_header_library gif, gif_lib.h, DGifOpenFileName)
       SUPPORT_GIF = $(HAVE_GIF)
       if $(SUPPORT_GIF)
         LDFLAGS_gif=-lgif
-        SUPPORTED_FORMATS+=gif
         export
       else
         failwith_if_defined(ARG_WANT_GIF, gif requested but not found)
       export
+    if $(SUPPORT_GIF)
+      SUPPORTED_FORMATS+=gif
+      export
     export
 
   # PNG
       SUPPORT_PNG = $(and $(HAVE_Z) $(HAVE_PNG))
       if $(SUPPORT_PNG)
         LDFLAGS_png=-lpng -lz
-        SUPPORTED_FORMATS+=png
         export
       else
         failwith_if_defined(ARG_WANT_PNG, png requested but not found)
       export
+    if $(SUPPORT_PNG)
+      SUPPORTED_FORMATS+=png
+      export
     export
 
   # JPEG
       SUPPORT_JPEG = $(HAVE_JPEG)
       if $(SUPPORT_JPEG)
         LDFLAGS_jpeg=-ljpeg
-        SUPPORTED_FORMATS+=jpeg
         export
       else
         failwith_if_defined(ARG_WANT_JPEG, jpeg requested but not found)
       export
+    if $(SUPPORT_JPEG)
+      SUPPORTED_FORMATS+=jpeg
+      export
     export
 
   # EXIF
       SUPPORT_EXIF = $(HAVE_EXIF)
       if $(SUPPORT_EXIF)
         LDFLAGS_exif=-lexif
-        SUPPORTED_FORMATS+=exif
         export
       else
         failwith_if_defined(ARG_WANT_EXIF, exif requested but not found)
       export
+    if $(SUPPORT_EXIF)
+      SUPPORTED_FORMATS+=exif
+      export
     export
 
   # TIFF
       # CR jfuruse: libtiff depends on jpeg and z too, which are required for -static.
       # Impossible to resolve all the cases:
       # the current OCaml cma has no capability to have different lib flags for dyn and static	
-      SUPPORT_TIFF = $(HAVE_TIFF))
+      SUPPORT_TIFF = $(HAVE_TIFF)
       if $(SUPPORT_TIFF)
         LDFLAGS_tiff=-ltiff
-        SUPPORTED_FORMATS+=tiff
         export
       else
         failwith_if_defined(ARG_WANT_TIFF, tiff requested but not found)
       export
+    if $(SUPPORT_TIFF)
+      SUPPORTED_FORMATS+=tiff
+      export
     export
 
   # XPM
       SUPPORT_XPM = $(HAVE_XPM)
       if $(SUPPORT_XPM)
         LDFLAGS_xpm=-lXpm
-        SUPPORTED_FORMATS+=xpm
         export
       else
         failwith_if_defined(ARG_WANT_XPM, xpm requested but not found)
       export
+    if $(SUPPORT_XPM)
+      SUPPORTED_FORMATS+=xpm
+      export
     export
 
   # PS