From 73014202489f913dbffc91d22089ea8a8920c054 Mon Sep 17 00:00:00 2001 From: Mark Adler Date: Fri, 9 Sep 2011 23:34:55 -0700 Subject: zlib 1.2.4.5 --- configure | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) (limited to 'configure') diff --git a/configure b/configure index e729c6c..0344eb4 100755 --- a/configure +++ b/configure @@ -14,7 +14,7 @@ # an error. if [ -n "${CHOST}" ]; then - uname="$(echo "${CHOST}" | sed -e 's/.*-.*-\(.*\)-.*$/\1/' -e 's/.*-\(.*\)-.*/\1/' -e 's/.*-\(.*\)$/\1/')" + uname="$(echo "${CHOST}" | sed -e 's/^[^-]*-\([^-]*\)$/\1/' -e 's/^[^-]*-[^-]*-\([^-]*\)$/\1/' -e 's/^[^-]*-[^-]*-\([^-]*\)-.*$/\1/')" CROSS_PREFIX="${CHOST}-" fi @@ -49,6 +49,7 @@ LDSHAREDLIBC="${LDSHAREDLIBC--lc}" prefix=${prefix-/usr/local} exec_prefix=${exec_prefix-'${prefix}'} libdir=${libdir-'${exec_prefix}/lib'} +sharedlibdir=${sharedlibdir-'${exec_prefix}/lib'} includedir=${includedir-'${prefix}/include'} mandir=${mandir-'${prefix}/share/man'} shared_ext='.so' @@ -147,6 +148,7 @@ if test "$gcc" -eq 1 && ($cc -c $cflags $test.c) 2>/dev/null; then else # find system name and corresponding cc options CC=${CC-cc} + gcc=0 if test -z "$uname"; then uname=`(uname -sr || echo unknown) 2>/dev/null` fi @@ -504,21 +506,26 @@ EOF fi fi -cat > $test.c < $test.c <= 33) +# define ZLIB_INTERNAL __attribute__((visibility ("hidden"))) +#else +# define ZLIB_INTERNAL +#endif +int ZLIB_INTERNAL foo; int main() { return 0; } EOF -if test "`($CC -c -fvisibility=hidden $CFLAGS $test.c) 2>&1`" = ""; then - CFLAGS="$CFLAGS -fvisibility=hidden" - SFLAGS="$SFLAGS -fvisibility=hidden" - echo "Checking for attribute(visibility) support... Yes." -else - CFLAGS="$CFLAGS -DNO_VIZ" - SFLAGS="$SFLAGS -DNO_VIZ" - echo "Checking for attribute(visibility) support... No." + if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then + echo "Checking for attribute(visibility) support... Yes." + else + CFLAGS="$CFLAGS -DNO_VIZ" + SFLAGS="$SFLAGS -DNO_VIZ" + echo "Checking for attribute(visibility) support... No." + fi fi CPP=${CPP-"$CC -E"} -- cgit v1.2.3-55-g6feb