about summary refs log tree commit diff
path: root/sysdeps/x86_64/preconfigure.ac
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2013-10-30 13:20:52 +1000
committerAllan McRae <allan@archlinux.org>2013-10-30 17:32:08 +1000
commitcb8a6dbd176ee59d61068bed92e2c8d22bd28b13 (patch)
tree9ead2c7bd7a279a0669afe49476dd1da4b3c8da9 /sysdeps/x86_64/preconfigure.ac
parent36a4953a1dbc2b1994c1df0478c1c89a41398dba (diff)
downloadglibc-cb8a6dbd176ee59d61068bed92e2c8d22bd28b13.tar.gz
glibc-cb8a6dbd176ee59d61068bed92e2c8d22bd28b13.tar.xz
glibc-cb8a6dbd176ee59d61068bed92e2c8d22bd28b13.zip
rename configure.in to configure.ac
Autoconf has been deprecating configure.in for quite a long time.
Rename all our configure.in and preconfigure.in files to .ac.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'sysdeps/x86_64/preconfigure.ac')
-rw-r--r--sysdeps/x86_64/preconfigure.ac20
1 files changed, 20 insertions, 0 deletions
diff --git a/sysdeps/x86_64/preconfigure.ac b/sysdeps/x86_64/preconfigure.ac
new file mode 100644
index 0000000000..600700ea1a
--- /dev/null
+++ b/sysdeps/x86_64/preconfigure.ac
@@ -0,0 +1,20 @@
+GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
+# Local preconfigure fragment for sysdeps/x86_64
+
+test -n "$base_machine" || case "$machine" in
+x86_64)
+  base_machine=x86_64
+  # Check if we are building for x32.
+  AC_CACHE_CHECK(whether $CC compiles in -mx32 mode by default,
+		 libc_cv_x32, [dnl
+  AC_TRY_COMPILE(dnl
+[#ifndef __ILP32__
+# error not x32
+#endif], [], libc_cv_x32=yes, libc_cv_x32=no)])
+  if test $libc_cv_x32 = yes; then
+    machine=x86_64/x32
+  else
+    machine=x86_64/64
+  fi
+  ;;
+esac