aboutsummaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorPaul Eggert2011-03-01 21:25:09 -0800
committerPaul Eggert2011-03-01 21:25:09 -0800
commit6c0dea8a89bdfbdad454a9609f0bed8db4c9fccf (patch)
treefbde0220480ce4d37903e98c74c5103a0f320f16 /configure
parent8889f4e2c332b0ecedc9e6088252f4cbae301236 (diff)
parent4a8b879b87962d5f37c05d3650f43cc571b22bc7 (diff)
downloademacs-6c0dea8a89bdfbdad454a9609f0bed8db4c9fccf.tar.gz
emacs-6c0dea8a89bdfbdad454a9609f0bed8db4c9fccf.zip
Merge: Work around some portability problems with symlinks.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure602
1 files changed, 504 insertions, 98 deletions
diff --git a/configure b/configure
index f3fae2fb85f..68447e985f0 100755
--- a/configure
+++ b/configure
@@ -679,38 +679,6 @@ NEXT_AS_FIRST_DIRECTIVE_TIME_H
679NEXT_TIME_H 679NEXT_TIME_H
680NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H 680NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
681NEXT_SYS_STAT_H 681NEXT_SYS_STAT_H
682REPLACE_UTIMENSAT
683REPLACE_STAT
684REPLACE_MKNOD
685REPLACE_MKFIFO
686REPLACE_MKDIR
687REPLACE_LSTAT
688REPLACE_FUTIMENS
689REPLACE_FSTATAT
690REPLACE_FSTAT
691HAVE_UTIMENSAT
692HAVE_MKNODAT
693HAVE_MKNOD
694HAVE_MKFIFOAT
695HAVE_MKFIFO
696HAVE_MKDIRAT
697HAVE_LSTAT
698HAVE_LCHMOD
699HAVE_FUTIMENS
700HAVE_FSTATAT
701HAVE_FCHMODAT
702GNULIB_UTIMENSAT
703GNULIB_STAT
704GNULIB_MKNODAT
705GNULIB_MKNOD
706GNULIB_MKFIFOAT
707GNULIB_MKFIFO
708GNULIB_MKDIRAT
709GNULIB_LSTAT
710GNULIB_LCHMOD
711GNULIB_FUTIMENS
712GNULIB_FSTATAT
713GNULIB_FCHMODAT
714NEXT_AS_FIRST_DIRECTIVE_STDLIB_H 682NEXT_AS_FIRST_DIRECTIVE_STDLIB_H
715NEXT_STDLIB_H 683NEXT_STDLIB_H
716STDINT_H 684STDINT_H
@@ -758,6 +726,38 @@ GNULIB_TIMEGM
758GNULIB_STRPTIME 726GNULIB_STRPTIME
759GNULIB_NANOSLEEP 727GNULIB_NANOSLEEP
760GNULIB_MKTIME 728GNULIB_MKTIME
729REPLACE_UTIMENSAT
730REPLACE_STAT
731REPLACE_MKNOD
732REPLACE_MKFIFO
733REPLACE_MKDIR
734REPLACE_LSTAT
735REPLACE_FUTIMENS
736REPLACE_FSTATAT
737REPLACE_FSTAT
738HAVE_UTIMENSAT
739HAVE_MKNODAT
740HAVE_MKNOD
741HAVE_MKFIFOAT
742HAVE_MKFIFO
743HAVE_MKDIRAT
744HAVE_LSTAT
745HAVE_LCHMOD
746HAVE_FUTIMENS
747HAVE_FSTATAT
748HAVE_FCHMODAT
749GNULIB_UTIMENSAT
750GNULIB_STAT
751GNULIB_MKNODAT
752GNULIB_MKNOD
753GNULIB_MKFIFOAT
754GNULIB_MKFIFO
755GNULIB_MKDIRAT
756GNULIB_LSTAT
757GNULIB_LCHMOD
758GNULIB_FUTIMENS
759GNULIB_FSTATAT
760GNULIB_FCHMODAT
761LTLIBINTL 761LTLIBINTL
762LIBINTL 762LIBINTL
763GETOPT_H 763GETOPT_H
@@ -1165,9 +1165,6 @@ LDFLAGS
1165LIBS 1165LIBS
1166CPPFLAGS 1166CPPFLAGS
1167CPP 1167CPP
1168CPPFLAGS
1169CPP
1170CPPFLAGS
1171XMKMF' 1168XMKMF'
1172 1169
1173 1170
@@ -2960,14 +2957,16 @@ as_fn_append ac_header_list " unistd.h"
2960as_fn_append ac_header_list " sys/param.h" 2957as_fn_append ac_header_list " sys/param.h"
2961gl_getopt_required=GNU 2958gl_getopt_required=GNU
2962as_fn_append ac_header_list " getopt.h" 2959as_fn_append ac_header_list " getopt.h"
2960as_fn_append ac_func_list " lstat"
2963as_fn_append ac_func_list " alarm" 2961as_fn_append ac_func_list " alarm"
2962as_fn_append ac_func_list " readlink"
2964as_fn_append ac_header_list " wchar.h" 2963as_fn_append ac_header_list " wchar.h"
2965as_fn_append ac_header_list " stdint.h" 2964as_fn_append ac_header_list " stdint.h"
2966as_fn_append ac_func_list " tzset" 2965as_fn_append ac_func_list " tzset"
2966as_fn_append ac_func_list " symlink"
2967as_fn_append ac_header_list " sys/stat.h" 2967as_fn_append ac_header_list " sys/stat.h"
2968as_fn_append ac_header_list " sys/time.h" 2968as_fn_append ac_header_list " sys/time.h"
2969as_fn_append ac_func_list " localtime_r" 2969as_fn_append ac_func_list " localtime_r"
2970as_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.
2973ac_cache_corrupted=false 2972ac_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; }
14560if ${ac_cv_func_lstat_dereferences_slashed_symlink+:} false; then :
14561 $as_echo_n "(cached) " >&6
14562else
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
14572else
14573 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14574/* end confdefs.h. */
14575$ac_includes_default
14576int
14577main ()
14578{
14579struct 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
14589if ac_fn_c_try_run "$LINENO"; then :
14590 ac_cv_func_lstat_dereferences_slashed_symlink=yes
14591else
14592 ac_cv_func_lstat_dereferences_slashed_symlink=no
14593fi
14594rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14595 conftest.$ac_objext conftest.beam conftest.$ac_ext
14596fi
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
14605fi
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
14610cat >>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; }
14578if ${ac_cv_header_stdbool_h+:} false; then : 14690if ${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; }
16161if ${gl_cv_decl_readlink_works+:} false; then :
16162 $as_echo_n "(cached) " >&6
16163else
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);
16169int
16170main ()
16171{
16172
16173 ;
16174 return 0;
16175}
16176_ACEOF
16177if ac_fn_c_try_compile "$LINENO"; then :
16178 gl_cv_decl_readlink_works=yes
16179else
16180 gl_cv_decl_readlink_works=no
16181fi
16182rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16183fi
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; }
16188if ${gl_cv_func_readlink_works+:} false; then :
16189 $as_echo_n "(cached) " >&6
16190else
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"
16196else
16197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16198/* end confdefs.h. */
16199#include <unistd.h>
16200
16201int
16202main ()
16203{
16204char buf[20];
16205 return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;
16206 ;
16207 return 0;
16208}
16209_ACEOF
16210if ac_fn_c_try_run "$LINENO"; then :
16211 gl_cv_func_readlink_works=yes
16212else
16213 gl_cv_func_readlink_works=no
16214fi
16215rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16216 conftest.$ac_objext conftest.beam conftest.$ac_ext
16217fi
16218
16219 rm -f conftest.link conftest.lnk2
16220fi
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; }
16266if ${gl_cv_func_stat_dir_slash+:} false; then :
16267 $as_echo_n "(cached) " >&6
16268else
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
16274else
16275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16276/* end confdefs.h. */
16277#include <sys/stat.h>
16278
16279int
16280main ()
16281{
16282struct stat st; return stat (".", &st) != stat ("./", &st);
16283 ;
16284 return 0;
16285}
16286_ACEOF
16287if ac_fn_c_try_run "$LINENO"; then :
16288 gl_cv_func_stat_dir_slash=yes
16289else
16290 gl_cv_func_stat_dir_slash=no
16291fi
16292rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16293 conftest.$ac_objext conftest.beam conftest.$ac_ext
16294fi
16295
16296fi
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; }
16301if ${gl_cv_func_stat_file_slash+:} false; then :
16302 $as_echo_n "(cached) " >&6
16303else
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"
16311else
16312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16313/* end confdefs.h. */
16314#include <sys/stat.h>
16315
16316int
16317main ()
16318{
16319int 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
16333if ac_fn_c_try_run "$LINENO"; then :
16334 gl_cv_func_stat_file_slash=yes
16335else
16336 gl_cv_func_stat_file_slash=no
16337fi
16338rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16339 conftest.$ac_objext conftest.beam conftest.$ac_ext
16340fi
16341
16342 rm -f conftest.tmp conftest.lnk
16343fi
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; }
17302if ${gl_cv_func_symlink_works+:} false; then :
17303 $as_echo_n "(cached) " >&6
17304else
17305 if test "$cross_compiling" = yes; then :
17306 gl_cv_func_symlink_works="guessing no"
17307else
17308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17309/* end confdefs.h. */
17310#include <unistd.h>
17311
17312int
17313main ()
17314{
17315int 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
17328if ac_fn_c_try_run "$LINENO"; then :
17329 gl_cv_func_symlink_works=yes
17330else
17331 gl_cv_func_symlink_works=no
17332fi
17333rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17334 conftest.$ac_objext conftest.beam conftest.$ac_ext
17335fi
17336
17337 rm -f conftest.f conftest.link conftest.lnk2
17338fi
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
17231test $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.
17241for ac_func in grantpt 17647for ac_func in grantpt
17242do : 17648do :