Use gnulib-tool to create gnulib source files.
* Add gnulib files generated by gnulib-tool in build-aux, m4 and grub-core/gnulib directories * .bzignore: Add **/.deps and autogenerated gnulib files * configure.ac: Assign auxiliary directory to build-aux, add invocation of gnulib macros, add grub-core/gnulib/Makefile * Makefile.am: Add gnulib directory in SUBDIRS (removing unnecessary .), include m4 directory to aclocal. * Makefile.util.def: Remove direct compilation of gnulib source files and use the new grub-core/gnulib/libgnu.a. * build-aux/config.rpath: move config.rpath from top directory to build-aux * conf/Makefile.common: Remove the macro _GL_UNUSED already defined in gnulib headers * conf/Makefile.extra-dist: Add m4/gnulib-cache.m4 * grub-core/Makefile.core.def: Remove unnecessary extra_dist * grub-core/lib/posix_wrap/localcharset.h (locale_charset): Update header. * grub-core/lib/posix_wrap/langinfo.h (nl_langinfo): Return static string.
This commit is contained in:
parent
e511c9f591
commit
15c6926126
164 changed files with 28462 additions and 276 deletions
65
m4/multiarch.m4
Normal file
65
m4/multiarch.m4
Normal file
|
@ -0,0 +1,65 @@
|
|||
# multiarch.m4 serial 5
|
||||
dnl Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# Determine whether the compiler is or may be producing universal binaries.
|
||||
#
|
||||
# On MacOS X 10.5 and later systems, the user can create libraries and
|
||||
# executables that work on multiple system types--known as "fat" or
|
||||
# "universal" binaries--by specifying multiple '-arch' options to the
|
||||
# compiler but only a single '-arch' option to the preprocessor. Like
|
||||
# this:
|
||||
#
|
||||
# ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
|
||||
# CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
|
||||
# CPP="gcc -E" CXXCPP="g++ -E"
|
||||
#
|
||||
# Detect this situation and set the macro AA_APPLE_UNIVERSAL_BUILD at the
|
||||
# beginning of config.h and set APPLE_UNIVERSAL_BUILD accordingly.
|
||||
|
||||
AC_DEFUN_ONCE([gl_MULTIARCH],
|
||||
[
|
||||
dnl Code similar to autoconf-2.63 AC_C_BIGENDIAN.
|
||||
gl_cv_c_multiarch=no
|
||||
AC_COMPILE_IFELSE(
|
||||
[AC_LANG_SOURCE(
|
||||
[[#ifndef __APPLE_CC__
|
||||
not a universal capable compiler
|
||||
#endif
|
||||
typedef int dummy;
|
||||
]])],
|
||||
[
|
||||
dnl Check for potential -arch flags. It is not universal unless
|
||||
dnl there are at least two -arch flags with different values.
|
||||
arch=
|
||||
prev=
|
||||
for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
|
||||
if test -n "$prev"; then
|
||||
case $word in
|
||||
i?86 | x86_64 | ppc | ppc64)
|
||||
if test -z "$arch" || test "$arch" = "$word"; then
|
||||
arch="$word"
|
||||
else
|
||||
gl_cv_c_multiarch=yes
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
prev=
|
||||
else
|
||||
if test "x$word" = "x-arch"; then
|
||||
prev=arch
|
||||
fi
|
||||
fi
|
||||
done
|
||||
])
|
||||
if test $gl_cv_c_multiarch = yes; then
|
||||
AC_DEFINE([AA_APPLE_UNIVERSAL_BUILD], [1],
|
||||
[Define if the compiler is building for multiple architectures of Apple platforms at once.])
|
||||
APPLE_UNIVERSAL_BUILD=1
|
||||
else
|
||||
APPLE_UNIVERSAL_BUILD=0
|
||||
fi
|
||||
AC_SUBST([APPLE_UNIVERSAL_BUILD])
|
||||
])
|
Loading…
Add table
Add a link
Reference in a new issue