1 diff -u -r ../unzip60/unix/configure ./unix/configure
2 --- ../unzip60/unix/configure 2009-04-16 21:25:12.000000000 +0200
3 +++ ./unix/configure 2017-07-07 08:56:05.197092127 +0200
6 # Check for missing functions
7 # add NO_'function_name' to flags if missing
8 -for func in fchmod fchown lchown nl_langinfo
10 - echo Check for $func
11 - echo "int main(){ $func(); return 0; }" > conftest.c
12 - $CC $BFLAG -o conftest conftest.c >/dev/null 2>/dev/null
13 - [ $? -ne 0 ] && CFLAGSR="${CFLAGSR} -DNO_`echo $func | tr '[a-z]' '[A-Z]'`"
16 -# Check (seriously) for a working lchmod.
17 -echo 'Check for lchmod'
18 -temp_file="/tmp/unzip_test_$$"
20 -( echo '#include <unistd.h>' ; \
21 - echo "int main() { lchmod(\"${temp_file}\", 0666); }" \
23 -ln -s "${temp_link}" "${temp_file}" && \
24 - $CC $BFLAG -o conftest conftest.c >/dev/null 2>/dev/null && \
26 -[ $? -ne 0 ] && CFLAGSR="${CFLAGSR} -DNO_LCHMOD"
29 -echo Check for memset
30 -echo "int main(){ char k; memset(&k,0,0); return 0; }" > conftest.c
31 -$CC -o conftest conftest.c >/dev/null 2>/dev/null
32 -[ $? -ne 0 ] && CFLAGSR="${CFLAGSR} -DZMEM"
34 -echo Check for errno declaration
35 -cat > conftest.c << _EOF_
43 -$CC $CFLAGS -c conftest.c >/dev/null 2>/dev/null
44 -[ $? -ne 0 ] && CFLAGSR="${CFLAGSR} -DNO_ERRNO"
46 -echo Check for directory libraries
47 -cat > conftest.c << _EOF_
48 -int main() { return closedir(opendir(".")); }
51 -$CC -o conftest conftest.c >/dev/null 2>/dev/null
52 -if [ $? -ne 0 ]; then
54 - for lib in ndir dir ucb bsd BSD PW x dirent
56 - $CC -o conftest conftest.c -l$lib >/dev/null 2>/dev/null
57 - [ $? -eq 0 ] && OPT=-l$lib && break
60 - LFLAGS2="${LFLAGS2} ${OPT}"
62 - CFLAGSR="${CFLAGSR} -DNO_DIR"
66 -# Dynix/ptx 1.3 needed this
67 -echo Check for readlink
68 -echo "int main(){ return readlink(); }" > conftest.c
69 -$CC -o conftest conftest.c >/dev/null 2>/dev/null
70 -if [ $? -ne 0 ]; then
71 - $CC -o conftest conftest.c -lseq >/dev/null 2>/dev/null
72 - [ $? -eq 0 ] && LFLAGS2="${LFLAGS2} -lseq"
75 echo Check for directory include file