@@ -4187,6 +4187,8 @@ $as_echo_n "checking for Darwin (Mac OS X)... " >&6; }
41874187if test " ` (uname) 2> /dev/null` " = Darwin; then
41884188 { $as_echo " $as_me :${as_lineno-$LINENO } : result: yes" >&5
41894189$as_echo " yes" >&6 ; }
4190+ MACOS_X=yes
4191+ CPPFLAGS=" $CPPFLAGS -DMACOS_X"
41904192
41914193 { $as_echo " $as_me :${as_lineno-$LINENO } : checking --disable-darwin argument" >&5
41924194$as_echo_n " checking --disable-darwin argument... " >&6 ; }
@@ -4357,10 +4359,10 @@ rm -f core conftest.err conftest.$ac_objext \
43574359 fi
43584360
43594361 if test " $enable_darwin " = " yes" ; then
4360- MACOSX =yes
4362+ MACOS_X_DARWIN =yes
43614363 OS_EXTRA_SRC=" os_macosx.m os_mac_conv.c" ;
43624364 OS_EXTRA_OBJ=" objects/os_macosx.o objects/os_mac_conv.o"
4363- CPPFLAGS=" $CPPFLAGS -DMACOS_X_UNIX "
4365+ CPPFLAGS=" $CPPFLAGS -DMACOS_X_DARWIN "
43644366
43654367 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
43664368for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
@@ -5153,7 +5155,7 @@ rm -f core conftest.err conftest.$ac_objext \
51535155 if test -f " ${vi_cv_path_lua_pfx} /bin/cyglua-${vi_cv_version_lua} .dll" ; then
51545156 vi_cv_dll_name_lua=" cyglua-${vi_cv_version_lua} .dll"
51555157 else
5156- if test " x$MACOSX " = " xyes" ; then
5158+ if test " x$MACOS_X " = " xyes" ; then
51575159 ext=" dylib"
51585160 indexes=" "
51595161 else
@@ -5199,7 +5201,7 @@ $as_echo "yes" >&6; }
51995201 LUA_CFLAGS=" -DDYNAMIC_LUA_DLL=\\\" ${vi_cv_dll_name_lua} \\\" $LUA_CFLAGS "
52005202 fi
52015203 if test " X$LUA_CFLAGS$LUA_LIBS " ! = " X" && \
5202- test " x$MACOSX " = " xyes" && test " x$vi_cv_with_luajit " ! = " xno" && \
5204+ test " x$MACOS_X " = " xyes" && test " x$vi_cv_with_luajit " ! = " xno" && \
52035205 test " ` (uname -m) 2> /dev/null` " = " x86_64" ; then
52045206 LUA_LIBS=" -pagezero_size 10000 -image_base 100000000 $LUA_LIBS "
52055207 fi
@@ -5404,7 +5406,7 @@ $as_echo "not found" >&6; }
54045406
54055407 for path in " ${vi_cv_path_mzscheme_pfx} /lib" " ${SCHEME_LIB} " ; do
54065408 if test " X$path " ! = " X" ; then
5407- if test " x$MACOSX " = " xyes" ; then
5409+ if test " x$MACOS_X " = " xyes" ; then
54085410 MZSCHEME_LIBS=" -framework Racket"
54095411 MZSCHEME_CFLAGS=" -DMZ_PRECISE_GC"
54105412 elif test -f " ${path} /libmzscheme3m.a" ; then
@@ -5784,7 +5786,7 @@ $as_echo ">>> too old; need Perl version 5.003_01 or later <<<" >&6; }
57845786 fi
57855787 fi
57865788
5787- if test " x$MACOSX " = " xyes" ; then
5789+ if test " x$MACOS_X " = " xyes" ; then
57885790 dir=/System/Library/Perl
57895791 darwindir=$dir /darwin
57905792 if test -d $darwindir ; then
@@ -6002,7 +6004,7 @@ __:
60026004eof
60036005 eval " ` cd ${PYTHON_CONFDIR} && make -f " ${tmp_mkf} " __ | sed ' / directory /d' ` "
60046006 rm -f -- " ${tmp_mkf} "
6005- if test " x$MACOSX " = " xyes" && test -n " ${python_PYTHONFRAMEWORK} " && ${vi_cv_path_python} -c \
6007+ if test " x$MACOS_X " = " xyes" && test -n " ${python_PYTHONFRAMEWORK} " && ${vi_cv_path_python} -c \
60066008 " import sys; sys.exit(${vi_cv_var_python_version} < 2.3)" ; then
60076009 vi_cv_path_python_plibs=" -framework Python"
60086010 if test " x${vi_cv_path_python} " ! = " x/usr/bin/python" && test -n " ${python_PYTHONFRAMEWORKPREFIX} " ; then
@@ -6965,7 +6967,7 @@ $as_echo "$tclver - OK" >&6; };
69656967
69666968 { $as_echo " $as_me :${as_lineno-$LINENO } : checking for location of Tcl include" >&5
69676969$as_echo_n " checking for location of Tcl include... " >&6 ; }
6968- if test " x$MACOSX " ! = " xyes" ; then
6970+ if test " x$MACOS_X " ! = " xyes" ; then
69696971 tclinc=" $tclloc /include $tclloc /include/tcl $tclloc /include/tcl$tclver /usr/local/include /usr/local/include/tcl$tclver /usr/include /usr/include/tcl$tclver "
69706972 else
69716973 tclinc=" /System/Library/Frameworks/Tcl.framework/Headers"
@@ -6987,7 +6989,7 @@ $as_echo "<not found>" >&6; }
69876989 if test -z " $SKIP_TCL " ; then
69886990 { $as_echo " $as_me :${as_lineno-$LINENO } : checking for location of tclConfig.sh script" >&5
69896991$as_echo_n " checking for location of tclConfig.sh script... " >&6 ; }
6990- if test " x$MACOSX " ! = " xyes" ; then
6992+ if test " x$MACOS_X " ! = " xyes" ; then
69916993 tclcnf=` echo $tclinc | sed s/include/lib/g`
69926994 tclcnf=" $tclcnf ` echo $tclinc | sed s/include/lib64/g` "
69936995 else
75677569$as_echo " $enable_fontset " >&6 ; }
75687570
75697571test -z " $with_x " && with_x=yes
7570- test " ${enable_gui-yes} " ! = no -a " x$MACOSX " ! = " xyes" -a " x$QNX " ! = " xyes" && with_x=yes
7572+ test " ${enable_gui-yes} " ! = no -a " x$MACOS_X " ! = " xyes" -a " x$QNX " ! = " xyes" && with_x=yes
75717573if test " $with_x " = no; then
75727574 { $as_echo " $as_me :${as_lineno-$LINENO } : result: defaulting to: don't HAVE_X11" >&5
75737575$as_echo " defaulting to: don't HAVE_X11" >&6 ; }
@@ -8584,7 +8586,7 @@ $as_echo "$ac_cv_small_wchar_t" >&6; }
85848586 fi
85858587fi
85868588
8587- test " x$with_x " = xno -a " x$MACOSX " ! = " xyes" -a " x$QNX " ! = " xyes" && enable_gui=no
8589+ test " x$with_x " = xno -a " x$MACOS_X " ! = " xyes" -a " x$QNX " ! = " xyes" && enable_gui=no
85888590
85898591{ $as_echo " $as_me :${as_lineno-$LINENO } : checking --enable-gui argument" >&5
85908592$as_echo_n " checking --enable-gui argument... " >&6 ; }
@@ -8626,7 +8628,7 @@ $as_echo "Sorry, $enable_gui GUI is not supported" >&6; }
86268628 SKIP_PHOTON=YES ;;
86278629 esac
86288630
8629- elif test " x$MACOSX " = " xyes" -a " x$with_x " = " xno" ; then
8631+ elif test " x$MACOS_X " = " xyes" -a " x$with_x " = " xno" ; then
86308632 SKIP_CARBON=
86318633 case " $enable_gui_canon " in
86328634 no) { $as_echo " $as_me :${as_lineno-$LINENO } : result: no GUI support" >&5
@@ -8804,7 +8806,7 @@ $as_echo "$enable_carbon_check" >&6; };
88048806fi
88058807
88068808
8807- if test " x$MACOSX " = " xyes" -a -z " $SKIP_CARBON " -a " x$CARBON " = " xyes" ; then
8809+ if test " x$MACOS_X " = " xyes" -a -z " $SKIP_CARBON " -a " x$CARBON " = " xyes" ; then
88088810 { $as_echo " $as_me :${as_lineno-$LINENO } : checking for Carbon GUI" >&5
88098811$as_echo_n " checking for Carbon GUI... " >&6 ; }
88108812 { $as_echo " $as_me :${as_lineno-$LINENO } : result: yes" >&5
@@ -10624,7 +10626,7 @@ fi
1062410626
1062510627done
1062610628
10627- if test " x$MACOSX " = " xyes" ; then
10629+ if test " x$MACOS_X " = " xyes" ; then
1062810630 $as_echo " #define NO_STRINGS_WITH_STRING_H 1" >> confdefs.h
1062910631
1063010632else
@@ -12076,7 +12078,7 @@ for ac_func in fchdir fchown fsync getcwd getpseudotty \
1207612078 getpgid setpgid setsid sigaltstack sigstack sigset sigsetjmp sigaction \
1207712079 sigprocmask sigvec strcasecmp strerror strftime stricmp strncasecmp \
1207812080 strnicmp strpbrk strtol tgetent towlower towupper iswupper \
12079- usleep utime utimes
12081+ usleep utime utimes mblen
1208012082do :
1208112083 as_ac_var=` $as_echo " ac_cv_func_$ac_func " | $as_tr_sh `
1208212084ac_fn_c_check_func " $LINENO " " $ac_func " " $as_ac_var "
@@ -14099,27 +14101,50 @@ fi
1409914101done
1410014102
1410114103
14102- if test " x$MACOSX " = " xyes" -a -n " $PERL " ; then
14104+ if test " x$MACOS_X " = " xyes" -a -n " $PERL " ; then
1410314105 if echo $LIBS | grep -e ' -ldl' > /dev/null; then
1410414106 LIBS=` echo $LIBS | sed s/-ldl//`
1410514107 PERL_LIBS=" $PERL_LIBS -ldl"
1410614108 fi
1410714109fi
1410814110
14109- if test " x$MACOSX " = " xyes" ; then
14110- { $as_echo " $as_me :${as_lineno-$LINENO } : checking whether we need -framework Cocoa" >&5
14111- $as_echo_n " checking whether we need -framework Cocoa... " >&6 ; }
14112- if test " x$features " ! = " xtiny" || test " x$enable_multibyte " = " xyes" ; then
14113- LIBS=$" $LIBS -framework Cocoa"
14114- { $as_echo " $as_me :${as_lineno-$LINENO } : result: yes" >&5
14115- $as_echo " yes" >&6 ; }
14111+ if test " $MACOS_X " = " yes" ; then
14112+ { $as_echo " $as_me :${as_lineno-$LINENO } : checking whether we need macOS frameworks" >&5
14113+ $as_echo_n " checking whether we need macOS frameworks... " >&6 ; }
14114+ if test " $GUITYPE " = " CARBONGUI" ; then
14115+ { $as_echo " $as_me :${as_lineno-$LINENO } : result: yes, we need Carbon" >&5
14116+ $as_echo " yes, we need Carbon" >&6 ; }
14117+ LIBS=" $LIBS -framework Carbon"
14118+ elif test " $MACOS_X_DARWIN " = " yes" ; then
14119+ if test " $features " = " tiny" ; then
14120+ OS_EXTRA_SRC=` echo " $OS_EXTRA_SRC " | sed -e ' s+os_macosx.m++' `
14121+ OS_EXTRA_OBJ=` echo " $OS_EXTRA_OBJ " | sed -e ' s+objects/os_macosx.o++' `
14122+ if test " $enable_multibyte " = " yes" ; then
14123+ { $as_echo " $as_me :${as_lineno-$LINENO } : result: yes, we need CoreServices" >&5
14124+ $as_echo " yes, we need CoreServices" >&6 ; }
14125+ LIBS=" $LIBS -framework CoreServices"
14126+ else
14127+ { $as_echo " $as_me :${as_lineno-$LINENO } : result: no" >&5
14128+ $as_echo " no" >&6 ; }
14129+ OS_EXTRA_SRC=` echo " $OS_EXTRA_SRC " | sed -e ' s+os_mac_conv.c++' `
14130+ OS_EXTRA_OBJ=` echo " $OS_EXTRA_OBJ " | sed -e ' s+objects/os_mac_conv.o++' `
14131+ CPPFLAGS=` echo " $CPPFLAGS " | sed -e ' s+-DMACOS_X_DARWIN++' `
14132+ fi
14133+ else
14134+ { $as_echo " $as_me :${as_lineno-$LINENO } : result: yes, we need AppKit" >&5
14135+ $as_echo " yes, we need AppKit" >&6 ; }
14136+ LIBS=" $LIBS -framework AppKit"
14137+ if test " $features " = " small" -a " $enable_multibyte " = " no" ; then
14138+ { $as_echo " $as_me :${as_lineno-$LINENO } : +multi_byte will be set in favor of +clipboard" >&5
14139+ $as_echo " $as_me : +multi_byte will be set in favor of +clipboard" >&6 ; }
14140+ enable_multibyte=yes
14141+ $as_echo " #define FEAT_MBYTE 1" >> confdefs.h
14142+
14143+ fi
14144+ fi
1411614145 else
1411714146 { $as_echo " $as_me :${as_lineno-$LINENO } : result: no" >&5
1411814147$as_echo " no" >&6 ; }
14119- fi
14120- if test " x$features " = " xtiny" ; then
14121- OS_EXTRA_SRC=` echo " $OS_EXTRA_SRC " | sed -e ' s+os_macosx.m++' `
14122- OS_EXTRA_OBJ=` echo " $OS_EXTRA_OBJ " | sed -e ' s+objects/os_macosx.o++' `
1412314148 fi
1412414149fi
1412514150if test " x$MACARCH " = " xboth" && test " x$GUITYPE " = " xCARBONGUI" ; then
0 commit comments