about summary refs log tree commit diff
path: root/aczsh.m4
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-05-19 13:10:41 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-05-19 13:10:41 +0000
commit4fec788fa5f6e7c9723e02e3d0b57068ce9785aa (patch)
tree2b4fd7f79ee29b231c77c9bc0bc67b4eed913bef /aczsh.m4
parentea0ddb0fc6073be3d7d289e59b083f564dbd761f (diff)
downloadzsh-4fec788fa5f6e7c9723e02e3d0b57068ce9785aa.tar.gz
zsh-4fec788fa5f6e7c9723e02e3d0b57068ce9785aa.tar.xz
zsh-4fec788fa5f6e7c9723e02e3d0b57068ce9785aa.zip
Diffstat (limited to 'aczsh.m4')
-rw-r--r--aczsh.m451
1 files changed, 45 insertions, 6 deletions
diff --git a/aczsh.m4 b/aczsh.m4
index 9eee4b357..9a01e2603 100644
--- a/aczsh.m4
+++ b/aczsh.m4
@@ -38,15 +38,14 @@ ac_set=''
 ac_shellvars='CPPFLAGS LDFLAGS LIBS'
 for ac_shellvar in $ac_shellvars; do
   case $ac_shellvar in
-  CPPFLAGS) ac_lfsvar=LFS_CFLAGS ac_lfs64var=LFS64_CFLAGS ;;
-  *) ac_lfsvar=LFS_$ac_shellvar ac_lfs64var=LFS64_$ac_shellvar ;;
+  CPPFLAGS) ac_lfsvar=LFS_CFLAGS ;;
+  *) ac_lfsvar=LFS_$ac_shellvar ;;
   esac
   eval test '"${'$ac_shellvar'+set}"' = set && ac_set=$ac_shellvar
   (getconf $ac_lfsvar) >/dev/null 2>&1 || { ac_result=no; break; }
   ac_getconf=`getconf $ac_lfsvar`
-  ac_getconf64=`getconf $ac_lfs64var`
-  ac_getconfs=$ac_getconfs$ac_getconf\ $ac_getconf64
-  eval ac_test_$ac_shellvar="\$ac_getconf\ \$ac_getconf64"
+  ac_getconfs=$ac_getconfs$ac_getconf
+  eval ac_test_$ac_shellvar="\$ac_getconf"
 done
 case "$ac_result$ac_getconfs" in
 yes) ac_result=no ;;
@@ -60,12 +59,52 @@ AC_MSG_RESULT($ac_result)
 case $ac_result in
 yes)
   for ac_shellvar in $ac_shellvars; do
-    eval $ac_shellvar=\$ac_test_$ac_shellvar
+    case "`eval echo $ac_shellvar-\\\$ac_test_$ac_shellvar`" in
+      CPPFLAGS*-D_LARGEFILE_SOURCE*) eval $ac_shellvar=\$ac_test_$ac_shellvar
+	;;
+      CPPFLAGS*) 
+        eval $ac_shellvar="\"-D_LARGEFILE_SOURCE \$ac_test_$ac_shellvar\""
+	;;
+      *) eval $ac_shellvar=\$ac_test_$ac_shellvar
+    esac
   done ;;
 esac
 ])
 
 dnl
+dnl zsh_64_BIT_TYPE
+dnl   Check whether the first argument works as a 64-bit type.
+dnl   If there is a non-zero second argument, we just assume it works
+dnl   when we're cross compiling.  This is to allow a type to be
+dnl   specified directly as --enable-lfs="long long".
+dnl   Sets zsh_cv_64_bit_type to the first argument if the test worked,
+dnl   `no' otherwise.  Be careful testing this, as it may produce
+dnl   two words `long long' on an unquoted substitution.
+dnl   This macro does not produce messages as it may be run several times
+dnl   before finding the right type.
+dnl
+
+AC_DEFUN(zsh_64_BIT_TYPE,
+[AC_TRY_RUN([
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+
+main()
+{
+  $1 foo = 0; 
+  return sizeof($1) != 8;
+}
+], zsh_cv_64_bit_type="$1", zsh_cv_64_bit_type=no,
+  [if test x$2 != x ; then
+    zsh_cv_64_bit_type="$1"
+  else
+    zsh_cv_64_bit_type=no
+  fi])
+])
+
+
+dnl
 dnl zsh_SYS_DYNAMIC_BROKEN
 dnl   Check whether static/shared library linking is broken.
 dnl