installation problem with egcs 970828 on alpha-dec-osf4.0

Jim Meyering meyering@eng.ascend.com
Sun Sep 14 13:50:00 GMT 1997


Jeffrey A Law <law@hurl.cygnus.com> writes:
|   In message < yzq4t7zrc92.fsf@boom.eng.ascend.com >you write:
|   > Just copy/rename/fix autoconf's definition of AC_PROG_INSTALL and put
|   > it in aclocal.m4.  Then use EGCS_PROG_INSTALL instead of AC_PROG_INSTALL
|   > in configure.in.
| Well, I tried that, and I must be missing something stupid because
| autoconf/m4 choked with a wonderful message:
|
| NONE:0: /puke/law/obj/latest/hppa1.1-hp-hpux10-holes/m4: ERROR: EOF in string
|
| I'm not much of an autoconf or m4 hacker, so I might be missing
| something stupid.
|
| Can you take care of this?  There's references to AC_PROG_INSTALL
| in only 3 dirs gcc/configure.in, etc/configure.in texinfo/configure.in.
|
| Thanks!

Ok.
Here's the .m4 code.
It seems to work (I put it in gcc/aclocal.m4, did
s/AC_PROG_INSTALL/EGCS_PROG_INSTALL/ to gcc/configure.in,
ran autoconf and configure (both in ./gcc)) but that's hardly
thorough testing.

It'd be best if someone tested it on a system (or with a contrived PATH)
that would otherwise end up using the losing /bin/installbsd.

Hope you can get by without the complete patch.

-----------
dnl This is a replacement for AC_PROG_INSTALL of autoconf-2.12.
dnl It adds a single exclusion to avoid using /bin/installbsd
dnl because the Dec Unix verison of that program doesn't work properly.
AC_DEFUN(EGCS_PROG_INSTALL,
[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
# Find a good install program.  We prefer a C program (faster),
# so one script is as good as another.  But avoid the broken or
# incompatible versions:
# SysV /etc/install, /usr/sbin/install
# SunOS /usr/etc/install
# IRIX /sbin/install
# AIX /bin/install
# AFS /usr/afsws/bin/install, which mishandles nonexistent args
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# Dec Unix /bin/installbsd, which tries to make root the owner
# ./install, which can be erroneously created by make from ./install.sh.
AC_MSG_CHECKING(for a BSD compatible install)
if test -z "$INSTALL"; then
AC_CACHE_VAL(egcs_cv_path_install,
[  IFS="${IFS= 	}"; ac_save_IFS="$IFS"; IFS="${IFS}:"
  for ac_dir in $PATH; do
    # Account for people who put trailing slashes in PATH elements.
    case "$ac_dir/" in
    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
    *)
      # OSF1 and SCO ODT 3.0 have their own names for install.
      for ac_prog in ginstall installbsd scoinst install; do
        if test -f $ac_dir/$ac_prog; then
	  if test $ac_prog = install &&
            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
	    # AIX install.  It has an incompatible calling convention.
	    # OSF/1 installbsd also uses dspmsg, but is usable.
	    :
	  else
	    # Remove any trailing slashes from ac_dir.
	    ac_dir=`echo $ac_dir|sed 's,//*$,,'`
	    if test $ac_dir/$ac_prog = /bin/installbsd; then
	      # Don't use /bin/installbsd; on Dec Unix that program tries
	      # to make root the owner of each installed file.
	      :
	    else
	      egcs_cv_path_install="$ac_dir/$ac_prog -c"
	      break 2
	    fi
	  fi
	fi
      done
      ;;
    esac
  done
  IFS="$ac_save_IFS"
])dnl
  if test "${egcs_cv_path_install+set}" = set; then
    INSTALL="$egcs_cv_path_install"
  else
    # As a last resort, use the slow shell script.  We don't cache a
    # path for INSTALL within a source directory, because that will
    # break other packages using the cache if that directory is
    # removed, or if the path is relative.
    INSTALL="$ac_install_sh"
  fi
fi
dnl We do special magic for INSTALL instead of AC_SUBST, to get
dnl relative paths right.
AC_MSG_RESULT($INSTALL)

# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
# It thinks the first close brace ends the variable substitution.
test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
AC_SUBST(INSTALL_PROGRAM)dnl

test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
AC_SUBST(INSTALL_DATA)dnl
])



More information about the Gcc-bugs mailing list