annotate m4/multiarch.m4 @ 112414:4b27e6d58d2c

* nsterm.m (constrainFrameRect): Only constrain the first time called.
author Jan D. <jan.h.d@swipnet.se>
date Sat, 22 Jan 2011 12:33:32 +0100
parents c81ff7082a9a
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
112403
c81ff7082a9a src/config.in: shrink slightly
Paul Eggert <eggert@cs.ucla.edu>
parents: 112308
diff changeset
1 # multiarch.m4 serial 6
112308
474d5026a5a2 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
2 dnl Copyright (C) 2008-2011 Free Software Foundation, Inc.
474d5026a5a2 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
3 dnl This file is free software; the Free Software Foundation
474d5026a5a2 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
4 dnl gives unlimited permission to copy and/or distribute it,
474d5026a5a2 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
5 dnl with or without modifications, as long as this notice is preserved.
474d5026a5a2 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
6
474d5026a5a2 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
7 # Determine whether the compiler is or may be producing universal binaries.
474d5026a5a2 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
8 #
474d5026a5a2 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
9 # On MacOS X 10.5 and later systems, the user can create libraries and
474d5026a5a2 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
10 # executables that work on multiple system types--known as "fat" or
474d5026a5a2 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
11 # "universal" binaries--by specifying multiple '-arch' options to the
474d5026a5a2 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
12 # compiler but only a single '-arch' option to the preprocessor. Like
474d5026a5a2 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
13 # this:
474d5026a5a2 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
14 #
474d5026a5a2 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
15 # ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
474d5026a5a2 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
16 # CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
474d5026a5a2 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
17 # CPP="gcc -E" CXXCPP="g++ -E"
474d5026a5a2 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
18 #
112403
c81ff7082a9a src/config.in: shrink slightly
Paul Eggert <eggert@cs.ucla.edu>
parents: 112308
diff changeset
19 # Detect this situation and set APPLE_UNIVERSAL_BUILD accordingly.
112308
474d5026a5a2 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
20
474d5026a5a2 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
21 AC_DEFUN_ONCE([gl_MULTIARCH],
474d5026a5a2 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
22 [
474d5026a5a2 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
23 dnl Code similar to autoconf-2.63 AC_C_BIGENDIAN.
474d5026a5a2 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
24 gl_cv_c_multiarch=no
474d5026a5a2 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
25 AC_COMPILE_IFELSE(
474d5026a5a2 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
26 [AC_LANG_SOURCE(
474d5026a5a2 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
27 [[#ifndef __APPLE_CC__
474d5026a5a2 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
28 not a universal capable compiler
474d5026a5a2 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
29 #endif
474d5026a5a2 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
30 typedef int dummy;
474d5026a5a2 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
31 ]])],
474d5026a5a2 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
32 [
474d5026a5a2 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
33 dnl Check for potential -arch flags. It is not universal unless
474d5026a5a2 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
34 dnl there are at least two -arch flags with different values.
474d5026a5a2 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
35 arch=
474d5026a5a2 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
36 prev=
474d5026a5a2 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
37 for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
474d5026a5a2 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
38 if test -n "$prev"; then
474d5026a5a2 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
39 case $word in
474d5026a5a2 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
40 i?86 | x86_64 | ppc | ppc64)
474d5026a5a2 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
41 if test -z "$arch" || test "$arch" = "$word"; then
474d5026a5a2 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
42 arch="$word"
474d5026a5a2 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
43 else
474d5026a5a2 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
44 gl_cv_c_multiarch=yes
474d5026a5a2 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
45 fi
474d5026a5a2 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
46 ;;
474d5026a5a2 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
47 esac
474d5026a5a2 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
48 prev=
474d5026a5a2 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
49 else
474d5026a5a2 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
50 if test "x$word" = "x-arch"; then
474d5026a5a2 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
51 prev=arch
474d5026a5a2 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
52 fi
474d5026a5a2 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
53 fi
474d5026a5a2 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
54 done
474d5026a5a2 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
55 ])
474d5026a5a2 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
56 if test $gl_cv_c_multiarch = yes; then
474d5026a5a2 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
57 APPLE_UNIVERSAL_BUILD=1
474d5026a5a2 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
58 else
474d5026a5a2 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
59 APPLE_UNIVERSAL_BUILD=0
474d5026a5a2 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
60 fi
474d5026a5a2 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
61 AC_SUBST([APPLE_UNIVERSAL_BUILD])
474d5026a5a2 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
62 ])