mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-12-24 10:38:38 +00:00
b06b1098fc
* configure.in: Invoke the new gnulib macro gl_ASSERT_NO_GNULIB_TESTS. This makes src/config.in a bit smaller, by removing identifiers like GNULIB_TEST_MKTIME that Emacs does not need. * m4/getopt.m4, m4/gnulib-common.m4, m4/include_next.m4: * m4/multiarch.m4, m4/stddef_h.m4, m4/time_h.m4, m4/unistd_h.m4: Sync from gnulib. This removes a few more unnecessary symbols from src/config.in, such as AA_APPLE_UNIVERSAL_BUILD and HAVE_STDDEF_H. * configure, src/config.in: Regenerate.
63 lines
1.9 KiB
Plaintext
63 lines
1.9 KiB
Plaintext
# multiarch.m4 serial 6
|
|
dnl Copyright (C) 2008-2011 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 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
|
|
APPLE_UNIVERSAL_BUILD=1
|
|
else
|
|
APPLE_UNIVERSAL_BUILD=0
|
|
fi
|
|
AC_SUBST([APPLE_UNIVERSAL_BUILD])
|
|
])
|