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

Diego Elio Pettenò git at videolan.org
Mon Feb 25 07:51:35 CET 2013


libbluray | branch: flameeyes | Diego Elio Pettenò <flameeyes at flameeyes.eu> | Thu Feb 14 18:10:20 2013 -0800| [f69e2ac49580230b032b729c8ad65d8cf70d6943] | committer: Diego Elio Pettenò

build: check C99 support in configure

> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=f69e2ac49580230b032b729c8ad65d8cf70d6943
---

 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 a2f39ae..562c455 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,7 +1,7 @@
 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
 



More information about the libbluray-devel mailing list