From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8507 invoked from network); 6 May 1999 15:48:00 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 6 May 1999 15:48:00 -0000 Received: (qmail 9871 invoked by alias); 6 May 1999 15:47:51 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 6227 Received: (qmail 9863 invoked from network); 6 May 1999 15:47:50 -0000 Message-Id: <9905061523.AA21545@ibmth.df.unipi.it> To: zsh-workers@sunsite.auc.dk (Zsh hackers list) Subject: PATCH: large file support on SunOS 5 Date: Thu, 06 May 1999 17:23:19 +0200 From: Peter Stephenson This is the patch for large file support on SunOS 5 using the configuration code lifted from bash. There was one additional difficulty that $LDFLAGS was always set, so that $auto_ldflags has to be tested to see if it was set by configure. --- aczsh.m4.2gb Sat Jan 9 17:12:41 1999 +++ aczsh.m4 Thu May 6 16:58:50 1999 @@ -25,6 +25,47 @@ dnl dnl +dnl Code from the configure system for bash 2.03 (not zsh copyright). +dnl If available, use support for large files unless the user specified +dnl one of the CPPFLAGS, LDFLAGS, or LIBS variables ( +dnl via GNU patch 2.5) +dnl +AC_DEFUN(zsh_LARGE_FILE_SUPPORT, +[AC_MSG_CHECKING(whether large file support needs explicit enabling) +ac_getconfs='' +ac_result=yes +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 ;; + 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" +done +case "$ac_result$ac_getconfs" in +yes) ac_result=no ;; +esac +case "$ac_result$ac_set" in +yes?*) test "x$ac_set" != "xLDFLAGS" -o "x$auto_ldflags" = x && { + ac_result="yes, but $ac_set is already set, so use its settings" +} +esac +AC_MSG_RESULT($ac_result) +case $ac_result in +yes) + for ac_shellvar in $ac_shellvars; do + eval $ac_shellvar=\$ac_test_$ac_shellvar + done ;; +esac +]) + +dnl dnl zsh_SYS_DYNAMIC_BROKEN dnl Check whether static/shared library linking is broken. dnl --- configure.in.2gb Mon May 3 16:38:10 1999 +++ configure.in Thu May 6 16:36:15 1999 @@ -204,6 +204,10 @@ AC_PROG_CC +dnl Check for large file support (Solaris). +dnl This needs to be done early to get the stuff into the flags. +zsh_LARGE_FILE_SUPPORT + dnl if the user hasn't specified CFLAGS, then dnl if compiler is gcc, then use -O2 and some warning flags dnl else use -O -- Peter Stephenson Tel: +39 050 844536 WWW: http://www.ifh.de/~pws/ Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy