httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dean Gaudet <dgau...@hyperreal.org>
Subject cvs commit: apachen/src/modules/standard mod_auth_db.module mod_auth_dbm.c
Date Thu, 21 Aug 1997 18:12:26 GMT
dgaudet     97/08/21 11:12:25

  Modified:    src      Configuration.tmpl Configure
               src/helpers TestCompile
               src/modules/standard mod_auth_db.module mod_auth_dbm.c
  Log:
  Add "TestCompile func" to test if a certain func exists in the already
  supplied libraries.  Move dbm/db specific code from Configure into the
  appropriate module file.  Disable the printing of module commands ...
  they were like total spam when the rest of this patch is taken into
  account.
  
  Revision  Changes    Path
  1.73      +1 -1      apachen/src/Configuration.tmpl
  
  Index: Configuration.tmpl
  ===================================================================
  RCS file: /export/home/cvs/apachen/src/Configuration.tmpl,v
  retrieving revision 1.72
  retrieving revision 1.73
  diff -u -r1.72 -r1.73
  --- Configuration.tmpl	1997/08/18 07:17:21	1.72
  +++ Configuration.tmpl	1997/08/21 18:12:16	1.73
  @@ -240,8 +240,8 @@
   ## "gdbm" package if not and possibly adjust EXTRA_LIBS. (This may be
   ## done by Configure at a later date)
   
  -# AddModule modules/standard/mod_auth_db.o
   # AddModule modules/standard/mod_auth_dbm.o
  +# AddModule modules/standard/mod_auth_db.o
   
   ## msql_auth checks against an mSQL database.  You must have mSQL installed
   ## and an "msql.h" available for this to even compile.  Additionally,
  
  
  
  1.137     +0 -2      apachen/src/Configure
  
  Index: Configure
  ===================================================================
  RCS file: /export/home/cvs/apachen/src/Configure,v
  retrieving revision 1.136
  retrieving revision 1.137
  diff -u -r1.136 -r1.137
  --- Configure	1997/08/18 06:05:34	1.136
  +++ Configure	1997/08/21 18:12:17	1.137
  @@ -767,10 +767,8 @@
   		modname=`grep "Name:" $tmpfile2 | sed 's/^.*Name:[ 	]*//'`
   		if grep "ConfigStart" $tmpfile2 > /dev/null \
   		 && grep "ConfigEnd" $tmpfile2 > /dev/null; then
  -		    echo "    o $modname runs:"
   		    sed '1,/ConfigStart/d;/ConfigEnd/,$d' $tmpfile2 > \
   		     $tmpfile3
  -		    sed 's/^/>> /' $tmpfile3
   		    . ./$tmpfile3
   		fi
   		rm -f $tmpfile2 $tmpfile3
  
  
  
  1.5       +22 -4     apachen/src/helpers/TestCompile
  
  Index: TestCompile
  ===================================================================
  RCS file: /export/home/cvs/apachen/src/helpers/TestCompile,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- TestCompile	1997/08/10 20:28:03	1.4
  +++ TestCompile	1997/08/21 18:12:21	1.5
  @@ -1,6 +1,6 @@
   #!/bin/sh
   exstat=1
  -trap 'rm -f Makefile dummy; exit $exstat' 0 1 2 3 15
  +trap 'rm -f Makefile dummy testfunc.c testfunc; exit $exstat' 0 1 2 3 15
   #
   # Yet another Apache Configure helper script.
   # This script tests certain aspects of the compilation
  @@ -23,6 +23,8 @@
   # also call it as './helpers/TestCompile'
   #
   
  +cd ./helpers
  +
   #
   # Handle "verbose" and "silent" flags
   #
  @@ -52,6 +54,7 @@
   	else
   	    ERRDIR='2>/dev/null'
   	fi
  +	TARGET='dummy'
   	;;
       "sanity")
   	TLIB=""
  @@ -60,6 +63,20 @@
   	else
   	    ERRDIR=""
   	fi
  +	TARGET='dummy'
  +	;;
  +    "func")
  +	if [ "x$2" = "x" ]; then
  +	    exit
  +	fi
  +	TLIB=""
  +	ERRDIR='2>/dev/null'
  +	TARGET='testfunc'
  +	cat <<EOF >testfunc.c
  +void main(void) {
  +    $2();
  +}
  +EOF
   	;;
       *)
       	exit
  @@ -69,7 +86,6 @@
   #
   # Get makefile settings and build a basic Makefile
   #
  -cd ./helpers
   rm -f dummy
   cat ../Makefile.config > Makefile
   cat <<EOF >> Makefile
  @@ -81,13 +97,15 @@
   dummy:
   	\$(CC) \$(CFLAGS) \$(INCLUDES) \$(LDFLAGS) dummy.c -o dummy $TLIB
   
  +testfunc:
  +	\$(CC) \$(CFLAGS) \$(INCLUDES) \$(LDFLAGS) testfunc.c -o testfunc \$(LIBS)
   EOF
   
   # Now run that Makefile
  -eval "make dummy >/dev/null $ERRDIR"
  +eval "make $TARGET >/dev/null $ERRDIR"
   
   # And see if dummy exists, if so, then we assume the 
   # condition we are testing for is good
  -if [ -f dummy ]; then
  +if [ -f $TARGET ]; then
       exstat=0
   fi
  
  
  
  1.3       +14 -12    apachen/src/modules/standard/mod_auth_db.module
  
  Index: mod_auth_db.module
  ===================================================================
  RCS file: /export/home/cvs/apachen/src/modules/standard/mod_auth_db.module,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- mod_auth_db.module	1997/08/18 06:05:36	1.2
  +++ mod_auth_db.module	1997/08/21 18:12:23	1.3
  @@ -1,16 +1,18 @@
   Name: db_auth_module
   ConfigStart
  -    case "$PLAT" in
  -	*-linux*)
  -	    # many systems have -ldb installed
  -	    DB_LIB=""
  -	    if ./helpers/TestCompile lib db; then
  -		DB_LIB="-ldb"
  -	    fi
  -	    ;;
  -    esac
  -    LIBS="$LIBS $DB_LIB"
  -    if [ "X$DB_LIB" != "X" ]; then
  -	echo " + using $DB_LIB for mod_auth_db"
  +    if ! ./helpers/TestCompile func dbopen; then
  +	case "$PLAT" in
  +	    *-linux*)
  +		# many systems have -ldb installed
  +		DB_LIB=""
  +		if ./helpers/TestCompile lib db; then
  +		    DB_LIB="-ldb"
  +		fi
  +		;;
  +	esac
  +	LIBS="$LIBS $DB_LIB"
  +	if [ "X$DB_LIB" != "X" ]; then
  +	    echo " + using $DB_LIB for mod_auth_db"
  +	fi
       fi
   ConfigEnd
  
  
  
  1.25      +16 -14    apachen/src/modules/standard/mod_auth_dbm.c
  
  Index: mod_auth_dbm.c
  ===================================================================
  RCS file: /export/home/cvs/apachen/src/modules/standard/mod_auth_dbm.c,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- mod_auth_dbm.c	1997/08/18 13:12:09	1.24
  +++ mod_auth_dbm.c	1997/08/21 18:12:23	1.25
  @@ -79,20 +79,22 @@
    * MODULE-DEFINITION-START
    * Name: dbm_auth_module
    * ConfigStart
  -    case "$PLAT" in
  -	*-linux*)
  -	    # many systems don't have -ldbm
  -	    DBM_LIB=""
  -	    if ./helpers/TestCompile lib dbm; then
  -		DBM_LIB="-ldbm"
  -	    elif ./helpers/TestCompile lib ndbm; then
  -		DBM_LIB="-lndbm"
  -	    fi
  -	    ;;
  -    esac
  -    LIBS="$LIBS $DBM_LIB"
  -    if [ "X$DBM_LIB" != "X" ]; then
  -	echo " + using $DBM_LIB for mod_auth_dbm"
  +    if ! ./helpers/TestCompile func dbm_open; then
  +	case "$PLAT" in
  +	    *-linux*)
  +		# many systems don't have -ldbm
  +		DBM_LIB=""
  +		if ./helpers/TestCompile lib dbm; then
  +		    DBM_LIB="-ldbm"
  +		elif ./helpers/TestCompile lib ndbm; then
  +		    DBM_LIB="-lndbm"
  +		fi
  +		;;
  +	esac
  +	LIBS="$LIBS $DBM_LIB"
  +	if [ "X$DBM_LIB" != "X" ]; then
  +	    echo " + using $DBM_LIB for mod_auth_dbm"
  +	fi
       fi
    * ConfigEnd
    * MODULE-DEFINITION-END
  
  
  

Mime
View raw message