diff options
Diffstat (limited to 'contrib/file/configure')
-rwxr-xr-x | contrib/file/configure | 226 |
1 files changed, 199 insertions, 27 deletions
diff --git a/contrib/file/configure b/contrib/file/configure index 6488d5f..bfa48ba 100755 --- a/contrib/file/configure +++ b/contrib/file/configure @@ -697,7 +697,7 @@ fi PACKAGE=file -VERSION=3.36 +VERSION=3.37 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; } @@ -1802,14 +1802,186 @@ EOF fi +echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 +echo "configure:1807: checking whether struct tm is in sys/time.h or time.h" >&5 +if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 1812 "configure" +#include "confdefs.h" +#include <sys/types.h> +#include <time.h> +int main() { +struct tm *tp; tp->tm_sec; +; return 0; } +EOF +if { (eval echo configure:1820: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_struct_tm=time.h +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_struct_tm=sys/time.h +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_struct_tm" 1>&6 +if test $ac_cv_struct_tm = sys/time.h; then + cat >> confdefs.h <<\EOF +#define TM_IN_SYS_TIME 1 +EOF + +fi + +echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6 +echo "configure:1841: checking for tm_zone in struct tm" >&5 +if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 1846 "configure" +#include "confdefs.h" +#include <sys/types.h> +#include <$ac_cv_struct_tm> +int main() { +struct tm tm; tm.tm_zone; +; return 0; } +EOF +if { (eval echo configure:1854: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_struct_tm_zone=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_struct_tm_zone=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6 +if test "$ac_cv_struct_tm_zone" = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_TM_ZONE 1 +EOF + +fi +echo $ac_n "checking for tzname""... $ac_c" 1>&6 +echo "configure:1874: checking for tzname" >&5 +if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 1879 "configure" +#include "confdefs.h" +#include <time.h> +#ifndef tzname /* For SGI. */ +extern char *tzname[]; /* RS6000 and others reject char **tzname. */ +#endif +int main() { +atoi(*tzname); +; return 0; } +EOF +if { (eval echo configure:1889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ac_cv_var_tzname=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_var_tzname=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_var_tzname" 1>&6 + if test $ac_cv_var_tzname = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_TZNAME 1 +EOF + + fi + +echo $ac_n "checking for tm_isdst in struct tm""... $ac_c" 1>&6 +echo "configure:1910: checking for tm_isdst in struct tm" >&5 +if eval "test \"`echo '$''{'ac_cv_struct_tm_isdst'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 1915 "configure" +#include "confdefs.h" +#include <sys/types.h> +#include <$ac_cv_struct_tm> +int main() { +struct tm tm; tm.tm_isdst; +; return 0; } +EOF +if { (eval echo configure:1923: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_struct_tm_isdst=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_struct_tm_isdst=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_struct_tm_isdst" 1>&6 +if test "$ac_cv_struct_tm_isdst" = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_TM_ISDST 1 +EOF + +fi +echo $ac_n "checking for daylight""... $ac_c" 1>&6 +echo "configure:1943: checking for daylight" >&5 +if eval "test \"`echo '$''{'ac_cv_var_daylight'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 1948 "configure" +#include "confdefs.h" +#include <time.h> +#ifndef daylight /* In case IRIX #defines this, too */ +extern int daylight; +#endif +int main() { +atoi(daylight); +; return 0; } +EOF +if { (eval echo configure:1958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ac_cv_var_daylight=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_var_daylight=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_var_daylight" 1>&6 + if test $ac_cv_var_daylight = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_DAYLIGHT 1 +EOF + + fi + echo $ac_n "checking for uint8_t""... $ac_c" 1>&6 -echo "configure:1808: checking for uint8_t" >&5 +echo "configure:1980: checking for uint8_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_uint8_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1813 "configure" +#line 1985 "configure" #include "confdefs.h" #include <sys/types.h> #if STDC_HEADERS @@ -1837,12 +2009,12 @@ EOF fi echo $ac_n "checking for uint16_t""... $ac_c" 1>&6 -echo "configure:1841: checking for uint16_t" >&5 +echo "configure:2013: checking for uint16_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_uint16_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1846 "configure" +#line 2018 "configure" #include "confdefs.h" #include <sys/types.h> #if STDC_HEADERS @@ -1870,12 +2042,12 @@ EOF fi echo $ac_n "checking for uint32_t""... $ac_c" 1>&6 -echo "configure:1874: checking for uint32_t" >&5 +echo "configure:2046: checking for uint32_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_uint32_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1879 "configure" +#line 2051 "configure" #include "confdefs.h" #include <sys/types.h> #if STDC_HEADERS @@ -1904,7 +2076,7 @@ fi echo $ac_n "checking for long long""... $ac_c" 1>&6 -echo "configure:1908: checking for long long" >&5 +echo "configure:2080: checking for long long" >&5 if eval "test \"`echo '$''{'ac_cv_c_long_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1915,13 +2087,13 @@ if test "$cross_compiling" = yes; then { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext <<EOF -#line 1919 "configure" +#line 2091 "configure" #include "confdefs.h" int main() { long long foo = 0; exit(sizeof(long long) < sizeof(long)); } EOF -if { (eval echo configure:1925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_long_long=yes else @@ -1950,12 +2122,12 @@ else long64='unsigned long'; fi echo $ac_n "checking for uint64_t""... $ac_c" 1>&6 -echo "configure:1954: checking for uint64_t" >&5 +echo "configure:2126: checking for uint64_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_uint64_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1959 "configure" +#line 2131 "configure" #include "confdefs.h" #include <sys/types.h> #if STDC_HEADERS @@ -1986,7 +2158,7 @@ fi echo $ac_n "checking size of uint8_t""... $ac_c" 1>&6 -echo "configure:1990: checking size of uint8_t" >&5 +echo "configure:2162: checking size of uint8_t" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_uint8_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1994,7 +2166,7 @@ else ac_cv_sizeof_uint8_t=0 else cat > conftest.$ac_ext <<EOF -#line 1998 "configure" +#line 2170 "configure" #include "confdefs.h" #include <sys/types.h> #ifdef STDC_HEADERS @@ -2010,7 +2182,7 @@ main() exit(0); } EOF -if { (eval echo configure:2014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_uint8_t=`cat conftestval` else @@ -2031,7 +2203,7 @@ EOF echo $ac_n "checking size of uint16_t""... $ac_c" 1>&6 -echo "configure:2035: checking size of uint16_t" >&5 +echo "configure:2207: checking size of uint16_t" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_uint16_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2039,7 +2211,7 @@ else ac_cv_sizeof_uint16_t=0 else cat > conftest.$ac_ext <<EOF -#line 2043 "configure" +#line 2215 "configure" #include "confdefs.h" #include <sys/types.h> #ifdef STDC_HEADERS @@ -2055,7 +2227,7 @@ main() exit(0); } EOF -if { (eval echo configure:2059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2231: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_uint16_t=`cat conftestval` else @@ -2076,7 +2248,7 @@ EOF echo $ac_n "checking size of uint32_t""... $ac_c" 1>&6 -echo "configure:2080: checking size of uint32_t" >&5 +echo "configure:2252: checking size of uint32_t" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_uint32_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2084,7 +2256,7 @@ else ac_cv_sizeof_uint32_t=0 else cat > conftest.$ac_ext <<EOF -#line 2088 "configure" +#line 2260 "configure" #include "confdefs.h" #include <sys/types.h> #ifdef STDC_HEADERS @@ -2100,7 +2272,7 @@ main() exit(0); } EOF -if { (eval echo configure:2104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_uint32_t=`cat conftestval` else @@ -2121,7 +2293,7 @@ EOF echo $ac_n "checking size of uint64_t""... $ac_c" 1>&6 -echo "configure:2125: checking size of uint64_t" >&5 +echo "configure:2297: checking size of uint64_t" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_uint64_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2129,7 +2301,7 @@ else ac_cv_sizeof_uint64_t=0 else cat > conftest.$ac_ext <<EOF -#line 2133 "configure" +#line 2305 "configure" #include "confdefs.h" #include <sys/types.h> #ifdef STDC_HEADERS @@ -2145,7 +2317,7 @@ main() exit(0); } EOF -if { (eval echo configure:2149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_uint64_t=`cat conftestval` else @@ -2169,12 +2341,12 @@ EOF for ac_func in mmap strerror strtoul do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2173: checking for $ac_func" >&5 +echo "configure:2345: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2178 "configure" +#line 2350 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -2197,7 +2369,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:2201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else |