Received: (from majordom@localhost) by hyperreal.org (8.8.5/8.8.5) id TAA14930; Wed, 16 Jul 1997 19:56:41 -0700 (PDT) Received: (from jim@localhost) by hyperreal.org (8.8.5/8.8.5) id TAA14924 for apache-cvs; Wed, 16 Jul 1997 19:56:38 -0700 (PDT) Date: Wed, 16 Jul 1997 19:56:38 -0700 (PDT) From: Jim Jagielski Message-Id: <199707170256.TAA14924@hyperreal.org> To: apache-cvs@hyperreal.org Subject: cvs commit: apache/src/helpers TestLib dummy.c Sender: apache-cvs-owner@apache.org Precedence: bulk Reply-To: new-httpd@apache.org jim 97/07/16 19:56:38 Added: src/helpers TestLib dummy.c Log: Add another helper script: TestLib. This one uses Makefile.config to help see if a library file exists Revision Changes Path 1.1 apache/src/helpers/TestLib Index: TestLib =================================================================== #!/bin/sh trap 'rm -rf Makefile a.out; exit' 0 1 2 3 15 # # Yet another Apache Configure helper script. # This one exists simply to test for the existance of # a library. It does so by using ../Makefile.config to get # things like the C-compiler, etc, and then trying to # compile a dummy program and linking it with that # library. If the linking succeeds, then we assume that # library exists and we print out "yes" otherwise we # print out "no" # # # Get makefile settings and build a basic Makefile # rm -rf a.out cat ../Makefile.config > Makefile cat <> Makefile TLIB=-$1 CFLAGS=$(OPTIM) $(CFLAGS1) $(EXTRA_CFLAGS) LIBS=$(EXTRA_LIBS) $(LIBS1) INCLUDES=$(INCLUDES1) $(EXTRA_INCLUDES) LDFLAGS=$(LDFLAGS1) $(EXTRA_LDFLAGS) all: EOF cat <<\EOFF >> Makefile $(CC) $(CFLAGS) $(INCLUDES) $(LDFLAGS) dummy.c $(TLIB) EOFF # Now run that Makefile `make > /dev/null 2<&1` # And see if a.out exists if [ -f a.out ]; then echo "yes" else echo "no" fi 1.1 apache/src/helpers/dummy.c Index: dummy.c =================================================================== int main(void) { return 0; }