diff options
author | Theodore Ts'o <tytso@mit.edu> | 2002-07-14 15:58:38 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2002-07-14 15:58:38 -0400 |
commit | 593c6ead7e3bca412eff2d17edad790de81cb0eb (patch) | |
tree | a08e113be6ce5f40f9656cd2263e41293ec5f9ec /configure | |
parent | f154d2f687e922f8444ef3050dc83f5d8e0e2178 (diff) | |
download | e2fsprogs-593c6ead7e3bca412eff2d17edad790de81cb0eb.tar.gz |
Various portability fixes which should help out HURD.
The iterate_on_dir function in libe2p has been changed to be more
general, so it relies less on the layout of struct dirent. We also
make sure the errno returned by the ioctl is returned by
fgetversion() and fsetversion().
Diffstat (limited to 'configure')
-rw-r--r-- | configure | 119 |
1 files changed, 43 insertions, 76 deletions
@@ -4266,53 +4266,20 @@ fi fi -echo $ac_n "checking whether struct dirent has a d_namlen field""... $ac_c" 1>&6 -echo "configure:4271: checking whether struct dirent has a d_namlen field" >&5 -if eval "test \"`echo '$''{'e2fsprogs_cv_struct_d_namlen'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <<EOF -#line 4276 "configure" -#include "confdefs.h" -#include <sys/types.h> -#include <dirent.h> -int main() { -struct dirent de; de.d_namlen = 0; -; return 0; } -EOF -if { (eval echo configure:4284: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - e2fsprogs_cv_struct_d_namlen=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - e2fsprogs_cv_struct_d_namlen=no -fi -rm -f conftest* -fi - -echo "$ac_t""$e2fsprogs_cv_struct_d_namlen" 1>&6 -if test "$e2fsprogs_cv_struct_d_namlen" = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_DIRENT_NAMLEN 1 -EOF - -fi echo $ac_n "checking whether llseek declared in unistd.h""... $ac_c" 1>&6 -echo "configure:4304: checking whether llseek declared in unistd.h" >&5 +echo "configure:4271: checking whether llseek declared in unistd.h" >&5 if eval "test \"`echo '$''{'e2fsprogs_cv_have_llseek_prototype'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4309 "configure" +#line 4276 "configure" #include "confdefs.h" #include <unistd.h> int main() { extern int llseek(int); ; return 0; } EOF -if { (eval echo configure:4316: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4283: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* e2fsprogs_cv_have_llseek_prototype=no else @@ -4332,12 +4299,12 @@ EOF fi echo $ac_n "checking whether lseek64 declared in unistd.h""... $ac_c" 1>&6 -echo "configure:4336: checking whether lseek64 declared in unistd.h" >&5 +echo "configure:4303: checking whether lseek64 declared in unistd.h" >&5 if eval "test \"`echo '$''{'e2fsprogs_cv_have_lseek64_prototype'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4341 "configure" +#line 4308 "configure" #include "confdefs.h" #define _LARGEFILE_SOURCE #define _LARGEFILE64_SOURCE @@ -4346,7 +4313,7 @@ int main() { extern int lseek64(int); ; return 0; } EOF -if { (eval echo configure:4350: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4317: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* e2fsprogs_cv_have_lseek64_prototype=no else @@ -4374,7 +4341,7 @@ if test "$cross_compiling" = yes -a "$ac_cv_sizeof_long" = ""; then echo "configure: warning: Cross-compiling, so cannot check type sizes; assuming short=2, int=4, long=4, long long=8" 1>&2 fi echo $ac_n "checking size of short""... $ac_c" 1>&6 -echo "configure:4378: checking size of short" >&5 +echo "configure:4345: checking size of short" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4382,7 +4349,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext <<EOF -#line 4386 "configure" +#line 4353 "configure" #include "confdefs.h" #include <stdio.h> #include <sys/types.h> @@ -4394,7 +4361,7 @@ main() exit(0); } EOF -if { (eval echo configure:4398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_short=`cat conftestval` else @@ -4414,7 +4381,7 @@ EOF echo $ac_n "checking size of int""... $ac_c" 1>&6 -echo "configure:4418: checking size of int" >&5 +echo "configure:4385: checking size of int" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4422,7 +4389,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext <<EOF -#line 4426 "configure" +#line 4393 "configure" #include "confdefs.h" #include <stdio.h> #include <sys/types.h> @@ -4434,7 +4401,7 @@ main() exit(0); } EOF -if { (eval echo configure:4438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_int=`cat conftestval` else @@ -4454,7 +4421,7 @@ EOF echo $ac_n "checking size of long""... $ac_c" 1>&6 -echo "configure:4458: checking size of long" >&5 +echo "configure:4425: checking size of long" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4462,7 +4429,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext <<EOF -#line 4466 "configure" +#line 4433 "configure" #include "confdefs.h" #include <stdio.h> #include <sys/types.h> @@ -4474,7 +4441,7 @@ main() exit(0); } EOF -if { (eval echo configure:4478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_long=`cat conftestval` else @@ -4494,7 +4461,7 @@ EOF echo $ac_n "checking size of long long""... $ac_c" 1>&6 -echo "configure:4498: checking size of long long" >&5 +echo "configure:4465: checking size of long long" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4502,7 +4469,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext <<EOF -#line 4506 "configure" +#line 4473 "configure" #include "confdefs.h" #include <stdio.h> #include <sys/types.h> @@ -4514,7 +4481,7 @@ main() exit(0); } EOF -if { (eval echo configure:4518: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_long_long=`cat conftestval` else @@ -4542,14 +4509,14 @@ SIZEOF_LONG_LONG=$ac_cv_sizeof_long_long echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 -echo "configure:4546: checking whether byte ordering is bigendian" >&5 +echo "configure:4513: checking whether byte ordering is bigendian" >&5 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_bigendian=unknown # See if sys/param.h defines the BYTE_ORDER macro. cat > conftest.$ac_ext <<EOF -#line 4553 "configure" +#line 4520 "configure" #include "confdefs.h" #include <sys/types.h> #include <sys/param.h> @@ -4560,11 +4527,11 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:4564: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4531: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* # It does; now see whether it defined to BIG_ENDIAN or not. cat > conftest.$ac_ext <<EOF -#line 4568 "configure" +#line 4535 "configure" #include "confdefs.h" #include <sys/types.h> #include <sys/param.h> @@ -4575,7 +4542,7 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:4579: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4546: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_bigendian=yes else @@ -4595,7 +4562,7 @@ 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 4599 "configure" +#line 4566 "configure" #include "confdefs.h" main () { /* Are we little or big endian? From Harbison&Steele. */ @@ -4608,7 +4575,7 @@ main () { exit (u.c[sizeof (long) - 1] == 1); } EOF -if { (eval echo configure:4612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_bigendian=no else @@ -4632,19 +4599,19 @@ EOF fi echo $ac_n "checking whether struct stat has a st_flags field""... $ac_c" 1>&6 -echo "configure:4636: checking whether struct stat has a st_flags field" >&5 +echo "configure:4603: checking whether struct stat has a st_flags field" >&5 if eval "test \"`echo '$''{'e2fsprogs_cv_struct_st_flags'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4641 "configure" +#line 4608 "configure" #include "confdefs.h" #include <sys/stat.h> int main() { struct stat stat; stat.st_flags = 0; ; return 0; } EOF -if { (eval echo configure:4648: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4615: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* e2fsprogs_cv_struct_st_flags=yes else @@ -4659,19 +4626,19 @@ fi echo "$ac_t""$e2fsprogs_cv_struct_st_flags" 1>&6 if test "$e2fsprogs_cv_struct_st_flags" = yes; then echo $ac_n "checking whether st_flags field is useful""... $ac_c" 1>&6 -echo "configure:4663: checking whether st_flags field is useful" >&5 +echo "configure:4630: checking whether st_flags field is useful" >&5 if eval "test \"`echo '$''{'e2fsprogs_cv_struct_st_flags_immut'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4668 "configure" +#line 4635 "configure" #include "confdefs.h" #include <sys/stat.h> int main() { struct stat stat; stat.st_flags |= UF_IMMUTABLE; ; return 0; } EOF -if { (eval echo configure:4675: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4642: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* e2fsprogs_cv_struct_st_flags_immut=yes else @@ -4691,15 +4658,15 @@ EOF fi fi -for ac_func in chflags getrusage llseek lseek64 open64 getmntinfo strcasecmp srandom fchown mallinfo fdatasync strnlen sysconf +for ac_func in chflags getrusage llseek lseek64 open64 getmntinfo strcasecmp srandom fchown mallinfo fdatasync strnlen sysconf pathconf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4698: checking for $ac_func" >&5 +echo "configure:4665: 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 4703 "configure" +#line 4670 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -4722,7 +4689,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:4726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4693: \"$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 @@ -4748,7 +4715,7 @@ done SOCKET_LIB='' echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 -echo "configure:4752: checking for socket in -lsocket" >&5 +echo "configure:4719: checking for socket in -lsocket" >&5 ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4756,7 +4723,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <<EOF -#line 4760 "configure" +#line 4727 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -4767,7 +4734,7 @@ int main() { socket() ; return 0; } EOF -if { (eval echo configure:4771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4789,12 +4756,12 @@ fi echo $ac_n "checking for optreset""... $ac_c" 1>&6 -echo "configure:4793: checking for optreset" >&5 +echo "configure:4760: checking for optreset" >&5 if eval "test \"`echo '$''{'ac_cv_have_optreset'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4798 "configure" +#line 4765 "configure" #include "confdefs.h" #include <unistd.h> EOF @@ -4866,20 +4833,20 @@ fi echo $ac_n "checking whether linker accepts -static""... $ac_c" 1>&6 -echo "configure:4870: checking whether linker accepts -static" >&5 +echo "configure:4837: checking whether linker accepts -static" >&5 if eval "test \"`echo '$''{'ac_cv_e2fsprogs_use_static'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else SAVE_LDFLAGS=$LDFLAGS; LDFLAGS="$LDFLAGS -static" cat > conftest.$ac_ext <<EOF -#line 4876 "configure" +#line 4843 "configure" #include "confdefs.h" #include <stdio.h> int main() { fflush(stdout); ; return 0; } EOF -if { (eval echo configure:4883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_e2fsprogs_use_static=yes else |