babl r303 - in trunk: . babl



Author: neo
Date: Sun Apr  6 12:53:24 2008
New Revision: 303
URL: http://svn.gnome.org/viewvc/babl?rev=303&view=rev

Log:
2008-04-06  Sven Neumann  <sven gimp org>

	* acinclude.m4: new file defining BABL_DETECT_CFLAGS() macro.

	* configure.ac: set CFLAGS to get some extra compiler warnings.

	* babl/babl-fish-stats.c (conversions): fixed old-style function
	definition.

	* Makefile.am: formatting.



Added:
   trunk/acinclude.m4
Modified:
   trunk/ChangeLog
   trunk/Makefile.am
   trunk/babl/babl-fish-stats.c
   trunk/configure.ac

Modified: trunk/Makefile.am
==============================================================================
--- trunk/Makefile.am	(original)
+++ trunk/Makefile.am	Sun Apr  6 12:53:24 2008
@@ -1,9 +1,10 @@
 AUTOMAKE_OPTIONS = foreign dist-bzip2
 
-SUBDIRS = babl		\
-	  extensions	\
-	  tests		\
-	  docs
+SUBDIRS = \
+	babl		\
+	extensions	\
+	tests		\
+	docs
 
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = babl.pc

Added: trunk/acinclude.m4
==============================================================================
--- (empty file)
+++ trunk/acinclude.m4	Sun Apr  6 12:53:24 2008
@@ -0,0 +1,20 @@
+dnl BABL_DETECT_CFLAGS(RESULT, FLAGSET)
+dnl Detect if the compiler supports a set of flags
+
+AC_DEFUN([BABL_DETECT_CFLAGS],
+[
+  $1=
+  for flag in $2; do
+    if test -z "[$]$1"; then
+      $1_save_CFLAGS="$CFLAGS"
+      CFLAGS="$CFLAGS $flag"
+      AC_MSG_CHECKING([whether [$]CC understands [$]flag])
+      AC_TRY_COMPILE([], [], [$1_works=yes], [$1_works=no])
+      AC_MSG_RESULT([$]$1_works)
+      CFLAGS="[$]$1_save_CFLAGS"
+      if test "x[$]$1_works" = "xyes"; then
+        $1="$flag"
+      fi
+    fi
+  done
+])

Modified: trunk/babl/babl-fish-stats.c
==============================================================================
--- trunk/babl/babl-fish-stats.c	(original)
+++ trunk/babl/babl-fish-stats.c	Sun Apr  6 12:53:24 2008
@@ -231,7 +231,7 @@
 }
 
 static void
-conversions ()
+conversions (void)
 {
   fprintf (output_file, "<h2>Conversions</h2><dl>\n");
   babl_conversion_each (each_conv, NULL);

Modified: trunk/configure.ac
==============================================================================
--- trunk/configure.ac	(original)
+++ trunk/configure.ac	Sun Apr  6 12:53:24 2008
@@ -105,6 +105,7 @@
 WEBSITE_LOCATION=public_html/babl/
 AC_SUBST(WEBSITE_LOCATION)
 
+
 if eval "test x$GCC = xyes"; then
   case " $CFLAGS " in
   *[\ \	]-Wall[\ \	]*) ;;
@@ -112,6 +113,25 @@
   esac
 fi
 
+BABL_DETECT_CFLAGS(extra_warnings, '-Wdeclaration-after-statement')
+CFLAGS="$CFLAGS $extra_warnings"
+
+BABL_DETECT_CFLAGS(extra_warnings, '-Wmissing-prototypes')
+CFLAGS="$CFLAGS $extra_warnings"
+
+BABL_DETECT_CFLAGS(extra_warnings, '-Wmissing-declarations')
+CFLAGS="$CFLAGS $extra_warnings"
+
+BABL_DETECT_CFLAGS(extra_warnings, '-Winit-self')
+CFLAGS="$CFLAGS $extra_warnings"
+
+BABL_DETECT_CFLAGS(extra_warnings, '-Wpointer-arith')
+CFLAGS="$CFLAGS $extra_warnings"
+
+BABL_DETECT_CFLAGS(extra_warnings, '-Wold-style-definition')
+CFLAGS="$CFLAGS $extra_warnings"
+
+
 AC_PATH_PROG(INKSCAPE, inkscape, no)
 AM_CONDITIONAL(HAVE_INKSCAPE, test "x$INKSCAPE" != "xno")
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]