Artifact dbea3e099c21d5f06d9cd3c16ecc5f3975da8893:


0000: 64 6e 6c 20 2d 2a 2d 20 41 75 74 6f 63 6f 6e 66  dnl -*- Autoconf
0010: 20 2d 2a 2d 0a 64 6e 6c 20 43 6f 70 79 72 69 67   -*-.dnl Copyrig
0020: 68 74 20 28 43 29 20 31 39 39 33 2d 32 30 30 32  ht (C) 1993-2002
0030: 20 46 72 65 65 20 53 6f 66 74 77 61 72 65 20 46   Free Software F
0040: 6f 75 6e 64 61 74 69 6f 6e 2c 20 49 6e 63 2e 0a  oundation, Inc..
0050: 64 6e 6c 20 54 68 69 73 20 66 69 6c 65 20 69 73  dnl This file is
0060: 20 66 72 65 65 20 73 6f 66 74 77 61 72 65 2c 20   free software, 
0070: 64 69 73 74 72 69 62 75 74 65 64 20 75 6e 64 65  distributed unde
0080: 72 20 74 68 65 20 74 65 72 6d 73 20 6f 66 20 74  r the terms of t
0090: 68 65 20 47 4e 55 0a 64 6e 6c 20 47 65 6e 65 72  he GNU.dnl Gener
00a0: 61 6c 20 50 75 62 6c 69 63 20 4c 69 63 65 6e 73  al Public Licens
00b0: 65 2e 20 20 41 73 20 61 20 73 70 65 63 69 61 6c  e.  As a special
00c0: 20 65 78 63 65 70 74 69 6f 6e 20 74 6f 20 74 68   exception to th
00d0: 65 20 47 4e 55 20 47 65 6e 65 72 61 6c 0a 64 6e  e GNU General.dn
00e0: 6c 20 50 75 62 6c 69 63 20 4c 69 63 65 6e 73 65  l Public License
00f0: 2c 20 74 68 69 73 20 66 69 6c 65 20 6d 61 79 20  , this file may 
0100: 62 65 20 64 69 73 74 72 69 62 75 74 65 64 20 61  be distributed a
0110: 73 20 70 61 72 74 20 6f 66 20 61 20 70 72 6f 67  s part of a prog
0120: 72 61 6d 0a 64 6e 6c 20 74 68 61 74 20 63 6f 6e  ram.dnl that con
0130: 74 61 69 6e 73 20 61 20 63 6f 6e 66 69 67 75 72  tains a configur
0140: 61 74 69 6f 6e 20 73 63 72 69 70 74 20 67 65 6e  ation script gen
0150: 65 72 61 74 65 64 20 62 79 20 41 75 74 6f 63 6f  erated by Autoco
0160: 6e 66 2c 20 75 6e 64 65 72 0a 64 6e 6c 20 74 68  nf, under.dnl th
0170: 65 20 73 61 6d 65 20 64 69 73 74 72 69 62 75 74  e same distribut
0180: 69 6f 6e 20 74 65 72 6d 73 20 61 73 20 74 68 65  ion terms as the
0190: 20 72 65 73 74 20 6f 66 20 74 68 61 74 20 70 72   rest of that pr
01a0: 6f 67 72 61 6d 2e 0a 0a 64 6e 6c 20 46 72 6f 6d  ogram...dnl From
01b0: 20 42 72 75 6e 6f 20 48 61 69 62 6c 65 2c 20 4d   Bruno Haible, M
01c0: 61 72 63 75 73 20 44 61 6e 69 65 6c 73 2c 20 53  arcus Daniels, S
01d0: 61 6d 20 53 74 65 69 6e 67 6f 6c 64 2e 0a 0a 41  am Steingold...A
01e0: 43 5f 50 52 45 52 45 51 28 32 2e 31 33 29 0a 0a  C_PREREQ(2.13)..
01f0: 41 43 5f 44 45 46 55 4e 28 5b 43 4c 5f 50 52 4f  AC_DEFUN([CL_PRO
0200: 47 5f 4c 4e 5d 2c 0a 5b 41 43 5f 52 45 51 55 49  G_LN],.[AC_REQUI
0210: 52 45 28 5b 43 4c 5f 50 52 4f 47 5f 43 50 5d 29  RE([CL_PROG_CP])
0220: 64 6e 6c 0a 41 43 5f 43 41 43 48 45 5f 43 48 45  dnl.AC_CACHE_CHE
0230: 43 4b 28 68 6f 77 20 74 6f 20 6d 61 6b 65 20 68  CK(how to make h
0240: 61 72 64 20 6c 69 6e 6b 73 2c 20 63 6c 5f 63 76  ard links, cl_cv
0250: 5f 70 72 6f 67 5f 4c 4e 2c 20 5b 0a 72 6d 20 2d  _prog_LN, [.rm -
0260: 66 20 63 6f 6e 66 74 65 73 74 64 61 74 61 20 63  f conftestdata c
0270: 6f 6e 66 74 65 73 74 66 69 6c 65 0a 65 63 68 6f  onftestfile.echo
0280: 20 64 61 74 61 20 3e 20 63 6f 6e 66 74 65 73 74   data > conftest
0290: 66 69 6c 65 0a 69 66 20 6c 6e 20 63 6f 6e 66 74  file.if ln conft
02a0: 65 73 74 66 69 6c 65 20 63 6f 6e 66 74 65 73 74  estfile conftest
02b0: 64 61 74 61 20 32 3e 2f 64 65 76 2f 6e 75 6c 6c  data 2>/dev/null
02c0: 3b 20 74 68 65 6e 0a 20 20 63 6c 5f 63 76 5f 70  ; then.  cl_cv_p
02d0: 72 6f 67 5f 4c 4e 3d 6c 6e 0a 65 6c 73 65 0a 20  rog_LN=ln.else. 
02e0: 20 63 6c 5f 63 76 5f 70 72 6f 67 5f 4c 4e 3d 22   cl_cv_prog_LN="
02f0: 24 63 6c 5f 63 76 5f 70 72 6f 67 5f 63 70 22 0a  $cl_cv_prog_cp".
0300: 66 69 0a 72 6d 20 2d 66 20 63 6f 6e 66 74 65 73  fi.rm -f conftes
0310: 74 64 61 74 61 20 63 6f 6e 66 74 65 73 74 66 69  tdata conftestfi
0320: 6c 65 0a 5d 29 0a 4c 4e 3d 22 24 63 6c 5f 63 76  le.]).LN="$cl_cv
0330: 5f 70 72 6f 67 5f 4c 4e 22 0a 41 43 5f 53 55 42  _prog_LN".AC_SUB
0340: 53 54 28 4c 4e 29 64 6e 6c 0a 5d 29 0a 0a 41 43  ST(LN)dnl.])..AC
0350: 5f 44 45 46 55 4e 28 5b 43 4c 5f 50 52 4f 47 5f  _DEFUN([CL_PROG_
0360: 4c 4e 5f 53 5d 2c 0a 5b 41 43 5f 52 45 51 55 49  LN_S],.[AC_REQUI
0370: 52 45 28 5b 43 4c 5f 50 52 4f 47 5f 4c 4e 5d 29  RE([CL_PROG_LN])
0380: 64 6e 6c 0a 64 6e 6c 20 4d 61 6b 65 20 61 20 73  dnl.dnl Make a s
0390: 79 6d 6c 69 6e 6b 20 69 66 20 70 6f 73 73 69 62  ymlink if possib
03a0: 6c 65 3b 20 6f 74 68 65 72 77 69 73 65 20 74 72  le; otherwise tr
03b0: 79 20 61 20 68 61 72 64 20 6c 69 6e 6b 2e 20 4f  y a hard link. O
03c0: 6e 20 66 69 6c 65 73 79 73 74 65 6d 73 0a 64 6e  n filesystems.dn
03d0: 6c 20 77 68 69 63 68 20 73 75 70 70 6f 72 74 20  l which support 
03e0: 6e 65 69 74 68 65 72 20 73 79 6d 6c 69 6e 6b 20  neither symlink 
03f0: 6e 6f 72 20 68 61 72 64 20 6c 69 6e 6b 2c 20 75  nor hard link, u
0400: 73 65 20 61 20 70 6c 61 69 6e 20 63 6f 70 79 2e  se a plain copy.
0410: 0a 41 43 5f 4d 53 47 5f 43 48 45 43 4b 49 4e 47  .AC_MSG_CHECKING
0420: 28 77 68 65 74 68 65 72 20 6c 6e 20 2d 73 20 77  (whether ln -s w
0430: 6f 72 6b 73 29 0a 41 43 5f 43 41 43 48 45 5f 56  orks).AC_CACHE_V
0440: 41 4c 28 63 6c 5f 63 76 5f 70 72 6f 67 5f 4c 4e  AL(cl_cv_prog_LN
0450: 5f 53 2c 20 5b 0a 72 6d 20 2d 66 20 63 6f 6e 66  _S, [.rm -f conf
0460: 74 65 73 74 64 61 74 61 0a 69 66 20 6c 6e 20 2d  testdata.if ln -
0470: 73 20 58 20 63 6f 6e 66 74 65 73 74 64 61 74 61  s X conftestdata
0480: 20 32 3e 2f 64 65 76 2f 6e 75 6c 6c 3b 20 74 68   2>/dev/null; th
0490: 65 6e 0a 20 20 63 6c 5f 63 76 5f 70 72 6f 67 5f  en.  cl_cv_prog_
04a0: 4c 4e 5f 53 3d 22 6c 6e 20 2d 73 22 0a 65 6c 73  LN_S="ln -s".els
04b0: 65 0a 20 20 63 6c 5f 63 76 5f 70 72 6f 67 5f 4c  e.  cl_cv_prog_L
04c0: 4e 5f 53 3d 22 24 63 6c 5f 63 76 5f 70 72 6f 67  N_S="$cl_cv_prog
04d0: 5f 4c 4e 22 0a 66 69 0a 72 6d 20 2d 66 20 63 6f  _LN".fi.rm -f co
04e0: 6e 66 74 65 73 74 64 61 74 61 0a 5d 29 64 6e 6c  nftestdata.])dnl
04f0: 0a 69 66 20 74 65 73 74 20 22 24 63 6c 5f 63 76  .if test "$cl_cv
0500: 5f 70 72 6f 67 5f 4c 4e 5f 53 22 20 3d 20 22 6c  _prog_LN_S" = "l
0510: 6e 20 2d 73 22 3b 20 74 68 65 6e 0a 20 20 41 43  n -s"; then.  AC
0520: 5f 4d 53 47 5f 52 45 53 55 4c 54 28 79 65 73 29  _MSG_RESULT(yes)
0530: 0a 65 6c 73 65 0a 20 20 41 43 5f 4d 53 47 5f 52  .else.  AC_MSG_R
0540: 45 53 55 4c 54 28 6e 6f 29 0a 66 69 0a 4c 4e 5f  ESULT(no).fi.LN_
0550: 53 3d 22 24 63 6c 5f 63 76 5f 70 72 6f 67 5f 4c  S="$cl_cv_prog_L
0560: 4e 5f 53 22 0a 41 43 5f 53 55 42 53 54 28 4c 4e  N_S".AC_SUBST(LN
0570: 5f 53 29 64 6e 6c 0a 5d 29 0a 0a 41 43 5f 44 45  _S)dnl.])..AC_DE
0580: 46 55 4e 28 5b 43 4c 5f 50 52 4f 47 5f 48 4c 4e  FUN([CL_PROG_HLN
0590: 5d 2c 0a 5b 41 43 5f 52 45 51 55 49 52 45 28 5b  ],.[AC_REQUIRE([
05a0: 43 4c 5f 50 52 4f 47 5f 4c 4e 5f 53 5d 29 64 6e  CL_PROG_LN_S])dn
05b0: 6c 0a 64 6e 6c 20 61 63 63 6f 72 64 69 6e 67 20  l.dnl according 
05c0: 74 6f 20 74 68 65 20 4c 69 6e 75 78 20 6c 6e 28  to the Linux ln(
05d0: 31 29 3a 0a 64 6e 6c 20 20 20 22 6d 61 6b 69 6e  1):.dnl   "makin
05e0: 67 20 61 20 68 61 72 64 20 6c 69 6e 6b 20 74 6f  g a hard link to
05f0: 20 61 20 73 79 6d 62 6f 6c 69 63 20 6c 69 6e 6b   a symbolic link
0600: 20 69 73 20 6e 6f 74 20 70 6f 72 74 61 62 6c 65   is not portable
0610: 22 3a 0a 64 6e 6c 20 53 56 52 34 20 28 53 6f 6c  ":.dnl SVR4 (Sol
0620: 61 72 69 73 2c 20 4c 69 6e 75 78 29 20 63 72 65  aris, Linux) cre
0630: 61 74 65 20 73 79 6d 62 6f 6c 69 63 20 6c 69 6e  ate symbolic lin
0640: 6b 73 0a 64 6e 6c 20 20 20 28 62 72 65 61 6b 73  ks.dnl   (breaks
0650: 20 77 68 65 6e 20 74 68 65 20 74 61 72 67 65 74   when the target
0660: 20 69 73 20 72 65 6c 61 74 69 76 65 29 0a 64 6e   is relative).dn
0670: 6c 20 43 79 67 77 69 6e 20 28 31 2e 33 2e 31 32  l Cygwin (1.3.12
0680: 29 20 69 73 20 65 76 65 6e 20 77 6f 72 73 65 3a  ) is even worse:
0690: 20 69 74 20 6d 61 6b 65 73 20 68 61 72 64 20 6c   it makes hard l
06a0: 69 6e 6b 73 20 74 6f 20 74 68 65 20 73 79 6d 62  inks to the symb
06b0: 6f 6c 69 63 20 6c 69 6e 6b 2c 0a 64 6e 6c 20 20  olic link,.dnl  
06c0: 20 69 6e 73 74 65 61 64 20 6f 66 20 72 65 73 6f   instead of reso
06d0: 6c 76 69 6e 67 20 74 68 65 20 73 79 6d 62 6f 6c  lving the symbol
06e0: 69 63 20 6c 69 6e 6b 2e 0a 64 6e 6c 20 47 6f 6f  ic link..dnl Goo
06f0: 64 20 62 65 68 61 76 69 6f 72 20 6d 65 61 6e 73  d behavior means
0700: 20 63 72 65 61 74 69 6e 67 20 61 20 68 61 72 64   creating a hard
0710: 20 6c 69 6e 6b 20 74 6f 20 74 68 65 20 73 79 6d   link to the sym
0720: 62 6f 6c 69 63 20 6c 69 6e 6b 27 73 20 74 61 72  bolic link's tar
0730: 67 65 74 2e 0a 64 6e 6c 20 54 6f 20 61 76 6f 69  get..dnl To avoi
0740: 64 20 74 68 69 73 2c 20 75 73 65 20 74 68 65 20  d this, use the 
0750: 22 68 6c 6e 22 20 70 72 6f 67 72 61 6d 2e 0a 41  "hln" program..A
0760: 43 5f 43 41 43 48 45 5f 43 48 45 43 4b 28 68 6f  C_CACHE_CHECK(ho
0770: 77 20 74 6f 20 6d 61 6b 65 20 68 61 72 64 20 6c  w to make hard l
0780: 69 6e 6b 73 20 74 6f 20 73 79 6d 6c 69 6e 6b 73  inks to symlinks
0790: 2c 20 63 6c 5f 63 76 5f 70 72 6f 67 5f 68 6c 6e  , cl_cv_prog_hln
07a0: 2c 20 5b 0a 63 6c 5f 63 76 5f 70 72 6f 67 5f 68  , [.cl_cv_prog_h
07b0: 6c 6e 3d 22 6c 6e 22 0a 69 66 20 74 65 73 74 20  ln="ln".if test 
07c0: 22 24 63 6c 5f 63 76 5f 70 72 6f 67 5f 4c 4e 5f  "$cl_cv_prog_LN_
07d0: 53 22 20 3d 20 22 6c 6e 20 2d 73 22 3b 20 74 68  S" = "ln -s"; th
07e0: 65 6e 0a 65 63 68 6f 20 22 62 6c 61 62 6c 61 22  en.echo "blabla"
07f0: 20 3e 20 63 6f 6e 66 74 65 73 74 2e 78 0a 6c 6e   > conftest.x.ln
0800: 20 2d 73 20 63 6f 6e 66 74 65 73 74 2e 78 20 63   -s conftest.x c
0810: 6f 6e 66 74 65 73 74 2e 79 0a 6d 6b 64 69 72 20  onftest.y.mkdir 
0820: 63 6f 6e 66 74 65 73 74 2e 64 0a 63 64 20 63 6f  conftest.d.cd co
0830: 6e 66 74 65 73 74 2e 64 0a 6c 6e 20 2e 2e 2f 63  nftest.d.ln ../c
0840: 6f 6e 66 74 65 73 74 2e 79 20 63 6f 6e 66 74 65  onftest.y confte
0850: 73 74 2e 7a 20 32 3e 26 41 43 5f 46 44 5f 43 43  st.z 2>&AC_FD_CC
0860: 0a 64 61 74 61 3d 60 63 61 74 20 63 6f 6e 66 74  .data=`cat conft
0870: 65 73 74 2e 7a 20 32 3e 2f 64 65 76 2f 6e 75 6c  est.z 2>/dev/nul
0880: 6c 60 0a 69 66 20 74 65 73 74 20 22 24 64 61 74  l`.if test "$dat
0890: 61 22 20 3d 20 22 62 6c 61 62 6c 61 22 20 3b 20  a" = "blabla" ; 
08a0: 74 68 65 6e 0a 20 20 23 20 63 6f 6e 66 74 65 73  then.  # conftes
08b0: 74 2e 7a 20 63 6f 6e 74 61 69 6e 73 20 74 68 65  t.z contains the
08c0: 20 63 6f 72 72 65 63 74 20 64 61 74 61 20 2d 2d   correct data --
08d0: 20 67 6f 6f 64 21 0a 20 20 63 6c 5f 63 76 5f 70   good!.  cl_cv_p
08e0: 72 6f 67 5f 68 6c 6e 3d 22 6c 6e 22 0a 65 6c 73  rog_hln="ln".els
08f0: 65 0a 20 20 23 20 6c 6e 20 63 61 6e 6e 6f 74 20  e.  # ln cannot 
0900: 6c 69 6e 6b 20 74 6f 20 73 79 6d 62 6f 6c 69 63  link to symbolic
0910: 20 6c 69 6e 6b 73 0a 20 20 63 6c 5f 63 76 5f 70   links.  cl_cv_p
0920: 72 6f 67 5f 68 6c 6e 3d 22 68 6c 6e 22 0a 66 69  rog_hln="hln".fi
0930: 0a 63 64 20 2e 2e 0a 72 6d 20 2d 66 72 20 63 6f  .cd ...rm -fr co
0940: 6e 66 74 65 73 74 2e 2a 0a 65 6c 73 65 0a 23 20  nftest.*.else.# 
0950: 49 66 20 74 68 65 72 65 20 61 72 65 20 6e 6f 20  If there are no 
0960: 73 79 6d 62 6f 6c 69 63 20 6c 69 6e 6b 73 2c 20  symbolic links, 
0970: 74 68 65 20 70 72 6f 62 6c 65 6d 20 63 61 6e 6e  the problem cann
0980: 6f 74 20 6f 63 63 75 72 2e 0a 63 6c 5f 63 76 5f  ot occur..cl_cv_
0990: 70 72 6f 67 5f 68 6c 6e 3d 22 6c 6e 22 0a 66 69  prog_hln="ln".fi
09a0: 0a 5d 29 0a 48 4c 4e 3d 22 24 63 6c 5f 63 76 5f  .]).HLN="$cl_cv_
09b0: 70 72 6f 67 5f 68 6c 6e 22 0a 41 43 5f 53 55 42  prog_hln".AC_SUB
09c0: 53 54 28 48 4c 4e 29 64 6e 6c 0a 5d 29 0a        ST(HLN)dnl.]).