From c486fb3d339ea973e60d75e79129f6570c3cba31 Mon Sep 17 00:00:00 2001 From: su_v Date: Sun, 23 Sep 2012 19:10:07 +0200 Subject: Fixes bug #1002351: configure.ac warnings on newer autoconf (bzr r11668.1.6) --- configure.ac | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/configure.ac b/configure.ac index 0fd8429ee..b311bf68b 100644 --- a/configure.ac +++ b/configure.ac @@ -11,6 +11,7 @@ AC_INIT(inkscape, 0.48+devel) AC_CANONICAL_HOST AC_CONFIG_SRCDIR([src/main.cpp]) +AC_CONFIG_MACRO_DIR([m4]) AM_INIT_AUTOMAKE([dist-zip dist-bzip2 tar-pax]) AC_ARG_ENABLE([lsb], AS_HELP_STRING([--enable-lsb], [LSB-compatible build configuration]), [ @@ -69,7 +70,7 @@ if test "$GCC" = "yes"; then AC_MSG_CHECKING([compiler support for -Werror=format-security]) ink_svd_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-Werror=format-security $CPPFLAGS" - AC_COMPILE_IFELSE(AC_LANG_PROGRAM([]), [ink_opt_ok=yes], [ink_opt_ok=no]) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])], [ink_opt_ok=yes], [ink_opt_ok=no]) AC_MSG_RESULT([$ink_opt_ok]) if test "x$ink_opt_ok" != "xyes"; then CPPFLAGS="$ink_svd_CPPFLAGS" @@ -83,7 +84,7 @@ if test "$GCC" = "yes"; then AC_MSG_CHECKING([compiler support for -Wno-pointer-sign]) ink_svd_CFLAGS="$CFLAGS" CFLAGS="-Wno-pointer-sign $CFLAGS" - AC_COMPILE_IFELSE(AC_LANG_PROGRAM([]), [ink_opt_ok=yes], [ink_opt_ok=no]) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])], [ink_opt_ok=yes], [ink_opt_ok=no]) AC_MSG_RESULT([$ink_opt_ok]) if test "x$ink_opt_ok" != "xyes"; then CFLAGS="$ink_svd_CFLAGS" @@ -96,7 +97,7 @@ if test "$GCC" = "yes"; then AC_MSG_CHECKING([linker tolerates -z relro]) ink_svd_LDFLAGS="$LDFLAGS" LDFLAGS="-Wl,-z,relro $LDFLAGS" - AC_LINK_IFELSE(AC_LANG_PROGRAM([]), [ink_opt_ok=yes], [ink_opt_ok=no]) + AC_LINK_IFELSE([AC_LANG_PROGRAM([])], [ink_opt_ok=yes], [ink_opt_ok=no]) AC_MSG_RESULT([$ink_opt_ok]) if test "x$ink_opt_ok" != "xyes"; then LDFLAGS="$ink_svd_LDFLAGS" @@ -137,14 +138,14 @@ fi # Detect a working version of unordered containers. AC_MSG_CHECKING([TR1 unordered_set usability]) -AC_COMPILE_IFELSE([ +AC_COMPILE_IFELSE([AC_LANG_SOURCE([ #include int main() { std::tr1::unordered_set i, j; i = j; return 0; } -], [unordered_set_works=yes], [unordered_set_works=no]) +])], [unordered_set_works=yes], [unordered_set_works=no]) if test "x$unordered_set_works" = "xyes"; then AC_MSG_RESULT([ok]) AC_DEFINE(HAVE_TR1_UNORDERED_SET, 1, [Has working standard TR1 unordered_set]) @@ -161,13 +162,13 @@ AC_MSG_CHECKING([for overzealous strict aliasing warnings]) ignore_strict_aliasing=no CXXFLAGS_SAVE=$CXXFLAGS CXXFLAGS="$CXXFLAGS -Werror=strict-aliasing" -AC_COMPILE_IFELSE([ +AC_COMPILE_IFELSE([AC_LANG_SOURCE([ #include boost::optional x; int func() { return *x; } -], [ignore_strict_aliasing=no], [ignore_strict_aliasing=yes]) +])], [ignore_strict_aliasing=no], [ignore_strict_aliasing=yes]) AC_MSG_RESULT($ignore_strict_aliasing) CXXFLAGS=$CXXFLAGS_SAVE if test "x$ignore_strict_aliasing" = "xyes"; then @@ -609,7 +610,7 @@ LIBS="$LIBS $POPPLER_LIBS" AC_MSG_CHECKING(for new color space API in Poppler) popplercolor="no" -AC_COMPILE_IFELSE([ +AC_COMPILE_IFELSE([AC_LANG_SOURCE([ #include int main() { @@ -618,7 +619,7 @@ int main() { p = &GfxColorSpace::parse; return 0; } -], [popplercolor=yes]) +])], [popplercolor=yes]) if test "x$popplercolor" = "xyes"; then AC_DEFINE(POPPLER_NEW_COLOR_SPACE_API, 1, [Use color space API from Poppler >= 0.12.2]) AC_MSG_RESULT(yes) @@ -629,7 +630,7 @@ fi # Poppler's b604a008 commit changes this AC_MSG_CHECKING([whether Poppler's GfxPatch no longer uses GfxColor]) popplergfxcolor="no" -AC_COMPILE_IFELSE([ +AC_COMPILE_IFELSE([AC_LANG_SOURCE([ #include int main() { @@ -638,7 +639,7 @@ int main() { patch.color[[0]][[0]] = color; return 0; } -], [popplergfxcolor=yes]) +])], [popplergfxcolor=yes]) if test "x$popplergfxcolor" = "xyes"; then AC_DEFINE(POPPLER_NEW_GFXPATCH, 1, [GfxPatch no longer uses GfxColor in >= 0.15.1]) AC_MSG_RESULT(yes) @@ -843,10 +844,10 @@ fi # Check for Apple Mac OS X Carbon framework carbon_ok=no AC_MSG_CHECKING([for Mac OS X Carbon support]) -AC_COMPILE_IFELSE([ +AC_COMPILE_IFELSE([AC_LANG_SOURCE([ #include #include -], [carbon_ok=yes]) +])], [carbon_ok=yes]) AC_MSG_RESULT($carbon_ok) if test "x$carbon_ok" = "xyes"; then AC_DEFINE(HAVE_CARBON, 1, [define to 1 if Carbon is available]) @@ -1013,8 +1014,8 @@ if test "$GXX" = "yes"; then ink_svd_CXXFLAGS="$CXXFLAGS" CXXFLAGS="-Wno-unused-parameter $CXXFLAGS" # -Wno-unused-parameter isn't accepted by gcc 2.95. - AC_COMPILE_IFELSE([int dummy; -], , CXXFLAGS="-Wno-unused $ink_svd_CXXFLAGS",) + AC_COMPILE_IFELSE([AC_LANG_SOURCE([int dummy; +])], , CXXFLAGS="-Wno-unused $ink_svd_CXXFLAGS",) # Note: At least one bug has been caught from unused parameter warnings, # so it might be worth trying not to disable it. # One way of selectively disabling the warnings (i.e. only where the -- cgit v1.2.3