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

KO Myung-Hun komh78 at gmail.com
Mon Jul 13 07:47:50 CEST 2015


Ping ?

KO Myung-Hun wrote:
> 
> KO Myung-Hun wrote:
>>
>>
>> Rémi Denis-Courmont wrote:
>>> Le lundi 06 juillet 2015, 17:03:22 KO Myung-Hun a écrit :
>>>> ---
>>>>  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
>>>>  ])
>>>
> 
> Updated patches.
> 
> 
> 
> 0001-configure-improve-detection-of-BUILDCC-and-set-BUILD.patch
> 
> 
> From 7a9a51e337b2c07970429cf6226a0dc60ac4adf4 Mon Sep 17 00:00:00 2001
> From: KO Myung-Hun <komh at chollian.net>
> Date: Wed, 8 Jul 2015 15:55:08 +0900
> Subject: [PATCH 1/2] configure: improve detection of BUILDCC and set
>  BUILDEXEEXT
> 
> ---
>  configure.ac  |  6 +----
>  m4/buildcc.m4 | 76 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 77 insertions(+), 5 deletions(-)
>  create mode 100644 m4/buildcc.m4
> 
> diff --git a/configure.ac b/configure.ac
> index a67ad0e..11b9c59 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -70,11 +70,7 @@ AM_PROG_AS
>  AC_ARG_VAR([DESKTOP_FILE_VALIDATE], [Validator for desktop entry files])
>  AC_CHECK_PROGS(DESKTOP_FILE_VALIDATE, [${DESKTOP_FILE_VALIDATE} desktop-file-validate], :)
>  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.])
> -])
> +VLC_PROG_BUILDCC
>  
>  dnl Check for compiler properties
>  AC_C_CONST
> diff --git a/m4/buildcc.m4 b/m4/buildcc.m4
> new file mode 100644
> index 0000000..f6f6532
> --- /dev/null
> +++ b/m4/buildcc.m4
> @@ -0,0 +1,76 @@
> +dnl Copyright (C) 2015 KO Myung-Hun <komh at chollian.net>
> +dnl This file is free software; You get unlimited permission to copy
> +dnl and/or distribute it, with or without modifications, as long as
> +dnl this notice is preserved.
> +
> +AC_DEFUN([VLC_PROG_BUILDCC], [
> +  AC_ARG_VAR([BUILDCC], [Build system C11 or C99 compiler command])
> +  AC_CACHE_CHECK([for build system C11 or C99 compiler], [_cv_vlc_prog_buildcc], [
> +    _cv_vlc_prog_buildcc=no
> +    if test -z "$BUILDCC"; then
> +      AC_LANG_PUSH([C])
> +
> +      saved_CC="$CC"
> +      saved_CPP="$CPP"
> +      saved_CFLAGS="$CFLAGS"
> +      saved_CPPFLAGS="$CPPFLAGS"
> +
> +      CPP=
> +      CPPFLAGS=
> +
> +      for CC in c11-gcc c11 c99-gcc c99 gcc
> +      do
> +        for CFLAGS in "" -std=gnu99 -std=c99
> +        do
> +          AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
> +#ifndef __STDC_VERSION__
> +#error Need C Compiler
> +#endif
> +
> +#if __STDC_VERSION__ < 199901L
> +#error Need more recent C Compiler
> +#endif
> +
> +void foo(void)
> +{
> +    for (int i = 0; i; i++)
> +        /* Nothing */;
> +}
> +          ]])],
> +          [compile_success=yes],
> +          [compile_success=no])
> +
> +          if test "$compile_success" = yes; then
> +            _cv_vlc_prog_buildcc="$CC $CFLAGS"
> +            break 2
> +          fi
> +        done
> +      done
> +
> +      CC="$saved_CC"
> +      CPP="$saved_CPP"
> +      CFLAGS="$saved_CFLAGS"
> +      CPPFLAGS="$saved_CPPFLAGS"
> +
> +      AC_LANG_POP([C])
> +    else
> +      _cv_vlc_prog_buildcc="$BUILDCC"
> +    fi
> +  ])
> +
> +  AC_SUBST([BUILDCC])
> +  BUILDCC="$_cv_vlc_prog_buildcc"
> +
> +  if test "$BUILDCC" = no; then
> +    AC_MSG_ERROR([Cannot find native C99 compiler: please define BUILDCC.])
> +  fi
> +
> +  case "${build_os}" in
> +    os2*)
> +      BUILDEXEEXT=.exe
> +      AC_SUBST(BUILDEXEEXT)
> +      ;;
> +    *)
> +      ;;
> +  esac
> +])
> 
> 
> 0002-src-append-BUILDEXEEXT-to-fourcc_gen.patch
> 
> 
> From 284a8c57ed70a5343b2120658115d36442f14908 Mon Sep 17 00:00:00 2001
> From: KO Myung-Hun <komh at chollian.net>
> Date: Wed, 8 Jul 2015 15:56:04 +0900
> Subject: [PATCH 2/2] src: append $(BUILDEXEEXT) to fourcc_gen
> 
> ---
>  src/Makefile.am | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/src/Makefile.am b/src/Makefile.am
> index 9272cbf..6e3e575 100644
> --- a/src/Makefile.am
> +++ b/src/Makefile.am
> @@ -511,13 +511,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 $@
> 
> 
> 
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel

-- 
KO Myung-Hun

Using Mozilla SeaMonkey 2.7.2
Under OS/2 Warp 4 for Korean with FixPak #15
In VirtualBox v4.1.32 on Intel Core i7-3615QM 2.30GHz with 8GB RAM

Korean OS/2 User Community : http://www.ecomstation.co.kr




More information about the vlc-devel mailing list