Artifact 2978ee9c825b39f07c6e89339eeef47868f4f724:


0000: 64 6e 6c 20 43 6f 70 79 72 69 67 68 74 20 28 43  dnl Copyright (C
0010: 29 20 31 39 39 33 2d 32 30 30 34 20 46 72 65 65  ) 1993-2004 Free
0020: 20 53 6f 66 74 77 61 72 65 20 46 6f 75 6e 64 61   Software Founda
0030: 74 69 6f 6e 2c 20 49 6e 63 2e 0a 64 6e 6c 20 54  tion, Inc..dnl T
0040: 68 69 73 20 66 69 6c 65 20 69 73 20 66 72 65 65  his file is free
0050: 20 73 6f 66 74 77 61 72 65 2c 20 64 69 73 74 72   software, distr
0060: 69 62 75 74 65 64 20 75 6e 64 65 72 20 74 68 65  ibuted under the
0070: 20 74 65 72 6d 73 20 6f 66 20 74 68 65 20 47 4e   terms of the GN
0080: 55 0a 64 6e 6c 20 47 65 6e 65 72 61 6c 20 50 75  U.dnl General Pu
0090: 62 6c 69 63 20 4c 69 63 65 6e 73 65 2e 20 20 41  blic License.  A
00a0: 73 20 61 20 73 70 65 63 69 61 6c 20 65 78 63 65  s a special exce
00b0: 70 74 69 6f 6e 20 74 6f 20 74 68 65 20 47 4e 55  ption to the GNU
00c0: 20 47 65 6e 65 72 61 6c 0a 64 6e 6c 20 50 75 62   General.dnl Pub
00d0: 6c 69 63 20 4c 69 63 65 6e 73 65 2c 20 74 68 69  lic License, thi
00e0: 73 20 66 69 6c 65 20 6d 61 79 20 62 65 20 64 69  s file may be di
00f0: 73 74 72 69 62 75 74 65 64 20 61 73 20 70 61 72  stributed as par
0100: 74 20 6f 66 20 61 20 70 72 6f 67 72 61 6d 0a 64  t of a program.d
0110: 6e 6c 20 74 68 61 74 20 63 6f 6e 74 61 69 6e 73  nl that contains
0120: 20 61 20 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e   a configuration
0130: 20 73 63 72 69 70 74 20 67 65 6e 65 72 61 74 65   script generate
0140: 64 20 62 79 20 41 75 74 6f 63 6f 6e 66 2c 20 75  d by Autoconf, u
0150: 6e 64 65 72 0a 64 6e 6c 20 74 68 65 20 73 61 6d  nder.dnl the sam
0160: 65 20 64 69 73 74 72 69 62 75 74 69 6f 6e 20 74  e distribution t
0170: 65 72 6d 73 20 61 73 20 74 68 65 20 72 65 73 74  erms as the rest
0180: 20 6f 66 20 74 68 61 74 20 70 72 6f 67 72 61 6d   of that program
0190: 2e 0a 0a 64 6e 6c 20 46 72 6f 6d 20 42 72 75 6e  ...dnl From Brun
01a0: 6f 20 48 61 69 62 6c 65 2c 20 4d 61 72 63 75 73  o Haible, Marcus
01b0: 20 44 61 6e 69 65 6c 73 2e 0a 0a 41 43 5f 50 52   Daniels...AC_PR
01c0: 45 52 45 51 28 32 2e 31 33 29 0a 0a 41 43 5f 44  EREQ(2.13)..AC_D
01d0: 45 46 55 4e 28 5b 43 4c 5f 50 52 4f 47 5f 49 4e  EFUN([CL_PROG_IN
01e0: 53 54 41 4c 4c 5d 2c 0a 5b 64 6e 6c 20 54 68 69  STALL],.[dnl Thi
01f0: 73 20 69 73 20 6d 6f 73 74 6c 79 20 63 6f 70 69  s is mostly copi
0200: 65 64 20 66 72 6f 6d 20 41 43 5f 50 52 4f 47 5f  ed from AC_PROG_
0210: 49 4e 53 54 41 4c 4c 2e 0a 23 20 46 69 6e 64 20  INSTALL..# Find 
0220: 61 20 67 6f 6f 64 20 69 6e 73 74 61 6c 6c 20 70  a good install p
0230: 72 6f 67 72 61 6d 2e 20 20 57 65 20 70 72 65 66  rogram.  We pref
0240: 65 72 20 61 20 43 20 70 72 6f 67 72 61 6d 20 28  er a C program (
0250: 66 61 73 74 65 72 29 2c 0a 23 20 73 6f 20 6f 6e  faster),.# so on
0260: 65 20 73 63 72 69 70 74 20 69 73 20 61 73 20 67  e script is as g
0270: 6f 6f 64 20 61 73 20 61 6e 6f 74 68 65 72 2e 20  ood as another. 
0280: 20 42 75 74 20 61 76 6f 69 64 20 74 68 65 20 62   But avoid the b
0290: 72 6f 6b 65 6e 20 6f 72 0a 23 20 69 6e 63 6f 6d  roken or.# incom
02a0: 70 61 74 69 62 6c 65 20 76 65 72 73 69 6f 6e 73  patible versions
02b0: 3a 0a 23 20 53 79 73 56 20 2f 65 74 63 2f 69 6e  :.# SysV /etc/in
02c0: 73 74 61 6c 6c 2c 20 2f 75 73 72 2f 73 62 69 6e  stall, /usr/sbin
02d0: 2f 69 6e 73 74 61 6c 6c 0a 23 20 53 75 6e 4f 53  /install.# SunOS
02e0: 20 2f 75 73 72 2f 65 74 63 2f 69 6e 73 74 61 6c   /usr/etc/instal
02f0: 6c 0a 23 20 49 52 49 58 20 2f 73 62 69 6e 2f 69  l.# IRIX /sbin/i
0300: 6e 73 74 61 6c 6c 0a 23 20 41 49 58 20 2f 62 69  nstall.# AIX /bi
0310: 6e 2f 69 6e 73 74 61 6c 6c 0a 23 20 41 46 53 20  n/install.# AFS 
0320: 2f 75 73 72 2f 61 66 73 77 73 2f 62 69 6e 2f 69  /usr/afsws/bin/i
0330: 6e 73 74 61 6c 6c 2c 20 77 68 69 63 68 20 6d 69  nstall, which mi
0340: 73 2d 68 61 6e 64 6c 65 73 20 6e 6f 6e 65 78 69  s-handles nonexi
0350: 73 74 65 6e 74 20 61 72 67 73 0a 23 20 53 56 52  stent args.# SVR
0360: 34 20 2f 75 73 72 2f 75 63 62 2f 69 6e 73 74 61  4 /usr/ucb/insta
0370: 6c 6c 2c 20 77 68 69 63 68 20 74 72 69 65 73 20  ll, which tries 
0380: 74 6f 20 75 73 65 20 74 68 65 20 6e 6f 6e 65 78  to use the nonex
0390: 69 73 74 65 6e 74 20 67 72 6f 75 70 20 22 73 74  istent group "st
03a0: 61 66 66 22 0a 23 20 2e 2f 69 6e 73 74 61 6c 6c  aff".# ./install
03b0: 2c 20 77 68 69 63 68 20 63 61 6e 20 62 65 20 65  , which can be e
03c0: 72 72 6f 6e 65 6f 75 73 6c 79 20 63 72 65 61 74  rroneously creat
03d0: 65 64 20 62 79 20 6d 61 6b 65 20 66 72 6f 6d 20  ed by make from 
03e0: 2e 2f 69 6e 73 74 61 6c 6c 2e 73 68 2e 0a 41 43  ./install.sh..AC
03f0: 5f 4d 53 47 5f 43 48 45 43 4b 49 4e 47 28 66 6f  _MSG_CHECKING(fo
0400: 72 20 61 20 42 53 44 20 63 6f 6d 70 61 74 69 62  r a BSD compatib
0410: 6c 65 20 69 6e 73 74 61 6c 6c 29 0a 69 66 20 74  le install).if t
0420: 65 73 74 20 2d 7a 20 22 24 49 4e 53 54 41 4c 4c  est -z "$INSTALL
0430: 22 3b 20 74 68 65 6e 0a 41 43 5f 43 41 43 48 45  "; then.AC_CACHE
0440: 5f 56 41 4c 28 63 6c 5f 63 76 5f 70 61 74 68 5f  _VAL(cl_cv_path_
0450: 69 6e 73 74 61 6c 6c 2c 0a 5b 20 20 49 46 53 3d  install,.[  IFS=
0460: 22 24 7b 49 46 53 3d 20 09 7d 22 3b 20 61 63 5f  "${IFS= .}"; ac_
0470: 73 61 76 65 5f 69 66 73 3d 22 24 49 46 53 22 3b  save_ifs="$IFS";
0480: 20 49 46 53 3d 22 24 7b 49 46 53 7d 3a 22 0a 20   IFS="${IFS}:". 
0490: 20 66 6f 72 20 61 63 5f 64 69 72 20 69 6e 20 24   for ac_dir in $
04a0: 50 41 54 48 3b 20 64 6f 0a 20 20 20 20 23 20 41  PATH; do.    # A
04b0: 63 63 6f 75 6e 74 20 66 6f 72 20 70 65 6f 70 6c  ccount for peopl
04c0: 65 20 77 68 6f 20 70 75 74 20 74 72 61 69 6c 69  e who put traili
04d0: 6e 67 20 73 6c 61 73 68 65 73 20 69 6e 20 50 41  ng slashes in PA
04e0: 54 48 20 65 6c 65 6d 65 6e 74 73 2e 0a 20 20 20  TH elements..   
04f0: 20 63 61 73 65 20 22 24 61 63 5f 64 69 72 2f 22   case "$ac_dir/"
0500: 20 69 6e 0a 20 20 20 20 2f 7c 2e 2f 7c 2e 2f 2f   in.    /|./|.//
0510: 7c 2f 65 74 63 2f 2a 7c 2f 75 73 72 2f 73 62 69  |/etc/*|/usr/sbi
0520: 6e 2f 2a 7c 2f 75 73 72 2f 65 74 63 2f 2a 7c 2f  n/*|/usr/etc/*|/
0530: 73 62 69 6e 2f 2a 7c 2f 75 73 72 2f 61 66 73 77  sbin/*|/usr/afsw
0540: 73 2f 62 69 6e 2f 2a 7c 2f 75 73 72 2f 75 63 62  s/bin/*|/usr/ucb
0550: 2f 2a 29 20 3b 3b 0a 20 20 20 20 2a 29 0a 20 20  /*) ;;.    *).  
0560: 20 20 20 20 23 20 4f 53 46 31 20 61 6e 64 20 53      # OSF1 and S
0570: 43 4f 20 4f 44 54 20 33 2e 30 20 68 61 76 65 20  CO ODT 3.0 have 
0580: 74 68 65 69 72 20 6f 77 6e 20 6e 61 6d 65 73 20  their own names 
0590: 66 6f 72 20 69 6e 73 74 61 6c 6c 2e 0a 20 20 20  for install..   
05a0: 20 20 20 23 20 44 6f 6e 27 74 20 75 73 65 20 69     # Don't use i
05b0: 6e 73 74 61 6c 6c 62 73 64 20 66 72 6f 6d 20 4f  nstallbsd from O
05c0: 53 46 20 73 69 6e 63 65 20 69 74 20 69 6e 73 74  SF since it inst
05d0: 61 6c 6c 73 20 73 74 75 66 66 20 61 73 20 72 6f  alls stuff as ro
05e0: 6f 74 0a 20 20 20 20 20 20 23 20 62 79 20 64 65  ot.      # by de
05f0: 66 61 75 6c 74 2e 0a 20 20 20 20 20 20 66 6f 72  fault..      for
0600: 20 61 63 5f 70 72 6f 67 20 69 6e 20 67 69 6e 73   ac_prog in gins
0610: 74 61 6c 6c 20 73 63 6f 69 6e 73 74 20 69 6e 73  tall scoinst ins
0620: 74 61 6c 6c 3b 20 64 6f 0a 20 20 20 20 20 20 20  tall; do.       
0630: 20 69 66 20 74 65 73 74 20 2d 66 20 24 61 63 5f   if test -f $ac_
0640: 64 69 72 2f 24 61 63 5f 70 72 6f 67 3b 20 74 68  dir/$ac_prog; th
0650: 65 6e 0a 09 20 20 69 66 20 74 65 73 74 20 24 61  en..  if test $a
0660: 63 5f 70 72 6f 67 20 3d 20 69 6e 73 74 61 6c 6c  c_prog = install
0670: 20 26 26 0a 20 20 20 20 20 20 20 20 20 20 20 20   &&.            
0680: 67 72 65 70 20 64 73 70 6d 73 67 20 24 61 63 5f  grep dspmsg $ac_
0690: 64 69 72 2f 24 61 63 5f 70 72 6f 67 20 3e 2f 64  dir/$ac_prog >/d
06a0: 65 76 2f 6e 75 6c 6c 20 32 3e 26 31 3b 20 74 68  ev/null 2>&1; th
06b0: 65 6e 0a 09 20 20 20 20 23 20 41 49 58 20 69 6e  en..    # AIX in
06c0: 73 74 61 6c 6c 2e 20 20 49 74 20 68 61 73 20 61  stall.  It has a
06d0: 6e 20 69 6e 63 6f 6d 70 61 74 69 62 6c 65 20 63  n incompatible c
06e0: 61 6c 6c 69 6e 67 20 63 6f 6e 76 65 6e 74 69 6f  alling conventio
06f0: 6e 2e 0a 09 20 20 20 20 3a 0a 09 20 20 65 6c 73  n...    :..  els
0700: 65 0a 09 20 20 20 20 63 6c 5f 63 76 5f 70 61 74  e..    cl_cv_pat
0710: 68 5f 69 6e 73 74 61 6c 6c 3d 22 24 61 63 5f 64  h_install="$ac_d
0720: 69 72 2f 24 61 63 5f 70 72 6f 67 20 2d 63 22 0a  ir/$ac_prog -c".
0730: 09 20 20 20 20 62 72 65 61 6b 20 32 0a 09 20 20  .    break 2..  
0740: 66 69 0a 09 66 69 0a 20 20 20 20 20 20 64 6f 6e  fi..fi.      don
0750: 65 0a 20 20 20 20 20 20 3b 3b 0a 20 20 20 20 65  e.      ;;.    e
0760: 73 61 63 0a 20 20 64 6f 6e 65 0a 20 20 49 46 53  sac.  done.  IFS
0770: 3d 22 24 61 63 5f 73 61 76 65 5f 69 66 73 22 0a  ="$ac_save_ifs".
0780: 20 20 23 20 41 73 20 61 20 6c 61 73 74 20 72 65    # As a last re
0790: 73 6f 72 74 2c 20 75 73 65 20 74 68 65 20 61 62  sort, use the ab
07a0: 73 6f 6c 75 74 65 20 70 61 74 68 6e 61 6d 65 20  solute pathname 
07b0: 6f 66 20 63 70 2e 0a 20 20 69 66 20 74 65 73 74  of cp..  if test
07c0: 20 2d 7a 20 22 24 63 6c 5f 63 76 5f 70 61 74 68   -z "$cl_cv_path
07d0: 5f 69 6e 73 74 61 6c 6c 22 3b 20 74 68 65 6e 0a  _install"; then.
07e0: 20 20 20 20 63 6c 5f 63 76 5f 70 61 74 68 5f 69      cl_cv_path_i
07f0: 6e 73 74 61 6c 6c 3d 22 63 70 22 0a 20 20 20 20  nstall="cp".    
0800: 49 46 53 3d 22 24 7b 49 46 53 3d 20 09 7d 22 3b  IFS="${IFS= .}";
0810: 20 61 63 5f 73 61 76 65 5f 69 66 73 3d 22 24 49   ac_save_ifs="$I
0820: 46 53 22 3b 20 49 46 53 3d 22 24 7b 49 46 53 7d  FS"; IFS="${IFS}
0830: 3a 22 0a 20 20 20 20 66 6f 72 20 61 63 5f 64 69  :".    for ac_di
0840: 72 20 69 6e 20 24 50 41 54 48 3b 20 64 6f 0a 20  r in $PATH; do. 
0850: 20 20 20 20 20 69 66 20 74 65 73 74 20 2d 66 20       if test -f 
0860: 24 61 63 5f 64 69 72 2f 63 70 3b 20 74 68 65 6e  $ac_dir/cp; then
0870: 0a 20 20 20 20 20 20 20 20 63 6c 5f 63 76 5f 70  .        cl_cv_p
0880: 61 74 68 5f 69 6e 73 74 61 6c 6c 3d 22 24 61 63  ath_install="$ac
0890: 5f 64 69 72 2f 63 70 22 0a 20 20 20 20 20 20 20  _dir/cp".       
08a0: 20 62 72 65 61 6b 0a 20 20 20 20 20 20 66 69 0a   break.      fi.
08b0: 20 20 20 20 64 6f 6e 65 0a 20 20 20 20 49 46 53      done.    IFS
08c0: 3d 22 24 61 63 5f 73 61 76 65 5f 69 66 73 22 0a  ="$ac_save_ifs".
08d0: 20 20 66 69 0a 5d 29 64 6e 6c 0a 20 20 49 4e 53    fi.])dnl.  INS
08e0: 54 41 4c 4c 3d 22 24 63 6c 5f 63 76 5f 70 61 74  TALL="$cl_cv_pat
08f0: 68 5f 69 6e 73 74 61 6c 6c 22 0a 66 69 0a 64 6e  h_install".fi.dn
0900: 6c 20 57 65 20 64 6f 20 73 70 65 63 69 61 6c 20  l We do special 
0910: 6d 61 67 69 63 20 66 6f 72 20 49 4e 53 54 41 4c  magic for INSTAL
0920: 4c 20 69 6e 73 74 65 61 64 20 6f 66 20 41 43 5f  L instead of AC_
0930: 53 55 42 53 54 2c 20 74 6f 20 67 65 74 0a 64 6e  SUBST, to get.dn
0940: 6c 20 72 65 6c 61 74 69 76 65 20 70 61 74 68 73  l relative paths
0950: 20 72 69 67 68 74 2e 0a 41 43 5f 4d 53 47 5f 52   right..AC_MSG_R
0960: 45 53 55 4c 54 28 24 49 4e 53 54 41 4c 4c 29 0a  ESULT($INSTALL).
0970: 41 43 5f 53 55 42 53 54 28 49 4e 53 54 41 4c 4c  AC_SUBST(INSTALL
0980: 29 64 6e 6c 0a 23 20 55 73 65 20 74 65 73 74 20  )dnl.# Use test 
0990: 2d 7a 20 62 65 63 61 75 73 65 20 53 75 6e 4f 53  -z because SunOS
09a0: 34 20 73 68 20 6d 69 73 68 61 6e 64 6c 65 73 20  4 sh mishandles 
09b0: 62 72 61 63 65 73 20 69 6e 20 24 7b 76 61 72 2d  braces in ${var-
09c0: 76 61 6c 7d 2e 0a 23 20 49 74 20 74 68 69 6e 6b  val}..# It think
09d0: 73 20 74 68 65 20 66 69 72 73 74 20 63 6c 6f 73  s the first clos
09e0: 65 20 62 72 61 63 65 20 65 6e 64 73 20 74 68 65  e brace ends the
09f0: 20 76 61 72 69 61 62 6c 65 20 73 75 62 73 74 69   variable substi
0a00: 74 75 74 69 6f 6e 2e 0a 74 65 73 74 20 2d 7a 20  tution..test -z 
0a10: 22 24 49 4e 53 54 41 4c 4c 5f 50 52 4f 47 52 41  "$INSTALL_PROGRA
0a20: 4d 22 20 26 26 20 49 4e 53 54 41 4c 4c 5f 50 52  M" && INSTALL_PR
0a30: 4f 47 52 41 4d 3d 27 24 28 49 4e 53 54 41 4c 4c  OGRAM='$(INSTALL
0a40: 29 27 0a 41 43 5f 53 55 42 53 54 28 49 4e 53 54  )'.AC_SUBST(INST
0a50: 41 4c 4c 5f 50 52 4f 47 52 41 4d 29 64 6e 6c 0a  ALL_PROGRAM)dnl.
0a60: 69 66 20 74 65 73 74 20 2d 7a 20 22 24 49 4e 53  if test -z "$INS
0a70: 54 41 4c 4c 5f 44 41 54 41 22 3b 20 74 68 65 6e  TALL_DATA"; then
0a80: 0a 20 20 63 61 73 65 20 22 24 49 4e 53 54 41 4c  .  case "$INSTAL
0a90: 4c 22 20 69 6e 0a 20 20 20 20 63 70 20 7c 20 2a  L" in.    cp | *
0aa0: 2f 63 70 20 29 20 49 4e 53 54 41 4c 4c 5f 44 41  /cp ) INSTALL_DA
0ab0: 54 41 3d 27 24 28 49 4e 53 54 41 4c 4c 29 27 20  TA='$(INSTALL)' 
0ac0: 3b 3b 0a 20 20 20 20 2a 20 29 20 20 20 20 20 20  ;;.    * )      
0ad0: 20 20 20 49 4e 53 54 41 4c 4c 5f 44 41 54 41 3d     INSTALL_DATA=
0ae0: 27 24 28 49 4e 53 54 41 4c 4c 29 20 2d 6d 20 36  '$(INSTALL) -m 6
0af0: 34 34 27 20 3b 3b 0a 20 20 65 73 61 63 0a 66 69  44' ;;.  esac.fi
0b00: 0a 41 43 5f 53 55 42 53 54 28 49 4e 53 54 41 4c  .AC_SUBST(INSTAL
0b10: 4c 5f 44 41 54 41 29 64 6e 6c 0a 5d 29 0a        L_DATA)dnl.]).