home *** CD-ROM | disk | FTP | other *** search
/ Aminet 15 / Aminet 15 - Nov 1996.iso / Aminet / dev / lang / perl_src.lha / fsf / perl / configure < prev    next >
Encoding:
Text File  |  1996-08-21  |  2.1 KB  |  124 lines

  1. #! /bin/sh
  2. #
  3. # $Id: configure,v 3.0.1.1 1995/07/25 14:16:21 ram Exp $
  4. #
  5. # GNU configure-like front end to metaconfig's Configure.
  6. #
  7. # Written by Andy Dougherty <doughera@lafcol.lafayette.edu>
  8. # and Matthew Green <mrg@mame.mu.oz.au>.
  9. #
  10. # Reformatted and modified for inclusion in the dist-3.0 package by
  11. # Raphael Manfredi <ram@hptnos02.grenoble.hp.com>.
  12. #
  13. # This script belongs to the public domain and may be freely redistributed.
  14. #
  15. # The remaining of this leading shell comment may be removed if you
  16. # include this script in your own package.
  17. #
  18. # $Log: configure,v $
  19. # Revision 3.0.1.1  1995/07/25  14:16:21  ram
  20. # patch56: created
  21. #
  22.  
  23. callme=$0
  24.  
  25. (exit $?0) || exec sh $0 $argv:q
  26. opts=''
  27. verbose=''
  28. create='-e'
  29. while test $# -gt 0; do
  30.     case $1 in
  31.     --help)
  32.         cat <<EOM
  33. Usage: configure [options]
  34. This is GNU configure-like front end for a metaconfig-generated Configure.
  35. It emulates the following GNU configure options (must be fully spelled out):
  36.     --help
  37.     --no-create
  38.     --prefix=PREFIX
  39.     --quiet
  40.     --silent
  41.     --verbose
  42.     --version
  43.  
  44. And it honours these environment variables: CC, CFLAGS and DEFS.
  45. EOM
  46.         exit 0
  47.         ;;
  48.     --no-create)
  49.         create='-E'
  50.         shift
  51.         ;;
  52.     --prefix=*)
  53.         arg=`echo $1 | sed 's/--prefix=/-Dprefix=/'`
  54.         opts="$opts $arg"
  55.         shift
  56.         ;;
  57.     --quiet|--silent)
  58.         exec >/dev/null 2>&1
  59.         shift
  60.         ;;
  61.     --verbose)
  62.         verbose=true
  63.         shift
  64.         ;;
  65.     --version)
  66.         copt="$copt -V"
  67.         shift
  68.         ;;
  69.     --*)
  70.         opt=`echo $1 | sed 's/=.*//'`
  71.         echo "This GNU configure front end does not understand $opt"
  72.         exit 1
  73.         ;;
  74.     *)
  75.         opts="$opts $1"
  76.         shift
  77.         ;;
  78.     esac
  79. done
  80.  
  81. case "$CC" in
  82. '') ;;
  83. *) opts="$opts -Dcc='$CC'";;
  84. esac
  85.  
  86. # Join DEFS and CFLAGS together.
  87. ccflags=''
  88. case "$DEFS" in
  89. '') ;;
  90. *) ccflags=$DEFS;;
  91. esac
  92. case "$CFLAGS" in
  93. '') ;;
  94. *) ccflags="$ccflags $CFLAGS";;
  95. esac
  96. case "$ccflags" in
  97. '') ;;
  98. *) opts="$opts -Dccflags='$ccflags'";;
  99. esac
  100.  
  101. # Don't use -s if they want verbose mode
  102. case "$verbose" in
  103. '') copt="$copt -ds";;
  104. *) copt="$copt -d";;
  105. esac
  106.  
  107. if [ "$callme" != 'configure' ]
  108. then
  109.   calldir=`dirname "$callme"`
  110.   curdir=`pwd`
  111.   cd $calldir
  112.   calldir=`pwd`
  113.   cd $curdir
  114.   if [ "$curdir" != "$calldir" ]
  115.   then
  116.     cp -R $calldir/* .
  117.   fi
  118. fi
  119.  
  120. set X sh _Configure $copt $create $opts
  121. shift
  122. echo "$@"
  123. exec "$@"
  124.