Browse Source

Use the new developer tools macros.

tags/xfce4-panel-4.10.0
Nick Schermer 11 years ago
parent
commit
355bb03adf
2 changed files with 8 additions and 117 deletions
  1. +2
    -34
      autogen.sh
  2. +6
    -83
      configure.in.in

+ 2
- 34
autogen.sh View File

@@ -1,8 +1,6 @@
#!/bin/sh
#
# $Id: autogen.sh 25025 2007-02-24 09:54:07Z jasper $
#
# Copyright (c) 2002-2005
# Copyright (c) 2002-2009
# The Xfce development team. All rights reserved.
#
# Written for Xfce by Benedikt Meurer <benny@xfce.org>.
@@ -18,34 +16,4 @@ EOF
exit 1
}

# verify that po/LINGUAS is present
(test -f po/LINGUAS) >/dev/null 2>&1 || {
cat >&2 <<EOF
autogen.sh: The file po/LINGUAS could not be found. Please check your snapshot
or try to checkout again.
EOF
exit 1
}

# substitute revision and linguas
linguas=`sed -e '/^#/d' po/LINGUAS`
if test -d .git/svn; then
revision=`LC_ALL=C git-svn find-rev HEAD`
elif test -d .git; then
revision=`LC_ALL=C git rev-parse --short HEAD`
else
revision=`LC_ALL=C svn info $0 | awk '/^Revision: / {printf "%05d\n",
$2}'`
fi
sed -e "s/@LINGUAS@/${linguas}/g" \
-e "s/@REVISION@/${revision}/g" \
< "configure.in.in" > "configure.in"

xdt-autogen $@

# xdt-autogen clean does not remove all generated files
(test x"clean" = x"$1") && {
rm -f configure.in
rm -f INSTALL
} || true
# vi:set ts=2 sw=2 et ai:
XDT_AUTOGEN_REQUIRED_VERSION="4.7.2" exec xdt-autogen $@

+ 6
- 83
configure.in.in View File

@@ -126,89 +126,12 @@ dnl #PLATFORM_CPPFLAGS="$PLATFORM_CPPFLAGS -DPANGO_DISABLE_DEPRECATED -DPANGO_DI
dnl ***********************************
dnl *** Check for debugging support ***
dnl ***********************************
AC_ARG_ENABLE([debug],
AC_HELP_STRING([--enable-debug=@<:@no/minimum/yes/full@:>@], [Turn on debugging @<:@default=panel_debug_default@:>@]),
[], [enable_debug=panel_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 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

dnl ****************************************
dnl *** Check for ELF visibility support ***
dnl ****************************************
AC_ARG_ENABLE([visibility], AC_HELP_STRING([--disable-visibility], [Do not use ELF visibility attributes]), [], [enable_visibility=yes])
have_gnuc_visibility=no
if test x"$enable_visibility" != x"no"; then
dnl Check whether the compiler supports the visibility attribute
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -Wall -Werror"
AC_MSG_CHECKING([whether $CC supports the GNUC visibility attribute])
AC_COMPILE_IFELSE(AC_LANG_SOURCE(
[
void __attribute__ ((visibility("default"))) test_default (void) {}
void __attribute__ ((visibility("hidden"))) test_hidden (void) {}
int main (int argc, char **argv) { test_default (); test_hidden (); return 0; }
]),
[
have_gnuc_visibility=yes
AC_MSG_RESULT([yes])
],
[
AC_MSG_RESULT([no])
])
CFLAGS="$save_CFLAGS"
fi
if test x"$have_gnuc_visibility" = x"yes"; then
PLATFORM_CPPFLAGS="$PLATFORM_CPPFLAGS -DHAVE_GNUC_VISIBILITY"
PLATFORM_CFLAGS="$PLATFORM_CFLAGS -fvisibility=hidden"
fi
AM_CONDITIONAL([HAVE_GNUC_VISIBILITY], [test x"$have_gnuc_visibility" = x"yes"])
XDT_FEATURE_DEBUG([panel_debug_default])

dnl **************************************
dnl *** Check for linker optimizations ***
dnl **************************************
XDT_FEATURE_LINKER_OPTS()

dnl *********************************
dnl *** Substitute platform flags ***


Loading…
Cancel
Save