Commit 90176a07 authored by Nick Schermer's avatar Nick Schermer

Fix version number and use new macros.

parent 83a5372e
......@@ -13,23 +13,23 @@ m4_define([xfce4_settings_version_major], [4])
m4_define([xfce4_settings_version_minor], [7])
m4_define([xfce4_settings_version_micro], [0])
m4_define([xfce4_settings_version_nano], [])
m4_define([xfce4_settings_version_build], [r@REVISION@])
m4_define([xfce4_settings_version_tag], [-git]) # Leave empty for releases
m4_define([xfce4_settings_version], [xfce4_settings_version_major().xfce4_settings_version_minor().xfce4_settings_version_micro()ifelse(xfce4_settings_version_nano(), [], [], [.xfce4_settings_version_nano()])ifelse(xfce4_settings_version_tag(),[],[], [xfce4_settings_version_tag()])])
m4_define([xfce4_settings_version_build], [@REVISION@])
m4_define([xfce4_settings_version_tag], [git]) # Leave empty for releases
m4_define([xfce4_settings_version], [xfce4_settings_version_major().xfce4_settings_version_minor().xfce4_settings_version_micro()ifelse(xfce4_settings_version_nano(), [], [], [.xfce4_settings_version_nano()])ifelse(xfce4_settings_version_tag(), [git], [xfce4_settings_version_tag()-xfce4_settings_version_build()], [xfce4_settings_version_tag()])])
dnl *******************************************
dnl *** Debugging support for SVN snapshots ***
dnl *******************************************
m4_define([xfce4_settings_debug_default], [ifelse(xfce4_settings_version_tag(), [svn], [full], [minimum])])
m4_define([xfce4_settings_debug_default], [ifelse(xfce4_settings_version_tag(), [git], [full], [minimum])])
dnl ***************************
dnl *** Initialize autoconf ***
dnl ***************************
AC_COPYRIGHT([Copyright (c) 2008-2009
AC_COPYRIGHT([Copyright (c) 2008-2010
The Xfce development team. All rights reserved.])
AC_INIT([xfce4-settings], [xfce4_settings_version], [http://bugzilla.xfce.org/])
AC_PREREQ([2.50])
AC_REVISION([$Id])
AC_REVISION([@REVISION@])
dnl ***************************
dnl *** Initialize automake ***
......@@ -37,6 +37,7 @@ dnl ***************************
AM_INIT_AUTOMAKE([1.8 dist-bzip2 tar-ustar])
AM_CONFIG_HEADER([config.h])
AM_MAINTAINER_MODE()
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
dnl *******************************
dnl *** Check for UNIX variants ***
......@@ -178,85 +179,12 @@ AC_SUBST(ENABLE_SOUND_SETTINGS)
dnl ***********************************
dnl *** Check for debugging support ***
dnl ***********************************
AC_ARG_ENABLE([debug],
AC_HELP_STRING([--enable-debug=@<:@no/minimum/yes/full@:>@], [Turn on debugging @<:@default=xfce4_settings_debug_default@:>@]),
[], [enable_debug=xfce4_settings_debug_default])
AC_MSG_CHECKING([whether to enable debugging support])
if test x"$enable_debug" = x"full" -o x"$enable_debug" = x"yes"; then
dnl Print the result
AC_MSG_RESULT([$enable_debug])
dnl Define debug for libxfce4util DBG macro
AC_DEFINE([DEBUG], [1], [Define for debugging support])
dnl Make sure we detect possible errors (if supported)
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -Wall -Werror"
AC_MSG_CHECKING([whether $CC accepts -Wall -Werror])
AC_COMPILE_IFELSE(AC_LANG_SOURCE([int x;]), [
AC_MSG_RESULT([yes])
PLATFORM_CFLAGS="$PLATFORM_CFLAGS -Wall -Werror"
], [
AC_MSG_RESULT([no])
])
CFLAGS="$save_CFLAGS"
dnl Paranoia for --enable-debug=full
if test x"$enable_debug" = x"full"; then
dnl Enable extensive debugging
PLATFORM_CPPFLAGS="$PLATFORM_CPPFLAGS -DG_ENABLE_DEBUG"
dnl Use -O0 -g3 if the compiler supports it
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -O0 -g3"
AC_MSG_CHECKING([whether $CC accepts -O0 -g3])
AC_COMPILE_IFELSE(AC_LANG_SOURCE([int x;]), [
AC_MSG_RESULT([yes])
PLATFORM_CFLAGS="$PLATFORM_CFLAGS -O0 -g3"
], [
AC_MSG_RESULT([no])
])
CFLAGS="$save_CFLAGS"
fi
else
dnl Print the result
AC_MSG_RESULT([$enable_debug])
dnl Disable debugging (release build)
PLATFORM_CPPFLAGS="$PLATFORM_CPPFLAGS -DNDEBUG"
dnl Disable object cast checks
PLATFORM_CPPFLAGS="$PLATFORM_CPPFLAGS -DG_DISABLE_CAST_CHECKS"
dnl Disable all checks for --enable-debug=no
if test x"$enable_debug" = x"no"; then
PLATFORM_CPPFLAGS="$PLATFORM_CPPFLAGS -DG_DISABLE_ASSERT -DG_DISABLE_CHECKS"
fi
fi
XDT_FEATURE_DEBUG([xfce4_settings_debug_default])
dnl **************************************
dnl *** Check for linker optimizations ***
dnl **************************************
AC_MSG_CHECKING([whether $LD accepts --as-needed])
case `$LD --as-needed -v 2>&1 </dev/null` in
*GNU* | *'with BFD'*)
LDFLAGS="$LDFLAGS -Wl,--as-needed"
AC_MSG_RESULT([yes])
;;
*)
AC_MSG_RESULT([no])
;;
esac
AC_MSG_CHECKING([whether $LD accepts -O1])
case `$LD -O1 -v 2>&1 </dev/null` in
*GNU* | *'with BFD'*)
PLATFORM_LDFLAGS="$PLATFORM_LDFLAGS -Wl,-O1"
AC_MSG_RESULT([yes])
;;
*)
AC_MSG_RESULT([no])
;;
esac
XDT_FEATURE_LINKER_OPTS()
dnl *********************************
dnl *** Substitute platform flags ***
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment