[vlc-devel] [PATCH 3/6] src: fix compilation of fourcc_gen on OS/2

KO Myung-Hun komh78 at gmail.com
Mon Jul 6 10:03:22 CEST 2015


---
 configure.ac    | 15 ++++++++++++++-
 src/Makefile.am |  6 +++---
 2 files changed, 17 insertions(+), 4 deletions(-)

diff --git a/configure.ac b/configure.ac
index bf6d416..9751217 100644
--- a/configure.ac
+++ b/configure.ac
@@ -73,7 +73,16 @@ AC_PATH_PROG(YASM, yasm)
 AC_ARG_VAR([BUILDCC], [Build system C11 or C99 compiler command])
 AC_PATH_PROGS(BUILDCC, [c11-gcc c11 c99-gcc c99], [false])
 AS_IF([test "$BUILDCC" = "false"], [
-  AC_MSG_ERROR([Cannot find native C99 compiler: please define BUILDCC.])
+  case "${build_os}" in
+    os2*)
+      # OS/2 does not have c11* nor c99*. However C99 is suppoted by
+      # gcc -std=gnu99.
+      BUILDCC="gcc -std=gnu99"
+      ;;
+    *)
+      AC_MSG_ERROR([Cannot find native C99 compiler: please define BUILDCC.])
+      ;;
+  esac
 ])
 
 dnl Check for compiler properties
@@ -321,6 +330,10 @@ case "${build_os}" in
     cygwin|msys)
         ac_executable_extensions=".exe"
     ;;
+    os2*)
+        BUILDEXEEXT=".exe"
+        AC_SUBST(BUILDEXEEXT)
+    ;;
     *)
     ;;
 esac
diff --git a/src/Makefile.am b/src/Makefile.am
index d9bdeff..f212a0d 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -522,13 +522,13 @@ SOURCES_libvlc = \
 # FourCC tables
 BUILT_SOURCES += fourcc_tables.h
 EXTRA_DIST += misc/fourcc_gen.c
-MOSTLYCLEANFILES = fourcc_gen
+MOSTLYCLEANFILES = fourcc_gen$(BUILDEXEEXT)
 
-fourcc_gen: misc/fourcc_gen.c misc/fourcc_list.h ../include/vlc_fourcc.h
+fourcc_gen$(BUILDEXEEXT): misc/fourcc_gen.c misc/fourcc_list.h ../include/vlc_fourcc.h
 	$(AM_V_at)rm -f -- $@
 	$(AM_V_CC)$(BUILDCC) -I$(srcdir) -o $@ $<
 
-fourcc_tables.h: fourcc_gen
+fourcc_tables.h: fourcc_gen$(BUILDEXEEXT)
 	$(AM_V_at)rm -f -- $@.tmp
 	$(AM_V_GEN)$(builddir)/fourcc_gen > $@.tmp
 	$(AM_V_at)mv -f -- $@.tmp $@
-- 
1.9.5




More information about the vlc-devel mailing list