"Fossies" - the Fresh Open Source Software Archive

Member "mod_auth_pubtkt-0.14/configure.old" (17 Dec 2020, 3299 Bytes) of package /linux/www/apache_httpd_modules/mod_auth_pubtkt-0.14.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Bash source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 #!/bin/sh
    2 #
    3 # Simple configure script for mod_auth_pubtkt
    4 #
    5 
    6 # Defaults
    7 APXS=/usr/sbin/apxs
    8 test -x $APXS || unset APXS
    9 if [ -z $APXS ]; then
   10   APXS=/usr/bin/apxs
   11   test -x $APXS || unset APXS
   12 fi
   13 if [ -z $APXS ]; then
   14   APXS=/usr/bin/apxs2
   15   test -x $APXS || unset APXS
   16 fi
   17 
   18 ME=`basename $0`
   19 DIR=`dirname $0`
   20 if [ $DIR = '.' ]; then
   21   DIR=`pwd`
   22 fi
   23 
   24 usage() {
   25   echo "usage: $ME [--apxs=/path/to/apxs] [--apachever=<1.3|2|2.2|2.4>] [--debug]"
   26 }
   27 die() {
   28   echo $*
   29   exit 2
   30 }
   31 
   32 # Retrograde option handling to allow for primitive getopts
   33 ac_prev=
   34 for ac_option
   35 do
   36     # If the previous option needs an argument, assign it.
   37     if test -n "$ac_prev"; then
   38         eval "$ac_prev=\$ac_option"
   39         ac_prev=
   40         continue
   41     fi
   42     ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
   43     case $ac_option in
   44         --apxs=*)
   45             APXS=$ac_optarg
   46             ;;
   47         --apxs)
   48             ac_prev=APXS
   49             ;;
   50         --apachever=*)
   51             VERSION=$ac_optarg
   52             ;;
   53         --debug)
   54             DEBUG="-g -Wall -ansi -Wno-implicit-function-declaration -Wno-long-long" 
   55             ;;
   56         -h | --help)
   57             usage;
   58             exit 0
   59             ;;
   60         *)
   61             usage;
   62             exit 1
   63             ;;
   64     esac
   65 done
   66 
   67 # Sanity checks
   68 test "$ac_prev" = "APXS" && die "Error: option '--apxs' requires an argument"
   69 test -n "$APXS" || die "Error: cannot locate apxs (use --apxs=/path/to/apxs)"
   70 test -x $APXS || die "Error: missing apxs '$APXS' (use --apxs=/path/to/apxs)"
   71 
   72 # Get Apache version
   73 if [ -z "$VERSION" ]; then
   74     HTTPD=`$APXS -q SBINDIR`/`$APXS -q TARGET`
   75     test -x $HTTPD || die "Error: cannot determine apache version (use --apachever=<1.3|2|2.2|2.4>)"
   76     VERSION=`$HTTPD -v | head -1 | sed -e 's/.*Apache\///' -e 's/^\([0-9]\.[0-9]*\).*/\1/'`
   77 fi
   78 # Standardise
   79 test $VERSION = '1'   && VERSION=1.3
   80 test $VERSION = '2.0' && VERSION=2
   81 test $VERSION = '20'  && VERSION=2
   82 test $VERSION = '22'  && VERSION=2.2
   83 test $VERSION = '24'  && VERSION=2.4
   84 if [ $VERSION != '1.3' -a $VERSION != '2' -a $VERSION != '2.2' -a $VERSION != '2.4' ]; then
   85   die "Error: apache version '$VERSION' not supported"
   86 fi
   87 
   88 # Generate Makedefs
   89 DIV="#-------------------------------------------------------------------------"
   90 WARNING="# Generated by $ME, do not edit!"
   91 test -f Makedefs && rm -f Makedefs
   92 test -f Makedefs && die "Error deleting Makedefs"
   93 
   94 echo $DIV >> Makedefs
   95 echo $WARNING >> Makedefs
   96 echo >> Makedefs
   97 echo "VERSION = $VERSION" >> Makedefs
   98 echo "APXS = $APXS" >> Makedefs
   99 test -n "$DEBUG" && echo "CFLAGS += $DEBUG" >> Makedefs
  100 if [ "$VERSION" = "1.3" ]; then
  101   echo "CFLAGS += -DAPACHE13" >> Makedefs
  102   echo "TARGET = mod_auth_pubtkt.so" >> Makedefs
  103 else
  104   if [ $VERSION = "2.2" ]; then
  105     echo "CFLAGS += -DAPACHE22" >> Makedefs
  106   elif [ $VERSION = "2.4" ]; then
  107     echo "CFLAGS += -DAPACHE24" >> Makedefs
  108   fi
  109   echo "TARGET = mod_auth_pubtkt.la" >> Makedefs
  110 fi
  111 echo "BASEDIR = $DIR" >> Makedefs
  112 
  113 # proper handling of Universal Binaries under Mac OS X
  114 HTTPD="`${APXS} -q SBINDIR`/`${APXS} -q TARGET`"
  115 if test -x /usr/bin/lipo; then
  116     ARCHITECTURES=`/usr/bin/lipo -info $HTTPD | sed -e 's/.*://'`
  117     for ARCH in $ARCHITECTURES; do
  118         echo "CFLAGS += -arch ${ARCH}" >> Makedefs
  119         echo "LDFLAGS += -arch ${ARCH}" >> Makedefs
  120     done
  121 fi
  122 
  123 if [ -d /usr/share/man ]; then
  124   echo "MANPATH = /usr/share/man" >> Makedefs
  125 else
  126   echo "MANPATH = /usr/man" >> Makedefs
  127 fi
  128 
  129 echo >> Makedefs
  130 echo $WARNING >> Makedefs
  131 echo $DIV >> Makedefs
  132 
  133 # Finish with a 'make clean'
  134 make -s clean