about summary refs log tree commit diff
path: root/converter/other
diff options
context:
space:
mode:
Diffstat (limited to 'converter/other')
-rw-r--r--converter/other/jpeg2000/Makefile5
-rw-r--r--converter/other/jpeg2000/libjasper/Makefile.common2
-rw-r--r--converter/other/pgmtoppm.c1
-rw-r--r--converter/other/svgtopam.c1
4 files changed, 6 insertions, 3 deletions
diff --git a/converter/other/jpeg2000/Makefile b/converter/other/jpeg2000/Makefile
index 92225818..af8be82c 100644
--- a/converter/other/jpeg2000/Makefile
+++ b/converter/other/jpeg2000/Makefile
@@ -60,8 +60,9 @@ include $(SRCDIR)/Makefile.common
 LIBOPTS = $(shell $(LIBOPT) $(NETPBMLIB) $(JASPERLIB_USE))
 
 $(BINARIES): %: %.o $(JASPERLIB_DEP) $(NETPBMLIB) $(LIBOPT)
-	$(LD) $(LDFLAGS) $(MATHLIB) $(LDLIBS) -o $@ $< \
-	  $(LIBOPTS) $(JASPERDEPLIBS) -lm $(RPATH) $(LADD)
+	$(LD) -o $@ $< \
+	  $(LIBOPTS) $(JASPERDEPLIBS) $(MATHLIB) $(RPATH) \
+	  $(LDFLAGS) $(LDLIBS) $(LADD)
 
 $(INTERNAL_JASPERLIB): $(BUILDDIR)/$(SUBDIR)/libjasper FORCE
 	$(MAKE) -f $(SRCDIR)/$(SUBDIR)/libjasper/Makefile \
diff --git a/converter/other/jpeg2000/libjasper/Makefile.common b/converter/other/jpeg2000/libjasper/Makefile.common
index d2cb7d42..af82401a 100644
--- a/converter/other/jpeg2000/libjasper/Makefile.common
+++ b/converter/other/jpeg2000/libjasper/Makefile.common
@@ -26,7 +26,7 @@ INCLUDES = -I$(JASPERSRCDIR)/include -Iimportinc
 DEFS = -DHAVE_LIBM=1 -DSTDC_HEADERS=1 -DHAVE_FCNTL_H=1 -DHAVE_LIMITS_H=1 -DHAVE_UNISTD_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STDDEF_H=1 -DEXCLUDE_BMP_SUPPORT -DEXCLUDE_RAS_SUPPORT -DEXCLUDE_MIF_SUPPORT -DEXCLUDE_JPG_SUPPORT -DEXCLUDE_PGX_SUPPORT -DEXCLUDE_PNM_SUPPORT
 
 $(LIB_OBJECTS):%.o:%.c
-	$(CC) -c $(CPPFLAGS) $(CFLAGS) $(INCLUDES) $(DEFS) $(CADD) $<
+	$(CC) -c $(INCLUDES) $(DEFS) $(CPPFLAGS) $(CFLAGS) $(CADD) $<
 
 $(LIB_OBJECTS): importinc
 
diff --git a/converter/other/pgmtoppm.c b/converter/other/pgmtoppm.c
index cface024..12bc7d25 100644
--- a/converter/other/pgmtoppm.c
+++ b/converter/other/pgmtoppm.c
@@ -10,6 +10,7 @@
 ** implied warranty.
 */
 
+#define _BSD_SOURCE  /* Make sure strdup() is in <string.h> */
 #include <string.h>
 
 #include "mallocvar.h"
diff --git a/converter/other/svgtopam.c b/converter/other/svgtopam.c
index 896c5f03..56825a4e 100644
--- a/converter/other/svgtopam.c
+++ b/converter/other/svgtopam.c
@@ -26,6 +26,7 @@
 
 ============================================================================*/
 
+#define _BSD_SOURCE  /* Make sure strdup() is in <string.h> */
 #include <assert.h>
 #include <string.h>
 #include <stdio.h>