diff options
Diffstat (limited to 'Build/source/libs/graphite')
-rw-r--r-- | Build/source/libs/graphite/ChangeLog | 5 | ||||
-rw-r--r-- | Build/source/libs/graphite/Makefile.am | 2 | ||||
-rw-r--r-- | Build/source/libs/graphite/Makefile.in | 7 | ||||
-rw-r--r-- | Build/source/libs/graphite/aclocal.m4 | 1 | ||||
-rwxr-xr-x | Build/source/libs/graphite/configure | 90 | ||||
-rw-r--r-- | Build/source/libs/graphite/configure.ac | 2 |
6 files changed, 106 insertions, 1 deletions
diff --git a/Build/source/libs/graphite/ChangeLog b/Build/source/libs/graphite/ChangeLog index d261a3bba12..48d30944b8f 100644 --- a/Build/source/libs/graphite/ChangeLog +++ b/Build/source/libs/graphite/ChangeLog @@ -1,3 +1,8 @@ +2009-06-19 Peter Breitenlohner <peb@mppmu.mpg.de> + + * configure.ac: enable compiler warnings. + * Makefile.am (AM_CFLAGS, AM_CXXFLAGS): enable compiler warnings. + 2009-03-20 Peter Breitenlohner <peb@mppmu.mpg.de> Adapt to TL2009 build system. diff --git a/Build/source/libs/graphite/Makefile.am b/Build/source/libs/graphite/Makefile.am index aa2f7421dc7..645a7f7ece3 100644 --- a/Build/source/libs/graphite/Makefile.am +++ b/Build/source/libs/graphite/Makefile.am @@ -8,6 +8,8 @@ ACLOCAL_AMFLAGS = -I ../../m4 INCLUDES = -I$(top_srcdir)/include/graphite -I$(top_srcdir)/src/generic INCLUDES += -I$(top_srcdir)/src/font -I$(top_srcdir)/src/segment AM_CPPFLAGS = -DNDEBUG +AM_CFLAGS = $(WARNING_CFLAGS) +AM_CXXFLAGS = $(WARNING_CXXFLAGS) noinst_LIBRARIES = libgraphite.a diff --git a/Build/source/libs/graphite/Makefile.in b/Build/source/libs/graphite/Makefile.in index 2fd509e1742..feaa2ac8bc8 100644 --- a/Build/source/libs/graphite/Makefile.in +++ b/Build/source/libs/graphite/Makefile.in @@ -50,7 +50,8 @@ DIST_COMMON = README $(am__configure_deps) $(noinst_HEADERS) \ ../../build-aux/mkinstalldirs ../../build-aux/texinfo.tex \ ../../build-aux/ylwrap COPYING ChangeLog INSTALL TODO ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/../../m4/kpse-warnings.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ @@ -154,6 +155,8 @@ SHELL = @SHELL@ SIZEOF_WCHAR_T = @SIZEOF_WCHAR_T@ STRIP = @STRIP@ VERSION = @VERSION@ +WARNING_CFLAGS = @WARNING_CFLAGS@ +WARNING_CXXFLAGS = @WARNING_CXXFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -210,6 +213,8 @@ INCLUDES = -I$(top_srcdir)/include/graphite \ -I$(top_srcdir)/src/generic -I$(top_srcdir)/src/font \ -I$(top_srcdir)/src/segment AM_CPPFLAGS = -DNDEBUG +AM_CFLAGS = $(WARNING_CFLAGS) +AM_CXXFLAGS = $(WARNING_CXXFLAGS) noinst_LIBRARIES = libgraphite.a noinst_HEADERS = \ include/graphite/FileFont.h \ diff --git a/Build/source/libs/graphite/aclocal.m4 b/Build/source/libs/graphite/aclocal.m4 index d360465f230..a6397fb2452 100644 --- a/Build/source/libs/graphite/aclocal.m4 +++ b/Build/source/libs/graphite/aclocal.m4 @@ -989,3 +989,4 @@ AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR +m4_include([../../m4/kpse-warnings.m4]) diff --git a/Build/source/libs/graphite/configure b/Build/source/libs/graphite/configure index 5162eada595..ac825b05fc3 100755 --- a/Build/source/libs/graphite/configure +++ b/Build/source/libs/graphite/configure @@ -647,6 +647,8 @@ SIZEOF_WCHAR_T EGREP GREP CPP +WARNING_CXXFLAGS +WARNING_CFLAGS LN_S RANLIB am__fastdepCC_FALSE @@ -747,6 +749,7 @@ ac_user_opts=' enable_option_checking enable_maintainer_mode enable_dependency_tracking +enable_compiler_warnings ' ac_precious_vars='build_alias host_alias @@ -1395,6 +1398,9 @@ Optional Features: (and sometimes confusing) to the casual installer --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors + --enable-compiler-warnings=[no|min|yes|max] + Turn on compiler warnings [default: yes if + maintainer-mode, min otherwise] Some influential environment variables: CXX C++ compiler command @@ -4206,6 +4212,90 @@ $as_echo "no, using $LN_S" >&6; } fi +# Check whether --enable-compiler-warnings was given. +if test "${enable_compiler_warnings+set}" = set; then + enableval=$enable_compiler_warnings; +fi +case $enable_compiler_warnings in + no | min | yes | max) : ;; + *) if test "x$enable_maintainer_mode" = xyes; then + enable_compiler_warnings=yes +else + enable_compiler_warnings=min +fi + ;; +esac + + +{ $as_echo "$as_me:$LINENO: checking what warning flags to pass to the C compiler" >&5 +$as_echo_n "checking what warning flags to pass to the C compiler... " >&6; } +if test "${kpse_cv_warning_cflags+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test "x$enable_compiler_warnings" = xno; then + kpse_cv_warning_cflags= +elif test "x$GCC" = xyes; then + kpse_cv_warning_cflags="-Wall -Wunused" + case `$CC -dumpversion` in + 3.4.* | 4.*) kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wdeclaration-after-statement" ;; +esac + + case `$CC -dumpversion` in + 3.[234].* | 4.*) kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wno-unknown-pragmas" ;; +esac + + if test "x$enable_compiler_warnings" != xmin; then + kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wmissing-prototypes -Wmissing-declarations" + if test "x$enable_compiler_warnings" != xyes; then + kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wimplicit -Wparentheses -Wreturn-type" + kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wswitch -Wtrigraphs -Wshadow -Wpointer-arith" + kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wcast-qual -Wcast-align -Wwrite-strings" + case `$CC -dumpversion` in + 3.4.* | 4.*) kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wold-style-definition" ;; +esac + + fi + fi +else + : # FIXME: warning flags for non-gcc compilers +fi +fi +{ $as_echo "$as_me:$LINENO: result: $kpse_cv_warning_cflags" >&5 +$as_echo "$kpse_cv_warning_cflags" >&6; } +WARNING_CFLAGS=$kpse_cv_warning_cflags + + +{ $as_echo "$as_me:$LINENO: checking what warning flags to pass to the C++ compiler" >&5 +$as_echo_n "checking what warning flags to pass to the C++ compiler... " >&6; } +if test "${kpse_cv_warning_cxxflags+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test "x$enable_compiler_warnings" = xno; then + kpse_cv_warning_cxxflags= +elif test "x$GXX" = xyes; then + kpse_cv_warning_cxxflags="-Wall -Wunused" + case `$CXX -dumpversion` in + 3.[234].* | 4.*) kpse_cv_warning_cxxflags="$kpse_cv_warning_cxxflags -Wno-unknown-pragmas" ;; +esac + + if test "x$enable_compiler_warnings" != xmin; then + if test "x$enable_compiler_warnings" != xyes; then + kpse_cv_warning_cxxflags="$kpse_cv_warning_cxxflags -Wimplicit -Wparentheses -Wreturn-type" + kpse_cv_warning_cxxflags="$kpse_cv_warning_cxxflags -Wswitch -Wtrigraphs -Wshadow -Wpointer-arith" + kpse_cv_warning_cxxflags="$kpse_cv_warning_cxxflags -Wcast-qual -Wcast-align -Wwrite-strings" + fi + fi +else + : # FIXME: warning flags for non-g++ compilers +fi +fi +{ $as_echo "$as_me:$LINENO: result: $kpse_cv_warning_cxxflags" >&5 +$as_echo "$kpse_cv_warning_cxxflags" >&6; } +WARNING_CXXFLAGS=$kpse_cv_warning_cxxflags + + + + # Checks for header files. ac_ext=c diff --git a/Build/source/libs/graphite/configure.ac b/Build/source/libs/graphite/configure.ac index c3de73b6476..24dfcdc746b 100644 --- a/Build/source/libs/graphite/configure.ac +++ b/Build/source/libs/graphite/configure.ac @@ -23,6 +23,8 @@ AC_PROG_CC AC_PROG_RANLIB AC_PROG_LN_S +KPSE_COMPILER_WARNINGS + # Checks for header files. AC_HEADER_STDC |