diff options
| author | Paul Eggert | 2011-03-01 21:25:09 -0800 |
|---|---|---|
| committer | Paul Eggert | 2011-03-01 21:25:09 -0800 |
| commit | 6c0dea8a89bdfbdad454a9609f0bed8db4c9fccf (patch) | |
| tree | fbde0220480ce4d37903e98c74c5103a0f320f16 /configure | |
| parent | 8889f4e2c332b0ecedc9e6088252f4cbae301236 (diff) | |
| parent | 4a8b879b87962d5f37c05d3650f43cc571b22bc7 (diff) | |
| download | emacs-6c0dea8a89bdfbdad454a9609f0bed8db4c9fccf.tar.gz emacs-6c0dea8a89bdfbdad454a9609f0bed8db4c9fccf.zip | |
Merge: Work around some portability problems with symlinks.
Diffstat (limited to 'configure')
| -rwxr-xr-x | configure | 602 |
1 files changed, 504 insertions, 98 deletions
| @@ -679,38 +679,6 @@ NEXT_AS_FIRST_DIRECTIVE_TIME_H | |||
| 679 | NEXT_TIME_H | 679 | NEXT_TIME_H |
| 680 | NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H | 680 | NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H |
| 681 | NEXT_SYS_STAT_H | 681 | NEXT_SYS_STAT_H |
| 682 | REPLACE_UTIMENSAT | ||
| 683 | REPLACE_STAT | ||
| 684 | REPLACE_MKNOD | ||
| 685 | REPLACE_MKFIFO | ||
| 686 | REPLACE_MKDIR | ||
| 687 | REPLACE_LSTAT | ||
| 688 | REPLACE_FUTIMENS | ||
| 689 | REPLACE_FSTATAT | ||
| 690 | REPLACE_FSTAT | ||
| 691 | HAVE_UTIMENSAT | ||
| 692 | HAVE_MKNODAT | ||
| 693 | HAVE_MKNOD | ||
| 694 | HAVE_MKFIFOAT | ||
| 695 | HAVE_MKFIFO | ||
| 696 | HAVE_MKDIRAT | ||
| 697 | HAVE_LSTAT | ||
| 698 | HAVE_LCHMOD | ||
| 699 | HAVE_FUTIMENS | ||
| 700 | HAVE_FSTATAT | ||
| 701 | HAVE_FCHMODAT | ||
| 702 | GNULIB_UTIMENSAT | ||
| 703 | GNULIB_STAT | ||
| 704 | GNULIB_MKNODAT | ||
| 705 | GNULIB_MKNOD | ||
| 706 | GNULIB_MKFIFOAT | ||
| 707 | GNULIB_MKFIFO | ||
| 708 | GNULIB_MKDIRAT | ||
| 709 | GNULIB_LSTAT | ||
| 710 | GNULIB_LCHMOD | ||
| 711 | GNULIB_FUTIMENS | ||
| 712 | GNULIB_FSTATAT | ||
| 713 | GNULIB_FCHMODAT | ||
| 714 | NEXT_AS_FIRST_DIRECTIVE_STDLIB_H | 682 | NEXT_AS_FIRST_DIRECTIVE_STDLIB_H |
| 715 | NEXT_STDLIB_H | 683 | NEXT_STDLIB_H |
| 716 | STDINT_H | 684 | STDINT_H |
| @@ -758,6 +726,38 @@ GNULIB_TIMEGM | |||
| 758 | GNULIB_STRPTIME | 726 | GNULIB_STRPTIME |
| 759 | GNULIB_NANOSLEEP | 727 | GNULIB_NANOSLEEP |
| 760 | GNULIB_MKTIME | 728 | GNULIB_MKTIME |
| 729 | REPLACE_UTIMENSAT | ||
| 730 | REPLACE_STAT | ||
| 731 | REPLACE_MKNOD | ||
| 732 | REPLACE_MKFIFO | ||
| 733 | REPLACE_MKDIR | ||
| 734 | REPLACE_LSTAT | ||
| 735 | REPLACE_FUTIMENS | ||
| 736 | REPLACE_FSTATAT | ||
| 737 | REPLACE_FSTAT | ||
| 738 | HAVE_UTIMENSAT | ||
| 739 | HAVE_MKNODAT | ||
| 740 | HAVE_MKNOD | ||
| 741 | HAVE_MKFIFOAT | ||
| 742 | HAVE_MKFIFO | ||
| 743 | HAVE_MKDIRAT | ||
| 744 | HAVE_LSTAT | ||
| 745 | HAVE_LCHMOD | ||
| 746 | HAVE_FUTIMENS | ||
| 747 | HAVE_FSTATAT | ||
| 748 | HAVE_FCHMODAT | ||
| 749 | GNULIB_UTIMENSAT | ||
| 750 | GNULIB_STAT | ||
| 751 | GNULIB_MKNODAT | ||
| 752 | GNULIB_MKNOD | ||
| 753 | GNULIB_MKFIFOAT | ||
| 754 | GNULIB_MKFIFO | ||
| 755 | GNULIB_MKDIRAT | ||
| 756 | GNULIB_LSTAT | ||
| 757 | GNULIB_LCHMOD | ||
| 758 | GNULIB_FUTIMENS | ||
| 759 | GNULIB_FSTATAT | ||
| 760 | GNULIB_FCHMODAT | ||
| 761 | LTLIBINTL | 761 | LTLIBINTL |
| 762 | LIBINTL | 762 | LIBINTL |
| 763 | GETOPT_H | 763 | GETOPT_H |
| @@ -1165,9 +1165,6 @@ LDFLAGS | |||
| 1165 | LIBS | 1165 | LIBS |
| 1166 | CPPFLAGS | 1166 | CPPFLAGS |
| 1167 | CPP | 1167 | CPP |
| 1168 | CPPFLAGS | ||
| 1169 | CPP | ||
| 1170 | CPPFLAGS | ||
| 1171 | XMKMF' | 1168 | XMKMF' |
| 1172 | 1169 | ||
| 1173 | 1170 | ||
| @@ -2960,14 +2957,16 @@ as_fn_append ac_header_list " unistd.h" | |||
| 2960 | as_fn_append ac_header_list " sys/param.h" | 2957 | as_fn_append ac_header_list " sys/param.h" |
| 2961 | gl_getopt_required=GNU | 2958 | gl_getopt_required=GNU |
| 2962 | as_fn_append ac_header_list " getopt.h" | 2959 | as_fn_append ac_header_list " getopt.h" |
| 2960 | as_fn_append ac_func_list " lstat" | ||
| 2963 | as_fn_append ac_func_list " alarm" | 2961 | as_fn_append ac_func_list " alarm" |
| 2962 | as_fn_append ac_func_list " readlink" | ||
| 2964 | as_fn_append ac_header_list " wchar.h" | 2963 | as_fn_append ac_header_list " wchar.h" |
| 2965 | as_fn_append ac_header_list " stdint.h" | 2964 | as_fn_append ac_header_list " stdint.h" |
| 2966 | as_fn_append ac_func_list " tzset" | 2965 | as_fn_append ac_func_list " tzset" |
| 2966 | as_fn_append ac_func_list " symlink" | ||
| 2967 | as_fn_append ac_header_list " sys/stat.h" | 2967 | as_fn_append ac_header_list " sys/stat.h" |
| 2968 | as_fn_append ac_header_list " sys/time.h" | 2968 | as_fn_append ac_header_list " sys/time.h" |
| 2969 | as_fn_append ac_func_list " localtime_r" | 2969 | as_fn_append ac_func_list " localtime_r" |
| 2970 | as_fn_append ac_func_list " lstat" | ||
| 2971 | # Check that the precious variables saved in the cache have kept the same | 2970 | # Check that the precious variables saved in the cache have kept the same |
| 2972 | # value. | 2971 | # value. |
| 2973 | ac_cache_corrupted=false | 2972 | ac_cache_corrupted=false |
| @@ -6126,6 +6125,7 @@ $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } | |||
| 6126 | # Code from module arg-nonnull: | 6125 | # Code from module arg-nonnull: |
| 6127 | # Code from module c++defs: | 6126 | # Code from module c++defs: |
| 6128 | # Code from module crypto/md5: | 6127 | # Code from module crypto/md5: |
| 6128 | # Code from module dosname: | ||
| 6129 | # Code from module dtoastr: | 6129 | # Code from module dtoastr: |
| 6130 | # Code from module extensions: | 6130 | # Code from module extensions: |
| 6131 | 6131 | ||
| @@ -6137,13 +6137,17 @@ $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } | |||
| 6137 | # Code from module ignore-value: | 6137 | # Code from module ignore-value: |
| 6138 | # Code from module include_next: | 6138 | # Code from module include_next: |
| 6139 | # Code from module intprops: | 6139 | # Code from module intprops: |
| 6140 | # Code from module lstat: | ||
| 6140 | # Code from module mktime: | 6141 | # Code from module mktime: |
| 6141 | # Code from module multiarch: | 6142 | # Code from module multiarch: |
| 6143 | # Code from module readlink: | ||
| 6144 | # Code from module stat: | ||
| 6142 | # Code from module stdbool: | 6145 | # Code from module stdbool: |
| 6143 | # Code from module stddef: | 6146 | # Code from module stddef: |
| 6144 | # Code from module stdint: | 6147 | # Code from module stdint: |
| 6145 | # Code from module stdlib: | 6148 | # Code from module stdlib: |
| 6146 | # Code from module strftime: | 6149 | # Code from module strftime: |
| 6150 | # Code from module symlink: | ||
| 6147 | # Code from module sys_stat: | 6151 | # Code from module sys_stat: |
| 6148 | # Code from module time: | 6152 | # Code from module time: |
| 6149 | # Code from module time_r: | 6153 | # Code from module time_r: |
| @@ -14500,19 +14504,38 @@ fi | |||
| 14500 | 14504 | ||
| 14501 | 14505 | ||
| 14502 | 14506 | ||
| 14503 | GNULIB_MKTIME=0; | 14507 | GNULIB_FCHMODAT=0; |
| 14504 | GNULIB_NANOSLEEP=0; | 14508 | GNULIB_FSTATAT=0; |
| 14505 | GNULIB_STRPTIME=0; | 14509 | GNULIB_FUTIMENS=0; |
| 14506 | GNULIB_TIMEGM=0; | 14510 | GNULIB_LCHMOD=0; |
| 14507 | GNULIB_TIME_R=0; | 14511 | GNULIB_LSTAT=0; |
| 14508 | HAVE_DECL_LOCALTIME_R=1; | 14512 | GNULIB_MKDIRAT=0; |
| 14509 | HAVE_NANOSLEEP=1; | 14513 | GNULIB_MKFIFO=0; |
| 14510 | HAVE_STRPTIME=1; | 14514 | GNULIB_MKFIFOAT=0; |
| 14511 | HAVE_TIMEGM=1; | 14515 | GNULIB_MKNOD=0; |
| 14512 | REPLACE_LOCALTIME_R=GNULIB_PORTCHECK; | 14516 | GNULIB_MKNODAT=0; |
| 14513 | REPLACE_MKTIME=GNULIB_PORTCHECK; | 14517 | GNULIB_STAT=0; |
| 14514 | REPLACE_NANOSLEEP=GNULIB_PORTCHECK; | 14518 | GNULIB_UTIMENSAT=0; |
| 14515 | REPLACE_TIMEGM=GNULIB_PORTCHECK; | 14519 | HAVE_FCHMODAT=1; |
| 14520 | HAVE_FSTATAT=1; | ||
| 14521 | HAVE_FUTIMENS=1; | ||
| 14522 | HAVE_LCHMOD=1; | ||
| 14523 | HAVE_LSTAT=1; | ||
| 14524 | HAVE_MKDIRAT=1; | ||
| 14525 | HAVE_MKFIFO=1; | ||
| 14526 | HAVE_MKFIFOAT=1; | ||
| 14527 | HAVE_MKNOD=1; | ||
| 14528 | HAVE_MKNODAT=1; | ||
| 14529 | HAVE_UTIMENSAT=1; | ||
| 14530 | REPLACE_FSTAT=0; | ||
| 14531 | REPLACE_FSTATAT=0; | ||
| 14532 | REPLACE_FUTIMENS=0; | ||
| 14533 | REPLACE_LSTAT=0; | ||
| 14534 | REPLACE_MKDIR=0; | ||
| 14535 | REPLACE_MKFIFO=0; | ||
| 14536 | REPLACE_MKNOD=0; | ||
| 14537 | REPLACE_STAT=0; | ||
| 14538 | REPLACE_UTIMENSAT=0; | ||
| 14516 | 14539 | ||
| 14517 | 14540 | ||
| 14518 | 14541 | ||
| @@ -14532,6 +14555,93 @@ done | |||
| 14532 | 14555 | ||
| 14533 | 14556 | ||
| 14534 | 14557 | ||
| 14558 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5 | ||
| 14559 | $as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; } | ||
| 14560 | if ${ac_cv_func_lstat_dereferences_slashed_symlink+:} false; then : | ||
| 14561 | $as_echo_n "(cached) " >&6 | ||
| 14562 | else | ||
| 14563 | rm -f conftest.sym conftest.file | ||
| 14564 | echo >conftest.file | ||
| 14565 | if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then | ||
| 14566 | if test "$cross_compiling" = yes; then : | ||
| 14567 | # When cross-compiling, be pessimistic so we will end up using the | ||
| 14568 | # replacement version of lstat that checks for trailing slashes and | ||
| 14569 | # calls lstat a second time when necessary. | ||
| 14570 | ac_cv_func_lstat_dereferences_slashed_symlink=no | ||
| 14571 | |||
| 14572 | else | ||
| 14573 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
| 14574 | /* end confdefs.h. */ | ||
| 14575 | $ac_includes_default | ||
| 14576 | int | ||
| 14577 | main () | ||
| 14578 | { | ||
| 14579 | struct stat sbuf; | ||
| 14580 | /* Linux will dereference the symlink and fail, as required by | ||
| 14581 | POSIX. That is better in the sense that it means we will not | ||
| 14582 | have to compile and use the lstat wrapper. */ | ||
| 14583 | return lstat ("conftest.sym/", &sbuf) == 0; | ||
| 14584 | |||
| 14585 | ; | ||
| 14586 | return 0; | ||
| 14587 | } | ||
| 14588 | _ACEOF | ||
| 14589 | if ac_fn_c_try_run "$LINENO"; then : | ||
| 14590 | ac_cv_func_lstat_dereferences_slashed_symlink=yes | ||
| 14591 | else | ||
| 14592 | ac_cv_func_lstat_dereferences_slashed_symlink=no | ||
| 14593 | fi | ||
| 14594 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | ||
| 14595 | conftest.$ac_objext conftest.beam conftest.$ac_ext | ||
| 14596 | fi | ||
| 14597 | |||
| 14598 | else | ||
| 14599 | # If the 'ln -s' command failed, then we probably don't even | ||
| 14600 | # have an lstat function. | ||
| 14601 | ac_cv_func_lstat_dereferences_slashed_symlink=no | ||
| 14602 | fi | ||
| 14603 | rm -f conftest.sym conftest.file | ||
| 14604 | |||
| 14605 | fi | ||
| 14606 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_lstat_dereferences_slashed_symlink" >&5 | ||
| 14607 | $as_echo "$ac_cv_func_lstat_dereferences_slashed_symlink" >&6; } | ||
| 14608 | test $ac_cv_func_lstat_dereferences_slashed_symlink = yes && | ||
| 14609 | |||
| 14610 | cat >>confdefs.h <<_ACEOF | ||
| 14611 | #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 | ||
| 14612 | _ACEOF | ||
| 14613 | |||
| 14614 | if test "x$ac_cv_func_lstat_dereferences_slashed_symlink" = xno; then | ||
| 14615 | |||
| 14616 | |||
| 14617 | |||
| 14618 | |||
| 14619 | |||
| 14620 | |||
| 14621 | |||
| 14622 | |||
| 14623 | gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext" | ||
| 14624 | |||
| 14625 | fi | ||
| 14626 | |||
| 14627 | |||
| 14628 | GNULIB_MKTIME=0; | ||
| 14629 | GNULIB_NANOSLEEP=0; | ||
| 14630 | GNULIB_STRPTIME=0; | ||
| 14631 | GNULIB_TIMEGM=0; | ||
| 14632 | GNULIB_TIME_R=0; | ||
| 14633 | HAVE_DECL_LOCALTIME_R=1; | ||
| 14634 | HAVE_NANOSLEEP=1; | ||
| 14635 | HAVE_STRPTIME=1; | ||
| 14636 | HAVE_TIMEGM=1; | ||
| 14637 | REPLACE_LOCALTIME_R=GNULIB_PORTCHECK; | ||
| 14638 | REPLACE_MKTIME=GNULIB_PORTCHECK; | ||
| 14639 | REPLACE_NANOSLEEP=GNULIB_PORTCHECK; | ||
| 14640 | REPLACE_TIMEGM=GNULIB_PORTCHECK; | ||
| 14641 | |||
| 14642 | |||
| 14643 | |||
| 14644 | |||
| 14535 | gl_cv_c_multiarch=no | 14645 | gl_cv_c_multiarch=no |
| 14536 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | 14646 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 14537 | /* end confdefs.h. */ | 14647 | /* end confdefs.h. */ |
| @@ -14573,6 +14683,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |||
| 14573 | fi | 14683 | fi |
| 14574 | 14684 | ||
| 14575 | 14685 | ||
| 14686 | |||
| 14687 | |||
| 14576 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5 | 14688 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5 |
| 14577 | $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; } | 14689 | $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; } |
| 14578 | if ${ac_cv_header_stdbool_h+:} false; then : | 14690 | if ${ac_cv_header_stdbool_h+:} false; then : |
| @@ -14832,38 +14944,6 @@ fi | |||
| 14832 | 14944 | ||
| 14833 | 14945 | ||
| 14834 | 14946 | ||
| 14835 | GNULIB_FCHMODAT=0; | ||
| 14836 | GNULIB_FSTATAT=0; | ||
| 14837 | GNULIB_FUTIMENS=0; | ||
| 14838 | GNULIB_LCHMOD=0; | ||
| 14839 | GNULIB_LSTAT=0; | ||
| 14840 | GNULIB_MKDIRAT=0; | ||
| 14841 | GNULIB_MKFIFO=0; | ||
| 14842 | GNULIB_MKFIFOAT=0; | ||
| 14843 | GNULIB_MKNOD=0; | ||
| 14844 | GNULIB_MKNODAT=0; | ||
| 14845 | GNULIB_STAT=0; | ||
| 14846 | GNULIB_UTIMENSAT=0; | ||
| 14847 | HAVE_FCHMODAT=1; | ||
| 14848 | HAVE_FSTATAT=1; | ||
| 14849 | HAVE_FUTIMENS=1; | ||
| 14850 | HAVE_LCHMOD=1; | ||
| 14851 | HAVE_LSTAT=1; | ||
| 14852 | HAVE_MKDIRAT=1; | ||
| 14853 | HAVE_MKFIFO=1; | ||
| 14854 | HAVE_MKFIFOAT=1; | ||
| 14855 | HAVE_MKNOD=1; | ||
| 14856 | HAVE_MKNODAT=1; | ||
| 14857 | HAVE_UTIMENSAT=1; | ||
| 14858 | REPLACE_FSTAT=0; | ||
| 14859 | REPLACE_FSTATAT=0; | ||
| 14860 | REPLACE_FUTIMENS=0; | ||
| 14861 | REPLACE_LSTAT=0; | ||
| 14862 | REPLACE_MKDIR=0; | ||
| 14863 | REPLACE_MKFIFO=0; | ||
| 14864 | REPLACE_MKNOD=0; | ||
| 14865 | REPLACE_STAT=0; | ||
| 14866 | REPLACE_UTIMENSAT=0; | ||
| 14867 | 14947 | ||
| 14868 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5 | 14948 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5 |
| 14869 | $as_echo_n "checking whether stat file-mode macros are broken... " >&6; } | 14949 | $as_echo_n "checking whether stat file-mode macros are broken... " >&6; } |
| @@ -15169,6 +15249,7 @@ fi | |||
| 15169 | 15249 | ||
| 15170 | : | 15250 | : |
| 15171 | 15251 | ||
| 15252 | # Code from module dosname: | ||
| 15172 | # Code from module dtoastr: | 15253 | # Code from module dtoastr: |
| 15173 | 15254 | ||
| 15174 | # Code from module extensions: | 15255 | # Code from module extensions: |
| @@ -15776,6 +15857,28 @@ fi | |||
| 15776 | 15857 | ||
| 15777 | # Code from module include_next: | 15858 | # Code from module include_next: |
| 15778 | # Code from module intprops: | 15859 | # Code from module intprops: |
| 15860 | # Code from module lstat: | ||
| 15861 | |||
| 15862 | |||
| 15863 | |||
| 15864 | if test $ac_cv_func_lstat = yes; then | ||
| 15865 | |||
| 15866 | if test $ac_cv_func_lstat_dereferences_slashed_symlink = no; then | ||
| 15867 | REPLACE_LSTAT=1 | ||
| 15868 | fi | ||
| 15869 | # Prerequisites of lib/lstat.c. | ||
| 15870 | |||
| 15871 | else | ||
| 15872 | HAVE_LSTAT=0 | ||
| 15873 | fi | ||
| 15874 | |||
| 15875 | |||
| 15876 | |||
| 15877 | |||
| 15878 | GNULIB_LSTAT=1 | ||
| 15879 | |||
| 15880 | |||
| 15881 | |||
| 15779 | # Code from module mktime: | 15882 | # Code from module mktime: |
| 15780 | 15883 | ||
| 15781 | 15884 | ||
| @@ -16033,6 +16136,246 @@ fi | |||
| 16033 | 16136 | ||
| 16034 | # Code from module multiarch: | 16137 | # Code from module multiarch: |
| 16035 | 16138 | ||
| 16139 | # Code from module readlink: | ||
| 16140 | |||
| 16141 | |||
| 16142 | |||
| 16143 | if test $ac_cv_func_readlink = no; then | ||
| 16144 | HAVE_READLINK=0 | ||
| 16145 | |||
| 16146 | |||
| 16147 | |||
| 16148 | |||
| 16149 | |||
| 16150 | |||
| 16151 | |||
| 16152 | |||
| 16153 | gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext" | ||
| 16154 | |||
| 16155 | |||
| 16156 | : | ||
| 16157 | |||
| 16158 | else | ||
| 16159 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5 | ||
| 16160 | $as_echo_n "checking whether readlink signature is correct... " >&6; } | ||
| 16161 | if ${gl_cv_decl_readlink_works+:} false; then : | ||
| 16162 | $as_echo_n "(cached) " >&6 | ||
| 16163 | else | ||
| 16164 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
| 16165 | /* end confdefs.h. */ | ||
| 16166 | #include <unistd.h> | ||
| 16167 | /* Cause compilation failure if original declaration has wrong type. */ | ||
| 16168 | ssize_t readlink (const char *, char *, size_t); | ||
| 16169 | int | ||
| 16170 | main () | ||
| 16171 | { | ||
| 16172 | |||
| 16173 | ; | ||
| 16174 | return 0; | ||
| 16175 | } | ||
| 16176 | _ACEOF | ||
| 16177 | if ac_fn_c_try_compile "$LINENO"; then : | ||
| 16178 | gl_cv_decl_readlink_works=yes | ||
| 16179 | else | ||
| 16180 | gl_cv_decl_readlink_works=no | ||
| 16181 | fi | ||
| 16182 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | ||
| 16183 | fi | ||
| 16184 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5 | ||
| 16185 | $as_echo "$gl_cv_decl_readlink_works" >&6; } | ||
| 16186 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5 | ||
| 16187 | $as_echo_n "checking whether readlink handles trailing slash correctly... " >&6; } | ||
| 16188 | if ${gl_cv_func_readlink_works+:} false; then : | ||
| 16189 | $as_echo_n "(cached) " >&6 | ||
| 16190 | else | ||
| 16191 | # We have readlink, so assume ln -s works. | ||
| 16192 | ln -s conftest.no-such conftest.link | ||
| 16193 | ln -s conftest.link conftest.lnk2 | ||
| 16194 | if test "$cross_compiling" = yes; then : | ||
| 16195 | gl_cv_func_readlink_works="guessing no" | ||
| 16196 | else | ||
| 16197 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
| 16198 | /* end confdefs.h. */ | ||
| 16199 | #include <unistd.h> | ||
| 16200 | |||
| 16201 | int | ||
| 16202 | main () | ||
| 16203 | { | ||
| 16204 | char buf[20]; | ||
| 16205 | return readlink ("conftest.lnk2/", buf, sizeof buf) != -1; | ||
| 16206 | ; | ||
| 16207 | return 0; | ||
| 16208 | } | ||
| 16209 | _ACEOF | ||
| 16210 | if ac_fn_c_try_run "$LINENO"; then : | ||
| 16211 | gl_cv_func_readlink_works=yes | ||
| 16212 | else | ||
| 16213 | gl_cv_func_readlink_works=no | ||
| 16214 | fi | ||
| 16215 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | ||
| 16216 | conftest.$ac_objext conftest.beam conftest.$ac_ext | ||
| 16217 | fi | ||
| 16218 | |||
| 16219 | rm -f conftest.link conftest.lnk2 | ||
| 16220 | fi | ||
| 16221 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_works" >&5 | ||
| 16222 | $as_echo "$gl_cv_func_readlink_works" >&6; } | ||
| 16223 | if test "$gl_cv_func_readlink_works" != yes; then | ||
| 16224 | |||
| 16225 | $as_echo "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h | ||
| 16226 | |||
| 16227 | REPLACE_READLINK=1 | ||
| 16228 | |||
| 16229 | |||
| 16230 | |||
| 16231 | |||
| 16232 | |||
| 16233 | |||
| 16234 | |||
| 16235 | |||
| 16236 | gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext" | ||
| 16237 | |||
| 16238 | elif test "$gl_cv_decl_readlink_works" != yes; then | ||
| 16239 | REPLACE_READLINK=1 | ||
| 16240 | |||
| 16241 | |||
| 16242 | |||
| 16243 | |||
| 16244 | |||
| 16245 | |||
| 16246 | |||
| 16247 | |||
| 16248 | gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext" | ||
| 16249 | |||
| 16250 | fi | ||
| 16251 | fi | ||
| 16252 | |||
| 16253 | |||
| 16254 | |||
| 16255 | |||
| 16256 | GNULIB_READLINK=1 | ||
| 16257 | |||
| 16258 | |||
| 16259 | |||
| 16260 | # Code from module stat: | ||
| 16261 | |||
| 16262 | |||
| 16263 | |||
| 16264 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on directories" >&5 | ||
| 16265 | $as_echo_n "checking whether stat handles trailing slashes on directories... " >&6; } | ||
| 16266 | if ${gl_cv_func_stat_dir_slash+:} false; then : | ||
| 16267 | $as_echo_n "(cached) " >&6 | ||
| 16268 | else | ||
| 16269 | if test "$cross_compiling" = yes; then : | ||
| 16270 | case $host_os in | ||
| 16271 | mingw*) gl_cv_func_stat_dir_slash="guessing no";; | ||
| 16272 | *) gl_cv_func_stat_dir_slash="guessing yes";; | ||
| 16273 | esac | ||
| 16274 | else | ||
| 16275 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
| 16276 | /* end confdefs.h. */ | ||
| 16277 | #include <sys/stat.h> | ||
| 16278 | |||
| 16279 | int | ||
| 16280 | main () | ||
| 16281 | { | ||
| 16282 | struct stat st; return stat (".", &st) != stat ("./", &st); | ||
| 16283 | ; | ||
| 16284 | return 0; | ||
| 16285 | } | ||
| 16286 | _ACEOF | ||
| 16287 | if ac_fn_c_try_run "$LINENO"; then : | ||
| 16288 | gl_cv_func_stat_dir_slash=yes | ||
| 16289 | else | ||
| 16290 | gl_cv_func_stat_dir_slash=no | ||
| 16291 | fi | ||
| 16292 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | ||
| 16293 | conftest.$ac_objext conftest.beam conftest.$ac_ext | ||
| 16294 | fi | ||
| 16295 | |||
| 16296 | fi | ||
| 16297 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_dir_slash" >&5 | ||
| 16298 | $as_echo "$gl_cv_func_stat_dir_slash" >&6; } | ||
| 16299 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5 | ||
| 16300 | $as_echo_n "checking whether stat handles trailing slashes on files... " >&6; } | ||
| 16301 | if ${gl_cv_func_stat_file_slash+:} false; then : | ||
| 16302 | $as_echo_n "(cached) " >&6 | ||
| 16303 | else | ||
| 16304 | touch conftest.tmp | ||
| 16305 | # Assume that if we have lstat, we can also check symlinks. | ||
| 16306 | if test $ac_cv_func_lstat = yes; then | ||
| 16307 | ln -s conftest.tmp conftest.lnk | ||
| 16308 | fi | ||
| 16309 | if test "$cross_compiling" = yes; then : | ||
| 16310 | gl_cv_func_stat_file_slash="guessing no" | ||
| 16311 | else | ||
| 16312 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
| 16313 | /* end confdefs.h. */ | ||
| 16314 | #include <sys/stat.h> | ||
| 16315 | |||
| 16316 | int | ||
| 16317 | main () | ||
| 16318 | { | ||
| 16319 | int result = 0; | ||
| 16320 | struct stat st; | ||
| 16321 | if (!stat ("conftest.tmp/", &st)) | ||
| 16322 | result |= 1; | ||
| 16323 | #if HAVE_LSTAT | ||
| 16324 | if (!stat ("conftest.lnk/", &st)) | ||
| 16325 | result |= 2; | ||
| 16326 | #endif | ||
| 16327 | return result; | ||
| 16328 | |||
| 16329 | ; | ||
| 16330 | return 0; | ||
| 16331 | } | ||
| 16332 | _ACEOF | ||
| 16333 | if ac_fn_c_try_run "$LINENO"; then : | ||
| 16334 | gl_cv_func_stat_file_slash=yes | ||
| 16335 | else | ||
| 16336 | gl_cv_func_stat_file_slash=no | ||
| 16337 | fi | ||
| 16338 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | ||
| 16339 | conftest.$ac_objext conftest.beam conftest.$ac_ext | ||
| 16340 | fi | ||
| 16341 | |||
| 16342 | rm -f conftest.tmp conftest.lnk | ||
| 16343 | fi | ||
| 16344 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5 | ||
| 16345 | $as_echo "$gl_cv_func_stat_file_slash" >&6; } | ||
| 16346 | case $gl_cv_func_stat_dir_slash in | ||
| 16347 | *no) REPLACE_STAT=1 | ||
| 16348 | |||
| 16349 | $as_echo "#define REPLACE_FUNC_STAT_DIR 1" >>confdefs.h | ||
| 16350 | ;; | ||
| 16351 | esac | ||
| 16352 | case $gl_cv_func_stat_file_slash in | ||
| 16353 | *no) REPLACE_STAT=1 | ||
| 16354 | |||
| 16355 | $as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h | ||
| 16356 | ;; | ||
| 16357 | esac | ||
| 16358 | if test $REPLACE_STAT = 1; then | ||
| 16359 | |||
| 16360 | |||
| 16361 | |||
| 16362 | |||
| 16363 | |||
| 16364 | |||
| 16365 | |||
| 16366 | |||
| 16367 | gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext" | ||
| 16368 | |||
| 16369 | |||
| 16370 | fi | ||
| 16371 | |||
| 16372 | |||
| 16373 | |||
| 16374 | |||
| 16375 | GNULIB_STAT=1 | ||
| 16376 | |||
| 16377 | |||
| 16378 | |||
| 16036 | # Code from module stdbool: | 16379 | # Code from module stdbool: |
| 16037 | 16380 | ||
| 16038 | 16381 | ||
| @@ -16937,6 +17280,86 @@ $as_echo "#define my_strftime nstrftime" >>confdefs.h | |||
| 16937 | 17280 | ||
| 16938 | 17281 | ||
| 16939 | 17282 | ||
| 17283 | # Code from module symlink: | ||
| 17284 | |||
| 17285 | |||
| 17286 | |||
| 17287 | if test $ac_cv_func_symlink = no; then | ||
| 17288 | HAVE_SYMLINK=0 | ||
| 17289 | |||
| 17290 | |||
| 17291 | |||
| 17292 | |||
| 17293 | |||
| 17294 | |||
| 17295 | |||
| 17296 | |||
| 17297 | gl_LIBOBJS="$gl_LIBOBJS symlink.$ac_objext" | ||
| 17298 | |||
| 17299 | else | ||
| 17300 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether symlink handles trailing slash correctly" >&5 | ||
| 17301 | $as_echo_n "checking whether symlink handles trailing slash correctly... " >&6; } | ||
| 17302 | if ${gl_cv_func_symlink_works+:} false; then : | ||
| 17303 | $as_echo_n "(cached) " >&6 | ||
| 17304 | else | ||
| 17305 | if test "$cross_compiling" = yes; then : | ||
| 17306 | gl_cv_func_symlink_works="guessing no" | ||
| 17307 | else | ||
| 17308 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
| 17309 | /* end confdefs.h. */ | ||
| 17310 | #include <unistd.h> | ||
| 17311 | |||
| 17312 | int | ||
| 17313 | main () | ||
| 17314 | { | ||
| 17315 | int result = 0; | ||
| 17316 | if (!symlink ("a", "conftest.link/")) | ||
| 17317 | result |= 1; | ||
| 17318 | if (symlink ("conftest.f", "conftest.lnk2")) | ||
| 17319 | result |= 2; | ||
| 17320 | else if (!symlink ("a", "conftest.lnk2/")) | ||
| 17321 | result |= 4; | ||
| 17322 | return result; | ||
| 17323 | |||
| 17324 | ; | ||
| 17325 | return 0; | ||
| 17326 | } | ||
| 17327 | _ACEOF | ||
| 17328 | if ac_fn_c_try_run "$LINENO"; then : | ||
| 17329 | gl_cv_func_symlink_works=yes | ||
| 17330 | else | ||
| 17331 | gl_cv_func_symlink_works=no | ||
| 17332 | fi | ||
| 17333 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | ||
| 17334 | conftest.$ac_objext conftest.beam conftest.$ac_ext | ||
| 17335 | fi | ||
| 17336 | |||
| 17337 | rm -f conftest.f conftest.link conftest.lnk2 | ||
| 17338 | fi | ||
| 17339 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_symlink_works" >&5 | ||
| 17340 | $as_echo "$gl_cv_func_symlink_works" >&6; } | ||
| 17341 | if test "$gl_cv_func_symlink_works" != yes; then | ||
| 17342 | REPLACE_SYMLINK=1 | ||
| 17343 | |||
| 17344 | |||
| 17345 | |||
| 17346 | |||
| 17347 | |||
| 17348 | |||
| 17349 | |||
| 17350 | |||
| 17351 | gl_LIBOBJS="$gl_LIBOBJS symlink.$ac_objext" | ||
| 17352 | |||
| 17353 | fi | ||
| 17354 | fi | ||
| 17355 | |||
| 17356 | |||
| 17357 | |||
| 17358 | |||
| 17359 | GNULIB_SYMLINK=1 | ||
| 17360 | |||
| 17361 | |||
| 17362 | |||
| 16940 | # Code from module sys_stat: | 17363 | # Code from module sys_stat: |
| 16941 | 17364 | ||
| 16942 | 17365 | ||
| @@ -17220,23 +17643,6 @@ $as_echo "$gl_cv_next_unistd_h" >&6; } | |||
| 17220 | 17643 | ||
| 17221 | 17644 | ||
| 17222 | 17645 | ||
| 17223 | # Emacs does not care about lstat's behavior on files whose names end in | ||
| 17224 | # trailing slashes, so it does not use the gnulib lstat module. | ||
| 17225 | # However, Emacs does want the "#define lstat stat" in sys/stat.h | ||
| 17226 | # when lstat does not exist, so it pretends to use the lstat module | ||
| 17227 | # even though it implements only the lstat-checking part of that module. | ||
| 17228 | |||
| 17229 | |||
| 17230 | |||
| 17231 | test $ac_cv_func_lstat = yes || HAVE_LSTAT=0 | ||
| 17232 | |||
| 17233 | |||
| 17234 | |||
| 17235 | GNULIB_LSTAT=1 | ||
| 17236 | |||
| 17237 | |||
| 17238 | |||
| 17239 | |||
| 17240 | # UNIX98 PTYs. | 17646 | # UNIX98 PTYs. |
| 17241 | for ac_func in grantpt | 17647 | for ac_func in grantpt |
| 17242 | do : | 17648 | do : |