diff options
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -70,6 +70,7 @@ shared=1 | |||
70 | solo=0 | 70 | solo=0 |
71 | cover=0 | 71 | cover=0 |
72 | zprefix=0 | 72 | zprefix=0 |
73 | zconst=0 | ||
73 | build64=0 | 74 | build64=0 |
74 | gcc=0 | 75 | gcc=0 |
75 | old_cc="$CC" | 76 | old_cc="$CC" |
@@ -96,7 +97,7 @@ do | |||
96 | case "$1" in | 97 | case "$1" in |
97 | -h* | --help) | 98 | -h* | --help) |
98 | echo 'usage:' | tee -a configure.log | 99 | echo 'usage:' | tee -a configure.log |
99 | echo ' configure [--zprefix] [--prefix=PREFIX] [--eprefix=EXPREFIX]' | tee -a configure.log | 100 | echo ' configure [--const] [--zprefix] [--prefix=PREFIX] [--eprefix=EXPREFIX]' | tee -a configure.log |
100 | echo ' [--static] [--64] [--libdir=LIBDIR] [--sharedlibdir=LIBDIR]' | tee -a configure.log | 101 | echo ' [--static] [--64] [--libdir=LIBDIR] [--sharedlibdir=LIBDIR]' | tee -a configure.log |
101 | echo ' [--includedir=INCLUDEDIR] [--archs="-arch i386 -arch x86_64"]' | tee -a configure.log | 102 | echo ' [--includedir=INCLUDEDIR] [--archs="-arch i386 -arch x86_64"]' | tee -a configure.log |
102 | exit 0 ;; | 103 | exit 0 ;; |
@@ -119,6 +120,7 @@ case "$1" in | |||
119 | -a*=* | --archs=*) ARCHS=`echo $1 | sed 's/.*=//'`; shift ;; | 120 | -a*=* | --archs=*) ARCHS=`echo $1 | sed 's/.*=//'`; shift ;; |
120 | --sysconfdir=*) echo "ignored option: --sysconfdir" | tee -a configure.log; shift ;; | 121 | --sysconfdir=*) echo "ignored option: --sysconfdir" | tee -a configure.log; shift ;; |
121 | --localstatedir=*) echo "ignored option: --localstatedir" | tee -a configure.log; shift ;; | 122 | --localstatedir=*) echo "ignored option: --localstatedir" | tee -a configure.log; shift ;; |
123 | -c* | --const) zconst=1; shift ;; | ||
122 | *) | 124 | *) |
123 | echo "unknown option: $1" | tee -a configure.log | 125 | echo "unknown option: $1" | tee -a configure.log |
124 | echo "$0 --help for help" | tee -a configure.log | 126 | echo "$0 --help for help" | tee -a configure.log |
@@ -171,7 +173,11 @@ if test "$gcc" -eq 1 && ($cc -c $test.c) >> configure.log 2>&1; then | |||
171 | SFLAGS="${SFLAGS} -m64" | 173 | SFLAGS="${SFLAGS} -m64" |
172 | fi | 174 | fi |
173 | if test "${ZLIBGCCWARN}" = "YES"; then | 175 | if test "${ZLIBGCCWARN}" = "YES"; then |
174 | CFLAGS="${CFLAGS} -Wall -Wextra -pedantic" | 176 | if test "$zconst" -eq 1; then |
177 | CFLAGS="${CFLAGS} -Wall -Wextra -Wcast-qual -pedantic -DZLIB_CONST" | ||
178 | else | ||
179 | CFLAGS="${CFLAGS} -Wall -Wextra -pedantic" | ||
180 | fi | ||
175 | fi | 181 | fi |
176 | if test -z "$uname"; then | 182 | if test -z "$uname"; then |
177 | uname=`(uname -s || echo unknown) 2>/dev/null` | 183 | uname=`(uname -s || echo unknown) 2>/dev/null` |