diff options
Diffstat (limited to 'configure')
| -rwxr-xr-x | configure | 19 |
1 files changed, 18 insertions, 1 deletions
| @@ -27,6 +27,7 @@ prefix=${prefix-/usr/local} | |||
| 27 | exec_prefix=${exec_prefix-$prefix} | 27 | exec_prefix=${exec_prefix-$prefix} |
| 28 | shared_ext='.so' | 28 | shared_ext='.so' |
| 29 | shared=0 | 29 | shared=0 |
| 30 | gcc=0 | ||
| 30 | old_cc="$CC" | 31 | old_cc="$CC" |
| 31 | old_cflags="$CFLAGS" | 32 | old_cflags="$CFLAGS" |
| 32 | 33 | ||
| @@ -114,7 +115,6 @@ if test $shared -eq 0; then | |||
| 114 | LDSHARED="$CC" | 115 | LDSHARED="$CC" |
| 115 | echo Building static library $LIBS version $VER with $CC. | 116 | echo Building static library $LIBS version $VER with $CC. |
| 116 | fi | 117 | fi |
| 117 | rm -f $test.[co] $test$shared_ext | ||
| 118 | 118 | ||
| 119 | if test -f /usr/include/unistd.h; then | 119 | if test -f /usr/include/unistd.h; then |
| 120 | CFLAGS="$CFLAGS -DHAVE_UNISTD_H" | 120 | CFLAGS="$CFLAGS -DHAVE_UNISTD_H" |
| @@ -124,6 +124,23 @@ if test ! -f /usr/include/errno.h; then | |||
| 124 | CFLAGS="$CFLAGS -DNO_ERRNO_H" | 124 | CFLAGS="$CFLAGS -DNO_ERRNO_H" |
| 125 | fi | 125 | fi |
| 126 | 126 | ||
| 127 | cat > $test.c <<EOF | ||
| 128 | #include <sys/types.h> | ||
| 129 | #include <sys/mman.h> | ||
| 130 | #include <sys/stat.h> | ||
| 131 | caddr_t hello() { | ||
| 132 | return mmap((caddr_t)0, (off_t)0, PROT_READ, MAP_SHARED, 0, (off_t)0); | ||
| 133 | } | ||
| 134 | EOF | ||
| 135 | if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then | ||
| 136 | CFLAGS="$CFLAGS -DUSE_MMAP" | ||
| 137 | echo Checking for mmap support... Yes. | ||
| 138 | else | ||
| 139 | echo Checking for mmap support... No. | ||
| 140 | fi | ||
| 141 | |||
| 142 | rm -f $test.[co] $test$shared_ext | ||
| 143 | |||
| 127 | # udpate Makefile | 144 | # udpate Makefile |
| 128 | sed < Makefile.in " | 145 | sed < Makefile.in " |
| 129 | /^CC *=/s%=.*%=$CC% | 146 | /^CC *=/s%=.*%=$CC% |
