Skip to content

Commit

Permalink
Yadda
Browse files Browse the repository at this point in the history
  • Loading branch information
poppa committed Aug 20, 2015
2 parents 0fe0798 + 03d467e commit ca29b31
Show file tree
Hide file tree
Showing 5 changed files with 461 additions and 203 deletions.
19 changes: 12 additions & 7 deletions INSTALL
@@ -1,8 +1,8 @@
Installation Instructions
*************************

Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
2006, 2007, 2008, 2009 Free Software Foundation, Inc.
Copyright (C) 1994-1996, 1999-2002, 2004-2013 Free Software Foundation,
Inc.

Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
Expand All @@ -12,8 +12,8 @@ without warranty of any kind.
Basic Installation
==================

Briefly, the shell commands `./configure; make; make install' should
configure, build, and install this package. The following
Briefly, the shell command `./configure && make && make install'
should configure, build, and install this package. The following
more-detailed instructions are generic; see the `README' file for
instructions specific to this package. Some packages provide this
`INSTALL' file but do not implement all of the features documented
Expand Down Expand Up @@ -226,6 +226,11 @@ order to use an ANSI C compiler:

and if that doesn't work, install pre-built binaries of GCC for HP-UX.

HP-UX `make' updates targets which have the same time stamps as
their prerequisites, which makes it generally unusable when shipped
generated files such as `configure' are involved. Use GNU `make'
instead.

On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
parse its `<wchar.h>' header file. The option `-nodtk' can be used as
a workaround. If GNU CC is not installed, it is therefore recommended
Expand Down Expand Up @@ -304,9 +309,10 @@ causes the specified `gcc' to be used as the C compiler (unless it is
overridden in the site shell script).

Unfortunately, this technique does not work for `CONFIG_SHELL' due to
an Autoconf bug. Until the bug is fixed you can use this workaround:
an Autoconf limitation. Until the limitation is lifted, you can use
this workaround:

CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash

`configure' Invocation
======================
Expand Down Expand Up @@ -362,4 +368,3 @@ operates.

`configure' also accepts some other, not widely useful, options. Run
`configure --help' for more details.

107 changes: 73 additions & 34 deletions m4/gnome-compiler-flags.m4
@@ -1,6 +1,17 @@
# gnome-compiler-flags.m4
#
# serial 2
#

dnl GNOME_COMPILE_WARNINGS
dnl Turn on many useful compiler warnings
dnl Turn on many useful compiler warnings and substitute the result into
dnl WARN_CFLAGS
dnl For now, only works on GCC
dnl Pass the default value of the --enable-compile-warnings configure option as
dnl the first argument to the macro, defaulting to 'yes'.
dnl Additional warning/error flags can be passed as an optional second argument.
dnl
dnl For example: GNOME_COMPILE_WARNINGS([maximum],[-Werror=some-flag -Wfoobar])
AC_DEFUN([GNOME_COMPILE_WARNINGS],[
dnl ******************************
dnl More compiler warnings
Expand All @@ -11,54 +22,82 @@ AC_DEFUN([GNOME_COMPILE_WARNINGS],[
[Turn on compiler warnings]),,
[enable_compile_warnings="m4_default([$1],[yes])"])
warnCFLAGS=
if test "x$GCC" != xyes; then
enable_compile_warnings=no
fi
warning_flags=
realsave_CFLAGS="$CFLAGS"
dnl These are warning flags that aren't marked as fatal. Can be
dnl overridden on a per-project basis with -Wno-foo.
base_warn_flags=" \
-Wall \
-Wstrict-prototypes \
-Wnested-externs \
"
dnl These compiler flags typically indicate very broken or suspicious
dnl code. Some of them such as implicit-function-declaration are
dnl just not default because gcc compiles a lot of legacy code.
dnl We choose to make this set into explicit errors.
base_error_flags=" \
-Werror=missing-prototypes \
-Werror=implicit-function-declaration \
-Werror=pointer-arith \
-Werror=init-self \
-Werror=format-security \
-Werror=format=2 \
-Werror=missing-include-dirs \
"
dnl Additional warning or error flags provided by the module author to
dnl allow stricter standards to be imposed on a per-module basis.
dnl The author can pass -W or -Werror flags here as they see fit.
additional_flags="m4_default([$2],[])"
case "$enable_compile_warnings" in
no)
warning_flags=
;;
warning_flags=
;;
minimum)
warning_flags="-Wall"
;;
warning_flags="-Wall"
;;
yes)
warning_flags="-Wall -Wmissing-prototypes"
;;
warning_flags="$base_warn_flags $base_error_flags $additional_flags"
;;
maximum|error)
warning_flags="-Wall -Wmissing-prototypes -Wnested-externs -Wpointer-arith"
CFLAGS="$warning_flags $CFLAGS"
for option in -Wno-sign-compare; do
SAVE_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $option"
AC_MSG_CHECKING([whether gcc understands $option])
AC_TRY_COMPILE([], [],
has_option=yes,
has_option=no,)
CFLAGS="$SAVE_CFLAGS"
AC_MSG_RESULT($has_option)
if test $has_option = yes; then
warning_flags="$warning_flags $option"
fi
unset has_option
unset SAVE_CFLAGS
done
unset option
if test "$enable_compile_warnings" = "error" ; then
warning_flags="$warning_flags -Werror"
fi
;;
warning_flags="$base_warn_flags $base_error_flags $additional_flags"
;;
*)
AC_MSG_ERROR(Unknown argument '$enable_compile_warnings' to --enable-compile-warnings)
;;
AC_MSG_ERROR(Unknown argument '$enable_compile_warnings' to --enable-compile-warnings)
;;
esac
if test "$enable_compile_warnings" = "error" ; then
warning_flags="$warning_flags -Werror"
fi
dnl Check whether GCC supports the warning options
for option in $warning_flags; do
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $option"
AC_MSG_CHECKING([whether gcc understands $option])
AC_TRY_COMPILE([], [],
has_option=yes,
has_option=no,)
CFLAGS="$save_CFLAGS"
AC_MSG_RESULT([$has_option])
if test $has_option = yes; then
tested_warning_flags="$tested_warning_flags $option"
fi
unset has_option
unset save_CFLAGS
done
unset option
CFLAGS="$realsave_CFLAGS"
AC_MSG_CHECKING(what warning flags to pass to the C compiler)
AC_MSG_RESULT($warning_flags)
AC_MSG_RESULT($tested_warning_flags)
AC_ARG_ENABLE(iso-c,
AC_HELP_STRING([--enable-iso-c],
Expand All @@ -81,7 +120,7 @@ AC_DEFUN([GNOME_COMPILE_WARNINGS],[
fi
AC_MSG_RESULT($complCFLAGS)
WARN_CFLAGS="$warning_flags $complCFLAGS"
WARN_CFLAGS="$tested_warning_flags $complCFLAGS"
AC_SUBST(WARN_CFLAGS)
])

Expand Down
12 changes: 9 additions & 3 deletions m4/libtool.m4
Expand Up @@ -1312,7 +1312,7 @@ ia64-*-hpux*)
rm -rf conftest*
;;
x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
# Find out which ABI we are using.
echo 'int i;' > conftest.$ac_ext
Expand All @@ -1333,7 +1333,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
;;
esac
;;
ppc64-*linux*|powerpc64-*linux*)
powerpc64le-*)
LD="${LD-ld} -m elf32lppclinux"
;;
powerpc64-*)
LD="${LD-ld} -m elf32ppclinux"
;;
s390x-*linux*)
Expand All @@ -1352,7 +1355,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
x86_64-*linux*)
LD="${LD-ld} -m elf_x86_64"
;;
ppc*-*linux*|powerpc*-*linux*)
powerpcle-*)
LD="${LD-ld} -m elf64lppc"
;;
powerpc-*)
LD="${LD-ld} -m elf64ppc"
;;
s390*-*linux*|s390*-*tpf*)
Expand Down

0 comments on commit ca29b31

Please sign in to comment.