diff options
author | Mark Adler <madler@alumni.caltech.edu> | 2011-09-09 23:34:55 -0700 |
---|---|---|
committer | Mark Adler <madler@alumni.caltech.edu> | 2011-09-09 23:34:55 -0700 |
commit | 73014202489f913dbffc91d22089ea8a8920c054 (patch) | |
tree | 0d86e58ff1445b54be2a04939903f0b6b51f4184 /configure | |
parent | a7d70663cf4a7d4013ff7d285da01a164ed9b207 (diff) | |
download | zlib-73014202489f913dbffc91d22089ea8a8920c054.tar.gz zlib-73014202489f913dbffc91d22089ea8a8920c054.tar.bz2 zlib-73014202489f913dbffc91d22089ea8a8920c054.zip |
zlib 1.2.4.5v1.2.4.5
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 29 |
1 files changed, 18 insertions, 11 deletions
@@ -14,7 +14,7 @@ | |||
14 | # an error. | 14 | # an error. |
15 | 15 | ||
16 | if [ -n "${CHOST}" ]; then | 16 | if [ -n "${CHOST}" ]; then |
17 | uname="$(echo "${CHOST}" | sed -e 's/.*-.*-\(.*\)-.*$/\1/' -e 's/.*-\(.*\)-.*/\1/' -e 's/.*-\(.*\)$/\1/')" | 17 | uname="$(echo "${CHOST}" | sed -e 's/^[^-]*-\([^-]*\)$/\1/' -e 's/^[^-]*-[^-]*-\([^-]*\)$/\1/' -e 's/^[^-]*-[^-]*-\([^-]*\)-.*$/\1/')" |
18 | CROSS_PREFIX="${CHOST}-" | 18 | CROSS_PREFIX="${CHOST}-" |
19 | fi | 19 | fi |
20 | 20 | ||
@@ -49,6 +49,7 @@ LDSHAREDLIBC="${LDSHAREDLIBC--lc}" | |||
49 | prefix=${prefix-/usr/local} | 49 | prefix=${prefix-/usr/local} |
50 | exec_prefix=${exec_prefix-'${prefix}'} | 50 | exec_prefix=${exec_prefix-'${prefix}'} |
51 | libdir=${libdir-'${exec_prefix}/lib'} | 51 | libdir=${libdir-'${exec_prefix}/lib'} |
52 | sharedlibdir=${sharedlibdir-'${exec_prefix}/lib'} | ||
52 | includedir=${includedir-'${prefix}/include'} | 53 | includedir=${includedir-'${prefix}/include'} |
53 | mandir=${mandir-'${prefix}/share/man'} | 54 | mandir=${mandir-'${prefix}/share/man'} |
54 | shared_ext='.so' | 55 | shared_ext='.so' |
@@ -147,6 +148,7 @@ if test "$gcc" -eq 1 && ($cc -c $cflags $test.c) 2>/dev/null; then | |||
147 | else | 148 | else |
148 | # find system name and corresponding cc options | 149 | # find system name and corresponding cc options |
149 | CC=${CC-cc} | 150 | CC=${CC-cc} |
151 | gcc=0 | ||
150 | if test -z "$uname"; then | 152 | if test -z "$uname"; then |
151 | uname=`(uname -sr || echo unknown) 2>/dev/null` | 153 | uname=`(uname -sr || echo unknown) 2>/dev/null` |
152 | fi | 154 | fi |
@@ -504,21 +506,26 @@ EOF | |||
504 | fi | 506 | fi |
505 | fi | 507 | fi |
506 | 508 | ||
507 | cat > $test.c <<EOF | 509 | if test "$gcc" -eq 1; then |
508 | int foo __attribute__ ((visibility ("hidden"))); | 510 | cat > $test.c <<EOF |
511 | #if ((__GNUC__-0) * 10 + __GNUC_MINOR__-0 >= 33) | ||
512 | # define ZLIB_INTERNAL __attribute__((visibility ("hidden"))) | ||
513 | #else | ||
514 | # define ZLIB_INTERNAL | ||
515 | #endif | ||
516 | int ZLIB_INTERNAL foo; | ||
509 | int main() | 517 | int main() |
510 | { | 518 | { |
511 | return 0; | 519 | return 0; |
512 | } | 520 | } |
513 | EOF | 521 | EOF |
514 | if test "`($CC -c -fvisibility=hidden $CFLAGS $test.c) 2>&1`" = ""; then | 522 | if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then |
515 | CFLAGS="$CFLAGS -fvisibility=hidden" | 523 | echo "Checking for attribute(visibility) support... Yes." |
516 | SFLAGS="$SFLAGS -fvisibility=hidden" | 524 | else |
517 | echo "Checking for attribute(visibility) support... Yes." | 525 | CFLAGS="$CFLAGS -DNO_VIZ" |
518 | else | 526 | SFLAGS="$SFLAGS -DNO_VIZ" |
519 | CFLAGS="$CFLAGS -DNO_VIZ" | 527 | echo "Checking for attribute(visibility) support... No." |
520 | SFLAGS="$SFLAGS -DNO_VIZ" | 528 | fi |
521 | echo "Checking for attribute(visibility) support... No." | ||
522 | fi | 529 | fi |
523 | 530 | ||
524 | CPP=${CPP-"$CC -E"} | 531 | CPP=${CPP-"$CC -E"} |