~ubuntu-branches/debian/squeeze/ffcall/squeeze

« back to all changes in this revision

Viewing changes to src/m4/install.m4

  • Committer: Bazaar Package Importer
  • Author(s): Christoph Egger
  • Date: 2010-06-26 15:29:30 UTC
  • mfrom: (5.1.1 experimental)
  • Revision ID: james.westby@ubuntu.com-20100626152930-c09y01gk3szcnykn
Tags: 1.10+cvs20100619-2
Ship to unstable

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
dnl Copyright (C) 1993-2004 Free Software Foundation, Inc.
2
 
dnl This file is free software, distributed under the terms of the GNU
3
 
dnl General Public License.  As a special exception to the GNU General
4
 
dnl Public License, this file may be distributed as part of a program
5
 
dnl that contains a configuration script generated by Autoconf, under
6
 
dnl the same distribution terms as the rest of that program.
7
 
 
8
 
dnl From Bruno Haible, Marcus Daniels.
9
 
 
10
 
AC_PREREQ(2.13)
11
 
 
12
 
AC_DEFUN([CL_PROG_INSTALL],
13
 
[dnl This is mostly copied from AC_PROG_INSTALL.
14
 
# Find a good install program.  We prefer a C program (faster),
15
 
# so one script is as good as another.  But avoid the broken or
16
 
# incompatible versions:
17
 
# SysV /etc/install, /usr/sbin/install
18
 
# SunOS /usr/etc/install
19
 
# IRIX /sbin/install
20
 
# AIX /bin/install
21
 
# AFS /usr/afsws/bin/install, which mis-handles nonexistent args
22
 
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
23
 
# ./install, which can be erroneously created by make from ./install.sh.
24
 
AC_MSG_CHECKING(for a BSD compatible install)
25
 
if test -z "$INSTALL"; then
26
 
AC_CACHE_VAL(cl_cv_path_install,
27
 
[  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
28
 
  for ac_dir in $PATH; do
29
 
    # Account for people who put trailing slashes in PATH elements.
30
 
    case "$ac_dir/" in
31
 
    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
32
 
    *)
33
 
      # OSF1 and SCO ODT 3.0 have their own names for install.
34
 
      # Don't use installbsd from OSF since it installs stuff as root
35
 
      # by default.
36
 
      for ac_prog in ginstall scoinst install; do
37
 
        if test -f $ac_dir/$ac_prog; then
38
 
          if test $ac_prog = install &&
39
 
            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
40
 
            # AIX install.  It has an incompatible calling convention.
41
 
            :
42
 
          else
43
 
            cl_cv_path_install="$ac_dir/$ac_prog -c"
44
 
            break 2
45
 
          fi
46
 
        fi
47
 
      done
48
 
      ;;
49
 
    esac
50
 
  done
51
 
  IFS="$ac_save_ifs"
52
 
  # As a last resort, use the absolute pathname of cp.
53
 
  if test -z "$cl_cv_path_install"; then
54
 
    cl_cv_path_install="cp"
55
 
    IFS="${IFS=         }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
56
 
    for ac_dir in $PATH; do
57
 
      if test -f $ac_dir/cp; then
58
 
        cl_cv_path_install="$ac_dir/cp"
59
 
        break
60
 
      fi
61
 
    done
62
 
    IFS="$ac_save_ifs"
63
 
  fi
64
 
])dnl
65
 
  INSTALL="$cl_cv_path_install"
66
 
fi
67
 
dnl We do special magic for INSTALL instead of AC_SUBST, to get
68
 
dnl relative paths right.
69
 
AC_MSG_RESULT($INSTALL)
70
 
AC_SUBST(INSTALL)dnl
71
 
# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
72
 
# It thinks the first close brace ends the variable substitution.
73
 
test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='$(INSTALL)'
74
 
AC_SUBST(INSTALL_PROGRAM)dnl
75
 
if test -z "$INSTALL_DATA"; then
76
 
  case "$INSTALL" in
77
 
    cp | */cp ) INSTALL_DATA='$(INSTALL)' ;;
78
 
    * )         INSTALL_DATA='$(INSTALL) -m 644' ;;
79
 
  esac
80
 
fi
81
 
AC_SUBST(INSTALL_DATA)dnl
82
 
])