diff options
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 16 |
1 files changed, 11 insertions, 5 deletions
@@ -30,6 +30,7 @@ mandir=${mandir-'${prefix}/share/man'} | |||
30 | shared_ext='.so' | 30 | shared_ext='.so' |
31 | shared=1 | 31 | shared=1 |
32 | zprefix=0 | 32 | zprefix=0 |
33 | build64=0 | ||
33 | gcc=0 | 34 | gcc=0 |
34 | old_cc="$CC" | 35 | old_cc="$CC" |
35 | old_cflags="$CFLAGS" | 36 | old_cflags="$CFLAGS" |
@@ -39,8 +40,8 @@ do | |||
39 | case "$1" in | 40 | case "$1" in |
40 | -h* | --help) | 41 | -h* | --help) |
41 | echo 'usage:' | 42 | echo 'usage:' |
42 | echo ' configure [--shared] [--prefix=PREFIX] [--exec_prefix=EXPREFIX]' | 43 | echo ' configure [--zprefix] [--prefix=PREFIX] [--eprefix=EXPREFIX]' |
43 | echo ' [--libdir=LIBDIR] [--includedir=INCLUDEDIR] [--zprefix]' | 44 | echo ' [--static] [--64] [--libdir=LIBDIR] [--includedir=INCLUDEDIR]' |
44 | exit 0 ;; | 45 | exit 0 ;; |
45 | -p*=* | --prefix=*) prefix=`echo $1 | sed 's/[-a-z_]*=//'`; shift ;; | 46 | -p*=* | --prefix=*) prefix=`echo $1 | sed 's/[-a-z_]*=//'`; shift ;; |
46 | -e*=* | --eprefix=*) exec_prefix=`echo $1 | sed 's/[-a-z_]*=//'`; shift ;; | 47 | -e*=* | --eprefix=*) exec_prefix=`echo $1 | sed 's/[-a-z_]*=//'`; shift ;; |
@@ -54,6 +55,7 @@ case "$1" in | |||
54 | -s* | --shared | --enable-shared) shared=1; shift ;; | 55 | -s* | --shared | --enable-shared) shared=1; shift ;; |
55 | -t | --static) shared=0; shift ;; | 56 | -t | --static) shared=0; shift ;; |
56 | -z* | --zprefix) zprefix=1; shift ;; | 57 | -z* | --zprefix) zprefix=1; shift ;; |
58 | -6* | --64) build64=1; shift ;; | ||
57 | --sysconfdir=*) echo "ignored option: --sysconfdir"; shift ;; | 59 | --sysconfdir=*) echo "ignored option: --sysconfdir"; shift ;; |
58 | --localstatedir=*) echo "ignored option: --localstatedir"; shift ;; | 60 | --localstatedir=*) echo "ignored option: --localstatedir"; shift ;; |
59 | *) echo "unknown option: $1"; echo "$0 --help for help"; exit 1 ;; | 61 | *) echo "unknown option: $1"; echo "$0 --help for help"; exit 1 ;; |
@@ -78,6 +80,10 @@ if test "$gcc" -eq 1 && ($cc -c $cflags $test.c) 2>/dev/null; then | |||
78 | CC="$cc" | 80 | CC="$cc" |
79 | SFLAGS="${CFLAGS-"-O3"} -fPIC" | 81 | SFLAGS="${CFLAGS-"-O3"} -fPIC" |
80 | CFLAGS="${CFLAGS-"-O3"}" | 82 | CFLAGS="${CFLAGS-"-O3"}" |
83 | if test $build64 -eq 1; then | ||
84 | CFLAGS="${CFLAGS} -m64" | ||
85 | SFLAGS="${SFLAGS} -m64" | ||
86 | fi | ||
81 | if test "${ZLIBGCCWARN}" = "YES"; then | 87 | if test "${ZLIBGCCWARN}" = "YES"; then |
82 | CFLAGS="${CFLAGS} -Wall -Wextra -pedantic" | 88 | CFLAGS="${CFLAGS} -Wall -Wextra -pedantic" |
83 | fi | 89 | fi |
@@ -191,7 +197,7 @@ if test $shared -eq 1; then | |||
191 | echo Checking for shared library support... | 197 | echo Checking for shared library support... |
192 | # we must test in two steps (cc then ld), required at least on SunOS 4.x | 198 | # we must test in two steps (cc then ld), required at least on SunOS 4.x |
193 | if test "`($CC -w -c $SFLAGS $test.c) 2>&1`" = "" && | 199 | if test "`($CC -w -c $SFLAGS $test.c) 2>&1`" = "" && |
194 | test "`($LDSHARED -o $test$shared_ext $test.o) 2>&1`" = ""; then | 200 | test "`($LDSHARED $SFLAGS -o $test$shared_ext $test.o) 2>&1`" = ""; then |
195 | echo Building shared library $SHAREDLIBV with $CC. | 201 | echo Building shared library $SHAREDLIBV with $CC. |
196 | elif test -z "$old_cc" -a -z "$old_cflags"; then | 202 | elif test -z "$old_cc" -a -z "$old_cflags"; then |
197 | echo No shared library support. | 203 | echo No shared library support. |
@@ -199,8 +205,8 @@ if test $shared -eq 1; then | |||
199 | else | 205 | else |
200 | echo Tested $CC -w -c $SFLAGS $test.c | 206 | echo Tested $CC -w -c $SFLAGS $test.c |
201 | $CC -w -c $SFLAGS $test.c | 207 | $CC -w -c $SFLAGS $test.c |
202 | echo Tested $LDSHARED -o $test$shared_ext $test.o | 208 | echo Tested $LDSHARED $SFLAGS -o $test$shared_ext $test.o |
203 | $LDSHARED -o $test$shared_ext $test.o | 209 | $LDSHARED $SFLAGS -o $test$shared_ext $test.o |
204 | echo 'No shared library support; try without defining CC and CFLAGS' | 210 | echo 'No shared library support; try without defining CC and CFLAGS' |
205 | shared=0; | 211 | shared=0; |
206 | fi | 212 | fi |