3 # This is make+. Make+ is a set of scripts which enhance GNU make and
4 # let ou build RPMs, and other packages types with just one control
5 # file. Read more at http://www.annexia.org/freeware/makeplus/
7 # The original author is Richard W.M. Jones <rich@annexia.org>.
9 # This software has been explicitly placed in the PUBLIC DOMAIN. You
10 # do not need any sort of license or agreement to use or copy this
11 # software. You may also copyright this software yourself, and/or
12 # relicense it under any terms you want, at any time and at no cost.
13 # This allows you (among other things) to include this software with
14 # other packages so that the user does not need to download and
15 # install make+ separately.
21 sym=`echo $hdr | tr -- '-./[a-z]' '___[A-Z]'`
24 # Try to compile a short program which includes this file.
25 rm -f mp-check_header.o
26 echo "#include <$hdr>" > mp-check_header.c
27 echo "mp-check_header.c:" >>config.log
28 cat mp-check_header.c >>config.log
29 echo $CC $CFLAGS -E mp-check_header.c >>config.log
30 $CC $CFLAGS -E mp-check_header.c >>config.log 2>&1
34 rm -f mp-check_header*
36 if [ "x$have" = "xy" ]; then
37 echo "#define HAVE_$sym 1" >> config.h
38 echo "HAVE_$sym := 1" >> config.mk
40 if [ "x$require" = "xy" ]; then
41 echo "configure: header file <$hdr> is required; not found"
42 echo "configure: You may need to do:"
43 echo "configure: CFLAGS=-I/path/to/header; export CFLAGS"
46 echo "/* #define HAVE_$sym 1 */" >> config.h
47 echo "# HAVE_$sym := 1" >> config.mk