[libbluray-devel] build: check C99 support in configure

Petri Hintukainen phintuka at users.sourceforge.net
Tue Feb 19 15:46:36 CET 2013


This changes compiler command line from -std=c99 to -std=gnu99

On pe, 2013-02-15 at 04:07 +0100, Diego Elio Pettenò wrote:
> libbluray | branch: flameeyes | Diego Elio Pettenò <flameeyes at flameeyes.eu> | Thu Feb 14 18:10:20 2013 -0800| [4d27aa9536c59090fa575ee6ed827efb26b103c9] | committer: Diego Elio Pettenò
> 
> build: check C99 support in configure
> 
> > http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=4d27aa9536c59090fa575ee6ed827efb26b103c9
> ---
> 
>  configure.ac             |    5 +++++
>  src/Makefile.am          |    2 +-
>  src/examples/Makefile.am |    2 +-
>  3 files changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/configure.ac b/configure.ac
> index 0c3d0bf..219569d 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -93,6 +93,11 @@ AC_ARG_WITH([bdj-bootclasspath],
>  
>  dnl required programs
>  AC_PROG_CC
> +AC_PROG_CC_C99
> +AS_IF([test "x$ac_cv_prog_cc_c99" = "xno"], [
> +  AC_MSG_ERROR([no C99 compiler found, $PACKAGE requires a C99 compiler.])
> +])
> +
>  AC_PROG_LIBTOOL
>  
>  dnl required types
> diff --git a/src/Makefile.am b/src/Makefile.am
> index 3182542..b437637 100644
> --- a/src/Makefile.am
> +++ b/src/Makefile.am
> @@ -5,7 +5,7 @@ SUBDIRS= . examples
>  SET_FEATURES = -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112L -D_REENTRANT
>  SET_INCLUDES = -I$(top_srcdir) -Ifile -Ilibbluray/bdnav
>  
> -AM_CFLAGS = -std=c99 $(SET_FEATURES) $(SET_INCLUDES) $(LIBXML2_CFLAGS) $(FT2_CFLAGS)
> +AM_CFLAGS = $(SET_FEATURES) $(SET_INCLUDES) $(LIBXML2_CFLAGS) $(FT2_CFLAGS)
>  
>  SOURCES_bdj = libbluray/bdj/bdj.h \
>  	libbluray/bdj/bdj_private.h \
> diff --git a/src/examples/Makefile.am b/src/examples/Makefile.am
> index 60b451e..a4cebe2 100644
> --- a/src/examples/Makefile.am
> +++ b/src/examples/Makefile.am
> @@ -1,7 +1,7 @@
>  SET_FEATURES = -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112L -D_REENTRANT
>  SET_INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src -I$(top_srcdir)/src/file -I$(top_srcdir)/src/libbluray/bdnav
>  
> -AM_CFLAGS = -std=c99 $(SET_FEATURES) $(SET_INCLUDES)
> +AM_CFLAGS = $(SET_FEATURES) $(SET_INCLUDES)
>  
>  if USING_EXAMPLES
>  
> 
> _______________________________________________
> libbluray-devel mailing list
> libbluray-devel at videolan.org
> http://mailman.videolan.org/listinfo/libbluray-devel




More information about the libbluray-devel mailing list