You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by dg...@hyperreal.org on 1998/03/05 13:42:39 UTC

cvs commit: apache-1.3/src/modules/standard mod_auth_db.module mod_auth_dbm.c mod_rewrite.c

dgaudet     98/03/05 04:42:39

  Modified:    src/helpers TestCompile
               src/modules/standard mod_auth_db.module mod_auth_dbm.c
                        mod_rewrite.c
  Added:       src/helpers find-dbm-lib
  Log:
  It seems foolish for two standard distribution modules to disagree about
  something as simple as dbm support.  But they did because mod_rewrite's
  config section gets run before mod_auth_dbm's.
  
  They don't disagree any longer.  And I think this deals with the complaint
  you sent me in private mail Ralf... re: "TestCompile lib foo" doesn't really
  check if a function can be compiled, it just checks if the lib exists.  Now
  TestCompile lib is one step closer to what autoconf does.
  
  Revision  Changes    Path
  1.9       +11 -2     apache-1.3/src/helpers/TestCompile
  
  Index: TestCompile
  ===================================================================
  RCS file: /export/home/cvs/apache-1.3/src/helpers/TestCompile,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- TestCompile	1997/10/24 19:30:23	1.8
  +++ TestCompile	1998/03/05 12:42:30	1.9
  @@ -9,6 +9,10 @@
   # ./helpers/TestCompile lib <libname>
   #    Which checks to see if <libname> exists on this system
   #
  +# ./helpers/TestCompile lib <libname> <func>
  +#    Which checks to see if <libname> exists on this system and
  +#    contains func.
  +#
   # ./helpers/TestCompile func <function>
   #    Which checks to see if <function> exists
   #
  @@ -57,7 +61,12 @@
   	else
   	    ERRDIR='2>/dev/null'
   	fi
  -	TARGET='dummy'
  +	if [ "x$3" = "x" ]; then
  +	    TARGET='dummy'
  +	else
  +	    TARGET='testfunc'
  +	    echo "void main(void) { $3(); }" > testfunc.c
  +	fi
   	;;
       "sanity")
   	TLIB=""
  @@ -105,7 +114,7 @@
   	cd ..; \$(CC) \$(CFLAGS) \$(INCLUDES) \$(LDFLAGS) helpers/dummy.c -o helpers/dummy $TLIB \$(LIBS)
   
   testfunc:
  -	cd ..; \$(CC) \$(CFLAGS) \$(INCLUDES) \$(LDFLAGS) helpers/testfunc.c -o helpers/testfunc \$(LIBS)
  +	cd ..; \$(CC) \$(CFLAGS) \$(INCLUDES) \$(LDFLAGS) helpers/testfunc.c -o helpers/testfunc $TLIB \$(LIBS)
   EOF
   
   # Now run that Makefile
  
  
  
  1.1                  apache-1.3/src/helpers/find-dbm-lib
  
  Index: find-dbm-lib
  ===================================================================
  # Our config tool sucks... if this script decides to modify the
  # LIBS variable it won't be used by any of the other TestCompiles.
  # So unless we protect ourselves with the found_dbm variable
  # we'd end up having to do the work twice... and we'd end up putting
  # two -ldbm -ldbm into the LIBS variable.
  
  if [ "x$found_dbm" = "x" ]; then
      if ./helpers/TestCompile func dbm_open; then
  	found_dbm=1
      else
  	found_dbm=0
  	case "$PLAT" in
  	    *-linux*)
  		# many systems don't have -ldbm
  		DBM_LIB=""
  		if ./helpers/TestCompile lib dbm dbm_open; then
  		    DBM_LIB="-ldbm"
  		elif ./helpers/TestCompile lib ndbm dbm_open; then
  		    DBM_LIB="-lndbm"
  		fi
  		;;
  	esac
  	LIBS="$LIBS $DBM_LIB"
  	if [ "X$DBM_LIB" != "X" ]; then
  	    echo " + using $DBM_LIB"
  	    found_dbm=1
  	fi
      fi
  fi
  
  
  
  1.5       +1 -1      apache-1.3/src/modules/standard/mod_auth_db.module
  
  Index: mod_auth_db.module
  ===================================================================
  RCS file: /export/home/cvs/apache-1.3/src/modules/standard/mod_auth_db.module,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- mod_auth_db.module	1997/08/24 16:43:25	1.4
  +++ mod_auth_db.module	1998/03/05 12:42:32	1.5
  @@ -7,7 +7,7 @@
   	    *-linux*)
   		# many systems have -ldb installed
   		DB_LIB=""
  -		if ./helpers/TestCompile lib db; then
  +		if ./helpers/TestCompile lib db dbopen; then
   		    DB_LIB="-ldb"
   		fi
   		;;
  
  
  
  1.34      +1 -19     apache-1.3/src/modules/standard/mod_auth_dbm.c
  
  Index: mod_auth_dbm.c
  ===================================================================
  RCS file: /export/home/cvs/apache-1.3/src/modules/standard/mod_auth_dbm.c,v
  retrieving revision 1.33
  retrieving revision 1.34
  diff -u -r1.33 -r1.34
  --- mod_auth_dbm.c	1998/01/07 16:46:45	1.33
  +++ mod_auth_dbm.c	1998/03/05 12:42:35	1.34
  @@ -80,25 +80,7 @@
    * MODULE-DEFINITION-START
    * Name: dbm_auth_module
    * ConfigStart
  -    if ./helpers/TestCompile func dbm_open; then
  -	:
  -    else
  -	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
  +    . ./helpers/find-dbm-lib
    * ConfigEnd
    * MODULE-DEFINITION-END
    */
  
  
  
  1.86      +2 -1      apache-1.3/src/modules/standard/mod_rewrite.c
  
  Index: mod_rewrite.c
  ===================================================================
  RCS file: /export/home/cvs/apache-1.3/src/modules/standard/mod_rewrite.c,v
  retrieving revision 1.85
  retrieving revision 1.86
  diff -u -r1.85 -r1.86
  --- mod_rewrite.c	1998/03/05 10:48:05	1.85
  +++ mod_rewrite.c	1998/03/05 12:42:37	1.86
  @@ -133,7 +133,8 @@
        * MODULE-DEFINITION-START
        * Name: rewrite_module
        * ConfigStart
  -    if ./helpers/TestCompile func dbm_open; then
  +    . ./helpers/find-dbm-lib
  +    if [ "$found_dbm" = "1" ]; then
           echo "      enabling DBM support for mod_rewrite"
       else
           echo "      disabling DBM support for mod_rewrite"